| | |
| | | v-model="loading" |
| | | :finished="finished" |
| | | :finished-text="$t('hj43')" |
| | | :loading-text="$t('hj430')" |
| | | @load="onLoad" |
| | | > |
| | | <div |
| | |
| | | :style="actives === 1 ? 'height:5.52rem' : 'height:7.52rem'" |
| | | v-for="(item, index) in dataList" |
| | | :key="index" |
| | | @click="$router.push(`/Stockdetail?codes=${item.positionSn}`)" |
| | | > |
| | | <div class="title-box"> |
| | | <div class="span">{{ item.stockName }}</div> |
| | | <div |
| | | class="states" |
| | | :class="item.orderDirection === '买跌' ? 'states-red' : ''" |
| | | > |
| | | {{ $t(item.orderDirection) }} |
| | | <div @click.stop="pushRouter(item)"> |
| | | <div class="title-box"> |
| | | <div class="span">{{ item.stockName }}</div> |
| | | <div |
| | | class="states" |
| | | :class="item.orderDirection === '买跌' ? 'states-red' : ''" |
| | | > |
| | | {{ $t(item.orderDirection) }} |
| | | </div> |
| | | </div> |
| | | {{ item.stockSpell }} |
| | | </div> |
| | | <!-- <div @click="$router.push('/Stockdetail')"></div> --> |
| | | <van-row> |
| | | <van-col span="8"> |
| | | <div style="text-align: left"> |
| | | <div class="sport-content-title2">{{ $t("盈虧") }} (USD)</div> |
| | | <div class="sport-content-title2"> |
| | | {{ $t("盈虧") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text" style="color: #d04b64"> |
| | | {{ item.profitAndLose }} |
| | | {{ item.profitAndLose | _toLocaleString }} |
| | | </div> |
| | | </div> |
| | | </van-col |
| | | > |
| | | </van-col> |
| | | <van-col span="8"> |
| | | <div style="text-align: center"> |
| | | <div class="sport-content-title2">{{ $t("hj141") }} (USD)</div> |
| | | <div class="sport-content-text2">{{ item.profitAndLoseParent }}</div> |
| | | <div class="sport-content-title2"> |
| | | {{ $t("hj141") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | {{ item.profitAndLoseParent }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | | <van-col span="8"> |
| | |
| | | <van-row> |
| | | <van-col span="8"> |
| | | <div style="text-align: left"> |
| | | <div class="sport-content-title2">{{ $t("hj40") }}(USD)</div> |
| | | <div class="sport-content-text2">{{ item.now_price }}</div> |
| | | <div class="sport-content-title2"> |
| | | {{ $t("hj40") }}({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | {{ item.now_price | _toLocaleString }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | | <van-col span="8"> |
| | | <div style="text-align: center"> |
| | | <div class="sport-content-title2">{{ $t("持倉價") }} (USD)</div> |
| | | <div class="sport-content-text2">{{ item.buyOrderPrice }}</div> |
| | | <div class="sport-content-title2"> |
| | | {{ $t("持倉價") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | {{ item.buyOrderPrice | _toLocaleString }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | | <van-col span="8"> |
| | | <div style="text-align: right"> |
| | | <div class="sport-content-title2">{{ $t("訂單金額") }} (USD)</div> |
| | | <div class="sport-content-text2">{{ item.orderTotalPrice }}</div> |
| | | <div class="sport-content-title2"> |
| | | {{ $t("訂單金額") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | {{ item.orderTotalPrice | _toLocaleString }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | | </van-row> |
| | |
| | | <van-col span="8"> |
| | | <div style="text-align: left"> |
| | | <div class="sport-content-title2"> |
| | | {{ $t("開倉手續費") }} (USD) |
| | | {{ $t("hj44") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2">{{ item.orderFee }}</div> |
| | | <div class="sport-content-text2"> |
| | | {{ item.orderFee | _toLocaleString }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | | <van-col span="8"> |
| | | <div style="text-align: center"> |
| | | <div class="sport-content-title2">{{ $t("止損價") }} (USD)</div> |
| | | <div class="sport-content-title2"> |
| | | {{ $t("止損價") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | -{{ item.profitTargetPrice || "--" }} |
| | | {{ item.profitTargetPrice | _toLocaleString }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | | <van-col span="8"> |
| | | <div style="text-align: right"> |
| | | <div class="sport-content-title2">{{ $t("止盈價") }} (USD)</div> |
| | | <div class="sport-content-title2"> |
| | | {{ $t("止盈價") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | -{{ item.stopTargetPrice || "--" }} |
| | | {{ item.stopTargetPrice | _toLocaleString }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | |
| | | <div style="text-align: left"> |
| | | <div class="sport-content-title2">{{ $t("持倉時間") }}</div> |
| | | <div class="sport-content-text2"> |
| | | {{ $moment(item.buyOrderTime).format("YYYY-MM-DD HH:mm:ss") }} |
| | | {{ $moment(item.buyOrderTime).format("DD-MM-YYYY hh:mm:ss A") }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | | <van-col span="12"> |
| | | <div style="text-align: right"> |
| | | <div class="sport-content-title2">{{ $t("訂單編號") }}</div> |
| | | <div class="sport-content-text2">-{{ item.buyOrderId }}</div> |
| | | <div class="sport-content-text2">{{ item.buyOrderId }}</div> |
| | | </div> |
| | | </van-col> |
| | | </van-row> |
| | | |
| | | <div class="but-box" v-if="actives === 0"> |
| | | <div class="but" @click="close(item)">{{ $t("平仓") }}</div> |
| | | <div class="but-box" v-if="actives === 0" @click.stop="close(item)"> |
| | | <div class="but">{{ $t("平仓") }}</div> |
| | | <!-- <div class="but buts">止盈止损</div> --> |
| | | </div> |
| | | </div> |
| | |
| | | default: {}, |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.getList(); |
| | | }, |
| | | data() { |
| | | return { |
| | | pageNum: 1, |
| | | pageSize: 15, |
| | | pageSize: 150, |
| | | loading: true, |
| | | finished: false, |
| | | closeSell: {}, |
| | |
| | | ], |
| | | }; |
| | | }, |
| | | |
| | | methods: { |
| | | pushRouter(item) { |
| | | const obj = { |
| | | pid: item.stockCode || "", |
| | | type: item.stockGid || "", |
| | | }; |
| | | window.localStorage.setItem("kLine", JSON.stringify(obj)); |
| | | // return; |
| | | var codes = item.stockCode; |
| | | var names = item.stockName; |
| | | |
| | | this.$router.push({ |
| | | path: "/kline", |
| | | query: { |
| | | name: names, |
| | | code: codes, |
| | | if_us: "", |
| | | if_zhishu: 0, |
| | | sok: "", |
| | | type: item.stockGid, |
| | | }, |
| | | }); |
| | | }, |
| | | onLoad() { |
| | | this.pageNum++; |
| | | this.loading = true; |
| | | this.getList(); |
| | | }, |
| | | async confirm() { |
| | | const res = await sell({ |
| | |
| | | this.pageNum = 1; |
| | | this.finished = false; |
| | | this.getList(); |
| | | this.$emit("closingPosition"); |
| | | } else { |
| | | Notify({ type: "danger", message: res.msg }); |
| | | } |
| | | }, |
| | | // 获取仓位列表 |
| | | async getList(laber) { |
| | | console.log(laber); |
| | | if (laber) { |
| | | this.dataList = []; |
| | | this.pageNum = 1; |
| | |
| | | pageNum: this.pageNum, |
| | | pageSize: this.pageSize, |
| | | }); |
| | | if (res.data.total <= this.dataList.length) { |
| | | this.finished = true; |
| | | } |
| | | |
| | | this.loading = false; |
| | | if (res.status === 0) { |
| | | if (this.pageNum !== 1) { |
| | | this.dataList = [...this.dataList, ...res.data.list]; |
| | | } else { |
| | | this.dataList = res.data.list; |
| | | } |
| | | this.dataList = res.data.list; |
| | | // if (res.data.total <= this.dataList.length) { |
| | | this.finished = true; |
| | | // } |
| | | } else { |
| | | this.loading = false; |
| | | this.finished = true; |