Browse Source

居民编辑

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

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

@ -192,9 +192,7 @@ export default {
},
props: {
},
created() {
this.getOrgTree()
},
created() { },
activated() {
},
mounted() {
@ -221,6 +219,8 @@ export default {
acc[item.formName] = null;
if (item.itemType == 'checkbox') {
this.form[item.pformName][item.formName] = item.value || []
} else if (item.itemType == 'cascader1') {
await this.getOrgTree()
} else {
this.form[item.pformName][item.formName] = item.value || null
}
@ -236,6 +236,7 @@ export default {
})
})
Promise.all(promises).then((results) => {
}).catch((error) => {
console.error('Error fetching options:', error);
});
@ -282,11 +283,14 @@ export default {
try {
const { data } = await requestGet('/actual/base/party/org/listPartyOrgTreeRoot4Select', { depth: 8 })
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') {
i.opction = [data];
}
}
}
})
} catch (error) {
console.log(error);
@ -299,6 +303,7 @@ export default {
watch: {
'form': {
handler(newVal, oldVal) {
console.log(newVal);
this.$emit('submitExpand', this.form)
},
deep: true,

58
src/views/components/resiSearch.vue

@ -2,7 +2,7 @@
<div class="resi-container">
<!-- <el-card class="resi-card"> -->
<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-select v-model="form.nationality" class="u-item-width-normal" clearable size="small">
@ -86,6 +86,17 @@
</template>
</el-select>
</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-select v-model="form.projectStaff" class="u-item-width-normal" clearable size="small">
<template v-for="item in projectStaffList">
@ -104,7 +115,8 @@
</el-form-item>
<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">
<el-option :label='item.label' :value='item.value'> </el-option>
</template>
@ -264,19 +276,7 @@
<smart-search-rule ref="ref_rule" :formType="formType"></smart-search-rule>
</el-col>
</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>
</template>
@ -368,6 +368,29 @@ export default {
boxHeight: true,
pageLoading: false,
openSearch: false,
basicType: "name",
basicInfoList: [
{
label: '姓名',
value: 'name'
},
{
label: '联系电话',
value: 'mobile'
},
{
label: '证件号',
value: 'idNum'
},
{
label: '籍贯',
value: 'nativePlace'
},
{
label: '备注',
value: 'remark'
}
],
optionsV: [],
optionsB: [],
optionsH: [],
@ -1142,6 +1165,13 @@ export default {
nowDay = '0' + nowDay
}
return subYear - 1 + '-' + nowMonth + '-' + nowDay
},
handelClickBasicType(){
this.form.name = '';
this.form.mobile = '';
this.form.idNum = '';
this.form.nativePlace = '';
this.form.remark = '';
}
}
}

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

@ -72,159 +72,32 @@
{{ scope.row.gender == null ? '--' : scope.row.gender == 1 ? '男' : scope.row.gender == 2 ? '女' :
'--' }}
</div>
<div v-else-if="item.columnName == 'birthday'">
{{
scope.row.birthday
? scope.row.birthday.substr(0, 10)
: ""
}}
</div>
<div v-else-if="item.columnName == 'idNum'">
{{
scope.row.idNum
? `${scope.row.idNum.substr(0, 11)}` +
"******" +
`${scope.row.idNum.substr(16, 2)}`
: "--"
}}
<div v-else-if="item.columnName == 'gridName'">
<template >
<div class="resiCategoryInfoBox">
{{ scope.row.agencyName + scope.row.homeName }}
</div>
<div v-else-if="item.columnName == 'mobile'">
{{
scope.row.mobile
? `${scope.row.mobile.substr(0, 3)}` +
"******" +
`${scope.row.mobile.substr(7, 4)}`
: "--"
}}
</template>
</div>
<div v-else-if="item.columnName == 'categoryInfo'">
<div v-else-if="item.columnName == 'categoryNames'">
<template v-if="scope.row.categoryInfo">
<div class="resiCategoryInfoBox">
{{
scope.row.categoryInfo.specialSupportFlag ==
1
? "特扶人员 "
: ""
}}
{{
scope.row.categoryInfo.chronicDiseaseFlag ==
1
? "慢病 "
: ""
}}
{{
scope.row.categoryInfo.dementedFlag == 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
? "单元长 "
: ""
}}
{{ scope.row.categoryInfo.categoryNames }}
</div>
</template>
</div>
<div v-else-if="item.columnName == 'householdSituationName'">
<template v-if="scope.row.home">
<div >
{{ scope.row.home.householdSituationName || '' }}
</div>
</template>
</div>
<div v-else-if="item.columnName == 'resiHouseRel'">
<template v-if="scope.row.home">
<div >
{{ scope.row.home.resiHouseRel != null ? scope.row.home.resiHouseRel ==
0 ? "自住" : scope.row.home.resiHouseRel == 1 ? '租住' : '' : '' }}
</div>
</template>
</div>
@ -335,7 +208,7 @@
<el-form :model="checkPasswordFrom" :rules="checkPasswordRulse" ref="checkPasswordFrom">
<el-form-item label="密码" prop="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>
<div slot="footer" class="dialog-footer">
@ -421,17 +294,24 @@ export default {
editTableName: {},
formName: "",
tableHeader: [
{ columnName: "gridName", label: "地址", width: 180 },
// { columnName: "homeName", label: "", width: 150 },
{ columnName: "doorName", label: "门牌号", width: 80 },
{ columnName: "name", label: "姓名", width: 80 },
{ columnName: "birthday", label: "生日", width: 100 },
{ columnName: "gender", label: "性别", width: 50 },
{ columnName: "nationalityName", label: "国籍", width: 50 },
{ columnName: "agencyName", label: "所属组织", width: 150 },
{ columnName: "gridName", label: "所属网格", width: 150 },
{ columnName: "homeName", label: "所属房屋", width: 150 },
// { columnName: "agencyName", label: "", width: 150 },
{ columnName: "idTypeName", label: "证件类型", width: 80 },
{ columnName: "idNum", label: "证件号", width: 170 },
{ columnName: "categoryInfo", label: "居民分类" },
{ columnName: "mobile", label: "联系电话", width: 110 },
{ columnName: "categoryNames", label: "居民分类" , width: 180},
{ 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: [],
selection: [],

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

@ -79,7 +79,7 @@ export default {
let lineList = data.map((item, index) => ({
'from': 'N1',
'to': `N${index + 1}`,
'text': data[index].houseHolderRel || '未知',
'text':item.type ==1?'房屋':data[index].houseHolderRel || '未知',
'isHideArrow': true,
'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'))

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

@ -111,48 +111,7 @@ export default {
province: '特殊人群',
value: [],
type: 'checkbox',
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
}
]
option: []
},
{
index: 4,
@ -193,8 +152,17 @@ export default {
}
},
created() {
this.getDictData();
},
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() {
if (this.formType == 'add' || !this.userInfo.baseInfoDto.categoryInfo) return;
const updateValue = (flag, dataIndex) => {
@ -229,7 +197,7 @@ export default {
updateValue('publicWelfareFlag', 4);
},
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) {
item.index = index

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

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

Loading…
Cancel
Save