| | |
| | | ruleForm: {} as any, |
| | | stores: {}, |
| | | dropdownData: {} as any, |
| | | enterpriseList:[], |
| | | roleList:[] |
| | | enterpriseList:[] as any[], |
| | | roleList:[] as any[] |
| | | }); |
| | | |
| | | // 自行添加其他规则 |
| | |
| | | }); |
| | | |
| | | // 打开弹窗 |
| | | const openDialog = async (row: any, title: string, qiyeList,roleList) => { |
| | | const openDialog = async (row: any, title: string, qiyeList: any[], roleList: any[]) => { |
| | | state.roleList = roleList |
| | | state.enterpriseList = qiyeList |
| | | state.title = title; |
| | |
| | | } |
| | | }); |
| | | }; |
| | | const isLeaf = data => { |
| | | const isLeaf = (data: any[]) => { |
| | | data.forEach(item => { |
| | | if (!item.child) { |
| | | item.leaf = true; |
| | | } |
| | | }); |
| | | }; |
| | | const loadNode = (node, resolve) => { |
| | | const loadNode = (node: { level: number; data: any; }, resolve: (arg0: never[]) => any) => { |
| | | if (node.level === 0) { |
| | | isLeaf(node.data); |
| | | return resolve(node.data); |