|
|
@ -83,7 +83,7 @@ |
|
|
|
|
|
|
|
<div |
|
|
|
class="m-table-item" |
|
|
|
v-if="user.level == 'community'" |
|
|
|
v-if="user.level != 'street'" |
|
|
|
:style="{ height: maxTableHeight + 'px', width: '100%' }" |
|
|
|
> |
|
|
|
<div id="myCharts"></div> |
|
|
@ -96,7 +96,7 @@ |
|
|
|
alt="Image" |
|
|
|
/> |
|
|
|
<div class="left_right"> |
|
|
|
<!-- <div>{{ synthesisScore }}</div> --> |
|
|
|
<div>{{ badTotal }}</div> |
|
|
|
<div>综合得分</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -204,7 +204,7 @@ |
|
|
|
<form-list |
|
|
|
ref="ref_form_list" |
|
|
|
@handleClose="handleClose" |
|
|
|
:satisfactionCategoryStr="satisfactionCategoryStr" |
|
|
|
:communityId="communityId" |
|
|
|
:formObj="formData" |
|
|
|
@handelClickDetail="handelClickDetail" |
|
|
|
@handelClickEdit="handelClickEdit" |
|
|
@ -258,7 +258,7 @@ export default { |
|
|
|
|
|
|
|
satisfactionCategoryName: [], |
|
|
|
satisfactionCategory: [], |
|
|
|
score: [], |
|
|
|
badList: [], |
|
|
|
showProvinceFollowUpDetail: false, |
|
|
|
|
|
|
|
option: { |
|
|
@ -326,6 +326,9 @@ export default { |
|
|
|
pageSize: 20, |
|
|
|
pageNo: 1, |
|
|
|
user: {}, |
|
|
|
|
|
|
|
badTotal: 0, |
|
|
|
communityId: "", |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
@ -340,17 +343,16 @@ export default { |
|
|
|
let date = new Date(); |
|
|
|
this.formData.periodStart = util.formatDate(date, "yyyy-MM"); |
|
|
|
this.user = this.$store.state.user; |
|
|
|
console.log(this.user); |
|
|
|
}, |
|
|
|
|
|
|
|
async mounted() { |
|
|
|
this.agencyId = this.user.agencyId; |
|
|
|
if (this.user.level != "street") { |
|
|
|
this.initEcharts(); |
|
|
|
} |
|
|
|
await this.getDicts(); |
|
|
|
await this.getTableData(this.user.level); |
|
|
|
if (this.user.level == "community") { |
|
|
|
await this.initEcharts(); |
|
|
|
} else { |
|
|
|
} |
|
|
|
console.log(this.user.level); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// --------------------------------------字典------------------------------------------ |
|
|
@ -440,45 +442,52 @@ export default { |
|
|
|
}, |
|
|
|
// 获取列表 |
|
|
|
async getTableData(level) { |
|
|
|
try { |
|
|
|
if (level == "community") { |
|
|
|
const allowedCategories = this.dicts.satisfaction_category.map( |
|
|
|
(item) => item.value |
|
|
|
); |
|
|
|
const { data,code,msg } = await this.$http.post( |
|
|
|
`/governance/provinceEvaluationRecord/staticPeopleNum`, |
|
|
|
{ ...this.formData } |
|
|
|
); |
|
|
|
if(code == 0){ |
|
|
|
this.option.series[0].data = []; |
|
|
|
this.option.xAxis.data = []; |
|
|
|
this.echartsData = data; |
|
|
|
this.echartsData.forEach((item) => { |
|
|
|
if (allowedCategories.includes(item.scopeId)) { |
|
|
|
this.option.series[0].data.push(item.peopleNum); |
|
|
|
this.option.xAxis.data.push(item.scopeName); |
|
|
|
if (level != "street") { |
|
|
|
const allowedCategories = this.dicts.satisfaction_category.map( |
|
|
|
(item) => item.value |
|
|
|
); |
|
|
|
const { data } = await this.$http.post( |
|
|
|
`/governance/provinceEvaluationRecord/staticPeopleNum`, |
|
|
|
{ ...this.formData } |
|
|
|
); |
|
|
|
this.option.series[0].data = []; |
|
|
|
this.option.xAxis.data = []; |
|
|
|
this.echartsData = data; |
|
|
|
this.echartsData.forEach((item) => { |
|
|
|
if (allowedCategories.includes(item.scopeId)) { |
|
|
|
this.option.series[0].data.push(item.peopleNum); |
|
|
|
this.option.xAxis.data.push(item.scopeName); |
|
|
|
} |
|
|
|
}); |
|
|
|
this.myChart.setOption(this.option); |
|
|
|
} else { |
|
|
|
const { statistics, code, msg, tableList } = await requestPost( |
|
|
|
`/governance/provinceEvaluationRecord/staticStreetPeopleNum`, |
|
|
|
{ ...this.formData } |
|
|
|
); |
|
|
|
if (code == 0) { |
|
|
|
statistics.forEach((item) => { |
|
|
|
if (item.scopeId != "badTotal") { |
|
|
|
this.badList.push({ |
|
|
|
badNum: item.peopleNum, |
|
|
|
satisfactionCategoryName: item.scopeName, |
|
|
|
imgUrl: require(`@/assets/img/satisfaction/${item.scopeId}.png`), |
|
|
|
}); |
|
|
|
} |
|
|
|
this.tableList = tableList; |
|
|
|
this.badTotal = |
|
|
|
statistics.map((item) => item.scopeId == "badTotal").peopleNum || |
|
|
|
0; |
|
|
|
}); |
|
|
|
this.myChart.setOption(this.option); |
|
|
|
}else{ |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
const { data,code,msg } = await this.$http.post( |
|
|
|
`/governance/provinceEvaluationRecord/staticStreetPeopleNum`, |
|
|
|
{ ...this.formData } |
|
|
|
); |
|
|
|
if(code == 0){ |
|
|
|
console.log(data); |
|
|
|
}else { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
} catch (error) { |
|
|
|
console.log(error); |
|
|
|
} |
|
|
|
}, |
|
|
|
handleView(row) { |
|
|
|
this.showFormList = true; |
|
|
|
this.communityId = row.communityId; |
|
|
|
}, |
|
|
|
async handleExportModule() { |
|
|
|
let url = |
|
|
|
"/governance/provinceEvaluationRecord/provinceStatis/downloadImportTemplate"; |
|
|
|