| | |
| | | :key="index" |
| | | @click="$router.push(`/Stockdetail?codes=${item.positionSn}`)" > |
| | | <div @click.stop="pushRouter(item)"> |
| | | |
| | | <div class="title-box" style="justify-content: space-between;"> |
| | | <div class="span" :style="item.isListed==false?'color:red;':''">{{ item.stockName }}</div> |
| | | <div |
| | |
| | | }; |
| | | }, |
| | | created(){ |
| | | // this.dsq() |
| | | this.dsq() |
| | | }, |
| | | beforeDestroy() { |
| | | clearInterval(this.timer); // 在组件销毁前清除定时器 |
| | |
| | | } |
| | | }, |
| | | // 获取仓位列表 |
| | | async getLists(laber) { |
| | | if (laber) { |
| | | this.dataList = []; |
| | | this.pageNum = 1; |
| | | this.finished = false; |
| | | } |
| | | const res = await getchicang({ |
| | | state: this.actives, |
| | | stockType: laber || this.activeObj.laber, |
| | | pageNum: 1, |
| | | pageSize: 30, |
| | | }); |
| | | |
| | | this.loading = false; |
| | | if (res.status === 0) { |
| | | this.newdataList = res.data.list; |
| | | this.finished = true; |
| | | } else { |
| | | this.loading = false; |
| | | this.finished = true; |
| | | } |
| | | }, |
| | | // 获取仓位列表 |
| | | async getList(laber) { |
| | | if (laber) { |
| | | this.dataList = []; |
| | |
| | | this.loading = false; |
| | | if (res.status === 0) { |
| | | this.dataList = [] |
| | | this.newdataList = [] |
| | | if(this.actives == 0){ |
| | | this.dataList = res.data.list; |
| | | }else{ |
| | | this.newdataList = res.data.list; |
| | | } |
| | | this.$forceUpdate(); // 强制Vue重新渲染 |
| | | // if (res.data.total <= this.dataList.length) { |
| | | this.dataList = res.data.list; |
| | | this.finished = true; |
| | | // this.dsq() |
| | | // this.timer = setInterval(() => { |
| | | // this.getList(); |
| | | // }, 3000); |
| | | // } |
| | | } else { |
| | | this.loading = false; |
| | | this.finished = true; |
| | |
| | | }, |
| | | |
| | | clickTabs(e) { |
| | | this.dataList = []; |
| | | this.pageNum = 1; |
| | | this.finished = false; |
| | | this.actives = e.key; |
| | | // this.newdataList = [] |
| | | // this.dataList = [] |
| | | this.newdataList = [] |
| | | this.dataList = [] |
| | | |
| | | if(e.key==1){ |
| | | clearInterval(this.timer); // 在组件销毁前清除定时器 |
| | |
| | | // setTimeout(()=>{ |
| | | // clearInterval(this.timer); // 在组件销毁前清除定时器 |
| | | // },3000) |
| | | this.dsq() |
| | | this.getLists() |
| | | // this.startPolling(); |
| | | // this.dsq() |
| | | }else{ |
| | | clearInterval(this.timer); // 在组件销毁前清除定时器 |
| | | this.getList() |
| | | this.dsq() |
| | | } |
| | | this.$forceUpdate(); // 强制Vue重新渲染 |
| | | |