提交 9198b6e1 编写于 作者: zhentian.jia's avatar zhentian.jia

excel的线上地址 归并树

上级 b605c3f2
...@@ -109,6 +109,6 @@ export const envConfig = { ...@@ -109,6 +109,6 @@ export const envConfig = {
workApiUrl: 'https://work.yunqueyi.com/web', workApiUrl: 'https://work.yunqueyi.com/web',
workApiSrc: 'https://work.yunqueyi.com', workApiSrc: 'https://work.yunqueyi.com',
reportUrl: 'https://sc-report.yunqueyi.com/', reportUrl: 'https://sc-report.yunqueyi.com/',
excelUrl: 'https://test-file.yunqueyi.com/File/template/portal/', excelUrl: 'https://file.yunqueyi.com/File/template/portal/',
} }
} }
...@@ -2024,19 +2024,25 @@ export default { ...@@ -2024,19 +2024,25 @@ export default {
console.log(this.$refs.tree.getCheckedKeys()); console.log(this.$refs.tree.getCheckedKeys());
}, },
onChecked() { onChecked() {
let cData = [], // let cData = [],
oldData = (this.treeData.length && this.treeData.slice()) || [], // oldData = (this.treeData.length && this.treeData.slice()) || [],
checkedKeys = this.$refs.tree.getCheckedKeys(), // checkedKeys = this.$refs.tree.getCheckedKeys(),
halfCheckedKeys = this.$refs.tree.getHalfCheckedKeys(), // halfCheckedKeys = this.$refs.tree.getHalfCheckedKeys(),
savedCheckedKeys = this.handlerCheckedData(oldData, checkedKeys).map( // savedCheckedKeys = this.handlerCheckedData(oldData, checkedKeys).map(
key => { // key => {
return { type: 1, key: key }; // return { type: 1, key: key };
} // }
), // ),
savedHalfCheckedKeys = halfCheckedKeys.map(key => { // savedHalfCheckedKeys = halfCheckedKeys.map(key => {
return { type: 2, key: key }; // return { type: 2, key: key };
}), // }),
allSelectedKeys = savedCheckedKeys.concat(savedHalfCheckedKeys); // allSelectedKeys = savedCheckedKeys.concat(savedHalfCheckedKeys);
//重构归并树
let checkedTree = operationData.getSimpleCheckedNodes(this.$refs.tree.store);
let halfCheckedTree = this.$refs.tree.getHalfCheckedKeys()
let allSelectedKeys = operationData.setSelectedKeys(checkedTree,halfCheckedTree);
//重构内容
this.allSelectedKeys = allSelectedKeys; this.allSelectedKeys = allSelectedKeys;
this.initCheckList(allSelectedKeys); this.initCheckList(allSelectedKeys);
...@@ -2046,20 +2052,26 @@ export default { ...@@ -2046,20 +2052,26 @@ export default {
this.updatedTree = true; this.updatedTree = true;
}, },
getTreeCheck() { getTreeCheck() {
let cData = [], // let cData = [],
oldData = (this.treeData.length && this.treeData.slice()) || [], // oldData = (this.treeData.length && this.treeData.slice()) || [],
checkedKeys = this.$refs.tree.getCheckedKeys(), // checkedKeys = this.$refs.tree.getCheckedKeys(),
halfCheckedKeys = this.$refs.tree.getHalfCheckedKeys(), // halfCheckedKeys = this.$refs.tree.getHalfCheckedKeys(),
savedCheckedKeys = this.handlerCheckedData(oldData, checkedKeys).map( // savedCheckedKeys = this.handlerCheckedData(oldData, checkedKeys).map(
key => { // key => {
return { type: 1, key: key }; // return { type: 1, key: key };
} // }
), // ),
savedHalfCheckedKeys = halfCheckedKeys.map(key => { // savedHalfCheckedKeys = halfCheckedKeys.map(key => {
return { type: 2, key: key }; // return { type: 2, key: key };
}), // }),
allSelectedKeys = savedCheckedKeys.concat(savedHalfCheckedKeys); // allSelectedKeys = savedCheckedKeys.concat(savedHalfCheckedKeys);
// console.log('allSelectedKeys值:',allSelectedKeys) // // console.log('allSelectedKeys值:',allSelectedKeys)
//重构归并树
let checkedTree = operationData.getSimpleCheckedNodes(this.$refs.tree.store);
let halfCheckedTree = this.$refs.tree.getHalfCheckedKeys()
let allSelectedKeys = operationData.setSelectedKeys(checkedTree,halfCheckedTree);
//重构内容
return allSelectedKeys; return allSelectedKeys;
}, },
// 递归删除列表中所有子节点 // 递归删除列表中所有子节点
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册