wangting
2023-07-21 bfedaf0182cac8fb947f1b0a3dee3d07c3c24f1e
Source/UBCS-WEB/src/components/Master/MasterTree.vue
@@ -70,13 +70,14 @@
  },
  created() {
    this.getTreeLists()
  },
  computed:{
   },
  methods:{
    //获取数据
    getTreeLists(){
      const fullPath = this.$route.fullPath
      const queryString = fullPath.split('?')[1];
      getTreeList({'conditionMap[id]': 'wupin'}).then(res=>{
        this.Treedata=res.data
        this.ModifyProperties(this.Treedata, 'text', 'label');
@@ -116,18 +117,16 @@
    },
    //表格头部
    TableHeadRend() {
      return new Promise((resolve,reject)=>{
      return new Promise((resolve, reject) => {
        MasterTable({
          codeClassifyOid: this.nodeClickList.oid,
          functionId: 5,
        }).then(res => {
          console.log('1-',res.data)
          console.log('123-',res.data.buttons)
          const flagsToDeleteBtn = ["CODEIMPORTHISTORY", "CODEBATCHADD","CODESTARTPROCESS","CODEEXPORT","CODEQUERY"];
          const flagsToDeleteBtn = ["CODEIMPORTHISTORY", "CODEEXPORT", "CODEQUERY","batchApplyCode"];
          //不同节点显示不同按钮
          if(!res.data.leaf){
            this.masterVrBtnList=res.data.buttons.filter(obj =>flagsToDeleteBtn.includes(obj.uniqueFlag));
          }else {
          if (!res.data.leaf) {
            this.masterVrBtnList = res.data.buttons.filter(obj => flagsToDeleteBtn.includes(obj.uniqueFlag));
          } else {
            this.masterVrBtnList = res.data.buttons
          }
          this.tableHeadDataFateher = res.data;
@@ -141,14 +140,13 @@
              sortable: item.sort,
              width: item.minWidth
            };
         this.tableHeadFindData.push(columnItem)
            // console.log(' this.tableHeadFindData', this.tableHeadFindData)
            this.tableHeadFindData.push(Object.assign(item, columnItem))
          })
          this.$emit('tableHeadDataFateher', this.tableHeadDataFateher);
          this.$emit('tableHeadFindData', this.tableHeadFindData);
          this.$emit('tableHeadBttoms', this.masterVrBtnList);
          resolve();
        }).catch(err=>{
        }).catch(err => {
          reject(err)
        })
      })
@@ -163,7 +161,6 @@
        this.TableRend(); // TableHeadRend() 方法完成后再执行 TableRend()
        this.$emit('nodeClick',this.templateOids)
        this.$emit("codeClassifyOid", this.nodeClickList.oid )
        console.log('树',this.nodeClickList)
      } catch (error) {
        // 处理错误
        this.$message.error(error)