|
|
|
@ -393,9 +393,7 @@ export default { |
|
|
|
|
token: atob(decodeURI(this.$route.query.token)) |
|
|
|
|
}); |
|
|
|
|
this.checkChange.push(false) |
|
|
|
|
console.log('remounted') |
|
|
|
|
this.getTreeData(); |
|
|
|
|
console.log(this.treeData) |
|
|
|
|
if (this.$route.query.systemId) { |
|
|
|
|
this.formData.lcJudgmentPoint.systemId = this.$route.query.systemId; |
|
|
|
|
} |
|
|
|
@ -415,16 +413,6 @@ export default { |
|
|
|
|
if (item.operationIds) { |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
this.$refs[`tree-${index}`].setCheckedKeys([item.operationIds]); |
|
|
|
|
// let currentNode = this.$refs[`tree-${index}`].getNode([item]); |
|
|
|
|
// while ( parentLevel>0)//包含一级节点,因为一级节点有多个,如果是一级节点有一个,那这个判断就是while ( 1!=parentLevel) |
|
|
|
|
// let dom = document.querySelector("#divTree") |
|
|
|
|
// let dom1 = document.querySelector("#depTree") |
|
|
|
|
// //一个节点的高度是26px,这个值能否从对象中获取,等我把这个功能做好再考虑吧 |
|
|
|
|
// let nodeHight =26 |
|
|
|
|
// dom1.style.height = (nodeCount * nodeHight) + "px" |
|
|
|
|
// let contHeight=(nodeIndex * nodeHight)+topHeight-300//总高度,盒子高度的一半 |
|
|
|
|
// dom.scrollTo(0, contHeight) |
|
|
|
|
// this.scrollToDepTree(item.operationIds) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
// 根据题目id,获取题目信息 |
|
|
|
@ -445,7 +433,6 @@ export default { |
|
|
|
|
}, |
|
|
|
|
currentChecked (nodeObj, SelectedObj) { |
|
|
|
|
this.SelectedObj = SelectedObj |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
handleConfirm(){ |
|
|
|
|
let list = [] |
|
|
|
@ -474,7 +461,6 @@ export default { |
|
|
|
|
this.tableData.forEach(async (item, index) => { |
|
|
|
|
// 勾选树节点 |
|
|
|
|
item.operationIds = item.id |
|
|
|
|
// console.log(item) |
|
|
|
|
if (item.id) { |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
this.$refs[`tree-${index}`].setCheckedKeys([item.id]); |
|
|
|
@ -493,8 +479,6 @@ export default { |
|
|
|
|
isDisabled: false, // 已禁用 |
|
|
|
|
isSave: false // 已保存 |
|
|
|
|
}; |
|
|
|
|
console.log(item) |
|
|
|
|
|
|
|
|
|
if(item.type == undefined){ |
|
|
|
|
item.operationIds = item.id |
|
|
|
|
item.type = null |
|
|
|
@ -591,29 +575,19 @@ export default { |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleCheckChange(data, checked, indeterminate, row, index) { // 处理勾选 |
|
|
|
|
// console.log(checked) |
|
|
|
|
// if (checked){ |
|
|
|
|
// }else{ |
|
|
|
|
// this.tableData[index].operationIds= null |
|
|
|
|
// this.tableData[index].operationIds= 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 = ""; |
|
|
|
|
row.value3 = ""; |
|
|
|
|
row.value4 = ""; |
|
|
|
|
row.value5 = ""; |
|
|
|
|
// console.log(data) |
|
|
|
|
if (data.subjectId) { // 是否有题目id |
|
|
|
|
this.currentNodeData = data; |
|
|
|
|
this.$refs[`tree-${index}`].setCheckedNodes([data]); |
|
|
|
|
this.getSubjectData(data.subjectId, index); |
|
|
|
|
} else { |
|
|
|
|
row.type = null; |
|
|
|
|
// console.log(row.type) |
|
|
|
|
this.currentNodeData = {}; |
|
|
|
|
this.$refs[`tree-${index}`].setCheckedNodes([data]); |
|
|
|
|
} |
|
|
|
@ -649,7 +623,6 @@ export default { |
|
|
|
|
let result = []; |
|
|
|
|
data.forEach(item => { |
|
|
|
|
if (item.isNode === 0) { |
|
|
|
|
// item.disabled = true; |
|
|
|
|
item.showCheckbox = false; |
|
|
|
|
} else { |
|
|
|
|
item.showCheckbox = true; |
|
|
|
@ -781,7 +754,6 @@ export default { |
|
|
|
|
this.checkChange.push(false) |
|
|
|
|
if(!this.isAddRule) { |
|
|
|
|
this.isAddRule = true; |
|
|
|
|
// this.tableData.length && this.tableData.push({ruleOperation: 0, indexNo: ""}); |
|
|
|
|
if (this.tableData.length > 0){ |
|
|
|
|
this.tableData.push({ |
|
|
|
|
ruleOperation: 0 |
|
|
|
@ -820,7 +792,6 @@ export default { |
|
|
|
|
}else { |
|
|
|
|
this.$message('请保存当前判分规则再新增!'); |
|
|
|
|
} |
|
|
|
|
// anewPosttingData(judgmentRuleList) |
|
|
|
|
}, |
|
|
|
|
changeResult(row) { // (左右)结果运算符(0:且 1:或 默认0) |
|
|
|
|
row.resultOperation = row.resultOperation === 0 ? 1 : 0; |
|
|
|
@ -837,8 +808,6 @@ 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] |
|
|
|
|
} |
|
|
|
@ -899,8 +868,6 @@ export default { |
|
|
|
|
}else{ |
|
|
|
|
this.tableData.splice(index,2); |
|
|
|
|
} |
|
|
|
|
// this.tableData.splice(index-1, 2); |
|
|
|
|
// index ? this.tableData.splice(index - 1, 1) : this.tableData.splice(0, 1); |
|
|
|
|
this.isAddRule = false; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
@ -911,9 +878,6 @@ export default { |
|
|
|
|
type: "warning", |
|
|
|
|
center: true |
|
|
|
|
}).then(() => { |
|
|
|
|
// if(index+1 == this.tableData.length){ |
|
|
|
|
// index = index-1 |
|
|
|
|
// } |
|
|
|
|
if (index+1 == this.tableData.length){ |
|
|
|
|
this.tableData.splice(index - 1, 2) |
|
|
|
|
}else{ |
|
|
|
|