|
@@ -19,7 +19,6 @@
|
|
|
<template slot-scope="scope">
|
|
|
<el-input-number
|
|
|
v-model="scope.row.evaluationList[cindex].weight"
|
|
|
- :disabled="scope.row.evaluationList[cindex].disabled"
|
|
|
class="width-80"
|
|
|
size="small"
|
|
|
:min="0"
|
|
@@ -106,32 +105,10 @@ export default {
|
|
|
);
|
|
|
|
|
|
this.columns.forEach((column, cindex) => {
|
|
|
- if (cindex === 0) {
|
|
|
- dataList.forEach((item, eindex) => {
|
|
|
- const node = item.evaluationList[cindex];
|
|
|
- node.disabled = false;
|
|
|
- node.enable = !!node.weight;
|
|
|
- node.weight = node.weight || undefined;
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- const rowIndex = dataList.findIndex((item, eindex) => {
|
|
|
- return !!item.evaluationList[cindex].weight;
|
|
|
+ dataList.forEach((item, eindex) => {
|
|
|
+ const node = item.evaluationList[cindex];
|
|
|
+ node.weight = node.weight || undefined;
|
|
|
});
|
|
|
- if (rowIndex !== -1) {
|
|
|
- dataList.forEach((item, eindex) => {
|
|
|
- const node = item.evaluationList[cindex];
|
|
|
- node.disabled = eindex !== rowIndex;
|
|
|
- node.weight = node.weight || undefined;
|
|
|
- });
|
|
|
- } else {
|
|
|
- dataList.forEach((item, eindex) => {
|
|
|
- const node = item.evaluationList[cindex];
|
|
|
- node.disabled = false;
|
|
|
- node.weight = node.weight || undefined;
|
|
|
- });
|
|
|
- }
|
|
|
});
|
|
|
|
|
|
this.dataList = dataList;
|
|
@@ -142,29 +119,6 @@ export default {
|
|
|
item.evaluationList.map((elem) => elem.weight || 0)
|
|
|
);
|
|
|
});
|
|
|
-
|
|
|
- if (cindex === 0) {
|
|
|
- this.dataList.forEach((item, eindex) => {
|
|
|
- const node = item.evaluationList[cindex];
|
|
|
- node.enable = !!node.weight;
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- const val = this.dataList[rowIndex].evaluationList[cindex].weight;
|
|
|
- if (val) {
|
|
|
- this.dataList.forEach((item, eindex) => {
|
|
|
- const node = item.evaluationList[cindex];
|
|
|
- node.disabled = eindex !== rowIndex;
|
|
|
- node.enable = eindex === rowIndex;
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.dataList.forEach((item, eindex) => {
|
|
|
- const node = item.evaluationList[cindex];
|
|
|
- node.disabled = false;
|
|
|
- node.enable = false;
|
|
|
- });
|
|
|
- }
|
|
|
},
|
|
|
checkDataList() {
|
|
|
if (!this.dataList.length) return;
|