From 1cc4eb09ce38f1f0db114b7d3570f92ceaf1d470 Mon Sep 17 00:00:00 2001 From: lyfO_o <764716047@qq.com> Date: 星期三, 06 四月 2022 08:51:11 +0800 Subject: [PATCH] Merge remote-tracking branch 'remotes/origin/shf' into master --- src/views/safetyproduction/gojudging.vue | 33 +++++++++++++++++++++++++++------ 1 files changed, 27 insertions(+), 6 deletions(-) diff --git a/src/views/safetyproduction/gojudging.vue b/src/views/safetyproduction/gojudging.vue index 1f376a2..e62b544 100644 --- a/src/views/safetyproduction/gojudging.vue +++ b/src/views/safetyproduction/gojudging.vue @@ -11,12 +11,14 @@ ><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"> - <el-table border :data="item.child"> + <el-table border :data="item.child" :header-cell-style="{background:'#eef1f6',color:'#606266'}" :cell-style="{background:'#fff',color:'#606266'}"> <el-table-column prop="standardizationRequirements" align="center" @@ -41,10 +43,10 @@ <el-table-column align="center" label="评审结果"> <template slot-scope="scope"> <span v-if="(scope.row.safetyInspectionItemResult== 0)" - >是</span + >否决</span > <span v-if="(scope.row.safetyInspectionItemResult == 1)" - >否</span + >扣分</span > </template> </el-table-column> @@ -72,7 +74,7 @@ </template> </el-table-column> <el-table-column - prop="" + prop="remark" align="center" label="备注" ></el-table-column> @@ -130,6 +132,7 @@ arr[i].child = this.checkSameData(arr[i].child); } this.lists = arr; + // console.log('tag', arr) }); }, checkSameDataA(resData) { @@ -154,12 +157,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) { @@ -195,4 +216,4 @@ .titles { font-size: 14px; } -</style> \ No newline at end of file +</style> -- Gitblit v1.9.2