Browse Source

前端加路由,表格调整

dlt_manageScope_0428
mk 2 years ago
parent
commit
aef104b9a8
  1. 10
      src/router/index.js
  2. 172
      src/views/modules/home/index.vue

10
src/router/index.js

@ -98,6 +98,16 @@ export const moduleRoutes = {
],
},
},
{
path: "base-nonIntResi",
props: true,
name: "base-nonIntResi",
component: () => import("@/views/modules/base/nonIntResi/nonIntResi"),
meta: {
isTab: true,
title: "信息不完整",
},
},
{
path: "shequ-chaxun",
props: true,

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

@ -93,88 +93,8 @@
</div>
<div class="cnt">
<!-- 树状图 -->
<div class="echart" id="myBarchart" style="width: 100%; height: 100%;"></div>
<div class="echart" id="myBarchart" style="width: 100%; height: 100%;"></div>
<!-- 树状图end -->
<!-- <div class="cnt-left">
<div class="subtitle">
<img src="@/assets/images/index/i-sqjj.png"/>
<span>{{agencyLevel!='district'?agencyLevel=='street'?'街道':agencyLevel=='community'?'社区':agencyLevel=='grid'?'网格':'组织':'组织'}}简介 </span>
</div>
<p>
{{ pandectData.deptName }}<span v-if="pandectData.gridCount">划分为 <b>{{
pandectData.underCount
}}</b> <b>{{
pandectData.underName
}}</b> </span> 现有房屋 <b>{{ pandectData.homeCount }}</b> 自住房屋 <b>{{
pandectData.selfStay
}}</b> 出租房屋 <b>{{
pandectData.rentOut
}}</b> 闲置房屋 <b>{{
pandectData.vacantHouse
}}</b> 现有居民 <b>{{ pandectData.resiCount }}</b> <b>{{
pandectData.totalResidents
}}</b> 其中常住人口 <b>{{ pandectData.permanentResiCount }}</b> 流动人口 <b>{{
pandectData.floatingResiCount
}}</b> 各类群体分布如下
</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-tabs v-model="activeName" style="width:100%">
<el-tab-pane label="居民分类信息不完整数量统计" name="resi">
<div class="cnt-right">
<div class="list">
<div class="item" @click="handleClickCategory(item)" :key="item.code"
v-for="(item, index) in resiCategory.list">
<div>{{ ("0" + (index + 1)).substr(-2) }}.</div>
<div class="item-name">
{{ item.name }}
</div>
<div class="item-div"></div>
<div class="item-count">{{ item.count }}</div>
<div class="item-progress">
<b :style="{ width: item.per + '%', }"></b>
</div>
<div class="item-per">{{ item.per }} %</div>
</div>
</div>
</div>
</el-tab-pane> -->
<!-- <el-tab-pane label="智能预测"
name="zhineng">
<div class="cnt-right">
<div class="list">
<div class="item" :key="item.code" v-for="(item, index) in znycCategory.list">
<div>{{ ("0" + (index + 1)).substr(-2) }}.</div>
<div class="item-name">
{{ item.name }}
</div>
<div class="item-div"></div>
<div class="item-count">{{ item.count }}</div>
<div class="item-progress">
<b
:style="{
width: item.per + '%',
}"></b>
</div>
<div class="item-per">{{ item.per }} %</div>
</div>
</div>
</div>
</el-tab-pane> -->
<!-- </el-tabs> -->
</div>
</div>
</div>
@ -203,10 +123,6 @@
<div class="cnt" v-if="noticeData.length > 0" style="margin-top: 0px;">
<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 }}
@ -215,7 +131,7 @@
style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 450px;">
<img v-if="index === 0" class="thumbnail_1" referrerpolicy="no-referrer"
src="https://lanhu.oss-cn-beijing.aliyuncs.com/psjidpevo98fb607sd028bliakr139r25k82b2fbda-8291-4fe3-b190-bfe723a10036" />{{
item.content }}
item.content }}
</div>
</div>
<div class="item_left">
@ -232,38 +148,43 @@
</div>
</div>
<!-- <div class="white-box"> -->
<div class="m-box m-tx" style="position: relative;">
<div class="noe-text"> <span style="margin-top: 10px;">居民分类更新情况</span> <span class="update-settings"
style="margin-top: 10px;" v-show="showAll" @click="jumpToJuMin()"><img referrerpolicy="no-referrer"
src="https://lanhu.oss-cn-beijing.aliyuncs.com/pskhmf0717eflwg54wn73s6spnsg6u48r0f69e94b-2bc8-4156-8330-902087b72e0b" />更新设置</span>
</div>
<!-- <el-tabs style="width:100%; height: 100%;"> -->
<div class="table-container" style=" height: auto; width:100%; height: 100%; overflow-y: auto; position: absolute; bottom: 5px;">
<table class="table" style=" height: auto; width:100%; height: 100%;">
<thead>
<tr>
<th>居民类别</th>
<th>总人数</th>
<th>分类信息不完整数</th>
<th v-show="showAll">更新负责人</th>
<th>更新周期</th>
<th>更新人数</th>
</tr>
</thead>
<tbody>
<tr v-for="(item, index) in tableList" :key="item.code">
<td style="opacity: 0.5;">{{ item.residentCategoryName }}</td>
<td style="color: #2683DB;">{{ item.total }}</td>
<td style="color: red;">{{ item.nonIntegratedNum }}</td>
<td class="special-header" v-show="showAll">{{ item.userName }}</td>
<td class="special-header">{{ item.updatePeriodName }}</td>
<td class="special-header">{{ item.updateResiNum }}</td>
</tr>
</tbody>
</table>
</div>
<!-- </el-tabs> -->
<el-table :data="tableList" style="width: 100%;margin-top:26px;overflow-y: scroll;" :height="maxTableHeight" border :cell-style="columnbackgroundStyle" class="m-table-item">
<el-table-column label="居民类别" align="center" width="105">
<template slot-scope="scope">
<span style="color:#989898">{{scope.row.residentCategoryName}}</span>
</template>
</el-table-column>
<el-table-column label="总人数" width="105" align="center">
<template slot-scope="scope">
<span style="color:#006fd6">{{scope.row.total}}</span>
</template>
</el-table-column>
<el-table-column label="分类信息不完整数" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span style="color:#ff1200;cursor: pointer;" @click="handelCLickJump(scope.row)">{{scope.row.nonIntegratedNum}}</span>
</template>
</el-table-column>
<el-table-column label="更新负责人" :show-overflow-tooltip="true" align="center" v-if="showAll">
<template slot-scope="scope">
<span style="color:#ff1200;">{{scope.row.userName}}</span>
</template>
</el-table-column>
<el-table-column label="更新周期" align="center" width="105">
<template slot-scope="scope">
<span style="color:#989898;">{{scope.row.updatePeriod?scope.row.updatePeriod =='month'?'每自然月':scope.row.updatePeriod =='halfMonth'?'每半自然月':scope.row.updatePeriod =='week'?'每周':'':''}}</span>
</template>
</el-table-column>
<el-table-column label="更新人数" align="center" width="105">
<template slot-scope="scope">
<span style="color:#006fd6;">{{scope.row.updateResiNum}}</span><span style="color:#989898;">({{scope.row.updatePeriodName?scope.row.updatePeriodName:'--'}})</span>
</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
@ -370,8 +291,8 @@ export default {
},
computed: {
maxTableHeight() {
// return this.clientHeight - 450;
return 420;
const _h = this.clientHeight - 610 ;
return _h;
},
...mapGetters(["clientHeight"]),
},
@ -468,12 +389,16 @@ export default {
this.borderH();
const level = localStorage.getItem('level');
console.log('Stored level:', level);
if (level == 'district' || 'community') {
if (level == 'community') {
this.showAll = true
}
},
columnbackgroundStyle({ row, column, rowIndex, columnIndex }) {
if (columnIndex == 3||columnIndex == 4||columnIndex == 5) {
return 'background:#fffcf3;'
}
},
borderH() {
this.$http.post("/actual/base/residentCategoryUpdateInfo/getUpdateAndintegrityList").then(({ data: { data } }) => {
@ -620,7 +545,15 @@ export default {
this.$message.error(msg);
}
},
handelCLickJump(e){
this.$router.push({
path: "/main/base-nonIntResi",
query: {
resiCategory: e.residentCategory,
}
});
},
//
async getWarningList() {
const url = "/actual/base/resiCategory/categoryCountList";
@ -747,9 +680,8 @@ export default {
this.myBarchart.setOption(option);
window.addEventListener("resize", this.handleWindowResize);
this.myBarchart.on("click", (e) => {
console.log(e);
this.$router.push({
path: "/main/base-nonIntResi-nonIntResi",
path: "/main/base-nonIntResi",
query: {
resiCategory: e.data.extraProperty,
}

Loading…
Cancel
Save