| | |
| | | <van-col span="8"> |
| | | <div> |
| | | {{ $t("hj313") }} |
| | | </div></van-col |
| | | > |
| | | <van-col span="10" |
| | | ><div style="text-align: right"> |
| | | </div> |
| | | </van-col> |
| | | <van-col span="10"> |
| | | <div style="text-align: right"> |
| | | {{ $t("hj314") }} |
| | | </div></van-col |
| | | > |
| | | </div> |
| | | </van-col> |
| | | <van-col span="6"> |
| | | <div style="text-align: right"> |
| | | {{ $t("hj315") }} |
| | | </div></van-col |
| | | > |
| | | </div> |
| | | </van-col> |
| | | </van-row> |
| | | </div> |
| | | |
| | |
| | | type: Array, |
| | | default: [], |
| | | }, |
| | | zxtabsList: { |
| | | type: Array, |
| | | default: [], |
| | | }, |
| | | }, |
| | | watch: { |
| | | active(e) { |
| | |
| | | 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; |
| | |
| | | if (a !== "") { |
| | | let array = this.tabsList.filter((item) => item.key === a); |
| | | stockType = array[0].name; |
| | | } else { |
| | | let array = this.zxtabsList.filter((item) => item.key === b); |
| | | stockType = array[0].name; |
| | | } |
| | | let pageNumVal = c || this.pageNumVal; |
| | | let opt = { |
| | | pageNum: pageNumVal, |
| | | pageSize: 15, |
| | | pageSize: 100, |
| | | stockPlate: "", |
| | | keyWords: this.sousuo, |
| | | stockType: stockType, |
| | | orderBy: "", |
| | | }; |
| | | let data = await api.getStockByType(opt); |
| | | this.loadings = false; |
| | | |
| | | // console.log(); |
| | | // api.positionzx; |
| | | let data; |
| | | if (a !== "") { |
| | | data = await api.getStockByType(opt); |
| | | } else { |
| | | // 自选 |
| | | data = await api.positionzx(opt); |
| | | } |
| | | |
| | | if (data.status === 0) { |
| | | console.log(data.data.list.length < 15); |
| | | if (data.data.list.length < 15) { |
| | | this.finished = true; |
| | | } |
| | | if (pageNumVal !== 1) { |
| | | this.listArr = [...this.listArr, ...data.data.list]; |
| | | } else { |
| | | this.listArr = data.data.list; |
| | | if (this.active) { |
| | | if (this.active === data.data.stockType) { |
| | | this.listArr = data.data.list; |
| | | this.loadings = false; |
| | | this.finished = true; |
| | | } |
| | | } else { |
| | | if (this.zxactive === data.data.stockType) { |
| | | this.listArr = data.data.list; |
| | | this.loadings = false; |
| | | this.finished = true; |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | this.finished = true; |
| | | } |
| | | }, 500), |
| | | onLoads() { |
| | | console.log(333333); |
| | | // if (!this.loading) { |
| | | this.pageNumVal++; |
| | | this.loadings = true; |
| | | this.getStock(); |
| | | // } |
| | | // this.pageNumVal++; |
| | | // this.loadings = true; |
| | | // this.getStock(); |
| | | }, |
| | | optionszx() {}, |
| | | }, |
| | | destroyed() { |
| | | clearInterval(this.getInterval); |
| | | this.getInterval = null; |
| | | }, |
| | | }; |
| | | </script> |
| | | |