Pārlūkot izejas kodu

单元格合并优化

zhangliang2 2 gadi atpakaļ
vecāks
revīzija
82ffea4f4a
1 mainītis faili ar 23 papildinājumiem un 12 dzēšanām
  1. 23 12
      src/views/workManagement/evaluationReport.vue

+ 23 - 12
src/views/workManagement/evaluationReport.vue

@@ -155,19 +155,19 @@ export default {
                     prop: "name",
                 },
                 {
-                    label: "90<总分<100",
+                    label: "90<总分100",
                     prop: "levelA",
                 },
                 {
-                    label: "80<总分<90",
+                    label: "80<总分90",
                     prop: "levelB",
                 },
                 {
-                    label: "70<总分<80",
+                    label: "70<总分80",
                     prop: "levelC",
                 },
                 {
-                    label: "0<总分<70",
+                    label: "0<总分70",
                     prop: "levelD",
                 },
             ],
@@ -364,7 +364,7 @@ export default {
                     }
                 }
             } else if (columnIndex === 5) {
-                // 说明只有一级指标
+                // 如果只有一级指标
                 if (columnIndex === this.info.length - 1) {
                     if (this.subIndexArrA[0].includes(rowIndex)) {
                         return [
@@ -393,8 +393,19 @@ export default {
                     }
                 }
             } else if (columnIndex === this.columnsC.length - 1) {
-                // 说明至少有二级指标
-                if (this.info.maxIndex === 2) {
+                if (row.eachMaxIndex === "1") {
+                    // 只到一级
+                    if (this.subIndexArrA[0].includes(rowIndex)) {
+                        return [
+                            this.sublistNameObjA[0][
+                                row.sublistName1 + rowIndex
+                            ],
+                            1,
+                        ];
+                    } else {
+                        return [0, 0];
+                    }
+                } else if (row.eachMaxIndex === "2") {
                     // 只到二级
                     if (this.subIndexArrA[1].includes(rowIndex)) {
                         return [
@@ -410,7 +421,7 @@ export default {
                             return [1, 1];
                         }
                     }
-                } else if (this.info.maxIndex === 3) {
+                } else if (row.eachMaxIndex === "3") {
                     // 只到三级
                     if (this.subIndexArrA[2].includes(rowIndex)) {
                         return [
@@ -426,7 +437,7 @@ export default {
                             return [1, 1];
                         }
                     }
-                } else if (this.info.maxIndex === 4) {
+                } else if (row.eachMaxIndex === "4") {
                     // 只到四级
                     if (this.subIndexArrA[3].includes(rowIndex)) {
                         return [
@@ -442,7 +453,7 @@ export default {
                             return [1, 1];
                         }
                     }
-                } else if (this.info.maxIndex === 5) {
+                } else if (row.eachMaxIndex === "5") {
                     // 只到五级
                     if (this.subIndexArrA[4].includes(rowIndex)) {
                         return [
@@ -458,7 +469,7 @@ export default {
                             return [1, 1];
                         }
                     }
-                } else if (this.info.maxIndex === 6) {
+                } else if (row.eachMaxIndex === "6") {
                     // 到六级
                     if (this.subIndexArrA[5].includes(rowIndex)) {
                         return [
@@ -670,7 +681,7 @@ export default {
                         this.columnsC = res.info.sceneScoreLiTitle;
                         this.dataHandle(res.info.sceneScoreLi, 2);
                         this.getDataWayC.data = res.info.sceneScoreLi;
-                        console.log(this.getDataWayC.data);
+                        // console.log(this.getDataWayC.data);
                     } else {
                         this.$message.error(res.message || "获取信息失败");
                     }