| | |
| | | this.listArr = []; |
| | | this.pageNumVal = 1; |
| | | this.loadings = true; |
| | | this.getStock(e, this.zxactive, 1); |
| | | }, |
| | | zxactive(e) { |
| | | this.finished = false; |
| | |
| | | finished: false, |
| | | listArr: [], |
| | | pageNumVal: 1, |
| | | getInterval: null, |
| | | }; |
| | | }, |
| | | |
| | |
| | | this.listArr = []; |
| | | this.pageNumVal = 1; |
| | | this.getStock(this.active, this.zxactive, 1); |
| | | this.getInterval = setInterval(() => { |
| | | this.getStock(this.active, this.zxactive, 1); |
| | | }, 5000); |
| | | }, |
| | | methods: { |
| | | filterSH(val) { |
| | |
| | | // 获取列表 |
| | | getStock: handleDt.debounce(async function (a, b, c) { |
| | | a = this.active; |
| | | |
| | | let stockType = ""; |
| | | if (a !== "") { |
| | | let array = this.tabsList.filter((item) => item.key === a); |
| | | stockType = array[0].name; |
| | | } else { |
| | | // return this.getStockzx(); |
| | | let array = this.zxtabsList.filter((item) => item.key === b); |
| | | stockType = array[0].name; |
| | | } |
| | | console.log(a, b, c, "====="); |
| | | let pageNumVal = c || this.pageNumVal; |
| | | let opt = { |
| | | pageNum: pageNumVal, |
| | | pageSize: 15, |
| | | pageSize: 100, |
| | | stockPlate: "", |
| | | keyWords: this.sousuo, |
| | | stockType: stockType, |
| | |
| | | |
| | | this.loadings = false; |
| | | if (data.status === 0) { |
| | | if (data.data.list.length < 15) { |
| | | this.finished = true; |
| | | } |
| | | // if (data.data.list.length < 15) { |
| | | this.finished = true; |
| | | // } |
| | | if (pageNumVal !== 1) { |
| | | this.listArr = [...this.listArr, ...data.data.list]; |
| | | } else { |
| | |
| | | } |
| | | }, 500), |
| | | onLoads() { |
| | | this.pageNumVal++; |
| | | this.loadings = true; |
| | | this.getStock(); |
| | | // this.pageNumVal++; |
| | | // this.loadings = true; |
| | | // this.getStock(); |
| | | }, |
| | | optionszx() {}, |
| | | }, |
| | | destroyed() { |
| | | clearInterval(this.getInterval); |
| | | this.getInterval = null; |
| | | }, |
| | | }; |
| | | </script> |
| | | |