|
|
@@ -405,7 +405,7 @@
|
|
|
<el-option
|
|
|
v-for="item in inspectionTypeOptions"
|
|
|
:key="item.inspectionTypeId"
|
|
|
- :label="getDictLabel(gxt_inspection_type, item.inspectionTypeId)"
|
|
|
+ :label="item.score && item.score !== 0 ? getDictLabel(gxt_inspection_type, item.inspectionTypeId) + ' (' + item.score + '分)' : getDictLabel(gxt_inspection_type, item.inspectionTypeId)"
|
|
|
:value="item.inspectionTypeId.toString()">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
@@ -449,7 +449,7 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <el-form-item label="得分明细">
|
|
|
+ <el-form-item :label="'得分明细 (可自评总分: ' + (getSelfEvaluationTotalScore() === 0 ? '未规定' : getSelfEvaluationTotalScore().toFixed(2) + '分') + ', 已自评总分: ' + getSelfEvaluatedTotalScore().toFixed(2) + '分)'">
|
|
|
<el-table :data="selfEvaluationForm.scorePersonList" border style="width: 100%;">
|
|
|
<el-table-column label="检修员" align="center" prop="nickName" style="width: 33%;">
|
|
|
<template #default="scope">
|
|
|
@@ -607,7 +607,7 @@
|
|
|
<el-option
|
|
|
v-for="item in inspectionTypeOptions"
|
|
|
:key="item.inspectionTypeId"
|
|
|
- :label="getDictLabel(gxt_inspection_type, item.inspectionTypeId)"
|
|
|
+ :label="item.score && item.score !== 0 ? getDictLabel(gxt_inspection_type, item.inspectionTypeId) + ' (' + item.score + '分)' : getDictLabel(gxt_inspection_type, item.inspectionTypeId)"
|
|
|
:value="item.inspectionTypeId.toString()">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
@@ -836,7 +836,7 @@
|
|
|
<el-option
|
|
|
v-for="item in inspectionTypeOptions"
|
|
|
:key="item.inspectionTypeId"
|
|
|
- :label="getDictLabel(gxt_inspection_type, item.inspectionTypeId)"
|
|
|
+ :label="item.score && item.score !== 0 ? getDictLabel(gxt_inspection_type, item.inspectionTypeId) + ' (' + item.score + '分)' : getDictLabel(gxt_inspection_type, item.inspectionTypeId)"
|
|
|
:value="item.inspectionTypeId.toString()">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
@@ -1028,7 +1028,7 @@
|
|
|
<el-option
|
|
|
v-for="item in inspectionTypeOptions"
|
|
|
:key="item.inspectionTypeId"
|
|
|
- :label="getDictLabel(gxt_inspection_type, item.inspectionTypeId)"
|
|
|
+ :label="item.score && item.score !== 0 ? getDictLabel(gxt_inspection_type, item.inspectionTypeId) + ' (' + item.score + '分)' : getDictLabel(gxt_inspection_type, item.inspectionTypeId)"
|
|
|
:value="item.inspectionTypeId.toString()">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
@@ -2678,6 +2678,41 @@ function validateScoringRules() {
|
|
|
return { valid: true, message: '' };
|
|
|
}
|
|
|
|
|
|
+/** 获取可自评总分 */
|
|
|
+function getSelfEvaluationTotalScore() {
|
|
|
+ // 获取工单总分
|
|
|
+ const totalScore = getTotalScore();
|
|
|
+
|
|
|
+ // 如果总分为0,返回0
|
|
|
+ if (totalScore === 0) {
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 返回总分+0.5(工作负责人额外加0.5分)
|
|
|
+ return totalScore + 0.5;
|
|
|
+}
|
|
|
+
|
|
|
+/** 获取已自评总分 */
|
|
|
+function getSelfEvaluatedTotalScore() {
|
|
|
+ const scorePersonList = selfEvaluationForm.value.scorePersonList;
|
|
|
+ if (!scorePersonList || scorePersonList.length === 0) {
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ let totalSelfScore = 0;
|
|
|
+
|
|
|
+ for (const person of scorePersonList) {
|
|
|
+ if (person.selfScore !== null && person.selfScore !== undefined && person.selfScore !== '') {
|
|
|
+ const score = parseFloat(person.selfScore);
|
|
|
+ if (!isNaN(score)) {
|
|
|
+ totalSelfScore += score;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return totalSelfScore;
|
|
|
+}
|
|
|
+
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
/* 表单字段间距调整 */
|