From e20c00b978046bb77fc302aa0a49cda49f4f1345 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期三, 26 六月 2024 18:03:54 +0800
Subject: [PATCH] 完善计算

---
 src/components/tool/value-table.vue |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/components/tool/value-table.vue b/src/components/tool/value-table.vue
index 57471ca..915b452 100644
--- a/src/components/tool/value-table.vue
+++ b/src/components/tool/value-table.vue
@@ -49,6 +49,9 @@
   .handleBtn.is-disabled {
     color: #C0C4CC;
   }
+  .red{
+    color: red !important;
+  }
 </style>
 <style>
   /* .value-table .highlight-warning-row-border td {
@@ -117,7 +120,7 @@
         <el-table-column type="index" align="center" label="搴忓彿" width="65" v-if="data.isIndex" :key="Math.random()">
         </el-table-column>
         <el-table-column :prop="a.label" :label="a.value" :sortable="data.sort==false?false:'custom'"
-          v-for="(a, ai) in tableHead" :key="ai" show-overflow-tooltip min-width="155">
+          v-for="(a, ai) in tableHead" :key="ai" show-overflow-tooltip min-width="155" v-if="!data.headNoShow||(data.headNoShow&&data.headNoShow.length==0)||(data.headNoShow&&data.headNoShow.length>0&&!data.headNoShow.find(d=>d==a.label))">
           <template slot-scope="scope">
             <div v-if="showType(a.label, data.tagField) != null">
               <template v-if="typeof(scope.row[a.label]) == 'object'">
@@ -136,7 +139,7 @@
               @click="handleLinkEvent(scope.row,data.linkEvent[a.label])">{{scope.row[a.label]}}</span>
             <img style="width: 40px;height: 40px;margin-top: 10px;" :src="javaApi+'/img/'+scope.row[a.label]"
               v-else-if="showUpload(a.label)&&scope.row[a.label]" alt="">
-            <span v-else>{{scope.row[a.label]}}</span>
+            <span v-else :class="{red:getRedColor(a.label,scope.row)}" >{{scope.row[a.label]}}</span>
           </template>
         </el-table-column>
         <el-table-column fixed="right" align="center" label="鎿嶄綔" :width="getWidth()" v-if="data.do.length > 0">
@@ -764,6 +767,7 @@
                 }
                 this.$message.success('鍒犻櫎鎴愬姛')
                 this.selectList()
+                this.$emit('delete')
               }).catch(e => {
                 this.$message.error('鍒犻櫎澶辫触')
               })
@@ -1093,6 +1097,13 @@
           this.$message.error('璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁')
         }
       },
+      getRedColor(label,row){
+        if(this.data.cellSpecialStyle&&this.data.cellSpecialStyle.redColorByKey&&label.includes(this.data.cellSpecialStyle.redColorByKey)&&row[(label.replace(this.data.cellSpecialStyle.redColorByKey, ""))]){
+          return true
+        }else{
+          return false
+        }
+      }
     }
   }
 </script>

--
Gitblit v1.9.3