石广澎
2023-12-13 3c9c1a4f8ccbf765c35e44b21c790ef428e12868
admin-web/src/components/myTable/myTableV2.vue
@@ -33,7 +33,7 @@
          <el-button size="mini" type="default" @click="visible = false">取消</el-button>
          <el-button type="primary" size="mini" @click="_export_">确定</el-button>
        </div>
        <my-button v-if="myTable.tools.generalExport.show" slot="reference" site="tools" name="导出" />
        <my-button v-if="myTable.tools.generalExport.show" slot="reference" site="tools" name="导出" style="margin-bottom: 15px"/>
      </el-popover>
      <!--列控制-->
@@ -198,6 +198,7 @@
import mySwitch from '@/components/mySwitch/mySwitch'
import request from '@/utils/request'
import * as valid from '@/utils/validate'
export default {
  components: { myButton, mySwitch },
  props: {
@@ -251,6 +252,7 @@
      myTable: {
        url: '',
        params: {},
        autoLoad: true,
        border: false,
        showIndex: true, // 是否显示序号
        expand: true, // 是否显示详情数据
@@ -347,9 +349,11 @@
            total: 0
          })
        }
        this.$nextTick(() => {
          this.search({ pageNum: 1 })
        })
        if (this.myTable.autoLoad) {
          this.$nextTick(() => {
            this.search({pageNum: 1})
          })
        }
        this.myTable.columns.forEach((column, idx) => {
          if (!column.hidden) {
            this.checkColumns.push(idx)
@@ -365,7 +369,7 @@
       */
    search(param) {
      this.$nextTick(() => {
        // this.myTable.loading = true
        this.myTable.loading = true
        const params = Object.assign({}, this.filter)
        if(this.myTable.paging.show){
          params.pageSize = this.myTable.paging.page.pageSize
@@ -628,6 +632,8 @@
  color: #303133;
  font-weight: 700;
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}
.el-radio {
  margin-right: 10px;