|
|
@ -488,7 +488,7 @@ import quill from "@/components/quill"; |
|
|
|
import MyTree from "@/components/myTree/src/tree"; |
|
|
|
import MyTree from "@/components/myTree/src/tree"; |
|
|
|
import { deepCopy } from "@/utils/deepCopy"; |
|
|
|
import { deepCopy } from "@/utils/deepCopy"; |
|
|
|
import { mapState } from 'vuex' |
|
|
|
import { mapState } from 'vuex' |
|
|
|
|
|
|
|
import _ from 'lodash' |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
components: { quill, MyTree }, |
|
|
|
components: { quill, MyTree }, |
|
|
|
data () { |
|
|
|
data () { |
|
|
@ -554,7 +554,7 @@ export default { |
|
|
|
SelectedObj: [], |
|
|
|
SelectedObj: [], |
|
|
|
counts: 0, |
|
|
|
counts: 0, |
|
|
|
loading: true, |
|
|
|
loading: true, |
|
|
|
moneys: [100, 50, 20, 10, 5, 1, 0.5, 0.1] |
|
|
|
moneys: [100, 50, 20, 10, 5, 1, 0.5, 0.1], |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
computed: { |
|
|
@ -568,6 +568,7 @@ export default { |
|
|
|
localStorage.setItem('token', atob(decodeURI(token))) |
|
|
|
localStorage.setItem('token', atob(decodeURI(token))) |
|
|
|
localStorage.setItem('referrer', atob(decodeURI(referrer))) |
|
|
|
localStorage.setItem('referrer', atob(decodeURI(referrer))) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (this.isSt) { |
|
|
|
if (this.isSt) { |
|
|
|
this.leftSymbols = [ |
|
|
|
this.leftSymbols = [ |
|
|
|
{ |
|
|
|
{ |
|
|
@ -626,38 +627,25 @@ export default { |
|
|
|
this.tableData.forEach(async (item, index) => { |
|
|
|
this.tableData.forEach(async (item, index) => { |
|
|
|
item.i = index |
|
|
|
item.i = index |
|
|
|
// 勾选树节点 |
|
|
|
// 勾选树节点 |
|
|
|
//let lists = JSON.parse(JSON.stringify(this.treeData)) |
|
|
|
|
|
|
|
// let lists = this.treeData |
|
|
|
|
|
|
|
if (item.operationIds) { |
|
|
|
if (item.operationIds) { |
|
|
|
let list = JSON.parse(JSON.stringify(this.treeData)) |
|
|
|
let list = _.cloneDeep(this.treeData) |
|
|
|
item.operationIData = [] |
|
|
|
item.operationIData = [] |
|
|
|
let findOut = null |
|
|
|
let result = {} |
|
|
|
let testObj = {} |
|
|
|
let serial = 0 |
|
|
|
for (let i = 0; i < list.length; i++) { |
|
|
|
this.handleRule(item.operationIds.split(','), list, result, serial) |
|
|
|
const id = item.operationIds.split(',') |
|
|
|
item.operationIData.push(result.children[0]) |
|
|
|
if (list[i].id == id[0]) { |
|
|
|
|
|
|
|
findOut = this.filterRule(id, list, testObj) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
item.operationIData.push(testObj.children[0]) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 根据题目id,获取题目信息 |
|
|
|
|
|
|
|
if (item.isSubject && item.type && item.type != 4 && item.emptyOne) { |
|
|
|
|
|
|
|
// await this.getSubjectData(item.emptyOne, index); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.setIndex() |
|
|
|
this.setIndex() |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.loading = false |
|
|
|
this.loading = false |
|
|
|
}) |
|
|
|
}) |
|
|
|
console.log("🚀 ~ file: Transaction.vue:646 ~ this.tableData.forEach ~ this.tableData:", this.treeData) |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.$message.warning(res.message); |
|
|
|
this.$message.warning(res.message); |
|
|
|
this.loading = false |
|
|
|
this.loading = false |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
}).catch(err => { |
|
|
|
this.loading = false |
|
|
|
this.loading = false |
|
|
|
// console.log(err); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 获取业务 |
|
|
|
// 获取业务 |
|
|
@ -685,11 +673,12 @@ export default { |
|
|
|
handleSelectionChange (val) { |
|
|
|
handleSelectionChange (val) { |
|
|
|
this.multipleSelection = val |
|
|
|
this.multipleSelection = val |
|
|
|
}, |
|
|
|
}, |
|
|
|
filterRule (id, obj = [], needObj) { |
|
|
|
handleRule (id, list, result, serial) { |
|
|
|
let first = id.shift() |
|
|
|
const curId = id[serial] |
|
|
|
let tmp = obj.find(item => item.id == first) |
|
|
|
const cur = list.find(e => e.id == curId) |
|
|
|
needObj.children = obj.filter(item => item.id == first) |
|
|
|
result.children = cur ? [cur] : [] |
|
|
|
if (tmp) return this.filterRule(id, tmp.children, needObj.children.length ? needObj.children[0] : []) |
|
|
|
++serial |
|
|
|
|
|
|
|
cur && cur.children && this.handleRule(id, cur.children, result.children[0], serial) |
|
|
|
}, |
|
|
|
}, |
|
|
|
//计算此节点的距离思路1.计算出当前节点据顶部的高度+当前节点在树的位置的高度-盒子高度的一半 |
|
|
|
//计算此节点的距离思路1.计算出当前节点据顶部的高度+当前节点在树的位置的高度-盒子高度的一半 |
|
|
|
scrollToDepTree (deptCode) { |
|
|
|
scrollToDepTree (deptCode) { |
|
|
@ -721,17 +710,13 @@ export default { |
|
|
|
this.getSubjectData(item.subjectId, index); |
|
|
|
this.getSubjectData(item.subjectId, index); |
|
|
|
} |
|
|
|
} |
|
|
|
if (item.operationIds) { |
|
|
|
if (item.operationIds) { |
|
|
|
let list = JSON.parse(JSON.stringify(this.treeData)) |
|
|
|
let list = _.cloneDeep(this.treeData) |
|
|
|
item.operationIData = [] |
|
|
|
item.operationIData = [] |
|
|
|
let testObj = {} |
|
|
|
|
|
|
|
let findOut = null |
|
|
|
let result = {} |
|
|
|
for (let i = 0; i < list.length; i++) { |
|
|
|
let serial = 0 |
|
|
|
let id = item.operationIds.split(',') |
|
|
|
this.handleRule(item.operationIds.split(','), list, result, serial) |
|
|
|
if (list[i].id == id[0]) { |
|
|
|
result.children && item.operationIData.push(result.children[0]) |
|
|
|
findOut = this.filterRule(id, list, testObj) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
testObj.children && item.operationIData.push(testObj.children[0]) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.setIndex() |
|
|
|
this.setIndex() |
|
|
@ -891,7 +876,6 @@ export default { |
|
|
|
this.$set(this.tableData, index, item); |
|
|
|
this.$set(this.tableData, index, item); |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
}).catch(err => { |
|
|
|
// console.log(err); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
@ -956,7 +940,6 @@ export default { |
|
|
|
const name = this.isSt ? 'recordChildren' : 'children' |
|
|
|
const name = this.isSt ? 'recordChildren' : 'children' |
|
|
|
let result = []; |
|
|
|
let result = []; |
|
|
|
data.forEach(item => { |
|
|
|
data.forEach(item => { |
|
|
|
// console.log("🚀 ~ file: Transaction.vue:866 ~ toTreeId ~ name:", item[name]) |
|
|
|
|
|
|
|
item.label = item.name |
|
|
|
item.label = item.name |
|
|
|
if (item.isNode === 0) { |
|
|
|
if (item.isNode === 0) { |
|
|
|
item.showCheckbox = false; |
|
|
|
item.showCheckbox = false; |
|
|
@ -986,9 +969,7 @@ export default { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.isNameRepeat = true; |
|
|
|
this.isNameRepeat = true; |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
}).catch(err => { }); |
|
|
|
// console.log(err); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
saveAll () { // 保存判分点 |
|
|
|
saveAll () { // 保存判分点 |
|
|
@ -1078,9 +1059,7 @@ export default { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.$message.warning(res.message); |
|
|
|
this.$message.warning(res.message); |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
}).catch(err => { }); |
|
|
|
// console.log(err); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} else if (this.isEdit) { // 编辑判分点 |
|
|
|
} else if (this.isEdit) { // 编辑判分点 |
|
|
|
this.$post(this.api.updateJudgmentPoint, this.formData).then(res => { |
|
|
|
this.$post(this.api.updateJudgmentPoint, this.formData).then(res => { |
|
|
|
if (res.status === 200) { |
|
|
|
if (res.status === 200) { |
|
|
@ -1089,9 +1068,7 @@ export default { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.$message.warning(res.message); |
|
|
|
this.$message.warning(res.message); |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
}).catch(err => { }); |
|
|
|
// console.log(err); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 新增判分点 |
|
|
|
// 新增判分点 |
|
|
|