Browse Source

Merge branch 'dev-jichu' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov into dev-jichu

shibei_master
13176889840 4 years ago
parent
commit
89980c4251
  1. BIN
      src/assets/img/modules/visual/noData.png
  2. 7
      src/assets/scss/modules/visual/basicInfoMain.scss
  3. 51
      src/assets/scss/modules/visual/warning.scss
  4. 2
      src/router/index.js
  5. 38
      src/views/modules/visual/basicinfo/basicInfoMain.vue
  6. 1
      src/views/modules/visual/basicinfo/cpts/people-more.vue
  7. 10
      src/views/modules/visual/warning/Base.js
  8. 68
      src/views/modules/visual/warning/components/screen-loading/index.vue
  9. 73
      src/views/modules/visual/warning/components/screen-table/index.vue
  10. 141
      src/views/modules/visual/warning/index.vue

BIN
src/assets/img/modules/visual/noData.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

7
src/assets/scss/modules/visual/basicInfoMain.scss

@ -237,7 +237,7 @@
.item { .item {
background-color: #011168; background-color: #011168;
margin-top: 12px; margin-top: 12px;
width: 234px; width: 244px;
height: 190px; height: 190px;
border: 1px solid #037ddc; border: 1px solid #037ddc;
border-radius: 8px; border-radius: 8px;
@ -266,11 +266,12 @@
.icon_category { .icon_category {
position: absolute; position: absolute;
bottom: 10px; bottom: 14px;
left: 9px; left: 9px;
margin-left: 9px; // margin-left: 7px;
> img { > img {
margin-left: 5px;
width: 21px; width: 21px;
height: 20px; height: 20px;
} }

51
src/assets/scss/modules/visual/warning.scss

@ -1,17 +1,21 @@
.warning-box { .warning-box {
box-sizing: border-box; box-sizing: border-box;
width: 1881px; // width: 1881px;
height: 914px; width: 100%;
// height: 100%;
min-height: 100%;
margin: auto; margin: auto;
color: #fff; color: #fff;
background: url('../../../img/modules/visual/warning-box.png') no-repeat center; // background: url("../../../img/modules/visual/warning-box.png") no-repeat center;
background-size: 100% 100%; background-size: 100% 100%;
padding: 45px 21px 35px 24px; padding: 45px 21px 35px 24px;
&-top { &-top {
display: flex; display: flex;
justify-content: space-around; // justify-content: space-around;
height: 190px; justify-content: flex-start;
flex-wrap: wrap;
min-height: 190px;
.top-item { .top-item {
box-sizing: border-box; box-sizing: border-box;
@ -19,9 +23,11 @@
height: 190px; height: 190px;
padding: 10px 22px 14px 21px; padding: 10px 22px 14px 21px;
// background: rgba(255, 255, 255, 0); // background: rgba(255, 255, 255, 0);
border: 1px solid #1043C0; border: 1px solid #1043c0;
box-shadow: 0px 83px 150px 0px #002790; box-shadow: 0px 83px 150px 0px #002790;
border-radius: 8px; border-radius: 8px;
margin-right: 15px;
margin-bottom: 15px;
&-img { &-img {
display: flex; display: flex;
@ -31,6 +37,7 @@
width: 78px; width: 78px;
height: 78px; height: 78px;
margin-right: 16px; margin-right: 16px;
margin-bottom: 10px;
} }
.top-item-left { .top-item-left {
@ -44,13 +51,13 @@
span:nth-child(1) { span:nth-child(1) {
font-size: 18px; font-size: 18px;
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #ffffff;
} }
span:nth-child(2) { span:nth-child(2) {
font-size: 28px; font-size: 28px;
font-weight: bold; font-weight: bold;
color: #00FFFC; color: #00fffc;
margin-top: 10px; margin-top: 10px;
} }
} }
@ -73,13 +80,14 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 0 10px 0 29px; padding: 0 10px 0 29px;
cursor: pointer;
&::after { &::after {
display: block; display: block;
content: ''; content: "";
width: 8px; width: 8px;
height: 8px; height: 8px;
background: #F0F3F7; background: #f0f3f7;
border-radius: 50%; border-radius: 50%;
position: absolute; position: absolute;
left: 12px; left: 12px;
@ -91,7 +99,7 @@
font-size: 16px; font-size: 16px;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #ffffff;
} }
div:nth-child(2) { div:nth-child(2) {
@ -100,7 +108,7 @@
font-size: 20px; font-size: 20px;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #FFFFFF; color: #ffffff;
.right-icon { .right-icon {
width: 10px; width: 10px;
@ -110,7 +118,7 @@
} }
.num-item-active { .num-item-active {
background: linear-gradient(0deg, #1A5AFD, #26C4FF); background: linear-gradient(0deg, #1a5afd, #26c4ff);
} }
.num-item:nth-child(2) { .num-item:nth-child(2) {
@ -118,17 +126,15 @@
} }
} }
} }
} }
&-bottom { &-bottom {
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
height: calc(100% - 300px); height: calc(100% - 300px);
min-height: 300px;
margin-top: 60px; margin-top: 60px;
.pagination { .pagination {
box-sizing: border-box; box-sizing: border-box;
margin-top: 20px; margin-top: 20px;
@ -138,24 +144,21 @@
justify-content: flex-end; justify-content: flex-end;
/deep/ .el-pagination.is-background .el-pager li:not(.disabled).active { /deep/ .el-pagination.is-background .el-pager li:not(.disabled).active {
background: #0266D1; background: #0266d1;
color: #000D3F; color: #000d3f;
} }
/deep/ .el-pagination .el-pager li { /deep/ .el-pagination .el-pager li {
background: #002E74; background: #002e74;
} }
/deep/ .el-pagination .btn-prev { /deep/ .el-pagination .btn-prev {
background: #002E74; background: #002e74;
} }
/deep/ .el-pagination .btn-next { /deep/ .el-pagination .btn-next {
background: #002E74; background: #002e74;
} }
} }
} }
} }

2
src/router/index.js

@ -218,7 +218,7 @@ router.beforeEach((to, from, next) => {
// }else{ // }else{
http http
.get("/oper/access/menu/nav") .get("/gov/access/menu/nav")
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
// Vue.prototype.$message.error(res.msg) // Vue.prototype.$message.error(res.msg)

38
src/views/modules/visual/basicinfo/basicInfoMain.vue

@ -37,10 +37,6 @@
class="map"></div> --> class="map"></div> -->
</div> </div>
<div class="popup"
ref="popup">
</div>
<div class="div_data"> <div class="div_data">
<div class="div_search"> <div class="div_search">
<el-input size="mini" <el-input size="mini"
@ -112,22 +108,18 @@ import Overlay from 'ol/Overlay';
import { defaults as defaultInteractions, Select, DoubleClickZoom } from 'ol/interaction.js'; import { defaults as defaultInteractions, Select, DoubleClickZoom } from 'ol/interaction.js';
import { getCenter, boundingExtent } from 'ol/extent.js'; import { getCenter, boundingExtent } from 'ol/extent.js';
import { Circle as CircleStyle, Icon, Fill, Stroke, Style, Text } from 'ol/style.js'; import { Circle as CircleStyle, Icon, Fill, Stroke, Style, Text } from 'ol/style.js';
import { toStringHDMS } from 'ol/coordinate'
import { fromLonLat, toLonLat } from "ol/proj";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import { Loading } from 'element-ui'; //Loading import { Loading } from 'element-ui'; //Loading
import { requestPost } from "@/js/dai/request"; import { requestPost } from "@/js/dai/request";
import BasicInfoCommunity from "./basicInfoCommunity"; import BasicInfoCommunity from "./basicInfoCommunity";
import PeopleSearch from "./peopleSearch"; import PeopleSearch from "./peopleSearch";
import People from "./people"; import People from "./people";
import cptCard from "@/views/modules/visual/cpts/card";
let loading;// let loading;//
let x = 1500
let y = 700
let map; let map;
let mapView; let mapView;
let gaodeMapLayer;// let gaodeMapLayer;//
@ -587,42 +579,20 @@ const vueGis = {
zoom: this.zoom, zoom: this.zoom,
minZoom: this.minZoom minZoom: this.minZoom
}) })
//
this.overlay = new Overlay({
element: this.$refs.popup, // html
autoPan: true, //
autoPanAnimation: { //
duration: 250
}
})
console.log(this.overlay)
//map //map
// //
map = new Map({ map = new Map({
layers: [gaodeMapLayer], layers: [gaodeMapLayer],
// //
view: mapView, view: mapView,
target: 'map', target: 'map'
overlays: [this.overlay], //
//map //map
}) })
let that = this
map.on('singleclick', function (e) { map.on('singleclick', function (e) {
console.log(e.coordinate) console.log(e.coordinate)
const coordinate = e.coordinate //
const hdms = toStringHDMS(toLonLat(coordinate)) //
setTimeout(() => {
//
//
that.currentCoordinate = hdms //
that.overlay.setPosition(coordinate)
}, 0)
// console.log(transform(e.coordinate, 'EPSG:3857', 'EPSG:4326')); // console.log(transform(e.coordinate, 'EPSG:3857', 'EPSG:4326'));
}) })
// //
@ -755,7 +725,7 @@ const vueGis = {
...mapGetters(["clientHeight"]) ...mapGetters(["clientHeight"])
}, },
components: { BasicInfoCommunity, PeopleSearch, People }, components: { BasicInfoCommunity, PeopleSearch, People, cptCard },
} }
export default vueGis; export default vueGis;
</script> </script>

1
src/views/modules/visual/basicinfo/cpts/people-more.vue

@ -323,7 +323,6 @@ export default {
if (type == "cascader") { if (type == "cascader") {
if (valueArr.length > 0) { if (valueArr.length > 0) {
let level1 = options.find((item) => item.value == valueArr[0]); let level1 = options.find((item) => item.value == valueArr[0]);
console.log("----------------------- cascader", options);
if (level1) { if (level1) {
if (valueArr.length > 1 && level1.children) { if (valueArr.length > 1 && level1.children) {
let level2 = level1.children.find( let level2 = level1.children.find(

10
src/views/modules/visual/warning/Base.js

@ -0,0 +1,10 @@
class Base {
constructor() {
this.a = '3'
this.init()
}
init() {
console.log('1')
}
}
export default Base

68
src/views/modules/visual/warning/components/screen-loading/index.vue

@ -0,0 +1,68 @@
<template>
<div class="screen-loading">
<svg width="50px"
height="50px">
<circle cx="25"
cy="25"
r="20"
fill="transparent"
stroke-width="3"
stroke-dasharray="31.415, 31.415"
stroke="#29cdff"
stroke-linecap="round">
<animateTransform attributeName="transform"
type="rotate"
values="0, 25 25;360, 25 25"
dur="1.5s"
repeatCount="indefinite" />
<animate attributeName="stroke"
values="#02bcfe;#3be6cb;#02bcfe"
dur="3s"
repeatCount="indefinite" />
</circle>
<circle cx="25"
cy="25"
r="10"
fill="transparent"
stroke-width="3"
stroke-dasharray="15.7, 15.7"
stroke="#29cdff"
stroke-linecap="round">
<animateTransform attributeName="transform"
type="rotate"
values="360, 25 25;0, 25 25"
dur="1.5s"
repeatCount="indefinite" />
<animate attributeName="stroke"
values="#3be6cb;#02bcfe;#3be6cb"
dur="3s"
repeatCount="indefinite" />
</circle>
</svg>
<div class="loading-tip">
<slot></slot>
</div>
</div>
</template>
<script>
export default {
name: 'DvLoading'
}
</script>
<style lang="scss" scoped>
.screen-loading {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.loading-tip {
font-size: 14px;
color: #fff;
}
}
</style>

73
src/views/modules/visual/warning/components/screen-table/index.vue

@ -7,24 +7,33 @@
<div class="table-body"> <div class="table-body">
<div class="table-body-tr" v-for="(value,index) in tableData" :key='index'> <div class="table-body-tr" v-for="(value,index) in tableData" :key='index'>
<div class="td" v-for="(item,indexs) in value" :key="indexs" :style="tableContentStyle[indexs]">{{item}} <div class="td" v-for="(item,indexs) in value" :key="indexs" :style="tableContentStyle[indexs]">{{item}}
<span v-if="indexs+1==value.length" class="more" @click="onClickMorePop(index)" ref='morePop'> <span v-if="(indexs+1==value.length) && item.length>8" class="more" @click="onClickMorePop(index)" ref='morePop'>
更多> 更多>
<span class="more-pop" v-if="visiblePopList[index]"> <span class="more-pop" v-if="visiblePopList[index]">
李佳琪刘阳赵欣丁一嘉敏李岩何嘉慧 <!-- 李佳琪刘阳赵欣丁一嘉敏李岩何嘉慧
李易峰赵敏何军曲树惠 李易峰赵敏何军曲树惠 -->
{{item}}
</span> </span>
</span> </span>
</div> </div>
</div> </div>
<screen-loading v-if="visibleLoading">加载中</screen-loading>
<div class="no-data" v-if="tableData.length==0 && !visibleLoading">
<img src="../../../../../../assets/img/modules/visual/noData.png" alt="" srcset="" class="no-data-img">
</div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import ScreenLoading from '../screen-loading/index'
import Vue from 'vue' import Vue from 'vue'
export default { export default {
name: 'warning-table', name: 'warning-table',
components:{
ScreenLoading
},
props: { props: {
headerList: { headerList: {
type: Array, type: Array,
@ -46,15 +55,6 @@ name: 'warning-table',
return [ return [
[1,'商丘路社区第一网格','商丘路小区','2号楼','杨颖、王平、刘佳敏、丁辉、杨萍'], [1,'商丘路社区第一网格','商丘路小区','2号楼','杨颖、王平、刘佳敏、丁辉、杨萍'],
[2,'商丘路社区第一网格','商丘路小区','2号楼','杨颖、王平、刘佳敏、丁辉、杨萍'], [2,'商丘路社区第一网格','商丘路小区','2号楼','杨颖、王平、刘佳敏、丁辉、杨萍'],
[3,'商丘路社区第一网格','商丘路小区','2号楼','杨颖、王平、刘佳敏、丁辉、杨萍'],
[4,'商丘路社区第一网格','商丘路小区','2号楼','杨颖、王平、刘佳敏、丁辉、杨萍'],
[5,'商丘路社区第一网格','商丘路小区','2号楼','杨颖、王平、刘佳敏、丁辉、杨萍'],
[6,'商丘路社区第一网格','商丘路小区','2号楼','杨颖、王平、刘佳敏、丁辉、杨萍'],
[7,'商丘路社区第一网格','商丘路小区','2号楼','杨颖、王平、刘佳敏、丁辉、杨萍'],
[8,'商丘路社区第一网格','商丘路小区','2号楼','杨颖、王平、刘佳敏、丁辉、杨萍'],
[9,'商丘路社区第一网格','商丘路小区','2号楼','杨颖、王平、刘佳敏、丁辉、杨萍'],
[10,'商丘路社区第一网格','商丘路小区','2号楼','杨颖、王平、刘佳敏、丁辉、杨萍'],
] ]
} }
}, },
@ -88,6 +88,10 @@ name: 'warning-table',
] ]
} }
}, },
visibleLoading:{
type:Boolean,
default:true
}
// // // //
// ava: { // ava: {
// type: Number, // type: Number,
@ -133,6 +137,7 @@ mounted () {
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.warning-table{ .warning-table{
box-sizing: border-box; box-sizing: border-box;
@ -168,8 +173,8 @@ mounted () {
&-tr { &-tr {
width: 100%; width: 100%;
// height: 50px; height: 50px;
height: calc(100% / 10); // height: calc(100% / 10);
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
align-items: center; align-items: center;
@ -202,20 +207,20 @@ mounted () {
color: #FFFFFF; color: #FFFFFF;
padding:16px 8px 10px 9px; padding:16px 8px 10px 9px;
z-index: 1; z-index: 1;
&::after{ // &::after{
position: absolute; // position: absolute;
left: 30%; // left: 30%;
top: -30%; // top: -30%;
display: flex; // display: flex;
content:''; // content:'';
width: 0; // width: 0;
height: 0; // height: 0;
border-width: 13px; // border-width: 13px;
border-style: solid; // border-style: solid;
border-color: transparent transparent rgba(26, 100, 204,0.5) transparent; // border-color: transparent transparent rgba(26, 100, 204,0.5) transparent;
// border-color: transparent transparent red transparent; // // border-color: transparent transparent red transparent;
transform: translate(-50%,0); // transform: translate(-50%,0);
} // }
} }
} }
@ -230,6 +235,18 @@ mounted () {
background: url('../../../../../../assets/img/modules/visual/hover-bac.png') no-repeat center; background: url('../../../../../../assets/img/modules/visual/hover-bac.png') no-repeat center;
background-size: 100% 100%; background-size: 100% 100%;
} }
//
.no-data{
width: 100%;
height: calc(100% - 50px);
display: flex;
align-items: center;
justify-content: center;
&-img{
width: 249px;
height: 172px;
}
}
} }
} }

141
src/views/modules/visual/warning/index.vue

@ -1,37 +1,44 @@
<template> <template>
<div class="warning-box"> <div class="warning-box">
<cpt-card>
<div class="warning-box-top"> <div class="warning-box-top">
<div class="top-item" v-for="item in [1, 2, 3, 4, 5, 6]" :key="item"> <div class="top-item" v-for="(item, index) in warningList" :key="index">
<div class="top-item-img"> <div class="top-item-img">
<img <img :src="item.dataIcon" />
src="../../../../assets/img/modules/visual/shiye.png"
alt=""
srcset=""
/>
<div class="top-item-left"> <div class="top-item-left">
<span>失业人员</span> <span>{{ item.label }}</span>
<span>1022</span> <span>{{ item.count }}</span>
</div> </div>
</div> </div>
<div class="top-item-num"> <div class="top-item-num">
<div class="num-item num-item-active" @click="onClickList"> <div
<div>5-10</div> class="num-item"
:class="{
'num-item-active': activeIndex == index && activeLevel == '1',
}"
@click="onClickList(index, '1')"
>
<div>{{ item.level1 }}-{{ item.level2 }}</div>
<div> <div>
<div>6</div> <div>{{ item.levelCount1 }}</div>
<img <img
src="../../../../assets/img/modules/visual/right-icon.png" src="../../../../assets/img/modules/visual/right-icon.png"
alt=""
class="right-icon" class="right-icon"
/> />
</div> </div>
</div> </div>
<div class="num-item"> <div
<div>5-10</div> class="num-item"
:class="{
'num-item-active': activeIndex == index && activeLevel == '2',
}"
@click="onClickList(index, '2')"
>
<div>{{ item.level2 }}人以上</div>
<div> <div>
<div>6</div> <div>{{ item.levelCount2 }}</div>
<img <img
src="../../../../assets/img/modules/visual/right-icon.png" src="../../../../assets/img/modules/visual/right-icon.png"
alt=""
class="right-icon" class="right-icon"
/> />
</div> </div>
@ -40,39 +47,123 @@
</div> </div>
</div> </div>
<div class="warning-box-bottom"> <div class="warning-box-bottom">
<screen-table :headerList='headerList'></screen-table> <screen-table
:headerList="headerList"
:tableData="tableData"
:visibleLoading="visibleLoading"
></screen-table>
<div class="pagination"> <div class="pagination">
<el-pagination <el-pagination
:current-page="pageNo"
:page-size="pageSize"
background background
layout="prev, pager, next" layout="prev, pager, next"
:total="1000"> @size-change="pageSizeChangeHandleNew"
@current-change="pageCurrentChangeHandleNew"
:total="total"
>
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
</cpt-card>
</div> </div>
</template> </template>
<script> <script>
import { requestPost } from "@/js/dai/request";
import screenTable from "./components/screen-table/index"; import screenTable from "./components/screen-table/index";
import cptCard from "@/views/modules/visual/cpts/card";
import nextTick from "dai-js/tools/nextTick";
export default { export default {
name: "warning-box", name: "warning-box",
components: { components: {
screenTable cptCard,
screenTable,
}, },
data() { data() {
return { return {
warningList: [],
headerList: [ headerList: [
{ title: '序号' }, { title: "序号" },
{ title: '所属网格'}, { title: "所属网格" },
{ title: '所属小区'}, { title: "所属小区" },
{ title: '楼号'}, { title: "楼号" },
{ title: '姓名' }, { title: "姓名" },
],
tableData: [
// [1,'','','2',''],
], ],
visibleLoading: true,
pageNo: 1,
pageSize: 10,
total: 0,
activeIndex: 0,
activeLevel: "1",
}; };
}, },
async mounted() {
await nextTick(100);
this.getBuildingwarnlist();
},
methods: { methods: {
onClickList(){} onClickList(index, level) {
this.activeIndex = index;
this.activeLevel = level;
this.pageNo = 1;
this.getUserwarnlist();
},
//
async getUserwarnlist() {
const { activeIndex, activeLevel, warningList } = this;
const reqItem = warningList[activeIndex];
let tableData = [];
const url = "/epmetuser/statsresiwarn/userwarnlist";
let params = {
configId: reqItem.configId,
buildingIdList: reqItem["buildingIdList" + activeLevel],
pageNo: this.pageNo,
pageSize: this.pageSize,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
data.list.forEach((item, index) => {
tableData.push([
index + 1,
item.gridName,
item.neighborhoodName,
item.buildingName,
item.residentNames ? item.residentNames : "暂无",
]);
});
this.tableData = tableData;
this.total = data.total;
} else {
} }
},
//
async getBuildingwarnlist() {
const url = "/epmetuser/statsresiwarn/buildingwarnlist";
let params = {
agencyId: this.$store.state.user.agencyId,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.warningList = data;
this.visibleLoading = false;
this.getUserwarnlist();
} else {
}
},
pageSizeChangeHandleNew(val) {
this.pageNo = 1;
this.pageSize = val;
},
pageCurrentChangeHandleNew(val) {
this.pageNo = val;
this.getUserwarnlist();
},
},
}; };
</script> </script>

Loading…
Cancel
Save