Browse Source

居民编辑

v1.1
mk 2 years ago
parent
commit
c308be6bb6
  1. 44
      src/views/components/editResi.vue
  2. 23
      src/views/components/resiExpand/editExpand.vue
  3. 60
      src/views/components/resiSearch.vue
  4. 196
      src/views/modules/base/resi.vue
  5. 2
      src/views/modules/portrayal/jumin/cpts/graph.vue
  6. 64
      src/views/modules/portrayal/jumin/cpts/staffTag.vue
  7. 22
      src/views/modules/portrayal/jumin/index.vue

44
src/views/components/editResi.vue

@ -1,5 +1,5 @@
<template> <template>
<div class="div_form"> <div class="div_form" v-loading="loading">
<div class="form"> <div class="form">
<el-form :model="form" :rules="rules" label-width="100px" ref="addForm"> <el-form :model="form" :rules="rules" label-width="100px" ref="addForm">
<h5 style="margin-top: 6px;">基础信息登记</h5> <h5 style="margin-top: 6px;">基础信息登记</h5>
@ -393,7 +393,6 @@
</stafftag> </stafftag>
</div> </div>
<resi-expand ref="resiExpand" @submitExpand="submitExpand"></resi-expand> <resi-expand ref="resiExpand" @submitExpand="submitExpand"></resi-expand>
</section>
<el-row style="margin:24px"> <el-row style="margin:24px">
<el-col :span="24" align="center"> <el-col :span="24" align="center">
<el-button size="small" class="diy-button--white" @click="handlerCancle" plain>取消</el-button> <el-button size="small" class="diy-button--white" @click="handlerCancle" plain>取消</el-button>
@ -417,10 +416,10 @@ import { computedCard } from '@/utils/index'
import { idTypeList, genderList, hasOptions } from "@/js/columns/constants"; import { idTypeList, genderList, hasOptions } from "@/js/columns/constants";
import stafftag from "../modules/portrayal/jumin/cpts/staffTag.vue"; import stafftag from "../modules/portrayal/jumin/cpts/staffTag.vue";
import resiExpand from './resiExpand/editExpand.vue'; import resiExpand from './resiExpand/editExpand.vue';
import { title } from '../dataBoard/renfang/visualizing/components/pie_config';
export default { export default {
data() { data() {
return { return {
loading:true,
formList: [], formList: [],
orgOptions: [], orgOptions: [],
orgOptionProps: { orgOptionProps: {
@ -1041,20 +1040,27 @@ export default {
}; };
}, },
async created() { async created() {
// await this.getDicts()
// await this.getOrgTreeList()
// await this.getResiDetail()
},
async activated() {
this.resiId = this.$route.query.id;
await this.getDicts() await this.getDicts()
await this.getOrgTreeList() await this.getOrgTreeList()
await this.getResiDetail() await this.getResiDetail()
this.loading = false;
}, },
methods: { methods: {
getResiDetail() { getResiDetail() {
this.$http this.$http
.get(`/actual/base/residentIntegratedInfo/detail/masked/${this.resiId}`) .get(`/actual/base/residentIntegratedInfo/detail/masked/${this.resiId}`)
.then((res) => { .then((res) => {
if(res.data.code == 0){
this.form = {};
this.form.resideInfoDtos = res.data.data.resideInfoDtos; this.form.resideInfoDtos = res.data.data.resideInfoDtos;
const promises = []; const promises = [];
this.$refs['resiExpand'].formList = []
for (let i in this.form.resideInfoDtos) { for (let i in this.form.resideInfoDtos) {
promises.push(this.getValiheList(i)); promises.push(this.getValiheList(i));
promises.push(this.getBuildList(i)); promises.push(this.getBuildList(i));
@ -1065,31 +1071,34 @@ export default {
this.form.baseInfoDto.idNum = this.$route.params.idNum; this.form.baseInfoDto.idNum = this.$route.params.idNum;
this.form.baseInfoDto.mobile = this.$route.params.mobile; this.form.baseInfoDto.mobile = this.$route.params.mobile;
for (const key in this.form.baseInfoDto.categoryInfo) { for (const key in this.form.baseInfoDto.categoryInfo) {
if (this.form.baseInfoDto.categoryInfo[key] === 1 && this.incidence[key]) { if (this.form.baseInfoDto.categoryInfo[key] === 1 && this.incidence[key] || (this.form.baseInfoDto.categoryInfo.partyFlag == 1 && key === 'partyFlag')) {
this.showDialog({ index: key, value: key }, true) const formId = key === 'partyFlag' ? 'parymemberInfoDto' : key;
this.showDialog({ index: key, value: formId }, true);
for (let i in this.footerInputList) { for (let i in this.footerInputList) {
if (this.footerInputList[i].id == this.incidence[key].formId) { const incidenceFormId = this.incidence[formId].formId;
if (this.footerInputList[i].id === incidenceFormId) {
for (let index in this.footerInputList[i].children) { for (let index in this.footerInputList[i].children) {
if (this.form[this.incidence[key].formId]) { const formName = this.footerInputList[i].children[index].formName;
if (Object.keys(this.form[this.incidence[key].formId]).includes(this.footerInputList[i].children[index].formName)) { const formData = this.form[incidenceFormId];
this.footerInputList[i].children[index].value = this.form[this.incidence[key].formId][this.footerInputList[i].children[index].formName] || null if (formData && Object.keys(formData).includes(formName)) {
} this.footerInputList[i].children[index].value = formData[formName] || null;
} }
} }
} }
} }
} }
} }
return Promise.all(promises); return Promise.all(promises);
}else if (res.data.code >= 8000){
this.$message.error(res.data.msg);
}
}) })
.then(() => { .then(() => {
}) })
.catch((err) => { .catch((err) => {
console.log(err); console.log(err);
}); });
}, },
async getDicts() { async getDicts() {
try { try {
@ -1371,12 +1380,12 @@ export default {
delete item.optionsH; delete item.optionsH;
delete item.optionsD; delete item.optionsD;
}); });
delete this.form.integrityData;
this.submitForm(house); this.submitForm(house);
} }
}) })
}, },
async submitForm(house) { async submitForm(house) {
try { try {
let url = '/actual/base/residentBaseInfo/update' let url = '/actual/base/residentBaseInfo/update'
let parm = { let parm = {
@ -1384,7 +1393,7 @@ export default {
} }
let { code, data, msg } = await requestPost(url, parm) let { code, data, msg } = await requestPost(url, parm)
if (code == 0) { if (code == 0) {
// this.$message.success(''); this.$message.success('保存成功');
if (!house) { if (!house) {
this.handlerCancle(); this.handlerCancle();
} else { } else {
@ -1436,6 +1445,7 @@ export default {
}, },
// //
submitExpand(_form) { submitExpand(_form) {
console.log(_form);
this.form = { ...this.form, ..._form }; this.form = { ...this.form, ..._form };
// console.log(this.form, ''); // console.log(this.form, '');
}, },

23
src/views/components/resiExpand/editExpand.vue

@ -132,7 +132,7 @@ export default {
// //
subsistenceAllowanceDto: { subsistenceAllowanceDto: {
reasons: null, reasons: null,
category:[] category: []
}, },
// 退 // 退
veteranDto: { veteranDto: {
@ -192,9 +192,7 @@ export default {
}, },
props: { props: {
}, },
created() { created() { },
this.getOrgTree()
},
activated() { activated() {
}, },
mounted() { mounted() {
@ -219,10 +217,12 @@ export default {
return group.children.reduce(async (accPromise, item) => { return group.children.reduce(async (accPromise, item) => {
const acc = await accPromise; const acc = await accPromise;
acc[item.formName] = null; acc[item.formName] = null;
if(item.itemType == 'checkbox'){ if (item.itemType == 'checkbox') {
this.form[item.pformName][item.formName] =item.value || [] this.form[item.pformName][item.formName] = item.value || []
}else{ } else if (item.itemType == 'cascader1') {
this.form[item.pformName][item.formName] =item.value ||null await this.getOrgTree()
} else {
this.form[item.pformName][item.formName] = item.value || null
} }
if (item.opctionUrl) { if (item.opctionUrl) {
try { try {
@ -236,6 +236,7 @@ export default {
}) })
}) })
Promise.all(promises).then((results) => { Promise.all(promises).then((results) => {
}).catch((error) => { }).catch((error) => {
console.error('Error fetching options:', error); console.error('Error fetching options:', error);
}); });
@ -282,11 +283,14 @@ export default {
try { try {
const { data } = await requestGet('/actual/base/party/org/listPartyOrgTreeRoot4Select', { depth: 8 }) const { data } = await requestGet('/actual/base/party/org/listPartyOrgTreeRoot4Select', { depth: 8 })
this.formList.forEach(c => { this.formList.forEach(c => {
for (let i of c.children) { if (c.formId == "parymemberInfoDto") {
for (let i of c.form[0].children) {
if (i.formName == 'partyOrgId') { if (i.formName == 'partyOrgId') {
i.opction = [data]; i.opction = [data];
} }
} }
}
}) })
} catch (error) { } catch (error) {
console.log(error); console.log(error);
@ -299,6 +303,7 @@ export default {
watch: { watch: {
'form': { 'form': {
handler(newVal, oldVal) { handler(newVal, oldVal) {
console.log(newVal);
this.$emit('submitExpand', this.form) this.$emit('submitExpand', this.form)
}, },
deep: true, deep: true,

60
src/views/components/resiSearch.vue

@ -2,7 +2,7 @@
<div class="resi-container"> <div class="resi-container">
<!-- <el-card class="resi-card"> --> <!-- <el-card class="resi-card"> -->
<div class="g-main"> <div class="g-main">
<el-form :inline="true" class="header_form_box" :model="form" :label-width="'100px'"> <el-form :inline="true" class="header_form_box" :model="form" :label-width="'105px'">
<el-form-item label="国籍"> <el-form-item label="国籍">
<el-select v-model="form.nationality" class="u-item-width-normal" clearable size="small"> <el-select v-model="form.nationality" class="u-item-width-normal" clearable size="small">
@ -86,6 +86,17 @@
</template> </template>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="名称模糊查询">
<el-select v-model="basicType" class="u-item-width-service" clearable size="small">
<template >
<el-option @click.native="handelClickBasicType" :label='item.label' :value='item.value' v-for="(item, index) in basicInfoList" :key="index"> </el-option>
</template>
</el-select>
</el-form-item>
<el-form-item v-for="(item, index) in basicInfoList" :key="index" v-if="basicType == item.value">
<el-input v-model="form[item.value]" class="u-item-width-service" placeholder="请输入" clearable size="small">
</el-input>
</el-form-item>
<el-form-item label="身份"> <el-form-item label="身份">
<el-select v-model="form.projectStaff" class="u-item-width-normal" clearable size="small"> <el-select v-model="form.projectStaff" class="u-item-width-normal" clearable size="small">
<template v-for="item in projectStaffList"> <template v-for="item in projectStaffList">
@ -104,7 +115,8 @@
</el-form-item> </el-form-item>
<el-form-item label="特殊人群"> <el-form-item label="特殊人群">
<el-select v-model="form.specialCategoryCodes" class="u-item-width-normal" clearable size="small" collapse-tags multiple> <el-select v-model="form.specialCategoryCodes" class="u-item-width-normal" clearable size="small" collapse-tags
multiple>
<template v-for="item in specialCategoryList"> <template v-for="item in specialCategoryList">
<el-option :label='item.label' :value='item.value'> </el-option> <el-option :label='item.label' :value='item.value'> </el-option>
</template> </template>
@ -264,19 +276,7 @@
<smart-search-rule ref="ref_rule" :formType="formType"></smart-search-rule> <smart-search-rule ref="ref_rule" :formType="formType"></smart-search-rule>
</el-col> </el-col>
</el-row> </el-row>
<!-- <el-row v-if="isArrow" class="resi-search">
<el-col :span="24">
<el-button type="primary" size="small" plain class="diy-button--blue"
@click="handleSmartSearch"><span>{{showSmartSearchForm?'关闭智能查询':'智能查询'}}</span></el-button>
<el-button style="margin-left:10px" size="small" class="diy-button--white" type="primary" plain
@click="resetForm">重置</el-button>
<el-button type="primary" size="small" class="diy-button--blue" @click="handleSearch" plain>查询 </el-button>
<el-button style="margin-left:15px" size="small" class="div-table-button--blue showUnfold" type="text"
@click="boxHeight = !boxHeight">{{ boxHeight ? '收起' : '展开' }}<i
:class="boxHeight ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"></i></el-button>
</el-col>
</el-row> -->
</div> </div>
</template> </template>
@ -368,6 +368,29 @@ export default {
boxHeight: true, boxHeight: true,
pageLoading: false, pageLoading: false,
openSearch: false, openSearch: false,
basicType: "name",
basicInfoList: [
{
label: '姓名',
value: 'name'
},
{
label: '联系电话',
value: 'mobile'
},
{
label: '证件号',
value: 'idNum'
},
{
label: '籍贯',
value: 'nativePlace'
},
{
label: '备注',
value: 'remark'
}
],
optionsV: [], optionsV: [],
optionsB: [], optionsB: [],
optionsH: [], optionsH: [],
@ -508,7 +531,7 @@ export default {
partyFlag: '', partyFlag: '',
updateTimeStart: '', updateTimeStart: '',
updateTimeEnd: '', updateTimeEnd: '',
specialCategoryCodes:[], specialCategoryCodes: [],
remark: '', remark: '',
villageId: '', villageId: '',
buildId: '', buildId: '',
@ -1142,6 +1165,13 @@ export default {
nowDay = '0' + nowDay nowDay = '0' + nowDay
} }
return subYear - 1 + '-' + nowMonth + '-' + nowDay return subYear - 1 + '-' + nowMonth + '-' + nowDay
},
handelClickBasicType(){
this.form.name = '';
this.form.mobile = '';
this.form.idNum = '';
this.form.nativePlace = '';
this.form.remark = '';
} }
} }
} }

196
src/views/modules/base/resi.vue

@ -72,159 +72,32 @@
{{ scope.row.gender == null ? '--' : scope.row.gender == 1 ? '男' : scope.row.gender == 2 ? '女' : {{ scope.row.gender == null ? '--' : scope.row.gender == 1 ? '男' : scope.row.gender == 2 ? '女' :
'--' }} '--' }}
</div> </div>
<div v-else-if="item.columnName == 'birthday'"> <div v-else-if="item.columnName == 'gridName'">
{{ <template >
scope.row.birthday <div class="resiCategoryInfoBox">
? scope.row.birthday.substr(0, 10) {{ scope.row.agencyName + scope.row.homeName }}
: ""
}}
</div>
<div v-else-if="item.columnName == 'idNum'">
{{
scope.row.idNum
? `${scope.row.idNum.substr(0, 11)}` +
"******" +
`${scope.row.idNum.substr(16, 2)}`
: "--"
}}
</div> </div>
<div v-else-if="item.columnName == 'mobile'"> </template>
{{
scope.row.mobile
? `${scope.row.mobile.substr(0, 3)}` +
"******" +
`${scope.row.mobile.substr(7, 4)}`
: "--"
}}
</div> </div>
<div v-else-if="item.columnName == 'categoryInfo'"> <div v-else-if="item.columnName == 'categoryNames'">
<template v-if="scope.row.categoryInfo"> <template v-if="scope.row.categoryInfo">
<div class="resiCategoryInfoBox"> <div class="resiCategoryInfoBox">
{{ {{ scope.row.categoryInfo.categoryNames }}
scope.row.categoryInfo.specialSupportFlag == </div>
1 </template>
? "特扶人员 " </div>
: "" <div v-else-if="item.columnName == 'householdSituationName'">
}} <template v-if="scope.row.home">
{{ <div >
scope.row.categoryInfo.chronicDiseaseFlag == {{ scope.row.home.householdSituationName || '' }}
1 </div>
? "慢病 " </template>
: "" </div>
}} <div v-else-if="item.columnName == 'resiHouseRel'">
{{ <template v-if="scope.row.home">
scope.row.categoryInfo.dementedFlag == 1 <div >
? "失智老人 " {{ scope.row.home.resiHouseRel != null ? scope.row.home.resiHouseRel ==
: "" 0 ? "自住" : scope.row.home.resiHouseRel == 1 ? '租住' : '' : '' }}
}}
{{
scope.row.categoryInfo.disabilityFlag == 1
? "残疾 "
: ""
}}
{{
scope.row.categoryInfo.disabledFlag == 1
? "失能老人 "
: ""
}}
{{
scope.row.categoryInfo.emptyNesterFlag == 1
? "空巢老人 "
: ""
}}
{{
scope.row.categoryInfo.ensureHouseFlag == 1
? "保障房人员 "
: ""
}}
{{
scope.row.categoryInfo.fertileWomanFlag == 1
? "育龄妇女 "
: ""
}}
{{
scope.row.categoryInfo.floatingFlag == 1
? "流动人口 "
: ""
}}
{{
scope.row.categoryInfo.liveAloneFlag == 1
? "独居老人 "
: ""
}}
{{
scope.row.categoryInfo.oldPeopleFlag == 1
? "老年人 "
: ""
}}
{{
scope.row.categoryInfo.partyFlag == 1
? "党员 "
: ""
}}
{{
scope.row.categoryInfo
.petitionOfficerFlag == 1
? "信访人员 "
: ""
}}
{{
scope.row.categoryInfo.seriousIllnessFlag ==
1
? "大病 "
: ""
}}
{{
scope.row.categoryInfo.specialCrowdFlag == 1
? "特殊人群 "
: ""
}}
{{
scope.row.categoryInfo
.subsistenceAllowanceFlag == 1
? "低保人员 "
: ""
}}
{{
scope.row.categoryInfo.tenantFlag == 1
? "租户 "
: ""
}}
{{
scope.row.categoryInfo.unemployedFlag == 1
? "失业 "
: ""
}}
{{
scope.row.categoryInfo.unitedFrontFlag == 1
? "统战人员 "
: ""
}}
{{
scope.row.categoryInfo.veteranFlag == 1
? "退役军人 "
: ""
}}
{{
scope.row.categoryInfo.volunteerFlag == 1
? "志愿者 "
: ""
}}
{{
scope.row.categoryInfo.publicWelfareFlag == 1
? "公益岗 "
: ""
}}
{{
scope.row.categoryInfo.buildingChiefFlag == 1
? "楼长 "
: ""
}}
{{
scope.row.categoryInfo.unitChiefFlag == 1
? "单元长 "
: ""
}}
</div> </div>
</template> </template>
</div> </div>
@ -335,7 +208,7 @@
<el-form :model="checkPasswordFrom" :rules="checkPasswordRulse" ref="checkPasswordFrom"> <el-form :model="checkPasswordFrom" :rules="checkPasswordRulse" ref="checkPasswordFrom">
<el-form-item label="密码" prop="password"> <el-form-item label="密码" prop="password">
<el-input v-model="checkPasswordFrom.password" autocomplete="off" type="password" <el-input v-model="checkPasswordFrom.password" autocomplete="off" type="password"
placeholder="请输入当前账号密码"></el-input> placeholder="请输入当前账号密码" @keydown.native.enter="handelClickCheckPassword"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -421,17 +294,24 @@ export default {
editTableName: {}, editTableName: {},
formName: "", formName: "",
tableHeader: [ tableHeader: [
{ columnName: "gridName", label: "地址", width: 180 },
// { columnName: "homeName", label: "", width: 150 },
{ columnName: "doorName", label: "门牌号", width: 80 },
{ columnName: "name", label: "姓名", width: 80 }, { columnName: "name", label: "姓名", width: 80 },
{ columnName: "birthday", label: "生日", width: 100 },
{ columnName: "gender", label: "性别", width: 50 }, { columnName: "gender", label: "性别", width: 50 },
{ columnName: "nationalityName", label: "国籍", width: 50 }, // { columnName: "agencyName", label: "", width: 150 },
{ columnName: "agencyName", label: "所属组织", width: 150 },
{ columnName: "gridName", label: "所属网格", width: 150 },
{ columnName: "homeName", label: "所属房屋", width: 150 },
{ columnName: "idTypeName", label: "证件类型", width: 80 }, { columnName: "idTypeName", label: "证件类型", width: 80 },
{ columnName: "idNum", label: "证件号", width: 170 }, { columnName: "idNum", label: "证件号", width: 170 },
{ columnName: "categoryInfo", label: "居民分类" }, { columnName: "categoryNames", label: "居民分类" , width: 180},
{ columnName: "mobile", label: "联系电话", width: 110 }, { columnName: "nationalityName", label: "国籍", width: 50 },
{ columnName: "nationName", label: "民族", width: 50 },
{ columnName: "householdSituationName", label: "人户状况", width: 100 },
{ columnName: "careerStatusName", label: "就业状况", width: 100 },
{ columnName: "resiHouseRel", label: "人房关系", width: 80 },
// { columnName: "mobile", label: "", width: 110 },
{ columnName: "updatedTime", label: "更新时间", width: 180 },
{ columnName: "updatedByName", label: "更新人", width: 80 },
], ],
tabsList: [], tabsList: [],
selection: [], selection: [],
@ -915,7 +795,7 @@ export default {
// this.dialogVisible = true; // this.dialogVisible = true;
// this.$refs.baseForm.old_from(data); // this.$refs.baseForm.old_from(data);
this.showCheckPassword = false this.showCheckPassword = false
this.$router.push({ name: 'edit-resi', query: { id: this.editUserId } , params: { idNum: data.idNum,mobile:data.mobile } }); this.$router.push({ name: 'edit-resi', query: { id: this.editUserId }, params: { idNum: data.idNum, mobile: data.mobile } });
this.checkPasswordFrom.password = '' this.checkPasswordFrom.password = ''
} else { } else {
this.$message.error(msg); this.$message.error(msg);

2
src/views/modules/portrayal/jumin/cpts/graph.vue

@ -79,7 +79,7 @@ export default {
let lineList = data.map((item, index) => ({ let lineList = data.map((item, index) => ({
'from': 'N1', 'from': 'N1',
'to': `N${index + 1}`, 'to': `N${index + 1}`,
'text': data[index].houseHolderRel || '未知', 'text':item.type ==1?'房屋':data[index].houseHolderRel || '未知',
'isHideArrow': true, 'isHideArrow': true,
'color': item.houseHolderRel === '父亲' ? '#3876f2' : (item.houseHolderRel === '母亲' || item.houseHolderRel === '祖父母' ? '#ff9696' : (item.houseHolderRel === '女儿' ? '#ffd5d5' : '#3876f2')), 'color': item.houseHolderRel === '父亲' ? '#3876f2' : (item.houseHolderRel === '母亲' || item.houseHolderRel === '祖父母' ? '#ff9696' : (item.houseHolderRel === '女儿' ? '#ffd5d5' : '#3876f2')),
'fontColor': item.houseHolderRel === '父亲' ? '#3876f2' : (item.houseHolderRel === '母亲' || item.houseHolderRel === '祖父母' ? '#ff9696' : (item.houseHolderRel === '女儿' ? '#ffd5d5' : '#3876f2')) 'fontColor': item.houseHolderRel === '父亲' ? '#3876f2' : (item.houseHolderRel === '母亲' || item.houseHolderRel === '祖父母' ? '#ff9696' : (item.houseHolderRel === '女儿' ? '#ffd5d5' : '#3876f2'))

64
src/views/modules/portrayal/jumin/cpts/staffTag.vue

@ -111,48 +111,7 @@ export default {
province: '特殊人群', province: '特殊人群',
value: [], value: [],
type: 'checkbox', type: 'checkbox',
option: [ option: []
{
label: "安置帮教",
value: "anzhibangjiao",
children: null
},
{
label: "吸毒人员",
value: "xidurenyuan",
children: null
},
{
label: "社区矫正",
value: "shequjiaozheng",
children: null
},
{
label: "不良青少年",
value: "buliangqingshaonian",
children: null
},
{
label: "肇事肇祸精神病",
value: "zhaoshizhaohuojingshenbing",
children: null
},
{
label: "邪教人员",
value: "xiejiaorenyuan",
children: null
},
{
label: "信访人员",
value: "petitionOfficerFlag",
children: null
},
{
label: "统战人员",
value: "unitedFrontFlag",
children: null
}
]
}, },
{ {
index: 4, index: 4,
@ -193,10 +152,19 @@ export default {
} }
}, },
created() { created() {
this.getDictData();
}, },
methods: { methods: {
async getDictData() {
try {
const { data } = await this.$http.post('sys/dict/data/dictlist', { dictType: 'special_resident_category' });
this.formData.tableData[3].option = data.data
} catch (error) {
console.log(error, `获取 ${dictType} 字典`);
}
},
updatedForm() { updatedForm() {
if (this.formType == 'add'|| !this.userInfo.baseInfoDto.categoryInfo) return; if (this.formType == 'add' || !this.userInfo.baseInfoDto.categoryInfo) return;
const updateValue = (flag, dataIndex) => { const updateValue = (flag, dataIndex) => {
const { tableData } = this.formData; const { tableData } = this.formData;
const valueArray = tableData[dataIndex].value; const valueArray = tableData[dataIndex].value;
@ -206,7 +174,7 @@ export default {
this.formData.tableData[dataIndex].value = valueArray.filter(item => item !== flag); this.formData.tableData[dataIndex].value = valueArray.filter(item => item !== flag);
} }
}; };
if(this.userInfo.baseInfoDto.categoryInfo.specialCrowdFlag == 1){ if (this.userInfo.baseInfoDto.categoryInfo.specialCrowdFlag == 1) {
this.formData.tableData[3].value.push(...this.userInfo.specialDto.specialCategoryCodes); this.formData.tableData[3].value.push(...this.userInfo.specialDto.specialCategoryCodes);
} }
this.formData.tableData[0].value = this.userInfo.baseInfoDto.categoryInfo.partyFlag; this.formData.tableData[0].value = this.userInfo.baseInfoDto.categoryInfo.partyFlag;
@ -229,7 +197,7 @@ export default {
updateValue('publicWelfareFlag', 4); updateValue('publicWelfareFlag', 4);
}, },
handeleClickRadio(val) { handeleClickRadio(val) {
this.$emit('showDialog', { value: val === '1' ? 'parymemberInfoDto' : val }, val === '1') this.$emit('showDialog', { value: val === '1' ? 'parymemberInfoDto' : val }, val === 1)
}, },
handeleClickchckbox(item, event, index) { handeleClickchckbox(item, event, index) {
item.index = index item.index = index
@ -241,10 +209,10 @@ export default {
watch: { watch: {
userInfo: { userInfo: {
handler(newVal, oldVal) { handler(newVal, oldVal) {
this.formData.tableData.forEach((item, index) =>{ this.formData.tableData.forEach((item, index) => {
if(index!=0){ if (index != 0) {
item.value = [] item.value = []
}else{ } else {
item.value = '' item.value = ''
} }
}) })

22
src/views/modules/portrayal/jumin/index.vue

@ -1,5 +1,5 @@
<template> <template>
<div class='g-main'> <div class='g-main' v-loading="loading">
<div class="left"> <div class="left">
<div class="user"> <div class="user">
<img src="@/assets/images/index/nan.png" alt=""> <img src="@/assets/images/index/nan.png" alt="">
@ -215,7 +215,7 @@
<el-col :span="6" class="f-flex"> <el-col :span="6" class="f-flex">
<div class="f-label"><b>就业状态:</b></div> <div class="f-label"><b>就业状态:</b></div>
<div class="f-left8 f-font-color"> <div class="f-left8 f-font-color">
{{ categoryDictText }} {{ careerStatusText }}
</div> </div>
</el-col> </el-col>
<el-col :span="6" class="f-flex"> <el-col :span="6" class="f-flex">
@ -314,6 +314,8 @@ import { idTypeList } from "@/js/columns/constants";
export default { export default {
data() { data() {
return { return {
loading:true,
changeRecordList: [],// changeRecordList: [],//
resiDetailObj: {},// resiDetailObj: {},//
@ -806,6 +808,7 @@ export default {
this.$http this.$http
.get(`/actual/base/residentIntegratedInfo/detail/masked/${this.resiId}`) .get(`/actual/base/residentIntegratedInfo/detail/masked/${this.resiId}`)
.then(async (res) => { .then(async (res) => {
if(res.data.code === 0){
this.resiDetailObj = res.data.data || {}; this.resiDetailObj = res.data.data || {};
const nameMap = { const nameMap = {
ext: '拓展信息', ext: '拓展信息',
@ -840,7 +843,6 @@ export default {
child.value = await this.getDictName(child.opctionUrl, child.opctionParams, this.resiDetailObj[item.id][key], child.itemType, item.opction); child.value = await this.getDictName(child.opctionUrl, child.opctionParams, this.resiDetailObj[item.id][key], child.itemType, item.opction);
} }
})); }));
})); }));
this.expandList.forEach(item => { this.expandList.forEach(item => {
const rows = []; const rows = [];
@ -871,8 +873,12 @@ export default {
this.resiDetailObj.baseInfoDto.nationalityName = element.label; this.resiDetailObj.baseInfoDto.nationalityName = element.label;
} }
}); });
}else if(res.data.code >= 8000){
this.$message.error(res.data.msg);
}
}) })
.catch((err) => { .catch((err) => {
this.loading = false;
console.log(err); console.log(err);
}); });
}, },
@ -1077,6 +1083,15 @@ export default {
} }
}); });
return text; return text;
},
careerStatusText() {
let text = "--";
this.careerStatusArr.forEach((item) => {
if (item.value == this.resiDetailObj.workInfoDto.careerStatus) {
text = item.label;
}
});
return text;
} }
}, },
watch: { watch: {
@ -1092,6 +1107,7 @@ export default {
this.getChangeRecordDetailById() this.getChangeRecordDetailById()
this.getHouseholdSituation() this.getHouseholdSituation()
this.gethouseHolderRel() this.gethouseHolderRel()
this.loading = false;
}, },
deep: true, // deep: true, //
immediate: true // handler immediate: true // handler

Loading…
Cancel
Save