|
|
@ -64,7 +64,7 @@ |
|
|
|
header-align="center" |
|
|
|
header-align="center" |
|
|
|
show-checkbox |
|
|
|
show-checkbox |
|
|
|
ref="tree" |
|
|
|
ref="tree" |
|
|
|
node-key="id" |
|
|
|
node-key="operationIds" |
|
|
|
:props="defaultProps"> |
|
|
|
:props="defaultProps"> |
|
|
|
</el-tree> |
|
|
|
</el-tree> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -96,7 +96,7 @@ |
|
|
|
:data="treeData" |
|
|
|
:data="treeData" |
|
|
|
:props="defaultProps" |
|
|
|
:props="defaultProps" |
|
|
|
default-expand-all |
|
|
|
default-expand-all |
|
|
|
node-key="id" |
|
|
|
node-key="operationIds" |
|
|
|
show-checkbox |
|
|
|
show-checkbox |
|
|
|
@check-change="(data, checked, indeterminate) => { |
|
|
|
@check-change="(data, checked, indeterminate) => { |
|
|
|
handleCheckChange(data, checked, indeterminate, scope.row, scope.$index); |
|
|
|
handleCheckChange(data, checked, indeterminate, scope.row, scope.$index); |
|
|
@ -481,7 +481,7 @@ export default { |
|
|
|
isDisabled: false, // 已禁用 |
|
|
|
isDisabled: false, // 已禁用 |
|
|
|
isSave: false // 已保存 |
|
|
|
isSave: false // 已保存 |
|
|
|
}; |
|
|
|
}; |
|
|
|
obj.operationIds = item.id |
|
|
|
obj.operationIds = item.operationIds |
|
|
|
if(item.type == undefined || item.type == ''){ |
|
|
|
if(item.type == undefined || item.type == ''){ |
|
|
|
obj.type = null |
|
|
|
obj.type = null |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
@ -536,8 +536,6 @@ export default { |
|
|
|
isSave: true // 已保存 |
|
|
|
isSave: true // 已保存 |
|
|
|
}; |
|
|
|
}; |
|
|
|
//题目类型(1选择 2判断 3填空 4问答 5指标结果) |
|
|
|
//题目类型(1选择 2判断 3填空 4问答 5指标结果) |
|
|
|
console.log(item) |
|
|
|
|
|
|
|
console.log(obj) |
|
|
|
|
|
|
|
if (item.type == 1 || item.type == 2) { |
|
|
|
if (item.type == 1 || item.type == 2) { |
|
|
|
obj.subjectId = Number(item.emptyOne); |
|
|
|
obj.subjectId = Number(item.emptyOne); |
|
|
|
obj.value1 = +item.emptyTwo; |
|
|
|
obj.value1 = +item.emptyTwo; |
|
|
@ -583,8 +581,13 @@ export default { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleCheckChange(data, checked, indeterminate, row, index) { // 处理勾选 |
|
|
|
handleCheckChange(data, checked, indeterminate, row, index) { // 处理勾选 |
|
|
|
|
|
|
|
|
|
|
|
if (checked && data.isNode === 1) { |
|
|
|
if (checked && data.isNode === 1) { |
|
|
|
// this.tableData[index].operationIds = data.id; // 操作id串 |
|
|
|
console.log(data) |
|
|
|
|
|
|
|
if (!data.type){ |
|
|
|
|
|
|
|
this.getSubjectData(data.subjectId, index); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.tableData[index].operationIds = data.operationIds; // 操作id串 |
|
|
|
// row.value1 = ""; |
|
|
|
// row.value1 = ""; |
|
|
|
// row.value2 = ""; |
|
|
|
// row.value2 = ""; |
|
|
|
// row.value3 = ""; |
|
|
|
// row.value3 = ""; |
|
|
@ -638,10 +641,13 @@ export default { |
|
|
|
item.showCheckbox = true; |
|
|
|
item.showCheckbox = true; |
|
|
|
} |
|
|
|
} |
|
|
|
if (item.children && item.children.length) { |
|
|
|
if (item.children && item.children.length) { |
|
|
|
item.id = `${parentId},${item.id}`; |
|
|
|
// item.id = `${parentId},${item.id}`; |
|
|
|
item.children = this.toTreeId(item.children, item.id); |
|
|
|
item.operationIds = `${parentId},${item.id}`; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
item.children = this.toTreeId(item.children, item.operationIds); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
item.id = `${parentId},${item.id}`; |
|
|
|
// item.id = `${parentId},${item.id}`; |
|
|
|
|
|
|
|
item.operationIds = `${parentId},${item.id}`; |
|
|
|
} |
|
|
|
} |
|
|
|
result.push(item); |
|
|
|
result.push(item); |
|
|
|
}); |
|
|
|
}); |
|
|
|