| | |
| | | <view class="box-title"> |
| | | <box-title title="基础信息"></box-title> |
| | | </view> |
| | | <u-form-item @click="showSelectBus(dataList.roleList, '角色', 'roleTypeName','roleType')" class="form-item" |
| | | labelWidth="100" label="角色" required prop="roleType"> |
| | | <u--input border="none" v-model="roleTypeName" disabled disabledColor="#ffffff" |
| | | placeholder="请选择"> |
| | | <u-form-item @click="showSelectBus('角色','roleType')" class="form-item" labelWidth="100" |
| | | label="角色" required prop="roleType"> |
| | | <u--input border="none" v-model="selectDefaultName.roleType" disabled |
| | | disabledColor="#ffffff" placeholder="请选择"> |
| | | </u--input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | |
| | | <u-form-item @click="showSelectBus(dataList.relationshipList, '角色关系', 'relationshipName','relationship')" |
| | | class="form-item" labelWidth="100" label="角色关系" required prop="relationship"> |
| | | <u--input border="none" v-model="relationshipName" disabled disabledColor="#ffffff" |
| | | placeholder="请选择"> |
| | | <u-form-item @click="showSelectBus('角色关系','relationship')" class="form-item" labelWidth="100" |
| | | label="角色关系" required prop="relationship"> |
| | | <u--input border="none" v-model="selectDefaultName.relationship" disabled |
| | | disabledColor="#ffffff" placeholder="请选择"> |
| | | </u--input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | |
| | | </u-form-item> |
| | | |
| | | |
| | | <u-form-item class="form-item" labelWidth="100" label="身份证" prop="idCard"> |
| | | <u-form-item @click="showSelectBus('证件类型','cardType')" class="form-item" labelWidth="100" |
| | | label="证件类型" prop="gender"> |
| | | <u--input border="none" v-model="selectDefaultName.cardType" disabled |
| | | disabledColor="#ffffff" placeholder="请选择"> |
| | | </u--input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | |
| | | |
| | | <u-form-item v-if="selectDefaultIndex.cardType == 0" class="form-item" labelWidth="100" |
| | | label="身份证号码" prop="idCard"> |
| | | <u--input border="none" v-model="form.idCard" placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | |
| | | <u-form-item @click="showSelectBus(dataList.genderList, '性别', 'genderName','gender')" |
| | | class="form-item" labelWidth="100" label="性别" prop="gender"> |
| | | <u--input border="none" v-model="genderName" disabled disabledColor="#ffffff" |
| | | <u-form-item v-if="selectDefaultIndex.cardType == 1" class="form-item" labelWidth="100" |
| | | label="证件号码" prop="cardNo"> |
| | | <u--input border="none" v-model="form.cardNo" placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | |
| | | |
| | | <u-form-item @click="showSelectBus('性别','gender')" class="form-item" labelWidth="100" label="性别" |
| | | prop="gender"> |
| | | <u--input border="none" v-model="selectDefaultName.gender" disabled disabledColor="#ffffff" |
| | | placeholder="请选择"> |
| | | </u--input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | |
| | | </u--input> |
| | | </u-form-item> |
| | | |
| | | <u-form-item @click="showSelectBus(dataList.isPrimaryContactList, '是否主要联系人', 'isPrimaryContactName','isPrimaryContact')" |
| | | class="form-item" labelWidth="110" label="是否主要联系人" |
| | | prop="isPrimaryContact"> |
| | | <u--input border="none" v-model="isPrimaryContactName" disabled disabledColor="#ffffff" |
| | | placeholder="请选择"> |
| | | <u-form-item @click="showSelectBus('是否主要联系人','isPrimaryContact')" class="form-item" |
| | | labelWidth="110" label="是否主要联系人" prop="isPrimaryContact"> |
| | | <u--input border="none" v-model="selectDefaultName.isPrimaryContact" disabled |
| | | disabledColor="#ffffff" placeholder="请选择"> |
| | | </u--input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | |
| | | <u-form-item @click="showSelectBus(dataList.residentialStatusList, '居住情况', 'residentialStatusName','residentialStatus')" |
| | | class="form-item" labelWidth="100" label="居住情况" |
| | | prop="residentialStatus"> |
| | | <u--input border="none" v-model="residentialStatusName" disabled disabledColor="#ffffff" |
| | | placeholder="请选择"> |
| | | <u-form-item @click="showSelectBus('居住情况','residentialStatus')" class="form-item" |
| | | labelWidth="100" label="居住情况" prop="residentialStatus"> |
| | | <u--input border="none" v-model="selectDefaultName.residentialStatus" disabled |
| | | disabledColor="#ffffff" placeholder="请选择"> |
| | | </u--input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | |
| | | <u-form-item class="form-item" labelWidth="100" label="港澳台通行证" prop="hkmtPass"> |
| | | <u-form-item class="form-item" labelWidth="100" label="港澳台通行证" prop="hkmtPass"> |
| | | <u--input border="none" v-model="form.hkmtPass" placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | |
| | | <u-form-item class="form-item" labelWidth="100" label="护照" prop="passport"> |
| | | <u-form-item class="form-item" labelWidth="100" label="护照" prop="passport"> |
| | | <u--input border="none" v-model="form.passport" placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | |
| | | <u-form-item class="form-item" labelWidth="100" label="现居住地" prop="currentAddress"> |
| | | <u-form-item class="form-item" labelWidth="100" label="现居住地" prop="currentAddress"> |
| | | <u--input border="none" v-model="form.currentAddress" placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | |
| | | <u-form-item @click="showSelectBus(dataList.ethnicityList, '民族', 'ethnicityName','ethnicity')" |
| | | class="form-item" labelWidth="100" label="民族" prop="ethnicity"> |
| | | <u--input border="none" v-model="ethnicityName" disabled disabledColor="#ffffff" |
| | | placeholder="请选择"> |
| | | <u-form-item @click="showSelectBus('民族','ethnicity')" class="form-item" labelWidth="100" |
| | | label="民族" prop="ethnicity"> |
| | | <u--input border="none" v-model="selectDefaultName.ethnicity" disabled |
| | | disabledColor="#ffffff" placeholder="请选择"> |
| | | </u--input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | |
| | | <u-form-item @click="showSelectBus(dataList.educationList, '学历', 'educationName','education')" |
| | | class="form-item" labelWidth="100" label="学历" prop="education"> |
| | | <u--input border="none" v-model="educationName" disabled disabledColor="#ffffff" |
| | | placeholder="请选择"> |
| | | <u-form-item @click="showSelectBus('学历','education')" class="form-item" labelWidth="100" |
| | | label="学历" prop="education"> |
| | | <u--input border="none" v-model="selectDefaultName.education" disabled |
| | | disabledColor="#ffffff" placeholder="请选择"> |
| | | </u--input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | |
| | | <u-form-item @click="showSelectBus(dataList.partyEmberList, '是否党员', 'partyEmberName','partyEmber')" |
| | | class="form-item" labelWidth="100" label="是否党员" prop="partyEmber"> |
| | | <u--input border="none" v-model="partyEmberName" disabled disabledColor="#ffffff" |
| | | placeholder="请选择"> |
| | | <u-form-item @click="showSelectBus('是否党员','partyEmber')" class="form-item" labelWidth="100" |
| | | label="是否党员" prop="partyEmber"> |
| | | <u--input border="none" v-model="selectDefaultName.partyEmber" disabled |
| | | disabledColor="#ffffff" placeholder="请选择"> |
| | | </u--input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | |
| | | <u-form-item class="form-item" labelWidth="100" label="职业类别" prop="occupation "> |
| | | <u--input border="none" v-model="form.occupation " placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | <u-form-item class="form-item" labelWidth="100" label="工作单位" prop="employer"> |
| | | <u--input border="none" v-model="form.employer" placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | |
| | | <u-form-item @click="showSelectBus(dataList.workStatusList, '工作状态', 'workStatusName','workStatus')" |
| | | class="form-item" labelWidth="100" label="工作状态" prop="workStatus"> |
| | | <u--input border="none" v-model="workStatusName" disabled disabledColor="#ffffff" |
| | | placeholder="请选择"> |
| | | <u-form-item class="form-item" labelWidth="100" label="工作单位地址" prop="cmpyRegAddr"> |
| | | <u--input border="none" v-model="form.cmpyRegAddr" placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | <u-form-item @click="showSelectBus('工作状态','workStatus')" class="form-item" labelWidth="100" |
| | | label="工作状态" prop="workStatus"> |
| | | <u--input border="none" v-model="selectDefaultName.workStatus" disabled |
| | | disabledColor="#ffffff" placeholder="请选择"> |
| | | </u--input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | |
| | | <u-form-item @click="showSelectBus(dataList.maritalStatusList, '婚姻状态', 'maritalStatusName','maritalStatus')" |
| | | class="form-item" labelWidth="100" label="婚姻状态" prop="maritalStatus"> |
| | | <u--input border="none" v-model="maritalStatusName" disabled disabledColor="#ffffff" |
| | | placeholder="请选择"> |
| | | <u-form-item @click="showSelectBus('婚姻状态','maritalStatus')" class="form-item" labelWidth="100" |
| | | label="婚姻状态" prop="maritalStatus"> |
| | | <u--input border="none" v-model="selectDefaultName.maritalStatus" disabled |
| | | disabledColor="#ffffff" placeholder="请选择"> |
| | | </u--input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | |
| | | <u-form-item class="form-item" labelWidth="100" label="宗教信仰" prop="religiousBelief "> |
| | | <u--input border="none" v-model="form.religiousBelief" placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | <u-form-item @click="showSelectBus('健康状态','healthStatus')" class="form-item" labelWidth="100" |
| | | label="健康状态" prop="healthStatus"> |
| | | <u--input border="none" v-model="selectDefaultName.healthStatus" disabled |
| | | disabledColor="#ffffff" placeholder="请选择"> |
| | | </u--input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | <u-form-item v-if="selectDefaultIndex.healthStatus == 2" class="form-item" labelWidth="100" |
| | | label="疾病名称" prop="diseaseName"> |
| | | <u--input border="none" v-model="form.diseaseName" placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | <u-form-item @click="showSelectBus('户籍类型','residentType')" class="form-item" labelWidth="100" |
| | | label="户籍类型" prop="residentType"> |
| | | <u--input border="none" v-model="selectDefaultName.residentType" disabled |
| | | disabledColor="#ffffff" placeholder="请选择"> |
| | | </u--input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | <u-form-item class="form-item" labelWidth="100" label="户籍登记地" prop="hukouRegistration"> |
| | | <u--input border="none" v-model="form.hukouRegistration" placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | |
| | | <u-form-item class="form-item" labelWidth="100" label="外出详址" prop="goOutAddr"> |
| | | <u--input border="none" v-model="form.goOutAddr" placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | <u-form-item class="form-item" labelWidth="100" label="外出去向" prop="goOutWhere"> |
| | | <u--input border="none" v-model="form.goOutWhere" placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | <u-form-item class="form-item" labelWidth="100" label="外出时间" prop="goOutTime" |
| | | @click="showSelectDate = true"> |
| | | <u--input border="none" v-model="form.goOutTime " disabled disabledColor="#ffffff" |
| | | placeholder="请选择"> |
| | | </u--input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | <u-form-item class="form-item" labelWidth="100" label="外出原因" prop="goOutReason "> |
| | | <u--input border="none" v-model="form.goOutReason" placeholder="请输入"> |
| | | </u--input> |
| | | </u-form-item> |
| | | <u-form-item class="form-item" labelWidth="100" label="车牌号" prop="cardNumber"> |
| | | <u--input border="none" v-model="form.cardNumber" placeholder="多个用中划线(-)隔开"> |
| | | </u--input> |
| | |
| | | <u-form-item class="form-item" labelWidth="100" label="备注" prop="remark"> |
| | | <u--input border="none" v-model="form.remark" placeholder="补充说明"> |
| | | </u--input> |
| | | </u-form-item> |
| | | |
| | | |
| | | <u-form-item class="form-item" labelWidth="100" label="籍贯地区" prop="nativePlaceAdcode"> |
| | | <view class="region"> |
| | | <picker mode="region" @change="changeNativeRegion"> |
| | | <view class="region-picker c-c0" v-if="!nativePlace"> |
| | | 请选择 |
| | | </view> |
| | | <view class="region-picker c-30" v-if="nativePlace"> |
| | | {{nativePlace}} |
| | | </view> |
| | | </picker> |
| | | </view> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | |
| | | |
| | | <u-form-item class="form-item" labelWidth="100" label="户籍地区" prop="residentAdcode"> |
| | | <view class="region"> |
| | | <picker mode="region" @change="changeHouseholdRegion"> |
| | | <view class="region-picker c-c0" v-if="!residentad"> |
| | | 请选择 |
| | | </view> |
| | | <view class="region-picker c-30" v-if="residentad"> |
| | | {{residentad}} |
| | | </view> |
| | | </picker> |
| | | </view> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | |
| | | <u-form-item class="form-item" labelWidth="100" label="居住地区" prop="homeAdcode" |
| | | @click="showRegion = true"> |
| | | <u--input border="none" v-model="homeRegion" disabled disabledColor="#ffffff" |
| | | placeholder="请选择"> |
| | | </u--input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | <u-form-item class="form-item" labelWidth="100" label="标签" @click="navTo"> |
| | | |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | </view> |
| | | </u-form> |
| | |
| | | <u-button @click="navigator" type="primary" :plain="true" text="返回首页"></u-button> |
| | | </view> |
| | | </view> --> |
| | | |
| | | <footer-btn :text="addOrUpdateTitle" @click="submit" /> |
| | | |
| | | <footer-btn :text="addOrUpdateTitle" @click="submit" /> |
| | | </view> |
| | | |
| | | <!-- 事件类型下拉框 --> |
| | | <!-- <select-bus v-if="typeShow" :show="typeShow" v-model="form[selectBusModel]" type="radio" |
| | | <!-- <select-bus v-if="typeShow" :show="typeShow" v-model="form[selectBusModel]" type="radio" |
| | | :popupTitle="selectBusTitle" :dataLists="selectBusList" @cancel="typeShow = false" @submit="typeSelect"> |
| | | </select-bus> --> |
| | | <u-picker :defaultIndex="[selectDefaultIndex[selectBusKey]]" :closeOnClickOverlay="true" v-if="typeShow" :show="typeShow" :columns="[selectBusList]" |
| | | @close="typeShow = false" @cancel="typeShow = false" keyName="name" @confirm="typeSelect"></u-picker> |
| | | <u-picker :defaultIndex="[selectDefaultIndex[selectBusKey]]" :closeOnClickOverlay="true" v-if="typeShow" |
| | | :show="typeShow" :columns="[selectBusList]" @close="typeShow = false" @cancel="typeShow = false" |
| | | keyName="name" @confirm="typeSelect"></u-picker> |
| | | |
| | | <u-datetime-picker ref="datetimePicker" :show="showSelectDate" v-model="patrolTime" mode="date" |
| | | :formatter="formatter" @confirm="confirmDate" @cancel="showSelectDate = false"></u-datetime-picker> |
| | | |
| | | <u-picker :defaultIndex="[homeIndex]" :closeOnClickOverlay="true" :show="showRegion" :columns="[regionList]" |
| | | @close="showRegion = false" @cancel="showRegion = false" keyName="name" @confirm="regionSelect"></u-picker> |
| | | |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | import selectBus from "@/components/my-components/selectBus.vue" |
| | | import uploadMixin from "@/mixin/uploadMixin"; |
| | | import { |
| | | saveOrUpdateHousehold,removeHousehold |
| | | getHouseholdDetail, |
| | | saveOrUpdateHousehold, |
| | | removeHousehold |
| | | } from '@/api/house/household.js' |
| | | import { |
| | | bizDictionary |
| | | } from '@/api/system/dict.js' |
| | | |
| | | import { |
| | | select |
| | | } from "@/api/system/region.js" |
| | | |
| | | import boxTitle from '../components/boxTitle/index2.vue' |
| | | export default { |
| | | components: { |
| | |
| | | mixins: [uploadMixin], |
| | | data() { |
| | | return { |
| | | addOrUpdateTitle:"添加", |
| | | houseCode:"", |
| | | addOrUpdateTitle: "添加", |
| | | houseCode: "", |
| | | form: { |
| | | roleName: "", |
| | | relationName: '', |
| | |
| | | typeShow: false, |
| | | roleName: "", |
| | | dataList: { |
| | | roleList: [], |
| | | relationshipList: [], |
| | | genderList:[ |
| | | { |
| | | roleType: [], |
| | | relationship: [], |
| | | gender: [{ |
| | | value: 1, |
| | | name: '男', |
| | | }, |
| | |
| | | name: '未知', |
| | | } |
| | | ], |
| | | isPrimaryContactList:[ |
| | | { |
| | | isPrimaryContact: [{ |
| | | value: 1, |
| | | name: '是', |
| | | }, |
| | |
| | | name: '否', |
| | | } |
| | | ], |
| | | residentialStatusList:[ |
| | | { |
| | | residentialStatus: [{ |
| | | value: 1, |
| | | name: '是', |
| | | }, |
| | |
| | | name: '否', |
| | | } |
| | | ], |
| | | ethnicityList:[ |
| | | |
| | | ], |
| | | educationList:[ |
| | | |
| | | ], |
| | | partyEmberList:[ |
| | | { |
| | | ethnicity: [], |
| | | education: [], |
| | | partyEmber: [{ |
| | | value: 1, |
| | | name: '是', |
| | | }, |
| | |
| | | name: '否', |
| | | } |
| | | ], |
| | | workStatusList:[ |
| | | |
| | | ], |
| | | maritalStatusList:[ |
| | | |
| | | ] |
| | | workStatus: [], |
| | | maritalStatus: [], |
| | | residentType: [], |
| | | healthStatus: [], |
| | | cardType: [] |
| | | }, |
| | | roleTypeName: '', |
| | | relationshipName: '', |
| | | genderName: '', |
| | | residentialStatusName:"", |
| | | residentialStatusName: "", |
| | | isPrimaryContactName: '', |
| | | ethnicityName: '', |
| | | educationName: '', |
| | |
| | | selectBusVal: '', |
| | | selectBusTitle: '', |
| | | selectBusModel: '', |
| | | selectBusKey:"", |
| | | selectDefaultIndex:{ |
| | | roleType:0, |
| | | relationship:0, |
| | | gender:0, |
| | | isPrimaryContact:0, |
| | | ethnicity:0, |
| | | education:0, |
| | | partyEmber:0, |
| | | workStatus:0, |
| | | maritalStatus:0 |
| | | } |
| | | selectBusKey: "", |
| | | selectDefaultIndex: { |
| | | roleType: 0, |
| | | relationship: 0, |
| | | gender: 0, |
| | | isPrimaryContact: 0, |
| | | ethnicity: 0, |
| | | education: 0, |
| | | partyEmber: 0, |
| | | workStatus: 0, |
| | | maritalStatus: 0, |
| | | cardType: 0, |
| | | healthStatus: 0, |
| | | residentType: 0 |
| | | }, |
| | | selectDefaultName: { |
| | | roleType: "", |
| | | relationship: "", |
| | | gender: "", |
| | | isPrimaryContact: "", |
| | | ethnicity: "", |
| | | education: "", |
| | | partyEmber: "", |
| | | workStatus: "", |
| | | maritalStatus: "", |
| | | cardType: "身份证", |
| | | healthStatus: "", |
| | | residentType: "" |
| | | }, |
| | | showSelectDate: false, |
| | | regionList: [], |
| | | nativePlace: "", //籍贯 |
| | | residentad: "", //户籍 |
| | | homeRegion: "", //居住地 |
| | | homeIndex: 0, |
| | | showRegion: false, |
| | | navtivePlaceDefault: [], |
| | | residentadDefault: [] |
| | | } |
| | | }, |
| | | created() { |
| | | this.getHeader() |
| | | }, |
| | | mounted() { |
| | | }, |
| | | onLoad(option) { |
| | | const data = JSON.parse(option.data) |
| | | console.log("data==>", data) |
| | | this.houseCode = data.houseCode |
| | | if(data.type == 1){ |
| | | this.getRegionList() |
| | | if (data.type == 1) { |
| | | this.addOrUpdateTitle = "保存" |
| | | this.getAllBizDict() |
| | | } |
| | | if(data.type == 2){ |
| | | if (data.type == 2) { |
| | | this.addOrUpdateTitle = "修改" |
| | | this.getHouseholdInfo(data) |
| | | } |
| | | }, |
| | | onShow() { |
| | | |
| | | }, |
| | | methods: { |
| | | async getAllBizDict(){ |
| | | |
| | | //选择籍贯 |
| | | changeNativeRegion(e) { |
| | | console.log(e); |
| | | let { |
| | | code, |
| | | value |
| | | } = e.detail; |
| | | this.nativePlace = `${value[0]}${value[1]}${value[2]}` |
| | | this.form.nativePlaceAdcode = code[2]; |
| | | |
| | | }, |
| | | |
| | | //选择户籍 |
| | | changeHouseholdRegion(e) { |
| | | let { |
| | | code, |
| | | value |
| | | } = e.detail; |
| | | this.residentad = `${value[0]}${value[1]}${value[2]}` |
| | | this.form.residentAdcode = code[2]; |
| | | }, |
| | | |
| | | |
| | | getRegionList() { |
| | | select(361102).then(res => { |
| | | console.log(res); |
| | | if (res.code == 200) { |
| | | this.regionList = res.data; |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | |
| | | regionSelect(e) { |
| | | console.log(e); |
| | | const [result] = e.value; |
| | | this.homeIndex = e.indexs[0]; |
| | | this.homeRegion = result.name; |
| | | this.form.homeAdcode = result.code; |
| | | this.showRegion = false; |
| | | }, |
| | | |
| | | |
| | | async getAllBizDict() { |
| | | // 获取角色关系字典 |
| | | await this.getBizDict('roleRelation',this.dataList.relationshipList) |
| | | await this.getBizDict('roleRelation', this.dataList.relationship) |
| | | // 获取角色字典 |
| | | await this.getBizDict('roleType',this.dataList.roleList) |
| | | await this.getBizDict('roleType', this.dataList.roleType) |
| | | // 获取民族字典 |
| | | await this.getBizDict('nationType',this.dataList.ethnicityList) |
| | | await this.getBizDict('nationType', this.dataList.ethnicity) |
| | | // 获取学历字典 |
| | | await this.getBizDict('educationType',this.dataList.educationList) |
| | | await this.getBizDict('educationType', this.dataList.education) |
| | | // 获取工作状态字典 |
| | | await this.getBizDict('workStatusType',this.dataList.workStatusList) |
| | | await this.getBizDict('workStatusType', this.dataList.workStatus) |
| | | // 获取婚姻状态字典 |
| | | await this.getBizDict('marriageStatusType',this.dataList.maritalStatusList) |
| | | await this.getBizDict('marriageStatusType', this.dataList.maritalStatus) |
| | | // 户籍类别的字典 |
| | | await this.getBizDict('residentType', this.dataList.residentType) |
| | | // 健康状况的字典 |
| | | await this.getBizDict('healthStatus', this.dataList.healthStatus) |
| | | //证件类型字典 |
| | | await this.getBizDict('cardType', this.dataList.cardType) |
| | | |
| | | }, |
| | | // 获取业务字典 |
| | | async getBizDict(code,list){ |
| | | async getBizDict(code, list) { |
| | | const param = { |
| | | code: code |
| | | } |
| | | const res = await bizDictionary(param) |
| | | res.data.forEach(e=>{ |
| | | res.data.forEach(e => { |
| | | list.push({ |
| | | name:e.dictValue, |
| | | value:Number(e.dictKey) |
| | | name: e.dictValue, |
| | | value: Number(e.dictKey) |
| | | }) |
| | | }) |
| | | }, |
| | | // 获取住户信息 |
| | | async getHouseholdInfo(data){ |
| | | async getHouseholdInfo(data) { |
| | | // 获取所有字典 |
| | | await this.getAllBizDict() |
| | | this.form = data |
| | | // this.roleTypeName = this.findObjValue(data.roleType, this.dataList.roleList) |
| | | // this.relationshipName = this.findObjValue(data.relationship, this.dataList.relationshipList) |
| | | // this.genderName = this.findObjValue(data.gender, this.dataList.genderList) |
| | | // this.isPrimaryContactName = this.findObjValue(data.isPrimaryContact, this.dataList.isPrimaryContactList) |
| | | // this.ethnicityName = this.findObjValue(data.ethnicity, this.dataList.ethnicityList) |
| | | // this.educationName = this.findObjValue(data.education, this.dataList.educationList) |
| | | // this.partyEmberName = this.findObjValue(data.partyEmber, this.dataList.partyEmberList) |
| | | // this.workStatusName = this.findObjValue(data.workStatus, this.dataList.workStatusList) |
| | | // this.maritalStatusName = this.findObjValue(data.maritalStatus, this.dataList.maritalStatusList) |
| | | |
| | | this.roleTypeName = this.findObjValue(data.roleType, this.dataList.roleList).name |
| | | this.selectDefaultIndex.roleType = this.findObjValue(data.roleType, this.dataList.roleList).index; |
| | | this.relationshipName = this.findObjValue(data.relationship, this.dataList.relationshipList).name; |
| | | this.selectDefaultIndex.relationship = this.findObjValue(data.relationship, this.dataList.relationshipList).index; |
| | | this.genderName = this.findObjValue(data.gender, this.dataList.genderList).name; |
| | | this.selectDefaultIndex.gender = this.findObjValue(data.gender, this.dataList.genderList).index; |
| | | this.isPrimaryContactName = this.findObjValue(data.isPrimaryContact, this.dataList.isPrimaryContactList).name; |
| | | this.selectDefaultIndex.isPrimaryContact = this.findObjValue(data.isPrimaryContact, this.dataList.isPrimaryContactList).index; |
| | | this.ethnicityName = this.findObjValue(data.ethnicity, this.dataList.ethnicityList).name; |
| | | this.selectDefaultIndex.ethnicity = this.findObjValue(data.ethnicity, this.dataList.ethnicityList).index; |
| | | this.educationName = this.findObjValue(data.education, this.dataList.educationList).name; |
| | | this.selectDefaultIndex.education = this.findObjValue(data.education, this.dataList.educationList).index; |
| | | this.partyEmberName = this.findObjValue(data.partyEmber, this.dataList.partyEmberList).name; |
| | | this.selectDefaultIndex.partyEmber = this.findObjValue(data.partyEmber, this.dataList.partyEmberList).index; |
| | | this.workStatusName = this.findObjValue(data.workStatus, this.dataList.workStatusList).name; |
| | | this.selectDefaultIndex.workStatus = this.findObjValue(data.workStatus, this.dataList.workStatusList).index; |
| | | this.maritalStatusName = this.findObjValue(data.maritalStatus, this.dataList.maritalStatusList).name; |
| | | this.selectDefaultIndex.maritalStatus = this.findObjValue(data.maritalStatus, this.dataList.maritalStatusList).index; |
| | | |
| | | // this.form = data |
| | | getHouseholdDetail({ |
| | | id: data.id |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | this.form = res.data; |
| | | let data = res.data; |
| | | for (let i in this.selectDefaultIndex) { |
| | | let { |
| | | index, |
| | | name |
| | | } = this.findObjValue(data[i], this.dataList[i]) |
| | | this.selectDefaultIndex[i] = index; |
| | | this.selectDefaultName[i] = name; |
| | | } |
| | | |
| | | if (data.idCard && !data.cardType) { |
| | | this.$set(this.form, "cardType", this.dataList.cardType[0].dictKey) |
| | | this.$set(this.selectDefaultIndex, "cardType", 0) |
| | | this.$set(this.selectDefaultName, "cardType", "身份证") |
| | | } |
| | | if (data.nativePlaceAdName) { |
| | | this.nativePlace = |
| | | `${data.nativePlaceProvinceAdName}${data.nativePlaceCityAdName}${data.nativePlaceAdName}` |
| | | this.navtivePlaceDefault = [data.nativePlaceProvinceAdName, data |
| | | .nativePlaceCityAdName, data.nativePlaceAdName |
| | | ] |
| | | } |
| | | if (data.residentAdName) { |
| | | this.residentad = |
| | | `${data.residentProvinceAdName}${data.residentCityAdName}${data.residentAdName}` |
| | | this.residentadDefault = [data.residentProvinceAdName, data.residentCityAdName, |
| | | data.residentAdName |
| | | ] |
| | | } |
| | | |
| | | if (data.homeAdcode) { |
| | | let { |
| | | index, |
| | | name |
| | | } = this.findObjValue(data.homeAdcode, this.regionList, "code") |
| | | this.homeIndex = index; |
| | | this.homeRegion = name; |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // 显示选择弹框 |
| | | showSelectBus(data, title, model, key) { |
| | | this.selectBusList = data |
| | | showSelectBus(title, key) { |
| | | this.selectBusList = this.dataList[key] |
| | | this.selectBusTitle = title |
| | | this.selectBusModel = model |
| | | // this.selectBusModel = model |
| | | this.selectBusKey = key |
| | | this.typeShow = true |
| | | }, |
| | | //类型选择确认 |
| | | typeSelect(item) { |
| | | const [ result ] = item.value |
| | | this[this.selectBusModel] = result.name |
| | | const [result] = item.value |
| | | // this[this.selectBusModel] = result.name |
| | | this.form[this.selectBusKey] = result.value |
| | | this.selectDefaultName[this.selectBusKey] = result.name; |
| | | this.selectDefaultIndex[this.selectBusKey] = item.indexs[0]; |
| | | this.typeShow = !this.typeShow |
| | | }, |
| | |
| | | async saveOrUpdate() { |
| | | this.form['houseCode'] = this.houseCode |
| | | // 字典解析 |
| | | const roleTypeIndex = this.dataList.roleList.findIndex(item => item.name === this.roleTypeName) |
| | | const relationshipIndex = this.dataList.relationshipList.findIndex(item => item.name === this.relationshipName) |
| | | const genderIndex = this.dataList.genderList.findIndex(item => item.name === this.genderName) |
| | | const isPrimaryContactIndex = this.dataList.isPrimaryContactList.findIndex(item => item.name === this.isPrimaryContactName) |
| | | const ethnicityIndex = this.dataList.ethnicityList.findIndex(item => item.name === this.ethnicityName) |
| | | const educationIndex = this.dataList.educationList.findIndex(item => item.name === this.educationName) |
| | | const partyEmberIndex = this.dataList.partyEmberList.findIndex(item => item.name === this.partyEmberName) |
| | | const workStatusIndex = this.dataList.workStatusList.findIndex(item => item.name === this.workStatusName) |
| | | const maritalStatusIndex = this.dataList.maritalStatusList.findIndex(item => item.name === this.maritalStatusName) |
| | | |
| | | this.form['roleType'] = roleTypeIndex >=0 ? this.dataList.roleList[roleTypeIndex].value : "" |
| | | this.form['relationship'] = relationshipIndex >=0 ? this.dataList.relationshipList[relationshipIndex].value: "" |
| | | this.form['gender'] = genderIndex >=0 ?this.dataList.genderList[genderIndex].value: "" |
| | | this.form['isPrimaryContact'] = isPrimaryContactIndex >=0 ?this.dataList.isPrimaryContactList[isPrimaryContactIndex].value: "" |
| | | this.form['ethnicity'] = ethnicityIndex >=0 ?this.dataList.ethnicityList[ethnicityIndex].value: "" |
| | | this.form['education'] = educationIndex >=0 ?this.dataList.educationList[educationIndex].value: "" |
| | | this.form['partyEmber'] = partyEmberIndex >=0 ?this.dataList.partyEmberList[partyEmberIndex].value:"" |
| | | this.form['workStatus'] = workStatusIndex >=0 ?this.dataList.workStatusList[workStatusIndex].value:"" |
| | | this.form['maritalStatus'] = maritalStatusIndex >=0 ?this.dataList.maritalStatusList[maritalStatusIndex].value:"" |
| | | // const roleTypeIndex = this.dataList.roleList.findIndex(item => item.name === this.roleTypeName) |
| | | // const relationshipIndex = this.dataList.relationshipList.findIndex(item => item.name === this |
| | | // .relationshipName) |
| | | // const genderIndex = this.dataList.genderList.findIndex(item => item.name === this.genderName) |
| | | // const isPrimaryContactIndex = this.dataList.isPrimaryContactList.findIndex(item => item.name === this |
| | | // .isPrimaryContactName) |
| | | // const ethnicityIndex = this.dataList.ethnicityList.findIndex(item => item.name === this.ethnicityName) |
| | | // const educationIndex = this.dataList.educationList.findIndex(item => item.name === this.educationName) |
| | | // const partyEmberIndex = this.dataList.partyEmberList.findIndex(item => item.name === this |
| | | // .partyEmberName) |
| | | // const workStatusIndex = this.dataList.workStatusList.findIndex(item => item.name === this |
| | | // .workStatusName) |
| | | // const maritalStatusIndex = this.dataList.maritalStatusList.findIndex(item => item.name === this |
| | | // .maritalStatusName) |
| | | |
| | | // this.form['roleType'] = roleTypeIndex >= 0 ? this.dataList.roleList[roleTypeIndex].value : "" |
| | | // this.form['relationship'] = relationshipIndex >= 0 ? this.dataList.relationshipList[relationshipIndex] |
| | | // .value : "" |
| | | // this.form['gender'] = genderIndex >= 0 ? this.dataList.genderList[genderIndex].value : "" |
| | | // this.form['isPrimaryContact'] = isPrimaryContactIndex >= 0 ? this.dataList.isPrimaryContactList[ |
| | | // isPrimaryContactIndex].value : "" |
| | | // this.form['ethnicity'] = ethnicityIndex >= 0 ? this.dataList.ethnicityList[ethnicityIndex].value : "" |
| | | // this.form['education'] = educationIndex >= 0 ? this.dataList.educationList[educationIndex].value : "" |
| | | // this.form['partyEmber'] = partyEmberIndex >= 0 ? this.dataList.partyEmberList[partyEmberIndex].value : |
| | | // "" |
| | | // this.form['workStatus'] = workStatusIndex >= 0 ? this.dataList.workStatusList[workStatusIndex].value : |
| | | // "" |
| | | // this.form['maritalStatus'] = maritalStatusIndex >= 0 ? this.dataList.maritalStatusList[ |
| | | // maritalStatusIndex].value : "" |
| | | |
| | | const res = await saveOrUpdateHousehold(this.form) |
| | | if (res.code !== 200) { |
| | |
| | | } |
| | | }) |
| | | }, |
| | | findObjValue(value, obj) { |
| | | // if(value){ |
| | | // const res = obj.find(item => { |
| | | // return item.value == value |
| | | // }) |
| | | // return res.name |
| | | // } |
| | | // return "" |
| | | |
| | | confirmDate(e) { |
| | | this.showSelectDate = false; |
| | | this.form.goOutTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd') |
| | | }, |
| | | |
| | | findObjValue(value, obj, key = "value") { |
| | | let data = { |
| | | index: "", |
| | | name:"" |
| | | name: "" |
| | | } |
| | | for(let i =0,ii = obj.length;i<ii;i++){ |
| | | if(value == obj[i].value){ |
| | | for (let i = 0, ii = obj.length; i < ii; i++) { |
| | | if (value == obj[i][key]) { |
| | | data.index = i; |
| | | data.name = obj[i].name; |
| | | } |
| | |
| | | navigator() { |
| | | this.$u.func.globalNavigator("/subPackage/bs/views/bsList") |
| | | }, |
| | | |
| | | navTo() { |
| | | let data = JSON.parse(JSON.stringify(this.form)); |
| | | this.$u.func.globalNavigator( |
| | | `/subPackage/bs/views/bsList?data=${JSON.stringify(data)}`) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | display: flex; |
| | | flex-direction: column; |
| | | background: #F5F5F5; |
| | | |
| | | |
| | | |
| | | |
| | | .main { |
| | | // position: relative; |
| | | // flex: 1; |
| | |
| | | margin: 20rpx 30rpx; |
| | | padding: 30rpx; |
| | | border-radius: 8rpx; |
| | | |
| | | /deep/ .u-form-item { |
| | | background-color: #ffffff; |
| | | padding: 5px 20px; |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | .region { |
| | | width: 100%; |
| | | height: 100%; |
| | | |
| | | .region-picker { |
| | | width: 100%; |
| | | heght: 100%; |
| | | } |
| | | |
| | | .c-c0 { |
| | | color: #c0c4cc |
| | | } |
| | | |
| | | .c-30 { |
| | | color: #303133; |
| | | } |
| | | |
| | | } |
| | | </style> |