Browse Source

房屋画像问题

feature
mk 2 years ago
parent
commit
e8e5e84ef9
  1. 61
      src/views/modules/portrayal/house/cpts/businessRecord.vue
  2. 3
      src/views/modules/portrayal/house/cpts/graph.vue
  3. 2
      src/views/modules/portrayal/house/cpts/table/sheng.vue
  4. 10
      src/views/modules/portrayal/house/index.vue

61
src/views/modules/portrayal/house/cpts/businessRecord.vue

@ -74,7 +74,7 @@ export default {
}, },
async mounted() { async mounted() {
// //
await this.getHouseRelationShip(); console.log(this.familyResiList,'aaa');
await this.getComplainList(); await this.getComplainList();
await this.getShengList(); await this.getShengList();
@ -94,20 +94,35 @@ export default {
}, },
}, },
watch:{
"familyResiList": {
handler(newValue, oldValue) {
this.getComplainList();
this.getShengList();
this.getShequList();
this.getshijianList();
this.getxuqiuList();
this.getfuwuList();
},
deep: true, //
immediate: true, // handler
},
},
// //
methods: { methods: {
tabClick(index) {}, tabClick(index) {},
handleSizeChange() {}, handleSizeChange() {},
handleCurrentChange() {}, handleCurrentChange() {},
getComplainList() { getComplainList() {
console.log(this.familyResiList);
if (this.resiId.length == 0) { if (this.familyResiList.length == 0) {
this.complainList = []; this.complainList = [];
this.complainLabel = `12345投诉(0)`; this.complainLabel = `12345投诉(0)`;
return; return;
} }
let parm = { let parm = {
residList: this.resiId, residList: this.familyResiList,
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: this.pageSize, pageSize: this.pageSize,
eventType: "3", eventType: "3",
@ -135,13 +150,13 @@ export default {
}); });
}, },
getShengList() { getShengList() {
if (this.resiId.length == 0) { if (this.familyResiList.length == 0) {
this.shengList = []; this.shengList = [];
this.shengLabel = `省满意度调查(0)`; this.shengLabel = `省满意度调查(0)`;
return; return;
} }
let parm = { let parm = {
residList: this.resiId, residList: this.familyResiList,
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: this.pageSize, pageSize: this.pageSize,
}; };
@ -158,13 +173,13 @@ export default {
}); });
}, },
getShequList() { getShequList() {
if (this.resiId.length == 0) { if (this.familyResiList.length == 0) {
this.shequList = []; this.shequList = [];
this.shequLabel = `社区满意度自查(0)`; this.shequLabel = `社区满意度自查(0)`;
return; return;
} }
let parm = { let parm = {
residList: this.resiId, residList: this.familyResiList,
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: this.pageSize, pageSize: this.pageSize,
}; };
@ -191,13 +206,13 @@ export default {
}); });
}, },
getshijianList() { getshijianList() {
if (this.resiId.length == 0) { if (this.familyResiList.length == 0) {
this.shijianList = []; this.shijianList = [];
this.shijianLabel = `上报事件(0)`; this.shijianLabel = `上报事件(0)`;
return; return;
} }
let parm = { let parm = {
residList: this.resiId, residList: this.familyResiList,
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: this.pageSize, pageSize: this.pageSize,
}; };
@ -221,13 +236,13 @@ export default {
}); });
}, },
getxuqiuList() { getxuqiuList() {
if (this.resiId.length == 0) { if (this.familyResiList.length == 0) {
this.xuqiuList = []; this.xuqiuList = [];
this.xuqiuLabel = `居民需求(0)`; this.xuqiuLabel = `居民需求(0)`;
return; return;
} }
let parm = { let parm = {
residList: this.resiId, residList: this.familyResiList,
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: this.pageSize, pageSize: this.pageSize,
}; };
@ -245,13 +260,13 @@ export default {
}); });
}, },
getfuwuList() { getfuwuList() {
if (this.resiId.length == 0) { if (this.familyResiList.length == 0) {
this.fuwuList = []; this.fuwuList = [];
this.fuwuLabel = `社区服务(0)`; this.fuwuLabel = `社区服务(0)`;
return; return;
} }
let parm = { let parm = {
residList: this.resiId, residList: this.familyResiList,
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: this.pageSize, pageSize: this.pageSize,
}; };
@ -268,30 +283,12 @@ export default {
}); });
}, },
//
async getHouseRelationShip() {
try {
var resiIds = [];
await this.$http.post("/actual/base/peopleRoomOverview/getFamilyRelationshipList?type=1&resid="+this.houseId).then(({ data: res }) => {
res.data.forEach(function(item) {
// "id"houseResiIds
resiIds.push(item.id);
},this);
});
this.resiId = resiIds;
} catch (error) {
console.log(error);
}
},
}, },
// //
components: { complain, sheng, fuwu, shijian, xuqiu, shequ }, components: { complain, sheng, fuwu, shijian, xuqiu, shequ },
// //
computed: {}, computed: {},
//
watch: {},
}; };
</script> </script>

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

@ -58,7 +58,7 @@ export default {
}, },
methods: { methods: {
async getFamilyRelationshipList() { async getFamilyRelationshipList() {
let url = `/actual/base/peopleRoomOverview/getFamilyRelationshipList?type=1&resid=` + this.houseInfo.id; let url = `/actual/base/peopleRoomOverview/getFamilyRelationshipListByHouseId?type=0&houseId=` + this.houseInfo.id;
let { code, data, msg } = await requestPost(url) let { code, data, msg } = await requestPost(url)
if (code == 0) { if (code == 0) {
@ -90,6 +90,7 @@ export default {
})); }));
lineList = lineList.slice(1) lineList = lineList.slice(1)
const __graph_json_data = { rootId: 'root', nodes: familyList, lines: lineList } const __graph_json_data = { rootId: 'root', nodes: familyList, lines: lineList }
this.$emit('updataHouseIds',data.map(item=>item.id))
this.$refs.seeksRelationGraph.setJsonData(__graph_json_data, (graphInstance) => { this.$refs.seeksRelationGraph.setJsonData(__graph_json_data, (graphInstance) => {
// //
}); });

2
src/views/modules/portrayal/house/cpts/table/sheng.vue

@ -1,6 +1,6 @@
<template> <template>
<div class="table"> <div class="table">
<el-table> <el-table :data="tableData">
<el-table-column label="序号" type="index" width="80" /> <el-table-column label="序号" type="index" width="80" />
<el-table-column label="不满意事项类型" prop="scope" width="190" /> <el-table-column label="不满意事项类型" prop="scope" width="190" />
<el-table-column label="不满意事项描述" prop="problemDesc" width="" /> <el-table-column label="不满意事项描述" prop="problemDesc" width="" />

10
src/views/modules/portrayal/house/index.vue

@ -149,11 +149,12 @@
<graph <graph
:houseInfo="houseDetailObj" :houseInfo="houseDetailObj"
@updataHouseIds="updataHouseIds"
v-if="houseDetailObj" v-if="houseDetailObj"
/> />
<div class="title-small" id="businessRecord">业务记录</div> <div class="title-small" id="businessRecord">业务记录</div>
<business-record :houseId="houseId"></business-record> <business-record :houseId="houseId" :familyResiList="houseIds" v-if="houseIds"></business-record>
<div class="title-small" id="updateRecord">更新记录</div> <div class="title-small" id="updateRecord">更新记录</div>
<change-record :tableData="houseChangeRecordList"></change-record> <change-record :tableData="houseChangeRecordList"></change-record>
</div> </div>
@ -196,7 +197,7 @@ export default {
showCheckPassword: false, showCheckPassword: false,
houseId:"", houseId:"",
houseIds:[],
form: { form: {
password: "", // password: "", //
}, },
@ -250,7 +251,10 @@ export default {
this.checkType = "edit"; this.checkType = "edit";
this.showCheckPassword = true; this.showCheckPassword = true;
}, },
updataHouseIds(val){
console.log(val);
this.houseIds= val
},
handelCLickShowCheckPassword(type) { handelCLickShowCheckPassword(type) {
this.form.password = ""; this.form.password = "";
this.checkType = "view"; this.checkType = "view";

Loading…
Cancel
Save