diff --git a/src/views/modules/satisfaction/communitySelfInsp/formList.vue b/src/views/modules/satisfaction/communitySelfInsp/formList.vue
index fdffc671a..e705fc626 100644
--- a/src/views/modules/satisfaction/communitySelfInsp/formList.vue
+++ b/src/views/modules/satisfaction/communitySelfInsp/formList.vue
@@ -92,6 +92,8 @@ export default {
await this.getTableData()
if (this.satisfactionCategoryStr) {
this.formData.satisfactionCategory = this.satisfactionCategoryStr
+ this.formData.inspRecordId = this.inspRecordId
+ console.log(this.formData.satisfactionCategory);
}
},
//方法
@@ -137,12 +139,13 @@ export default {
this.getTableData();
},
async getTableData() {
- try {
- let params = {
+ console.log(this.formData);
+ var params = {
...this.formData,
- pageNo: this.currentPage,
+ pageNo: this.pageNo,
pageSize: this.pageSize,
};
+ console.log(params);
let url = '/governance/satisfaction/communitySelfInsp/inspResult/list'
const { data, code, msg } = await requestGet(url, params)
if (code == 0) {
@@ -151,9 +154,6 @@ export default {
} else {
console.log(err);
}
- } catch (err) {
- console.log(err);
- }
},
},
//子组件注册
diff --git a/src/views/modules/satisfaction/communitySelfInsp/index.vue b/src/views/modules/satisfaction/communitySelfInsp/index.vue
index 6c3030dbf..bdec7deb8 100644
--- a/src/views/modules/satisfaction/communitySelfInsp/index.vue
+++ b/src/views/modules/satisfaction/communitySelfInsp/index.vue
@@ -5,8 +5,6 @@
-
@@ -23,16 +21,16 @@
- 生成本月社区自查问卷表
+ 生成本月社区自查问卷表
-
本月已参与调研人数 500人
+
本月已参与调研人数 {{ personQty }}人
-
85.12
+
{{ synthesisScore }}
综合得分
@@ -57,32 +55,29 @@
+ class="dialog-h" @closed="showFormList = false">
-
-
-
-
-
-
+ @handelDetail="handelDetail" @handelFollowUpList="handelFollowUpList" :period="formData.period" :inspRecordId="formData.inspRecordId">
+
+
+
+
+
+
-
-
-
- 加载中...
-
+
+
+
+ 加载中...
+
-
- 问卷链接: {{questionnaireUrl}}
-
-
+
+ 问卷链接: {{ questionnaireUrl }}
+
+
@@ -96,12 +91,12 @@ import followDetail from "./followUpDetail";
import util from "@js/util.js";
export default {
- components: { formList, followList,followDetail },
+ components: { formList, followList, followDetail },
data() {
return {
searchH: 20,
-
+
formData: {
period: "",//月份
inspRecordId: "",
@@ -133,7 +128,7 @@ export default {
containLabel: true,
},
toolbox: {},
-
+
xAxis: {
type: "category",
boundaryGap: true,
@@ -149,19 +144,19 @@ export default {
lineStyle: {
width: 60, // 设置阴影的宽度
color: "#000",
- opacity:0
+ opacity: 0
},
- // 控制间隔,这里设置为2表示左右两侧有间隔,可以根据需要调整
+ // 控制间隔,这里设置为2表示左右两侧有间隔,可以根据需要调整
},
-
+
},
-
+
yAxis: {
type: "value",
name: "单位(个)",
min: 0,
-
+
},
series: [
{
@@ -202,7 +197,7 @@ export default {
},
],
},
-
+
satisfactionCategory: [],//类目
satisfactionCategoryName: [],
score: [], //综合得分
@@ -210,10 +205,12 @@ export default {
showFormList: false, //自查列表弹框
showFollowUpDetail: false,//自查列表中查看弹框
showFollowUpList: false,//回访记录弹框
- showTduckImage:false,
+ showTduckImage: false,
- qrCodeImgUrl:'',//生成二维码图片链接
- questionnaireUrl:''
+ qrCodeImgUrl: '',//生成二维码图片链接
+ questionnaireUrl: '',
+ synthesisScore: '',
+ personQty: ''
};
},
@@ -231,11 +228,16 @@ export default {
this.agencyId = this.user.agencyId;
await this.getDicts();
await this.getTableData();
- await this.initEcharts();
+ this.$nextTick(() => {
+ this.initEcharts();
+ })
},
- created(){
+ created() {
let date = new Date()
- this.formData.period = util.formatDate(date,'yyyy-MM')
+ this.formData.period = util.formatDate(date, 'yyyy-MM')
+ },
+ activated() {
+ this.handleWindowResize()
},
methods: {
// ------------------------------------字典------------------------------------------
@@ -267,16 +269,16 @@ export default {
handelFollowUpList() {
this.showFollowUpList = true;
},
- async handleCreateMonthlySurvey(){
- try{
+ async handleCreateMonthlySurvey() {
+ try {
let url = '/governance/satisfaction/communitySelfInsp/generateQuestionnaire'
- const {data,code} = await requestPost(url)
- if(code == 0){
+ const { data, code } = await requestPost(url)
+ if (code == 0) {
this.showTduckImage = true
this.qrCodeImgUrl = data.qrCodeImgUrl
this.questionnaireUrl = data.questionnaireUrl
}
- }catch(err){
+ } catch (err) {
console.log(err);
}
},
@@ -290,7 +292,6 @@ export default {
// console.log(params.seriesName); // 对应的系列名称
than.handelClickChart(params.name);
});
-
window.addEventListener("resize", this.handleWindowResize);
},
handleWindowResize() {
@@ -303,6 +304,7 @@ export default {
this.satisfactionCategoryStr = this.dicts.satisfaction_category.filter(
(item) => item.label == name
)[0].value;
+ console.log(this.satisfactionCategoryStr);
},
handleClose() {
this.showFormList = false;
@@ -315,113 +317,116 @@ export default {
// 获取列表
async getTableData() {
- this.tableLoading = true;
- this.tableData = [
- {
- satisfactionCategory: "culturalFacility",
- satisfactionCategoryName: "文化设施",
- score: "20",
- badQty: 40,
- goodQty: 20,
- veryGoodQty: 30,
- },
- {
- satisfactionCategory: "sportsFacility",
- satisfactionCategoryName: "体育设施",
- score: "50",
- badQty: 40,
- goodQty: 20,
- veryGoodQty: 30,
- },
- {
- satisfactionCategory: "ecologicalEnv",
- satisfactionCategoryName: "生态环境",
- score: "50",
- badQty: 40,
- goodQty: 20,
- veryGoodQty: 30,
- },
- {
- satisfactionCategory: "socialSecurity",
- satisfactionCategoryName: "社会治安",
- score: "50",
- badQty: 40,
- goodQty: 20,
- veryGoodQty: 30,
- },
- {
- satisfactionCategory: "socialAssistance",
- satisfactionCategoryName: "社会救助",
- score: "50",
- badQty: 40,
- goodQty: 20,
- veryGoodQty: 30,
- },
- {
- satisfactionCategory: "oldPeopleProvide",
- satisfactionCategoryName: "老有所养",
- score: "50",
- badQty: 40,
- goodQty: 20,
- veryGoodQty: 30,
- },
- {
- satisfactionCategory: "basicEducation",
- satisfactionCategoryName: "基础教育",
- score: "50",
- badQty: 40,
- goodQty: 20,
- veryGoodQty: 30,
- },
- {
- satisfactionCategory: "medical",
- satisfactionCategoryName: "病有所医",
- score: "50",
- badQty: 40,
- goodQty: 20,
- veryGoodQty: 30,
- },
- ];
- 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`),
- });
- }
- });
- 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 => {
+ // this.tableLoading = true;
+ // this.tableData = [
+ // {
+ // satisfactionCategory: "culturalFacility",
+ // satisfactionCategoryName: "文化设施",
+ // score: "20",
+ // badQty: 40,
+ // goodQty: 20,
+ // veryGoodQty: 30,
+ // },
+ // {
+ // satisfactionCategory: "sportsFacility",
+ // satisfactionCategoryName: "体育设施",
+ // score: "50",
+ // badQty: 40,
+ // goodQty: 20,
+ // veryGoodQty: 30,
+ // },
+ // {
+ // satisfactionCategory: "ecologicalEnv",
+ // satisfactionCategoryName: "生态环境",
+ // score: "50",
+ // badQty: 40,
+ // goodQty: 20,
+ // veryGoodQty: 30,
+ // },
+ // {
+ // satisfactionCategory: "socialSecurity",
+ // satisfactionCategoryName: "社会治安",
+ // score: "50",
+ // badQty: 40,
+ // goodQty: 20,
+ // veryGoodQty: 30,
+ // },
+ // {
+ // satisfactionCategory: "socialAssistance",
+ // satisfactionCategoryName: "社会救助",
+ // score: "50",
+ // badQty: 40,
+ // goodQty: 20,
+ // veryGoodQty: 30,
+ // },
+ // {
+ // satisfactionCategory: "oldPeopleProvide",
+ // satisfactionCategoryName: "老有所养",
+ // score: "50",
+ // badQty: 40,
+ // goodQty: 20,
+ // veryGoodQty: 30,
+ // },
+ // {
+ // satisfactionCategory: "basicEducation",
+ // satisfactionCategoryName: "基础教育",
+ // score: "50",
+ // badQty: 40,
+ // goodQty: 20,
+ // veryGoodQty: 30,
+ // },
+ // {
+ // satisfactionCategory: "medical",
+ // satisfactionCategoryName: "病有所医",
+ // score: "50",
+ // badQty: 40,
+ // goodQty: 20,
+ // veryGoodQty: 30,
+ // },
+ // ];
+ // 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`) });
+ // 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);
- // }
+ // 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;
+ 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);
+ }
},
// 重置
diff --git a/src/views/modules/satisfaction/satisfactionProvince/index.vue b/src/views/modules/satisfaction/satisfactionProvince/index.vue
index f77b81151..952b377ab 100644
--- a/src/views/modules/satisfaction/satisfactionProvince/index.vue
+++ b/src/views/modules/satisfaction/satisfactionProvince/index.vue
@@ -42,8 +42,8 @@
@handelClickEdit="handelClickEdit">
-
+
@@ -150,7 +150,6 @@ export default {
},
...mapGetters(["clientHeight", "iframeHeight"]),
},
- watch: {},
created() {
let date = new Date()
this.formData.periodStart = util.formatDate(date, 'yyyy-MM')
@@ -167,11 +166,11 @@ export default {
// --------------------------------------字典------------------------------------------
async getDicts() {
try {
+
const requests = [
this.$http.post("sys/dict/data/dictlist", {
dictType: "satisfaction_category",
}),
-
];
const dictKeys = ['satisfaction_category']; // 对应的键名
@@ -187,8 +186,6 @@ export default {
console.log("获取字典失败: ", error);
}
},
-
-
// ------------------------------------事件------------------------------------------
initEcharts() {
this.myChart = echarts.init(document.getElementById('myCharts'));
@@ -204,7 +201,6 @@ export default {
window.addEventListener('resize', this.handleWindowResize);
},
-
handleWindowResize() {
if (this.myChart) {
this.myChart.resize();
@@ -231,20 +227,20 @@ export default {
this.showProvinceFollowUpDetail = false
this.save(form)
},
- async save(form) {
- try{
+ async save(form) {
+ try {
const url = '/governance/provinceEvaluationRecord/updateInfo'
form.periodName = null
- const {code} = await requestPost(url,form)
- if(code == 0){
+ const { code } = await requestPost(url, form)
+ if (code == 0) {
this.getTableData()
this.$refs['ref_form_list'].getTableData()
this.$message.success('保存成功')
this.showProvinceFollowUpDetail = false
}
- }catch(err){
+ } catch (err) {
console.log(err);
- }
+ }
},
// 搜索事件
handleSearch(val) {
@@ -361,7 +357,9 @@ export default {
this.getTableData();
},
},
-
+ activated() {
+ this.handleWindowResize()
+ },
props: {},
};