Browse Source

取消弹框,修复重复选中标签表单充值的问题

v1.1
mk 1 year ago
parent
commit
fae29d9c5a
  1. 1
      src/assets/scss/pages/resiInfo.scss
  2. 160
      src/views/components/editResi.vue
  3. 51
      src/views/components/resiExpand/editExpand.vue
  4. 2
      src/views/modules/base/resi.vue
  5. 43
      src/views/modules/portrayal/jumin/cpts/staffTag.vue
  6. 142
      src/views/modules/portrayal/jumin/index.vue

1
src/assets/scss/pages/resiInfo.scss

@ -89,6 +89,7 @@
position: relative;
padding-bottom: 16px;
.editBtn{
z-index: 10;
position: absolute;
right: 16px;
top: 16px;

160
src/views/components/editResi.vue

@ -44,7 +44,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="性别">
<el-form-item label="性别" prop="baseInfoDto.gender">
<el-select v-model="form.baseInfoDto.gender" placeholder="请选择" size="small"
class="list_item_width_1" clearable>
<el-option v-for="(item, index) in genderList" :key="index" :label="item.label"
@ -53,7 +53,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="出生日期">
<el-form-item label="出生日期" prop="baseInfoDto.birthday">
<el-date-picker v-model.trim="form.baseInfoDto.birthday" class="list_item_width_1"
type="date" size="small" clearable placeholder="选择日期" format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd">
@ -91,7 +91,7 @@
</el-form-item>
</el-col>
<el-col :span="6"
v-if="form.familyInfoDto.marriage == 'chuhun' || form.familyInfoDto.marriage == 'zaihun' || form.familyInfoDto.marriage == 'fuhun'">
v-if="form.familyInfoDto && form.familyInfoDto.marriage == 'chuhun' || form.familyInfoDto.marriage == 'zaihun' || form.familyInfoDto.marriage == 'fuhun'">
<el-form-item label="配偶情况">
<el-select v-model="form.familyInfoDto.spouseSituation" placeholder="请选择" size="small"
class="list_item_width_1" clearable>
@ -404,9 +404,8 @@
<el-row style="margin:24px">
<el-col :span="24" align="center">
<el-button size="small" class="diy-button--white" @click="handlerCancle" plain>取消</el-button>
<el-button type="primary" size="small" :loading="btnLoading"
@click="handleClickSubmit">保存</el-button>
<el-button type="primary" size="small" :loading="btnLoading"
<el-button type="primary" size="small" @click="handleClickSubmit">保存</el-button>
<el-button type="primary" size="small"
@click="handleClickSubmit('house')">提交并补充家庭人员信息</el-button>
</el-col>
</el-row>
@ -428,6 +427,8 @@ export default {
data() {
return {
loading: true,
houseType: true,
formList: [],
orgOptions: [],
orgOptionProps: {
@ -926,7 +927,7 @@ export default {
id: 'specialSupportDto',
children: [
{//0
{
label: "特扶类别",
itemType: "select1",
formName: "specialSupportType",
@ -1057,7 +1058,6 @@ export default {
await this.getDicts()
await this.getOrgTreeList()
await this.getResiDetail()
this.loading = false;
},
methods: {
getResiDetail() {
@ -1079,6 +1079,37 @@ export default {
this.form.baseInfoDto.idNum = this.$route.params.idNum;
this.form.baseInfoDto.mobile = this.$route.params.mobile;
if (!res.data.data.familyInfoDto) {
this.form.familyInfoDto = {
marriage: null,//
spouseSituation: null,//
elderlyFlag: null,//
elderlyRelation: null,//
dependantMobile: null,//
}
}
if (!res.data.data.religionDto) {
this.form.religionDto = {
religion: null,//
}
}
if (!res.data.data.workInfoDto) {
this.form.workInfoDto = {
careerStatus: null,//
workUnit: null,//
occupation: null,//
}
}
if (!res.data.data.eduInfoDto) {
this.form.eduInfoDto = {
cultureLevel: null
}
}
if (!res.data.data.specialDto) {
this.form.specialDto = {
specialCategoryCodes: []
}
}
for (const key in this.form.baseInfoDto.categoryInfo) {
if (this.form.baseInfoDto.categoryInfo[key] === 1 && this.incidence[key] || (this.form.baseInfoDto.categoryInfo.partyFlag == 1 && key === 'partyFlag')) {
const formId = key === 'partyFlag' ? 'parymemberInfoDto' : key;
@ -1099,6 +1130,7 @@ export default {
}
}
}
console.log(this.footerInputList);
return Promise.all(promises);
} else if (res.data.code >= 8000) {
this.$message.error(res.data.msg);
@ -1109,6 +1141,8 @@ export default {
.catch((err) => {
console.log(err);
});
this.loading = false;
},
async getDicts() {
try {
@ -1396,13 +1430,13 @@ export default {
},
async submitForm(house) {
try {
let url = '/actual/base/residentBaseInfo/update'
let url = this.houseType ? '/actual/base/residentBaseInfo/update' : '/actual/base/residentBaseInfo/save';
let parm = {
...this.form
}
let { code, data, msg } = await requestPost(url, parm)
if (code == 0) {
if (house!= 'house') {
if (house != 'house') {
this.$message.success('保存成功');
this.$refs['editForm'].resetFields();
this.handlerCancle();
@ -1410,10 +1444,12 @@ export default {
this.$message.success('保存成功');
let homeArr = JSON.parse(JSON.stringify(this.form.resideInfoDtos));
this.$refs['editForm'].resetFields();
this.form.resideInfoDtos = homeArr
this.form.resideInfoDtos = homeArr;
this.removeIdKey(this.form)
this.houseType = false
}
}else if(code >= 8000){
} else if (code >= 8000) {
this.$message.error(msg);
}
}
@ -1421,57 +1457,105 @@ export default {
this.$message.error(msg);
}
},
removeIdKey(obj) {
if (!obj || typeof obj !== 'object') {
return;
}
for (const key in obj) {
if (obj.hasOwnProperty(key)) {
if (typeof obj[key] === 'object') {
this.removeIdKey(obj[key]);
}
if (key === 'id' || key === 'resiId' || key === 'createdTime' || key === 'updatedTime') {
delete obj[key];
}
}
}
},
showDialog({ index, value }, event) {
console.log(value);
if (value == 1) {
value = 'parymemberInfoDto'
this.form.baseInfoDto.categoryInfo.partyFlag = 1;
} else if (value == 0) {
this.form.baseInfoDto.categoryInfo.partyFlag = 0;
this.form.parymemberInfoDto = null
this.$nextTick(() => {
this.$refs['resiExpand'].formList = this.$refs['resiExpand'].formList.filter(item => item.formId !== 'parymemberInfoDto');
})
// partyFlag
if (value === 1 || value === 0 || value === 2) {
this.form.baseInfoDto.categoryInfo.partyFlag = value;
value = value === 1 ? 'parymemberInfoDto' : value;
if (value === 0 || value === 2) {
this.form.parymemberInfoDto = null;
this.footerInputList.forEach(item => {
if (item.id === 'parymemberInfoDto') {
item.children.forEach(child => {
child.value = child.itemType === "checkbox" ? [] : null;
});
}
});
} else if (value == 2) {
this.form.baseInfoDto.categoryInfo.partyFlag = 2;
this.form.parymemberInfoDto = null
this.$nextTick(() => {
this.$refs['resiExpand'].formList = this.$refs['resiExpand'].formList.filter(item => item.formId !== 'parymemberInfoDto');
})
});
}
}
if (index != 3 && index) {
//
if (index !== 3 && index) {
this.form.baseInfoDto.categoryInfo[value] = event ? 1 : 0;
} else if (index == 3) {
} else if (index === 3) {
if (event) {
this.form.baseInfoDto.categoryInfo.specialCrowdFlag = 1;
this.form.specialDto.specialCategoryCodes.push(value);
} else {
this.form.specialDto.specialCategoryCodes = this.form.specialDto.specialCategoryCodes.filter(item => item != value);
this.form.specialDto.specialCategoryCodes = this.form.specialDto.specialCategoryCodes.filter(item => item !== value);
}
}
// incidence
if (this.incidence[value]) {
if (event) {
this.$nextTick(() => {
this.$refs['resiExpand'].formList.push({
'form': [this.footerInputList.find(item => item.id === this.incidence[value].formId)], 'title': this.incidence[value].title, formId: this.incidence[value].formId
form: [this.footerInputList.find(item => item.id === this.incidence[value].formId)],
title: this.incidence[value].title,
formId: this.incidence[value].formId
});
this.$refs['resiExpand'].formType = this.incidence[value].formType;
this.$refs['resiExpand'].showForm()
this.$refs['resiExpand'].showForm();
});
} else {
this.$refs['resiExpand'].formList = this.$refs['resiExpand'].formList.filter(item => item.formId !== this.incidence[value].formId);
// delete this.$refs['resiExpand'].form[this.incidence[value].formType];
delete this.form[this.incidence[value].formType]
// console.log(this.form, '');
}
this.footerInputList.forEach(item => {
if (item.id === this.incidence[value].formId) {
item.children.forEach(child => {
child.value = child.itemType === "checkbox" ? [] : null;
});
}
});
delete this.form[this.incidence[value].formType];
}
}
},
//
submitExpand(_form) {
this.form = { ...this.form, ..._form };
// console.log(this.form, '');
submitExpand(_form, { changId, changPid, changType }) {
if (changType == 'checkbox') {
this.form[changPid][changId] = [];
this.form[changPid][changId].push(..._form[changPid][changId])
} else {
if (!this.form[changPid]) {
this.$set(this.form, changPid, {});
}
this.$set(this.form[changPid], changId, _form[changPid][changId]);
}
for (let i in this.footerInputList) {
if (this.footerInputList[i].id === changPid) {
for (let index in this.footerInputList[i].children) {
const formName = this.footerInputList[i].children[index].formName;
const formData = this.form[changPid];
if (formData && Object.keys(formData).includes(formName)) {
this.footerInputList[i].children[index].value = formData[formName] || null;
}
}
}
}
},
},
components: { stafftag, resiExpand },

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

@ -10,58 +10,68 @@
<template v-if="itemk.itemType == 'radio1'">
<section class="list_item_width_1">
<el-radio v-for="ns in itemk.opction" :key="ns.value" size="small"
v-model.trim="form[itemj.id][itemk.formName]" :label="ns.value">
v-model.trim="form[itemj.id][itemk.formName]" :label="ns.value"
@click.native="handleFormChange(itemj.id,itemk.formName,itemk.itemType)">
{{ ns.label }}
</el-radio>
</section>
</template>
<template v-else-if="itemk.itemType == 'select1' && itemk.showFlag !== '0'">
<el-select v-model="form[itemj.id][itemk.formName]" :placeholder="`请选择${itemk.label}`"
size="small" :multiple="itemk.multiple" :collapse-tags="itemk.collapseTags" clearable
size="small" :multiple="itemk.multiple" :collapse-tags="itemk.collapseTags"
clearable
:style="{ 'width': itemk.formName == 'specialCategoryCode' ? '183px' : '' }"
class="list_item_width_1">
<el-option v-for="items in itemk.opction" :key="items.value" :label="items.label"
:value="items.value">
:value="items.value" @click.native="handleFormChange(itemj.id,itemk.formName,itemk.itemType)">
</el-option>
</el-select>
</template>
<template v-else-if="itemk.itemType == 'textarea1'">
<el-input type="textarea" :placeholder="`请输入${itemk.label}`" class="item-width-textarea"
maxlength="120" size="small" show-word-limit resize="none" rows="3"
v-model.trim="form[itemj.id][itemk.formName]">
v-model.trim="form[itemj.id][itemk.formName]" @change.native="handleFormChange(itemj.id,itemk.formName,itemk.itemType)">
</el-input>
</template>
<template v-else-if="itemk.itemType == 'input1'">
<el-input :placeholder="`请输入${itemk.label}`" class="list_item_width_1" size="small"
:style="{ 'margin-right': itemk.label == '备注' ? '50px' : '' }"
v-model.trim="form[itemj.id][itemk.formName]" clearable>
v-model.trim="form[itemj.id][itemk.formName]" clearable @change.native="handleFormChange(itemj.id,itemk.formName,itemk.itemType)">
</el-input>
</template>
<template v-else-if="itemk.itemType == 'inputNum'">
<el-input :placeholder="`请输入${itemk.label}`" size="small" class="list_item_width_1-text"
:style="{ 'margin-right': itemk.label == '备注' ? '50px' : '' }"
v-model.trim="form[itemj.id][itemk.formName]" clearable
@blur="checkNumberInput(itemj.id, itemk.formName)">
@blur="checkNumberInput(itemj.id, itemk.formName)" @change.native="handleFormChange(itemj.id,itemk.formName,itemk.itemType)">
</el-input><span class="u-data-tag"></span>
</template>
<template v-else-if="itemk.itemType == 'checkbox'">
<el-checkbox-group size="small" v-model="form[itemj.id][itemk.formName]">
<el-checkbox v-for="items in itemk.opction" :label="items.value"
:style="{ 'margin-right': items.label != itemk.label ? '' : '19px' }"
:key="items.value" :value="items.value">{{ items.label }}</el-checkbox>
:key="items.value" :value="items.value" @click.native="handleFormChange(itemj.id,itemk.formName,itemk.itemType)">{{ items.label }}</el-checkbox>
</el-checkbox-group>
</template>
<template v-else-if="itemk.itemType == 'datepicker1' && itemk.showFlag !== '0'">
<el-date-picker v-model.trim="form[itemj.id][itemk.formName]" class="list_item_width_1"
type="date" size="small" clearable placeholder="选择日期" format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd">
value-format="yyyy-MM-dd" @change="handleFormChange(itemj.id,itemk.formName,itemk.itemType)">
</el-date-picker>
</template>
<template v-else-if="itemk.itemType == 'cascader1'">
<el-cascader v-model="form[itemj.id].partyOrgId" :props="casProps" :options="itemk.opction"
class="list_item_width_1" clearable size="small"
@change="handlePartyOrgCascadarChange"></el-cascader>
<el-cascader v-model="form[itemj.id].partyOrgId" :props="casProps"
:options="itemk.opction" class="list_item_width_1" clearable size="small"
@change="handlePartyOrgCascadarChange" @change.native="handleFormChange(itemj.id,itemk.formName,itemk.itemType)"></el-cascader>
</template>
<template v-else-if="itemk.itemType == 'number'">
<el-input-number class="list_item_width_1" size="small" :min="1" :max="10"
v-model.trim="form[itemj.id][itemk.formName]"></el-input-number>
@ -78,6 +88,7 @@
<script>
import { requestPost, requestGet } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
export default {
data() {
@ -188,6 +199,9 @@ export default {
checkStrictly: true,
multiple: false,
},
changId:null,
changPid:null,
changType:null
};
},
props: {
@ -198,6 +212,13 @@ export default {
mounted() {
},
methods: {
handleFormChange(pid,id,type){
this.changPid = pid;
this.changId = id;
this.changType = type;
nextTick(1000)
this.$emit('submitExpand', this.form,{changId:this.changId,changPid:this.changPid,changType:this.changType})
},
checkNumberInput(itemj, itemk) {
if (this.form[itemj][itemk]) {
if (isNaN(this.form[itemj][itemk])) {
@ -242,8 +263,6 @@ export default {
}).catch((error) => {
console.error('Error fetching options:', error);
});
console.log(this.form, '子组件form');
console.log(this.formList, '子组件formList');
})
},
async getDictDataForm(url, params) {
@ -262,7 +281,8 @@ export default {
await this.getTreeChildenList(node, resolve)
},
async getTreeChildenList(node, resolve) {
if (node.data.partyOrgLevel === 7) {
console.log(node);
if (node.data.partyOrgLevel <= 8) {
resolve(null);
return;
}
@ -298,14 +318,13 @@ export default {
console.log(error);
}
},
},
components: {},
computed: {},
watch: {
'form': {
handler(newVal, oldVal) {
this.$emit('submitExpand', this.form)
this.$emit('submitExpand', this.form,{changId:this.changId,changPid:this.changPid,changType:this.changType})
},
deep: true,
immediate: true

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

@ -302,7 +302,7 @@ export default {
// { columnName: "agencyName", label: "", width: 150 },
{ columnName: "idTypeName", label: "证件类型", width: 80 },
{ columnName: "idNum", label: "证件号", width: 170 },
{ columnName: "categoryNames", label: "居民分类" , width: 180},
{ columnName: "categoryNames", label: "居民分类" },
{ columnName: "nationalityName", label: "国籍", width: 50 },
{ columnName: "nationName", label: "民族", width: 50 },
{ columnName: "householdSituationName", label: "人户状况", width: 100 },

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

@ -8,18 +8,19 @@
<el-table-column prop="city" label="内容" min-width="70" align="left">
<template slot-scope="scope">
<el-form-item v-if="scope.row.type == 'radio'">
<el-radio-group v-model="scope.row.value" v-for="(item, index) in scope.row.option" :key="index"
@change="handeleClickRadio(item.value)">
<el-radio-group v-model="scope.row.value" v-for="(item, index) in scope.row.option"
:key="index" @change="handeleClickRadio(item.value)">
<el-radio :label="item.value" :disabled="formType == 'detail'"><span
style="margin-right: 50px;">{{ item.label
}}</span></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :prop="'tableData.' + scope.$index + '.value'" v-if="scope.row.type == 'checkbox'">
<el-form-item :prop="'tableData.' + scope.$index + '.value'"
v-if="scope.row.type == 'checkbox'">
<el-checkbox-group v-model="scope.row.value">
<el-checkbox @change="handeleClickchckbox(item, $event, scope.$index)"
:disabled="formType == 'detail'" v-for="(item, index) in scope.row.option" :key="index"
:label="item.value">{{ item.label
:disabled="formType == 'detail'" v-for="(item, index) in scope.row.option"
:key="index" :label="item.value">{{ item.label
}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
@ -42,7 +43,7 @@ export default {
{
index: 0,
province: '政治面貌',
value: '',
value: 0,
type: 'radio',
option: [
{ label: '群众', value: 0 },
@ -180,6 +181,7 @@ export default {
this.formData.tableData[0].value = this.userInfo.baseInfoDto.categoryInfo.partyFlag;
//keyindex(formData.tableData)
updateValue('disabilityFlag', 1);
updateValue('deathFlag', 1);
updateValue('seriousIllnessFlag', 1);
updateValue('chronicDiseaseFlag', 1);
updateValue('emptyNesterFlag', 2);
@ -197,11 +199,38 @@ export default {
updateValue('publicWelfareFlag', 4);
},
handeleClickRadio(val) {
this.$emit('showDialog', { value: val === '1' ? 'parymemberInfoDto' : val }, val === 1)
if (val === 1) {
this.$emit('showDialog', { value: val }, val === 1)
this.formData.tableData[0].value= 1
}else{
this.$confirm(`确认取消党员标签`, '确认信息', {
confirmButtonText: '确认取消',
cancelButtonText: '暂不取消',
type: 'warning'
}).then(() => {
this.$emit('showDialog', { value: val }, val === 1)
}).catch(() => {
this.formData.tableData[0].value= 1
});
}
},
handeleClickchckbox(item, event, index) {
item.index = index
if (event) {
this.$emit('showDialog', item, event)
} else {
this.$confirm(`确认取消${item.label}标签`, '确认信息', {
confirmButtonText: '确认取消',
cancelButtonText: '暂不取消',
type: 'warning'
}).then(() => {
this.$emit('showDialog', item, event)
}).catch(() => {
this.formData.tableData[index].value.push(item.value)
});
}
}
},
components: {},

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

@ -1,5 +1,5 @@
<template>
<div class='g-main' v-loading="loading" v-if="showFlag">
<div class='g-main' v-loading="loading">
<div class="left">
<div class="user">
<img src="@/assets/images/index/nan.png" alt="">
@ -26,20 +26,20 @@
</div>
<div class="right">
<div class="editBtn">
<el-button type="primary" size="small" @click="handelClickJumpEdit">编辑</el-button>
<el-button class="diy-button--add" type="primary" size="small" @click.native="handelClickJumpEdit">编辑</el-button>
</div>
<div class="title-small">基础信息</div>
<el-row type="flex" justify="" class="f-m-top23">
<el-col :span="6" class="f-flex">
<div class="f-label "><b>国籍</b></div>
<div class="f-left8 f-font-color">
{{ nationalityText }}
{{ nationalityText() }}
</div>
</el-col>
<el-col :span="6" class="f-flex">
<div class="f-label"><b>证件类型</b></div>
<div class="f-left8 f-font-color">
{{ idTypeText }}
{{ idTypeText() }}
</div>
</el-col>
<el-col :span="6" class="f-flex">
@ -90,7 +90,7 @@
</el-col>
<el-col :span="6" class="f-flex">
<div class="f-label">出生日期</div>
<div class="f-left8 f-font-color">{{ resiDetailObj.baseInfoDto.birthday }}</div>
<!-- <div class="f-left8 f-font-color">{{ resiDetailObj.baseInfoDto.birthday || '--'}}</div> -->
</el-col>
<el-col :span="6" class="f-flex">
<div class="f-label">民族</div>
@ -105,19 +105,21 @@
resiDetailObj.eduInfoDto.cultureLevelName ?
resiDetailObj.eduInfoDto.cultureLevelName : "--" }}</span>
</el-col>
</el-row>
<el-row type="flex" justify="" class="f-m-top23">
<el-col :span="6" class="f-flex">
<div class="f-flex ">
<div class="f-label">婚姻状况</div>
<span class="f-left8 f-font-color">{{ categoryDictText }}</span>
<span class="f-left8 f-font-color" v-if="resiDetailObj.familyInfoDto">
{{ categoryDictText() }}</span>
<span v-else> -- </span>
</div>
</el-col>
<el-col :span="6" class="f-flex">
<div class="f-flex ">
<div class="f-label">配偶情况</div>
<span class="f-left8 f-font-color">{{ spouseText }}</span>
<span class="f-left8 f-font-color" v-if="resiDetailObj.familyInfoDto">{{ spouseText() }}</span>
<span v-else> -- </span>
</div>
</el-col>
<el-col :span="6" class="f-flex">
@ -218,9 +220,9 @@
</el-col>
<el-col :span="6" class="f-flex">
<div class="f-label"><b>就业状态:</b></div>
<div class="f-left8 f-font-color">
{{ careerStatusText }}
</div>
<span class="f-left8 f-font-color" v-if="resiDetailObj.workInfoDto">
{{ careerStatusText() }}
</span>
</el-col>
<el-col :span="6" class="f-flex">
<div class="f-label">工作单位:</div>
@ -324,7 +326,6 @@ export default {
loading: true,
checkType: 'edit',//editview
changeRecordList: [],//
showFlag: true,
resiDetailObj: {},//
showFlagIdCardBtn: true,
showFlagMobileBtn: true,
@ -818,7 +819,6 @@ export default {
.get(`/actual/base/residentIntegratedInfo/detail/masked/${this.resiId}`)
.then(async (res) => {
if (res.data.code === 0) {
this.showFlag = true;
this.resiDetailObj = res.data.data || {};
const nameMap = {
ext: '拓展信息',
@ -879,21 +879,16 @@ export default {
this.score = res.data.data.integrityData.score;
const birthdayTimestamp = Date.parse(res.data.data.baseInfoDto.birthday);
this.age = this.calculateAge(birthdayTimestamp);
this.nationalityList.forEach(element => {
if (element.value === res.data.data.nationality) {
this.resiDetailObj.baseInfoDto.nationalityName = element.label;
}
});
} else if (res.data.code >= 8000) {
this.resiDetailObj = {};
this.showFlag = false
this.$message.error(res.data.msg);
}
})
.catch((err) => {
this.loading = false;
console.log(err);
});
this.loading = false;
},
handelClickJumpEdit() {
this.checkType = 'edit';
@ -905,15 +900,21 @@ export default {
const { data } = await this.$http.post(url, params);
const dictData = data.data;
if (itemType == 'checkbox') {
const matchedItem = dictData.find(item => value.includes(item.value.toString()));
return matchedItem ? matchedItem.label : '--';
const matchedLabels = value.map(item => {
const matchedItems = dictData.filter(obj => obj.value === item);
if (matchedItems.length > 0) {
return matchedItems.map(matchedItem => matchedItem.label).join(',');
} else {
return "";
}
}).join(',');
return matchedLabels ? matchedLabels : '--';
} else if (itemType == 'select1') {
const matchedItem = dictData.find(item => item.value === value);
return matchedItem ? matchedItem.label : '--';
}
} else {
if (itemType == 'radio1') {
console.log(opction, value, '单元中心户');
const matchedItem = opction.find(item => item.value === value)
return matchedItem ? matchedItem.label : '--';
} else if (itemType == 'input1' || itemType == "datepicker1" || itemType == 'cascader1') {
@ -959,7 +960,51 @@ export default {
}
this.tuominType = type;
},
nationalityText() {
let text = "--";
this.nationalityList.forEach((item) => {
if (item.value == this.resiDetailObj.baseInfoDto.nationality) {
text = item.label;
}
});
return text;
},
categoryDictText() {
let text = "--";
this.marriageArr.forEach((item) => {
if (item.value == this.resiDetailObj.familyInfoDto.marriage) {
text = item.label;
}
});
return text;
},
spouseText() {
let text = "--";
this.spouseArr.forEach((item) => {
if (item.value == this.resiDetailObj.familyInfoDto.spouseSituation) {
text = item.label;
}
});
return text;
},
careerStatusText() {
let text = "--";
this.careerStatusArr.forEach((item) => {
if (item.value == this.resiDetailObj.workInfoDto.careerStatus) {
text = item.label;
}
});
return text;
},
idTypeText() {
let text = "--";
this.idTypeList.forEach((item) => {
if (item.value == this.resiDetailObj.baseInfoDto.idType) {
text = item.label;
}
});
return text;
},
handelClickCheckPassword() {
this.$refs.form.validate(vali => {
if (vali) {
@ -1070,54 +1115,7 @@ export default {
return text;
}
},
computed: {
categoryDictText() {
let text = "--";
this.marriageArr.forEach((item) => {
if (item.value == this.resiDetailObj.familyInfoDto.marriage) {
text = item.label;
}
});
return text;
},
spouseText() {
let text = "--";
this.spouseArr.forEach((item) => {
if (item.value == this.resiDetailObj.familyInfoDto.spouseSituation) {
text = item.label;
}
});
return text;
},
nationalityText() {
let text = "--";
this.nationalityList.forEach((item) => {
if (item.value == this.resiDetailObj.baseInfoDto.nationality) {
text = item.label;
}
});
return text;
},
idTypeText() {
let text = "--";
this.idTypeList.forEach((item) => {
if (item.value == this.resiDetailObj.baseInfoDto.idType) {
text = item.label;
}
});
return text;
},
careerStatusText() {
let text = "--";
this.careerStatusArr.forEach((item) => {
if (item.value == this.resiDetailObj.workInfoDto.careerStatus) {
text = item.label;
}
});
return text;
}
},
computed: {},
watch: {
'$store.state.huaXiang.userInfo.resiId': {
handler(newValue, oldValue) {

Loading…
Cancel
Save