|
@@ -55,12 +55,15 @@
|
|
:props="{
|
|
:props="{
|
|
label: 'ClassifyName',
|
|
label: 'ClassifyName',
|
|
children: 'Children',
|
|
children: 'Children',
|
|
|
|
+ isLeaf:'isLeaf'
|
|
}"
|
|
}"
|
|
draggable
|
|
draggable
|
|
:current-node-key="select_node"
|
|
:current-node-key="select_node"
|
|
:expand-on-click-node="false"
|
|
:expand-on-click-node="false"
|
|
check-strictly
|
|
check-strictly
|
|
empty-text="暂无分类"
|
|
empty-text="暂无分类"
|
|
|
|
+ lazy
|
|
|
|
+ :load="getLazyTreeData"
|
|
@current-change="nodeChangeHandle"
|
|
@current-change="nodeChangeHandle"
|
|
:default-expanded-keys="defaultShowNodes"
|
|
:default-expanded-keys="defaultShowNodes"
|
|
@node-expand="handleNodeExpand"
|
|
@node-expand="handleNodeExpand"
|
|
@@ -377,6 +380,37 @@ export default {
|
|
});
|
|
});
|
|
return arr;
|
|
return arr;
|
|
},
|
|
},
|
|
|
|
+ // 懒加载指标
|
|
|
|
+ async getLazyTreeData(node,resolve){
|
|
|
|
+ // console.log(node);
|
|
|
|
+ let arr=[]
|
|
|
|
+ // 点击二级分类或者一级分类但是分类id为0的
|
|
|
|
+ if((node.level===2&&node.data.ClassifyId!=0)||(node.level===1&&node.data.ClassifyId==0)){
|
|
|
|
+ const res=await smmDataInterface.edbListForClassify({ClassifyId:node.data.ClassifyId})
|
|
|
|
+ if(res.Ret===200){
|
|
|
|
+ const temarr = res.Data.List || [];
|
|
|
|
+ arr=temarr.map(item=>{
|
|
|
|
+ return {
|
|
|
|
+ ...item,
|
|
|
|
+ UniqueCode:`${item.ClassifyId}_${item.BaseFromSmmIndexId}_${item.BaseFromSmmIndexCode}`,
|
|
|
|
+ Button:{
|
|
|
|
+ AddButton: false,
|
|
|
|
+ OpButton: true,
|
|
|
|
+ DeleteButton: false,
|
|
|
|
+ MoveButton: true,
|
|
|
|
+ cleanButton: true,
|
|
|
|
+ targetDelButton: true,
|
|
|
|
+ },
|
|
|
|
+ isLeaf:true
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(node.level===1&&node.data.ClassifyId!==0){
|
|
|
|
+ arr=node.data.Children||[]
|
|
|
|
+ }
|
|
|
|
+ resolve(arr)
|
|
|
|
+ },
|
|
/* 获取频度 */
|
|
/* 获取频度 */
|
|
async getFrequency(defaultSelect) {
|
|
async getFrequency(defaultSelect) {
|
|
const res = await smmDataInterface.frequencyList({
|
|
const res = await smmDataInterface.frequencyList({
|