From 9441a51a13a5df50c30f021e5314b412d7890a95 Mon Sep 17 00:00:00 2001
From: shj <1790240199@qq.com>
Date: 星期四, 07 四月 2022 16:06:05 +0800
Subject: [PATCH] 自查清单

---
 src/views/safetyproduction/gojudging.vue |   30 +++++++++++++++++++++++++++++-
 1 files changed, 29 insertions(+), 1 deletions(-)

diff --git a/src/views/safetyproduction/gojudging.vue b/src/views/safetyproduction/gojudging.vue
index 30a46e0..230f406 100644
--- a/src/views/safetyproduction/gojudging.vue
+++ b/src/views/safetyproduction/gojudging.vue
@@ -11,8 +11,10 @@
               ><p><span>B级要素:</span>{{ item.elementBName }}</p></el-col
             >
             <el-col :span="6"
-              ><p><span>得分:</span>50</p></el-col
+              ><p><span>总分:</span>50</p></el-col
             >
+               <el-col :span="6"
+              ><p><span>得分:</span>{{item.point}}</p></el-col>
           </el-row>
           <el-row>
             <el-col :span="24">
@@ -57,6 +59,8 @@
                 <template slot-scope="scope">
                   <el-table
                     :data="scope.row.selfDeductionList"
+                    border
+                    :header-cell-style="{background:'#eef1f6',color:'#606266'}" :cell-style="{background:'#fff',color:'#606266'}"
                   >
                     <el-table-column prop="name" align="center" label="扣分项">
                     </el-table-column>
@@ -130,6 +134,7 @@
           arr[i].child = this.checkSameData(arr[i].child);
         }
         this.lists = arr;
+        // console.log('tag', arr)
       });
     },
     checkSameDataA(resData) {
@@ -154,12 +159,30 @@
         if (!dataInfo[elementBName]) {
           dataInfo[elementBName] = {
             elementBName,
+            point:"",
             child: [],
           };
         }
         dataInfo[elementBName].child.push(item);
       });
       let list = Object.values(dataInfo); // list 转换成功的数据
+      console.log(list)
+        for(var i=0;i<list.length;i++){
+          var pot=50
+         for(var j=0;j<list[i].child.length;j++){
+           if(list[i].child[j].safetyInspectionItemResult!=0){
+           pot=pot-list[i].child[j].selfDeductionList[0].point
+           }else{
+             var cont=0
+             pot=0
+           }
+         }
+         if(pot>0){
+         list[i].point=pot
+         }else{
+            list[i].point=0
+         }
+        }
       return list;
     },
     handleClick(data) {
@@ -186,6 +209,8 @@
   background-color: white;
   border-radius: 5px;
   padding: 20px;
+  height: 850px;
+  overflow-y:overlay;
 }
 .title {
   font-size: 16px;
@@ -195,4 +220,7 @@
 .titles {
   font-size: 14px;
 }
+.box-right /deep/ .el-table__expanded-cell{
+  background-color: #fff !important;
+}
 </style>

--
Gitblit v1.9.2