| | |
| | | defaultExpandAll: false, |
| | | menu: false, |
| | | lazy: true, |
| | | // treeLoad:function (node,resolve){ |
| | | // console.log(node) |
| | | // console.log(resolve) |
| | | // } |
| | | treeLoad: (node, resolve) => { |
| | | if (node.data != false) { |
| | | const parentId = (node.level === 0) ? 0 : node.data.oid; |
| | |
| | | getTreeLists() { |
| | | const index = this.$route.query.id.indexOf('@'); |
| | | const result = this.$route.query.id.substring(0, index); |
| | | this.idData = result |
| | | // console.log(this.$route) |
| | | this.idData = result; |
| | | getTreeList({'conditionMap[id]': this.idData}).then(res => { |
| | | if (res) { |
| | | if (res.data.length === 0) { |
| | | this.$message.error("主数据分类查询为空!"); |
| | | } else { |
| | | this.Treedata = res.data; |
| | | |
| | | const [firstProperty] = res.data; |
| | | this.ModifyProperties(this.Treedata, 'text', 'label'); |
| | | this.referTreeId = firstProperty.attributes.btmTypeId; |
| | |
| | | }); |
| | | this.$emit("coderuleoid", this.coderuleoid) |
| | | this.$emit('Treedata', this.Treedata) |
| | | // console.log(this.Treedata) |
| | | } |
| | | } |
| | | }).catch(res => { |
| | | // console.log(res) |
| | | this.$message.error(res) |
| | | }); |
| | | }, |
| | |
| | | this.$emit("codeClassifyOid", this.nodeClickList.oid) |
| | | this.$emit("nodeClickList", this.nodeClickList) |
| | | } catch (error) { |
| | | // 处理错误 |
| | | this.$message.error(error) |
| | | } |
| | | } |