zhongrj
2024-01-06 bbff46e35d4314b95af6f0019773bc23f0e25c4b
Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/jczz_web
14 files modified
4195 ■■■■ changed files
src/views/article/components/discussionManageChild.vue 53 ●●●● patch | view | raw | blame | history
src/views/cGovernance/gridWorkLog.vue 18 ●●●● patch | view | raw | blame | history
src/views/community/index.vue 28 ●●●●● patch | view | raw | blame | history
src/views/district/index.vue 26 ●●●●● patch | view | raw | blame | history
src/views/grid/index.vue 47 ●●●●● patch | view | raw | blame | history
src/views/place/index.vue 131 ●●●●● patch | view | raw | blame | history
src/views/property/inviteTenders.vue 20 ●●●● patch | view | raw | blame | history
src/views/property/oiae.vue 1405 ●●●● patch | view | raw | blame | history
src/views/task/reportForRepairs.vue 4 ●●●● patch | view | raw | blame | history
src/views/userHouse/components/householdManager.vue 37 ●●●●● patch | view | raw | blame | history
src/views/userHouse/hireInfoList.vue 539 ●●●● patch | view | raw | blame | history
src/views/userHouse/houseHoldList.vue 62 ●●●●● patch | view | raw | blame | history
src/views/userHouse/houseList.vue 1454 ●●●● patch | view | raw | blame | history
src/views/work/start.vue 371 ●●●● patch | view | raw | blame | history
src/views/article/components/discussionManageChild.vue
@@ -1,11 +1,9 @@
<template>
  <div>
    <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>
</template>
<script>
@@ -178,7 +176,7 @@
              label: "选择用户",
              prop: "userIds",
              hide: true,
              // type: "table",
              type: "table",
              display: false,
              span: 6,
              // labelWidth: 120,
@@ -190,7 +188,13 @@
                searchShow: true,
                searchMenuSpan: 6,
                submitText: "确定",
                selection: true,
                column: [{
                    label: "社区",
                    prop: "neiName",
                    search: true,
                    searchSpan: 4,
                  }, {
                    label: "姓名",
                    prop: "name",
                    search: true,
@@ -202,15 +206,43 @@
                    }, ],
                  },
                  {
                    label: "联系方式",
                    prop: "phoneNumber",
                    label: "小区",
                    prop: "aoiCode",
                    searchSpan: 5,
                    type: 'tree',
                    search: true,
                    searchSpan: 4,
                    parent: false,
                    dicUrl: `/api/blade-district/district/getDistrictTree`,
                    props: {
                      label: "name",
                      value: "aoiCode"
                    },
                    // defaultExpandedKeys: ["361102003"],
                    span: 12,
                    labelWidth: 120,
                    width: 220,
                    // overHidden: true,
                    rules: [{
                      required: true,
                      message: "请输入联系方式",
                      message: "请选择小区",
                      trigger: "blur",
                    }, ],
                    // disabled: true
                    display: true,
                    hide: true,
                  },
                  {
                    label: "楼栋",
                    prop: "building",
                    search: true,
                    searchSpan: 4,
                  },
                  {
                    label: "单元",
                    prop: "unit",
                    search: true,
                    searchSpan: 4,
                  },
                  {
                    label: "地址",
@@ -227,7 +259,7 @@
                total: 0
              },
              formatter: (row) => {
                this.form.phoneNumber = row.phoneNumber
                // this.form.phoneNumber =  row.phoneNumber
                return row.name
              },
              onLoad: ({
@@ -248,14 +280,13 @@
                  this.loading = true
                  var params = {
                    ...data,
                    townStreetCode: "361102005"
                    // 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,
@@ -299,7 +330,7 @@
    watch: {
      'disCussFrom.appointUser': {
        handler(newData) {
          const column = this.findObject(this.option.column, "userIds");
          const column = this.findObject(this.option.column, "userIds")
          if (newData == 1) {
            column.display = true
          } else {
src/views/cGovernance/gridWorkLog.vue
@@ -204,7 +204,14 @@
                        props: {
                            label: 'name',
                            value: 'id'
                        }
                        },
                        rules: [
                            {
                                required: true,
                                message: "请选择被访人姓名",
                                trigger: "blur",
                            },
                        ],
                    },
                    {
                        width: 120,
@@ -262,7 +269,9 @@
                        label: "走访取证",
                        prop: "url",
                        type: "upload",
                        listType: "picture-img",
                        listType: "picture-card",
                        dataType: "string",
                        multiple: true,
                        action: "/api/blade-resource/oss/endpoint/put-file",
                        propsHttp: {
                            res: "data",
@@ -275,6 +284,7 @@
                    {
                        width: 110,
                        label: "录入人",
                        display: false,
                        prop: "createUserName",
                    },
@@ -316,9 +326,9 @@
            data: [],
        }
    },
    watch: {
    },
    watch: {},
    computed: {
        ...mapGetters(["permission", "userInfo"]),
        permissionList () {
src/views/community/index.vue
@@ -33,13 +33,15 @@
            selectionList: [],
            option: {
                labelWidth: 120,
                searchLabelWidth: 96,
                searchShow: true,
                searchMenuSpan: 3,
                menuWidth: 210,
                height: "auto",
                calcHeight: 54,
                dialogWidth: 950,
                tip: false,
                searchShow: true,
                searchMenuSpan: 3,
                menuWidth: 280,
                border: true,
                //stripe:true,
                index: true,
@@ -52,7 +54,7 @@
                        overHidden: true,
                        label: "社区名称",
                        prop: "name",
                        searchSpan: 5,
                        searchSpan: 4,
                        search: true,
                        span: 12,
                        rules: [
@@ -68,7 +70,7 @@
                        overHidden: true,
                        label: "社区编号",
                        prop: "code",
                        searchSpan: 5,
                        searchSpan: 4,
                        search: true,
                        span: 12,
                        rules: [
@@ -333,21 +335,9 @@
            this.onLoad(this.page, this.query)
        },
        onLoad (page, params = {}) {
            const { dateTime } = this.query
            let values = {
                ...params,
            }
            if (dateTime) {
                values = {
                    ...params,
                    startTime: dateTime[0],
                    endTime: dateTime[1],
                    ...this.query,
                }
                values.dateTime = null
            }
            this.loading = true
            getList(page.currentPage, page.pageSize, values).then((res) => {
            getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then((res) => {
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
src/views/district/index.vue
@@ -33,13 +33,15 @@
            selectionList: [],
            option: {
                labelWidth: 120,
                searchLabelWidth: 96,
                searchShow: true,
                searchMenuSpan: 3,
                menuWidth: 210,
                height: "auto",
                calcHeight: 54,
                dialogWidth: 950,
                tip: false,
                searchShow: true,
                searchMenuSpan: 3,
                menuWidth: 280,
                border: true,
                //stripe:true,
                index: true,
@@ -314,20 +316,11 @@
            this.onLoad(this.page, this.query)
        },
        onLoad (page, params = {}) {
            const { dateTime, communityCode } = this.query
            let values = {
                ...params,
            }
            this.loading = true
            if (dateTime) {
                values = {
                    ...params,
                    startTime: dateTime[0],
                    endTime: dateTime[1],
                    ...this.query,
                }
                values.dateTime = null
            }
            let values = Object.assign(params, this.query)
            const { communityCode } = this.query
            if (communityCode) {
                values = {
@@ -338,7 +331,6 @@
                delete values.communityCode
            }
            this.loading = true
            getList(page.currentPage, page.pageSize, values).then((res) => {
                const data = res.data.data
                this.page.total = data.total
src/views/grid/index.vue
@@ -19,6 +19,18 @@
// import website from '@/config/website'
export default {
    data () {
        //手机号格式校验
        let validatorPhone = function (rule, value, callback) {
            if (value) {
                if (!/^1[3456789]\d{9}$/.test(value)) {
                    callback(new Error('手机号格式有误!'))
                } else {
                    callback()
                }
            }
            callback()
        }
        return {
            form: {},
            query: {},
@@ -31,13 +43,16 @@
            datetime: "",
            selectionList: [],
            option: {
                labelWidth: 96,
                searchLabelWidth: 96,
                searchShow: true,
                searchMenuSpan: 3,
                menuWidth: 210,
                height: "auto",
                calcHeight: 54,
                dialogWidth: 950,
                tip: false,
                searchShow: true,
                searchMenuSpan: 3,
                menuWidth: 280,
                border: true,
                //stripe:true,
                index: true,
@@ -46,7 +61,6 @@
                dialogClickModal: false,
                column: [
                    {
                        width: 156,
                        overHidden: true,
                        label: "所属社区",
                        addDisplay: false,
@@ -84,7 +98,6 @@
                    },
                    {
                        width: 110,
                        overHidden: true,
                        label: "网格名称",
                        prop: "gridName",
@@ -98,7 +111,9 @@
                            },
                        ],
                    },
                    {
                        width: 110,
                        label: "负责人",
                        prop: "principal",
                        searchSpan: 4,
@@ -112,6 +127,7 @@
                        ],
                    },
                    {
                        width: 120,
                        label: "联系电话",
                        prop: "principalPhone",
                        searchSpan: 4,
@@ -122,6 +138,11 @@
                                message: "请输入联系电话",
                                trigger: "blur",
                            },
                            {
                                validator: validatorPhone,
                                trigger: 'blur'
                            }
                        ],
                    },
                    {
@@ -301,21 +322,9 @@
            this.onLoad(this.page, this.query)
        },
        onLoad (page, params = {}) {
            const { dateTime } = this.query
            let values = {
                ...params,
            }
            if (dateTime) {
                values = {
                    ...params,
                    startTime: dateTime[0],
                    endTime: dateTime[1],
                    ...this.query,
                }
                values.dateTime = null
            }
            this.loading = true
            getList(page.currentPage, page.pageSize, values).then((res) => {
            getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then((res) => {
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
src/views/place/index.vue
@@ -17,8 +17,18 @@
                <span v-text="decimalProcessing(row.lat)"></span>
            </template>
            <template slot-scope="{row}" slot="confirmFlag">
                <el-tag size="small" :type="showConfirmFlag(row.confirmFlag).type">{{ showConfirmFlag(row.confirmFlag).text
            <template slot-scope="{row, size}" slot="confirmFlag">
                <el-tag :size="size" :type="showConfirmFlag(row.confirmFlag).type">{{ showConfirmFlag(row.confirmFlag).text
                }}</el-tag>
            </template>
            <template slot-scope="{row, size}" slot="confirmFlag">
                <el-tag :size="size" :type="showConfirmFlag(row.confirmFlag).type">{{ showConfirmFlag(row.confirmFlag).text
                }}</el-tag>
            </template>
            <template slot-scope="{row, size}" slot="source">
                <el-tag :size="size" :type="showSource(row.source).type">{{ showSource(row.source).text
                }}</el-tag>
            </template>
@@ -27,13 +37,13 @@
                </el-button>
            </template>
            <template slot-scope="scope" slot="menu">
                <el-button type="text" :disabled="scope.row.confirmFlag == 2 || scope.row.confirmFlag != 4"
                    icon="el-icon-s-check" size="small" v-if="permission.place_audit_cur" @click="auditCur(scope.row)">审核
            <template slot-scope="{row, size}" slot="menu">
                <el-button :size="size" type="text" :disabled="row.confirmFlag == 2 || row.confirmFlag == 4"
                    icon="el-icon-s-check" v-if="permission.place_audit_cur" @click="auditCur(row)">审核
                </el-button>
                <el-button type="text" icon="el-icon-edit" size="small" v-if="permission.place_manage_tenants"
                    @click="ManageTenants(scope.row)">场所维护
                <el-button :size="size" type="text" icon="el-icon-edit" v-if="permission.place_manage_tenants"
                    @click="ManageTenants(row)">场所维护
                </el-button>
            </template>
        </avue-crud>
@@ -98,13 +108,16 @@
            datetime: "",
            selectionList: [],
            option: {
                labelWidth: 120,
                searchLabelWidth: 96,
                searchShow: true,
                searchMenuSpan: 3,
                menuWidth: 280,
                height: "auto",
                calcHeight: 54,
                dialogWidth: 950,
                tip: false,
                searchShow: true,
                searchMenuSpan: 3,
                menuWidth: 280,
                border: true,
                //stripe:true,
                index: true,
@@ -113,16 +126,15 @@
                selection: true,
                dialogClickModal: false,
                menuFixed: 'right',
                labelWidth: 120,
                column: [
                    {
                        width: 160,
                        span: 12,
                        width: 156,
                        overHidden: true,
                        label: "场所名称",
                        span: 12,
                        prop: "placeName",
                        searchSpan: 5,
                        search: true,
                        overHidden: true,
                        rules: [{
                            required: true,
                            message: "请输入场所名称",
@@ -166,11 +178,11 @@
                    },
                    {
                        width: 96,
                        searchLabelWidth: 120,
                        width: 110,
                        label: "场所负责人",
                        prop: "principal",
                        searchSpan: 5,
                        searchLabelWidth: 110,
                        search: true,
                        rules: [{
                            required: false,
@@ -180,13 +192,13 @@
                    },
                    {
                        width: 96,
                        width: 120,
                        overHidden: true,
                        label: "手机号码",
                        prop: "principalPhone",
                        search: true,
                        searchSpan: 4,
                        slot: true,
                        overHidden: true,
                        rules: [
                            {
                                validator: validatorPhone,
@@ -283,9 +295,9 @@
                        ],
                    },
                    {
                        width: 110,
                        label: "场所照片",
                        prop: "imageUrls",
                        width: 80,
                        type: "upload",
                        listType: "picture-card",
                        dataType: "string",
@@ -300,7 +312,7 @@
                    },
                    {
                        width: 160,
                        width: 156,
                        overHidden: true,
                        slot: true,
                        label: "位置",
@@ -339,6 +351,7 @@
                    },
                    {
                        width: 100,
                        addDisplay: false,
                        editDisplay: false,
                        viewDisplay: false,
@@ -346,16 +359,18 @@
                        prop: 'confirmFlag',
                        type: 'radio',
                        slot: true,
                        dicData: [{
                            label: '待审核',
                            value: 1
                        }, {
                            label: '已审核',
                            value: 2
                        }, {
                            label: '未通过',
                            value: 3
                        }]
                        dicData: [
                            {
                                label: '待审核',
                                value: 1
                            }, {
                                label: '已审核',
                                value: 2
                            }, {
                                label: '未通过',
                                value: 3
                            }
                        ]
                    },
                    {
                        width: 120,
@@ -366,13 +381,16 @@
                        type: "select",
                        search: true,
                        searchSpan: 5,
                        dicData: [{
                            label: '是',
                            value: 1
                        }, {
                            label: '否',
                            value: 2
                        }]
                        slot: true,
                        dicData: [
                            {
                                label: '是',
                                value: 1
                            }, {
                                label: '否',
                                value: 2
                            }
                        ]
                    }
                ],
            },
@@ -434,6 +452,29 @@
                } else if (data == 4) {
                    tags = {
                        text: '待完善',
                        type: 'info'
                    }
                }
                return tags
            }
        },
        showSource () {
            return (data) => {
                let tags = {
                    text: '',
                    type: ''
                }
                if (data == 1) {
                    tags = {
                        text: '是',
                        type: 'success'
                    }
                } else if (data == 2) {
                    tags = {
                        text: '否',
                        type: 'info'
                    }
                }
@@ -670,23 +711,9 @@
            this.onLoad(this.page, this.query)
        },
        onLoad (page, params = {}) {
            const { dateTime } = this.query
            let values = {
                ...params,
            }
            if (dateTime) {
                values = {
                    ...params,
                    startTime: dateTime[0],
                    endTime: dateTime[1],
                    ...this.query,
                }
                values.dateTime = null
            }
            this.loading = true
            getList(page.currentPage, page.pageSize, values).then((res) => {
            getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then((res) => {
                const data = res.data.data
                this.page.total = data.total
src/views/property/inviteTenders.vue
@@ -143,7 +143,7 @@
          excelBtn: true,
          dialogClickModal: false,
          column: [{
              label: "资讯标题",
              label: "招标标题",
              prop: "title",
              span: 24,
              row: true,
@@ -151,12 +151,12 @@
              search: true,
              rules: [{
                required: true,
                message: "请输入资讯标题",
                message: "请输入招标标题",
                trigger: "blur",
              }, ],
            },
            {
              label: "资讯封面",
              label: "招标封面",
              prop: "url",
              // align:'center',
              width: 80,
@@ -171,19 +171,19 @@
              span: 24,
            },
            // {
            //   label: "资讯来源",
            //   label: "招标来源",
            //   prop: "sourceName",
            //   search: true,
            //   searchSpan: 4,
            //   span: 24,
            //   rules: [{
            //     required: true,
            //     message: "请输入资讯类型",
            //     message: "请输入招标类型",
            //     trigger: "blur",
            //   }, ],
            // },
            {
              label: "资讯范围",
              label: "招标范围",
              prop: "articleList",
              span: 12,
              minRows: 2,
@@ -193,7 +193,7 @@
              dicData: [],
              rules: [{
                required: true,
                message: "请选择资讯范围",
                message: "请选择招标范围",
                trigger: "blur",
              }, ],
              props: {
@@ -203,7 +203,7 @@
              hide: true,
            },
            {
              label: "资讯类型",
              label: "招标类型",
              prop: "type",
              searchSpan: 3,
              width: 80,
@@ -213,7 +213,7 @@
              type: "select",
              rules: [{
                required: true,
                message: "请选择资讯类型",
                message: "请选择招标类型",
                trigger: "blur",
              }, ],
              dicData: [{
@@ -302,7 +302,7 @@
              },
            },
            {
              label: "资讯内容",
              label: "招标内容",
              prop: "content",
              component: "AvueUeditor",
              options: {
src/views/property/oiae.vue
@@ -1,766 +1,773 @@
<template>
  <basic-container>
    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
      v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
      @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 size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删 除
        </el-button>
        <!-- <el-button size="small" icon="el-icon-s-order" plain @click="kqcomment">开启评论
    <basic-container>
        <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
            v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave"
            :before-open="beforeOpen" @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 size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删
                    除
                </el-button>
                <!-- <el-button size="small" icon="el-icon-s-order" plain @click="kqcomment">开启评论
        </el-button>
        <el-button size="small" icon="el-icon-s-release" plain @click="gbcomment">关闭评论
        </el-button> -->
      </template>
            </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)">
            <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>
        <el-button icon="el-icon-circle-plus-outline" :size="size" :type="type" @click.stop="openDilog(row,1)">
          创建议题
        </el-button> -->
        <el-button v-if="row.publish == '1'" icon="el-icon-close" :size="size" :type="type" @click.stop="updateFb(row)">
          撤销
        </el-button>
        <el-button v-if="row.publish == '0'" icon="el-icon-check" :size="size" :type="type" @click.stop="updateFb(row)">
          发布
        </el-button>
      </template>
                <el-button v-if="row.publish == '1'" icon="el-icon-close" :size="size" :type="type"
                    @click.stop="updateFb(row)">
                    撤销
                </el-button>
                <el-button v-if="row.publish == '0'" icon="el-icon-check" :size="size" :type="type"
                    @click.stop="updateFb(row)">
                    发布
                </el-button>
            </template>
      <template slot-scope="{ row }" slot="publish">
        <el-tag>{{
          row.publish == "1" ? "已发布" : row.publish == "0" ? "未发布" : "未发布"
          }}
        </el-tag>
      </template>
            <template slot-scope="{ row }" slot="publish">
                <el-tag>{{
                    row.publish == "1" ? "已发布" : row.publish == "0" ? "未发布" : "未发布"
                }}
                </el-tag>
            </template>
      <template slot-scope="{ row }" slot="iscomment">
        <el-tag>{{
          row.iscomment == "1" ? "开启" : row.iscomment == "0" ? "关闭" : "关闭"
          }}
        </el-tag>
      </template>
    </avue-crud>
            <template slot-scope="{ row }" slot="iscomment">
                <el-tag>{{
                    row.iscomment == "1" ? "开启" : row.iscomment == "0" ? "关闭" : "关闭"
                }}
                </el-tag>
            </template>
        </avue-crud>
    <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>
        <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="" v-else>
        <avue-form @submit="handleSubmit" :option="optionEnroll" v-model="discussForm">
        </avue-form>
      </div>
    </el-dialog>
            <div id="" v-else>
                <avue-form @submit="handleSubmit" :option="optionEnroll" v-model="discussForm">
                </avue-form>
            </div>
        </el-dialog>
  </basic-container>
    </basic-container>
</template>
<script>
  import {
import {
    getList,
    remove,
    update,
    add,
    getNotice,
    upcomment
  } from "@/api/article/article";
} from "@/api/article/article"
  import {
import {
    getListPd,
    removePd,
    updatePd,
    addPd,
    getNoticePd,
    upcommentPd
  } from "@/api/discuss/publicDiscuss";
} from "@/api/discuss/publicDiscuss"
  import website from '@/config/website';
import website from '@/config/website'
  import {
import {
    getDistrictTree
  } from "@/api/district/index";
} from "@/api/district/index"
  import {
import {
    mapGetters
  } from "vuex";
} from "vuex"
  export default {
    data() {
      return {
        discussForm: {
          ontitle: '',
          title: '',
          openFlag: 0,
          numberRestrictions: 0,
          voteRestrictions: 0,
          userRestrictions: 0,
          endTime: '',
          articleId: '',
          createTime: '',
          updateTime: '',
          deleteFlag: '',
          repeatVote: 0,
          voteNumberPublic: 0,
          appointUser: '',
          userIds: '',
          eventType: 1,
        },
        dialogVisibles: false,
        form: {},
        query: {},
        loading: true,
        page: {
          pageSize: 10,
          currentPage: 1,
          total: 0,
        },
        datetime: "",
        selectionList: [],
        option: {
          height: "auto",
          calcHeight: 54,
          dialogWidth: 950,
          tip: false,
          searchShow: true,
          searchMenuSpan: 3,
          menuWidth: 450,
          border: false,
          //stripe:true,
          index: true,
          viewBtn: true,
          selection: true,
          excelBtn: true,
          dialogClickModal: false,
          column: [{
              label: "资讯标题",
              prop: "title",
              span: 24,
              row: true,
              searchSpan: 4,
              search: true,
              rules: [{
                required: true,
                message: "请输入资讯标题",
                trigger: "blur",
              }, ],
export default {
    data () {
        return {
            discussForm: {
                ontitle: '',
                title: '',
                openFlag: 0,
                numberRestrictions: 0,
                voteRestrictions: 0,
                userRestrictions: 0,
                endTime: '',
                articleId: '',
                createTime: '',
                updateTime: '',
                deleteFlag: '',
                repeatVote: 0,
                voteNumberPublic: 0,
                appointUser: '',
                userIds: '',
                eventType: 1,
            },
            {
              label: "资讯封面",
              prop: "url",
              // align:'center',
              width: 80,
              type: "upload",
              listType: "picture-img",
              action: "/api/blade-resource/oss/endpoint/put-file",
              propsHttp: {
                res: "data",
                url: "link",
              },
              // hide: true,
              span: 24,
            dialogVisibles: false,
            form: {},
            query: {},
            loading: true,
            page: {
                pageSize: 10,
                currentPage: 1,
                total: 0,
            },
            // {
            //   label: "资讯来源",
            //   prop: "sourceName",
            //   search: true,
            //   searchSpan: 4,
            //   span: 24,
            //   rules: [{
            //     required: true,
            //     message: "请输入资讯类型",
            //     trigger: "blur",
            //   }, ],
            // },
            {
              label: "资讯范围",
              prop: "articleList",
              span: 12,
              minRows: 2,
              type: "cascader",
              multiple: true,
              tags: true,
              dicData: [],
              rules: [{
                required: true,
                message: "请选择资讯范围",
                trigger: "blur",
              }, ],
              props: {
                label: "name",
                value: 'id'
              },
              hide: true,
            datetime: "",
            selectionList: [],
            option: {
                height: "auto",
                calcHeight: 54,
                dialogWidth: 950,
                tip: false,
                searchShow: true,
                searchMenuSpan: 3,
                menuWidth: 450,
                border: false,
                //stripe:true,
                index: true,
                viewBtn: true,
                selection: true,
                excelBtn: true,
                dialogClickModal: false,
                column: [
                    {
                        label: "收支标题",
                        prop: "title",
                        span: 24,
                        row: true,
                        searchSpan: 4,
                        search: true,
                        rules: [{
                            required: true,
                            message: "请输入收支标题",
                            trigger: "blur",
                        }],
                    },
                    {
                        label: "缩略图",
                        prop: "url",
                        // align:'center',
                        width: 80,
                        type: "upload",
                        listType: "picture-img",
                        action: "/api/blade-resource/oss/endpoint/put-file",
                        propsHttp: {
                            res: "data",
                            url: "link",
                        },
                        // hide: true,
                        span: 24,
                    },
                    // {
                    //   label: "收支来源",
                    //   prop: "sourceName",
                    //   search: true,
                    //   searchSpan: 4,
                    //   span: 24,
                    //   rules: [{
                    //     required: true,
                    //     message: "请输入收支类型",
                    //     trigger: "blur",
                    //   }, ],
                    // },
                    {
                        label: "收支范围",
                        prop: "articleList",
                        span: 12,
                        minRows: 2,
                        type: "cascader",
                        multiple: true,
                        tags: true,
                        dicData: [],
                        rules: [{
                            required: true,
                            message: "请选择收支范围",
                            trigger: "blur",
                        },],
                        props: {
                            label: "name",
                            value: 'id'
                        },
                        hide: true,
                    },
                    {
                        label: "收支类型",
                        prop: "type",
                        searchSpan: 3,
                        width: 80,
                        value: 1,
                        slot: true,
                        search: true,
                        type: "select",
                        rules: [{
                            required: true,
                            message: "请选择收支类型",
                            trigger: "blur",
                        },],
                        dicData: [{
                            label: "经营性收支",
                            value: 1,
                        }],
                    },
                    {
                        label: "发布时间",
                        prop: "dateTime",
                        type: "datetime",
                        format: "yyyy-MM-dd",
                        valueFormat: "yyyy-MM-dd",
                        searchSpan: 5,
                        searchRange: true,
                        hide: true,
                        addDisplay: false,
                        editDisplay: false,
                        viewDisplay: false,
                        search: true,
                        rules: [{
                            required: true,
                            message: "请选择发布时间",
                            trigger: "blur",
                        },],
                    },
                    {
                        label: "发布时间",
                        prop: "createTime",
                        type: "date",
                        format: "yyyy-MM-dd",
                        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",
                        }
                        ],
                    },
                    {
                        label: "评论区",
                        prop: "iscomment",
                        width: 80,
                        slot: true,
                        type: "select",
                        dicData: [{
                            label: "关闭",
                            value: "0",
                        },
                        {
                            label: "开启",
                            value: "1",
                        }
                        ],
                    },
                    {
                        label: "视频",
                        prop: "videoUrl",
                        type: "upload",
                        accept: "video/mp4",
                        display: false,
                        hide: true,
                        span: 24,
                        listType: "picture-img",
                        action: "/api/depl/put-depl",
                        propsHttp: {
                            url: "data",
                        },
                    },
                    {
                        label: "收支内容",
                        prop: "content",
                        component: "AvueUeditor",
                        options: {
                            action: "/api/blade-resource/oss/endpoint/put-file",
                            // customConfig: {
                            //   lineHeights: ['1', '1.15', '1.6', '2', '2.5', '3']
                            // },//wangEditor编辑的配置
                            props: {
                                res: "data",
                                url: "link",
                            },
                        },
                        hide: true,
                        minRows: 6,
                        span: 24,
                    },
                ],
            },
            {
              label: "资讯类型",
              prop: "type",
              searchSpan: 3,
              width: 80,
              value: 1,
              slot: true,
              search: true,
              type: "select",
              rules: [{
                required: true,
                message: "请选择资讯类型",
                trigger: "blur",
              }, ],
              dicData: [{
                label: "经营性收支",
                value: 1,
              }],
            data: [],
            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
                    }]
                },
                {
                    label: "截止时间",
                    row: true,
                    offset: 6,
                    prop: "endTime",
                    type: "datetime",
                    format: "yyyy-MM-dd hh:mm:ss",
                    valueFormat: "timestamp",
                },
                ]
            },
            {
              label: "发布时间",
              prop: "dateTime",
              type: "datetime",
              format: "yyyy-MM-dd",
              valueFormat: "yyyy-MM-dd",
              searchSpan: 5,
              searchRange: true,
              hide: true,
              addDisplay: false,
              editDisplay: false,
              viewDisplay: false,
              search: true,
              rules: [{
                required: true,
                message: "请选择发布时间",
                trigger: "blur",
              }, ],
            },
            {
              label: "发布时间",
              prop: "createTime",
              type: "date",
              format: "yyyy-MM-dd",
              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",
            optionDiscuss: {
                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: 'signatureFlag',
                    type: 'radio',
                    button: true,
                    row: true,
                    offset: 6,
                    dicData: [{
                        label: '开启',
                        value: 0
                    }, {
                        label: '不开启',
                        value: 1
                    }]
                },
                {
                  label: "已发布",
                  value: "1",
                }
              ],
            },
            {
              label: "评论区",
              prop: "iscomment",
              width: 80,
              slot: true,
              type: "select",
              dicData: [{
                  label: "关闭",
                  value: "0",
                    label: "截止时间",
                    row: true,
                    offset: 6,
                    prop: "endTime",
                    type: "datetime",
                    format: "yyyy-MM-dd hh:mm:ss",
                    valueFormat: "timestamp",
                },
                {
                  label: "开启",
                  value: "1",
                }
              ],
                ]
            },
            {
              label: "视频",
              prop: "videoUrl",
              type: "upload",
              accept: "video/mp4",
              display: false,
              hide: true,
              span: 24,
              listType: "picture-img",
              action: "/api/depl/put-depl",
              propsHttp: {
                url: "data",
              },
            },
            {
              label: "资讯内容",
              prop: "content",
              component: "AvueUeditor",
              options: {
                action: "/api/blade-resource/oss/endpoint/put-file",
                // customConfig: {
                //   lineHeights: ['1', '1.15', '1.6', '2', '2.5', '3']
                // },//wangEditor编辑的配置
                props: {
                  res: "data",
                  url: "link",
                },
              },
              hide: true,
              minRows: 6,
              span: 24,
            },
          ],
        },
        data: [],
        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
              }]
            },
            {
              label: "截止时间",
              row: true,
              offset: 6,
              prop: "endTime",
              type: "datetime",
              format: "yyyy-MM-dd hh:mm:ss",
              valueFormat: "timestamp",
            },
          ]
        },
        optionDiscuss: {
          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: 'signatureFlag',
              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",
            },
          ]
        },
        districtTree: [],
      };
            districtTree: [],
        }
    },
    watch: {
      "form.articleType": {
        handler(val) {
          if (val) {
            var videoUrl = this.findObject(this.option.column, "videoUrl");
            var content = this.findObject(this.option.column, "content");
            if (val.indexOf('ksp') != -1) {
              videoUrl.display = true;
              content.display = false;
              videoUrl.rules = [{
                required: false,
                message: "请选择视频",
                trigger: "blur",
              }, ];
            } else {
              videoUrl.display = false;
              content.display = true;
              videoUrl.rules = "";
            }
          }
        },
        immediate: true,
      }
        "form.articleType": {
            handler (val) {
                if (val) {
                    var videoUrl = this.findObject(this.option.column, "videoUrl")
                    var content = this.findObject(this.option.column, "content")
                    if (val.indexOf('ksp') != -1) {
                        videoUrl.display = true
                        content.display = false
                        videoUrl.rules = [{
                            required: false,
                            message: "请选择视频",
                            trigger: "blur",
                        },]
                    } else {
                        videoUrl.display = false
                        content.display = true
                        videoUrl.rules = ""
                    }
                }
            },
            immediate: true,
        }
    },
    computed: {
      ...mapGetters(["permission", "userInfo"]),
      permissionList() {
        return {
          addBtn: this.vaildData(this.permission.article_add, true),
          viewBtn: this.vaildData(this.permission.article_view, true),
          delBtn: this.vaildData(this.permission.article_delete, true),
          editBtn: this.vaildData(this.permission.article_edit, true),
        };
      },
      ids() {
        let ids = [];
        this.selectionList.forEach((ele) => {
          ids.push(ele.id);
        });
        return ids.join(",");
      },
        ...mapGetters(["permission", "userInfo"]),
        permissionList () {
            return {
                addBtn: this.vaildData(this.permission.article_add, true),
                viewBtn: this.vaildData(this.permission.article_view, true),
                delBtn: this.vaildData(this.permission.article_delete, true),
                editBtn: this.vaildData(this.permission.article_edit, true),
            }
        },
        ids () {
            let ids = []
            this.selectionList.forEach((ele) => {
                ids.push(ele.id)
            })
            return ids.join(",")
        },
    },
    methods: {
      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 = '创建议题'
        }
      },
      handleSubmit(form, done) {
        done();
        addPd(form).then(
          () => {
            this.$message({
              type: "success",
              message: "操作成功!",
            });
            this.dialogVisibles = false
            done();
          },
          (error) => {
            window.console.log(error);
            // loading();
          }
        );
      },
      handleClose(done) {
        done();
        // this.$confirm('确认关闭?')
        //   .then(_ => {
        //     done();
        //   })
        //   .catch(_ => {});
      },
      rowSave(row, done, loading) {
        if (row.videoUrl.length == 0) {
          row.videoUrl = "";
        }
        row.userid = this.userInfo.user_id;
        row.articleRange = JSON.stringify(row.articleList)
        if (row.url.length > 0) {
          var urls = []
          var split = row.url.split(",");
          split.forEach(url => {
            var names = url.split("jczz/");
            urls.push(names[1])
          })
          row.url = urls.join(",")
        }
        add(row).then(
          () => {
            this.onLoad(this.page);
            this.$message({
              type: "success",
              message: "操作成功!",
            });
            done();
          },
          (error) => {
            window.console.log(error);
            loading();
          }
        );
      },
      rowUpdate(row, index, done, loading) {
        row.articleRange = JSON.stringify(row.articleList)
        if (row.url.length > 0) {
          var urls = []
          var split = row.url.split(",");
          split.forEach(url => {
            var names = url.split("jczz/");
            urls.push(names[1])
          })
          row.url = urls.join(",")
        }
        update(row).then(
          () => {
            this.onLoad(this.page);
            this.$message({
              type: "success",
              message: "操作成功!",
            });
            done();
          },
          (error) => {
            window.console.log(error);
            loading();
          }
        );
      },
      rowDel(row) {
        this.$confirm("确定将选择数据删除?", {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning",
          })
          .then(() => {
            return remove(row.id);
          })
          .then(() => {
            this.onLoad(this.page);
            this.$message({
              type: "success",
              message: "操作成功!",
            });
          });
      },
      searchReset() {
        this.query = {};
        this.onLoad(this.page);
      },
      searchChange(params, done) {
        this.query = params;
        this.page.currentPage = 1;
        this.onLoad(this.page, params);
        done();
      },
      selectionChange(list) {
        this.selectionList = list;
      },
      selectionClear() {
        this.selectionList = [];
        this.$refs.crud.toggleSelection();
      },
      handleDelete() {
        if (this.selectionList.length === 0) {
          this.$message.warning("请选择至少一条数据");
          return;
        }
        this.$confirm("确定将选择数据删除?", {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning",
          })
          .then(() => {
            return remove(this.ids);
          })
          .then(() => {
            this.onLoad(this.page);
            this.$message({
              type: "success",
              message: "操作成功!",
            });
            this.$refs.crud.toggleSelection();
          });
      },
      beforeOpen(done, type) {
        if (["edit", "view"].includes(type)) {
          getNotice(this.form.id).then((res) => {
            let data = res.data.data
            if (data.url.length > 0) {
              var urls = []
              var names = data.url.split(",");
              names.forEach(name => {
                urls.push(website.minioUrl + name)
              })
              data.url = urls.join(",")
        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 = '创建议题'
            }
            data.articleList = JSON.parse(data.articleRange)
            this.form = data;
          });
        }
        // con
        done();
      },
      currentChange(currentPage) {
        this.page.currentPage = currentPage;
      },
      sizeChange(pageSize) {
        this.page.pageSize = pageSize;
      },
      refreshChange() {
        this.onLoad(this.page, this.query);
      },
      onLoad(page, params = {}) {
        const {
          dateTime
        } = this.query;
        let values = {
          ...params,
        };
        if (dateTime) {
          values = {
            ...params,
            startTime: dateTime[0],
            endTime: dateTime[1],
            ...this.query,
          };
          values.dateTime = null;
        }
        values.type = 1
        this.loading = true;
        getList(page.currentPage, page.pageSize, values).then((res) => {
          const data = res.data.data;
          this.page.total = data.total;
          this.data = data.records;
          this.data.forEach(item => {
            if (item.url.length > 0) {
              var urls = []
              var names = item.url.split(",");
              names.forEach(name => {
                urls.push(website.minioUrl + name)
              })
              item.url = urls.join(",")
        },
        handleSubmit (form, done) {
            done()
            addPd(form).then(
                () => {
                    this.$message({
                        type: "success",
                        message: "操作成功!",
                    })
                    this.dialogVisibles = false
                    done()
                },
                (error) => {
                    window.console.log(error)
                    // loading();
                }
            )
        },
        handleClose (done) {
            done()
            // this.$confirm('确认关闭?')
            //   .then(_ => {
            //     done();
            //   })
            //   .catch(_ => {});
        },
        rowSave (row, done, loading) {
            if (row.videoUrl.length == 0) {
                row.videoUrl = ""
            }
          })
          this.loading = false;
          this.selectionClear();
        });
        getDistrictTree(params = {}).then((res) => {
          const data = res.data.data;
          this.districtTree = data;
          const column = this.findObject(this.option.column, "articleList");
          column.dicData = res.data.data;
          this.loading = false;
        });
      },
      updateFb(row) {
        if (row.publish == "0") {
          row.publish = "1";
        } else {
          row.publish = "0";
            row.userid = this.userInfo.user_id
            row.articleRange = JSON.stringify(row.articleList)
            if (row.url.length > 0) {
                var urls = []
                var split = row.url.split(",")
                split.forEach(url => {
                    var names = url.split("jczz/")
                    urls.push(names[1])
                })
                row.url = urls.join(",")
            }
            add(row).then(
                () => {
                    this.onLoad(this.page)
                    this.$message({
                        type: "success",
                        message: "操作成功!",
                    })
                    done()
                },
                (error) => {
                    window.console.log(error)
                    loading()
                }
            )
        },
        rowUpdate (row, index, done, loading) {
            row.articleRange = JSON.stringify(row.articleList)
            if (row.url.length > 0) {
                var urls = []
                var split = row.url.split(",")
                split.forEach(url => {
                    var names = url.split("jczz/")
                    urls.push(names[1])
                })
                row.url = urls.join(",")
            }
            update(row).then(
                () => {
                    this.onLoad(this.page)
                    this.$message({
                        type: "success",
                        message: "操作成功!",
                    })
                    done()
                },
                (error) => {
                    window.console.log(error)
                    loading()
                }
            )
        },
        rowDel (row) {
            this.$confirm("确定将选择数据删除?", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning",
            })
                .then(() => {
                    return remove(row.id)
                })
                .then(() => {
                    this.onLoad(this.page)
                    this.$message({
                        type: "success",
                        message: "操作成功!",
                    })
                })
        },
        searchReset () {
            this.query = {}
            this.onLoad(this.page)
        },
        searchChange (params, done) {
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
        },
        selectionChange (list) {
            this.selectionList = list
        },
        selectionClear () {
            this.selectionList = []
            this.$refs.crud.toggleSelection()
        },
        handleDelete () {
            if (this.selectionList.length === 0) {
                this.$message.warning("请选择至少一条数据")
                return
            }
            this.$confirm("确定将选择数据删除?", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning",
            })
                .then(() => {
                    return remove(this.ids)
                })
                .then(() => {
                    this.onLoad(this.page)
                    this.$message({
                        type: "success",
                        message: "操作成功!",
                    })
                    this.$refs.crud.toggleSelection()
                })
        },
        beforeOpen (done, type) {
            if (["edit", "view"].includes(type)) {
                getNotice(this.form.id).then((res) => {
                    let data = res.data.data
                    if (data.url.length > 0) {
                        var urls = []
                        var names = data.url.split(",")
                        names.forEach(name => {
                            urls.push(website.minioUrl + name)
                        })
                        data.url = urls.join(",")
                    }
                    data.articleList = JSON.parse(data.articleRange)
                    this.form = data
                })
            }
            // con
            done()
        },
        currentChange (currentPage) {
            this.page.currentPage = currentPage
        },
        sizeChange (pageSize) {
            this.page.pageSize = pageSize
        },
        refreshChange () {
            this.onLoad(this.page, this.query)
        },
        onLoad (page, params = {}) {
            const {
                dateTime
            } = this.query
            let values = {
                ...params,
            }
            if (dateTime) {
                values = {
                    ...params,
                    startTime: dateTime[0],
                    endTime: dateTime[1],
                    ...this.query,
                }
                values.dateTime = null
            }
            values.type = 1
            this.loading = true
            getList(page.currentPage, page.pageSize, values).then((res) => {
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
                this.data.forEach(item => {
                    if (item.url.length > 0) {
                        var urls = []
                        var names = item.url.split(",")
                        names.forEach(name => {
                            urls.push(website.minioUrl + name)
                        })
                        item.url = urls.join(",")
                    }
                })
                this.loading = false
                this.selectionClear()
            })
            getDistrictTree(params = {}).then((res) => {
                const data = res.data.data
                this.districtTree = data
                const column = this.findObject(this.option.column, "articleList")
                column.dicData = res.data.data
                this.loading = false
            })
        },
        updateFb (row) {
            if (row.publish == "0") {
                row.publish = "1"
            } else {
                row.publish = "0"
            }
            if (row.url.length > 0) {
                var urls = []
                var split = row.url.split(",")
                split.forEach(url => {
                    var names = url.split("jczz/")
                    urls.push(names[1])
                })
                row.url = urls.join(",")
            }
            update(row).then(
                () => {
                    this.onLoad(this.page)
                    this.$message({
                        type: "success",
                        message: "操作成功!",
                    })
                    done()
                },
                (error) => {
                    window.console.log(error)
                    loading()
                }
            )
        },
        kqcomment () {
            if (this.selectionList.length === 0) {
                this.$message.warning("请选择至少一条数据")
                return
            }
            this.$confirm("确定将选择数据开启评论?", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning",
            }).then(() => {
                return upcomment(this.ids, "1")
            })
                .then(() => {
                    this.onLoad(this.page)
                    this.$message({
                        type: "success",
                        message: "操作成功!",
                    })
                    this.$refs.crud.toggleSelection()
                })
        },
        gbcomment () {
            if (this.selectionList.length === 0) {
                this.$message.warning("请选择至少一条数据")
                return
            }
            this.$confirm("确定将选择数据开启评论?", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning",
            }).then(() => {
                return upcomment(this.ids, "0")
            })
                .then(() => {
                    this.onLoad(this.page)
                    this.$message({
                        type: "success",
                        message: "操作成功!",
                    })
                    this.$refs.crud.toggleSelection()
                })
        }
        if (row.url.length > 0) {
          var urls = []
          var split = row.url.split(",");
          split.forEach(url => {
            var names = url.split("jczz/");
            urls.push(names[1])
          })
          row.url = urls.join(",")
        }
        update(row).then(
          () => {
            this.onLoad(this.page);
            this.$message({
              type: "success",
              message: "操作成功!",
            });
            done();
          },
          (error) => {
            window.console.log(error);
            loading();
          }
        );
      },
      kqcomment() {
        if (this.selectionList.length === 0) {
          this.$message.warning("请选择至少一条数据");
          return;
        }
        this.$confirm("确定将选择数据开启评论?", {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning",
          }).then(() => {
            return upcomment(this.ids, "1");
          })
          .then(() => {
            this.onLoad(this.page);
            this.$message({
              type: "success",
              message: "操作成功!",
            });
            this.$refs.crud.toggleSelection();
          });
      },
      gbcomment() {
        if (this.selectionList.length === 0) {
          this.$message.warning("请选择至少一条数据");
          return;
        }
        this.$confirm("确定将选择数据开启评论?", {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning",
          }).then(() => {
            return upcomment(this.ids, "0");
          })
          .then(() => {
            this.onLoad(this.page);
            this.$message({
              type: "success",
              message: "操作成功!",
            });
            this.$refs.crud.toggleSelection();
          });
      }
    },
  };
}
</script>
<style>
  .avue-upload__icon {
.avue-upload__icon {
    line-height: 6;
  }
}
</style>
src/views/task/reportForRepairs.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2023-12-14 17:10:00
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2024-01-05 18:00:15
 * @LastEditTime: 2024-01-06 15:01:25
 * @FilePath: \jczz_web\src\views\task\reportForRepairs.vue
 * @Description:
 *
@@ -246,7 +246,7 @@
                        overHidden: true
                    },
                    {
                        width: 120,
                        width: 100,
                        addDisplay: false,
                        editDisplay: false,
                        slot: true,
src/views/userHouse/components/householdManager.vue
@@ -12,18 +12,6 @@
                            @click="handleDelete">删 除
                        </el-button>
                    </template>
                    <template slot-scope="{row}" slot="tenantName">
                        <el-tag>{{ row.tenantName }}</el-tag>
                    </template>
                    <template slot-scope="{row}" slot="roleName">
                        <el-tag>{{ row.roleName }}</el-tag>
                    </template>
                    <template slot-scope="{row}" slot="deptName">
                        <el-tag>{{ row.deptName }}</el-tag>
                    </template>
                    <template slot-scope="{row}" slot="userTypeName">
                        <el-tag>{{ row.userTypeName }}</el-tag>
                    </template>
                </avue-crud>
            </basic-container>
        </el-col>
@@ -129,12 +117,15 @@
                total: 0
            },
            option: {
                labelWidth: 144,
                labelWidth: 120,
                searchLabelWidth: 96,
                searchShow: true,
                searchMenuSpan: 4,
                menuWidth: 210,
                height: 420,
                calcHeight: 80,
                tip: false,
                searchShow: true,
                searchMenuSpan: 6,
                border: true,
                index: true,
                selection: true,
@@ -164,11 +155,12 @@
                    },
                    {
                        width: 96,
                        width: 110,
                        label: "姓名",
                        prop: "name",
                        searchSpan: 4,
                        searchLabelWidth: 66,
                        search: true,
                        searchSpan: 3,
                        rules: [
                            {
                                required: true,
@@ -192,12 +184,12 @@
                    },
                    {
                        display: true,
                        width: 160,
                        display: true,
                        label: "身份证号",
                        prop: "idCard",
                        search: true,
                        searchSpan: 4,
                        searchSpan: 5,
                        slot: true,
                        rules: [
                            {
@@ -208,9 +200,9 @@
                    },
                    {
                        width: 160,
                        hide: true,
                        display: false,
                        width: 160,
                        label: "证件号码",
                        prop: "cardNo",
                    },
@@ -227,6 +219,7 @@
                    {
                        width: 60,
                        label: "性别",
                        prop: "gender",
                        type: "select",
@@ -251,7 +244,7 @@
                        label: "手机号码",
                        prop: "phoneNumber",
                        search: true,
                        searchSpan: 3,
                        searchSpan: 5,
                        slot: true,
                        rules: [
                            {
@@ -313,6 +306,7 @@
                    },
                    {
                        overHidden: true,
                        label: "地址",
                        prop: "address",
                        display: false
@@ -805,6 +799,7 @@
        onLoad (page, params = {}) {
            params['houseCode'] = this.houseCode
            this.loading = true
            getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
                const data = res.data.data
                this.page.total = data.total
src/views/userHouse/hireInfoList.vue
@@ -7,35 +7,28 @@
                    @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-scope="{row, size}" slot="auditStatus">
                        <el-tag :size="size" :type="showConfirmFlag(row.auditStatus).type">
                            {{ showConfirmFlag(row.auditStatus).text }}
                        </el-tag>
                    </template>
                    <template slot="menuLeft">
                        <el-button type="danger" size="small" plain icon="el-icon-delete"
                        <el-button type="danger" :size="size" plain icon="el-icon-delete"
                            v-if="permission.houseRental_delete" @click="handleDelete">删 除
                        </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="ManageTenants(scope.row)">管理租户
                    <template slot-scope="{row, size}" slot="menu">
                        <el-button :size="size" type="text" icon="el-icon-circle-plus-outline"
                            v-if="permission.househould_manager" @click="ManageTenants(row)">管理租户
                        </el-button>
                        <!--  <el-button type="success" size="small" plain icon="el-icon-upload2" @click="handleImport">导入
            </el-button>
            <el-button type="warning" size="small" plain icon="el-icon-download" @click="handleExport">导出
            </el-button> -->
                    </template>
                    <template slot-scope="{row}" slot="tenantName">
                        <el-tag>{{ row.tenantName }}</el-tag>
                    </template>
                    <template slot-scope="{row}" slot="roleName">
                        <el-tag>{{ row.roleName }}</el-tag>
                    </template>
                    <template slot-scope="{row}" slot="deptName">
                        <el-tag>{{ row.deptName }}</el-tag>
                    </template>
                    <template slot-scope="{row}" slot="userTypeName">
                        <el-tag>{{ row.userTypeName }}</el-tag>
                    </template>
                </avue-crud>
                <el-dialog title="租户管理" append-to-body :visible.sync="roleBox">
                    <avue-crud :option="houseHoldOption" :search.sync="search" :table-loading="loading" :data="houseHold"
@@ -50,7 +43,6 @@
                        <el-button type="primary" @click="submitRole">确 定</el-button>
                    </span>
                </el-dialog>
                <el-dialog title="用户数据导入" append-to-body :visible.sync="excelBox" width="555px">
                    <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
@@ -210,11 +202,15 @@
                ]
            },
            option: {
                labelWidth: 120,
                searchLabelWidth: 96,
                searchShow: true,
                searchMenuSpan: 3,
                menuWidth: 280,
                height: 'auto',
                calcHeight: 80,
                tip: false,
                searchShow: true,
                searchMenuSpan: 6,
                border: true,
                index: true,
                selection: true,
@@ -222,252 +218,257 @@
                addBtn: true,
                dialogType: 'drawer',
                dialogClickModal: false,
                menuWidth: 280,
                column: [{
                    label: "房屋",
                    prop: "address",
                    display: false
                },
                {
                    label: "房屋",
                    prop: "houseCode",
                    hide: true,
                    type: "table",
                    children: {
                        border: true,
                        height: 400,
                        searchShow: true,
                        searchMenuSpan: 6,
                        submitText: "确定",
                        column: [
                            {
                                width: 220,
                                overHidden: true,
                                label: '小区名称',
                                prop: "districtName",
                                search: true,
                                searchSpan: 4,
                                rules: [{
                                    required: true,
                                    message: "请输入小区名称",
                                    trigger: "blur",
                                },],
                            },
                            {
                                label: "地址",
                                prop: "address",
                                width: 180,
                                display: false
                            },
                            {
                                label: "手机",
                                prop: "phone",
                                rules: [{
                                    required: true,
                                    message: "请输入绑定手机",
                                    trigger: "blur",
                                },],
                            },
                column: [
                    {
                        label: "房屋",
                        prop: "address",
                        display: false
                    },
                    {
                        label: "房屋",
                        prop: "houseCode",
                        hide: true,
                        type: "table",
                        children: {
                            border: true,
                            height: 400,
                            searchShow: true,
                            searchMenuSpan: 6,
                            submitText: "确定",
                            column: [
                                {
                                    width: 220,
                                    overHidden: true,
                                    label: '小区名称',
                                    prop: "districtName",
                                    search: true,
                                    searchSpan: 4,
                                    rules: [{
                                        required: true,
                                        message: "请输入小区名称",
                                        trigger: "blur",
                                    },],
                                },
                                {
                                    label: "地址",
                                    prop: "address",
                                    width: 180,
                                    display: false
                                },
                                {
                                    label: "手机",
                                    prop: "phone",
                                    rules: [{
                                        required: true,
                                        message: "请输入绑定手机",
                                        trigger: "blur",
                                    },],
                                },
                            ],
                        },
                        page: {
                            pageSize: 10,
                            currentPage: 1,
                            total: 0
                        },
                        formatter: (row) => {
                            console.log(row, 888)
                            if (!row.districtName) return ''
                            return row.districtName + '-' + row.unit + row.building + row.room
                        },
                        onLoad: ({
                            page,
                            value,
                            data
                        }, callback) => {
                            //首次加载去查询对应的值
                            if (value) {
                                getHouseDetail({
                                    houseCode: value
                                }).then(res => {
                                    var resData = res.data.data
                                    // 查询对应行数据
                                    callback(resData)
                                    return
                                })
                            }
                            if (page) {
                                this.loading = true
                                getHouseList(page.currentPage, page.pageSize, Object.assign(data)).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: 'address',
                            value: 'houseCode'
                        }
                    },
                    {
                        label: "关系",
                        prop: "tenantRelationship",
                        search: true,
                        searchSpan: 3,
                        searchLabelWidth: 66,
                        width: 100,
                        type: "select",
                        dicData: [{
                            label: "同一户",
                            value: 1
                        },
                        {
                            label: "不同一户",
                            value: 2
                        }
                        ],
                        rules: [{
                            required: true,
                            message: "请选择关系",
                            trigger: "blur",
                        },],
                    },
                    {
                        label: "房屋状态",
                        prop: "houseStatus",
                        search: true,
                        searchSpan: 4,
                        width: 100,
                        type: "select",
                        dicData: [{
                            label: "部分出租",
                            value: 1
                        },
                        {
                            label: "全部出租",
                            value: 2
                        }
                        ],
                        rules: [{
                            required: true,
                            message: "请选择房屋状态",
                            trigger: "blur",
                        },],
                    },
                    {
                        label: "用途",
                        prop: "rentalUse",
                        type: "select",
                        searchSpan: 3,
                        searchLabelWidth: 66,
                        search: true,
                        dataType: "number",
                        width: 100,
                        dicUrl: "/api/blade-system/dict-biz/dictionary?code=rentalUseType",
                        props: {
                            label: "dictValue",
                            value: "dictKey",
                        },
                        rules: [{
                            required: true,
                            message: "请选择用途",
                            trigger: "blur",
                        },],
                    },
                    {
                        width: 100,
                        label: "租房时间",
                        prop: "rentalTime",
                        type: "date",
                        format: "yyyy-MM-dd",
                        valueFormat: "yyyy-MM-dd",
                        rules: [{
                            required: true,
                            message: "请选择租房时间",
                            trigger: "blur",
                        },],
                    },
                    {
                        label: "到期时间",
                        prop: "dueTime",
                        type: "date",
                        format: "yyyy-MM-dd",
                        valueFormat: "yyyy-MM-dd",
                        width: 100,
                        rules: [{
                            required: true,
                            message: "请选择到期时间",
                            trigger: "blur",
                        },],
                    },
                    {
                        label: "租赁期限",
                        prop: "dldType",
                        width: 100,
                        display: false,
                        search: true,
                        searchSpan: 4,
                        type: "select",
                        dicData: [{
                            label: "长期",
                            value: 1
                        },
                        {
                            label: "中期",
                            value: 2
                        },
                        {
                            label: "短期",
                            value: 3
                        }
                        ],
                    },
                    page: {
                        pageSize: 10,
                        currentPage: 1,
                        total: 0
                    },
                    formatter: (row) => {
                        console.log(row, 888)
                        if (!row.districtName) return ''
                        return row.districtName + '-' + row.unit + row.building + row.room
                    },
                    onLoad: ({
                        page,
                        value,
                        data
                    }, callback) => {
                        //首次加载去查询对应的值
                        if (value) {
                            getHouseDetail({
                                houseCode: value
                            }).then(res => {
                                var resData = res.data.data
                                // 查询对应行数据
                                callback(resData)
                                return
                            })
                        }
                        if (page) {
                            this.loading = true
                            getHouseList(page.currentPage, page.pageSize, Object.assign(data)).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: 'address',
                        value: 'houseCode'
                    }
                },
                {
                    label: "关系",
                    prop: "tenantRelationship",
                    search: true,
                    searchSpan: 4,
                    width: 100,
                    type: "select",
                    dicData: [{
                        label: "同一户",
                        value: 1
                    {
                        width: 80,
                        label: "审核状态",
                        prop: "auditStatus",
                        type: "select",
                        search: true,
                        searchSpan: 4,
                        display: false,
                        slot: true,
                        dicData: [
                            {
                                label: "已确认",
                                value: 1
                            },
                            {
                                label: "待确认",
                                value: 0
                            }
                        ],
                    },
                    {
                        label: "不同一户",
                        value: 2
                    }
                    ],
                    rules: [{
                        required: true,
                        message: "请选择关系",
                        trigger: "blur",
                    },],
                },
                {
                    label: "房屋状态",
                    prop: "houseStatus",
                    search: true,
                    searchSpan: 4,
                    width: 100,
                    type: "select",
                    dicData: [{
                        label: "部分出租",
                        value: 1
                        width: 144,
                        label: "创建时间",
                        prop: "createTime",
                        display: false,
                    },
                    {
                        label: "全部出租",
                        value: 2
                    }
                    ],
                    rules: [{
                        required: true,
                        message: "请选择房屋状态",
                        trigger: "blur",
                    },],
                },
                {
                    label: "用途",
                    prop: "rentalUse",
                    type: "select",
                    search: true,
                    searchSpan: 3,
                    dataType: "number",
                    width: 100,
                    dicUrl: "/api/blade-system/dict-biz/dictionary?code=rentalUseType",
                    props: {
                        label: "dictValue",
                        value: "dictKey",
                        label: "合同",
                        prop: "fileUrls",
                        // align:'center',
                        width: 80,
                        type: "upload",
                        listType: "picture-img",
                        action: "/api/blade-resource/oss/endpoint/put-file",
                        propsHttp: {
                            res: "data",
                            url: "link",
                        },
                        hide: true,
                        span: 24,
                    },
                    rules: [{
                        required: true,
                        message: "请选择用途",
                        trigger: "blur",
                    },],
                },
                {
                    label: "租房时间",
                    prop: "rentalTime",
                    type: "date",
                    format: "yyyy-MM-dd",
                    valueFormat: "yyyy-MM-dd",
                    width: 100,
                    rules: [{
                        required: true,
                        message: "请选择租房时间",
                        trigger: "blur",
                    },],
                },
                {
                    label: "到期时间",
                    prop: "dueTime",
                    type: "date",
                    format: "yyyy-MM-dd",
                    valueFormat: "yyyy-MM-dd",
                    width: 100,
                    rules: [{
                        required: true,
                        message: "请选择到期时间",
                        trigger: "blur",
                    },],
                },
                {
                    label: "租赁期限",
                    prop: "dldType",
                    width: 100,
                    display: false,
                    search: true,
                    searchSpan: 3,
                    type: "select",
                    dicData: [{
                        label: "长期",
                        value: 1
                    },
                    {
                        label: "中期",
                        value: 2
                    },
                    {
                        label: "短期",
                        value: 3
                    }
                    ],
                },
                {
                    label: "审核状态",
                    prop: "auditStatus",
                    type: "select",
                    width: 80,
                    search: true,
                    searchSpan: 4,
                    display: false,
                    dicData: [{
                        label: "已确认",
                        value: 1
                    },
                    {
                        label: "待确认",
                        value: 0
                    }
                    ],
                },
                {
                    label: "创建时间",
                    prop: "createTime",
                    display: false,
                    width: 160,
                },
                {
                    label: "合同",
                    prop: "fileUrls",
                    // align:'center',
                    width: 80,
                    type: "upload",
                    listType: "picture-img",
                    action: "/api/blade-resource/oss/endpoint/put-file",
                    propsHttp: {
                        res: "data",
                        url: "link",
                    },
                    hide: true,
                    span: 24,
                },
                ]
            },
            data: [],
@@ -531,6 +532,25 @@
                viewBtn: this.vaildData(this.permission.houseRental_view, true),
                delBtn: this.vaildData(this.permission.houseRental_delete, true),
                editBtn: this.vaildData(this.permission.houseRental_edit, true)
            }
        },
        showConfirmFlag () {
            return (data) => {
                let tags = {}
                if (data == 0) {
                    tags = {
                        type: 'warning',
                        text: '待处理'
                    }
                } else if (data == 1) {
                    tags = {
                        type: 'success',
                        text: '已处理'
                    }
                }
                return tags
            }
        }
    },
@@ -771,6 +791,7 @@
        },
        onLoad (page, params = {}) {
            this.loading = true
            getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
                const data = res.data.data
                this.page.total = data.total
src/views/userHouse/houseHoldList.vue
@@ -18,39 +18,24 @@
                            icon="el-icon-download" @click="handleExport">导出
                        </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="manageLabel(scope.row)">标签
                    <template slot-scope="{row, size}" slot="menu">
                        <el-button :size="size" type="text" icon="el-icon-circle-plus-outline"
                            v-if="permission.househould_manager" @click="manageLabel(row)">标签
                        </el-button>
                    </template>
                    <template slot-scope="{row}" slot="phoneNumber">
                        <el-button type="text" @click="showStringDispose(row, 'phoneNumberflag')">
                    <template slot-scope="{row, size}" slot="phoneNumber">
                        <el-button :size="size" type="text" @click="showStringDispose(row, 'phoneNumberflag')">
                            {{ textDispose(row, 'phoneNumberflag', 'phoneNumber') }}
                        </el-button>
                    </template>
                    <template slot-scope="{row}" slot="idCard">
                        <el-button type="text" @click="showStringDispose(row, 'idCardflag')"
                    <template slot-scope="{row, size}" slot="idCard">
                        <el-button :size="size" type="text" @click="showStringDispose(row, 'idCardflag')"
                            v-text="textDispose(row, 'idCardflag', 'idCard')"></el-button>
                    </template>
                    <template slot-scope="{row}" slot="householdLabelList">
                    <template slot-scope="{row, size}" slot="householdLabelList">
                        {{ labelDispose(row.householdLabelList) }}
                    </template>
                    <template slot-scope="{row}" slot="tenantName">
                        <el-tag>{{ row.tenantName }}</el-tag>
                    </template>
                    <template slot-scope="{row}" slot="roleName">
                        <el-tag>{{ row.roleName }}</el-tag>
                    </template>
                    <template slot-scope="{row}" slot="deptName">
                        <el-tag>{{ row.deptName }}</el-tag>
                    </template>
                    <template slot-scope="{row}" slot="userTypeName">
                        <el-tag>{{ row.userTypeName }}</el-tag>
                    </template>
                </avue-crud>
                <el-dialog title="用户角色配置" append-to-body :visible.sync="roleBox" width="345px" center>
@@ -59,8 +44,8 @@
                    </el-tree>
                    <span slot="footer" class="dialog-footer">
                        <el-button @click="roleBox = false">取 消</el-button>
                        <el-button type="primary" @click="submitRole">确 定</el-button>
                        <el-button size="small" @click="roleBox = false">取 消</el-button>
                        <el-button size="small" type="primary" @click="submitRole">确 定</el-button>
                    </span>
                </el-dialog>
@@ -92,16 +77,15 @@
                    <avue-form :option="labelOption" v-model="labelForm" :submit="onsubmit">
                    </avue-form>
                    <span slot="footer" class="dialog-footer">
                        <el-button @click="editLabelFlge = false">取 消</el-button>
                        <el-button type="primary" @click="onsubmit">确 定</el-button>
                        <el-button size="small" @click="editLabelFlge = false">取 消</el-button>
                        <el-button size="small" type="primary" @click="onsubmit">确 定</el-button>
                    </span>
                </el-dialog>
                <el-dialog title="用户数据导入" append-to-body :visible.sync="excelBox" width="555px">
                    <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
                        <template slot="excelTemplate">
                            <el-button type="primary" @click="handleTemplate">
                            <el-button size="small" type="primary" @click="handleTemplate">
                                点击下载<i class="el-icon-download el-icon--right"></i>
                            </el-button>
                        </template>
@@ -224,11 +208,14 @@
            },
            option: {
                labelWidth: 144,
                searchLabelWidth: 96,
                searchShow: true,
                searchMenuSpan: 3,
                menuWidth: 280,
                height: 'auto',
                calcHeight: 80,
                tip: false,
                searchShow: true,
                searchMenuSpan: 3,
                border: true,
                index: true,
                selection: true,
@@ -236,7 +223,6 @@
                addBtn: true,
                dialogType: 'drawer',
                dialogClickModal: false,
                menuWidth: 280,
                menuFixed: 'right',
                column: [
                    {
@@ -263,8 +249,9 @@
                        width: 110,
                        label: "姓名",
                        prop: "name",
                        search: true,
                        searchSpan: 3,
                        searchLabelWidth: 66,
                        search: true,
                        rules: [
                            {
                                required: true,
@@ -346,7 +333,7 @@
                        label: "手机号码",
                        prop: "phoneNumber",
                        search: true,
                        searchSpan: 3,
                        searchSpan: 4,
                        slot: true,
                        rules: [
                            {
@@ -455,7 +442,8 @@
                    },
                    {
                        width: 140,
                        width: 156,
                        overHidden: true,
                        label: "地址",
                        prop: "address",
                        display: false
@@ -543,6 +531,7 @@
                    {
                        width: 210,
                        overHidden: true,
                        label: "标签",
                        prop: "householdLabelList",
                        display: false
@@ -1083,6 +1072,7 @@
        onLoad (page, params = {}) {
            this.loading = true
            getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
                const data = {
                    ...res.data.data,
src/views/userHouse/houseList.vue
@@ -1,788 +1,810 @@
<template>
  <el-row>
    <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">
          <template slot="menuLeft">
            <el-button type="danger" size="small" plain icon="el-icon-delete" v-if="permission.user_delete"
              @click="handleDelete">删 除
            </el-button>
            <el-button type="success" size="small" plain v-if="userInfo.role_name.includes('admin')"
              icon="el-icon-upload2" @click="handleImport">导入
            </el-button>
            <el-button type="warning" size="small" plain v-if="userInfo.role_name.includes('admin')"
              icon="el-icon-download" @click="handleExport">导出
            </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>
            <el-button type="text" icon="el-icon-circle-plus-outline" size="small" v-if="permission.househould_manager"
              @click="manageLabel(scope.row)">标签
            </el-button>
          </template>
    <el-row>
        <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">
                    <template slot="menuLeft">
                        <el-button type="danger" size="small" plain icon="el-icon-delete" v-if="permission.user_delete"
                            @click="handleDelete">删 除
                        </el-button>
                        <el-button type="success" size="small" plain v-if="userInfo.role_name.includes('admin')"
                            icon="el-icon-upload2" @click="handleImport">导入
                        </el-button>
                        <el-button type="warning" size="small" plain v-if="userInfo.role_name.includes('admin')"
                            icon="el-icon-download" @click="handleExport">导出
                        </el-button>
                    </template>
          <template slot-scope="{row}" slot="tenantName">
            <el-tag>{{ row.tenantName }}</el-tag>
          </template>
          <template slot-scope="{row}" slot="roleName">
            <el-tag>{{ row.roleName }}</el-tag>
          </template>
          <template slot-scope="{row}" slot="deptName">
            <el-tag>{{ row.deptName }}</el-tag>
          </template>
          <template slot-scope="{row}" slot="userTypeName">
            <el-tag>{{ row.userTypeName }}</el-tag>
          </template>
                    <template slot-scope="{row, size}" slot="menu">
                        <el-button :size="size" type="text" icon="el-icon-circle-plus-outline"
                            v-if="permission.househould_manager" @click="handleHouseholdManager(row)">住户管理
                        </el-button>
                        <el-button :size="size" type="text" icon="el-icon-circle-plus-outline"
                            v-if="permission.househould_manager" @click="manageLabel(row)">标签
                        </el-button>
                    </template>
          <template slot-scope="{row}" slot="phone">
            <el-button type="text" @click="showStringDispose(row, 'phoneflag')">
              {{ textDispose(row, 'phoneflag', 'phone') }}
            </el-button>
          </template>
                    <template slot-scope="{row, size}" slot="phone">
                        <el-button :size="size" type="text" @click="showStringDispose(row, 'phoneflag')">
                            {{ textDispose(row, 'phoneflag', 'phone') }}
                        </el-button>
                    </template>
          <template slot-scope="{row}" slot="userHouseLabelVOList">
            {{ labelDispose(row.userHouseLabelVOList) }}
          </template>
        </avue-crud>
        <el-dialog title="用户角色配置" append-to-body :visible.sync="roleBox" width="345px">
                    <template slot-scope="{row}" slot="userHouseLabelVOList">
                        {{ labelDispose(row.userHouseLabelVOList) }}
                    </template>
                </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>
                    <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">
            <el-button @click="roleBox = false">取 消</el-button>
            <el-button type="primary" @click="submitRole">确 定</el-button>
          </span>
        </el-dialog>
                    <span slot="footer" class="dialog-footer">
                        <el-button size="small" @click="roleBox = false">取 消</el-button>
                        <el-button size="small" type="primary" @click="submitRole">确 定</el-button>
                    </span>
                </el-dialog>
        <el-dialog title="标签管理" append-to-body :visible.sync="labelFlag" center width="600px">
          <div id="" class="grid-container2">
            <div class="grid-item" :style="{ backgroundColor: item.color }" v-for="(item, index) in labelData"
              :key="index" @click="changLabel(item)">
              {{ item.name }}
            </div>
          </div>
          <!--  <span slot="footer" class="dialog-footer">
                <el-dialog title="标签管理" append-to-body :visible.sync="labelFlag" center width="600px">
                    <div id="" class="grid-container2">
                        <div class="grid-item" :style="{ backgroundColor: item.color }" v-for="(item, index) in labelData"
                            :key="index" @click="changLabel(item)">
                            {{ item.name }}
                        </div>
                    </div>
                    <!--  <span slot="footer" class="dialog-footer">
            <el-button @click="labelFlag = false">取 消</el-button>
            <el-button type="primary" @click="submitRole">确 定</el-button>
          </span> -->
        </el-dialog>
                </el-dialog>
        <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">
            <el-button @click="editLabelFlge = false">取 消</el-button>
            <el-button type="primary" @click="onsubmit">确 定</el-button>
          </span>
        </el-dialog>
                <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">
                        <el-button size="small" @click="editLabelFlge = false">取 消</el-button>
                        <el-button size="small" type="primary" @click="onsubmit">确 定</el-button>
                    </span>
                </el-dialog>
        <el-dialog title="用户数据导入" append-to-body :visible.sync="excelBox" width="555px">
          <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
            <template slot="excelTemplate">
              <el-button type="primary" @click="handleTemplate">
                点击下载<i class="el-icon-download el-icon--right"></i>
              </el-button>
            </template>
          </avue-form>
        </el-dialog>
                <el-dialog title="用户数据导入" append-to-body :visible.sync="excelBox" width="555px">
                    <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
                        <template slot="excelTemplate">
                            <el-button type="primary" @click="handleTemplate">
                                点击下载<i class="el-icon-download el-icon--right"></i>
                            </el-button>
                        </template>
                    </avue-form>
                </el-dialog>
        <el-dialog title="住户管理" append-to-body :visible.sync="householdManagerVisible" width="70%" height="60%">
          <householdManager ref="householdManager" />
        </el-dialog>
      </basic-container>
    </el-col>
  </el-row>
                <el-dialog title="住户管理" append-to-body :visible.sync="householdManagerVisible" width="70%" height="60%">
                    <householdManager ref="householdManager" />
                </el-dialog>
            </basic-container>
        </el-col>
    </el-row>
</template>
<script>
  import {
import {
    getList,
    remove,
    add,
    update,
    getDetatil,
    getDetatils
  } from "@/api/userHouse/list/house.js"
  import {
} from "@/api/userHouse/list/house.js"
import {
    removeHouseholdLabel,
    saveOrUpdateHouseholdLabel
  } from "@/api/userHouse/list/userHouseList.js"
  import {
} from "@/api/userHouse/list/userHouseList.js"
import {
    getLabelList,
  } from '@/api/label/label'
  import {
} from '@/api/label/label'
import {
    exportBlob
  } from "@/api/common"
  import {
} from "@/api/common"
import {
    mapGetters
  } from "vuex"
  import website from '@/config/website'
  import {
} from "vuex"
import website from '@/config/website'
import {
    getToken
  } from '@/util/auth'
  import {
} from '@/util/auth'
import {
    downloadXls
  } from "@/util/util"
  import {
} from "@/util/util"
import {
    dateNow
  } from "@/util/date"
  import NProgress from 'nprogress'
  import 'nprogress/nprogress.css'
  import func from "@/util/func"
  import householdManager from "./components/householdManager"
  import Qs from "qs"
  export default {
} from "@/util/date"
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
import func from "@/util/func"
import householdManager from "./components/householdManager"
import Qs from "qs"
export default {
    components: {
      householdManager
        householdManager
    },
    data() {
      return {
        labelData: [],
        labelForm: {},
        userHouseLabelVOList: [],
        currentLabel: {},
        labelOption: {
          submitBtn: false,
          emptyBtn: false,
          column: [{
            label: '级别',
            prop: 'color',
            type: 'radio',
            button: true,
            row: true,
            dicData: [{
              label: '撤销',
              value: '#EBEDF0'
            }, {
              label: '绿',
              value: '#30D17C'
            }, {
              label: '黄',
              value: '#FFB42B'
            }, {
              label: '红',
              value: '#EA1F1F'
            }],
            rules: [{
              required: true,
              message: "请选择",
              trigger: "blur"
            }]
          }, {
            row: true,
            label: '备注',
            prop: 'remark',
            type: 'input'
          }]
        },
        editLabelFlge: false,
        labelFlag: false,
        householdManagerVisible: false,
        form: {},
        search: {},
        excelBox: false,
        selectionList: [],
        query: {},
        loading: true,
        page: {
          pageSize: 10,
          currentPage: 1,
          total: 0
        },
        option: {
          height: 'auto',
          calcHeight: 80,
          tip: false,
          searchShow: true,
          searchMenuSpan: 3,
          border: true,
          index: true,
          selection: true,
          viewBtn: true,
          dialogType: 'drawer',
          dialogClickModal: false,
          menuWidth: 340,
          column: [{
              label: "房屋编号",
              prop: "houseCode",
              width: 180,
              hide: true,
              display: false
            },
            {
              label: "地址",
              prop: "address",
              width: 180,
              display: false
            },
    data () {
            {
              hide: true,
              parent: false,
              label: "小区名称",
              prop: "districtCode",
              type: 'tree',
              dicUrl: `/api/blade-district/district/getDistrictTree`,
              props: {
                label: "name",
                value: "id"
              },
              defaultExpandedKeys: ["361102003"],
              span: 12,
              width: 220,
              overHidden: true,
            },
        //手机号格式校验
        let validatorPhone = function (rule, value, callback) {
            if (value) {
                if (!/^1[3456789]\d{9}$/.test(value)) {
                    callback(new Error('手机号格式有误!'))
                } else {
                    callback()
                }
            }
            callback()
        }
            {
              width: 220,
              overHidden: true,
              label: '小区名称',
              parent: false,
              prop: "districtName",
              searchSpan: 4,
              display: false,
              search: true,
        return {
            labelData: [],
            labelForm: {},
            userHouseLabelVOList: [],
            currentLabel: {},
            labelOption: {
                submitBtn: false,
                emptyBtn: false,
                column: [{
                    label: '级别',
                    prop: 'color',
                    type: 'radio',
                    button: true,
                    row: true,
                    dicData: [{
                        label: '撤销',
                        value: '#EBEDF0'
                    }, {
                        label: '绿',
                        value: '#30D17C'
                    }, {
                        label: '黄',
                        value: '#FFB42B'
                    }, {
                        label: '红',
                        value: '#EA1F1F'
                    }],
                    rules: [{
                        required: true,
                        message: "请选择",
                        trigger: "blur"
                    }]
                }, {
                    row: true,
                    label: '备注',
                    prop: 'remark',
                    type: 'input'
                }]
            },
            editLabelFlge: false,
            labelFlag: false,
            householdManagerVisible: false,
            form: {},
            search: {},
            excelBox: false,
            selectionList: [],
            query: {},
            loading: true,
            page: {
                pageSize: 10,
                currentPage: 1,
                total: 0
            },
            option: {
                labelWidth: 120,
                searchLabelWidth: 96,
                searchShow: true,
                searchMenuSpan: 3,
                menuWidth: 350,
            {
              width: 110,
              label: "所属街道",
              addDisplay: false,
              editDisplay: false,
              viewDisplay: false,
              prop: "townStreetName",
              search: true,
              searchSpan: 4
            },
                height: 'auto',
                calcHeight: 80,
                tip: false,
                border: true,
                index: true,
                selection: true,
                viewBtn: true,
                dialogType: 'drawer',
                dialogClickModal: false,
                column: [
                    {
                        label: "房屋编号",
                        prop: "houseCode",
                        width: 180,
                        hide: true,
                        display: false
                    },
                    {
                        width: 156,
                        overHidden: true,
                        label: "地址",
                        prop: "address",
                        display: false
                    },
            {
              width: 156,
              overHidden: true,
              label: "所属社区",
              addDisplay: false,
              editDisplay: false,
              viewDisplay: false,
              prop: "neiName",
              search: true,
              searchSpan: 4,
              rules: [{
                required: true,
                message: "请选择所属社区",
                trigger: "blur",
              }],
            },
                    {
                        hide: true,
                        parent: false,
                        label: "小区名称",
                        prop: "districtCode",
                        type: 'tree',
                        dicUrl: `/api/blade-district/district/getDistrictTree`,
                        props: {
                            label: "name",
                            value: "id"
                        },
                        defaultExpandedKeys: ["361102003"],
                        span: 12,
                        width: 220,
                        overHidden: true,
                    },
            {
              hide: true,
              parent: false,
              label: "所属社区",
              prop: "neiCode",
              search: false,
              type: "tree",
              dicUrl: "/api/blade-system/region/tree",
              props: {
                label: "name",
                value: "id",
              },
              cascader: ["gridId"],
              rules: [{
                required: true,
                message: "请选择所属社区",
                trigger: "blur",
              }, ],
            },
                    {
                        width: 220,
                        overHidden: true,
                        label: '小区名称',
                        parent: false,
                        prop: "districtName",
                        searchSpan: 4,
                        display: false,
                        search: true,
                    },
            {
              width: 110,
              overHidden: true,
              label: "所属网格",
              addDisplay: false,
              editDisplay: false,
              viewDisplay: false,
              prop: "gridName",
              rules: [{
                required: true,
                message: "请选择所属网格",
                trigger: "blur",
              }],
            },
                    {
                        width: 110,
                        label: "所属街道",
                        addDisplay: false,
                        editDisplay: false,
                        viewDisplay: false,
                        prop: "townStreetName",
                        search: true,
                        searchSpan: 4
                    },
            {
              hide: true,
              label: "所属网格",
              prop: "gridId",
              type: "tree",
              cell: true,
              props: {
                label: "gridName",
                value: "id",
              },
              dicUrl: "/api/blade-grid/grid/getGridList?communityCode={{neiCode}}",
              rules: [{
                required: true,
                message: "请选择所属网格",
                trigger: "blur",
              }, ],
            },
                    {
                        width: 156,
                        overHidden: true,
                        label: "所属社区",
                        addDisplay: false,
                        editDisplay: false,
                        viewDisplay: false,
                        prop: "neiName",
                        search: true,
                        searchSpan: 4,
                        rules: [{
                            required: true,
                            message: "请选择所属社区",
                            trigger: "blur",
                        }],
                    },
            {
              label: "房屋照片",
              prop: "imageUrls",
              width: 80,
              type: "upload",
              listType: "picture-card",
              dataType: "string",
              multiple: true,
              action: "/api/blade-resource/oss/endpoint/put-file",
              propsHttp: {
                res: "data",
                name: 'name',
                url: "link",
              },
              span: 24,
            },
                    {
                        hide: true,
                        parent: false,
                        label: "所属社区",
                        prop: "neiCode",
                        search: false,
                        type: "tree",
                        dicUrl: "/api/blade-system/region/tree",
                        props: {
                            label: "name",
                            value: "id",
                        },
                        cascader: ["gridId"],
                        rules: [
                            {
                                required: true,
                                message: "请选择所属社区",
                                trigger: "blur",
                            },
                        ],
                    },
            {
              width: 110,
              label: "电话",
              prop: "phone",
              slot: true,
                    {
                        width: 110,
                        overHidden: true,
                        label: "所属网格",
                        addDisplay: false,
                        editDisplay: false,
                        viewDisplay: false,
                        prop: "gridName",
                        rules: [{
                            required: true,
                            message: "请选择所属网格",
                            trigger: "blur",
                        }],
                    },
                    {
                        hide: true,
                        label: "所属网格",
                        prop: "gridId",
                        type: "tree",
                        cell: true,
                        props: {
                            label: "gridName",
                            value: "id",
                        },
                        dicUrl:
                            "/api/blade-grid/grid/getGridList?communityCode={{neiCode}}",
                        rules: [
                            {
                                required: true,
                                message: "请选择所属网格",
                                trigger: "blur",
                            },
                        ],
                    },
                    {
                        label: "房屋照片",
                        prop: "imageUrls",
                        width: 110,
                        type: "upload",
                        listType: "picture-card",
                        dataType: "string",
                        multiple: true,
                        action: "/api/blade-resource/oss/endpoint/put-file",
                        propsHttp: {
                            res: "data",
                            name: 'name',
                            url: "link",
                        },
                        span: 24,
                    },
                    {
                        width: 120,
                        label: "电话",
                        prop: "phone",
                        slot: true,
                        rules: [
                            {
                                validator: validatorPhone,
                                trigger: 'blur'
                            }
                        ],
                    },
                    {
                        label: "幢",
                        prop: "building",
                    },
                    {
                        label: "单元",
                        prop: "unit",
                    },
                    {
                        label: "室",
                        prop: "room",
                    },
                    {
                        label: "楼层",
                        prop: "floor",
                        type: "number",
                        rules: [{
                            required: true,
                            message: "请输入楼层",
                            trigger: "blur",
                        },],
                    },
                    {
                        label: "面积",
                        prop: "area",
                        type: "number",
                    },
                    {
                        label: "物业费",
                        prop: "propertyPrice",
                        type: "number",
                    },
                    {
                        label: "服务到期",
                        prop: "serviceDue",
                        type: "datetime",
                        format: "yyyy-MM-dd",
                        valueFormat: "yyyy-MM-dd",
                    },
                    {
                        width: 210,
                        overHidden: true,
                        label: "标签",
                        prop: "userHouseLabelVOList",
                        display: false
                    },
                ]
            },
            {
              label: "幢",
              prop: "building",
            },
            {
              label: "单元",
              prop: "unit",
            },
            {
              label: "室",
              prop: "room",
            },
            {
              label: "楼层",
              prop: "floor",
              type: "number",
              rules: [{
                required: true,
                message: "请输入楼层",
                trigger: "blur",
              }, ],
            },
            {
              label: "面积",
              prop: "area",
              type: "number",
            },
            {
              label: "物业费",
              prop: "propertyPrice",
              type: "number",
            },
            {
              label: "服务到期",
              prop: "serviceDue",
              type: "datetime",
              format: "yyyy-MM-dd",
              valueFormat: "yyyy-MM-dd",
            },
            {
              width: 210,
              label: "标签",
              prop: "userHouseLabelVOList",
              display: false
            },
          ]
        },
        data: [],
        excelForm: {},
        excelOption: {
          submitBtn: false,
          emptyBtn: false,
          column: [{
              label: '模板上传',
              prop: 'excelFile',
              type: 'upload',
              drag: true,
              loadText: '模板上传中,请稍等',
              span: 24,
              propsHttp: {
                res: 'data'
              },
              tip: '请上传 .xls,.xlsx 标准格式文件',
              action: "/api/blade-system/user/import-user"
            },
            {
              label: "数据覆盖",
              prop: "isCovered",
              type: "switch",
              align: "center",
              width: 80,
              dicData: [{
                  label: "否",
                  value: 0
            data: [],
            excelForm: {},
            excelOption: {
                submitBtn: false,
                emptyBtn: false,
                column: [{
                    label: '模板上传',
                    prop: 'excelFile',
                    type: 'upload',
                    drag: true,
                    loadText: '模板上传中,请稍等',
                    span: 24,
                    propsHttp: {
                        res: 'data'
                    },
                    tip: '请上传 .xls,.xlsx 标准格式文件',
                    action: "/api/blade-system/user/import-user"
                },
                {
                  label: "是",
                  value: 1
                    label: "数据覆盖",
                    prop: "isCovered",
                    type: "switch",
                    align: "center",
                    width: 80,
                    dicData: [{
                        label: "否",
                        value: 0
                    },
                    {
                        label: "是",
                        value: 1
                    }
                    ],
                    value: 0,
                    slot: true,
                    rules: [{
                        required: true,
                        message: "请选择是否覆盖",
                        trigger: "blur"
                    }]
                },
                {
                    label: '模板下载',
                    prop: 'excelTemplate',
                    formslot: true,
                    span: 24,
                }
              ],
              value: 0,
              slot: true,
              rules: [{
                required: true,
                message: "请选择是否覆盖",
                trigger: "blur"
              }]
            },
            {
              label: '模板下载',
              prop: 'excelTemplate',
              formslot: true,
              span: 24,
                ]
            }
          ]
        }
      }
    },
    watch: {},
    computed: {
      ...mapGetters(["userInfo", "permission"]),
      permissionList() {
        return {
          addBtn: this.vaildData(this.permission.house_add, true),
          viewBtn: this.vaildData(this.permission.house_view, true),
          delBtn: this.vaildData(this.permission.house_delete, true),
          editBtn: this.vaildData(this.permission.house_edit, true)
        }
      },
      textDispose() {
        return (row, flag, type) => {
          if (row[flag] || row[type] == null) {
            return row[type]
          } else {
            if (type == 'idCard') {
              return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2")
            } else {
              return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2")
        ...mapGetters(["userInfo", "permission"]),
        permissionList () {
            return {
                addBtn: this.vaildData(this.permission.house_add, true),
                viewBtn: this.vaildData(this.permission.house_view, true),
                delBtn: this.vaildData(this.permission.house_delete, true),
                editBtn: this.vaildData(this.permission.house_edit, true)
            }
          }
        }
      },
        },
      labelDispose() {
        return (list) => {
          return list.map(item => item.labelName).join(',')
        textDispose () {
            return (row, flag, type) => {
                if (row[flag] || row[type] == null) {
                    return row[type]
                } else {
                    if (type == 'idCard') {
                        return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2")
                    } else {
                        return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2")
                    }
                }
            }
        },
        labelDispose () {
            return (list) => {
                return list.map(item => item.labelName).join(',')
            }
        }
      }
    },
    mounted() {},
    mounted () { },
    methods: {
      onsubmit() {
        if (this.labelForm.color === '#EBEDF0') {
          let params = {
            householdId: this.currentRow.id,
            labelId: this.currentLabel.id
          }
          removeHouseholdLabel(params).then(res => {
            this.$message({
              type: "success",
              message: "操作成功!"
            })
            this.editLabelFlge = false
            this.manageLabel(this.currentRow)
            this.loading = false
          })
        } else {
          this.labelForm.houseCode = this.currentRow.houseCode
          this.labelForm.householdId = this.currentRow.id
          this.labelForm.labelId = this.currentLabel.id
          this.labelForm.lableType = 2
          saveOrUpdateHouseholdLabel(this.labelForm).then(res => {
            this.$message({
              type: "success",
              message: "操作成功!"
            })
            this.editLabelFlge = false
            this.manageLabel(this.currentRow)
            this.loading = false
          })
        }
      },
      changLabel(item) {
        this.editLabelFlge = true
        this.currentLabel = item
        this.labelForm.color = item.color
        this.labelForm.remark = item.remark
      },
      manageLabel(item) {
        this.loading = true
        this.currentRow = item
        this.labelFlag = true
        let params = {
          parentId: 1001
        }
        // 查询标签
        getLabelList(Object.assign(params)).then(res => {
          const data = res.data.data
          // 查询详情
          getDetatils({
            houseCode: item.houseCode
          }).then(res => {
            if (res.data.data) {
              this.userHouseLabelVOList = res.data.data.userHouseLabelVOList
              this.loading = false
              // 将细类放到一起
              data.forEach(f => {
                if (this.userHouseLabelVOList.length > 0) {
                  this.userHouseLabelVOList.forEach(h => {
                    if (Number(f.id) == h.labelId) {
                      f['color'] = h.color
                      f['remark'] = h.remark
                    }
                  })
        onsubmit () {
            if (this.labelForm.color === '#EBEDF0') {
                let params = {
                    householdId: this.currentRow.id,
                    labelId: this.currentLabel.id
                }
              })
            }
            this.labelData = data
            this.loading = false
          })
        })
      },
      handleHouseholdManager(row) {
        var that = this
        this.householdManagerVisible = true
        this.$nextTick(() => {
          that.$refs.householdManager.init(row)
        })
      },
      rowSave(row, done, loading) {
        if (row.imageUrls.length > 0) {
          var urls = []
          var split = row.imageUrls.split(",")
          split.forEach(url => {
            var names = url.split("jczz/")
            urls.push(names[1])
          })
          row.imageUrls = urls.join(",")
        }
        add(row).then(() => {
          this.initFlag = false
          this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!"
          })
          done()
        }, error => {
          window.console.log(error)
          loading()
        })
      },
      rowUpdate(row, index, done, loading) {
        if (row.imageUrls.length > 0) {
          var urls = []
          var split = row.imageUrls.split(",")
          split.forEach(url => {
            var names = url.split("jczz/")
            urls.push(names[1])
          })
          row.imageUrls = urls.join(",")
        }
        update(row).then(() => {
          this.initFlag = false
          this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!"
          })
          done()
        }, error => {
          window.console.log(error)
          loading()
        })
      },
      rowDel(row) {
        this.$confirm("确定将选择数据删除?", {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning"
          })
          .then(() => {
            return remove(row.id)
          })
          .then(() => {
            this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!"
            })
          })
      },
      searchReset() {
        this.query = {}
        this.treeDeptId = ''
        this.onLoad(this.page)
      },
      searchChange(params, done) {
        this.query = params
        this.page.currentPage = 1
        this.onLoad(this.page, params)
        done()
      },
      selectionChange(list) {
        this.selectionList = list
      },
      selectionClear() {
        this.selectionList = []
        this.$refs.crud.toggleSelection()
      },
      handleDelete() {
        if (this.selectionList.length === 0) {
          this.$message.warning("请选择至少一条数据")
          return
        }
        this.$confirm("确定将选择数据删除?", {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning"
          })
          .then(() => {
            return remove(this.ids)
          })
          .then(() => {
            this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!"
            })
            this.$refs.crud.toggleSelection()
          })
      },
      handleImport() {
        this.excelBox = true
      },
      uploadAfter(res, done, loading, column) {
        window.console.log(column)
        this.excelBox = false
        this.refreshChange()
        done()
      },
      handleExport() {
        this.$confirm("是否导出房屋数据?", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(() => {
          NProgress.start()
          var data = {
            ...this.query
          }
          data = Qs.stringify(data)
          exportBlob(
            `/api/blade-house/house/export-house?${this.website.tokenHeader}=${getToken()}&` + data
          ).then(res => {
            downloadXls(res.data, `房屋数据表${dateNow()}.xlsx`)
            NProgress.done()
          })
        })
      },
      handleTemplate() {
        exportBlob(`/api/blade-system/user/export-template?${this.website.tokenHeader}=${getToken()}`).then(res => {
          downloadXls(res.data, "房屋数据模板.xlsx")
        })
      },
      beforeOpen(done, type) {
        if (["edit", "view"].includes(type)) {
          getDetatil({
            id: this.form.id
          }).then(res => {
            this.form = res.data.data
            if (this.form.imageUrls) {
              if (this.form.imageUrls.length > 0) {
                var urls = []
                var names = this.form.imageUrls.split(",")
                names.forEach(name => {
                  urls.push(website.minioUrl + name)
                removeHouseholdLabel(params).then(res => {
                    this.$message({
                        type: "success",
                        message: "操作成功!"
                    })
                    this.editLabelFlge = false
                    this.manageLabel(this.currentRow)
                    this.loading = false
                })
                this.form.imageUrls = urls.join(",")
              }
            } else {
                this.labelForm.houseCode = this.currentRow.houseCode
                this.labelForm.householdId = this.currentRow.id
                this.labelForm.labelId = this.currentLabel.id
                this.labelForm.lableType = 2
                saveOrUpdateHouseholdLabel(this.labelForm).then(res => {
                    this.$message({
                        type: "success",
                        message: "操作成功!"
                    })
                    this.editLabelFlge = false
                    this.manageLabel(this.currentRow)
                    this.loading = false
                })
            }
          })
        }
        this.initFlag = true
        done()
      },
      currentChange(currentPage) {
        this.page.currentPage = currentPage
      },
      sizeChange(pageSize) {
        this.page.pageSize = pageSize
      },
      refreshChange() {
        this.onLoad(this.page, this.query)
      },
      onLoad(page, params = {}) {
        this.loading = true
        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
          const data = {
            ...res.data.data,
            records: res.data.data.records.map(item => {
              if (item.imageUrls) {
                if (item.imageUrls.length > 0) {
                  var urls = []
                  var names = item.imageUrls.split(",")
                  names.forEach(name => {
                    urls.push(website.minioUrl + name)
                  })
                  item.imageUrls = urls.join(",")
                }
              }
        },
              return {
                ...item,
                'phoneflag': false,
              }
        changLabel (item) {
            this.editLabelFlge = true
            this.currentLabel = item
            this.labelForm.color = item.color
            this.labelForm.remark = item.remark
        },
        manageLabel (item) {
            this.loading = true
            this.currentRow = item
            this.labelFlag = true
            let params = {
                parentId: 1001
            }
            // 查询标签
            getLabelList(Object.assign(params)).then(res => {
                const data = res.data.data
                // 查询详情
                getDetatils({
                    houseCode: item.houseCode
                }).then(res => {
                    if (res.data.data) {
                        this.userHouseLabelVOList = res.data.data.userHouseLabelVOList
                        this.loading = false
                        // 将细类放到一起
                        data.forEach(f => {
                            if (this.userHouseLabelVOList.length > 0) {
                                this.userHouseLabelVOList.forEach(h => {
                                    if (Number(f.id) == h.labelId) {
                                        f['color'] = h.color
                                        f['remark'] = h.remark
                                    }
                                })
                            }
                        })
                    }
                    this.labelData = data
                    this.loading = false
                })
            })
          }
          this.page.total = data.total
          this.data = data.records
          this.loading = false
          this.selectionClear()
        })
      },
      showStringDispose(row, type) {
        row[type] = !row[type]
      }
        },
        handleHouseholdManager (row) {
            var that = this
            this.householdManagerVisible = true
            this.$nextTick(() => {
                that.$refs.householdManager.init(row)
            })
        },
        rowSave (row, done, loading) {
            if (row.imageUrls.length > 0) {
                var urls = []
                var split = row.imageUrls.split(",")
                split.forEach(url => {
                    var names = url.split("jczz/")
                    urls.push(names[1])
                })
                row.imageUrls = urls.join(",")
            }
            add(row).then(() => {
                this.initFlag = false
                this.onLoad(this.page)
                this.$message({
                    type: "success",
                    message: "操作成功!"
                })
                done()
            }, error => {
                window.console.log(error)
                loading()
            })
        },
        rowUpdate (row, index, done, loading) {
            if (row.imageUrls.length > 0) {
                var urls = []
                var split = row.imageUrls.split(",")
                split.forEach(url => {
                    var names = url.split("jczz/")
                    urls.push(names[1])
                })
                row.imageUrls = urls.join(",")
            }
            update(row).then(() => {
                this.initFlag = false
                this.onLoad(this.page)
                this.$message({
                    type: "success",
                    message: "操作成功!"
                })
                done()
            }, error => {
                window.console.log(error)
                loading()
            })
        },
        rowDel (row) {
            this.$confirm("确定将选择数据删除?", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning"
            })
                .then(() => {
                    return remove(row.id)
                })
                .then(() => {
                    this.onLoad(this.page)
                    this.$message({
                        type: "success",
                        message: "操作成功!"
                    })
                })
        },
        searchReset () {
            this.query = {}
            this.treeDeptId = ''
            this.onLoad(this.page)
        },
        searchChange (params, done) {
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
        },
        selectionChange (list) {
            this.selectionList = list
        },
        selectionClear () {
            this.selectionList = []
            this.$refs.crud.toggleSelection()
        },
        handleDelete () {
            if (this.selectionList.length === 0) {
                this.$message.warning("请选择至少一条数据")
                return
            }
            this.$confirm("确定将选择数据删除?", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning"
            })
                .then(() => {
                    return remove(this.ids)
                })
                .then(() => {
                    this.onLoad(this.page)
                    this.$message({
                        type: "success",
                        message: "操作成功!"
                    })
                    this.$refs.crud.toggleSelection()
                })
        },
        handleImport () {
            this.excelBox = true
        },
        uploadAfter (res, done, loading, column) {
            window.console.log(column)
            this.excelBox = false
            this.refreshChange()
            done()
        },
        handleExport () {
            this.$confirm("是否导出房屋数据?", "提示", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning"
            }).then(() => {
                NProgress.start()
                var data = {
                    ...this.query
                }
                data = Qs.stringify(data)
                exportBlob(
                    `/api/blade-house/house/export-house?${this.website.tokenHeader}=${getToken()}&` + data
                ).then(res => {
                    downloadXls(res.data, `房屋数据表${dateNow()}.xlsx`)
                    NProgress.done()
                })
            })
        },
        handleTemplate () {
            exportBlob(`/api/blade-system/user/export-template?${this.website.tokenHeader}=${getToken()}`).then(res => {
                downloadXls(res.data, "房屋数据模板.xlsx")
            })
        },
        beforeOpen (done, type) {
            if (["edit", "view"].includes(type)) {
                getDetatil({
                    id: this.form.id
                }).then(res => {
                    this.form = res.data.data
                    if (this.form.imageUrls) {
                        if (this.form.imageUrls.length > 0) {
                            var urls = []
                            var names = this.form.imageUrls.split(",")
                            names.forEach(name => {
                                urls.push(website.minioUrl + name)
                            })
                            this.form.imageUrls = urls.join(",")
                        }
                    }
                })
            }
            this.initFlag = true
            done()
        },
        currentChange (currentPage) {
            this.page.currentPage = currentPage
        },
        sizeChange (pageSize) {
            this.page.pageSize = pageSize
        },
        refreshChange () {
            this.onLoad(this.page, this.query)
        },
        onLoad (page, params = {}) {
            this.loading = true
            getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
                const data = {
                    ...res.data.data,
                    records: res.data.data.records.map(item => {
                        if (item.imageUrls) {
                            if (item.imageUrls.length > 0) {
                                var urls = []
                                var names = item.imageUrls.split(",")
                                names.forEach(name => {
                                    urls.push(website.minioUrl + name)
                                })
                                item.imageUrls = urls.join(",")
                            }
                        }
                        return {
                            ...item,
                            'phoneflag': false,
                        }
                    })
                }
                this.page.total = data.total
                this.data = data.records
                this.loading = false
                this.selectionClear()
            })
        },
        showStringDispose (row, type) {
            row[type] = !row[type]
        }
    }
  }
}
</script>
<style>
  .box {
.box {
    height: 800px;
  }
}
  .el-scrollbar {
.el-scrollbar {
    height: 100%;
  }
}
  .box .el-scrollbar__wrap {
.box .el-scrollbar__wrap {
    overflow: scroll;
  }
}
</style>
src/views/work/start.vue
@@ -1,203 +1,208 @@
<template>
  <basic-container>
    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" v-model="form" ref="crud"
      @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-radio-group v-model="mode" size="small">
          <el-radio-button label="1">通用流程</el-radio-button>
          <el-radio-button label="2">定制流程</el-radio-button>
        </el-radio-group>
      </template>
      <template slot-scope="scope" slot="menu">
        <el-button type="text" size="small" icon="el-icon-video-play" v-if="permission.work_start_flow"
          @click.stop="handleStart(scope.row)">发起
        </el-button>
        <el-button type="text" size="small" icon="el-icon-search" v-if="permission.work_start_image"
          @click.stop="handleImage(scope.row, scope.index)">流程图
        </el-button>
      </template>
      <template slot-scope="{row}" slot="tenantId">
        <el-tag>{{ row.tenantId === '' ? '通用' : row.tenantId }}</el-tag>
      </template>
      <template slot-scope="{row}" slot="version">
        <el-tag>v{{ row.version }}</el-tag>
      </template>
      <template slot-scope="{row}" slot="suspensionState">
        <el-tag>{{ row.suspensionState === 1 ? '激活' : '挂起' }}</el-tag>
      </template>
      <template slot-scope="{row}" slot="category">
        <el-tag>{{ row.categoryName }}</el-tag>
      </template>
    </avue-crud>
    <flow-design is-dialog :is-display.sync="flowBox" :process-definition-id="processDefinitionId"></flow-design>
  </basic-container>
    <basic-container>
        <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" v-model="form" ref="crud"
            @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-radio-group v-model="mode" size="small">
                    <el-radio-button label="1">通用流程</el-radio-button>
                    <el-radio-button label="2">定制流程</el-radio-button>
                </el-radio-group>
            </template>
            <template slot-scope="scope" slot="menu">
                <el-button type="text" size="small" icon="el-icon-video-play" v-if="permission.work_start_flow"
                    @click.stop="handleStart(scope.row)">发起
                </el-button>
                <el-button type="text" size="small" icon="el-icon-search" v-if="permission.work_start_image"
                    @click.stop="handleImage(scope.row, scope.index)">流程图
                </el-button>
            </template>
            <template slot-scope="{row, size}" slot="tenantId">
                <el-tag :size="size">{{ row.tenantId === '' ? '通用' : row.tenantId }}</el-tag>
            </template>
            <template slot-scope="{row, size}" slot="version">
                <el-tag :size="size">v{{ row.version }}</el-tag>
            </template>
            <template slot-scope="{row, size}" slot="suspensionState">
                <el-tag :size="size" :type="row.suspensionState === 1 ? 'success' : 'info'">{{ row.suspensionState === 1 ?
                    '激活' : '挂起'
                }}</el-tag>
            </template>
            <template slot-scope="{row, size}" slot="category">
                <el-tag :size="size">{{ row.categoryName }}</el-tag>
            </template>
        </avue-crud>
        <flow-design is-dialog :is-display.sync="flowBox" :process-definition-id="processDefinitionId"></flow-design>
    </basic-container>
</template>
<script>
  import {
import {
    mapGetters
  } from "vuex"
  import {
} from "vuex"
import {
    startList
  } from "@/api/work/work"
  import {
} from "@/api/work/work"
import {
    flowCategory,
    flowRoute
  } from "@/util/flow"
} from "@/util/flow"
  export default {
    data() {
      return {
        form: {},
        mode: '1',
        selectionId: '',
        selectionList: [],
        query: {},
        loading: true,
        page: {
          pageSize: 10,
          currentPage: 1,
          total: 0
        },
        processDefinitionId: '',
        flowBox: false,
        workBox: false,
        option: {
          height: 'auto',
          calcHeight: 30,
          tip: false,
          searchShow: true,
          searchMenuSpan: 6,
          border: true,
          index: true,
          selection: true,
          editBtn: false,
          addBtn: false,
          viewBtn: false,
          delBtn: false,
          menuWidth: 280,
          dialogWidth: 900,
          dialogClickModal: false,
          column: [{
              label: '租户编号',
              prop: 'tenantId',
              slot: true,
              width: 120,
export default {
    data () {
        return {
            form: {},
            mode: '1',
            selectionId: '',
            selectionList: [],
            query: {},
            loading: true,
            page: {
                pageSize: 10,
                currentPage: 1,
                total: 0
            },
            {
              label: "流程分类",
              type: "select",
              row: true,
              dicUrl: "/api/blade-system/dict/dictionary?code=flow",
              props: {
                label: "dictValue",
                value: "dictKey"
              },
              dataType: "number",
              slot: true,
              prop: "category",
              search: true,
              width: 100,
            processDefinitionId: '',
            flowBox: false,
            workBox: false,
            option: {
                searchLabelWidth: 96,
                searchShow: true,
                searchMenuSpan: 3,
                menuWidth: 140,
                height: 'auto',
                calcHeight: 30,
                tip: false,
                border: true,
                index: true,
                selection: true,
                editBtn: false,
                addBtn: false,
                viewBtn: false,
                delBtn: false,
                dialogWidth: 900,
                dialogClickModal: false,
                column: [
                    {
                        width: 120,
                        label: '租户编号',
                        prop: 'tenantId',
                        slot: true,
                    },
                    {
                        width: 120,
                        label: "流程分类",
                        type: "select",
                        row: true,
                        dicUrl: "/api/blade-system/dict/dictionary?code=flow",
                        props: {
                            label: "dictValue",
                            value: "dictKey"
                        },
                        dataType: "number",
                        slot: true,
                        prop: "category",
                        search: true,
                    },
                    {
                        label: '流程标识',
                        prop: 'key',
                    },
                    {
                        label: '流程名称',
                        prop: 'name',
                        search: true,
                    },
                    {
                        label: '流程版本',
                        prop: 'version',
                        slot: true,
                        width: 80,
                    },
                    {
                        label: '状态',
                        prop: 'suspensionState',
                        slot: true,
                        width: 80,
                    },
                    {
                        label: '部署时间',
                        prop: 'deploymentTime',
                        width: 165,
                    },
                ]
            },
            {
              label: '流程标识',
              prop: 'key',
            },
            {
              label: '流程名称',
              prop: 'name',
              search: true,
            },
            {
              label: '流程版本',
              prop: 'version',
              slot: true,
              width: 80,
            },
            {
              label: '状态',
              prop: 'suspensionState',
              slot: true,
              width: 80,
            },
            {
              label: '部署时间',
              prop: 'deploymentTime',
              width: 165,
            },
          ]
        },
        data: []
      }
            data: []
        }
    },
    watch: {
      'mode'() {
        this.onLoad(this.page)
      }
        'mode' () {
            this.onLoad(this.page)
        }
    },
    computed: {
      ...mapGetters(["permission", "flowRoutes"]),
      ids() {
        let ids = []
        this.selectionList.forEach(ele => {
          ids.push(ele.id)
        })
        return ids.join(",")
      },
        ...mapGetters(["permission", "flowRoutes"]),
        ids () {
            let ids = []
            this.selectionList.forEach(ele => {
                ids.push(ele.id)
            })
            return ids.join(",")
        },
    },
    methods: {
      searchReset() {
        this.query = {}
        this.onLoad(this.page)
      },
      searchChange(params, done) {
        this.query = params
        this.page.currentPage = 1
        this.onLoad(this.page, params)
        done()
      },
      selectionChange(list) {
        this.selectionList = list
      },
      selectionClear() {
        this.selectionList = []
        this.$refs.crud.toggleSelection()
      },
      handleStart(row) {
        // console.log("+++++++++++++++++" + `/work/process/${flowRoute(this.flowRoutes, row.category)}/form/${row.id}`)
        this.$router.push({
          path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/form/${row.id}`
        })
      },
      handleImage(row) {
        this.processDefinitionId = row.id
        this.flowBox = true
      },
      currentChange(currentPage) {
        this.page.currentPage = currentPage
      },
      sizeChange(pageSize) {
        this.page.pageSize = pageSize
      },
      refreshChange() {
        this.onLoad(this.page, this.query)
      },
      onLoad(page, params = {}) {
        const query = {
          ...this.query,
          category: (params.category) ? flowCategory(params.category) : null,
          mode: this.mode
        searchReset () {
            this.query = {}
            this.onLoad(this.page)
        },
        searchChange (params, done) {
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
        },
        selectionChange (list) {
            this.selectionList = list
        },
        selectionClear () {
            this.selectionList = []
            this.$refs.crud.toggleSelection()
        },
        handleStart (row) {
            // console.log("+++++++++++++++++" + `/work/process/${flowRoute(this.flowRoutes, row.category)}/form/${row.id}`)
            this.$router.push({
                path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/form/${row.id}`
            })
        },
        handleImage (row) {
            this.processDefinitionId = row.id
            this.flowBox = true
        },
        currentChange (currentPage) {
            this.page.currentPage = currentPage
        },
        sizeChange (pageSize) {
            this.page.pageSize = pageSize
        },
        refreshChange () {
            this.onLoad(this.page, this.query)
        },
        onLoad (page, params = {}) {
            const query = {
                ...this.query,
                category: (params.category) ? flowCategory(params.category) : null,
                mode: this.mode
            }
            this.loading = true
            startList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => {
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
                this.loading = false
                this.selectionClear()
            })
        }
        this.loading = true
        startList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => {
          const data = res.data.data
          this.page.total = data.total
          this.data = data.records
          this.loading = false
          this.selectionClear()
        })
      }
    }
  }
}
</script>