田源
2023-08-30 3923ee1ff5c54a398a4b89731692e7fa28be7d0d
主数据菜单查询错误信息
已修改1个文件
23 ■■■■■ 文件已修改
Source/UBCS-WEB/src/components/Master/MasterTree.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Master/MasterTree.vue
@@ -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)
      })
      });
    },
    //定义一个修改数据属性名的方法