| | |
| | | props: { |
| | | pageSize: { |
| | | type: String, |
| | | default: "10" |
| | | default: "100" |
| | | }, |
| | | currentPage: { |
| | | type: String, |
| | |
| | | this.idData = result |
| | | // console.log(this.$route) |
| | | getTreeList({'conditionMap[id]': this.idData}).then(res => { |
| | | this.Treedata = res.data; |
| | | const [firstProperty] = res.data; |
| | | this.ModifyProperties(this.Treedata, 'text', 'label'); |
| | | this.codeClassifyOid = firstProperty.oid; |
| | | this.coderuleoid = firstProperty.attributes.coderuleoid; |
| | | this.$emit("coderuleoid", this.coderuleoid) |
| | | this.$emit('Treedata', this.Treedata) |
| | | 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.codeClassifyOid = firstProperty.oid; |
| | | this.coderuleoid = firstProperty.attributes.coderuleoid; |
| | | this.$emit("coderuleoid", this.coderuleoid) |
| | | this.$emit('Treedata', this.Treedata) |
| | | } |
| | | } |
| | | }).catch(res => { |
| | | console.log(res) |
| | | this.$message.error(res) |
| | | }) |
| | | }); |
| | | }, |
| | | |
| | | //定义一个修改数据属性名的方法 |