wangting
2024-04-11 101f111bdf888c799ceda8fb324b5ea97d5830de
Source/ProjectWeb/src/components/dynamic-components/dynamic-TreeTable.vue
@@ -5,6 +5,7 @@
               :data="TreeData"
               :option="option"
               :page.sync="pageType"
               @row-click="rowClickChange"
               @selection-change="TreeSelectChange">
      <template #icon="scope">
        <i :class="scope.row.icon"
@@ -367,6 +368,13 @@
          this.parentHeight = this.$el.clientHeight - this.$children[0].$children[1].$children[0].$el.clientHeight - this.$children[0].$children[2].$el.clientHeight - 5;
        }
      }
    },
    sourceData:{
      handler(newval) {
        //源数据有变化时变更当前区域数据
        console.log(this.areasName);
        console.log(newval);
      }
    }
  },
  mounted() {
@@ -377,12 +385,20 @@
  },
  computed: {
    pageType() {
      return this.areasName === 'westArea' ? this.simplePage : this.page;
      return this.areasName.indexOf('westArea') == 0  ? this.simplePage : this.page;
    }
  },
  methods: {
    rowClickChange(row){
      this.$refs.treeTable.toggleRowSelection(row);
    },
    TreeSelectChange(row) {
      this.TreeSelectList = row;
      this.$emit("setDataStore", {
        area: this.areasName,
        type:this.componentVO.uiComponentType,
        dataStore:row
      });
    },
  }
}