Browse Source

Merge remote-tracking branch 'origin/jw_feature_dev' into dev

feature
战立标 2 years ago
parent
commit
d5e9913c07
  1. 112
      src/views/modules/home/index.vue

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

@ -1,4 +1,3 @@
<template> <template>
<div> <div>
<div class="g-row"> <div class="g-row">
@ -58,7 +57,8 @@
</div> </div>
<p> <p>
{{ pandectData.deptName }}<span v-if="pandectData.gridCount">划分为{{ {{ pandectData.deptName }}<span v-if="pandectData.gridCount">划分为{{
pandectData.underCount }}{{ pandectData.underCount
}}{{
pandectData.underName pandectData.underName
}}</span> 现有房屋{{ pandectData.homeCount }}自住房屋{{ }}</span> 现有房屋{{ pandectData.homeCount }}自住房屋{{
pandectData.selfStay pandectData.selfStay
@ -66,7 +66,11 @@
pandectData.rentOut pandectData.rentOut
}}闲置房屋{{ }}闲置房屋{{
pandectData.vacantHouse pandectData.vacantHouse
}}现有居民{{pandectData.resiCount}}{{pandectData.totalResidents}}其中常住人口{{pandectData.permanentResiCount}}流动人口{{pandectData.floatingResiCount}}各类群体分布如下 }}现有居民{{ pandectData.resiCount }}{{
pandectData.totalResidents
}}其中常住人口{{ pandectData.permanentResiCount }}流动人口{{
pandectData.floatingResiCount
}}各类群体分布如下
</p> </p>
<div class="subtitle"> <div class="subtitle">
@ -164,7 +168,8 @@
<span>智能提醒</span> <span>智能提醒</span>
</div> </div>
<div class="more" <div class="more"
@click="toNoticePage">更多></div> @click="toNoticePage">更多>
</div>
<div class="cnt" <div class="cnt"
v-if="noticeData.length > 0"> v-if="noticeData.length > 0">
<div @click="handleClickNotice(item)" <div @click="handleClickNotice(item)"
@ -269,58 +274,6 @@ export default {
activeName: 'resi', activeName: 'resi',
option: {
tooltip: {
trigger: 'axis'
},
legend: {
data: ['12345不满意数', '省满意调查不满意数', '社区自查不满意数'],
bottom: '10%',
icon: 'rect',
itemWidth: 20,
itemHeight: 5,
itemGap: 20,
},
grid: {
left: '3%',
right: '4%',
bottom: '25%',
containLabel: true
},
toolbox: {
// feature: {
// saveAsImage: {}
// }
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月']
},
yAxis: {
type: 'value'
},
series: [
{
name: '12345不满意数',
type: 'line',
stack: 'Total',
data: [120, 132, 101, 134, 90, 230, 210]
},
{
name: '省满意调查不满意数',
type: 'line',
stack: 'Total',
data: [220, 182, 191, 234, 290, 330, 310]
},
{
name: '社区自查不满意数',
type: 'line',
stack: 'Total',
data: [150, 232, 201, 154, 190, 330, 410]
}
]
},
myChart: {} myChart: {}
} }
}, },
@ -359,9 +312,54 @@ export default {
}, },
methods: { methods: {
initChart() { initChart() {
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'));
this.myChart.setOption(this.option) let series = []
console.log(data,'datadatadata')
data.series.forEach(item => {
series.push({
...item,
type: 'line',
stack: 'Total',
})
})
let option = {
tooltip: {
trigger: 'axis'
},
legend: {
data: data.series.map(item => item.name),
bottom: '10%',
icon: 'rect',
itemWidth: 20,
itemHeight: 5,
itemGap: 20,
},
grid: {
left: '3%',
right: '4%',
bottom: '25%',
containLabel: true
},
toolbox: {
// feature: {
// saveAsImage: {}
// }
},
xAxis: {
type: 'category',
boundaryGap: false,
data: data.monthTimes.map(item => this.$moment(item).format('M') + '月')
},
yAxis: {
type: 'value'
},
series
}
this.myChart.setOption(option, true)
window.addEventListener('resize', this.handleWindowResize); window.addEventListener('resize', this.handleWindowResize);
})
}, },
handleWindowResize () { handleWindowResize () {
if (this.myChart) { if (this.myChart) {

Loading…
Cancel
Save