shuishen
2023-12-29 249129ba5080a9e0713dd7cbb205ef9e7e19e474
字段显示调整
6 files modified
1 files added
1433 ■■■■■ changed files
src/api/place/place.js 10 ●●●●● patch | view | raw | blame | history
src/styles/avue-ui.scss 6 ●●●●● patch | view | raw | blame | history
src/views/place/components/auditBase.vue 128 ●●●●● patch | view | raw | blame | history
src/views/place/index.vue 99 ●●●●● patch | view | raw | blame | history
src/views/userHouse/components/householdManager.vue 1079 ●●●● patch | view | raw | blame | history
src/views/userHouse/houseHoldList.vue 110 ●●●● patch | view | raw | blame | history
src/views/userHouse/houseList.vue 1 ●●●● patch | view | raw | blame | history
src/api/place/place.js
@@ -95,6 +95,7 @@
    },
  });
};
export const updatePlaceExt = (row) => {
  return request({
    url: "/api/blade-placeExt/placeExt/update",
@@ -102,3 +103,12 @@
    data: row,
  });
};
export const setCheckPlaceExt = (data) => {
    return request({
      url: "/api//blade-placeExt/placeExt/checkPlaceExt",
      method: "post",
      data
    });
  };
src/styles/avue-ui.scss
@@ -37,4 +37,10 @@
            }
        }
    }
}
.audit-info-box {
    .el-dialog {
        height: auto !important;
    }
}
src/views/place/components/auditBase.vue
New file
@@ -0,0 +1,128 @@
<template>
    <div class="cur-container-box">
        <div class="content-box">
            审核当前项
        </div>
        <div class="footer-btn-box">
            <el-button type="primary" size="small" @click="auditPass">通 过</el-button>
            <el-button size="small" @click="auditTurnDown">驳 回</el-button>
        </div>
        <el-dialog append-to-body :visible.sync="auditTurnDownPopup" width="30%" :close-on-click-modal="false"
            @close="popupClose" :show-close="false">
            <avue-form ref="replyForm" :option="option" v-model="form" @submit="handleSubmit" @reset-change="handleReset">
            </avue-form>
        </el-dialog>
    </div>
</template>
<script>
import {
    setCheckPlaceExt
} from "@/api/place/place"
export default {
    inject: ["placeElement"],
    data () {
        return {
            auditTurnDownPopup: false,
            form: {},
            option: {
                submitBtn: true,
                submitText: '确定',
                emptyBtn: true,
                emptyText: '取消',
                column: [
                    {
                        span: 24,
                        label: "驳回原因",
                        prop: "confirmNotion",
                        type: 'textarea',
                        minRows: 3,
                        maxRows: 5,
                        rules: [{
                            required: true,
                            message: "请输入驳回原因",
                            trigger: "blur",
                        }],
                    }
                ]
            },
        }
    },
    methods: {
        popupClose () {
            this.$refs.replyForm && this.$refs.replyForm.resetForm()
        },
        auditPass () {
            setCheckPlaceExt({
                confirmFlag: 2,
                id: this.placeElement.curAuditRow.placeExtId
            }).then(() => {
                this.placeElement.auditBasePopup = false
                this.$message({
                    type: "success",
                    message: "操作成功!",
                })
                this.placeElement.onLoad(this.placeElement.page)
            })
        },
        auditTurnDown () {
            this.placeElement.auditBasePopup = false
            this.auditTurnDownPopup = true
        },
        handleSubmit (form, done) {
            setCheckPlaceExt({
                confirmFlag: 3,
                id: this.placeElement.curAuditRow.placeExtId,
                confirmNotion: form.confirmNotion
            }).then(() => {
                this.auditTurnDownPopup = false
                this.$message({
                    type: "success",
                    message: "操作成功!",
                })
                this.placeElement.onLoad(this.placeElement.page)
                done()
            })
        },
        handleReset () {
            this.auditTurnDownPopup = false
        }
    }
}
</script>
<style lang="scss" scoped>
.cur-container-box {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
    .content-box {
        margin: 0 4px;
        padding: 0 16px;
        height: 0;
        flex: 1;
        overflow: hidden;
        overflow-y: auto;
    }
    .footer-btn-box {
        margin-top: 10px;
        display: flex;
        justify-content: center;
    }
}
</style>
src/views/place/index.vue
@@ -5,12 +5,21 @@
            :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-scope="{row}" slot="confirmFlag">
                <el-tag size="small" :type="showConfirmFlag(row.confirmFlag).type">{{ showConfirmFlag(row.confirmFlag).text
                }}</el-tag>
            </template>
            <template slot="menuLeft">
                <el-button size="small" icon="el-icon-delete" plain v-if="permission.place_delete" @click="handleDelete">删 除
                </el-button>
            </template>
            <template slot-scope="scope" slot="menu">
                <el-button type="text" :disabled="scope.row.confirmFlag == 2" icon="el-icon-s-check" size="small" v-if="permission.househould_manager"
                    @click="auditCur(scope.row)">审核
                </el-button>
                <el-button type="text" icon="el-icon-edit" size="small" v-if="permission.househould_manager"
                    @click="ManageTenants(scope.row)">场所维护
                </el-button>
@@ -19,6 +28,11 @@
        <el-dialog class="place-info-box" title="场所维护" append-to-body :visible.sync="roleBox" center @close="roleBoxClose">
            <baseAllInfo></baseAllInfo>
        </el-dialog>
        <el-dialog class="place-info-box audit-info-box" title="审核" append-to-body :visible.sync="auditBasePopup"
            width="30%">
            <auditBase></auditBase>
        </el-dialog>
    </basic-container>
</template>
@@ -39,6 +53,7 @@
import website from '@/config/website'
import auditBase from './components/auditBase'
import baseAllInfo from './components/baseAllInfo'
export default {
@@ -65,7 +80,7 @@
                tip: false,
                searchShow: true,
                searchMenuSpan: 3,
                menuWidth: 240,
                menuWidth: 280,
                border: true,
                //stripe:true,
                index: true,
@@ -264,25 +279,26 @@
                        label: '审核状态',
                        prop: 'confirmFlag',
                        type: 'radio',
                        slot: true,
                        dicData: [{
                            label: '待审核',
                            value: 1
                        }, {
                            label: '审核通过',
                            label: '已审核',
                            value: 2
                        }, {
                            label: '审核不通过',
                            label: '未通过',
                            value: 3
                        }]
                    },
                    {
                        display: false,
                        label: '是否有二维码',
                        searchLabelWidth:110,
                        searchLabelWidth: 110,
                        prop: 'source',
                        type:"select",
                        search:true,
                        searchSpan:4,
                        type: "select",
                        search: true,
                        searchSpan: 4,
                        dicData: [{
                            label: '是',
                            value: 1
@@ -294,6 +310,8 @@
                ],
            },
            data: [],
            auditBasePopup: false,
        }
    },
@@ -303,7 +321,7 @@
        }
    },
    components: { baseAllInfo },
    components: { auditBase, baseAllInfo },
    watch: {},
@@ -324,48 +342,47 @@
            })
            return ids.join(",")
        },
        showConfirmFlag () {
            return (data) => {
                let tags = {
                    text: '',
                    type: ''
                }
                if (data == 1) {
                    tags = {
                        text: '待审核',
                        type: 'warning'
                    }
                } else if (data == 2) {
                    tags = {
                        text: '已审核',
                        type: 'success'
                    }
                } else if (data == 3) {
                    tags = {
                        text: '未通过',
                        type: 'danger'
                    }
                }
                return tags
            }
        }
    },
    methods: {
        roleBoxClose () {
            this.curRow = {}
        auditCur (row) {
            this.curAuditRow = row
            this.auditBasePopup = true
        },
        handleClick () {
        roleBoxClose () {
            this.curRow = {}
        },
        ManageTenants (item) {
            this.curRow = item
            this.roleBox = true
            // this.onLoadPlaceExt(item.id)
        },
        onLoadPlaceExt (placeId) {
            getPlaceExt({ placeId }).then(res => {
                const data = res.data.data
                if (data) {
                    let imageUrls = data.imageUrls
                    let planImageUrls = data.planImageUrls
                    if (imageUrls.length) {
                        imageUrls = imageUrls.split(',').filter(item => item != '').map(item => website.minioUrl + item).join(",")
                    }
                    if (planImageUrls.length) {
                        planImageUrls = planImageUrls.split(',').filter(item => item != '').map(item => website.minioUrl + item).join(",")
                    }
                    this.placeForm = {
                        ...data,
                        imageUrls,
                        planImageUrls
                    }
                    this.holdOnLoad(this.holdPage)
                    this.selectionClear()
                }
            })
        },
        rowSave (row, done, loading) {
src/views/userHouse/components/householdManager.vue
@@ -1,540 +1,607 @@
<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">
          <template slot="menuLeft">
            <el-button type="danger" size="small" plain icon="el-icon-delete" v-if="permission.household_delete"
              @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>
  </el-row>
    <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">
                    <template slot="menuLeft">
                        <el-button type="danger" size="small" plain icon="el-icon-delete" v-if="permission.household_delete"
                            @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>
    </el-row>
</template>
<script>
import {
  getList,
  remove,
  add,
  update,
  getDetatil
} from "@/api/userHouse/list/houseHold.js";
    getList,
    remove,
    add,
    update,
    getDetatil
} from "@/api/userHouse/list/houseHold.js"
import {
  exportBlob
} from "@/api/common";
    exportBlob
} from "@/api/common"
import {
  mapGetters
} from "vuex";
    mapGetters
} from "vuex"
import {
  getToken
} from '@/util/auth';
    getToken
} from '@/util/auth'
import {
  downloadXls
} from "@/util/util";
    downloadXls
} from "@/util/util"
import {
  dateNow
} from "@/util/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
import Qs from "qs";
    dateNow
} from "@/util/date"
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
import Qs from "qs"
export default {
  data() {
    return {
      form: {},
      search: {},
      excelBox: false,
      selectionList: [],
      query: {},
      loading: true,
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0
      },
      option: {
        height: 420,
        calcHeight: 80,
        tip: false,
        searchShow: true,
        searchMenuSpan: 6,
        border: true,
        index: true,
        selection: true,
        viewBtn: true,
        addBtn: true,
        dialogType: 'dialog',
        dialogClickModal: false,
        column: [{
          label: "姓名",
          prop: "name",
          search: true,
          searchSpan: 4,
          labelWidth:120,
        },
        {
          label: "电话",
          prop: "phoneNumber",
          labelWidth:120,
          search: true,
          searchSpan: 4,
        },
        {
          label: "身份证号",
          labelWidth:120,
          prop: "idCard",
        },
        {
          label: "性别",
          prop: "gender",
          type: "select",
          labelWidth:120,
          dicData: [
            {
              label: "男",
              value: 1
    data () {
        return {
            form: {},
            search: {},
            excelBox: false,
            selectionList: [],
            query: {},
            loading: true,
            page: {
                pageSize: 10,
                currentPage: 1,
                total: 0
            },
            {
              label: "女",
              value: 0
            option: {
                labelWidth: 144,
                height: 420,
                calcHeight: 80,
                tip: false,
                searchShow: true,
                searchMenuSpan: 6,
                border: true,
                index: true,
                selection: true,
                viewBtn: true,
                addBtn: true,
                dialogType: 'dialog',
                dialogClickModal: false,
                column: [{
                    label: "姓名",
                    prop: "name",
                    search: true,
                    searchSpan: 4,
                },
                {
                    label: "电话",
                    prop: "phoneNumber",
                    search: true,
                    searchSpan: 4,
                },
                {
                    label: "身份证号",
                    prop: "idCard",
                },
                {
                    label: "证件类型",
                    prop: "cardType",
                    type: "select",
                    dicUrl: "/api/blade-system/dict-biz/dictionary?code=cardType",
                    dataType: "number",
                    props: {
                        label: "dictValue",
                        value: "dictKey",
                    },
                },
                {
                    width: 160,
                    label: "证件号码",
                    prop: "cardNo",
                },
                {
                    label: "性别",
                    prop: "gender",
                    type: "select",
                    dicData: [
                        {
                            label: "男",
                            value: 1
                        },
                        {
                            label: "女",
                            value: 0
                        },
                        {
                            label: "未知",
                            value: 1
                        }
                    ],
                },
                {
                    label: "关系",
                    prop: "roleType",
                    type: "select",
                    dicUrl: "/api/blade-system/dict-biz/dictionary?code=roleType",
                    dataType: "number",
                    props: {
                        label: "dictValue",
                        value: "dictKey",
                    },
                },
                {
                    label: "与角色关系",
                    prop: "relationship",
                    type: "select",
                    dicUrl: "/api/blade-system/dict-biz/dictionary?code=roleRelation",
                    dataType: "number",
                    hide: true,
                    props: {
                        label: "dictValue",
                        value: "dictKey",
                    },
                },
                {
                    label: "小区",
                    prop: "aoiName",
                    display: false
                },
                {
                    label: "地址",
                    prop: "address",
                    display: false
                },
                {
                    label: "主要联系人",
                    prop: "isPrimaryContact",
                    type: "select",
                    dicUrl: "/api/blade-system/dict-biz/dictionary?code=primaryContactType",
                    dataType: "number",
                    hide: true,
                    props: {
                        label: "dictValue",
                        value: "dictKey",
                    },
                },
                {
                    label: "居住情况",
                    prop: "residentialStatus",
                    type: "select",
                    hide: true,
                    dicUrl: "/api/blade-system/dict-biz/dictionary?code=residentialStatusType",
                    dataType: "number",
                    props: {
                        label: "dictValue",
                        value: "dictKey",
                    },
                },
                {
                    label: "身份证号",
                    prop: "idCard",
                    hide: true,
                },
                {
                    label: "生日",
                    prop: "birthday",
                    type: "date",
                    format: "yyyy-MM-dd",
                    valueFormat: "yyyy-MM-dd",
                    hide: true,
                },
                {
                    label: "港澳台通行证",
                    prop: "hkmtPass",
                    hide: true,
                },
                {
                    label: "护照",
                    prop: "passport",
                    hide: true,
                },
                {
                    label: "民族",
                    prop: "ethnicity",
                    type: "select",
                    hide: true,
                    dicUrl: "/api/blade-system/dict-biz/dictionary?code=nationType",
                    dataType: "number",
                    props: {
                        label: "dictValue",
                        value: "dictKey",
                    },
                },
                {
                    label: "学历",
                    prop: "education",
                    type: "select",
                    hide: true,
                    dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationType",
                    dataType: "number",
                    props: {
                        label: "dictValue",
                        value: "dictKey",
                    },
                },
                {
                    label: "户籍登记地",
                    prop: "hukouRegistration",
                    hide: true,
                },
                {
                    label: "工作状态",
                    prop: "workStatus",
                    type: "select",
                    hide: true,
                    dicUrl: "/api/blade-system/dict-biz/dictionary?code=workStatusType",
                    dataType: "number",
                    props: {
                        label: "dictValue",
                        value: "dictKey",
                    },
                },
                {
                    label: "工作单位",
                    prop: "employer",
                    hide: true,
                },
                {
                    label: "婚姻状态",
                    prop: "maritalStatus",
                    type: "select",
                    hide: true,
                    dicUrl: "/api/blade-system/dict-biz/dictionary?code=marriageStatusType",
                    dataType: "number",
                    props: {
                        label: "dictValue",
                        value: "dictKey",
                    },
                },
                {
                    label: "车牌号",
                    prop: "cardNumber",
                    hide: true,
                },
                {
                    label: "其他联系方式",
                    prop: "otherContact",
                    hide: true,
                },
                {
                    label: "现居住地址",
                    prop: "currentAddress",
                    hide: true,
                },
                {
                    label: "残疾证",
                    prop: "disabilityCert",
                    hide: true,
                },
                {
                    width: 160,
                    label: "宗教信仰",
                    prop: "religiousBelief",
                },
                {
                    label: "健康状况",
                    prop: "healthStatus",
                    type: "select",
                    dicUrl: "/api/blade-system/dict-biz/dictionary?code=healthStatus",
                    dataType: "number",
                    props: {
                        label: "dictValue",
                        value: "dictKey",
                    },
                },
                {
                    width: 160,
                    label: "疾病名称",
                    prop: "diseaseName"
                },
                {
                    label: "户籍类型",
                    prop: "residentType",
                    type: "select",
                    dicUrl: "/api/blade-system/dict-biz/dictionary?code=residentType",
                    dataType: "number",
                    props: {
                        label: "dictValue",
                        value: "dictKey",
                    },
                },
                {
                    width: 160,
                    label: "户籍地行政区划",
                    prop: "residentAdcode"
                },
                {
                    width: 160,
                    label: "籍贯地行政区划",
                    prop: "nativePlaceAdcode"
                },
                {
                    width: 160,
                    label: "外出详址",
                    prop: "goOutAddr"
                },
                {
                    width: 160,
                    label: "外出去向",
                    prop: "goOutWhere"
                },
                {
                    width: 160,
                    label: "外出时间",
                    prop: "goOutTime"
                },
                {
                    width: 160,
                    label: "外出原因",
                    prop: "goOutReason"
                },
                {
                    width: 160,
                    label: "职业类别",
                    prop: "occupation"
                },
                {
                    width: 160,
                    label: "就职单位地址",
                    prop: "cmpyRegAddr"
                },
                ]
            },
            {
              label: "未知",
              value: 1
            houseCode: "",
            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
                    },
                    {
                        label: "是",
                        value: 1
                    }
                    ],
                    value: 0,
                    slot: true,
                    rules: [{
                        required: true,
                        message: "请选择是否覆盖",
                        trigger: "blur"
                    }]
                },
                {
                    label: '模板下载',
                    prop: 'excelTemplate',
                    formslot: true,
                    span: 24,
                }
                ]
            }
          ],
        },
        {
          label: "关系",
          prop: "roleType",
          type: "select",
          dicUrl: "/api/blade-system/dict-biz/dictionary?code=roleType",
          labelWidth:120,
          dataType: "number",
          props: {
            label: "dictValue",
            value: "dictKey",
          },
        },
        {
          label: "与角色关系",
          prop: "relationship",
          type: "select",
          dicUrl: "/api/blade-system/dict-biz/dictionary?code=roleRelation",
          dataType: "number",
          labelWidth:120,
          hide: true,
          props: {
            label: "dictValue",
            value: "dictKey",
          },
        },
        {
          label: "小区",
          prop: "aoiName",
          display: false
        },
        {
          label: "地址",
          prop: "address",
          display: false
        },
        {
          label: "主要联系人",
          prop: "isPrimaryContact",
          type: "select",
          dicUrl: "/api/blade-system/dict-biz/dictionary?code=primaryContactType",
          dataType: "number",
          hide: true,
          labelWidth:120,
          props: {
            label: "dictValue",
            value: "dictKey",
          },
        },
        {
          label: "居住情况",
          prop: "residentialStatus",
          type: "select",
          hide: true,
          labelWidth:120,
          dicUrl: "/api/blade-system/dict-biz/dictionary?code=residentialStatusType",
          dataType: "number",
          props: {
            label: "dictValue",
            value: "dictKey",
          },
        },
        {
          label: "身份证号",
          prop: "idCard",
          labelWidth:120,
          hide: true,
        },
        {
          label: "生日",
          prop: "birthday",
          type: "date",
          labelWidth:120,
          format: "yyyy-MM-dd",
          valueFormat: "yyyy-MM-dd",
          hide: true,
        },
        {
          label: "港澳台通行证",
          prop: "hkmtPass",
          labelWidth:120,
          hide: true,
        },
        {
          label: "护照",
          prop: "passport",
          labelWidth:120,
          hide: true,
        },
        {
          label: "民族",
          prop: "ethnicity",
          type: "select",
          hide: true,
          labelWidth:120,
          dicUrl: "/api/blade-system/dict-biz/dictionary?code=nationType",
          dataType: "number",
          props: {
            label: "dictValue",
            value: "dictKey",
          },
        },
        {
          label: "学历",
          prop: "education",
          type: "select",
          hide: true,
          labelWidth:120,
          dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationType",
          dataType: "number",
          props: {
            label: "dictValue",
            value: "dictKey",
          },
        },
        {
          label: "户籍登记地",
          prop: "hukouRegistration",
          labelWidth:120,
          hide: true,
        },
        {
          label: "工作状态",
          prop: "workStatus",
          type: "select",
          labelWidth:120,
          hide: true,
          dicUrl: "/api/blade-system/dict-biz/dictionary?code=workStatusType",
          dataType: "number",
          props: {
            label: "dictValue",
            value: "dictKey",
          },
        },
        {
          label: "工作单位",
          prop: "employer",
          labelWidth:120,
          hide: true,
        },
        {
          label: "婚姻状态",
          prop: "maritalStatus",
          type: "select",
          labelWidth:120,
          hide: true,
          dicUrl: "/api/blade-system/dict-biz/dictionary?code=marriageStatusType",
          dataType: "number",
          props: {
            label: "dictValue",
            value: "dictKey",
          },
        },
        {
          label: "车牌号",
          prop: "cardNumber",
          labelWidth:120,
          hide: true,
        },
        {
          label: "其他联系方式",
          prop: "otherContact",
          labelWidth:120,
          hide: true,
        },
        {
          label: "现居住地址",
          prop: "currentAddress",
          labelWidth:120,
          hide: true,
        },
        {
          label: "残疾证",
          prop: "disabilityCert",
          labelWidth:120,
          hide: true,
        },
        ]
      },
      houseCode: "",
      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
          },
          {
            label: "是",
            value: 1
          }
          ],
          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.household_add, true),
        viewBtn: this.vaildData(this.permission.household_view, true),
        delBtn: this.vaildData(this.permission.household_delete, true),
        editBtn: this.vaildData(this.permission.household_edit, true)
      };
    }
  },
  mounted() {
  },
  methods: {
    init(data) {
      this.houseCode = data.houseCode
      this.onLoad(this.page)
    },
    rowSave(row, done, loading) {
      row['houseCode'] = this.houseCode
      add(row).then(() => {
        this.initFlag = false;
        this.onLoad(this.page);
        this.$message({
          type: "success",
          message: "操作成功!"
        });
        done();
      }, error => {
        window.console.log(error);
        loading();
      });
    watch: {
    },
    rowUpdate(row, index, done, loading) {
      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
    computed: {
        ...mapGetters(["userInfo", "permission"]),
        permissionList () {
            return {
                addBtn: this.vaildData(this.permission.household_add, true),
                viewBtn: this.vaildData(this.permission.household_view, true),
                delBtn: this.vaildData(this.permission.household_delete, true),
                editBtn: this.vaildData(this.permission.household_edit, true)
            }
        }
        data = Qs.stringify(data);
        exportBlob(
          `/api/blade-household/household/export-household?${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");
      })
    mounted () {
    },
    beforeOpen(done, type) {
      if (["edit", "view"].includes(type)) {
        getDetatil(this.form.id).then(res => {
          this.form = res.data.data;
        });
      }
      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 = {}) {
      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;
        this.data = data.records;
        this.loading = false;
        this.selectionClear();
      });
    methods: {
        init (data) {
            this.houseCode = data.houseCode
            this.onLoad(this.page)
        },
        rowSave (row, done, loading) {
            row['houseCode'] = this.houseCode
            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) {
            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-household/household/export-household?${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(this.form.id).then(res => {
                    this.form = res.data.data
                })
            }
            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 = {}) {
            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
                this.data = data.records
                this.loading = false
                this.selectionClear()
            })
        }
    }
  }
};
}
</script>
<style>
.box {
  height: 800px;
    height: 800px;
}
.el-scrollbar {
  height: 100%;
    height: 100%;
}
.box .el-scrollbar__wrap {
  overflow: scroll;
    overflow: scroll;
}
</style>
src/views/userHouse/houseHoldList.vue
@@ -166,6 +166,7 @@
                total: 0
            },
            option: {
                labelWidth: 144,
                height: 'auto',
                calcHeight: 80,
                tip: false,
@@ -185,14 +186,12 @@
                        width: 96,
                        label: "姓名",
                        prop: "name",
                        labelWidth: 120,
                        search: true,
                        searchSpan: 3,
                    },
                    {
                        width: 110,
                        label: "电话",
                        labelWidth: 120,
                        prop: "phoneNumber",
                        search: true,
                        searchSpan: 3,
@@ -203,15 +202,29 @@
                        label: "身份证号",
                        prop: "idCard",
                        search: true,
                        labelWidth: 120,
                        searchSpan: 4,
                        slot: true,
                    },
                    {
                        label: "证件类型",
                        prop: "cardType",
                        type: "select",
                        dicUrl: "/api/blade-system/dict-biz/dictionary?code=cardType",
                        dataType: "number",
                        props: {
                            label: "dictValue",
                            value: "dictKey",
                        },
                    },
                    {
                        width: 160,
                        label: "证件号码",
                        prop: "cardNo",
                    },
                    {
                        label: "性别",
                        prop: "gender",
                        type: "select",
                        labelWidth: 120,
                        dicData: [{
                            label: "男",
                            value: 1
@@ -231,7 +244,6 @@
                        prop: "roleType",
                        type: "select",
                        dicUrl: "/api/blade-system/dict-biz/dictionary?code=roleType",
                        labelWidth: 120,
                        dataType: "number",
                        props: {
                            label: "dictValue",
@@ -244,7 +256,6 @@
                        type: "select",
                        dicUrl: "/api/blade-system/dict-biz/dictionary?code=roleRelation",
                        dataType: "number",
                        labelWidth: 120,
                        hide: true,
                        props: {
                            label: "dictValue",
@@ -309,7 +320,6 @@
                        dicUrl: "/api/blade-system/dict-biz/dictionary?code=primaryContactType",
                        dataType: "number",
                        hide: true,
                        labelWidth: 120,
                        props: {
                            label: "dictValue",
                            value: "dictKey",
@@ -320,7 +330,6 @@
                        prop: "residentialStatus",
                        type: "select",
                        hide: true,
                        labelWidth: 120,
                        dicUrl: "/api/blade-system/dict-biz/dictionary?code=residentialStatusType",
                        dataType: "number",
                        props: {
@@ -332,7 +341,6 @@
                        label: "生日",
                        prop: "birthday",
                        type: "date",
                        labelWidth: 120,
                        format: "yyyy-MM-dd",
                        valueFormat: "yyyy-MM-dd",
                        hide: true,
@@ -340,13 +348,11 @@
                    {
                        label: "港澳台通行证",
                        prop: "hkmtPass",
                        labelWidth: 120,
                        hide: true,
                    },
                    {
                        label: "护照",
                        prop: "passport",
                        labelWidth: 120,
                        hide: true,
                    },
                    {
@@ -354,7 +360,6 @@
                        prop: "ethnicity",
                        type: "select",
                        hide: true,
                        labelWidth: 120,
                        dicUrl: "/api/blade-system/dict-biz/dictionary?code=nationType",
                        dataType: "number",
                        props: {
@@ -367,7 +372,6 @@
                        prop: "education",
                        type: "select",
                        hide: true,
                        labelWidth: 120,
                        dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationType",
                        dataType: "number",
                        props: {
@@ -378,14 +382,12 @@
                    {
                        label: "户籍登记地",
                        prop: "hukouRegistration",
                        labelWidth: 120,
                        hide: true,
                    },
                    {
                        label: "工作状态",
                        prop: "workStatus",
                        type: "select",
                        labelWidth: 120,
                        hide: true,
                        dicUrl: "/api/blade-system/dict-biz/dictionary?code=workStatusType",
                        dataType: "number",
@@ -397,14 +399,12 @@
                    {
                        label: "工作单位",
                        prop: "employer",
                        labelWidth: 120,
                        hide: true,
                    },
                    {
                        label: "婚姻状态",
                        prop: "maritalStatus",
                        type: "select",
                        labelWidth: 120,
                        hide: true,
                        dicUrl: "/api/blade-system/dict-biz/dictionary?code=marriageStatusType",
                        dataType: "number",
@@ -416,27 +416,95 @@
                    {
                        label: "车牌号",
                        prop: "cardNumber",
                        labelWidth: 120,
                        hide: true,
                    },
                    {
                        label: "其他联系方式",
                        prop: "otherContact",
                        labelWidth: 120,
                        hide: true,
                    },
                    {
                        label: "现居住地址",
                        prop: "currentAddress",
                        labelWidth: 120,
                        hide: true,
                    },
                    {
                        label: "残疾证",
                        prop: "disabilityCert",
                        labelWidth: 120,
                        hide: true,
                    },
                    {
                        width: 160,
                        label: "宗教信仰",
                        prop: "religiousBelief",
                    },
                    {
                        label: "健康状况",
                        prop: "healthStatus",
                        type: "select",
                        dicUrl: "/api/blade-system/dict-biz/dictionary?code=healthStatus",
                        dataType: "number",
                        props: {
                            label: "dictValue",
                            value: "dictKey",
                        },
                    },
                    {
                        width: 160,
                        label: "疾病名称",
                        prop: "diseaseName"
                    },
                    {
                        label: "户籍类型",
                        prop: "residentType",
                        type: "select",
                        dicUrl: "/api/blade-system/dict-biz/dictionary?code=residentType",
                        dataType: "number",
                        props: {
                            label: "dictValue",
                            value: "dictKey",
                        },
                    },
                    {
                        width: 160,
                        label: "户籍地行政区划",
                        prop: "residentAdcode"
                    },
                    {
                        width: 160,
                        label: "籍贯地行政区划",
                        prop: "nativePlaceAdcode"
                    },
                    {
                        width: 160,
                        label: "外出详址",
                        prop: "goOutAddr"
                    },
                    {
                        width: 160,
                        label: "外出去向",
                        prop: "goOutWhere"
                    },
                    {
                        width: 160,
                        label: "外出时间",
                        prop: "goOutTime"
                    },
                    {
                        width: 160,
                        label: "外出原因",
                        prop: "goOutReason"
                    },
                    {
                        width: 160,
                        label: "职业类别",
                        prop: "occupation"
                    },
                    {
                        width: 160,
                        label: "就职单位地址",
                        prop: "cmpyRegAddr"
                    },
                ]
            },
            data: [],
src/views/userHouse/houseList.vue
@@ -94,6 +94,7 @@
                        </template>
                    </avue-form>
                </el-dialog>
                <el-dialog title="住户管理" append-to-body :visible.sync="householdManagerVisible" width="70%" height="60%">
                    <householdManager ref="householdManager" />
                </el-dialog>