Browse Source

首页最终版

feature
mk 2 years ago
parent
commit
765dd86d95
  1. 35
      src/assets/scss/modules/index.scss
  2. 256
      src/views/modules/home/index.vue

35
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,11 +334,15 @@
}
.item {
padding: 16px 0 12px;
padding: 16px 0 7px;
border-bottom: 1px dashed #f0f5fa;
&:last-child {
border-bottom: none;
}
display: flex;
align-items: center;
.item_right{
flex: 1;
.item-title {
@include toe;
height: 22px;
@ -360,6 +364,27 @@
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;
}
}
}
}
}
.m-tb {

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

@ -59,66 +59,40 @@
</div>
<div class="m-box m-pan">
<div class="wrap">
<div class="header">
<img
src="@/assets/images/index/title-icon-sqzl.png"
/>
<span>社区总览</span>
</div>
<div class="cnt">
<div class="cnt-left">
<div class="subtitle">
<img
src="@/assets/images/index/i-sqjj.png"
/>
<span>社区简介</span>
</div>
<p>
{{ pandectData.deptName }}<span
v-if="pandectData.gridCount"
>划分为{{ pandectData.underCount }}{{
<p>{{ pandectData.deptName }}<span v-if="pandectData.gridCount">划分为{{ pandectData.underCount }}{{
pandectData.underName
}}</span
>现有居民{{ pandectData.homeCount }}{{
}}</span>现有房屋{{ pandectData.homeCount }}自住房屋{{ pandectData.selfStay }}
出租房屋{{ pandectData.rentOut }}
闲置房屋{{ pandectData.vacantHouse }}现有居民{{
pandectData.resiCount
}}其中常住人口{{
}}{{
pandectData.totalResidents
}}其中常住人口{{
pandectData.permanentResiCount
}}流动人口{{
pandectData.floatingResiCount
}}各类群体分布如下
</p>
<div class="subtitle">
<img
src="@/assets/images/index/i-fxjg.png"
/>
<span>分析结果</span>
</div>
<p
class="hint"
v-if="resiCategory.list.length > 0"
>
根据数据分析结果建议重点关注
<b
>{{ resiCategory.list[0].name }}{{
resiCategory.list[1].name
}}{{ resiCategory.list[2].name }}</b
>
三类群体开展相关的社区服务和活动
</p>
<div>
<el-button-group class="btn_group">
<el-button type="primary" :plain="btnSelectA"
@click="handleClickResiCategory">居民分类统计</el-button>
<el-button type="primary" :plain="btnSelectB"
@click="handleClickIntelligentPrediction">智能预测</el-button>
</el-button-group>
</div>
<div class="cnt">
<div class="cnt-right">
<div class="list">
<div
class="item"
@click="handleClickCategory(item)"
:key="item.code"
v-for="(
<div class="item" @click="handleClickCategory(item)" :key="item.code" v-for="(
item, index
) in resiCategory.list"
>
) in resiCategory.list">
<div>
{{
("0" + (index + 1)).substr(-2)
@ -132,11 +106,9 @@
{{ item.count }}
</div>
<div class="item-progress">
<b
:style="{
<b :style="{
width: item.per + '%',
}"
></b>
}"></b>
</div>
<div class="item-per">
{{ item.per }} %
@ -145,7 +117,14 @@
</div>
</div>
</div>
</div>
<p class="hint" v-if="resiCategory.list.length > 0">
根据数据分析结果建议重点关注
<b>{{ resiCategory.list[0].name }}{{
resiCategory.list[1].name
}}{{ resiCategory.list[2].name }}</b
>
三类群体开展相关的社区服务和活动
</p>
</div>
</div>
@ -160,12 +139,13 @@
</div>
<div class="more" @click="toNoticePage">更多></div>
<div class="cnt" v-if="noticeData.length > 0">
<div
@click="handleClickNotice(item)"
class="item"
:key="'notice' + item.targetId + index"
v-for="(item, index) in noticeData"
>
<div @click="handleClickNotice(item)" class="item" :key="'notice' + item.targetId + index"
v-for="(item, index) in noticeData">
<div class="item_left">
<i class="i-tag" v-if="item.readFlag == 1">已读</i>
<i class="i-tag" v-else>未读</i>
</div>
<div class="item_right">
<div class="item-date">
{{ item.createdTime }}
</div>
@ -174,6 +154,7 @@
</div>
</div>
</div>
</div>
<div class="cnt" v-else>
<div class="empty">
@ -191,87 +172,12 @@
<img
src="@/assets/images/index/title-icon-zntb.png"
/>
<span>智能填报</span>
<span>不满意事项月度趋势分析</span>
</div>
</div>
<div class="more">更多></div>
<div class="cnt">
<div class="item">
<img
class="item-tag"
src="@/assets/images/index/i-zntb.png"
/>
<div class="item-name">
80-90周岁高龄老人生活补助申请表
</div>
<div class="item-btns">
<div class="item-btn">
<img src="@/assets/images/index/i-tx.png" />
<span>填写</span>
</div>
<div class="item-btn">
<img src="@/assets/images/index/i-xz.png" />
<span>下载</span>
</div>
</div>
</div>
<div class="item">
<img
class="item-tag"
src="@/assets/images/index/i-zntb.png"
/>
<div class="item-name">
80-90周岁高龄老人生活补助申请表
</div>
<div class="item-btns">
<div class="item-btn">
<img src="@/assets/images/index/i-tx.png" />
<span>填写</span>
</div>
<div class="item-btn">
<img src="@/assets/images/index/i-xz.png" />
<span>下载</span>
</div>
</div>
</div>
<div class="item">
<img
class="item-tag"
src="@/assets/images/index/i-zntb.png"
/>
<div class="item-name">
80-90周岁高龄老人生活补助申请表
</div>
<div class="item-btns">
<div class="item-btn">
<img src="@/assets/images/index/i-tx.png" />
<span>填写</span>
</div>
<div class="item-btn">
<img src="@/assets/images/index/i-xz.png" />
<span>下载</span>
</div>
</div>
</div>
<div class="item">
<img
class="item-tag"
src="@/assets/images/index/i-zntb.png"
/>
<div class="item-name">
80-90周岁高龄老人生活补助申请表
</div>
<div class="item-btns">
<div class="item-btn">
<img src="@/assets/images/index/i-tx.png" />
<span>填写</span>
</div>
<div class="item-btn">
<img src="@/assets/images/index/i-xz.png" />
<span>下载</span>
</div>
</div>
</div>
<div id="my_chart" style="width: 100%;height: 200px; position: relative;top:-10px"></div>
</div>
</div>
</div>
@ -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") {

Loading…
Cancel
Save