|
@@ -347,39 +347,39 @@ const defaultCheckedKeys = ref([])
|
|
|
const defaultExpandAll = ref(true)
|
|
|
|
|
|
const changeIsAdd = (val, row, index)=>{
|
|
|
- const { isParent } = row
|
|
|
- if (isParent && val === 0) {
|
|
|
- let rowTreeData = leftTree.value.treeRef.getNode(row.id)
|
|
|
- let delKeys = arrToId(rowTreeData.data.children).split(',')
|
|
|
- nextTick(()=>{
|
|
|
- delKeys.forEach((ele)=>{
|
|
|
- leftTree.value.treeRef.setChecked(ele, false, true)
|
|
|
- let checkKeys = leftTree.value.treeRef.getCheckedKeys()
|
|
|
- let arr = []
|
|
|
- tableData.value.forEach((ele)=>{
|
|
|
- checkKeys.forEach((ele1)=>{
|
|
|
- if (ele.id === ele1) {
|
|
|
- arr.push(ele)
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- tableData.value = arr
|
|
|
- if (checkKeys.length > 0) {
|
|
|
- tableData.value.unshift(
|
|
|
- { nodeName: parentData.value.nodeName,
|
|
|
- startStake: '',
|
|
|
- endStake: '',
|
|
|
- contractPicture: '',
|
|
|
- isAddChildNode:0,
|
|
|
- id:parentData.value.id,
|
|
|
- parentId:parentData.value.parentId,
|
|
|
- isParent:isTable.value ? false : true,
|
|
|
- },
|
|
|
- )
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- }
|
|
|
+ // const { isParent } = row
|
|
|
+ // if (isParent && val === 0) {
|
|
|
+ // let rowTreeData = leftTree.value.treeRef.getNode(row.id)
|
|
|
+ // let delKeys = arrToId(rowTreeData.data.children).split(',')
|
|
|
+ // nextTick(()=>{
|
|
|
+ // delKeys.forEach((ele)=>{
|
|
|
+ // leftTree.value.treeRef.setChecked(ele, false, true)
|
|
|
+ // let checkKeys = leftTree.value.treeRef.getCheckedKeys()
|
|
|
+ // let arr = []
|
|
|
+ // tableData.value.forEach((ele)=>{
|
|
|
+ // checkKeys.forEach((ele1)=>{
|
|
|
+ // if (ele.id === ele1) {
|
|
|
+ // arr.push(ele)
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // })
|
|
|
+ // tableData.value = arr
|
|
|
+ // if (checkKeys.length > 0) {
|
|
|
+ // tableData.value.unshift(
|
|
|
+ // { nodeName: parentData.value.nodeName,
|
|
|
+ // startStake: '',
|
|
|
+ // endStake: '',
|
|
|
+ // contractPicture: '',
|
|
|
+ // isAddChildNode:0,
|
|
|
+ // id:parentData.value.id,
|
|
|
+ // parentId:parentData.value.parentId,
|
|
|
+ // isParent:isTable.value ? false : true,
|
|
|
+ // },
|
|
|
+ // )
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // })
|
|
|
+ // }
|
|
|
}
|
|
|
const leftTree = ref(null)
|
|
|
</script>
|