| | |
| | | :loading-text="$t('hj430')" |
| | | @load="onLoad" |
| | | > |
| | | <div v-if="actives === 0" |
| | | <div |
| | | v-if="actives === 0" |
| | | class="sport-content-li" |
| | | :style="actives === 1 ? 'height:5.52rem' : 'height:7.52rem'" |
| | | v-for="(item, index) in dataList" |
| | | :key="index" |
| | | @click="$router.push(`/Stockdetail?codes=${item.positionSn}`)" > |
| | | @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 |
| | | class="span" |
| | | :style="item.isListed == false ? 'color:red;' : ''" |
| | | > |
| | | {{ item.stockName }} |
| | | </div> |
| | | <div |
| | | class="states" |
| | | :class="item.orderDirection === '买跌' ? 'states-red' : ''" |
| | |
| | | <van-row> |
| | | <van-col span="8"> |
| | | <div style="text-align: left"> |
| | | <div class="sport-content-title2" > |
| | | <div class="sport-content-title2"> |
| | | {{ $t("盈虧") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2" :style="item.profitAndLoseParent.charAt(0)=='-'?'color:#cc1b1b;':'color:#3e9976;'"> |
| | | ₹{{ item.profitAndLose | _toLocaleString }} |
| | | <div |
| | | class="sport-content-text2" |
| | | :style=" |
| | | item.profitAndLoseParent.charAt(0) == '-' |
| | | ? 'color:#cc1b1b;' |
| | | : 'color:#3e9976;' |
| | | " |
| | | > |
| | | ₹{{ item.profitAndLose }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | |
| | | <div class="sport-content-title2"> |
| | | {{ $t("hj141") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2" :style="item.profitAndLoseParent.charAt(0)=='-'?'color:#cc1b1b;':'color:#3e9976;'"> |
| | | <div |
| | | class="sport-content-text2" |
| | | :style=" |
| | | item.profitAndLoseParent.charAt(0) == '-' |
| | | ? 'color:#cc1b1b;' |
| | | : 'color:#3e9976;' |
| | | " |
| | | > |
| | | {{ item.profitAndLoseParent }} |
| | | </div> |
| | | </div> |
| | |
| | | {{ $t("hj40") }}({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | ₹{{ item.now_price | _toLocaleString }} |
| | | ₹{{ item.now_price }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | |
| | | {{ $t("持倉價") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | ₹{{ item.buyOrderPrice | _toLocaleString }} |
| | | ₹{{ item.buyOrderPrice }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | |
| | | {{ $t("訂單金額") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | ₹{{ item.orderTotalPrice | _toLocaleString }} |
| | | ₹{{ item.orderTotalPrice }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | |
| | | {{ $t("hj44") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | ₹{{ item.orderFee | _toLocaleString }} |
| | | ₹{{ item.orderFee }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | |
| | | {{ $t("待补金额") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | ₹{{ item.amountToBeCovered | _toLocaleString }} |
| | | ₹{{ item.amountToBeCovered }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | | <!-- <van-col span="8"> |
| | | <!-- <van-col span="8"> |
| | | <div style="text-align: center"> |
| | | <div class="sport-content-title2"> |
| | | {{ $t("止損價") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | {{ item.stopTargetPrice | _toLocaleString }} |
| | | {{ item.stopTargetPrice }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | |
| | | {{ $t("止盈價") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | {{ item.profitTargetPrice | _toLocaleString }} |
| | | {{ item.profitTargetPrice }} |
| | | </div> |
| | | </div> |
| | | </van-col> --> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div v-if="actives === 1" |
| | | <div |
| | | v-if="actives === 1" |
| | | class="sport-content-li" |
| | | :style="actives === 1 ? 'height:5.52rem' : 'height:7.52rem'" |
| | | v-for="(item, index) in newdataList" |
| | | :key="index" |
| | | @click="$router.push(`/Stockdetail?codes=${item.positionSn}`)" > |
| | | @click="$router.push(`/Stockdetail?codes=${item.positionSn}`)" |
| | | > |
| | | <div @click.stop="pushRouter(item)"> |
| | | <div class="title-box" style="justify-content: space-between;"> |
| | | <div class="span">{{ item.stockName }}</div> |
| | |
| | | <div class="sport-content-title2"> |
| | | {{ $t("盈虧") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2" :style="item.profitAndLoseParent.charAt(0)=='-'?'color:#cc1b1b;':'color:#3e9976;'"> |
| | | ₹{{ item.profitAndLose | _toLocaleString }} |
| | | <div |
| | | class="sport-content-text2" |
| | | :style=" |
| | | item.profitAndLoseParent.charAt(0) == '-' |
| | | ? 'color:#cc1b1b;' |
| | | : 'color:#3e9976;' |
| | | " |
| | | > |
| | | ₹{{ item.profitAndLose }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | |
| | | <div class="sport-content-title2"> |
| | | {{ $t("hj141") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2" :style="item.profitAndLoseParent.charAt(0)=='-'?'color:#cc1b1b;':'color:#3e9976;'"> |
| | | <div |
| | | class="sport-content-text2" |
| | | :style=" |
| | | item.profitAndLoseParent.charAt(0) == '-' |
| | | ? 'color:#cc1b1b;' |
| | | : 'color:#3e9976;' |
| | | " |
| | | > |
| | | {{ item.profitAndLoseParent }} |
| | | </div> |
| | | </div> |
| | |
| | | {{ $t("hj40") }}({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | ₹{{ item.now_price | _toLocaleString }} |
| | | ₹{{ item.now_price }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | |
| | | {{ $t("持倉價") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | ₹{{ item.buyOrderPrice | _toLocaleString }} |
| | | ₹{{ item.buyOrderPrice }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | |
| | | {{ $t("訂單金額") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | ₹{{ item.orderTotalPrice | _toLocaleString }} |
| | | ₹{{ item.orderTotalPrice }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | |
| | | {{ $t("hj44") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | ₹{{ item.orderFee | _toLocaleString }} |
| | | ₹{{ item.orderFee }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | | <!-- <van-col span="8"> |
| | | <!-- <van-col span="8"> |
| | | <div style="text-align: center"> |
| | | <div class="sport-content-title2"> |
| | | {{ $t("止損價") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | {{ item.stopTargetPrice | _toLocaleString }} |
| | | {{ item.stopTargetPrice }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | |
| | | {{ $t("止盈價") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | {{ item.profitTargetPrice | _toLocaleString }} |
| | | {{ item.profitTargetPrice }} |
| | | </div> |
| | | </div> |
| | | </van-col> --> |
| | |
| | | <!-- <div class="right" style="color: rgb(3, 173, 143)"> |
| | | {{ closeSell.orderNum }} |
| | | </div> --> |
| | | <input class="input_box" type="number" :max="closeSell.orderNum" :placeholder="$t('hj262')" v-model="ordernum" /> |
| | | <input |
| | | class="input_box" |
| | | type="number" |
| | | :max="closeSell.orderNum" |
| | | :placeholder="$t('hj262')" |
| | | v-model="ordernum" |
| | | /> |
| | | </div> |
| | | <div class="hang"> |
| | | <div class="left">{{ $t("類型") }}</div> |
| | |
| | | props: { |
| | | activeObj: { |
| | | type: Object, |
| | | default: {}, |
| | | }, |
| | | default: {} |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getList(); |
| | |
| | | closeSell: {}, |
| | | show: false, |
| | | actives: 0, |
| | | ordernum:'', |
| | | ordernum: "", |
| | | dataList: [], |
| | | newdataList:[], |
| | | newdataList: [], |
| | | timer: null, |
| | | tabsList: [ |
| | | { |
| | | title: this.$t("持倉"), |
| | | key: 0, |
| | | key: 0 |
| | | }, |
| | | |
| | | { |
| | | title: this.$t("平倉"), |
| | | key: 1, |
| | | }, |
| | | ], |
| | | key: 1 |
| | | } |
| | | ] |
| | | }; |
| | | }, |
| | | created(){ |
| | | this.dsq() |
| | | created() { |
| | | this.dsq(); |
| | | }, |
| | | beforeDestroy() { |
| | | clearInterval(this.timer); // 在组件销毁前清除定时器 |
| | | }, |
| | | methods: { |
| | | dsq(){ |
| | | dsq() { |
| | | // this.dataList = []; |
| | | this.timer = setInterval(() => { |
| | | this.getList(); |
| | |
| | | pushRouter(item) { |
| | | const obj = { |
| | | pid: item.stockCode || "", |
| | | type: item.stockGid || "", |
| | | type: item.stockGid || "" |
| | | }; |
| | | window.localStorage.setItem("kLine", JSON.stringify(obj)); |
| | | // return; |
| | |
| | | if_us: "", |
| | | if_zhishu: 0, |
| | | sok: "", |
| | | type: item.stockGid, |
| | | }, |
| | | type: item.stockGid |
| | | } |
| | | }); |
| | | }, |
| | | onLoad() { |
| | |
| | | this.$refs.closeDialog.show = false; |
| | | const res = await sell({ |
| | | positionSn: this.closeSell.positionSn, |
| | | number:this.ordernum |
| | | number: this.ordernum |
| | | }); |
| | | if (res.status === 0) { |
| | | this.dataList = []; |
| | |
| | | this.pageNum = 1; |
| | | this.finished = false; |
| | | } |
| | | const res = await getchicang({ |
| | | const _laber = laber || this.activeObj.laber; |
| | | let opt = { |
| | | state: this.actives, |
| | | stockType: laber || this.activeObj.laber, |
| | | stockType: _laber, |
| | | pageNum: 1, |
| | | pageSize: 30, |
| | | }); |
| | | pageSize: 30 |
| | | }; |
| | | if (_laber === "USDT") { |
| | | opt.stockCode = "HJYY"; |
| | | } |
| | | |
| | | const res = await getchicang(opt); |
| | | |
| | | this.loading = false; |
| | | if (res.status === 0) { |
| | |
| | | this.pageNum = 1; |
| | | this.finished = false; |
| | | } |
| | | const res = await getchicang({ |
| | | const _laber = laber || this.activeObj.laber; |
| | | let opt = { |
| | | state: this.actives, |
| | | stockType: laber || this.activeObj.laber, |
| | | stockType: _laber, |
| | | pageNum: 1, |
| | | pageSize: 30, |
| | | }); |
| | | pageSize: 30 |
| | | }; |
| | | if (_laber === "USDT") { |
| | | opt.stockCode = "HJYY"; |
| | | } |
| | | const res = await getchicang(opt); |
| | | |
| | | this.loading = false; |
| | | if (res.status === 0) { |
| | | this.dataList = [] |
| | | this.dataList = []; |
| | | this.dataList = res.data.list; |
| | | this.finished = true; |
| | | } else { |
| | |
| | | close(item) { |
| | | this.closeSell = item; |
| | | this.$refs.closeDialog.show = true; |
| | | this.ordernum = '' |
| | | this.ordernum = ""; |
| | | }, |
| | | |
| | | clickTabs(e) { |
| | | this.pageNum = 1; |
| | | this.finished = false; |
| | | this.actives = e.key; |
| | | this.newdataList = [] |
| | | this.dataList = [] |
| | | this.newdataList = []; |
| | | this.dataList = []; |
| | | |
| | | if(e.key==1){ |
| | | if (e.key == 1) { |
| | | clearInterval(this.timer); // 在组件销毁前清除定时器 |
| | | // clearTimeout(this.timer); |
| | | // setTimeout(()=>{ |
| | | // clearInterval(this.timer); // 在组件销毁前清除定时器 |
| | | // },3000) |
| | | this.getLists() |
| | | this.getLists(); |
| | | // this.startPolling(); |
| | | // this.dsq() |
| | | }else{ |
| | | } else { |
| | | clearInterval(this.timer); // 在组件销毁前清除定时器 |
| | | this.dsq() |
| | | this.dsq(); |
| | | } |
| | | this.$forceUpdate(); // 强制Vue重新渲染 |
| | | |
| | | // this.getList() |
| | | // if(e.key !=this.actives){ |
| | | |
| | | |
| | | // }else{ |
| | | // this.actives = e.key; |
| | | // this.dsq() |
| | | // } |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | .input_box{ |
| | | text-align: right; |
| | | font-size: 16px; |
| | | .input_box { |
| | | text-align: right; |
| | | font-size: 16px; |
| | | |
| | | padding: 0 4px; |
| | | } |
| | | padding: 0 4px; |
| | | } |
| | | .sport-tabs { |
| | | // font-family: PingFang SC; |
| | | font-family: "DINPro"; |