|
|
@ -90,22 +90,45 @@ |
|
|
align="center" /> |
|
|
align="center" /> |
|
|
<el-table-column label="回访方式" prop="followUpWay" :formatter="formatterFollowUpWay" header-align="center" |
|
|
<el-table-column label="回访方式" prop="followUpWay" :formatter="formatterFollowUpWay" header-align="center" |
|
|
align="center" /> |
|
|
align="center" /> |
|
|
<el-table-column label="文化设施" prop="evaCulturalFacility" :formatter="formatter" header-align="center" |
|
|
<el-table-column label="文化设施" prop="evaCulturalFacility" header-align="center" align="center"> |
|
|
align="center" /> |
|
|
<template slot-scope="scope"> |
|
|
<el-table-column label="体育设施" prop="evaSportsFacility" :formatter="formatter" header-align="center" |
|
|
{{ satisfactionCategory(scope.row, 'evaCulturalFacility') }} |
|
|
align="center" /> |
|
|
</template> |
|
|
<el-table-column label="生态环境" prop="evaEcologicalEnv" :formatter="formatter" header-align="center" |
|
|
</el-table-column> |
|
|
align="center" /> |
|
|
<el-table-column label="体育设施" prop="evaSportsFacility" header-align="center" align="center"> |
|
|
<el-table-column label="社会治安" prop="evaSocialSecurity" :formatter="formatter" header-align="center" |
|
|
<template slot-scope="scope"> |
|
|
align="center" /> |
|
|
{{ satisfactionCategory(scope.row, 'evaSportsFacility') }} |
|
|
<el-table-column label="社会救助" prop="evaSocialAssistance" :formatter="formatter" header-align="center" |
|
|
</template> |
|
|
align="center" /> |
|
|
</el-table-column> |
|
|
<el-table-column label="老有所养" prop="evaOldPeopleProvide" :formatter="formatter" header-align="center" |
|
|
<el-table-column label="生态环境" prop="evaEcologicalEnv" header-align="center" align="center"> |
|
|
align="center" /> |
|
|
<template slot-scope="scope"> |
|
|
<el-table-column label="基础教育" prop="evaBasicEducation" :formatter="formatter" header-align="center" |
|
|
{{ satisfactionCategory(scope.row, 'evaEcologicalEnv') }} |
|
|
align="center" /> |
|
|
</template> |
|
|
<el-table-column label="病有所医" prop="evaMedical" :formatter="formatter" header-align="center" |
|
|
</el-table-column> |
|
|
align="center" /> |
|
|
<el-table-column label="社会治安" prop="evaSocialSecurity" header-align="center" align="center"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
{{ satisfactionCategory(scope.row, 'evaSocialSecurity') }} |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="社会救助" prop="evaSocialAssistance" header-align="center" align="center"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
{{ satisfactionCategory(scope.row, 'evaSocialAssistance') }} |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="老有所养" prop="evaOldPeopleProvide" header-align="center" align="center"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
{{ satisfactionCategory(scope.row, 'evaOldPeopleProvide') }} |
|
|
|
|
|
</template></el-table-column> |
|
|
|
|
|
<el-table-column label="基础教育" prop="evaBasicEducation" header-align="center" align="center"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
{{ satisfactionCategory(scope.row, 'evaBasicEducation') }} |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="病有所医" prop="evaMedical" header-align="center" align="center"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
{{ satisfactionCategory(scope.row, 'evaMedical') }} |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
<el-table-column label="回访状态" prop="followUpStatus" :formatter="formatterFollowUpStatus" |
|
|
<el-table-column label="回访状态" prop="followUpStatus" :formatter="formatterFollowUpStatus" |
|
|
header-align="center" align="center" /> |
|
|
header-align="center" align="center" /> |
|
|
</el-table> |
|
|
</el-table> |
|
|
@ -151,12 +174,16 @@ export default { |
|
|
name: '', |
|
|
name: '', |
|
|
region: '', |
|
|
region: '', |
|
|
type: '' |
|
|
type: '' |
|
|
|
|
|
}, |
|
|
|
|
|
dicts: { |
|
|
|
|
|
satisfaction_level: [] |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
async created() { |
|
|
async created() { |
|
|
this.getResiDetail(); |
|
|
this.getResiDetail(); |
|
|
await this.loadEvent(); |
|
|
await this.loadEvent(); |
|
|
|
|
|
this.getDicts() |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
maxTableHeight() { |
|
|
maxTableHeight() { |
|
|
@ -204,6 +231,32 @@ export default { |
|
|
this.$message.error(msg); |
|
|
this.$message.error(msg); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
async getDicts() { |
|
|
|
|
|
try { |
|
|
|
|
|
const requests = [ |
|
|
|
|
|
this.$http.post("sys/dict/data/dictlist", { |
|
|
|
|
|
dictType: "satisfaction_level", |
|
|
|
|
|
}), |
|
|
|
|
|
]; |
|
|
|
|
|
const dictKeys = ['satisfaction_level']; // 对应的键名 |
|
|
|
|
|
const results = await Promise.all(requests); |
|
|
|
|
|
results.forEach((result, index) => { |
|
|
|
|
|
if (result.data.code === 0) { |
|
|
|
|
|
this.dicts[dictKeys[index]].push(...result.data.data); |
|
|
|
|
|
} else { |
|
|
|
|
|
console.log(`获取${dictKeys[index]}失败: ${result.data.msg}`); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} catch (error) { |
|
|
|
|
|
console.log("获取字典失败: ", error); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
satisfactionCategory(row, name) { |
|
|
|
|
|
if (row[name]) { |
|
|
|
|
|
let text = this.dicts.satisfaction_level.find(item => item.value === row[name]).label |
|
|
|
|
|
return text |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
async getResiDetail() { |
|
|
async getResiDetail() { |
|
|
this.$http |
|
|
this.$http |
|
|
.post(`/actual/base/residentBaseInfo/detail/${this.resiId}`) |
|
|
.post(`/actual/base/residentBaseInfo/detail/${this.resiId}`) |
|
|
@ -280,7 +333,8 @@ export default { |
|
|
this.loadCommunity(); |
|
|
this.loadCommunity(); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
formatter: function (row) { |
|
|
formatter(row) { |
|
|
|
|
|
|
|
|
let value = ''; |
|
|
let value = ''; |
|
|
if (row.evaCulturalFacility) { |
|
|
if (row.evaCulturalFacility) { |
|
|
value = row.evaCulturalFacility |
|
|
value = row.evaCulturalFacility |
|
|
@ -299,6 +353,7 @@ export default { |
|
|
} else if (row.evaMedical) { |
|
|
} else if (row.evaMedical) { |
|
|
value = row.evaMedical |
|
|
value = row.evaMedical |
|
|
} |
|
|
} |
|
|
|
|
|
console.log(value); |
|
|
return value === 'veryGood' ? '满意' : value === 'good' ? '基本满意' : value === 'bad' ? '不满意' : ''; |
|
|
return value === 'veryGood' ? '满意' : value === 'good' ? '基本满意' : value === 'bad' ? '不满意' : ''; |
|
|
}, |
|
|
}, |
|
|
formatterFollowUpWay: function (row) { |
|
|
formatterFollowUpWay: function (row) { |
|
|
@ -326,4 +381,5 @@ export default { |
|
|
.f-font-color { |
|
|
.f-font-color { |
|
|
color: #000; |
|
|
color: #000; |
|
|
font-weight: 400; |
|
|
font-weight: 400; |
|
|
}</style> |
|
|
} |
|
|
|
|
|
</style> |