linwei
2024-01-06 1ba1b90dcde6dc3c82362ffd73a766c9b111e0e9
议事限制人员
6 files modified
366 ■■■■■ changed files
src/api/discuss/publicDiscuss.js 5 ●●●●● patch | view | raw | blame | history
src/views/article/components/discussionManageChild.vue 144 ●●●●● patch | view | raw | blame | history
src/views/article/components/publicSignUpChild.vue 90 ●●●● patch | view | raw | blame | history
src/views/article/discussionManage.vue 25 ●●●●● patch | view | raw | blame | history
src/views/article/publicSignUp.vue 61 ●●●● patch | view | raw | blame | history
src/views/userHouse/houseList.vue 41 ●●●●● patch | view | raw | blame | history
src/api/discuss/publicDiscuss.js
@@ -12,12 +12,12 @@
  })
}
export const getDetailPd = (id) => {
export const getDetailPd = (params) => {
  return request({
    url: '/api/public_discuss/publicDiscuss/detail',
    method: 'get',
    params: {
      id
      ...params,
    }
  })
}
@@ -47,4 +47,3 @@
    data: row
  })
}
src/views/article/components/discussionManageChild.vue
@@ -1,7 +1,7 @@
<template>
  <div>
    <el-dialog title="" append-to-body :visible.sync="dialogVisibles" width="80%" :before-close="handleClose">
    <el-dialog title="" append-to-body :visible.sync="dialogVisibles" width="60%" :before-close="handleClose">
      <avue-form ref="DisCussFrom" :option="option" v-model="disCussFrom" @submit="handleSubmit"></avue-form>
    </el-dialog>
  </div>
@@ -28,6 +28,13 @@
  import {
    getDictionary
  } from '@/api/system/dict'
  import {
    getList as getHouseholdList,
    getDetatils as getHouseholdDetail
  } from "@/api/userHouse/list/houseHold"
  export default {
    data() {
@@ -78,27 +85,24 @@
          searchMenuSpan: 3,
          menuWidth: 500,
          column: [{
              label: 'ID',
              prop: 'id',
              searchSpan: 4,
              display: false,
            },
            {
              label: '标题',
              prop: 'title',
              searchSpan: 4,
              span: 6,
            },
            {
              label: '参与人数',
              prop: 'topsCount',
              searchSpan: 4,
              display: false,
              span: 6,
            },
            {
              label: '开启投票',
              prop: 'openFlag',
              type: 'radio',
              button: true,
              span: 6,
              value: 0,
              dicData: [{
                label: '开启',
@@ -117,6 +121,7 @@
              prop: 'voteRestrictions',
              type: 'radio',
              button: true,
              span: 6,
              dicData: [{
                label: '一人一票',
                value: 0
@@ -135,6 +140,7 @@
              prop: 'signatureFlag',
              type: 'radio',
              button: true,
              span: 6,
              dicData: [{
                label: '不需要',
                value: 0
@@ -153,6 +159,7 @@
              prop: 'appointUser',
              type: 'radio',
              button: true,
              span: 6,
              dicData: [{
                label: '不限制',
                value: 0
@@ -168,7 +175,103 @@
              value: 0
            },
            {
              label: "选择用户",
              prop: "userIds",
              hide: true,
              // type: "table",
              display: false,
              span: 6,
              // labelWidth: 120,
              searchSpan: 4,
              search: true,
              children: {
                border: true,
                height: 400,
                searchShow: true,
                searchMenuSpan: 6,
                submitText: "确定",
                column: [{
                    label: "姓名",
                    prop: "name",
                    search: true,
                    searchSpan: 4,
                    rules: [{
                      required: true,
                      message: "请输入姓名",
                      trigger: "blur",
                    }, ],
                  },
                  {
                    label: "联系方式",
                    prop: "phoneNumber",
                    search: true,
                    searchSpan: 4,
                    rules: [{
                      required: true,
                      message: "请输入联系方式",
                      trigger: "blur",
                    }, ],
                  },
                  {
                    label: "地址",
                    search: true,
                    searchSpan: 8,
                    prop: "currentAddress",
                    display: false
                  },
                ],
              },
              page: {
                pageSize: 10,
                currentPage: 1,
                total: 0
              },
              formatter: (row) => {
                this.form.phoneNumber = row.phoneNumber
                return row.name
              },
              onLoad: ({
                page,
                value,
                data
              }, callback) => {
                //首次加载去查询对应的值
                if (value) {
                  getHouseholdDetail(value).then(res => {
                    var resData = res.data.data
                    // 查询对应行数据
                    callback(resData)
                    return
                  })
                }
                if (page) {
                  this.loading = true
                  var params = {
                    ...data,
                    townStreetCode: "361102005"
                  }
                  getHouseholdList(page.currentPage, page.pageSize, Object.assign(params)).then(res => {
                    const resData = res.data.data
                    var total = resData.total
                    var data = resData.records
                    this.loading = false
                    this.selectionClear()
                    //分页查询信息
                    callback({
                      total: total,
                      data: data
                    })
                  })
                }
              },
              props: {
                label: 'name',
                value: 'id'
              }
            },
            {
              label: "截止时间",
              span: 6,
              prop: "endTime",
              type: "datetime",
              format: "yyyy-MM-dd hh:mm:ss",
@@ -192,6 +295,32 @@
    },
    mounted() {
    },
    watch: {
      'disCussFrom.appointUser': {
        handler(newData) {
          const column = this.findObject(this.option.column, "userIds");
          if (newData == 1) {
            column.display = true
          } else {
            column.display = false
          }
        },
      },
      "disCussFrom.userIds": {
        // form是表单或者表格绑定的数据集,v-model='form'
        handler(val) {
          this.$nextTick(() => {
            console.log(this.$refs, 66666)
            // getHouseholdDetail(val).then(res => {
            //   const data = res.data.data
            //   this.form.phoneNumber = data.phoneNumber
            //   this.form.currentAddress = data.currentAddress
            // })
          })
        },
        immediate: true,
      },
    },
    computed: {
      ...mapGetters(["permission"]),
@@ -232,7 +361,6 @@
      handleClose() {
        this.dialogVisibles = false
        this.disCussFrom = {}
        this.$refs.DisCussFrom && this.$refs.DisCussFrom.resetForm()
        console.log(this.$refs, 90999)
src/views/article/components/publicSignUpChild.vue
@@ -1,12 +1,10 @@
<template>
    <basicContainer>
        <avue-crud :data="data" ref="crud" :table-loading="loading" @current-change="currentChange"
  <!-- <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 size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删 除
        </el-button> -->
                <el-button type="danger" size="small" plain icon="el-icon-delete" v-if="permission.user_delete"
                    @click="handleDelete">批量删除
                </el-button>
@@ -20,23 +18,22 @@
                    参与用户
                </el-button>
            </template>
        </avue-crud>
        </avue-crud> -->
        <el-dialog title="" append-to-body :visible.sync="dialogVisibles" width="50%" :before-close="handleClose">
  <!--  <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>
        </el-dialog> -->
  <div>
        <el-dialog title="" append-to-body :visible.sync="dialogVisiblesUser" width="50%" :before-close="userHandleClose">
            <!-- <span slot="title" class="dialog-footer">
        {{discussForm.ontitle}}
      </span> -->
            <avue-crud :data="dataUser" :page="pageUser" :option="option1" @on-load="getUser"></avue-crud>
      <avue-crud ref="DataUser" :option="option1" v-model="dataUser" :page="pageUser"></avue-crud>
        </el-dialog>
  </div>
    </basicContainer>
  <!-- </basicContainer> -->
</template>
<script>
@@ -104,60 +101,7 @@
                userIds: '',
                eventType: 1,
            },
            optionEnroll: {
                column: [{
                    label: "",
                    type: 'title',
                    prop: "title",
                    span: 24,
                    row: true,
                    offset: 2,
                    styles: {
                        fontSize: '24px'
                    }
                }, {
                    labelWidth: 100,
                    label: '开启',
                    prop: 'openFlag',
                    type: 'radio',
                    button: true,
                    row: true,
                    offset: 6,
                    dicData: [{
                        label: '开启',
                        value: 0
                    }, {
                        label: '不开启',
                        value: 1
                    }]
                },
                {
                    labelWidth: 100,
                    label: '开启投票',
                    prop: 'openFlag',
                    type: 'radio',
                    button: true,
                    row: true,
                    offset: 6,
                    dicData: [{
                        label: '开启',
                        value: 0
                    }, {
                        label: '不开启',
                        value: 1
                    }]
                },
                {
                    label: "截止时间",
                    row: true,
                    offset: 6,
                    prop: "endTime",
                    type: "datetime",
                    format: "yyyy-MM-dd hh:mm:ss",
                    valueFormat: "timestamp",
                },
                ]
            },
            dialogVisibles: false,
            dialogVisiblesUser: false,
            // 弹框标题
@@ -253,22 +197,30 @@
            this.houseCode = data.houseCode
            this.onLoad(this.page)
        },
        getUser (page, params = {}) {
      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()
          // this.selectionClear()
            })
        },
        userHandleClose () {
            this.dialogVisiblesUser = false
        this.dataUser = []
        // this.$refs.DataUser && this.$refs.DataUser.resetForm()
        // console.log(this.$refs, 90999)
        },
        openUser (row) {
            this.dialogVisiblesUser = true
            this.getUser(this.pageUser, params = {})
        let params = {
          articleId: row.id
        }
        this.getUser(this.pageUser, params)
        },
        openDilog (row, type) {
            this.dialogVisibles = true
            this.discussForm = row
src/views/article/discussionManage.vue
@@ -149,6 +149,7 @@
              prop: "articleList",
              span: 24,
              minRows: 2,
              tags: true,
              type: "tree",
              multiple: true,
              dicData: [],
@@ -205,6 +206,30 @@
              valueFormat: "yyyy-MM-dd HH:mm:ss",
            },
            {
              label: "发布状态",
              prop: "publish",
              searchSpan: 3,
              width: 80,
              value: "0",
              slot: true,
              search: true,
              type: "select",
              rules: [{
                required: true,
                message: "请选择发布状态",
                trigger: "blur",
              }, ],
              dicData: [{
                  label: "未发布",
                  value: "0",
                },
                {
                  label: "已发布",
                  value: "1",
                }
              ],
            },
            {
              span: 24,
              label: "评论区",
              prop: "iscomment",
src/views/article/publicSignUp.vue
@@ -10,10 +10,10 @@
      </template>
      <template slot-scope="{type,size,row }" slot="menu">
        <el-button icon="el-icon-circle-plus-outline" :size="size" :type="type" @click.stop="openDilog(row,0)">
        <el-button icon="el-icon-circle-plus-outline" :size="size" :type="type" @click.stop="openDilog(row)">
          公益报名
        </el-button>
        <el-button icon="el-icon-user" :size="size" :type="type" @click.stop="openUserPopup(row, 1)">
        <el-button icon="el-icon-user" :size="size" :type="type" @click.stop="openUserPopup(row)">
          参与用户
        </el-button>
        <el-button v-if="row.publish == '1'" icon="el-icon-close" :size="size" :type="type" @click.stop="updateFb(row)">
@@ -39,22 +39,14 @@
      </template>
    </avue-crud>
    <publicSignUpChild ref="publicSignUpChild"></publicSignUpChild>
    <el-dialog title="" append-to-body :visible.sync="dialogVisibles" width="50%" :before-close="handleClose">
      <span slot="title" class="dialog-footer">
        {{discussForm.ontitle}}
      </span>
      <!--  <div id="" v-if="discussForm.eventType == 1">
        <avue-form @submit="handleSubmit" :option="optionDiscuss" v-model="discussForm"></avue-form>
      </div> -->
      <div id="">
        <avue-form @submit="handleSubmit" :option="optionEnroll" v-model="discussForm">
        </avue-form>
      </div>
      <avue-form @submit="handleSubmit" :option="optionEnroll" v-model="discussForm"></avue-form>
    </el-dialog>
  </basic-container>
</template>
@@ -74,7 +66,7 @@
    removePd,
    updatePd,
    addPd,
    getNoticePd,
    getDetailPd,
    upcommentPd
  } from "@/api/discuss/publicDiscuss";
@@ -112,7 +104,7 @@
          voteNumberPublic: 0,
          appointUser: '',
          userIds: '',
          eventType: 1,
          eventType: 0,
        },
        dialogVisibles: false,
        form: {},
@@ -141,7 +133,7 @@
          excelBtn: true,
          dialogClickModal: false,
          column: [{
              label: "资讯标题",
              label: "文章标题",
              prop: "title",
              span: 24,
              row: true,
@@ -149,12 +141,12 @@
              search: true,
              rules: [{
                required: true,
                message: "请输入资讯标题",
                message: "请输入文章标题",
                trigger: "blur",
              }, ],
            },
            {
              label: "资讯封面",
              label: "文章封面",
              prop: "url",
              // align:'center',
              width: 80,
@@ -169,7 +161,7 @@
              span: 24,
            },
            {
              label: "资讯范围",
              label: "文章范围",
              prop: "articleList",
              span: 12,
              minRows: 2,
@@ -179,7 +171,7 @@
              dicData: [],
              rules: [{
                required: true,
                message: "请选择资讯范围",
                message: "请选择文章范围",
                trigger: "blur",
              }, ],
              props: {
@@ -189,7 +181,7 @@
              hide: true,
            },
            {
              label: "资讯类型",
              label: "文章类型",
              prop: "type",
              searchSpan: 3,
              width: 80,
@@ -199,7 +191,7 @@
              type: "select",
              rules: [{
                required: true,
                message: "请选择资讯类型",
                message: "请选择文章类型",
                trigger: "blur",
              }, ],
              dicData: [{
@@ -274,7 +266,7 @@
              ],
            },
            {
              label: "资讯内容",
              label: "文章内容",
              prop: "content",
              component: "AvueUeditor",
              options: {
@@ -349,8 +341,8 @@
              offset: 6,
              prop: "endTime",
              type: "datetime",
              format: "yyyy-MM-dd hh:mm:ss",
              valueFormat: "timestamp",
              format: "yyyy-MM-dd",
              valueFormat: "yyyy-MM-dd HH:mm:ss",
              rules: [{
                required: true,
                message: "请选截止时间",
@@ -406,16 +398,27 @@
    },
    methods: {
      openUserPopup(row) {
        this.$refs.publicSignUpChild.openUser(row)
      },
      openDilog(row, type) {
        this.dialogVisibles = true
        this.discussForm.eventType = type
        this.discussForm.articleId = row.id
        this.discussForm.title = row.title
        if (type == 0) {
          this.discussForm.ontitle = '公益报名'
        } else {
          this.discussForm.ontitle = '创建议题'
        }
        this.getpunlicDiscussDetail(row)
      },
      getpunlicDiscussDetail(row) {
        getDetailPd({
          articleId: row.id
        }).then((res) => {
          let data = res.data.data
          this.discussForm = data;
        });
      },
      handleSubmit(form, done) {
src/views/userHouse/houseList.vue
@@ -3,10 +3,10 @@
        <el-col :span="24">
            <basic-container>
                <avue-crud :option="option" :search.sync="search" :table-loading="loading" :data="data" ref="crud"
                    v-model="form" :permission="permissionList" @row-del="rowDel" @row-update="rowUpdate"
                    @row-save="rowSave" :before-open="beforeOpen" :page.sync="page" @search-change="searchChange"
                    @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
                    @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
          v-model="form" :permission="permissionList" @row-del="rowDel" @row-update="rowUpdate" @row-save="rowSave"
          :before-open="beforeOpen" :page.sync="page" @search-change="searchChange" @search-reset="searchReset"
          @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
          @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">删 除
@@ -19,11 +19,11 @@
                        </el-button>
                    </template>
                    <template slot-scope="scope" slot="menu">
                        <el-button type="text" icon="el-icon-circle-plus-outline" size="small"
                            v-if="permission.househould_manager" @click="handleHouseholdManager(scope.row)">住户管理
            <el-button type="text" icon="el-icon-circle-plus-outline" size="small" v-if="permission.househould_manager"
              @click="handleHouseholdManager(scope.row)">住户管理
                        </el-button>
                        <el-button type="text" icon="el-icon-circle-plus-outline" size="small"
                            v-if="permission.househould_manager" @click="manageLabel(scope.row)">标签
            <el-button type="text" icon="el-icon-circle-plus-outline" size="small" v-if="permission.househould_manager"
              @click="manageLabel(scope.row)">标签
                        </el-button>
                    </template>
@@ -52,8 +52,8 @@
                </avue-crud>
                <el-dialog title="用户角色配置" append-to-body :visible.sync="roleBox" width="345px">
                    <el-tree :data="roleGrantList" show-checkbox check-strictly default-expand-all node-key="id"
                        ref="treeRole" :default-checked-keys="roleTreeObj" :props="props">
          <el-tree :data="roleGrantList" show-checkbox check-strictly default-expand-all node-key="id" ref="treeRole"
            :default-checked-keys="roleTreeObj" :props="props">
                    </el-tree>
                    <span slot="footer" class="dialog-footer">
@@ -75,8 +75,7 @@
          </span> -->
                </el-dialog>
                <el-dialog :title="'编辑标签   ' + currentLabel.name" append-to-body :visible.sync="editLabelFlge"
                    width="655px">
        <el-dialog :title="'编辑标签   ' + currentLabel.name" append-to-body :visible.sync="editLabelFlge" width="655px">
                    <avue-form :option="labelOption" v-model="labelForm" :submit="onsubmit">
                    </avue-form>
                    <span slot="footer" class="dialog-footer">
@@ -211,8 +210,7 @@
                dialogType: 'drawer',
                dialogClickModal: false,
                menuWidth: 340,
                column: [
                    {
          column: [{
                        label: "房屋编号",
                        prop: "houseCode",
                        width: 180,
@@ -295,13 +293,11 @@
                            value: "id",
                        },
                        cascader: ["gridId"],
                        rules: [
                            {
              rules: [{
                                required: true,
                                message: "请选择所属社区",
                                trigger: "blur",
                            },
                        ],
              }, ],
                    },
                    {
@@ -329,15 +325,12 @@
                            label: "gridName",
                            value: "id",
                        },
                        dicUrl:
                            "/api/blade-grid/grid/getGridList?communityCode={{neiCode}}",
                        rules: [
                            {
              dicUrl: "/api/blade-grid/grid/getGridList?communityCode={{neiCode}}",
              rules: [{
                                required: true,
                                message: "请选择所属网格",
                                trigger: "blur",
                            },
                        ],
              }, ],
                    },
                    {