shuishen
2024-04-18 4522ab3fe8bd45ee753ef187448c1e884bbc601f
src/views/article/components/publicSignUpChild.vue
@@ -1,34 +1,8 @@
<template>
  <!-- <basicContainer> -->
  <!-- <avue-crud :data="data" ref="crud" :table-loading="loading" @current-change="currentChange"
            @search-change="searchChange" @search-reset="searchReset" @size-change="sizeChange" :option="option"
            v-model="data" :page="page" @selection-change="selectionChange" @row-del="rowDel"
            @refresh-change="refreshChange" @on-load="onLoad">
            <template slot="menuLeft">
                <el-button type="danger" size="small" plain icon="el-icon-delete" v-if="permission.user_delete"
                    @click="handleDelete">批量删除
                </el-button>
            </template>
            <template slot-scope="scope" slot="menu">
                <el-button type="text" icon="el-icon-s-custom" size="small" @click.stop="openDilog(scope.row, 0)">
                    编辑
                </el-button>
                <el-button type="primary" icon="el-icon-s-custom" size="small" @click.stop="openUser(scope.row, 0)">
                    参与用户
                </el-button>
            </template>
        </avue-crud> -->
  <!--  <el-dialog title="" append-to-body :visible.sync="dialogVisibles" width="50%" :before-close="handleClose">
            <avue-form @submit="handleSubmit" :option="optionEnroll" v-model="discussForm">
            </avue-form>
        </el-dialog> -->
  <div>
    <el-dialog title="" append-to-body :visible.sync="dialogVisiblesUser" width="50%" :before-close="userHandleClose">
      <avue-crud ref="DataUser" :option="option1" v-model="dataUser" :page="pageUser"></avue-crud>
    <el-dialog title="" append-to-body :visible.sync="dialogVisiblesUser" width="80%" :before-close="userHandleClose">
      <avue-crud ref="DataUser" :option="userOption" :data="dataUser" v-model="dataUser" :page="pageUser"
        @search-change="searchChange" @search-reset="searchReset"></avue-crud>
    </el-dialog>
  </div>
@@ -54,6 +28,8 @@
  import {
    getDictionary
  } from '@/api/system/dict'
  import website from '@/config/website'
  export default {
    data() {
@@ -135,41 +111,58 @@
        form: {},
        // 选择行
        selectionList: [],
        // 表单配置
        option: {
          selection: true,
        userOption: {
          labelWidth: 96,
          searchLabelWidth: 96,
          searchShow: true,
          searchMenuSpan: 3,
          // menuWidth: 500,
          menu: false,
          height: "auto",
          calcHeight: 54,
          align: 'center',
          menuAlign: 'center',
          addBtn: false,
          dialogWidth: 950,
          tip: false,
          border: true,
          //stripe:true,
          index: true,
          editBtn: false,
          searchMenuSpan: 3,
          searchBtn: true,
          menuWidth: 500,
          addBtn: false,
          viewBtn: false,
          selection: true,
          delBtn: false,
          excelBtn: true,
          dialogClickModal: false,
          header: false,
          column: [{
              label: 'ID',
              prop: 'id',
              searchSpan: 4,
              // search: true,
              label: '姓名',
              prop: 'name',
              search: true,
            }, {
              label: '头像',
              type: 'upload',
              listType: "picture-img",
              prop: 'avatar'
            },
            {
              label: '标题',
              prop: 'title',
              searchSpan: 4,
              search: true,
              label: '签名',
              type: 'upload',
              listType: "picture-img",
              prop: 'signaturePath'
            },
            {
              label: '参与人数',
              prop: 'enrollCount',
              searchSpan: 4,
              label: '手机',
              prop: 'phone',
              search: true,
            },
            {
              label: '截止时间',
              prop: 'endTime',
              searchSpan: 4,
              search: true,
            }, {
              label: '小区',
              prop: 'aoiName'
            }, {
              label: '地址',
              prop: 'addressName'
            }, {
              label: '时间',
              prop: 'createTime'
            }
          ]
        },
@@ -193,6 +186,17 @@
      }
    },
    methods: {
      searchReset() {
        this.query = {}
        this.getUser(this.userPage)
      },
      searchChange(params, done) {
        this.query = params
        this.userPage.currentPage = 1
        this.getUser(this.userPage, params)
        done()
      },
      init(data) {
        this.houseCode = data.houseCode
        this.onLoad(this.page)
@@ -202,6 +206,16 @@
          const data = res.data.data
          this.pageUser.total = data.total
          this.dataUser = data.records
          this.dataUser.forEach(item => {
            if (item.avatar) {
              item.avatar = website.minioUrl + item.avatar
              console.log("=avatar====>", item.avatar)
            }
            if (item.signaturePath && item.signaturePath.length > 0) {
              item.signaturePath = website.minioUrl + item.signaturePath
              console.log("=====>", item.signaturePath)
            }
          })
          this.loading = false
          // this.selectionClear()
        })