Browse Source

居民菜单逻辑修改

feature
mk 2 years ago
parent
commit
2ec40680da
  1. 2
      src/views/modules/portrayal/jumin/cpts/graph.vue
  2. 132
      src/views/modules/portrayal/jumin/index.vue

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

@ -61,7 +61,7 @@ export default {
let url = `/actual/base/peopleRoomOverview/getFamilyRelationshipList?type=0&resid=` + this.userInfo.resiId; let url = `/actual/base/peopleRoomOverview/getFamilyRelationshipList?type=0&resid=` + this.userInfo.resiId;
let { code, data, msg } = await requestPost(url) let { code, data, msg } = await requestPost(url)
if (code == 0) { if (code == 0) {
let index = data.findIndex(item => item.name == this.userInfo.name); let index = data.findIndex(item => item.id == this.userInfo.resiId);
if (index !== -1) { if (index !== -1) {
const [item] = data.splice(index, 1); const [item] = data.splice(index, 1);
data.unshift(item); data.unshift(item);

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

@ -23,7 +23,6 @@
:class="{ item: true, active: index == active }" :class="{ item: true, active: index == active }"
v-for="(item, index) in menuList" v-for="(item, index) in menuList"
@click="handelCLickMenu(item.id, index)" @click="handelCLickMenu(item.id, index)"
v-show="item.filledQty != 0 || item.id == 'ext' || item.id == 'reside'"
> >
<span>{{ item.name }}</span <span>{{ item.name }}</span
><span ><span
@ -1155,91 +1154,82 @@ export default {
console.log(error, `获取 ${dictType} 字典`); console.log(error, `获取 ${dictType} 字典`);
} }
}, },
getResiDetail() { async getResiDetail() {
this.$http try {
.get(`/actual/base/residentIntegratedInfo/detail/masked/${this.resiId}`) const res = await this.$http.get(`/actual/base/residentIntegratedInfo/detail/masked/${this.resiId}`);
.then(async (res) => { if (res.data.code === 0) {
if (res.data.code === 0) {
this.resiDetailObj = res.data.data || {}; this.resiDetailObj = res.data.data || {};
const nameMap = { const nameMap = {
reside: "居住信息", reside: "居住信息",
ext: "拓展信息", ext: "拓展信息",
united_front: "统战人员信息", united_front: "统战人员信息",
party_member: "党员信息", party_member: "党员信息",
death: "死亡信息", death: "死亡信息",
disability: "残疾信息", disability: "残疾信息",
subsistence_allowance: "低保信息", subsistence_allowance: "低保信息",
serious_illness: "大病信息", serious_illness: "大病信息",
veteran: "退役军人信息", veteran: "退役军人信息",
special_support: "特扶人员信息", special_support: "特扶人员信息",
old_people: "老年人信息", old_people: "老年人信息",
ensure_house: "保障房信息", ensure_house: "保障房信息",
chronic_disease: "慢病信息", chronic_disease: "慢病信息",
base: "基本信息", base: "基本信息",
business_record:'业务记录', business_record: '业务记录',
update_record:'更新记录' update_record: '更新记录'
}; };
this.menuList = Object.entries(
res.data.data.integrityData.integrityQtyMap const keysWithValueOne = [];
)
.map(([key, value]) => ({
name: nameMap[key],
id: key,
filledQty: value.filledQty,
totalQty: value.totalQty,
}))
.reverse();
const keysWithValueOne = [];
for (const key in this.resiDetailObj.baseInfoDto.categoryInfo) { for (const key in this.resiDetailObj.baseInfoDto.categoryInfo) {
if (this.resiDetailObj.baseInfoDto.categoryInfo[key] === 1) { if (this.resiDetailObj.baseInfoDto.categoryInfo[key] === 1) {
keysWithValueOne.push(this.incidence[key].formId); keysWithValueOne.push(this.incidence[key].formId);
} }
} }
this.expandList = this.originalExpandList.filter((itemA) => { const keysWithValueOneName = keysWithValueOne.map(str => {
return keysWithValueOne.some((itemB) => itemB === itemA.id); const matchedObject = this.originalExpandList.find(obj => obj.id === str);
return matchedObject ? matchedObject.title : null;
}); });
await Promise.all(
this.expandList.map(async (item) => {
await Promise.all(
item.children.map(async (child) => {
const key = child.formName;
if (this.resiDetailObj[item.id].hasOwnProperty(key)) {
child.value = await this.getDictName(
child.opctionUrl,
child.opctionParams,
this.resiDetailObj[item.id][
key == "partyOrgId" ? "branchId" : key
],
child.itemType,
child.opction
);
}
})
);
})
);
this.menuList = Object.entries(res.data.data.integrityData.integrityQtyMap)
.map(([key, value]) => ({
name: nameMap[key],
id: key,
filledQty: value.filledQty,
totalQty: value.totalQty,
}))
.reverse()
.filter(item => item.name === '基本信息' || item.name === '拓展信息' || item.name === '居住信息' || keysWithValueOneName.includes(item.name));
this.menuList.push( this.menuList.push(
{ { name: "业务记录", id: "businessRecord" },
name: "业务记录", { name: "更新纪录", id: "updateRecord" }
id: "businessRecord",
},
{
name: "更新纪录",
id: "updateRecord",
}
); );
this.expandList = this.originalExpandList.filter(itemA => keysWithValueOne.includes(itemA.id));
await Promise.all(this.expandList.map(async (item) => {
await Promise.all(item.children.map(async (child) => {
const key = child.formName;
if (this.resiDetailObj[item.id] && this.resiDetailObj[item.id].hasOwnProperty(key)) {
child.value = await this.getDictName(
child.opctionUrl,
child.opctionParams,
this.resiDetailObj[item.id][key == "partyOrgId" ? "branchId" : key],
child.itemType,
child.opction
);
}
}));
}));
this.score = res.data.data.integrityData.score; this.score = res.data.data.integrityData.score;
} else if (res.data.code >= 8000) { } else if (res.data.code >= 8000) {
this.resiDetailObj = {}; this.resiDetailObj = {};
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}) } catch (err) {
.catch((err) => { console.log(err);
console.log(err); }
}); },
},
handelClickJumpEdit() { handelClickJumpEdit() {
this.checkType = "edit"; this.checkType = "edit";
this.showCheckPassword = true; this.showCheckPassword = true;
@ -1490,8 +1480,6 @@ export default {
}, },
computed: { computed: {
familyStatus(){ familyStatus(){
console.log(this.resiDetailObj.baseInfoDto.gender);
console.log(this.resiDetailObj.baseInfoDto.age );
var status = ''; var status = '';
if(this.resiDetailObj.baseInfoDto){ if(this.resiDetailObj.baseInfoDto){
if(this.resiDetailObj.baseInfoDto.gender =='1' && this.resiDetailObj.baseInfoDto.age <18){ if(this.resiDetailObj.baseInfoDto.gender =='1' && this.resiDetailObj.baseInfoDto.age <18){

Loading…
Cancel
Save