田源
2023-09-11 90fce6d89901ce0fb68ae9ea897b636679e8906d
Source/UBCS-WEB/src/components/Master/MasterTree.vue
@@ -15,7 +15,7 @@
  props: {
    pageSize: {
      type: String,
      default: "10"
      default: "100"
    },
    currentPage: {
      type: String,
@@ -80,16 +80,23 @@
      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)
      })
      });
    },
    //定义一个修改数据属性名的方法