Browse Source

Merge branch 'fix_bug' into preview

feature
mk 2 years ago
parent
commit
c90b051fbe
  1. 10
      src/router/index.js
  2. 21
      src/views/modules/communityService/policy/addPolicy.vue
  3. 108
      src/views/modules/portrayal/fangwu/cpts/leftTop.vue
  4. 69
      src/views/modules/portrayal/fangwu/cpts/rightBto.vue
  5. 118
      src/views/modules/portrayal/fangwu/index.vue
  6. 10
      src/views/modules/portrayal/house/cpts/graph.vue
  7. 3
      src/views/modules/portrayal/house/index.vue
  8. 14
      src/views/modules/portrayal/jumin/cpts/graph.vue
  9. 91
      src/views/modules/portrayal/jumin/index.vue

10
src/router/index.js

@ -128,16 +128,6 @@ export const moduleRoutes = {
title: "",
},
},
{
path: "fangwu-huaxiang",
props: true,
name: "fangwu-huaxiang",
component: () => import("@/views/modules/portrayal/fangwu/index"),
meta: {
isTab: true,
title: "",
},
},
{
path: "loudong-huaxiang",
props: true,

21
src/views/modules/communityService/policy/addPolicy.vue

@ -438,7 +438,6 @@ export default {
await this.getServiceTypeDictOptions();
await this.getDictOptions();
await this.loadScopeTree();
await this.loadDemandoption();
await this.getDemandOptions();
if (this.formType === "add") {
this.$refs.ref_form.resetFields();
@ -645,26 +644,6 @@ export default {
},
//
loadDemandoption() {
const url = "/governance/icresidemanddict/demandoption";
// const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/isServiceProject/service/serviceScopeTree'
let params = {};
window.app.ajax.post(
url,
params,
(data, rspMsg) => {
this.demandOptions = this.getFlagData(
this.getTreeData(data),
"usableFlag"
);
},
(rspMsg, data) => {
this.$message.error(rspMsg);
}
);
},
async handleAdd() {
// var oDate1 = new Date(this.formData.startDate);
// var oDate2 = new Date(this.formData.endDate);

108
src/views/modules/portrayal/fangwu/cpts/leftTop.vue

@ -1,108 +0,0 @@
<template>
<div class=''>
<div class="item f-font14">
<span class="label gray">房主姓名</span><span class="value">{{ houseInfo.ownerName || "--" }}</span>
</div>
<div class="item f-font14">
<span class="label gray">联系电话</span><span class="value">{{ houseInfo.ownerPhone || "--" }}</span>
</div>
<div class="item f-font14">
<span class="label gray">房屋类型</span><span class="value">{{ houseInfo.houseTypeName || "--" }}</span>
</div>
<div class="item f-font14">
<span class="label gray">用途</span><span class="value">{{ houseInfo.purposeName || "--" }}</span>
</div>
<div class="item f-font14">
<span class="label gray">家庭类别</span><span class="value">{{ familyTagsStr || "--" }}</span>
</div>
<div class="item f-font14">
<span class="label gray">房屋状态</span><span class="value">{{ houseInfo.rentName || "--" }}</span>
</div>
<div class="item f-font14">
<span class="label gray">家庭预警</span>
<span class="value">{{ houseInfo.riskFlag === '1' ? '满意度风险家庭' : '--' }}</span>
</div>
</div>
</template>
<script>
import { requestPost, requestGet } from '@/js/dai/request'
export default {
//
data() {
return {
houseInfo: {},
family_tag: [],
familyTagsStr:''
};
},
//
created() {
this.getDictOptions()
},
mounted() {
this.getPersonalFile()
},
props: {
houseId: {
type: String,
default: ''
},
},
watch: {
houseId: {
handler(newVal, oldVal) {
this.getPersonalFile()
}
}
},
//
methods: {
async getPersonalFile() {
let url = `/actual/base/communityHouse/getMaskedHouseDeatilById/` + this.houseId
let { code, data, msg } = await requestPost(url)
if (code == 0) {
this.houseInfo = data
const valuesToMatch = this.houseInfo.familyTags;
console.log(valuesToMatch);
const result = this.family_tag
.filter(item => valuesToMatch.includes(item.value))
.map(item => item.label)
.join(',');
this.familyTagsStr = result
console.log(result);
} else {
this.$message.error(msg)
}
},
async getDictOptions() {
const url = "/sys/dict/data/dictlist"
let params = {
dictType: 'family_tag'
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.family_tag = data;
} else {
this.$message.error(msg)
}
}
},
//
components: {},
//
computed: {},
//
watch: {},
}
</script>
<style lang="scss" scoped>
@import "@/assets/scss/pages/huaxiang";
@import "@/assets/scss/modules/management/list-main.scss";
</style>

69
src/views/modules/portrayal/fangwu/cpts/rightBto.vue

@ -1,69 +0,0 @@
<template>
<div class="table">
<el-table v-if="list.length > 0" :data="list" max-height="390px" height="390px">
<el-table-column label="序号" type="index" width="80" />
<el-table-column label="变更人" prop="resiName" width="140" />
<el-table-column label="变更类型" prop="typeName" width="" />
<el-table-column label="变更前" prop="beforeChange" width="120" />
<el-table-column label="变更后" prop="afterChange" width="120" />
<el-table-column label="操作人" prop="operatorName" width="120" />
<el-table-column label="调整时间" prop="changeTime" width="190" />
</el-table>
<div v-else style="width: 100%; height: 100%; text-align: center; padding-top: 120px">
<img width="268px" height="128px" src="~@/assets/images/overview/zanwu.png" />
<div style="color: #fff">暂无数据</div>
</div>
</div>
</template>
<script>
export default {
props: {
houseId: {
type: String,
default:''
},
},
data() {
return {
list: [],
total: 0,
};
},
created() {
this.getList();
},
watch: {
},
methods: {
getList() {
// (-2-1访0访/访1访)
const completeFlags = {
"-2": "未知",
"-1": "不接受回访",
0: "接受回访/待回访",
1: "已回访",
};
//
this.$http.get("/actual/base/peopleRoomOverview/houseResidentChangeRecord?houseId=" + this.houseId).then(({ data: res }) => {
this.list = res.data.map((item) => {
return {
...item,
completeFlag: completeFlags[item.completeFlag],
};
});
this.total = res.data.length;
});
},
},
};
</script>
<style scoped lang="scss">
.business-records {
margin-bottom: 25px;
}
</style>

118
src/views/modules/portrayal/fangwu/index.vue

@ -1,118 +0,0 @@
<template>
<div class='g-main'>
<div class="top">
<div class="left">
<div class="card">
<div class="title">
<div><img src="../../../../assets/images/index/title-icon-sqzl.png" alt="">家庭标签</div>
</div>
<div class="f-top12">
<img src="../../../../assets/images/index/house.png" alt="" width="56px"> {{ houseInfo.fullName }}
</div>
<section class="bgC">
<left-top :houseId="houseInfo.houseId" :key="houseInfo.houseId"></left-top>
</section>
</div>
</div>
<div class="right">
<div class="card">
<div class="title">
<div><img src="../../../../assets/images/index/title-icon-ywjl.png" alt="">各项业务记录</div>
</div>
<business-Record v-if="childrenFlag" :houseInfo="houseInfo" :familyResiList="familyResiList" :type="'1'"
:key="houseInfo.houseId"></business-Record>
</div>
</div>
</div>
<div class="bottom">
<div class="left">
<div class="card">
<div class="title">
<div><img src="../../../../assets/images/index/title-icon-jtgx.png" alt="">家庭关系</div>
</div>
<section class="bgC" style="padding: 0;">
<left-bto :houseInfo="houseInfo" :type="'1'" :key="houseInfo.houseId"></left-bto>
</section>
</div>
</div>
<div class="right">
<div class="card right16">
<div class="title">
<div><img src="../../../../assets/images/index/title-icon-rkbh.png" alt="">人口变化情况</div>
</div>
<div>
<right-bto :houseId="houseInfo.houseId" :key="houseInfo.houseId" />
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { requestPost, requestGet } from '@/js/dai/request'
import leftTop from "./cpts/leftTop";
import leftBto from "../jumin/cpts/leftBto";
import businessRecord from "../jumin/cpts/businessRecord";
import rightBto from "./cpts/rightBto";
import nextTick from "dai-js/tools/nextTick";
export default {
//
data() {
return {
houseInfo: {},
showedResiInfo: false,
familyResiList: [],
childrenFlag: false
};
},
//
async created() {
this.houseInfo = this.$store.state.huaXiang.houseInfo
await this.getFamilyRelationshipList()
},
mounted() {
},
activated() {
this.houseInfo = this.$store.state.huaXiang.houseInfo
this.getFamilyRelationshipList()
},
watch: {
'$route': function (to, from) {
if (to.path != '/main/fangwu-huaxiang') {
this.childrenFlag = false
}
}
},
//
methods: {
async getFamilyRelationshipList() {
let url = `/actual/base/peopleRoomOverview/getFamilyRelationshipList?type=1&resid=` + this.houseInfo.houseId
let { code, data, msg } = await requestPost(url)
if (code == 0) {
this.familyResiList = data.map(item => item.id)
} else {
this.$message.error(msg)
}
this.childrenFlag = true
},
changeTotal(val) {
this.total = val.total
},
},
//
// leftTop, leftBto, resiInfo, businessRecord, pointsRecord, rightBto, xiangshoufuwu
components: { leftTop, leftBto, businessRecord, rightBto },
//
computed: {},
//
}
</script>
<style lang="scss" scoped>
@import "@/assets/scss/pages/huaxiang";
@import "@/assets/scss/modules/management/list-main.scss";
</style>

10
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;
@ -188,13 +188,15 @@ export default {
margin-left: -5px;
text-align: center;
margin-top: 63px;
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;
border-radius: 15px;
padding: 3px;
box-sizing: border-box;
}
.rel-node-checked {

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

@ -43,9 +43,10 @@
<el-col :span="6" class="f-flex">
<div class="f-label">家庭标签</div>
<div class="f-left8 f-font-color" v-if="houseDetailObj.familyTags">
<div class="f-left8 f-font-color" v-if="houseDetailObj.familyTags.length>0">
{{familyTags() }}
</div>
<div v-else>--</div>
</el-col>
<el-col :span="6" class="f-flex">
<div class="f-label">房主姓名</div>

14
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 { code, data, msg } = await requestPost(url)
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) {
const [item] = data.splice(index, 1);
data.unshift(item);
@ -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;

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

@ -2,7 +2,9 @@
<div class="g-main" v-loading="loading">
<div class="left">
<div class="user">
<img src="@/assets/images/index/nan.png" alt="" />
<div v-if="resiDetailObj.baseInfoDto">
<img :src="require(`@/assets/images/index/${familyStatus}.png`)" alt="" v-if="resiDetailObj.baseInfoDto.gender==='1'"/>
</div>
<span v-if="resiDetailObj.baseInfoDto">
{{ resiDetailObj.baseInfoDto.name }}{{ resiDetailObj.baseInfoDto.age }}</span
>
@ -21,7 +23,6 @@
:class="{ item: true, active: index == active }"
v-for="(item, index) in menuList"
@click="handelCLickMenu(item.id, index)"
v-show="item.filledQty != 0 || item.id == 'ext' || item.id == 'reside'"
>
<span>{{ item.name }}</span
><span
@ -1174,10 +1175,24 @@ export default {
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 && this.incidence[key]) {
keysWithValueOne.push(this.incidence[key].formId);
}
}
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,
@ -1185,21 +1200,46 @@ export default {
totalQty: value.totalQty,
}))
.reverse();
const keysWithValueOne = [];
for (const key in this.resiDetailObj.baseInfoDto.categoryInfo) {
if (this.resiDetailObj.baseInfoDto.categoryInfo[key] === 1) {
keysWithValueOne.push(this.incidence[key].formId);
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 === '居住信息' ){
if(this.menuList.findIndex(item=>item.name === keysWithValueOneName[i]) === -1){
this.menuList.push(this.menuList[c])
}
}
}
}
}
}
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",
}
);
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].hasOwnProperty(key)) {
if(this.resiDetailObj[item.id]){
if (this.resiDetailObj[item.id].hasOwnProperty(key)) {
child.value = await this.getDictName(
child.opctionUrl,
child.opctionParams,
@ -1210,22 +1250,12 @@ export default {
child.opction
);
}
}
})
);
})
);
this.menuList.push(
{
name: "业务记录",
id: "businessRecord",
},
{
name: "更新纪录",
id: "updateRecord",
}
);
this.score = res.data.data.integrityData.score;
} else if (res.data.code >= 8000) {
this.resiDetailObj = {};
@ -1236,6 +1266,7 @@ export default {
console.log(err);
});
},
handelClickJumpEdit() {
this.checkType = "edit";
this.showCheckPassword = true;
@ -1484,7 +1515,27 @@ export default {
return text;
},
},
computed: {},
computed: {
familyStatus(){
var status = '';
if(this.resiDetailObj.baseInfoDto){
if(this.resiDetailObj.baseInfoDto.gender =='1' && this.resiDetailObj.baseInfoDto.age <18){
status = 'son'
}else if(this.resiDetailObj.baseInfoDto.gender =='1' && this.resiDetailObj.baseInfoDto.age >18 && this.resiDetailObj.baseInfoDto.age <60){
status = 'father'
}else if(this.resiDetailObj.baseInfoDto.gender =='1' && this.resiDetailObj.baseInfoDto.age >=60){
status = 'grandpa'
}else if(this.resiDetailObj.baseInfoDto.gender =='2' && this.resiDetailObj.baseInfoDto.age >=60){
status = 'grandma'
}else if(this.resiDetailObj.baseInfoDto.gender =='2' && ( this.resiDetailObj.baseInfoDto.age >18 && this.resiDetailObj.baseInfoDto.age <60)){
status = 'mother'
} else if(this.resiDetailObj.baseInfoDto.gender =='2' && this.resiDetailObj.baseInfoDto.age <18){
status = 'girl'
}
}
return status
}
},
watch: {
"$store.state.huaXiang.userInfo.resiId": {
handler(newValue, oldValue) {

Loading…
Cancel
Save