| | |
| | | add, |
| | | update, |
| | | getDetatils |
| | | } from "@/api/userHouse/list/houseHold.js" |
| | | } from "@/ssoapi/userHouse/list/houseHold.js" |
| | | import { |
| | | exportBlob |
| | | } from "@/api/common" |
| | | } from "@/ssoapi/common" |
| | | import { |
| | | mapGetters |
| | | } from "vuex" |
| | |
| | | var regIdCard = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/ |
| | | |
| | | // 如果通过该验证,说明身份证格式正确,但准确性还需计算 |
| | | if (regIdCard.test(value)) { |
| | | if (regIdCard.test(value) || value == '') { |
| | | if (value.length == 18) { |
| | | var idCardWi = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, |
| | | 5, 8, 4, 2) // 将前17位加权因子保存在数组里 |
| | |
| | | label: "与业主关系", |
| | | prop: "relationship", |
| | | type: "select", |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=roleRelation", |
| | | dicUrl: "/ssoapi/blade-system/dict-biz/dictionary?code=roleRelation", |
| | | dataType: "number", |
| | | hide: true, |
| | | props: { |
| | |
| | | label: "证件类型", |
| | | prop: "cardType", |
| | | type: "select", |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=cardType", |
| | | dicUrl: "/ssoapi/blade-system/dict-biz/dictionary?code=cardType", |
| | | dataType: "number", |
| | | props: { |
| | | label: "dictValue", |
| | |
| | | prop: "residentialStatus", |
| | | type: "select", |
| | | hide: true, |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=residentialStatusType", |
| | | dicUrl: "/ssoapi/blade-system/dict-biz/dictionary?code=residentialStatusType", |
| | | dataType: "number", |
| | | props: { |
| | | label: "dictValue", |
| | |
| | | label: "主要联系人", |
| | | prop: "isPrimaryContact", |
| | | type: "select", |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=primaryContactType", |
| | | dicUrl: "/ssoapi/blade-system/dict-biz/dictionary?code=primaryContactType", |
| | | dataType: "number", |
| | | hide: true, |
| | | props: { |
| | |
| | | label: 'name', |
| | | value: 'id' |
| | | }, |
| | | dicUrl: `/api/blade-system/region/getBaseTree`, |
| | | dicUrl: `/ssoapi/blade-system/region/getBaseTree`, |
| | | }, |
| | | |
| | | { |
| | |
| | | label: "户籍类型", |
| | | prop: "residentType", |
| | | type: "select", |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=residentType", |
| | | dicUrl: "/ssoapi/blade-system/dict-biz/dictionary?code=residentType", |
| | | dataType: "number", |
| | | props: { |
| | | label: "dictValue", |
| | |
| | | label: 'name', |
| | | value: 'id' |
| | | }, |
| | | dicUrl: `/api/blade-system/region/getBaseTree`, |
| | | dicUrl: `/ssoapi/blade-system/region/getBaseTree`, |
| | | }, |
| | | |
| | | { |
| | |
| | | label: 'name', |
| | | value: 'code' |
| | | }, |
| | | dicUrl: `/api/blade-system/region/select?code=361102`, |
| | | dicUrl: `/ssoapi/blade-system/region/select?code=361102`, |
| | | }, |
| | | |
| | | { |
| | |
| | | prop: "ethnicity", |
| | | type: "select", |
| | | hide: true, |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=nationType", |
| | | dicUrl: "/ssoapi/blade-system/dict-biz/dictionary?code=nationType", |
| | | dataType: "number", |
| | | props: { |
| | | label: "dictValue", |
| | |
| | | prop: "education", |
| | | type: "select", |
| | | hide: true, |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationType", |
| | | dicUrl: "/ssoapi/blade-system/dict-biz/dictionary?code=educationType", |
| | | dataType: "number", |
| | | props: { |
| | | label: "dictValue", |
| | |
| | | prop: "workStatus", |
| | | type: "select", |
| | | hide: true, |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=workStatusType", |
| | | dicUrl: "/ssoapi/blade-system/dict-biz/dictionary?code=workStatusType", |
| | | dataType: "number", |
| | | props: { |
| | | label: "dictValue", |
| | |
| | | prop: "maritalStatus", |
| | | type: "select", |
| | | hide: true, |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=marriageStatusType", |
| | | dicUrl: "/ssoapi/blade-system/dict-biz/dictionary?code=marriageStatusType", |
| | | dataType: "number", |
| | | props: { |
| | | label: "dictValue", |
| | |
| | | label: "健康状态", |
| | | prop: "healthStatus", |
| | | type: "select", |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=healthStatus", |
| | | dicUrl: "/ssoapi/blade-system/dict-biz/dictionary?code=healthStatus", |
| | | dataType: "number", |
| | | props: { |
| | | label: "dictValue", |
| | |
| | | prop: "cardNumber", |
| | | hide: true, |
| | | }, |
| | | |
| | | { |
| | | label: "备注", |
| | | prop: "remark", |
| | | hide: true, |
| | | }, |
| | | ] |
| | | }, |
| | | houseCode: "", |
| | |
| | | res: 'data' |
| | | }, |
| | | tip: '请上传 .xls,.xlsx 标准格式文件', |
| | | action: "/api/blade-system/user/import-user" |
| | | action: "/ssoapi/blade-system/user/import-user" |
| | | }, |
| | | { |
| | | label: "数据覆盖", |
| | |
| | | } |
| | | data = Qs.stringify(data) |
| | | exportBlob( |
| | | `/api/blade-household/household/export-household?${this.website.tokenHeader}=${getToken()}&` + data |
| | | `/ssoapi/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 => { |
| | | exportBlob(`/ssoapi/blade-system/user/export-template?${this.website.tokenHeader}=${getToken()}`).then(res => { |
| | | downloadXls(res.data, "住户数据模板.xlsx") |
| | | }) |
| | | }, |