田源
2023-12-06 f74c2fd43150311e0aa8b1eb8eb715ac20ca21cf
Source/UBCS-WEB/src/components/Master/MasterTree.vue
@@ -1,12 +1,12 @@
<template>
  <div class="app" style="display: flex;">
  <div class="app" style="position: relative;">
    <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="Treedata" :defaultExpandAll="false"
               :option="Treeoption" style="width: fit-content;" @node-click="nodeClick">
      <template slot-scope="{ node }">
        <span v-html="node.label"></span>
      </template>
    </avue-tree>
    <div style="display: inline-block;">
    <div style="position: absolute; right: 0px; top: -1px;">
      <el-link class="refresh-icon" icon="el-icon-refresh" @click="getTreeLists"></el-link>
    </div>
  </div>
@@ -31,6 +31,10 @@
      type: String,
      default: ''
    },
    isLoading:{
      type: Boolean,
      default:false
    }
  },
  data() {
    return {
@@ -147,12 +151,14 @@
    },
    //表格刷新
    TableRend() {
      this.isLoading = true;
      TableData({
        templateOid: this.templateOids,
        codeClassifyOid: this.nodeClickList.oid,
        page: this.currentPage,
        limit: this.pageSize,
      }).then(res => {
        this.isLoading = false;
        this.tableDataArray = res.data.data;
        this.$emit('tableDataArray', this.tableDataArray)
        this.$emit('total', res.data.total)
@@ -209,8 +215,9 @@
        this.tableHeadFindData = []
        await this.TableHeadRend(); // 先执行 TableHeadRend()
        this.TableRend(); // TableHeadRend() 方法完成后再执行 TableRend()
        this.$emit('nodeClick', this.templateOids)
        this.$emit('nodeClickTemplateOids', this.templateOids)
        this.$emit("codeClassifyOid", this.nodeClickList.oid)
        this.$emit("nodeClickList", this.nodeClickList)
      } catch (error) {
        // 处理错误
        this.$message.error(error)