From 765dd86d9583445a0c8ce080a88e1089a1c2f975 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Tue, 22 Aug 2023 14:27:20 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=9C=80=E7=BB=88=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/scss/modules/index.scss | 69 ++++--- src/views/modules/home/index.vue | 290 ++++++++++++++--------------- 2 files changed, 187 insertions(+), 172 deletions(-) diff --git a/src/assets/scss/modules/index.scss b/src/assets/scss/modules/index.scss index c3ff9044a..9c4fa86b1 100644 --- a/src/assets/scss/modules/index.scss +++ b/src/assets/scss/modules/index.scss @@ -251,9 +251,9 @@ } } .cnt-right { - margin-left: auto; - width: calc(100% - 240px - 40px); - height: 402px; + // margin-left: auto; + width: 100%; + height: 287px; overflow-y: auto; .list { @@ -297,7 +297,7 @@ .item-progress { margin-right: 15px; - width: 60%; + width: 100%; height: 24px; background: #e6f0ff; border-radius: 1px; @@ -334,31 +334,56 @@ } .item { - padding: 16px 0 12px; + padding: 16px 0 7px; border-bottom: 1px dashed #f0f5fa; &:last-child { border-bottom: none; } - .item-title { - @include toe; - height: 22px; - font-size: 14px; - font-family: PingFangSC-Regular, PingFang SC; - font-weight: 400; - color: rgba(0, 0, 0, 0.85); - line-height: 22px; - &:hover { - color: $c1; - cursor: pointer; + display: flex; + align-items: center; + .item_right{ + flex: 1; + .item-title { + @include toe; + height: 22px; + font-size: 14px; + font-family: PingFangSC-Regular, PingFang SC; + font-weight: 400; + color: rgba(0, 0, 0, 0.85); + line-height: 22px; + &:hover { + color: $c1; + cursor: pointer; + } + } + .item-date { + font-size: 12px; + font-family: PingFangSC-Regular, PingFang SC; + font-weight: 400; + color: rgba(0, 0, 0, 0.45); + line-height: 17px; } } - .item-date { - font-size: 12px; - font-family: PingFangSC-Regular, PingFang SC; - font-weight: 400; - color: rgba(0, 0, 0, 0.45); - line-height: 17px; + .item_left{ + width: 40px; + margin-right:15px; + .i-tag{ + display: block; + margin-right: 15px; + width: 40px; + height: 22px; + border-radius: 4px; + border: 1px solid rgba(0, 0, 0, 0.15); + font-size: 12px; + font-family: PingFangSC-Regular, PingFang SC; + font-weight: 400; + color: rgba(0, 0, 0, 0.88); + line-height: 20px; + font-style: normal; + text-align: center; + } } + } } } diff --git a/src/views/modules/home/index.vue b/src/views/modules/home/index.vue index 8c2277bc2..221d3a5c8 100644 --- a/src/views/modules/home/index.vue +++ b/src/views/modules/home/index.vue @@ -59,66 +59,40 @@
-
-
+
社区总览
-
-
-
- - 社区简介 -
-

- {{ pandectData.deptName }},划分为{{ pandectData.underCount }}个{{ - pandectData.underName - }},现有居民{{ pandectData.homeCount }}户、{{ - pandectData.resiCount - }}人,其中常住人口{{ - pandectData.permanentResiCount - }}人,流动人口{{ - pandectData.floatingResiCount - }}人,各类群体分布如下: -

- -
- - 分析结果 -
- -

- 根据数据分析结果,建议重点关注 - {{ resiCategory.list[0].name }}、{{ - resiCategory.list[1].name - }}、{{ resiCategory.list[2].name }} - 三类群体,开展相关的社区服务和活动。 -

-
+

{{ pandectData.deptName }},划分为{{ pandectData.underCount }}个{{ + pandectData.underName + }},现有房屋{{ pandectData.homeCount }}间、自住房屋{{ pandectData.selfStay }}间、 + 出租房屋{{ pandectData.rentOut }}间、 + 闲置房屋{{ pandectData.vacantHouse }}间、现有居民{{ + pandectData.resiCount + }}户、{{ + pandectData.totalResidents + }}人、其中常住人口{{ + pandectData.permanentResiCount + }}人,流动人口{{ + pandectData.floatingResiCount + }}人,各类群体分布如下: +

+
+ + 居民分类统计 + 智能预测 + +
+
-
+
{{ ("0" + (index + 1)).substr(-2) @@ -132,11 +106,9 @@ {{ item.count }}人
- +
{{ item.per }} % @@ -145,7 +117,14 @@
-
+

+ 根据数据分析结果,建议重点关注 + {{ resiCategory.list[0].name }}、{{ + resiCategory.list[1].name + }}、{{ resiCategory.list[2].name }} + 三类群体,开展相关的社区服务和活动。 +

@@ -160,19 +139,21 @@
更多>
-
-
- {{ item.createdTime }} -
-
- {{ item.content }} +
+
+ 已读 + 未读 +
+
+
+ {{ item.createdTime }} +
+
+ {{ item.content }} +
+
-
@@ -191,87 +172,12 @@ - 智能填报 + 不满意事项月度趋势分析
更多>
-
- -
- 《80-90周岁高龄老人生活补助申请表》 -
-
-
- - 填写 -
-
- - 下载 -
-
-
-
- -
- 《80-90周岁高龄老人生活补助申请表》 -
-
-
- - 填写 -
-
- - 下载 -
-
-
-
- -
- 《80-90周岁高龄老人生活补助申请表》 -
-
-
- - 填写 -
-
- - 下载 -
-
-
-
- -
- 《80-90周岁高龄老人生活补助申请表》 -
-
-
- - 填写 -
-
- - 下载 -
-
-
+
@@ -285,6 +191,7 @@ import resiCategoryMap from "@/views/business/resi-category-map.js"; import { mapGetters } from "vuex"; import nextTick from "dai-js/tools/nextTick"; import fastcall from "@/views/modules/cpts/fastcall"; +import * as echarts from 'echarts'; export default { components: { fastcall }, @@ -325,7 +232,59 @@ export default { }, noticeData: [], - }; + + btnSelectA: false, + btnSelectB: true, + + option : { + tooltip: { + trigger: 'axis' + }, + legend: { + data: ['12345不满意数', '省满意调查不满意数', '社区自评不满意数'] + }, + grid: { + left: '3%', + right: '4%', + bottom: '8%', + 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:{} + } }, computed: { maxTableHeight() { @@ -352,12 +311,33 @@ export default { }, mounted() { this.getApiData(); + this.$nextTick(()=>{ + this.initChart() + }) console.log( "dynamicMenuRoutes----------------------------", this.$store.state.sidebarMenuList ); }, methods: { + initChart(){ + this.myChart = echarts.init(document.getElementById('my_chart')); + this.myChart.setOption(this.option) + window.addEventListener('resize', this.handleWindowResize); + }, + handleWindowResize() { + if (this.myChart) { + this.myChart.resize(); + } + }, + handleClickResiCategory() { + this.btnSelectA = false + this.btnSelectB = true + }, + handleClickIntelligentPrediction() { + this.btnSelectA = true + this.btnSelectB = false + }, searchDataTab(str){ this.searchData.type = str; }, @@ -370,9 +350,19 @@ export default { }); }, - + async readClearOne(item){ + console.log("item",item) + const url = `/message/intelligentMessage/msg/clearOne/?msgId=${item.id}` + const {data,code,msg} = await requestPost(url) + if(code == 0){ + this.getNoticeData() + }else if(code >= 8000){ + this.$message.error(msg) + } + }, handleClickNotice(item) { const { msgType, targetId } = item; + this.readClearOne(item) if (msgType == "community_house") { this.$refs.fastcall.showHouseInfo(targetId); } else if (msgType == "resident_base_info") {