| | |
| | | type: Array, |
| | | default: [], |
| | | }, |
| | | zxtabsList: { |
| | | type: Array, |
| | | default: [], |
| | | }, |
| | | }, |
| | | watch: { |
| | | active(e) { |
| | |
| | | }, |
| | | }); |
| | | }, |
| | | |
| | | // 获取列表 |
| | | 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, |
| | |
| | | stockType: stockType, |
| | | orderBy: "", |
| | | }; |
| | | let data = await api.getStockByType(opt); |
| | | |
| | | // console.log(); |
| | | // api.positionzx; |
| | | let data; |
| | | if (a !== "") { |
| | | data = await api.getStockByType(opt); |
| | | } else { |
| | | // 自选 |
| | | data = await api.positionzx(opt); |
| | | } |
| | | |
| | | this.loadings = false; |
| | | if (data.status === 0) { |
| | | console.log(data.data.list.length < 15); |
| | | if (data.data.list.length < 15) { |
| | | this.finished = true; |
| | | } |
| | |
| | | } |
| | | }, 500), |
| | | onLoads() { |
| | | console.log(333333); |
| | | // if (!this.loading) { |
| | | this.pageNumVal++; |
| | | this.loadings = true; |
| | | this.getStock(); |
| | | // } |
| | | }, |
| | | optionszx() {}, |
| | | }, |