From a69acc4bf4b3d75fb526c8ee6b4a2da0b9a321fa Mon Sep 17 00:00:00 2001
From: jhzh <1628036192@qq.com>
Date: Wed, 13 Aug 2025 13:51:28 +0800
Subject: [PATCH] 111
---
src/page/user/Warehouse/data.list.vue | 61 ++++++++++++++++++------------
1 files changed, 36 insertions(+), 25 deletions(-)
diff --git a/src/page/user/Warehouse/data.list.vue b/src/page/user/Warehouse/data.list.vue
index b676e42..03e2e22 100644
--- a/src/page/user/Warehouse/data.list.vue
+++ b/src/page/user/Warehouse/data.list.vue
@@ -24,6 +24,7 @@
: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
@@ -41,7 +42,7 @@
<div class="sport-content-title2" >
{{ $t("盈虧") }} ({{ activeObj.symbolCode }})
</div>
- <div class="sport-content-text" style="color:#3e9976;">
+ <div class="sport-content-text2" :style="item.profitAndLoseParent.charAt(0)=='-'?'color:#cc1b1b;':'color:#3e9976;'">
₹{{ item.profitAndLose | _toLocaleString }}
</div>
</div>
@@ -51,7 +52,7 @@
<div class="sport-content-title2">
{{ $t("hj141") }} ({{ activeObj.symbolCode }})
</div>
- <div class="sport-content-text2" style="color:#3e9976;">
+ <div class="sport-content-text2" :style="item.profitAndLoseParent.charAt(0)=='-'?'color:#cc1b1b;':'color:#3e9976;'">
{{ item.profitAndLoseParent }}
</div>
</div>
@@ -59,7 +60,7 @@
<van-col span="8">
<div style="text-align: right">
<div class="sport-content-title2">{{ $t("倉位(股)") }}</div>
- <div class="sport-content-text">{{ item.orderNum }}</div>
+ <div class="sport-content-text2">{{ item.orderNum }}</div>
</div></van-col
>
</van-row>
@@ -185,7 +186,7 @@
<div class="sport-content-title2">
{{ $t("盈虧") }} ({{ activeObj.symbolCode }})
</div>
- <div class="sport-content-text" style="color:#3e9976;">
+ <div class="sport-content-text2" :style="item.profitAndLoseParent.charAt(0)=='-'?'color:#cc1b1b;':'color:#3e9976;'">
₹{{ item.profitAndLose | _toLocaleString }}
</div>
</div>
@@ -195,7 +196,7 @@
<div class="sport-content-title2">
{{ $t("hj141") }} ({{ activeObj.symbolCode }})
</div>
- <div class="sport-content-text2" style="color:#3e9976;">
+ <div class="sport-content-text2" :style="item.profitAndLoseParent.charAt(0)=='-'?'color:#cc1b1b;':'color:#3e9976;'">
{{ item.profitAndLoseParent }}
</div>
</div>
@@ -203,7 +204,7 @@
<van-col span="8">
<div style="text-align: right">
<div class="sport-content-title2">{{ $t("倉位(股)") }}</div>
- <div class="sport-content-text">{{ item.orderNum }}</div>
+ <div class="sport-content-text2">{{ item.orderNum }}</div>
</div></van-col
>
</van-row>
@@ -367,7 +368,7 @@
};
},
created(){
- // this.dsq()
+ this.dsq()
},
beforeDestroy() {
clearInterval(this.timer); // 在组件销毁前清除定时器
@@ -423,6 +424,29 @@
}
},
// 获取仓位列表
+ 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 = [];
@@ -439,20 +463,8 @@
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;
@@ -465,12 +477,11 @@
},
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); // 在组件销毁前清除定时器
@@ -478,12 +489,12 @@
// setTimeout(()=>{
// clearInterval(this.timer); // 在组件销毁前清除定时器
// },3000)
- this.dsq()
+ this.getLists()
// this.startPolling();
// this.dsq()
}else{
clearInterval(this.timer); // 在组件销毁前清除定时器
- this.getList()
+ this.dsq()
}
this.$forceUpdate(); // 强制Vue重新渲染
--
Gitblit v1.9.3