|
@@ -43,13 +43,21 @@
|
|
|
|
|
|
<div class="tableBox tableBoxC">
|
|
|
<div class="title">算法测试评分细则</div>
|
|
|
- <tableList :columns="columnsB" :getDataWay="getDataWayB">
|
|
|
+ <tableList
|
|
|
+ :columns="columnsB"
|
|
|
+ :getDataWay="getDataWayB"
|
|
|
+ :span-method="arraySpanMethod"
|
|
|
+ >
|
|
|
</tableList>
|
|
|
</div>
|
|
|
|
|
|
<div class="tableBox tableBoxD">
|
|
|
<div class="title">详情得分情况</div>
|
|
|
- <tableList :columns="columnsC" :getDataWay="getDataWayC">
|
|
|
+ <tableList
|
|
|
+ :columns="columnsC"
|
|
|
+ :getDataWay="getDataWayC"
|
|
|
+ :row-class-name="errRow"
|
|
|
+ >
|
|
|
</tableList>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -82,7 +90,7 @@ export default {
|
|
|
prop: "score",
|
|
|
},
|
|
|
{
|
|
|
- label: "得分率",
|
|
|
+ label: "得分率%",
|
|
|
prop: "scoreRatio",
|
|
|
},
|
|
|
],
|
|
@@ -110,7 +118,6 @@ export default {
|
|
|
{
|
|
|
label: "90<总分<100",
|
|
|
prop: "levelA",
|
|
|
- // template: true,
|
|
|
},
|
|
|
{
|
|
|
label: "80<总分<90",
|
|
@@ -167,12 +174,181 @@ export default {
|
|
|
param: {},
|
|
|
},
|
|
|
info: {},
|
|
|
+ sublistNameObj1: {}, // 存储一级指标名称对应的次数
|
|
|
+ sublistNameObj2: {}, // 存储二级指标名称对应的次数
|
|
|
+ sublistNameObj3: {}, // 存储三级指标名称对应的次数
|
|
|
+ sublistNameObj4: {}, // 存储四级指标名称对应的次数
|
|
|
+ sublistNameObj5: {}, // 存储五级指标名称对应的次数
|
|
|
+ sublistNameObj6: {}, // 存储六级指标名称对应的次数
|
|
|
+ subIndexArr1: [], // 存储一级指标名称第一次出现对应的下标
|
|
|
+ subIndexArr2: [], // 存储二级指标名称第一次出现对应的下标
|
|
|
+ subIndexArr3: [], // 存储三级指标名称第一次出现对应的下标
|
|
|
+ subIndexArr4: [], // 存储四级指标名称第一次出现对应的下标
|
|
|
+ subIndexArr5: [], // 存储五级指标名称第一次出现对应的下标
|
|
|
+ subIndexArr6: [], // 存储六级指标名称第一次出现对应的下标
|
|
|
};
|
|
|
},
|
|
|
|
|
|
computed: {},
|
|
|
|
|
|
- methods: {},
|
|
|
+ methods: {
|
|
|
+ arraySpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
+ if (columnIndex === 0 || columnIndex === this.columnsB.length - 1) {
|
|
|
+ if (this.subIndexArr1.includes(rowIndex)) {
|
|
|
+ return [this.sublistNameObj1[row.sublistName1], 1];
|
|
|
+ } else {
|
|
|
+ return [0, 0];
|
|
|
+ }
|
|
|
+ } else if (columnIndex === 1) {
|
|
|
+ if (this.subIndexArr2.includes(rowIndex)) {
|
|
|
+ return [this.sublistNameObj2[row.sublistName2], 1];
|
|
|
+ } else {
|
|
|
+ if (row.sublistName2) {
|
|
|
+ return [0, 0];
|
|
|
+ } else {
|
|
|
+ return [1, 1];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (columnIndex === 2) {
|
|
|
+ if (this.subIndexArr3.includes(rowIndex)) {
|
|
|
+ return [this.sublistNameObj3[row.sublistName3], 1];
|
|
|
+ } else {
|
|
|
+ if (row.sublistName3) {
|
|
|
+ return [0, 0];
|
|
|
+ } else {
|
|
|
+ return [1, 1];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (columnIndex === 3) {
|
|
|
+ if (this.subIndexArr4.includes(rowIndex)) {
|
|
|
+ return [this.sublistNameObj4[row.sublistName4], 1];
|
|
|
+ } else {
|
|
|
+ if (row.sublistName4) {
|
|
|
+ return [0, 0];
|
|
|
+ } else {
|
|
|
+ return [1, 1];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (columnIndex === 4) {
|
|
|
+ if (this.subIndexArr5.includes(rowIndex)) {
|
|
|
+ return [this.sublistNameObj5[row.sublistName5], 1];
|
|
|
+ } else {
|
|
|
+ if (row.sublistName5) {
|
|
|
+ return [0, 0];
|
|
|
+ } else {
|
|
|
+ return [1, 1];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (columnIndex === 5) {
|
|
|
+ if (this.subIndexArr6.includes(rowIndex)) {
|
|
|
+ return [this.sublistNameObj6[row.sublistName6], 1];
|
|
|
+ } else {
|
|
|
+ if (row.sublistName6) {
|
|
|
+ return [0, 0];
|
|
|
+ } else {
|
|
|
+ return [1, 1];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ errRow({ row, rowIndex }) {
|
|
|
+ if (row.runState === "Failed") {
|
|
|
+ return "errColor";
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 处理数据,通关于配合表格进行合并单元行
|
|
|
+ dataHandle(data) {
|
|
|
+ let arr = data;
|
|
|
+
|
|
|
+ let lastRowSublistName1 = "";
|
|
|
+ let lastRowSublistName2 = "";
|
|
|
+ let lastRowSublistName3 = "";
|
|
|
+ let lastRowSublistName4 = "";
|
|
|
+ let lastRowSublistName5 = "";
|
|
|
+ let lastRowSublistName6 = "";
|
|
|
+
|
|
|
+ let sublistNameObj1 = {};
|
|
|
+ let sublistNameObj2 = {};
|
|
|
+ let sublistNameObj3 = {};
|
|
|
+ let sublistNameObj4 = {};
|
|
|
+ let sublistNameObj5 = {};
|
|
|
+ let sublistNameObj6 = {};
|
|
|
+
|
|
|
+ arr.forEach((item, i) => {
|
|
|
+ let sublistName1 = item.sublistName1;
|
|
|
+ if (sublistName1 === lastRowSublistName1) {
|
|
|
+ sublistNameObj1[sublistName1]++;
|
|
|
+ } else {
|
|
|
+ lastRowSublistName1 = sublistName1;
|
|
|
+ this.subIndexArr1.push(i);
|
|
|
+ sublistNameObj1[sublistName1] = 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (item.sublistName2) {
|
|
|
+ // 一级后的指标名称可能不存在
|
|
|
+ let sublistName2 = item.sublistName2;
|
|
|
+ if (sublistName2 === lastRowSublistName2) {
|
|
|
+ sublistNameObj2[sublistName2]++;
|
|
|
+ } else {
|
|
|
+ lastRowSublistName2 = sublistName2;
|
|
|
+ this.subIndexArr2.push(i);
|
|
|
+ sublistNameObj2[sublistName2] = 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (item.sublistName3) {
|
|
|
+ let sublistName3 = item.sublistName3;
|
|
|
+ if (sublistName3 === lastRowSublistName3) {
|
|
|
+ sublistNameObj3[sublistName3]++;
|
|
|
+ } else {
|
|
|
+ lastRowSublistName3 = sublistName3;
|
|
|
+ this.subIndexArr3.push(i);
|
|
|
+ sublistNameObj3[sublistName3] = 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (item.sublistName4) {
|
|
|
+ let sublistName4 = item.sublistName4;
|
|
|
+ if (sublistName4 === lastRowSublistName4) {
|
|
|
+ sublistNameObj4[sublistName4]++;
|
|
|
+ } else {
|
|
|
+ lastRowSublistName4 = sublistName4;
|
|
|
+ this.subIndexArr4.push(i);
|
|
|
+ sublistNameObj4[sublistName4] = 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (item.sublistName5) {
|
|
|
+ let sublistName5 = item.sublistName5;
|
|
|
+ if (sublistName5 === lastRowSublistName5) {
|
|
|
+ sublistNameObj5[sublistName5]++;
|
|
|
+ } else {
|
|
|
+ lastRowSublistName5 = sublistName5;
|
|
|
+ this.subIndexArr5.push(i);
|
|
|
+ sublistNameObj5[sublistName5] = 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (item.sublistName6) {
|
|
|
+ let sublistName6 = item.sublistName6;
|
|
|
+ if (sublistName6 === lastRowSublistName6) {
|
|
|
+ sublistNameObj6[sublistName6]++;
|
|
|
+ } else {
|
|
|
+ lastRowSublistName6 = sublistName6;
|
|
|
+ this.subIndexArr6.push(i);
|
|
|
+ sublistNameObj6[sublistName6] = 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ this.sublistNameObj1 = sublistNameObj1;
|
|
|
+ this.sublistNameObj2 = sublistNameObj2;
|
|
|
+ this.sublistNameObj3 = sublistNameObj3;
|
|
|
+ this.sublistNameObj4 = sublistNameObj4;
|
|
|
+ this.sublistNameObj5 = sublistNameObj5;
|
|
|
+ this.sublistNameObj6 = sublistNameObj6;
|
|
|
+ },
|
|
|
+ },
|
|
|
|
|
|
mounted() {
|
|
|
if (this.$route.query.id) {
|
|
@@ -190,6 +366,7 @@ export default {
|
|
|
this.info = res.info;
|
|
|
this.getDataWay.data = res.info.algorithmScoreList;
|
|
|
this.columnsB = res.info.subListScoreLiTitle;
|
|
|
+ this.dataHandle(res.info.subListScoreLi);
|
|
|
this.getDataWayB.data = res.info.subListScoreLi;
|
|
|
this.columnsC = res.info.sceneScoreLiTitle;
|
|
|
this.getDataWayC.data = res.info.sceneScoreLi;
|
|
@@ -287,20 +464,26 @@ export default {
|
|
|
}
|
|
|
|
|
|
.colorfulTable {
|
|
|
- /deep/ .el-table__body .el-table__row:first-child {
|
|
|
- .el-table_2_column_7 {
|
|
|
- background-color: #c1db69;
|
|
|
- }
|
|
|
- .el-table_2_column_8 {
|
|
|
- background-color: #faf54a;
|
|
|
- }
|
|
|
- .el-table_2_column_9 {
|
|
|
- background-color: #ff9d33;
|
|
|
- }
|
|
|
- .el-table_2_column_10 {
|
|
|
- background-color: #f56c6c;
|
|
|
+ /deep/ .el-table__body {
|
|
|
+ .el-table__row:nth-child(2) {
|
|
|
+ td:nth-child(2) {
|
|
|
+ background-color: #c1db69;
|
|
|
+ }
|
|
|
+ td:nth-child(3) {
|
|
|
+ background-color: #faf54a;
|
|
|
+ }
|
|
|
+ td:nth-child(4) {
|
|
|
+ background-color: #ff9d33;
|
|
|
+ }
|
|
|
+ td:last-child {
|
|
|
+ background-color: #f56c6c;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ /deep/ .el-table .errColor td {
|
|
|
+ color: red;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|