Browse Source

修改首页不满意事项月度趋势分析

V1.0
战立标 2 years ago
parent
commit
154a3f025b
  1. 57
      src/views/modules/home/index.vue

57
src/views/modules/home/index.vue

@ -278,7 +278,7 @@ export default {
} }
}, },
computed: { computed: {
maxTableHeight () { maxTableHeight() {
// return this.clientHeight - 450; // return this.clientHeight - 450;
return 420; return 420;
}, },
@ -314,14 +314,11 @@ export default {
initChart() { initChart() {
this.$http.get('/governance/satisfactionOverview/notSatisfactionTrend').then(({data: {data}}) => { this.$http.get('/governance/satisfactionOverview/notSatisfactionTrend').then(({data: {data}}) => {
this.myChart = echarts.init(document.getElementById('my_chart')); this.myChart = echarts.init(document.getElementById('my_chart'));
let series = [] let series = data.series.map((item, index) => {
console.log(data,'datadatadata') return {
data.series.forEach(item => {
series.push({
...item, ...item,
type: 'line', type: 'line',
stack: 'Total', }
})
}) })
let option = { let option = {
tooltip: { tooltip: {
@ -361,15 +358,15 @@ export default {
}) })
}, },
handleWindowResize () { handleWindowResize() {
if (this.myChart) { if (this.myChart) {
this.myChart.resize(); this.myChart.resize();
} }
}, },
searchDataTab (str) { searchDataTab(str) {
this.searchData.type = str; this.searchData.type = str;
}, },
handleClickCategory (item) { handleClickCategory(item) {
this.$router.push({ this.$router.push({
name: "base-resi", name: "base-resi",
params: { params: {
@ -378,18 +375,18 @@ export default {
}); });
}, },
async readClearOne (item) { async readClearOne(item) {
console.log("item", item) console.log("item", item)
const url = `/message/intelligentMessage/msg/clearOne/?msgId=${item.id}` const url = `/message/intelligentMessage/msg/clearOne/?msgId=${item.id}`
const { data, code, msg } = await requestPost(url) const {data, code, msg} = await requestPost(url)
if (code == 0) { if (code == 0) {
this.getNoticeData() this.getNoticeData()
} else if (code >= 8000) { } else if (code >= 8000) {
this.$message.error(msg) this.$message.error(msg)
} }
}, },
handleClickNotice (item) { handleClickNotice(item) {
const { msgType, targetId } = item; const {msgType, targetId} = item;
this.readClearOne(item) this.readClearOne(item)
if (msgType == "community_house") { if (msgType == "community_house") {
this.$refs.fastcall.showHouseInfo(targetId); this.$refs.fastcall.showHouseInfo(targetId);
@ -398,13 +395,13 @@ export default {
} }
}, },
toNoticePage () { toNoticePage() {
this.$router.push({ this.$router.push({
path: "/main/home-notice", path: "/main/home-notice",
}); });
}, },
toSearchPage (type, searchKey) { toSearchPage(type, searchKey) {
this.$router.push({ this.$router.push({
path: "/main/shequ-chaxun" path: "/main/shequ-chaxun"
}); });
@ -412,9 +409,9 @@ export default {
localStorage.setItem('homeSearchKey', searchKey) localStorage.setItem('homeSearchKey', searchKey)
}, },
handleClickSearchBtn (str) { handleClickSearchBtn(str) {
const { const {
searchData: { type, searchKey }, searchData: {type, searchKey},
} = this; } = this;
if (str) { if (str) {
this.toSearchPage(type, searchKey); this.toSearchPage(type, searchKey);
@ -424,7 +421,7 @@ export default {
this.toSearchPage(type, searchKey); this.toSearchPage(type, searchKey);
}, },
async getApiData () { async getApiData() {
await this.getOrgData(); await this.getOrgData();
this.getWarningList(); this.getWarningList();
this.getZnycList(); this.getZnycList();
@ -433,14 +430,14 @@ export default {
}, },
// //
async getOrgData () { async getOrgData() {
const url = "/gov/org/agency/maporg"; const url = "/gov/org/agency/maporg";
let params = { let params = {
orgId: "", orgId: "",
level: "", level: "",
}; };
const { data, code, msg } = await requestPost(url, params); const {data, code, msg} = await requestPost(url, params);
if (code === 0) { if (code === 0) {
this.orgData = data; this.orgData = data;
@ -450,14 +447,14 @@ export default {
}, },
// //
async getPandectData () { async getPandectData() {
const url = "/actual/base/residentHouseMerge/communityOverview"; const url = "/actual/base/residentHouseMerge/communityOverview";
let params = { let params = {
// orgId: "", // orgId: "",
// level: "", // level: "",
}; };
const { data, code, msg } = await requestGet(url, params); const {data, code, msg} = await requestGet(url, params);
if (code === 0) { if (code === 0) {
if (data) { if (data) {
@ -469,13 +466,13 @@ export default {
}, },
// //
async getNoticeData () { async getNoticeData() {
const url = "/message/intelligentMessage/list"; const url = "/message/intelligentMessage/list";
let params = { let params = {
last: "10", last: "10",
}; };
const { data, code, msg } = await requestGet(url, params); const {data, code, msg} = await requestGet(url, params);
if (code === 0) { if (code === 0) {
if (data) { if (data) {
@ -487,7 +484,7 @@ export default {
}, },
// //
async getWarningList () { async getWarningList() {
const url = "/actual/base/resiCategory/categoryCountList"; const url = "/actual/base/resiCategory/categoryCountList";
let params = { let params = {
// id: this.orgData.id, // id: this.orgData.id,
@ -495,7 +492,7 @@ export default {
}; };
this.resiCategory.loading = true; this.resiCategory.loading = true;
const { data, code, msg } = await requestGet(url, params); const {data, code, msg} = await requestGet(url, params);
this.resiCategory.loading = false; this.resiCategory.loading = false;
if (code === 0) { if (code === 0) {
@ -507,7 +504,7 @@ export default {
name: resiCategoryMap[item.categoryName] || "", name: resiCategoryMap[item.categoryName] || "",
count: item.categoryCount, count: item.categoryCount,
per: parseInt( per: parseInt(
(100 * item.categoryCount) / data.resiCount (100 * item.categoryCount) / data.resiCount
), ),
const: "const", const: "const",
}; };
@ -518,7 +515,7 @@ export default {
} }
}, },
// //
async getZnycList () { async getZnycList() {
const url = "/actual/base/resiCategory/intelligentPredictioncategoryCountList"; const url = "/actual/base/resiCategory/intelligentPredictioncategoryCountList";
// const url = "/actual/base/resiCategory/categoryCountList"; // const url = "/actual/base/resiCategory/categoryCountList";
let params = { let params = {
@ -527,7 +524,7 @@ export default {
}; };
this.znycCategory.loading = true; this.znycCategory.loading = true;
const { data, code, msg } = await requestGet(url, params); const {data, code, msg} = await requestGet(url, params);
this.znycCategory.loading = false; this.znycCategory.loading = false;
if (code === 0) { if (code === 0) {

Loading…
Cancel
Save