Browse Source

1

dlt_manageScope_0428
mk 2 years ago
parent
commit
61a78be175
  1. 42
      src/views/modules/base/smartImport/cpts/createdTask.vue
  2. 2
      src/views/modules/portrayal/house/cpts/graph.vue
  3. 12
      src/views/modules/portrayal/jumin/cpts/graph.vue
  4. 150
      src/views/modules/portrayal/jumin/index.vue

42
src/views/modules/base/smartImport/cpts/createdTask.vue

@ -429,40 +429,28 @@ export default {
data: params,
})
.then((res) => {
// if (res.status==200) {
if (res.status==200) {
// let fileName = window.decodeURI(
// res.headers["content-disposition"]
// .split(";")[1]
// .split("=")[1]
// );
// let fileName = `${
// this.$store.state.user.agencyName + this.categoryName
// }`;
// let blob = new Blob([res.data], {
// type: "application/vnd.ms-excel",
// });
// var url = window.URL.createObjectURL(blob);
// var aLink = document.createElement("a");
// aLink.style.display = "none";
// aLink.href = url;
// aLink.setAttribute("download", fileName);
// document.body.appendChild(aLink);
// aLink.click();
// document.body.removeChild(aLink); //
// window.URL.revokeObjectURL(url); //blob
// } else this.$message.error("");
let fileName = `${
let fileName = `${
this.$store.state.user.agencyName + this.categoryName
}导入模板`;
const url = res.data.data;
const aLink = document.createElement("a");
aLink.style.display = "none";
aLink.href = url;
aLink.setAttribute("download",`${fileName}.xlsx`);
document.body.appendChild(aLink);
aLink.click();
document.body.removeChild(aLink);
window.URL.revokeObjectURL(url);
let blob = new Blob([res.data], {
type: "application/vnd.ms-excel",
});
var url = window.URL.createObjectURL(blob);
var aLink = document.createElement("a");
aLink.style.display = "none";
aLink.href = url;
aLink.setAttribute("download", fileName);
document.body.appendChild(aLink);
aLink.click();
document.body.removeChild(aLink); //
window.URL.revokeObjectURL(url); //blob
} else this.$message.error("下载失败");
})
.catch((err) => {
console.log(err);

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

@ -140,7 +140,7 @@ export default {
line-height: 20px;
position: absolute;
width: 96px;
height: 20px;
height: auto;
background: #FFFFFF;
box-shadow: 0px 4px 6px 0px rgba(211, 213, 214, 0.4);
border-radius: 10px;

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

@ -141,10 +141,10 @@ export default {
margin-left: 2px;
text-align: center;
margin-top: 83px;
line-height: 20px;
// line-height: 20px;
position: absolute;
width: 96px;
height: 20px;
height: auto;
background: #FFFFFF;
box-shadow: 0px 4px 6px 0px rgba(211, 213, 214, 0.4);
border-radius: 10px;
@ -189,13 +189,13 @@ export default {
}
.c-node-name1 {
margin-left: 2px;
margin-left: 1px;
text-align: center;
margin-top: 83px;
line-height: 20px;
margin-top: 72px;
// line-height: 20px;
position: absolute;
width: 96px;
height: 20px;
height: auto;
background: #FFFFFF;
box-shadow: 0px 4px 6px 0px rgba(211, 213, 214, 0.4);
border-radius: 10px;

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

@ -1154,81 +1154,119 @@ export default {
console.log(error, `获取 ${dictType} 字典`);
}
},
async getResiDetail() {
try {
const res = await this.$http.get(`/actual/base/residentIntegratedInfo/detail/masked/${this.resiId}`);
if (res.data.code === 0) {
getResiDetail() {
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 = {
reside: "居住信息",
ext: "拓展信息",
united_front: "统战人员信息",
party_member: "党员信息",
death: "死亡信息",
disability: "残疾信息",
subsistence_allowance: "低保信息",
serious_illness: "大病信息",
veteran: "退役军人信息",
special_support: "特扶人员信息",
old_people: "老年人信息",
ensure_house: "保障房信息",
chronic_disease: "慢病信息",
base: "基本信息",
business_record: '业务记录',
update_record: '更新记录'
reside: "居住信息",
ext: "拓展信息",
united_front: "统战人员信息",
party_member: "党员信息",
death: "死亡信息",
disability: "残疾信息",
subsistence_allowance: "低保信息",
serious_illness: "大病信息",
veteran: "退役军人信息",
special_support: "特扶人员信息",
old_people: "老年人信息",
ensure_house: "保障房信息",
chronic_disease: "慢病信息",
base: "基本信息",
business_record:'业务记录',
update_record:'更新记录'
};
const keysWithValueOne = [];
for (const key in this.resiDetailObj.baseInfoDto.categoryInfo) {
if (this.resiDetailObj.baseInfoDto.categoryInfo[key] === 1) {
if (this.resiDetailObj.baseInfoDto.categoryInfo[key] === 1 && this.incidence[key]) {
keysWithValueOne.push(this.incidence[key].formId);
}
}
const keysWithValueOneName = keysWithValueOne.map(str => {
const keysWithValueOneName= keysWithValueOne.map(str => {
const matchedObject = this.originalExpandList.find(obj => obj.id === str);
return matchedObject ? matchedObject.title : null;
});
this.menuList = Object.entries(
res.data.data.integrityData.integrityQtyMap
)
.map(([key, value]) => ({
name: nameMap[key],
id: key,
filledQty: value.filledQty,
totalQty: value.totalQty,
}))
.reverse();
console.log(this.menuList,"this.menuList");
for(let i in keysWithValueOneName){
for(let k in this.originalExpandList){
if(keysWithValueOneName[i] === this.originalExpandList[k].title){
for(let c in this.menuList){
if(this.menuList[c].name === keysWithValueOneName[i] || this.menuList[c].name === '基本信息' || this.menuList[c].name === '拓展信息' || this.menuList[c].name === '居住信息' ){
console.log(this.menuList[c]);
if(this.menuList.findIndex(item=>item.name === keysWithValueOneName[i]) === -1){
this.menuList.push(this.menuList[c])
}
}
}
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 = this.menuList.filter((itemA) => {
return itemA.name === '基本信息' || itemA.name === '拓展信息' || itemA.name === '居住信息'|| keysWithValueOneName.some((itemB) => itemB === itemA.name);
});
this.menuList.push(
{ name: "业务记录", id: "businessRecord" },
{ name: "更新纪录", id: "updateRecord" }
{
name: "业务记录",
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) => {
this.expandList = this.originalExpandList.filter((itemA) => {
return keysWithValueOne.some((itemB) => itemB === itemA.id);
});
console.log(keysWithValueOne,'keysWithValueOne');
console.log(this.resiDetailObj,'this.resiDetailObj');
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
);
if(this.resiDetailObj[item.id]){
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.score = res.data.data.integrityData.score;
} else if (res.data.code >= 8000) {
} else if (res.data.code >= 8000) {
this.resiDetailObj = {};
this.$message.error(res.data.msg);
}
} catch (err) {
console.log(err);
}
},
}
})
.catch((err) => {
console.log(err);
});
},
handelClickJumpEdit() {
this.checkType = "edit";

Loading…
Cancel
Save