| | |
| | | <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> |
| | | |
| | |
| | | </van-row> |
| | | </div> |
| | | </van-list> |
| | | |
| | | <dazy ref="dazy" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import * as api from "@/axios/api"; |
| | | import handleDt from "@/utils/deTh"; |
| | | import dazy from "./dazy.vue"; |
| | | |
| | | export default { |
| | | components: { dazy }, |
| | | props: { |
| | | active: { |
| | | type: String, |
| | |
| | | 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) { |
| | |
| | | return 0; |
| | | } |
| | | }, |
| | | // 点击进入详情 |
| | | |
| | | handleGoToKlineDetail1(item) { |
| | | // 如果是大宗交易。不需要进入详情 |
| | | if (this.active === "DZ") { |
| | | this.$refs.dazy.currentItem = item; |
| | | this.$refs.dazy.show = true; |
| | | return; |
| | | } |
| | | |
| | | // 点击进入详情 |
| | | const obj = { |
| | | pid: item.code || "", |
| | | type: item.stock_type || "", |
| | |
| | | // 获取列表 |
| | | 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); |
| | | console.log(this.zxtabsList, 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, |
| | |
| | | data = await api.positionzx(opt); |
| | | } |
| | | |
| | | this.loadings = false; |
| | | if (data.status === 0) { |
| | | 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() { |
| | | this.pageNumVal++; |
| | | this.loadings = true; |
| | | this.getStock(); |
| | | // this.pageNumVal++; |
| | | // this.loadings = true; |
| | | // this.getStock(); |
| | | }, |
| | | optionszx() {}, |
| | | }, |
| | | destroyed() { |
| | | clearInterval(this.getInterval); |
| | | this.getInterval = null; |
| | | }, |
| | | }; |
| | | </script> |
| | | |