|
|
@ -89,19 +89,20 @@ |
|
|
|
<p class="p">操作一致性规则:用户完成的功能操作与下方设置的操作点一致</p> |
|
|
|
<p class="p">操作一致性规则:用户完成的功能操作与下方设置的操作点一致</p> |
|
|
|
<div class="tree-con"> |
|
|
|
<div class="tree-con"> |
|
|
|
<div class="block1" :id="'divTree'+scope.$index"> |
|
|
|
<div class="block1" :id="'divTree'+scope.$index"> |
|
|
|
<my-tree |
|
|
|
<el-tree :data="scope.row.operationIData" :props="defaultProp"></el-tree> |
|
|
|
:id="'depTree'+scope.$index" |
|
|
|
<!-- <my-tree--> |
|
|
|
class="action" |
|
|
|
<!-- :id="'depTree'+scope.$index"--> |
|
|
|
:ref="'tree-'+scope.$index" |
|
|
|
<!-- class="action"--> |
|
|
|
:data="treeData" |
|
|
|
<!-- :ref="'tree-'+scope.$index"--> |
|
|
|
:props="defaultProps" |
|
|
|
<!-- :data="treeData"--> |
|
|
|
default-expand-all |
|
|
|
<!-- :props="defaultProps"--> |
|
|
|
node-key="operationIds" |
|
|
|
<!-- default-expand-all--> |
|
|
|
show-checkbox |
|
|
|
<!-- node-key="operationIds"--> |
|
|
|
@check-change="(data, checked, indeterminate) => { |
|
|
|
<!-- show-checkbox--> |
|
|
|
handleCheckChange(data, checked, indeterminate, scope.row, scope.$index); |
|
|
|
<!-- @check-change="(data, checked, indeterminate) => {--> |
|
|
|
}" |
|
|
|
<!-- handleCheckChange(data, checked, indeterminate, scope.row, scope.$index);--> |
|
|
|
></my-tree> |
|
|
|
<!-- }"--> |
|
|
|
|
|
|
|
<!-- ></my-tree>--> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-show="scope.row.isDisabled" class="mask"></div> |
|
|
|
<div v-show="scope.row.isDisabled" class="mask"></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -370,6 +371,10 @@ export default { |
|
|
|
children: "children", |
|
|
|
children: "children", |
|
|
|
label: "name" |
|
|
|
label: "name" |
|
|
|
}, // 树结构配置项 |
|
|
|
}, // 树结构配置项 |
|
|
|
|
|
|
|
defaultProp: { |
|
|
|
|
|
|
|
children: "children", |
|
|
|
|
|
|
|
label: "name" |
|
|
|
|
|
|
|
}, // 树结构配置项 |
|
|
|
currentNodeData: {}, // 当前选中的节点 |
|
|
|
currentNodeData: {}, // 当前选中的节点 |
|
|
|
formData: { |
|
|
|
formData: { |
|
|
|
lcJudgmentPoint: { |
|
|
|
lcJudgmentPoint: { |
|
|
@ -415,36 +420,23 @@ export default { |
|
|
|
this.anewPosttingData(judgmentRuleList) |
|
|
|
this.anewPosttingData(judgmentRuleList) |
|
|
|
this.tableData.forEach(async (item, index) => { |
|
|
|
this.tableData.forEach(async (item, index) => { |
|
|
|
// 勾选树节点 |
|
|
|
// 勾选树节点 |
|
|
|
|
|
|
|
let lists = JSON.parse(JSON.stringify(this.treeData)) |
|
|
|
if (item.operationIds) { |
|
|
|
if (item.operationIds) { |
|
|
|
this.operationIData = [] |
|
|
|
let list = lists |
|
|
|
let list = this.treeData |
|
|
|
|
|
|
|
let idstr = item.operationIds |
|
|
|
let idstr = item.operationIds |
|
|
|
item.operationIData = [] |
|
|
|
item.operationIData = [] |
|
|
|
let idArr = idstr.split(',') |
|
|
|
let idArr = idstr.split(',') |
|
|
|
idArr.shift() |
|
|
|
idArr.shift() |
|
|
|
let startId = idArr.shift() |
|
|
|
let startId = idArr.shift() |
|
|
|
|
|
|
|
|
|
|
|
let findOut = null |
|
|
|
let findOut = null |
|
|
|
let testObj = null |
|
|
|
let testObj = null |
|
|
|
for(let i=0; i<list.length; i++) { |
|
|
|
for(let i=0; i<list.length; i++) { |
|
|
|
if(list[i].id == startId) { |
|
|
|
if(list[i].id == startId) { |
|
|
|
testObj = list[i] |
|
|
|
testObj = list[i] |
|
|
|
findOut = this.cxk(idArr, list[i], testObj) |
|
|
|
findOut = this.cxk(idArr, list[i], testObj) |
|
|
|
// item.operationIData.push(findOut) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
console.log('testObj') |
|
|
|
item.operationIData.push(testObj) |
|
|
|
console.log(testObj) |
|
|
|
|
|
|
|
this.operationIData.push(findOut) |
|
|
|
|
|
|
|
// for (let a=0;a<this.operationIData.length;a++){ |
|
|
|
|
|
|
|
// console.log(a+1) |
|
|
|
|
|
|
|
// this.operationIData[a].nub = 'aaa' |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// console.log(this.operationIData) |
|
|
|
|
|
|
|
// console.log(item.operationIData) |
|
|
|
|
|
|
|
// this.$nextTick(() => { |
|
|
|
|
|
|
|
// this.$refs[`tree-${index}`].setCheckedKeys([item.operationIds]); |
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
// 根据题目id,获取题目信息 |
|
|
|
// 根据题目id,获取题目信息 |
|
|
|
if (item.isSubject && item.type && item.type != 4 && item.emptyOne) { |
|
|
|
if (item.isSubject && item.type && item.type != 4 && item.emptyOne) { |
|
|
@ -462,9 +454,6 @@ export default { |
|
|
|
if(arr.length === 0) { |
|
|
|
if(arr.length === 0) { |
|
|
|
return obj |
|
|
|
return obj |
|
|
|
} |
|
|
|
} |
|
|
|
// console.log('arr') |
|
|
|
|
|
|
|
// console.log(arr) |
|
|
|
|
|
|
|
this.operationIData.push(obj) |
|
|
|
|
|
|
|
let findIt = arr.shift() |
|
|
|
let findIt = arr.shift() |
|
|
|
let tmp = obj.children.find(item => item.id == findIt) |
|
|
|
let tmp = obj.children.find(item => item.id == findIt) |
|
|
|
needObj.children = obj.children.filter(item => item.id == findIt) |
|
|
|
needObj.children = obj.children.filter(item => item.id == findIt) |
|
|
@ -495,13 +484,25 @@ export default { |
|
|
|
this.anewPosttingDatas(list) |
|
|
|
this.anewPosttingDatas(list) |
|
|
|
this.tableData.forEach(async (item, index) => { |
|
|
|
this.tableData.forEach(async (item, index) => { |
|
|
|
// 勾选树节点 |
|
|
|
// 勾选树节点 |
|
|
|
// item.operationIds = item.id |
|
|
|
let lists = JSON.parse(JSON.stringify(this.treeData)) |
|
|
|
if (item.operationIds) { |
|
|
|
if (item.operationIds) { |
|
|
|
this.$nextTick(() => { |
|
|
|
let list = lists |
|
|
|
this.$refs[`tree-${index}`].setCheckedKeys([item.operationIds]); |
|
|
|
let idstr = item.operationIds |
|
|
|
}) |
|
|
|
item.operationIData = [] |
|
|
|
|
|
|
|
let idArr = idstr.split(',') |
|
|
|
|
|
|
|
idArr.shift() |
|
|
|
|
|
|
|
let startId = idArr.shift() |
|
|
|
|
|
|
|
let findOut = null |
|
|
|
|
|
|
|
let testObj = null |
|
|
|
|
|
|
|
for(let i=0; i<list.length; i++) { |
|
|
|
|
|
|
|
if(list[i].id == startId) { |
|
|
|
|
|
|
|
testObj = list[i] |
|
|
|
|
|
|
|
findOut = this.cxk(idArr, list[i], testObj) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
item.operationIData.push(testObj) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
this.configVisible = false |
|
|
|
this.configVisible = false |
|
|
|
}, |
|
|
|
}, |
|
|
|
anewPosttingDatas(judgmentRuleList){ |
|
|
|
anewPosttingDatas(judgmentRuleList){ |
|
|
@ -864,11 +865,11 @@ export default { |
|
|
|
row.isSave = false; |
|
|
|
row.isSave = false; |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleSave(row, index) { // 处理保存规则 |
|
|
|
handleSave(row, index) { // 处理保存规则 |
|
|
|
let keys = this.$refs[`tree-${index}`].getCheckedKeys(); |
|
|
|
// let keys = this.$refs[`tree-${index}`].getCheckedKeys(); |
|
|
|
if(!row.operationIds){ |
|
|
|
// if(!row.operationIds){ |
|
|
|
row.operationIds = keys[0] |
|
|
|
// row.operationIds = keys[0] |
|
|
|
} |
|
|
|
// } |
|
|
|
if (!keys.length || !row.operationIds) { |
|
|
|
if (!row.operationIds) { |
|
|
|
this.$message.warning(`请选择操作点`); |
|
|
|
this.$message.warning(`请选择操作点`); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -915,9 +916,9 @@ export default { |
|
|
|
this.judgePoints = false |
|
|
|
this.judgePoints = false |
|
|
|
this.$set(this.tableData, index, this.tableDataCopy[index]); |
|
|
|
this.$set(this.tableData, index, this.tableDataCopy[index]); |
|
|
|
if (!this.tableData[index].operationIds) { |
|
|
|
if (!this.tableData[index].operationIds) { |
|
|
|
this.$refs[`tree-${index}`].setCheckedKeys([]); |
|
|
|
// this.$refs[`tree-${index}`].setCheckedKeys([]); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.$refs[`tree-${index}`].setCheckedKeys([this.tableData[index].operationIds]); |
|
|
|
// this.$refs[`tree-${index}`].setCheckedKeys([this.tableData[index].operationIds]); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (index+1 == this.tableData.length){ |
|
|
|
if (index+1 == this.tableData.length){ |
|
|
@ -945,7 +946,7 @@ export default { |
|
|
|
// 勾选树节点 |
|
|
|
// 勾选树节点 |
|
|
|
if (item.operationIds) { |
|
|
|
if (item.operationIds) { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs[`tree-${index}`].setCheckedKeys([item.operationIds]); |
|
|
|
// this.$refs[`tree-${index}`].setCheckedKeys([item.operationIds]); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
// 根据题目id,获取题目信息 |
|
|
|
// 根据题目id,获取题目信息 |
|
|
|