@@ -475,6 +473,7 @@ export default {
this.anewPosttingDatas(list)
this.tableData.forEach(async (item, index) => {
// 勾选树节点
+ item.operationIds = item.id
// console.log(item)
if (item.id) {
this.$nextTick(() => {
@@ -491,9 +490,15 @@ export default {
let obj = {
...item,
isSubject: true,
- isDisabled: true, // 已禁用
- isSave: true // 已保存
+ isDisabled: false, // 已禁用
+ isSave: false // 已保存
};
+ console.log(item)
+
+ if(item.type == undefined){
+ item.operationIds = item.id
+ item.type = null
+ }
//题目类型(1选择 2判断 3填空 4问答 5指标结果)
if (item.type == 1 || item.type == 2) {
obj.subjectId = Number(item.emptyOne);
@@ -586,19 +591,15 @@ export default {
});
},
handleCheckChange(data, checked, indeterminate, row, index) { // 处理勾选
- // this.changeArr.push(checked)
- // if(this.changeArr.length === 4) {
- // this.checkChange.splice(index, 1, this.changeArr[2])
- // this.changeArr.splice(0, this.changeArr.length)
- // }else if(this.changeArr.length === 2) {
- // this.checkChange.splice(index, 1, true)
+ // console.log(checked)
+ // if (checked){
+ // }else{
+ // this.tableData[index].operationIds= null
+ // this.tableData[index].operationIds= null
// }
- if (checked){
- }else{
- row.operationIds = null
- row.type = null
- }
+ // console.log(this.tableData[index].operationIds)
if (checked && data.isNode === 1) {
+ console.log('123')
this.tableData[index].operationIds = data.id; // 操作id串
row.value1 = "";
row.value2 = "";
@@ -836,6 +837,11 @@ export default {
},
handleSave(row, index) { // 处理保存规则
let keys = this.$refs[`tree-${index}`].getCheckedKeys();
+ console.log(keys)
+ console.log(row)
+ if(!row.operationIds){
+ row.operationIds = keys[0]
+ }
if (!keys.length || !row.operationIds) {
this.$message.warning(`请选择操作点`);
return;
@@ -971,7 +977,10 @@ export default {
margin-left: 20px;
}
}
-
+ .cell div{
+ margin: auto;
+ text-align: center;
+ }
// 表单容器
.form-con {
padding-bottom: 24px;