|
@@ -28,12 +28,18 @@
|
|
|
|
|
|
<div class="tableBox tableBoxA">
|
|
|
<div class="title">测试得分表</div>
|
|
|
- <tableList :columns="columns" :getDataWay="getDataWay"> </tableList>
|
|
|
+ <tableList
|
|
|
+ :border="true"
|
|
|
+ :columns="columns"
|
|
|
+ :getDataWay="getDataWay"
|
|
|
+ >
|
|
|
+ </tableList>
|
|
|
</div>
|
|
|
|
|
|
<div class="tableBox tableBoxB">
|
|
|
<div class="title">评价等级</div>
|
|
|
<tableList
|
|
|
+ :border="true"
|
|
|
:columns="columnsA"
|
|
|
:getDataWay="getDataWayA"
|
|
|
class="colorfulTable"
|
|
@@ -44,6 +50,7 @@
|
|
|
<div class="tableBox tableBoxC">
|
|
|
<div class="title">算法测试评分细则</div>
|
|
|
<tableList
|
|
|
+ :border="true"
|
|
|
:columns="columnsB"
|
|
|
:getDataWay="getDataWayB"
|
|
|
:span-method="arraySpanMethod"
|
|
@@ -54,9 +61,11 @@
|
|
|
<div class="tableBox tableBoxD">
|
|
|
<div class="title">详情得分情况</div>
|
|
|
<tableList
|
|
|
+ :border="true"
|
|
|
:columns="columnsC"
|
|
|
:getDataWay="getDataWayC"
|
|
|
:row-class-name="errRow"
|
|
|
+ :span-method="arraySpanMethodA"
|
|
|
>
|
|
|
</tableList>
|
|
|
</div>
|
|
@@ -174,18 +183,10 @@ export default {
|
|
|
param: {},
|
|
|
},
|
|
|
info: {},
|
|
|
- sublistNameObj1: {}, // 存储一级指标名称对应的次数
|
|
|
- sublistNameObj2: {}, // 存储二级指标名称对应的次数
|
|
|
- sublistNameObj3: {}, // 存储三级指标名称对应的次数
|
|
|
- sublistNameObj4: {}, // 存储四级指标名称对应的次数
|
|
|
- sublistNameObj5: {}, // 存储五级指标名称对应的次数
|
|
|
- sublistNameObj6: {}, // 存储六级指标名称对应的次数
|
|
|
- subIndexArr1: [], // 存储一级指标名称第一次出现对应的下标
|
|
|
- subIndexArr2: [], // 存储二级指标名称第一次出现对应的下标
|
|
|
- subIndexArr3: [], // 存储三级指标名称第一次出现对应的下标
|
|
|
- subIndexArr4: [], // 存储四级指标名称第一次出现对应的下标
|
|
|
- subIndexArr5: [], // 存储五级指标名称第一次出现对应的下标
|
|
|
- subIndexArr6: [], // 存储六级指标名称第一次出现对应的下标
|
|
|
+ sublistNameObj: [], // 存储各级指标名称对应的次数,可对应相应的rowspan
|
|
|
+ sublistNameObjA: [],
|
|
|
+ subIndexArr: [], // 存储各级指标名称第一次出现对应的下标,可对应相应的rowIndex
|
|
|
+ subIndexArrA: [],
|
|
|
};
|
|
|
},
|
|
|
|
|
@@ -194,14 +195,73 @@ export default {
|
|
|
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];
|
|
|
+ if (this.subIndexArr[0].includes(rowIndex)) {
|
|
|
+ return [this.sublistNameObj[0][row.sublistName1], 1];
|
|
|
+ } else {
|
|
|
+ return [0, 0];
|
|
|
+ }
|
|
|
+ } else if (columnIndex === 1) {
|
|
|
+ if (this.subIndexArr[1].includes(rowIndex)) {
|
|
|
+ return [this.sublistNameObj[1][row.sublistName2], 1];
|
|
|
+ } else {
|
|
|
+ if (row.sublistName2) {
|
|
|
+ return [0, 0];
|
|
|
+ } else {
|
|
|
+ return [1, 1];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (columnIndex === 2) {
|
|
|
+ if (this.subIndexArr[2].includes(rowIndex)) {
|
|
|
+ return [this.sublistNameObj[2][row.sublistName3], 1];
|
|
|
+ } else {
|
|
|
+ if (row.sublistName3) {
|
|
|
+ return [0, 0];
|
|
|
+ } else {
|
|
|
+ return [1, 1];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (columnIndex === 3) {
|
|
|
+ if (this.subIndexArr[3].includes(rowIndex)) {
|
|
|
+ return [this.sublistNameObj[3][row.sublistName4], 1];
|
|
|
+ } else {
|
|
|
+ if (row.sublistName4) {
|
|
|
+ return [0, 0];
|
|
|
+ } else {
|
|
|
+ return [1, 1];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (columnIndex === 4) {
|
|
|
+ if (this.subIndexArr[4].includes(rowIndex)) {
|
|
|
+ return [this.sublistNameObj[4][row.sublistName5], 1];
|
|
|
+ } else {
|
|
|
+ if (row.sublistName5) {
|
|
|
+ return [0, 0];
|
|
|
+ } else {
|
|
|
+ return [1, 1];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (columnIndex === 5) {
|
|
|
+ if (this.subIndexArr[5].includes(rowIndex)) {
|
|
|
+ return [this.sublistNameObj[5][row.sublistName6], 1];
|
|
|
+ } else {
|
|
|
+ if (row.sublistName6) {
|
|
|
+ return [0, 0];
|
|
|
+ } else {
|
|
|
+ return [1, 1];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ arraySpanMethodA({ row, column, rowIndex, columnIndex }) {
|
|
|
+ if (columnIndex === 0) {
|
|
|
+ if (this.subIndexArrA[0].includes(rowIndex)) {
|
|
|
+ return [this.sublistNameObjA[0][row.sublistName1], 1];
|
|
|
} else {
|
|
|
return [0, 0];
|
|
|
}
|
|
|
} else if (columnIndex === 1) {
|
|
|
- if (this.subIndexArr2.includes(rowIndex)) {
|
|
|
- return [this.sublistNameObj2[row.sublistName2], 1];
|
|
|
+ if (this.subIndexArrA[1].includes(rowIndex)) {
|
|
|
+ return [this.sublistNameObjA[1][row.sublistName2], 1];
|
|
|
} else {
|
|
|
if (row.sublistName2) {
|
|
|
return [0, 0];
|
|
@@ -210,8 +270,8 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
} else if (columnIndex === 2) {
|
|
|
- if (this.subIndexArr3.includes(rowIndex)) {
|
|
|
- return [this.sublistNameObj3[row.sublistName3], 1];
|
|
|
+ if (this.subIndexArrA[2].includes(rowIndex)) {
|
|
|
+ return [this.sublistNameObjA[2][row.sublistName3], 1];
|
|
|
} else {
|
|
|
if (row.sublistName3) {
|
|
|
return [0, 0];
|
|
@@ -220,8 +280,8 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
} else if (columnIndex === 3) {
|
|
|
- if (this.subIndexArr4.includes(rowIndex)) {
|
|
|
- return [this.sublistNameObj4[row.sublistName4], 1];
|
|
|
+ if (this.subIndexArrA[3].includes(rowIndex)) {
|
|
|
+ return [this.sublistNameObjA[3][row.sublistName4], 1];
|
|
|
} else {
|
|
|
if (row.sublistName4) {
|
|
|
return [0, 0];
|
|
@@ -230,8 +290,8 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
} else if (columnIndex === 4) {
|
|
|
- if (this.subIndexArr5.includes(rowIndex)) {
|
|
|
- return [this.sublistNameObj5[row.sublistName5], 1];
|
|
|
+ if (this.subIndexArrA[4].includes(rowIndex)) {
|
|
|
+ return [this.sublistNameObjA[4][row.sublistName5], 1];
|
|
|
} else {
|
|
|
if (row.sublistName5) {
|
|
|
return [0, 0];
|
|
@@ -240,8 +300,8 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
} else if (columnIndex === 5) {
|
|
|
- if (this.subIndexArr6.includes(rowIndex)) {
|
|
|
- return [this.sublistNameObj6[row.sublistName6], 1];
|
|
|
+ if (this.subIndexArrA[5].includes(rowIndex)) {
|
|
|
+ return [this.sublistNameObjA[5][row.sublistName6], 1];
|
|
|
} else {
|
|
|
if (row.sublistName6) {
|
|
|
return [0, 0];
|
|
@@ -257,7 +317,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 处理数据,通关于配合表格进行合并单元行
|
|
|
- dataHandle(data) {
|
|
|
+ dataHandle(data, type) {
|
|
|
let arr = data;
|
|
|
|
|
|
let lastRowSublistName1 = "";
|
|
@@ -274,13 +334,20 @@ export default {
|
|
|
let sublistNameObj5 = {};
|
|
|
let sublistNameObj6 = {};
|
|
|
|
|
|
+ let subIndexArr1 = [];
|
|
|
+ let subIndexArr2 = [];
|
|
|
+ let subIndexArr3 = [];
|
|
|
+ let subIndexArr4 = [];
|
|
|
+ let subIndexArr5 = [];
|
|
|
+ let subIndexArr6 = [];
|
|
|
+
|
|
|
arr.forEach((item, i) => {
|
|
|
let sublistName1 = item.sublistName1;
|
|
|
if (sublistName1 === lastRowSublistName1) {
|
|
|
sublistNameObj1[sublistName1]++;
|
|
|
} else {
|
|
|
lastRowSublistName1 = sublistName1;
|
|
|
- this.subIndexArr1.push(i);
|
|
|
+ subIndexArr1.push(i);
|
|
|
sublistNameObj1[sublistName1] = 1;
|
|
|
}
|
|
|
|
|
@@ -291,7 +358,7 @@ export default {
|
|
|
sublistNameObj2[sublistName2]++;
|
|
|
} else {
|
|
|
lastRowSublistName2 = sublistName2;
|
|
|
- this.subIndexArr2.push(i);
|
|
|
+ subIndexArr2.push(i);
|
|
|
sublistNameObj2[sublistName2] = 1;
|
|
|
}
|
|
|
}
|
|
@@ -302,7 +369,7 @@ export default {
|
|
|
sublistNameObj3[sublistName3]++;
|
|
|
} else {
|
|
|
lastRowSublistName3 = sublistName3;
|
|
|
- this.subIndexArr3.push(i);
|
|
|
+ subIndexArr3.push(i);
|
|
|
sublistNameObj3[sublistName3] = 1;
|
|
|
}
|
|
|
}
|
|
@@ -313,7 +380,7 @@ export default {
|
|
|
sublistNameObj4[sublistName4]++;
|
|
|
} else {
|
|
|
lastRowSublistName4 = sublistName4;
|
|
|
- this.subIndexArr4.push(i);
|
|
|
+ subIndexArr4.push(i);
|
|
|
sublistNameObj4[sublistName4] = 1;
|
|
|
}
|
|
|
}
|
|
@@ -324,7 +391,7 @@ export default {
|
|
|
sublistNameObj5[sublistName5]++;
|
|
|
} else {
|
|
|
lastRowSublistName5 = sublistName5;
|
|
|
- this.subIndexArr5.push(i);
|
|
|
+ subIndexArr5.push(i);
|
|
|
sublistNameObj5[sublistName5] = 1;
|
|
|
}
|
|
|
}
|
|
@@ -335,18 +402,37 @@ export default {
|
|
|
sublistNameObj6[sublistName6]++;
|
|
|
} else {
|
|
|
lastRowSublistName6 = sublistName6;
|
|
|
- this.subIndexArr6.push(i);
|
|
|
+ subIndexArr6.push(i);
|
|
|
sublistNameObj6[sublistName6] = 1;
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- this.sublistNameObj1 = sublistNameObj1;
|
|
|
- this.sublistNameObj2 = sublistNameObj2;
|
|
|
- this.sublistNameObj3 = sublistNameObj3;
|
|
|
- this.sublistNameObj4 = sublistNameObj4;
|
|
|
- this.sublistNameObj5 = sublistNameObj5;
|
|
|
- this.sublistNameObj6 = sublistNameObj6;
|
|
|
+ let arr1 = [
|
|
|
+ subIndexArr1,
|
|
|
+ subIndexArr2,
|
|
|
+ subIndexArr3,
|
|
|
+ subIndexArr4,
|
|
|
+ subIndexArr5,
|
|
|
+ subIndexArr6,
|
|
|
+ ];
|
|
|
+
|
|
|
+ let arr2 = [
|
|
|
+ sublistNameObj1,
|
|
|
+ sublistNameObj2,
|
|
|
+ sublistNameObj3,
|
|
|
+ sublistNameObj4,
|
|
|
+ sublistNameObj5,
|
|
|
+ sublistNameObj6,
|
|
|
+ ];
|
|
|
+
|
|
|
+ if (type === 1) {
|
|
|
+ this.subIndexArr = arr1;
|
|
|
+ this.sublistNameObj = arr2;
|
|
|
+ } else if (type === 2) {
|
|
|
+ this.subIndexArrA = arr1;
|
|
|
+ this.sublistNameObjA = arr2;
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
|
|
@@ -365,10 +451,13 @@ export default {
|
|
|
if (res.code == 200 && res.info) {
|
|
|
this.info = res.info;
|
|
|
this.getDataWay.data = res.info.algorithmScoreList;
|
|
|
+
|
|
|
this.columnsB = res.info.subListScoreLiTitle;
|
|
|
- this.dataHandle(res.info.subListScoreLi);
|
|
|
+ this.dataHandle(res.info.subListScoreLi, 1);
|
|
|
this.getDataWayB.data = res.info.subListScoreLi;
|
|
|
+
|
|
|
this.columnsC = res.info.sceneScoreLiTitle;
|
|
|
+ this.dataHandle(res.info.sceneScoreLi, 2);
|
|
|
this.getDataWayC.data = res.info.sceneScoreLi;
|
|
|
} else {
|
|
|
this.$message.error(res.message || "获取信息失败");
|