田源
2024-03-22 f9b749d2ae804869b09d035de44ba1ce71214dc1
Source/ProjectWeb/src/components/dynamic-components/dynamic-table.vue
@@ -1,22 +1,23 @@
<template>
  <div class="UI-dynamic" :id="'UI-dynamic-'+areasName+componentVO.oid">
    <avue-crud v-model="form"
               ref="dataTable"
               :data="tableList"
               :option="option"
               :page.sync="page"
               :table-loading="loading">
      <!--top区域按钮-->
      <template slot="menuLeft" slot-scope="scope">
        <dynamic-button LocationType="top" type="table":butttonList="componentVO.buttons" ></dynamic-button>
      </template>
      <avue-crud v-model="form"
                 ref="dataTable"
                 :data="tableList"
                 :option="option"
                 :page.sync="page"
                 :table-loading="loading"
                 @selection-change="selectChange">
        <!--top区域按钮-->
        <template slot="menuLeft" slot-scope="scope">
          <dynamic-button LocationType="top" type="table":butttonList="componentVO.buttons" :selectList="selectList"></dynamic-button>
        </template>
      <!--menu区域按钮-->
      <template slot="menu" slot-scope="scope">
        <dynamic-button :scope="scope" LocationType="menu" type="table":butttonList="componentVO.buttons" ></dynamic-button>
      </template>
    </avue-crud>
  </div>
        <!--menu区域按钮-->
        <template slot="menu" slot-scope="scope">
          <dynamic-button :scope="scope" LocationType="menu" type="table":butttonList="componentVO.buttons" :selectList="selectList"></dynamic-button>
        </template>
      </avue-crud>
    </div>
</template>
<script>
@@ -48,6 +49,11 @@
      //所在区域是否已显示,针对tab和collapse
      type: Boolean,
      default: true
    },
    dataStore:{
      //弹窗时按钮所属区域选中数据
      type:Array,
      default: []
    },
  },
  data() {
@@ -462,12 +468,14 @@
        addBtn: false,
        editBtn: false,
        delBtn: false,
        selection:true,
        height: '100%',
        calcHeight: 15,
        indexFixed: false,
        menuFixed: false,
        column: [],
      },
      selectList:[]
    }
  },
  computed: {
@@ -520,6 +528,9 @@
    }
  },
  methods: {
    selectChange(row){
      this.selectList = row;
    }
  }
}
</script>