居民档案调整完成
This commit is contained in:
@@ -1,9 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="AiEditCard">
|
<section class="AiEditCard">
|
||||||
<ai-card v-bind="{...$props,...$attrs}">
|
<ai-card v-bind="{...$props,...$attrs}">
|
||||||
|
<template v-if="showBtn" #right>
|
||||||
|
<template v-if="edit">
|
||||||
|
<el-button type="text" @click="handleCancel">取消</el-button>
|
||||||
|
<el-button type="text" @click="handleSave">保存</el-button>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<el-button type="text" icon="iconfont iconEdit" @click="edit=true">修改</el-button>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
<slot name="edit"/>
|
<slot v-if="edit" name="edit"/>
|
||||||
<slot/>
|
<slot v-else/>
|
||||||
</template>
|
</template>
|
||||||
</ai-card>
|
</ai-card>
|
||||||
</section>
|
</section>
|
||||||
@@ -13,15 +22,29 @@
|
|||||||
export default {
|
export default {
|
||||||
name: "AiEditCard",
|
name: "AiEditCard",
|
||||||
props: {
|
props: {
|
||||||
editable:{default:false}
|
editable: Boolean,
|
||||||
|
showBtn: {default: true}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
editable: false
|
edit: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleSave() {
|
||||||
|
if (this.$listeners.save) {
|
||||||
|
this.$emit('save', () => this.edit = false)
|
||||||
|
} else this.edit = false
|
||||||
|
},
|
||||||
|
handleCancel() {
|
||||||
|
if (this.$listeners.cancel) {
|
||||||
|
this.$emit('cancel')
|
||||||
|
this.edit = false
|
||||||
|
} else this.edit = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {},
|
|
||||||
created() {
|
created() {
|
||||||
|
this.edit = this.editable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="addAborigines">
|
<section class="localResident">
|
||||||
<ai-detail>
|
<ai-detail>
|
||||||
<ai-title slot="title" :title="showDetail?'本地居民信息':'添加本地居民'" isShowBack @onBackClick="$router.push({query:{}})"
|
<ai-title slot="title" :title="pageTitle" isShowBack @onBackClick="back" isShowBottomBorder>
|
||||||
isShowBottomBorder>
|
|
||||||
<template v-if="showDetail" #rightBtn>
|
<template v-if="showDetail" #rightBtn>
|
||||||
<el-button @click="beforeWriteOff()" icon="el-icon-switch-button" v-if="baseInfo.fileStatus==0">注销档案
|
<el-button @click="beforeWriteOff()" icon="el-icon-switch-button" v-if="baseInfo.fileStatus==0">注销档案
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -14,27 +13,11 @@
|
|||||||
<template #content>
|
<template #content>
|
||||||
<el-form class="content-right" :model="baseInfo" ref="ruleForm" :rules="rules" label-width="130px"
|
<el-form class="content-right" :model="baseInfo" ref="ruleForm" :rules="rules" label-width="130px"
|
||||||
label-position="right" size="small">
|
label-position="right" size="small">
|
||||||
|
<el-tabs tab-position="left" v-if="showDetail">
|
||||||
<ai-card title="基本信息">
|
<el-tab-pane label="基本信息">
|
||||||
<template v-if="showDetail" #right>
|
<ai-edit-card title="基本信息" :show-btn="permissions('app_appresident_edit')"
|
||||||
<template v-if="$permissions('app_appresident_edit')">
|
@save="saveFrom" @cancel="getDetail(baseInfo.id)">
|
||||||
<el-button
|
<template #edit>
|
||||||
type="text"
|
|
||||||
class="iconfont iconEdit"
|
|
||||||
@click="editInit(),showEdit1=true;"
|
|
||||||
v-if="!showEdit1"
|
|
||||||
> 修改
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
<el-button
|
|
||||||
type="text"
|
|
||||||
@click="showEdit1=false,searchDetail(baseInfo.id)"
|
|
||||||
v-if="showEdit1"
|
|
||||||
>取消
|
|
||||||
</el-button>
|
|
||||||
<el-button type="text" v-if="showEdit1" @click="saveFrom('ruleForm')">保存</el-button>
|
|
||||||
</template>
|
|
||||||
<div slot="content" v-if="showEdit1">
|
|
||||||
<div class="above">
|
<div class="above">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<el-form-item label="姓名:" prop="name">
|
<el-form-item label="姓名:" prop="name">
|
||||||
@@ -43,11 +26,10 @@
|
|||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
size="small"
|
size="small"
|
||||||
placeholder="请输入姓名"
|
placeholder="请输入姓名"
|
||||||
v-if="showEdit1"
|
|
||||||
maxlength="20"
|
maxlength="20"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
:disabled="!!showDetail"
|
:disabled="!!showDetail"
|
||||||
></el-input>
|
/>
|
||||||
<!-- <p v-else>{{baseInfo.name||'-'}}</p> -->
|
<!-- <p v-else>{{baseInfo.name||'-'}}</p> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="身份证号:" prop="idNumber">
|
<el-form-item label="身份证号:" prop="idNumber">
|
||||||
@@ -56,7 +38,6 @@
|
|||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
size="small"
|
size="small"
|
||||||
placeholder="请输入身份证号"
|
placeholder="请输入身份证号"
|
||||||
v-if="showEdit1"
|
|
||||||
:maxlength="18"
|
:maxlength="18"
|
||||||
@input="idChange"
|
@input="idChange"
|
||||||
:disabled="!!showDetail"
|
:disabled="!!showDetail"
|
||||||
@@ -84,53 +65,29 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<el-form-item label="个人照片:" prop="photo">
|
<el-form-item label="个人照片:" prop="photo">
|
||||||
<!-- <div class="pictrue">
|
<ai-avatar :instance="instance" v-model="baseInfo.photo"/>
|
||||||
<img :src="imgUrl" alt="" title=""></img>
|
|
||||||
<el-upload
|
|
||||||
v-if="showEdit1"
|
|
||||||
class="upload-demo"
|
|
||||||
action
|
|
||||||
multiple
|
|
||||||
accept=".png,.jpg"
|
|
||||||
:http-request="uploadFile"
|
|
||||||
:show-file-list="false"
|
|
||||||
:on-change="handleChange"
|
|
||||||
:file-list="fileList"
|
|
||||||
>
|
|
||||||
<el-button >上传照片</el-button>
|
|
||||||
<div slot="tip" class="el-upload__tip">
|
|
||||||
图片大小不能超过2M
|
|
||||||
</div>
|
|
||||||
</el-upload>
|
|
||||||
</div>-->
|
|
||||||
<ai-avatar :instance="instance" v-if="showEdit1" v-model="baseInfo.photo"/>
|
|
||||||
<ai-avatar v-model="baseInfo.photo" v-else :editable="false"/>
|
|
||||||
<!--<ai-avatar :instance="instance" v-model="baseInfo.photo"/>-->
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="above">
|
<div class="above">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<el-form-item label="出生日期:" prop="birthday">
|
<el-form-item label="出生日期:">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-if="showEdit1"
|
|
||||||
disabled
|
disabled
|
||||||
:editable="false"
|
:editable="false"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
format="yyyy-MM-dd"
|
format="yyyy-MM-dd"
|
||||||
v-model="birthday"
|
v-model="baseInfo.birthday"
|
||||||
type="date"
|
type="date"
|
||||||
|
|
||||||
placeholder="选择日期"
|
placeholder="选择日期"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
<!-- <p v-else>{{birthday?birthday.substring(0, 10):"-"}}</p> -->
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="文化程度:" prop="education">
|
<el-form-item label="文化程度:" prop="education">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="baseInfo.education"
|
v-model="baseInfo.education"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
|
|
||||||
v-if="showEdit1"
|
|
||||||
clearable
|
clearable
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -147,7 +104,6 @@
|
|||||||
v-model="baseInfo.politicsStatus"
|
v-model="baseInfo.politicsStatus"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
|
|
||||||
v-if="showEdit1"
|
|
||||||
clearable
|
clearable
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -164,7 +120,6 @@
|
|||||||
v-model="baseInfo.job"
|
v-model="baseInfo.job"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
|
|
||||||
v-if="showEdit1"
|
|
||||||
clearable
|
clearable
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -181,7 +136,6 @@
|
|||||||
v-model="baseInfo.faithType"
|
v-model="baseInfo.faithType"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
|
|
||||||
v-if="showEdit1"
|
|
||||||
clearable
|
clearable
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -202,7 +156,6 @@
|
|||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
size="small"
|
size="small"
|
||||||
placeholder="请输入年龄"
|
placeholder="请输入年龄"
|
||||||
v-if="showEdit1"
|
|
||||||
type="number"
|
type="number"
|
||||||
@mousewheel.native.prevent
|
@mousewheel.native.prevent
|
||||||
></el-input>
|
></el-input>
|
||||||
@@ -213,7 +166,6 @@
|
|||||||
v-model="baseInfo.nation"
|
v-model="baseInfo.nation"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
|
|
||||||
v-if="showEdit1"
|
|
||||||
clearable
|
clearable
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -230,7 +182,6 @@
|
|||||||
v-model="baseInfo.maritalStatus"
|
v-model="baseInfo.maritalStatus"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
|
|
||||||
v-if="showEdit1"
|
|
||||||
clearable
|
clearable
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -247,7 +198,6 @@
|
|||||||
v-model="baseInfo.militaryStatus"
|
v-model="baseInfo.militaryStatus"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
|
|
||||||
v-if="showEdit1"
|
|
||||||
clearable
|
clearable
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -267,15 +217,13 @@
|
|||||||
clearable
|
clearable
|
||||||
always-show
|
always-show
|
||||||
:instance="instance"
|
:instance="instance"
|
||||||
v-if="showEdit1"
|
|
||||||
v-model="baseInfo.birthplaceAreaId"
|
v-model="baseInfo.birthplaceAreaId"
|
||||||
:areaLevel="3"
|
:areaLevel="3"
|
||||||
></ai-area-select>
|
/>
|
||||||
<!-- <p v-if="!showEdit1">{{baseInfo.birthplaceAreaName||'-'}}</p> -->
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</template>
|
||||||
<div slot="content" v-else>
|
<template>
|
||||||
<el-row type="flex">
|
<el-row type="flex">
|
||||||
<div class="detail-info fill">
|
<div class="detail-info fill">
|
||||||
<h3 class="name">{{ baseInfo.name || '-' }}</h3>
|
<h3 class="name">{{ baseInfo.name || '-' }}</h3>
|
||||||
@@ -286,7 +234,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<span class="label">出生日期:</span>
|
<span class="label">出生日期:</span>
|
||||||
<span class="value">{{ birthday ? birthday.substring(0, 10) : '-' }}</span>
|
<span class="value" v-text="baseInfo.birthday||'-'"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<span class="label">籍贯:</span>
|
<span class="label">籍贯:</span>
|
||||||
@@ -342,77 +290,44 @@
|
|||||||
</div>
|
</div>
|
||||||
<ai-avatar v-model="baseInfo.photo" :editable="false"/>
|
<ai-avatar v-model="baseInfo.photo" :editable="false"/>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
|
||||||
</ai-card>
|
|
||||||
|
|
||||||
<ai-card title="联络信息">
|
|
||||||
<template v-if="showDetail" #right>
|
|
||||||
<template v-if="$permissions('app_appresident_edit')">
|
|
||||||
<el-button
|
|
||||||
type="text"
|
|
||||||
class="iconfont iconEdit"
|
|
||||||
@click="editInit(),showEdit2=true;"
|
|
||||||
v-if="!showEdit2">
|
|
||||||
修改
|
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
<el-button
|
</ai-edit-card>
|
||||||
type="text"
|
<ai-edit-card title="联络信息" :show-btn="permissions('app_appresident_edit')"
|
||||||
@click="showEdit2=false,searchDetail(baseInfo.id)"
|
@save="saveFrom" @cancel="getDetail(baseInfo.id)">
|
||||||
v-if="showEdit2">
|
<template #edit>
|
||||||
取消
|
|
||||||
</el-button>
|
|
||||||
<el-button type="text" v-if="showEdit2" @click="saveFrom('ruleForm')">保存</el-button>
|
|
||||||
</template>
|
|
||||||
<div slot="content" v-if="showEdit2">
|
|
||||||
<div class="above">
|
<div class="above">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<el-form-item label="联系方式:" prop="phone">
|
<el-form-item label="联系方式:" prop="phone">
|
||||||
<el-input v-model="baseInfo.phone" size="small" placeholder="请输入联系方式" v-if="showEdit2"
|
<el-input v-model="baseInfo.phone" size="small" placeholder="请输入联系方式" :maxlength="11"
|
||||||
:maxlength="11"/>
|
show-word-limit/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-form-item label="现住址:" prop="currentAreaId">
|
<el-form-item label="现住址:" prop="currentAreaId">
|
||||||
<ai-area-select clearable always-show :instance="instance" :disabled-level="disabledLevel" v-model="baseInfo.currentAreaId"
|
<ai-area-select clearable always-show :instance="instance" :disabled-level="disabledLevel"
|
||||||
|
v-model="baseInfo.currentAreaId"
|
||||||
:valueLevel="4"/>
|
:valueLevel="4"/>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="baseInfo.currentAddress" placeholder="详细地址" maxlength="30" show-word-limit clearable/>
|
<el-input v-model="baseInfo.currentAddress" placeholder="详细地址" maxlength="30" show-word-limit
|
||||||
|
clearable/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</template>
|
||||||
<div slot="content" v-else style="margin-top: 16px;margin-bottom:24px">
|
<template>
|
||||||
<div class="info" style="margin-bottom:8px">
|
<div class="info" style="margin-bottom:8px">
|
||||||
<span class="label">联系方式:</span>
|
<span class="label">联系方式:</span>
|
||||||
<span class="value">{{ baseInfo.phone || '-' }}</span>
|
<span class="value">{{ baseInfo.phone || '-' }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<span class="label">现住址:</span>
|
<span class="label">现住址:</span>
|
||||||
<span class="value">{{ baseInfo.currentAreaName + baseInfo.currentAddress || "-" }}</span>
|
<span class="value">{{ [baseInfo.currentAreaName, baseInfo.currentAddress].join("") || "-" }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</template>
|
||||||
</ai-card>
|
</ai-edit-card>
|
||||||
|
<ai-edit-card title="户籍信息" :show-btn="permissions('app_appresident_edit')"
|
||||||
|
@save="saveFrom" @cancel="getDetail(baseInfo.id)">
|
||||||
|
<template #edit>
|
||||||
|
|
||||||
<ai-card title="户籍信息">
|
|
||||||
<template v-if="showDetail" #right>
|
|
||||||
<template v-if="$permissions('app_appresident_edit')">
|
|
||||||
<el-button
|
|
||||||
type="text"
|
|
||||||
class="iconfont iconEdit"
|
|
||||||
@click="editInit(),showEdit3=true;"
|
|
||||||
v-if="!showEdit3"
|
|
||||||
> 修改
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
<el-button
|
|
||||||
type="text"
|
|
||||||
@click="showEdit3=false,searchDetail(baseInfo.id)"
|
|
||||||
v-if="showEdit3"
|
|
||||||
>取消
|
|
||||||
</el-button>
|
|
||||||
<el-button type="text" v-if="showEdit3" @click="saveFrom('ruleForm')">保存</el-button>
|
|
||||||
</template>
|
|
||||||
<div slot="content" v-if="showEdit3">
|
|
||||||
<div class="above">
|
<div class="above">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<el-form-item label="是否户主:" prop="householdName">
|
<el-form-item label="是否户主:" prop="householdName">
|
||||||
@@ -423,7 +338,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="与户主关系:" prop="householdRelation" v-if="baseInfo.householdName==0">
|
<el-form-item label="与户主关系:" prop="householdRelation" v-if="baseInfo.householdName==0">
|
||||||
<el-select v-model="baseInfo.householdRelation" placeholder="请选择" v-if="showEdit3" clearable>
|
<el-select v-model="baseInfo.householdRelation" placeholder="请选择" clearable>
|
||||||
<el-option v-for="(item,i) in dict.getDict('householdRelation')"
|
<el-option v-for="(item,i) in dict.getDict('householdRelation')"
|
||||||
:label="item.dictName" :key="i" :value="item.dictValue"/>
|
:label="item.dictName" :key="i" :value="item.dictValue"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
@@ -431,19 +346,20 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<el-form-item label="户主身份证号:" prop="householdIdNumber" v-if="baseInfo.householdName==0">
|
<el-form-item label="户主身份证号:" prop="householdIdNumber" v-if="baseInfo.householdName==0">
|
||||||
<el-input v-model="baseInfo.householdIdNumber" placeholder="请输入户主身份证号" :maxlength="18" clearable/>
|
<el-input v-model="baseInfo.householdIdNumber" placeholder="请输入户主身份证号" :maxlength="18"
|
||||||
|
clearable/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-form-item label="户籍地:" prop="householdAreaId">
|
<el-form-item label="户籍地:" prop="householdAreaId">
|
||||||
<ai-area-select clearable always-show :instance="instance" v-if="showEdit3"
|
<ai-area-select clearable always-show :instance="instance" v-model="baseInfo.householdAreaId"/>
|
||||||
v-model="baseInfo.householdAreaId" />
|
|
||||||
<el-form-item v-if="baseInfo.householdAreaId">
|
<el-form-item v-if="baseInfo.householdAreaId">
|
||||||
<el-input v-model="baseInfo.householdAddress" placeholder="详细地址" maxlength="30" show-word-limit clearable/>
|
<el-input v-model="baseInfo.householdAddress" placeholder="详细地址" maxlength="30" show-word-limit
|
||||||
|
clearable/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</template>
|
||||||
<div slot="content" v-else style="margin-top: 16px;margin-bottom:24px">
|
<template>
|
||||||
<div class="detail-info">
|
<div class="detail-info">
|
||||||
<div class="detail-left fill">
|
<div class="detail-left fill">
|
||||||
<div class="info">
|
<div class="info">
|
||||||
@@ -453,7 +369,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="info fill" v-if="baseInfo.householdName==0">
|
<div class="info fill" v-if="baseInfo.householdName==0">
|
||||||
<span class="label">与户主关系:</span>
|
<span class="label">与户主关系:</span>
|
||||||
<span class="value">{{ dict.getLabel('householdRelation', baseInfo.householdRelation) || '-' }}</span>
|
<span class="value">{{
|
||||||
|
dict.getLabel('householdRelation', baseInfo.householdRelation) || '-'
|
||||||
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="info fill" v-if="baseInfo.householdName==0">
|
<div class="info fill" v-if="baseInfo.householdName==0">
|
||||||
<span class="label">户主身份证号:</span>
|
<span class="label">户主身份证号:</span>
|
||||||
@@ -468,11 +386,10 @@
|
|||||||
{{ baseInfo.householdAreaName + (baseInfo.householdAddress ? baseInfo.householdAddress : "") }}
|
{{ baseInfo.householdAreaName + (baseInfo.householdAddress ? baseInfo.householdAddress : "") }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</template>
|
||||||
</ai-card>
|
</ai-edit-card>
|
||||||
|
<ai-card title="家庭成员">
|
||||||
<ai-card title="家庭成员" v-if="showDetail">
|
<div slot="content">
|
||||||
<div slot="content" v-if="showDetail">
|
|
||||||
<el-table
|
<el-table
|
||||||
border
|
border
|
||||||
ref="multipleTable"
|
ref="multipleTable"
|
||||||
@@ -518,6 +435,56 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</ai-card>
|
</ai-card>
|
||||||
|
<ai-edit-card title="标签信息" :show-btn="permissions('app_appresident_edit')"
|
||||||
|
@save="saveFrom" @cancel="getDetail(baseInfo.id)">
|
||||||
|
<template #edit>
|
||||||
|
<el-form-item label-width="0">
|
||||||
|
<el-checkbox label="1">标签1</el-checkbox>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<template>
|
||||||
|
<el-tag effect="dark">标签二</el-tag>
|
||||||
|
</template>
|
||||||
|
</ai-edit-card>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="资产信息" lazy>
|
||||||
|
<ai-edit-card title="车辆信息" :show-btn="permissions('app_appresident_edit')"
|
||||||
|
@save="saveFrom" @cancel="getDetail(baseInfo.id)">
|
||||||
|
<template>
|
||||||
|
<el-form-item label-width="0">
|
||||||
|
<span v-for="car in baseInfo.cars" :key="car.id" v-text="car.license"/>
|
||||||
|
<ai-empty v-if="baseInfo.cars.length==0"/>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<template #edit>
|
||||||
|
<el-form-item label-width="0" prop="cars">
|
||||||
|
<el-input v-for="(car,i) in baseInfo.cars" :key="car.id" v-model="car.license" clearable
|
||||||
|
placeholder="请输入车牌号">
|
||||||
|
<el-button slot="append" type="text" @click="baseInfo.cars.splice(i,1)">删除</el-button>
|
||||||
|
</el-input>
|
||||||
|
<el-button type="text" @click="baseInfo.cars.push({})">新增车辆</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</ai-edit-card>
|
||||||
|
<ai-edit-card title="房屋信息" :show-btn="permissions('app_appresident_edit')"
|
||||||
|
@save="saveFrom" @cancel="getDetail(baseInfo.id)">
|
||||||
|
<template>
|
||||||
|
<el-form-item label-width="0">
|
||||||
|
<span v-for="house in baseInfo.houseList" :key="house.id"
|
||||||
|
v-text="[house.areaName,house.address].join('')"/>
|
||||||
|
<ai-empty v-if="baseInfo.houseList.length==0"/>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<template #edit>
|
||||||
|
<div v-for="house in baseInfo.houseList" :key="house.id">
|
||||||
|
<ai-area-get v-model="house.areaId" :instance="instance"/>
|
||||||
|
<el-input v-model="house.address" clearable placeholder="请输入详情地址" size="small"/>
|
||||||
|
</div>
|
||||||
|
<el-button type="text" @click="baseInfo.houseList.push({})">新增房屋</el-button>
|
||||||
|
</template>
|
||||||
|
</ai-edit-card>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="特殊人群" lazy v-if="hasSpecial">
|
||||||
<ai-card v-for="(item, index) in baseInfo.tsrqInfos" :key="index" :title="item.applicationName">
|
<ai-card v-for="(item, index) in baseInfo.tsrqInfos" :key="index" :title="item.applicationName">
|
||||||
<ai-wrapper
|
<ai-wrapper
|
||||||
slot="content"
|
slot="content"
|
||||||
@@ -527,19 +494,286 @@
|
|||||||
:label="filed.fieldName"
|
:label="filed.fieldName"
|
||||||
:key="i"
|
:key="i"
|
||||||
:isLine="filed.grid === '1'">
|
:isLine="filed.grid === '1'">
|
||||||
<ai-file-list :fileList="formData[item.fieldDbName]" v-if="item.type == 'upload'" :fileOps="{name: 'name', size: 'fileSizeStr'}"></ai-file-list>
|
<ai-file-list :fileList="formData[item.fieldDbName]" v-if="item.type == 'upload'"
|
||||||
|
:fileOps="{name: 'name', size: 'fileSizeStr'}"></ai-file-list>
|
||||||
<div v-else>{{ filed.fieldValue || '-' }}</div>
|
<div v-else>{{ filed.fieldValue || '-' }}</div>
|
||||||
</ai-info-item>
|
</ai-info-item>
|
||||||
</ai-wrapper>
|
</ai-wrapper>
|
||||||
</ai-card>
|
</ai-card>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
<template v-else>
|
||||||
|
<ai-card title="基本信息">
|
||||||
|
<template #content>
|
||||||
|
<div class="above">
|
||||||
|
<div class="left">
|
||||||
|
<el-form-item label="姓名:" prop="name">
|
||||||
|
<el-input
|
||||||
|
v-model="baseInfo.name"
|
||||||
|
autocomplete="off"
|
||||||
|
size="small"
|
||||||
|
placeholder="请输入姓名"
|
||||||
|
maxlength="20"
|
||||||
|
show-word-limit
|
||||||
|
:disabled="!!showDetail"
|
||||||
|
/>
|
||||||
|
<!-- <p v-else>{{baseInfo.name||'-'}}</p> -->
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="身份证号:" prop="idNumber">
|
||||||
|
<el-input
|
||||||
|
v-model="baseInfo.idNumber"
|
||||||
|
autocomplete="off"
|
||||||
|
size="small"
|
||||||
|
placeholder="请输入身份证号"
|
||||||
|
:maxlength="18"
|
||||||
|
@input="idChange"
|
||||||
|
:disabled="!!showDetail"
|
||||||
|
/>
|
||||||
|
<!-- <p v-else>
|
||||||
|
<ai-id mode="show" v-model="baseInfo.idNumber" right-btn></ai-id>
|
||||||
|
</p>-->
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="性别:" prop="sex">
|
||||||
|
<el-select v-model="baseInfo.sex"
|
||||||
|
placeholder="请选择"
|
||||||
|
disabled
|
||||||
|
clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="(item,i) in dict.getDict('sex')"
|
||||||
|
:label="item.dictName"
|
||||||
|
:key="i"
|
||||||
|
:value="item.dictValue"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
<!-- <p v-else>
|
||||||
|
{{dict.getLabel('sex',baseInfo.sex)||'-'}}
|
||||||
|
</p>-->
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div class="right">
|
||||||
|
<el-form-item label="个人照片:" prop="photo">
|
||||||
|
<ai-avatar :instance="instance" v-model="baseInfo.photo"/>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="above">
|
||||||
|
<div class="left">
|
||||||
|
<el-form-item label="出生日期:">
|
||||||
|
<el-date-picker
|
||||||
|
disabled
|
||||||
|
:editable="false"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
format="yyyy-MM-dd"
|
||||||
|
v-model="baseInfo.birthday"
|
||||||
|
type="date"
|
||||||
|
placeholder="选择日期"
|
||||||
|
></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="文化程度:" prop="education">
|
||||||
|
<el-select
|
||||||
|
v-model="baseInfo.education"
|
||||||
|
placeholder="请选择"
|
||||||
|
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="(item,i) in dict.getDict('education')"
|
||||||
|
:label="item.dictName"
|
||||||
|
:key="i"
|
||||||
|
:value="item.dictValue"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
<!-- <p v-else>{{dict.getLabel('education',baseInfo.education)||'-'}}</p> -->
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="政治面貌:" prop="politicsStatus">
|
||||||
|
<el-select
|
||||||
|
v-model="baseInfo.politicsStatus"
|
||||||
|
placeholder="请选择"
|
||||||
|
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="(item,i) in dict.getDict('politicsStatus')"
|
||||||
|
:label="item.dictName"
|
||||||
|
:key="i"
|
||||||
|
:value="item.dictValue"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
<!-- <p v-else>{{dict.getLabel('politicsStatus',baseInfo.politicsStatus)||'-'}}</p> -->
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="职业:" prop="job">
|
||||||
|
<el-select
|
||||||
|
v-model="baseInfo.job"
|
||||||
|
placeholder="请选择"
|
||||||
|
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="(item,i) in dict.getDict('job')"
|
||||||
|
:label="item.dictName"
|
||||||
|
:key="i"
|
||||||
|
:value="item.dictValue"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
<!-- <p v-else>{{dict.getLabel('job',baseInfo.job)||'-'}}</p> -->
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="宗教信仰:" prop="faithType">
|
||||||
|
<el-select
|
||||||
|
v-model="baseInfo.faithType"
|
||||||
|
placeholder="请选择"
|
||||||
|
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="(item,i) in dict.getDict('faithType')"
|
||||||
|
:label="item.dictName"
|
||||||
|
:key="i"
|
||||||
|
:value="item.dictValue"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
<!-- <p v-else>{{dict.getLabel('faithType',baseInfo.faithType)||'-'}}</p> -->
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div class="right">
|
||||||
|
<el-form-item label="年龄:" prop="age">
|
||||||
|
<el-input
|
||||||
|
disabled
|
||||||
|
v-model="baseInfo.age"
|
||||||
|
autocomplete="off"
|
||||||
|
size="small"
|
||||||
|
placeholder="请输入年龄"
|
||||||
|
type="number"
|
||||||
|
@mousewheel.native.prevent
|
||||||
|
></el-input>
|
||||||
|
<!-- <p v-else>{{baseInfo.age}}</p> -->
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="民族:" prop="nation">
|
||||||
|
<el-select
|
||||||
|
v-model="baseInfo.nation"
|
||||||
|
placeholder="请选择"
|
||||||
|
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="(item,i) in dict.getDict('nation')"
|
||||||
|
:label="item.dictName"
|
||||||
|
:key="i"
|
||||||
|
:value="item.dictValue"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
<!-- <p v-else>{{dict.getLabel('nation',baseInfo.nation)||'-'}}</p> -->
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="婚姻状况:" prop="maritalStatus">
|
||||||
|
<el-select
|
||||||
|
v-model="baseInfo.maritalStatus"
|
||||||
|
placeholder="请选择"
|
||||||
|
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="(item,i) in dict.getDict('maritalStatus')"
|
||||||
|
:label="item.dictName"
|
||||||
|
:key="i"
|
||||||
|
:value="item.dictValue"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
<!-- <p v-else>{{dict.getLabel('maritalStatus',baseInfo.maritalStatus)||'-'}}</p> -->
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="兵役状况:" prop="militaryStatus">
|
||||||
|
<el-select
|
||||||
|
v-model="baseInfo.militaryStatus"
|
||||||
|
placeholder="请选择"
|
||||||
|
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="(item,i) in dict.getDict('militaryStatus')"
|
||||||
|
:label="item.dictName"
|
||||||
|
:key="i"
|
||||||
|
:value="item.dictValue"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
<!-- <p v-else>{{dict.getLabel('militaryStatus',baseInfo.militaryStatus)||'-'}}</p> -->
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="areaList">
|
||||||
|
<el-form-item label="籍贯:" prop=" birthplaceAreaId">
|
||||||
|
<ai-area-select
|
||||||
|
clearable
|
||||||
|
always-show
|
||||||
|
:instance="instance"
|
||||||
|
v-model="baseInfo.birthplaceAreaId"
|
||||||
|
:areaLevel="3"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</ai-card>
|
||||||
|
<ai-card title="联络信息">
|
||||||
|
<template #content>
|
||||||
|
<div class="above">
|
||||||
|
<div class="left">
|
||||||
|
<el-form-item label="联系方式:" prop="phone">
|
||||||
|
<el-input v-model="baseInfo.phone" size="small" placeholder="请输入联系方式" :maxlength="11"
|
||||||
|
show-word-limit/>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-form-item label="现住址:" prop="currentAreaId">
|
||||||
|
<ai-area-select clearable always-show :instance="instance" :disabled-level="disabledLevel"
|
||||||
|
v-model="baseInfo.currentAreaId"
|
||||||
|
:valueLevel="4"/>
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="baseInfo.currentAddress" placeholder="详细地址" maxlength="30" show-word-limit
|
||||||
|
clearable/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</ai-card>
|
||||||
|
<ai-card title="户籍信息">
|
||||||
|
<template #content>
|
||||||
|
|
||||||
|
<div class="above">
|
||||||
|
<div class="left">
|
||||||
|
<el-form-item label="是否户主:" prop="householdName">
|
||||||
|
<el-select v-model="baseInfo.householdName" placeholder="请选择"
|
||||||
|
@change="householdRelationChange" clearable>
|
||||||
|
<el-option v-for="(item,i) in dict.getDict('householdName')"
|
||||||
|
:label="item.dictName" :key="i" :value="item.dictValue"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="与户主关系:" prop="householdRelation" v-if="baseInfo.householdName==0">
|
||||||
|
<el-select v-model="baseInfo.householdRelation" placeholder="请选择" clearable>
|
||||||
|
<el-option v-for="(item,i) in dict.getDict('householdRelation')"
|
||||||
|
:label="item.dictName" :key="i" :value="item.dictValue"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div class="right">
|
||||||
|
<el-form-item label="户主身份证号:" prop="householdIdNumber" v-if="baseInfo.householdName==0">
|
||||||
|
<el-input v-model="baseInfo.householdIdNumber" placeholder="请输入户主身份证号" :maxlength="18"
|
||||||
|
clearable/>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-form-item label="户籍地:" prop="householdAreaId">
|
||||||
|
<ai-area-select clearable always-show :instance="instance" v-model="baseInfo.householdAreaId"/>
|
||||||
|
<el-form-item v-if="baseInfo.householdAreaId">
|
||||||
|
<el-input v-model="baseInfo.householdAddress" placeholder="详细地址" maxlength="30" show-word-limit
|
||||||
|
clearable/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</ai-card>
|
||||||
|
</template>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="!showDetail" #footer>
|
<template v-if="!showDetail" #footer>
|
||||||
<el-button @click="cancelFn()">取消</el-button>
|
<el-button @click="back">取消</el-button>
|
||||||
<el-button type="primary" @click="saveFrom('ruleForm','goBack')">保存</el-button>
|
<el-button type="primary" @click="saveFrom()">保存</el-button>
|
||||||
</template>
|
</template>
|
||||||
</ai-detail>
|
</ai-detail>
|
||||||
|
|
||||||
<el-dialog class="deleteStyle" :visible.sync="familyDialog" width="720px" title="家庭成员信息" top="30vh">
|
<el-dialog class="deleteStyle" :visible.sync="familyDialog" width="720px" title="家庭成员信息" top="30vh">
|
||||||
<el-row type="flex" justify="space-between">
|
<el-row type="flex" justify="space-between">
|
||||||
<ul>
|
<ul>
|
||||||
@@ -655,14 +889,15 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {mapState} from "vuex";
|
import {mapState} from "vuex";
|
||||||
|
import AiEditCard from "./components/AiEditCard";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "addAborigines",
|
name: "localResident",
|
||||||
|
components: {AiEditCard},
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object,
|
dict: Object,
|
||||||
permissions: Function,
|
permissions: Function,
|
||||||
detail: Object,
|
|
||||||
active: String
|
active: String
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -723,7 +958,6 @@ export default {
|
|||||||
logoutDescription: "",
|
logoutDescription: "",
|
||||||
fileStatus: "1"
|
fileStatus: "1"
|
||||||
},
|
},
|
||||||
birthday: "",
|
|
||||||
rules: {
|
rules: {
|
||||||
name: [{required: true, message: "请输入姓名", trigger: "blur"}],
|
name: [{required: true, message: "请输入姓名", trigger: "blur"}],
|
||||||
idNumber: [
|
idNumber: [
|
||||||
@@ -745,7 +979,7 @@ export default {
|
|||||||
if (/.+0{3}$/.test(v) && v) {
|
if (/.+0{3}$/.test(v) && v) {
|
||||||
cb("户籍地必须选到村级")
|
cb("户籍地必须选到村级")
|
||||||
} else cb()
|
} else cb()
|
||||||
},trigger: "blur"
|
}, trigger: "blur"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
householdName: [
|
householdName: [
|
||||||
@@ -763,10 +997,6 @@ export default {
|
|||||||
},
|
},
|
||||||
imgUrl: "",
|
imgUrl: "",
|
||||||
fileList: [],
|
fileList: [],
|
||||||
showEdit1: false,
|
|
||||||
showEdit2: false,
|
|
||||||
showEdit3: false,
|
|
||||||
showEdit4: false,
|
|
||||||
disabledLevel: 0
|
disabledLevel: 0
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -775,51 +1005,35 @@ export default {
|
|||||||
showDetail() {
|
showDetail() {
|
||||||
return !!this.$route.query?.id
|
return !!this.$route.query?.id
|
||||||
},
|
},
|
||||||
navList() {
|
pageTitle() {
|
||||||
return [
|
return this.showDetail ? '本地居民信息' : '添加本地居民'
|
||||||
{name: "本地居民信息", id: "1"},
|
|
||||||
{name: "变更记录", id: "2"}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
tipOps() {
|
hasSpecial() {
|
||||||
return this.dict.getDict("residentTipType") || []
|
//是否有特殊人员信息
|
||||||
|
return this.baseInfo.tsrqInfos?.length > 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
uploadFile(file) {
|
back() {
|
||||||
const isLt2M = file.file.size / 1024 / 1024 < 2;
|
this.$router.push({query: {}})
|
||||||
if (!isLt2M) {
|
|
||||||
this.$message.warning("头像大小不能超过 2MB!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let formData = new FormData();
|
|
||||||
formData.append("file", file.file);
|
|
||||||
this.instance.post(`/admin/file/add`, formData, {withCredentials: false})
|
|
||||||
.then(res => {
|
|
||||||
if (res && res.code == 0) {
|
|
||||||
let imgInfo = res.data[0].split(";");
|
|
||||||
this.imgUrl = imgInfo[0];
|
|
||||||
this.baseInfo.photo = res.data[0];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
handleChange(file, fileList) {
|
|
||||||
this.fileList = fileList;
|
|
||||||
},
|
},
|
||||||
householdRelationChange() {
|
householdRelationChange() {
|
||||||
this.baseInfo.householdIdNumber = "";
|
this.baseInfo.householdIdNumber = "";
|
||||||
this.baseInfo.householdRelation = "";
|
this.baseInfo.householdRelation = "";
|
||||||
},
|
},
|
||||||
saveFrom(formName, type) {
|
saveFrom(cb) {
|
||||||
this.$refs[formName].validate(valid => {
|
this.$refs.ruleForm.validate(v => {
|
||||||
if (valid) {
|
if (v) {
|
||||||
this.saveFromFn(type);
|
this.saveFromFn().then(() => {
|
||||||
|
if (cb) {
|
||||||
|
cb()
|
||||||
|
this.getDetail()
|
||||||
|
} else {
|
||||||
|
this.back()
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
|
||||||
cancelFn() {
|
|
||||||
this.$refs.ruleForm?.resetFields()
|
|
||||||
this.$router.push({query: {}});
|
|
||||||
},
|
},
|
||||||
submitForm(formName) {
|
submitForm(formName) {
|
||||||
this.writeInfo.id = this.baseInfo.id;
|
this.writeInfo.id = this.baseInfo.id;
|
||||||
@@ -845,9 +1059,9 @@ export default {
|
|||||||
});
|
});
|
||||||
this.$refs.writeInfo.resetFields();
|
this.$refs.writeInfo.resetFields();
|
||||||
},
|
},
|
||||||
saveFromFn(type) {
|
saveFromFn() {
|
||||||
let {currentHouseList, householdHouseList, tips} = this.baseInfo
|
let {currentHouseList, householdHouseList, tips} = this.baseInfo
|
||||||
this.instance.post(`/app/appresident/addOrUpdate`, {
|
return this.instance.post(`/app/appresident/addOrUpdate`, {
|
||||||
residentType: this.$route.query.type,
|
residentType: this.$route.query.type,
|
||||||
...this.baseInfo,
|
...this.baseInfo,
|
||||||
currentHouseList: currentHouseList?.join("|"),
|
currentHouseList: currentHouseList?.join("|"),
|
||||||
@@ -856,28 +1070,19 @@ export default {
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res?.code == 0) {
|
if (res?.code == 0) {
|
||||||
this.$message.success("保存成功");
|
this.$message.success("保存成功");
|
||||||
if (type) {
|
|
||||||
this.$router.push({query: {}})
|
|
||||||
} else {
|
|
||||||
this.editInit();
|
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
});
|
|
||||||
},
|
},
|
||||||
editInit() {
|
getDetail() {
|
||||||
this.showEdit1 = false;
|
let {id} = this.$route.query
|
||||||
this.showEdit2 = false;
|
|
||||||
this.showEdit3 = false;
|
|
||||||
this.showEdit4 = false;
|
|
||||||
this.searchDetail(this.baseInfo.id);
|
|
||||||
},
|
|
||||||
searchDetail(id, type) {
|
|
||||||
this.instance.post(`/app/appresident/detail`, null, {
|
this.instance.post(`/app/appresident/detail`, null, {
|
||||||
params: {id}
|
params: {id}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
let {currentHouseList, householdHouseList, tips} = res.data.resident
|
let {currentHouseList, householdHouseList, tips} = res.data.resident
|
||||||
this.baseInfo = {
|
this.baseInfo = {
|
||||||
|
cars: [],
|
||||||
|
houseList: [],
|
||||||
...res.data.resident,
|
...res.data.resident,
|
||||||
currentHouseList: currentHouseList?.split("|"),
|
currentHouseList: currentHouseList?.split("|"),
|
||||||
householdHouseList: householdHouseList?.split("|"),
|
householdHouseList: householdHouseList?.split("|"),
|
||||||
@@ -885,9 +1090,6 @@ export default {
|
|||||||
};
|
};
|
||||||
this.family = res.data.family;
|
this.family = res.data.family;
|
||||||
this.IdCard(this.baseInfo.idNumber);
|
this.IdCard(this.baseInfo.idNumber);
|
||||||
if (type == "family") {
|
|
||||||
this.familyDialog = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -924,64 +1126,35 @@ export default {
|
|||||||
},
|
},
|
||||||
IdCard(UUserCard) {
|
IdCard(UUserCard) {
|
||||||
if (UUserCard) {
|
if (UUserCard) {
|
||||||
let arr = [];
|
this.baseInfo.age = this.$calcAge(UUserCard)
|
||||||
//获取出生日期
|
let {birthday, sex} = this.idCardNoUtil.getIdCardInfo(UUserCard)
|
||||||
let birth =
|
this.baseInfo.sex = sex
|
||||||
UUserCard.substring(6, 10) +
|
this.baseInfo.birthday = birthday
|
||||||
"-" +
|
|
||||||
UUserCard.substring(10, 12) +
|
|
||||||
"-" +
|
|
||||||
UUserCard.substring(12, 14) +
|
|
||||||
" 00:00:00";
|
|
||||||
arr.push(birth);
|
|
||||||
|
|
||||||
if (parseInt(UUserCard.substr(16, 1)) % 2 == 1) {
|
|
||||||
//男
|
|
||||||
arr.push("1");
|
|
||||||
} else {
|
|
||||||
//女
|
|
||||||
arr.push("0");
|
|
||||||
}
|
|
||||||
//获取年龄
|
|
||||||
const myDate = new Date();
|
|
||||||
const month = myDate.getMonth() + 1;
|
|
||||||
const day = myDate.getDate();
|
|
||||||
let age = myDate.getFullYear() - UUserCard.substring(6, 10) - 1;
|
|
||||||
if (
|
|
||||||
UUserCard.substring(10, 12) < month ||
|
|
||||||
(UUserCard.substring(10, 12) == month &&
|
|
||||||
UUserCard.substring(12, 14) <= day)
|
|
||||||
) {
|
|
||||||
age++;
|
|
||||||
}
|
|
||||||
arr.push(age);
|
|
||||||
this.baseInfo.sex = arr[1];
|
|
||||||
this.baseInfo.age = arr[2];
|
|
||||||
this.birthday = arr[0];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.disabledLevel = this.user.info.areaMap[this.user.info.areaId].length;
|
this.disabledLevel = this.user.info.areaMap[this.user.info.areaId].length;
|
||||||
if (!this.showDetail) {
|
if (!this.showDetail) {
|
||||||
this.showEdit1 = true;
|
|
||||||
this.showEdit2 = true;
|
|
||||||
this.showEdit3 = true;
|
|
||||||
this.showEdit4 = true;
|
|
||||||
// this.baseInfo.householdAreaId = JSON.parse(JSON.stringify(this.user.info.areaId))
|
// this.baseInfo.householdAreaId = JSON.parse(JSON.stringify(this.user.info.areaId))
|
||||||
this.baseInfo.currentAreaId = JSON.parse(JSON.stringify(this.user.info.areaId))
|
this.baseInfo.currentAreaId = JSON.parse(JSON.stringify(this.user.info.areaId))
|
||||||
this.$nextTick(() => this.$refs.ruleForm?.resetFields())
|
this.$nextTick(() => this.$refs.ruleForm?.resetFields())
|
||||||
} else {
|
} else {
|
||||||
this.searchDetail(this.$route.query.id);
|
this.getDetail(this.$route.query.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.addAborigines {
|
.localResident {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
|
||||||
|
::v-deep.el-tabs__content {
|
||||||
|
max-height: calc(100vh - 136px);
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.el-form-item {
|
.el-form-item {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user