From 3acc40b45241a44482b10e3b3892ca8fac749bbb Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Thu, 21 Dec 2023 14:43:01 +0800
Subject: [PATCH] 住户页面补充字段

---
 src/views/userHouse/houseHoldList.vue |  212 ++++++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 186 insertions(+), 26 deletions(-)

diff --git a/src/views/userHouse/houseHoldList.vue b/src/views/userHouse/houseHoldList.vue
index d940caa..4f2c580 100644
--- a/src/views/userHouse/houseHoldList.vue
+++ b/src/views/userHouse/houseHoldList.vue
@@ -149,7 +149,7 @@
 import { lintOnSave } from "../../../vue.config"
 
 export default {
-    data () {
+    data() {
         return {
             labelData: [],
             form: {},
@@ -185,6 +185,7 @@
                         width: 96,
                         label: "姓名",
                         prop: "name",
+                        labelWidth: 120,
                         search: true,
                         searchSpan: 4,
                     },
@@ -192,6 +193,7 @@
                         width: 106,
                         label: "电话",
                         prop: "phoneNumber",
+                        labelWidth: 120,
                         search: true,
                         searchSpan: 4,
                         slot: true,
@@ -201,6 +203,7 @@
                         label: "身份证号",
                         prop: "idCard",
                         search: true,
+                        labelWidth: 120,
                         searchSpan: 4,
                         slot: true,
                     },
@@ -208,6 +211,7 @@
                         label: "性别",
                         prop: "gender",
                         type: "select",
+                        labelWidth: 120,
                         dicData: [{
                             label: "男",
                             value: 1
@@ -224,10 +228,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",
@@ -239,6 +257,7 @@
                         prop: "aoiName",
                         search: true,
                         searchSpan: 4,
+                        display: false
                     },
 
                     {
@@ -278,6 +297,147 @@
                         label: "标签",
                         prop: "householdLabelList",
                         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,
                     },
                 ]
             },
@@ -374,7 +534,7 @@
     watch: {},
     computed: {
         ...mapGetters(["userInfo", "permission"]),
-        permissionList () {
+        permissionList() {
             return {
                 addBtn: this.vaildData(this.permission.household_add, false),
                 viewBtn: this.vaildData(this.permission.household_view, true),
@@ -383,7 +543,7 @@
             }
         },
 
-        textDispose () {
+        textDispose() {
             return (row, flag, type) => {
                 if (row[flag] || row[type] == null) {
                     return row[type]
@@ -397,15 +557,15 @@
             }
         },
 
-        labelDispose () {
+        labelDispose() {
             return (list) => {
                 return list.map(item => item.labelName).join(',')
             }
         }
     },
-    mounted () { },
+    mounted() { },
     methods: {
-        onsubmit () {
+        onsubmit() {
             if (this.labelForm.color === '#EBEDF0') {
                 let params = {
                     householdId: this.currentRow.id,
@@ -442,13 +602,13 @@
             }
         },
 
-        changLabel (item) {
+        changLabel(item) {
             this.editLabelFlge = true
             this.currentLabel = item
             this.labelForm.color = item.color
             this.labelForm.remark = item.remark
         },
-        manageLabel (item) {
+        manageLabel(item) {
             this.currentRow = item
             this.loading = true
             this.labelFlag = true
@@ -480,7 +640,7 @@
                 })
             })
         },
-        rowSave (row, done, loading) {
+        rowSave(row, done, loading) {
             add(row).then(() => {
                 this.initFlag = false
                 this.onLoad(this.page)
@@ -494,7 +654,7 @@
                 loading()
             })
         },
-        rowUpdate (row, index, done, loading) {
+        rowUpdate(row, index, done, loading) {
             update(row).then(() => {
                 this.initFlag = false
                 this.onLoad(this.page)
@@ -508,7 +668,7 @@
                 loading()
             })
         },
-        rowDel (row) {
+        rowDel(row) {
             this.$confirm("确定将选择数据删除?", {
                 confirmButtonText: "确定",
                 cancelButtonText: "取消",
@@ -525,25 +685,25 @@
                     })
                 })
         },
-        searchReset () {
+        searchReset() {
             this.query = {}
             this.treeDeptId = ''
             this.onLoad(this.page)
         },
-        searchChange (params, done) {
+        searchChange(params, done) {
             this.query = params
             this.page.currentPage = 1
             this.onLoad(this.page, params)
             done()
         },
-        selectionChange (list) {
+        selectionChange(list) {
             this.selectionList = list
         },
-        selectionClear () {
+        selectionClear() {
             this.selectionList = []
             // this.$refs.crud.toggleSelection();
         },
-        handleDelete () {
+        handleDelete() {
             if (this.selectionList.length === 0) {
                 this.$message.warning("请选择至少一条数据")
                 return
@@ -565,16 +725,16 @@
                     this.$refs.crud.toggleSelection()
                 })
         },
-        handleImport () {
+        handleImport() {
             this.excelBox = true
         },
-        uploadAfter (res, done, loading, column) {
+        uploadAfter(res, done, loading, column) {
             window.console.log(column)
             this.excelBox = false
             this.refreshChange()
             done()
         },
-        handleExport () {
+        handleExport() {
             this.$confirm("是否导出住户数据?", "提示", {
                 confirmButtonText: "确定",
                 cancelButtonText: "取消",
@@ -593,12 +753,12 @@
                 })
             })
         },
-        handleTemplate () {
+        handleTemplate() {
             exportBlob(`/api/blade-system/user/export-template?${this.website.tokenHeader}=${getToken()}`).then(res => {
                 downloadXls(res.data, "住户数据模板.xlsx")
             })
         },
-        beforeOpen (done, type) {
+        beforeOpen(done, type) {
             if (["edit", "view"].includes(type)) {
                 getDetatil(this.form.id).then(res => {
                     this.form = res.data.data
@@ -607,17 +767,17 @@
             this.initFlag = true
             done()
         },
-        currentChange (currentPage) {
+        currentChange(currentPage) {
             this.page.currentPage = currentPage
         },
-        sizeChange (pageSize) {
+        sizeChange(pageSize) {
             this.page.pageSize = pageSize
         },
-        refreshChange () {
+        refreshChange() {
             this.onLoad(this.page, this.query)
         },
 
-        onLoad (page, params = {}) {
+        onLoad(page, params = {}) {
             this.loading = true
             getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
                 const data = {
@@ -638,7 +798,7 @@
             })
         },
 
-        showStringDispose (row, type) {
+        showStringDispose(row, type) {
             row[type] = !row[type]
         }
     }

--
Gitblit v1.9.3