|
|
@ -5,8 +5,6 @@ |
|
|
<div class="m-search"> |
|
|
<div class="m-search"> |
|
|
<el-form :inline="true" :model="formData" ref="ref_searchform" :label-width="'100px'"> |
|
|
<el-form :inline="true" :model="formData" ref="ref_searchform" :label-width="'100px'"> |
|
|
<el-form-item label="自评周期"> |
|
|
<el-form-item label="自评周期"> |
|
|
<!-- <el-input v-model="formData.name" placeholder="请输入" size="small" class="u-item-width-normal" |
|
|
|
|
|
clearable></el-input> --> |
|
|
|
|
|
<el-date-picker v-model="formData.period" type="date" value-format="yyyy-MM" placeholder="选择日期" |
|
|
<el-date-picker v-model="formData.period" type="date" value-format="yyyy-MM" placeholder="选择日期" |
|
|
style="width: 202px" clearable> |
|
|
style="width: 202px" clearable> |
|
|
</el-date-picker> |
|
|
</el-date-picker> |
|
|
@ -23,16 +21,16 @@ |
|
|
|
|
|
|
|
|
<div class="m-table"> |
|
|
<div class="m-table"> |
|
|
<div class="div_btn"> |
|
|
<div class="div_btn"> |
|
|
<el-button type="primary" size="small" |
|
|
<el-button type="primary" size="small" class="diy-button--white el-button--default" |
|
|
class="diy-button--white el-button--default" @click="handleCreateMonthlySurvey">生成本月社区自查问卷表</el-button> |
|
|
@click="handleCreateMonthlySurvey">生成本月社区自查问卷表</el-button> |
|
|
</div> |
|
|
</div> |
|
|
<div class="m-table-item" :style="{ height: maxTableHeight + 'px', width: '100%' }"> |
|
|
<div class="m-table-item" :style="{ height: maxTableHeight + 'px', width: '100%' }"> |
|
|
<div>本月已参与调研人数 500人</div> |
|
|
<div>本月已参与调研人数 {{ personQty }}人</div> |
|
|
<section class="content_box"> |
|
|
<section class="content_box"> |
|
|
<div class="left"> |
|
|
<div class="left"> |
|
|
<img src="../../../../assets/img/satisfaction/zhdf.png" alt="Image"> |
|
|
<img src="../../../../assets/img/satisfaction/zhdf.png" alt="Image"> |
|
|
<div class="left_right"> |
|
|
<div class="left_right"> |
|
|
<div>85.12</div> |
|
|
<div>{{ synthesisScore }}</div> |
|
|
<div>综合得分</div> |
|
|
<div>综合得分</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
@ -57,32 +55,29 @@ |
|
|
</div> |
|
|
</div> |
|
|
<el-dialog v-if="showFormList" :visible.sync="showFormList" :close-on-click-modal="false" |
|
|
<el-dialog v-if="showFormList" :visible.sync="showFormList" :close-on-click-modal="false" |
|
|
:close-on-press-escape="false" title="社区自查" :modal-append-to-body="false" width="820px" top="5vh" |
|
|
:close-on-press-escape="false" title="社区自查" :modal-append-to-body="false" width="820px" top="5vh" |
|
|
class="dialog-h" @closed="showFormList = false" > |
|
|
class="dialog-h" @closed="showFormList = false"> |
|
|
<form-list ref="ref_add_form" @handleClose="handleClose" :satisfactionCategoryStr="satisfactionCategoryStr" |
|
|
<form-list ref="ref_add_form" @handleClose="handleClose" :satisfactionCategoryStr="satisfactionCategoryStr" |
|
|
@handelDetail="handelDetail" @handelFollowUpList="handelFollowUpList" :period="formData.period"></form-list> |
|
|
@handelDetail="handelDetail" @handelFollowUpList="handelFollowUpList" :period="formData.period" :inspRecordId="formData.inspRecordId"></form-list> |
|
|
<el-dialog width="920px" class="dialog-h" title="社区自查报告详情" :close-on-click-modal="false" |
|
|
<el-dialog width="920px" class="dialog-h" title="社区自查报告详情" :close-on-click-modal="false" |
|
|
v-if="showFollowUpDetail" :visible.sync="showFollowUpDetail" append-to-body > |
|
|
v-if="showFollowUpDetail" :visible.sync="showFollowUpDetail" append-to-body> |
|
|
<follow-Detail></follow-Detail> |
|
|
<follow-Detail></follow-Detail> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
<el-dialog width="820px" class="dialog-h" title="回访记录" :close-on-click-modal="false" v-if="showFollowUpList" |
|
|
<el-dialog width="820px" class="dialog-h" title="回访记录" :close-on-click-modal="false" v-if="showFollowUpList" |
|
|
:visible.sync="showFollowUpList" append-to-body > |
|
|
:visible.sync="showFollowUpList" append-to-body> |
|
|
<follow-list></follow-list> |
|
|
<follow-list></follow-list> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
<el-dialog title="调查问卷" |
|
|
<el-dialog title="调查问卷" :visible.sync="showTduckImage" width="550px"> |
|
|
:visible.sync="showTduckImage" |
|
|
<el-image :src="qrCodeImgUrl"> |
|
|
width="550px"> |
|
|
<div slot="placeholder" class="image-slot"> |
|
|
<el-image :src="qrCodeImgUrl"> |
|
|
加载中<span class="dot">...</span> |
|
|
<div slot="placeholder" class="image-slot"> |
|
|
</div> |
|
|
加载中<span class="dot">...</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-image> |
|
|
</el-image> |
|
|
<div> |
|
|
<div> |
|
|
<span>问卷链接:</span> {{questionnaireUrl}} |
|
|
<span>问卷链接:</span> {{ questionnaireUrl }} |
|
|
</div> |
|
|
</div> |
|
|
<span slot="footer" |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
class="dialog-footer"> |
|
|
</span> |
|
|
</span> |
|
|
|
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
@ -96,12 +91,12 @@ import followDetail from "./followUpDetail"; |
|
|
import util from "@js/util.js"; |
|
|
import util from "@js/util.js"; |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
components: { formList, followList,followDetail }, |
|
|
components: { formList, followList, followDetail }, |
|
|
|
|
|
|
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
searchH: 20, |
|
|
searchH: 20, |
|
|
|
|
|
|
|
|
formData: { |
|
|
formData: { |
|
|
period: "",//月份 |
|
|
period: "",//月份 |
|
|
inspRecordId: "", |
|
|
inspRecordId: "", |
|
|
@ -133,7 +128,7 @@ export default { |
|
|
containLabel: true, |
|
|
containLabel: true, |
|
|
}, |
|
|
}, |
|
|
toolbox: {}, |
|
|
toolbox: {}, |
|
|
|
|
|
|
|
|
xAxis: { |
|
|
xAxis: { |
|
|
type: "category", |
|
|
type: "category", |
|
|
boundaryGap: true, |
|
|
boundaryGap: true, |
|
|
@ -149,19 +144,19 @@ export default { |
|
|
lineStyle: { |
|
|
lineStyle: { |
|
|
width: 60, // 设置阴影的宽度 |
|
|
width: 60, // 设置阴影的宽度 |
|
|
color: "#000", |
|
|
color: "#000", |
|
|
opacity:0 |
|
|
opacity: 0 |
|
|
}, |
|
|
}, |
|
|
// 控制间隔,这里设置为2表示左右两侧有间隔,可以根据需要调整 |
|
|
// 控制间隔,这里设置为2表示左右两侧有间隔,可以根据需要调整 |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
yAxis: { |
|
|
yAxis: { |
|
|
type: "value", |
|
|
type: "value", |
|
|
name: "单位(个)", |
|
|
name: "单位(个)", |
|
|
min: 0, |
|
|
min: 0, |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
series: [ |
|
|
series: [ |
|
|
{ |
|
|
{ |
|
|
@ -202,7 +197,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
], |
|
|
], |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
satisfactionCategory: [],//类目 |
|
|
satisfactionCategory: [],//类目 |
|
|
satisfactionCategoryName: [], |
|
|
satisfactionCategoryName: [], |
|
|
score: [], //综合得分 |
|
|
score: [], //综合得分 |
|
|
@ -210,10 +205,12 @@ export default { |
|
|
showFormList: false, //自查列表弹框 |
|
|
showFormList: false, //自查列表弹框 |
|
|
showFollowUpDetail: false,//自查列表中查看弹框 |
|
|
showFollowUpDetail: false,//自查列表中查看弹框 |
|
|
showFollowUpList: false,//回访记录弹框 |
|
|
showFollowUpList: false,//回访记录弹框 |
|
|
showTduckImage:false, |
|
|
showTduckImage: false, |
|
|
|
|
|
|
|
|
qrCodeImgUrl:'',//生成二维码图片链接 |
|
|
qrCodeImgUrl: '',//生成二维码图片链接 |
|
|
questionnaireUrl:'' |
|
|
questionnaireUrl: '', |
|
|
|
|
|
synthesisScore: '', |
|
|
|
|
|
personQty: '' |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -231,11 +228,16 @@ export default { |
|
|
this.agencyId = this.user.agencyId; |
|
|
this.agencyId = this.user.agencyId; |
|
|
await this.getDicts(); |
|
|
await this.getDicts(); |
|
|
await this.getTableData(); |
|
|
await this.getTableData(); |
|
|
await this.initEcharts(); |
|
|
this.$nextTick(() => { |
|
|
|
|
|
this.initEcharts(); |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
created(){ |
|
|
created() { |
|
|
let date = new Date() |
|
|
let date = new Date() |
|
|
this.formData.period = util.formatDate(date,'yyyy-MM') |
|
|
this.formData.period = util.formatDate(date, 'yyyy-MM') |
|
|
|
|
|
}, |
|
|
|
|
|
activated() { |
|
|
|
|
|
this.handleWindowResize() |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
// ------------------------------------字典------------------------------------------ |
|
|
// ------------------------------------字典------------------------------------------ |
|
|
@ -267,16 +269,16 @@ export default { |
|
|
handelFollowUpList() { |
|
|
handelFollowUpList() { |
|
|
this.showFollowUpList = true; |
|
|
this.showFollowUpList = true; |
|
|
}, |
|
|
}, |
|
|
async handleCreateMonthlySurvey(){ |
|
|
async handleCreateMonthlySurvey() { |
|
|
try{ |
|
|
try { |
|
|
let url = '/governance/satisfaction/communitySelfInsp/generateQuestionnaire' |
|
|
let url = '/governance/satisfaction/communitySelfInsp/generateQuestionnaire' |
|
|
const {data,code} = await requestPost(url) |
|
|
const { data, code } = await requestPost(url) |
|
|
if(code == 0){ |
|
|
if (code == 0) { |
|
|
this.showTduckImage = true |
|
|
this.showTduckImage = true |
|
|
this.qrCodeImgUrl = data.qrCodeImgUrl |
|
|
this.qrCodeImgUrl = data.qrCodeImgUrl |
|
|
this.questionnaireUrl = data.questionnaireUrl |
|
|
this.questionnaireUrl = data.questionnaireUrl |
|
|
} |
|
|
} |
|
|
}catch(err){ |
|
|
} catch (err) { |
|
|
console.log(err); |
|
|
console.log(err); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
@ -290,7 +292,6 @@ export default { |
|
|
// console.log(params.seriesName); // 对应的系列名称 |
|
|
// console.log(params.seriesName); // 对应的系列名称 |
|
|
than.handelClickChart(params.name); |
|
|
than.handelClickChart(params.name); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
window.addEventListener("resize", this.handleWindowResize); |
|
|
window.addEventListener("resize", this.handleWindowResize); |
|
|
}, |
|
|
}, |
|
|
handleWindowResize() { |
|
|
handleWindowResize() { |
|
|
@ -303,6 +304,7 @@ export default { |
|
|
this.satisfactionCategoryStr = this.dicts.satisfaction_category.filter( |
|
|
this.satisfactionCategoryStr = this.dicts.satisfaction_category.filter( |
|
|
(item) => item.label == name |
|
|
(item) => item.label == name |
|
|
)[0].value; |
|
|
)[0].value; |
|
|
|
|
|
console.log(this.satisfactionCategoryStr); |
|
|
}, |
|
|
}, |
|
|
handleClose() { |
|
|
handleClose() { |
|
|
this.showFormList = false; |
|
|
this.showFormList = false; |
|
|
@ -315,113 +317,116 @@ export default { |
|
|
|
|
|
|
|
|
// 获取列表 |
|
|
// 获取列表 |
|
|
async getTableData() { |
|
|
async getTableData() { |
|
|
this.tableLoading = true; |
|
|
// this.tableLoading = true; |
|
|
this.tableData = [ |
|
|
// this.tableData = [ |
|
|
{ |
|
|
// { |
|
|
satisfactionCategory: "culturalFacility", |
|
|
// satisfactionCategory: "culturalFacility", |
|
|
satisfactionCategoryName: "文化设施", |
|
|
// satisfactionCategoryName: "文化设施", |
|
|
score: "20", |
|
|
// score: "20", |
|
|
badQty: 40, |
|
|
// badQty: 40, |
|
|
goodQty: 20, |
|
|
// goodQty: 20, |
|
|
veryGoodQty: 30, |
|
|
// veryGoodQty: 30, |
|
|
}, |
|
|
// }, |
|
|
{ |
|
|
// { |
|
|
satisfactionCategory: "sportsFacility", |
|
|
// satisfactionCategory: "sportsFacility", |
|
|
satisfactionCategoryName: "体育设施", |
|
|
// satisfactionCategoryName: "体育设施", |
|
|
score: "50", |
|
|
// score: "50", |
|
|
badQty: 40, |
|
|
// badQty: 40, |
|
|
goodQty: 20, |
|
|
// goodQty: 20, |
|
|
veryGoodQty: 30, |
|
|
// veryGoodQty: 30, |
|
|
}, |
|
|
// }, |
|
|
{ |
|
|
// { |
|
|
satisfactionCategory: "ecologicalEnv", |
|
|
// satisfactionCategory: "ecologicalEnv", |
|
|
satisfactionCategoryName: "生态环境", |
|
|
// satisfactionCategoryName: "生态环境", |
|
|
score: "50", |
|
|
// score: "50", |
|
|
badQty: 40, |
|
|
// badQty: 40, |
|
|
goodQty: 20, |
|
|
// goodQty: 20, |
|
|
veryGoodQty: 30, |
|
|
// veryGoodQty: 30, |
|
|
}, |
|
|
// }, |
|
|
{ |
|
|
// { |
|
|
satisfactionCategory: "socialSecurity", |
|
|
// satisfactionCategory: "socialSecurity", |
|
|
satisfactionCategoryName: "社会治安", |
|
|
// satisfactionCategoryName: "社会治安", |
|
|
score: "50", |
|
|
// score: "50", |
|
|
badQty: 40, |
|
|
// badQty: 40, |
|
|
goodQty: 20, |
|
|
// goodQty: 20, |
|
|
veryGoodQty: 30, |
|
|
// veryGoodQty: 30, |
|
|
}, |
|
|
// }, |
|
|
{ |
|
|
// { |
|
|
satisfactionCategory: "socialAssistance", |
|
|
// satisfactionCategory: "socialAssistance", |
|
|
satisfactionCategoryName: "社会救助", |
|
|
// satisfactionCategoryName: "社会救助", |
|
|
score: "50", |
|
|
// score: "50", |
|
|
badQty: 40, |
|
|
// badQty: 40, |
|
|
goodQty: 20, |
|
|
// goodQty: 20, |
|
|
veryGoodQty: 30, |
|
|
// veryGoodQty: 30, |
|
|
}, |
|
|
// }, |
|
|
{ |
|
|
// { |
|
|
satisfactionCategory: "oldPeopleProvide", |
|
|
// satisfactionCategory: "oldPeopleProvide", |
|
|
satisfactionCategoryName: "老有所养", |
|
|
// satisfactionCategoryName: "老有所养", |
|
|
score: "50", |
|
|
// score: "50", |
|
|
badQty: 40, |
|
|
// badQty: 40, |
|
|
goodQty: 20, |
|
|
// goodQty: 20, |
|
|
veryGoodQty: 30, |
|
|
// veryGoodQty: 30, |
|
|
}, |
|
|
// }, |
|
|
{ |
|
|
// { |
|
|
satisfactionCategory: "basicEducation", |
|
|
// satisfactionCategory: "basicEducation", |
|
|
satisfactionCategoryName: "基础教育", |
|
|
// satisfactionCategoryName: "基础教育", |
|
|
score: "50", |
|
|
// score: "50", |
|
|
badQty: 40, |
|
|
// badQty: 40, |
|
|
goodQty: 20, |
|
|
// goodQty: 20, |
|
|
veryGoodQty: 30, |
|
|
// veryGoodQty: 30, |
|
|
}, |
|
|
// }, |
|
|
{ |
|
|
// { |
|
|
satisfactionCategory: "medical", |
|
|
// satisfactionCategory: "medical", |
|
|
satisfactionCategoryName: "病有所医", |
|
|
// satisfactionCategoryName: "病有所医", |
|
|
score: "50", |
|
|
// score: "50", |
|
|
badQty: 40, |
|
|
// badQty: 40, |
|
|
goodQty: 20, |
|
|
// goodQty: 20, |
|
|
veryGoodQty: 30, |
|
|
// veryGoodQty: 30, |
|
|
}, |
|
|
// }, |
|
|
]; |
|
|
// ]; |
|
|
const allowedCategories = this.dicts.satisfaction_category.map( |
|
|
// const allowedCategories = this.dicts.satisfaction_category.map( |
|
|
(item) => item.value |
|
|
// (item) => item.value |
|
|
); |
|
|
// ); |
|
|
this.tableData.forEach((item) => { |
|
|
// this.tableData.forEach((item) => { |
|
|
if (allowedCategories.includes(item.satisfactionCategory)) { |
|
|
|
|
|
this.option.series[0].data.push(item.veryGoodQty); |
|
|
|
|
|
this.option.series[1].data.push(item.goodQty); |
|
|
|
|
|
this.option.series[2].data.push(item.badQty); |
|
|
|
|
|
this.option.xAxis.data.push(item.satisfactionCategoryName); |
|
|
|
|
|
this.satisfactionCategory.push(item.satisfactionCategory); |
|
|
|
|
|
this.score.push({ |
|
|
|
|
|
score: item.score, |
|
|
|
|
|
satisfactionCategoryName: item.satisfactionCategoryName, |
|
|
|
|
|
imgUrl: require(`../../../../assets/img/satisfaction/${item.satisfactionCategory}.png`), |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
console.log(this.score, "综合得分"); |
|
|
|
|
|
// const url = "/governance/satisfaction/communitySelfInsp/stats/synthesis"; |
|
|
|
|
|
|
|
|
|
|
|
// const { formData } = this; |
|
|
|
|
|
// const { data, code, msg } = await requestGet(url, {...formData}); |
|
|
|
|
|
// this.tableLoading = false; |
|
|
|
|
|
// if (code === 0) { |
|
|
|
|
|
// this.total = data.total || 0; |
|
|
|
|
|
// this.tableData = data.categoryDatas; |
|
|
|
|
|
// const allowedCategories = this.dicts.satisfaction_category.map(item => item.value) |
|
|
|
|
|
// this.tableData.forEach(item => { |
|
|
|
|
|
// if (allowedCategories.includes(item.satisfactionCategory)) { |
|
|
// if (allowedCategories.includes(item.satisfactionCategory)) { |
|
|
// this.option.series[0].data.push(item.veryGoodQty) |
|
|
// this.option.series[0].data.push(item.veryGoodQty); |
|
|
// this.option.series[1].data.push(item.goodQty) |
|
|
// this.option.series[1].data.push(item.goodQty); |
|
|
// this.option.series[2].data.push(item.badQty) |
|
|
// this.option.series[2].data.push(item.badQty); |
|
|
// this.option.xAxis.data.push(item.satisfactionCategoryName) |
|
|
// this.option.xAxis.data.push(item.satisfactionCategoryName); |
|
|
// this.satisfactionCategory.push(item.satisfactionCategory) |
|
|
// this.satisfactionCategory.push(item.satisfactionCategory); |
|
|
// this.score.push({ score: item.score, satisfactionCategoryName: item.satisfactionCategoryName, imgUrl: require(`../../../../assets/img/satisfaction/${item.satisfactionCategory}.png`) }); |
|
|
// this.score.push({ |
|
|
|
|
|
// score: item.score, |
|
|
|
|
|
// satisfactionCategoryName: item.satisfactionCategoryName, |
|
|
|
|
|
// imgUrl: require(`../../../../assets/img/satisfaction/${item.satisfactionCategory}.png`), |
|
|
|
|
|
// }); |
|
|
// } |
|
|
// } |
|
|
// }); |
|
|
// }); |
|
|
// } else { |
|
|
// console.log(this.score, "综合得分"); |
|
|
// this.$message.error(msg); |
|
|
const url = "/governance/satisfaction/communitySelfInsp/stats/synthesis"; |
|
|
// } |
|
|
|
|
|
|
|
|
const { formData } = this; |
|
|
|
|
|
const { data, code, msg } = await requestGet(url, { ...formData }); |
|
|
|
|
|
this.tableLoading = false; |
|
|
|
|
|
if (code === 0) { |
|
|
|
|
|
this.total = data.total || 0; |
|
|
|
|
|
this.tableData = data.categoryDatas; |
|
|
|
|
|
this.formData.inspRecordId = data.inspRecordId; |
|
|
|
|
|
this.synthesisScore = data.synthesisScore; |
|
|
|
|
|
this.personQty = data.personQty |
|
|
|
|
|
const allowedCategories = this.dicts.satisfaction_category.map(item => item.value) |
|
|
|
|
|
this.tableData.forEach(item => { |
|
|
|
|
|
if (allowedCategories.includes(item.satisfactionCategory)) { |
|
|
|
|
|
this.option.series[0].data.push(item.veryGoodQty) |
|
|
|
|
|
this.option.series[1].data.push(item.goodQty) |
|
|
|
|
|
this.option.series[2].data.push(item.badQty) |
|
|
|
|
|
this.option.xAxis.data.push(item.satisfactionCategoryName) |
|
|
|
|
|
this.satisfactionCategory.push(item.satisfactionCategory) |
|
|
|
|
|
this.score.push({ score: item.score, satisfactionCategoryName: item.satisfactionCategoryName, imgUrl: require(`../../../../assets/img/satisfaction/${item.satisfactionCategory}.png`) }); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.error(msg); |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 重置 |
|
|
// 重置 |
|
|
|