linwe
2023-11-25 547eb8b79ef5fd4b9322ade54a537845527913b9
src/views/article/publicSignUp.vue
@@ -32,7 +32,7 @@
      <!-- <span slot="title" class="dialog-footer">
        {{discussForm.ontitle}}
      </span> -->
      <avue-crud :data="data" :option="option1"></avue-crud>
      <avue-crud :data="dataUser" :page="pageUser" :option="option1" @on-load="getUser"></avue-crud>
    </el-dialog>
@@ -45,8 +45,11 @@
    getDetailPd,
    addPd,
    updatePd,
    removePd
    removePd,
  } from "@/api/discuss/publicDiscuss";
  import {
    getPageUser,
  } from "@/api/discuss/userPublicEnroll";
  import option from "@/option/discuss/publicDiscuss";
  import {
    mapGetters
@@ -204,14 +207,59 @@
          currentPage: 1,
          total: 0
        },
        // 分页信息
        pageUser: {
          pageSize: 10,
          pageSizes: [10, 20, 30, 50, 100],
          currentPage: 1,
          total: 0
        },
        // 表单数据
        form: {},
        // 选择行
        selectionList: [],
        // 表单配置
        option: option,
        option: {
          selection: true,
          height: "auto",
          calcHeight: 54,
          align: 'center',
          menuAlign: 'center',
          addBtn: false,
          editBtn: false,
          searchMenuSpan: 3,
          searchBtn: true,
          menuWidth: 500,
          column: [{
              label: 'ID',
              prop: 'id',
              searchSpan: 4,
              // search: true,
            },
            {
              label: '标题',
              prop: 'title',
              searchSpan: 4,
              search: true,
            },
            {
              label: '参与人数',
              prop: 'enrollCount',
              searchSpan: 4,
              search: true,
            },
            {
              label: '截止时间',
              prop: 'endTime',
              searchSpan: 4,
              search: true,
            }
          ]
        },
        // 表单列表
        data: [],
        dataUser: [],
      }
    },
    mounted() {
@@ -229,11 +277,21 @@
      }
    },
    methods: {
      getUser(page, params = {}) {
        getPageUser(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
          const data = res.data.data;
          this.pageUser.total = data.total;
          this.dataUser = data.records;
          this.loading = false;
          this.selectionClear();
        });
      },
      userHandleClose() {
        this.dialogVisiblesUser = false
      },
      openUser(row) {
        this.dialogVisiblesUser = true
        this.getUser(this.pageUser,params = {})
      },
      openDilog(row, type) {
        this.dialogVisibles = true