提交:新版本监控大屏,初步结果

This commit is contained in:
23688nl 2022-08-10 10:01:58 +08:00
parent 9ac24142f7
commit 6210e1c8ba
40 changed files with 824 additions and 93 deletions

View File

@ -52,11 +52,13 @@
"js-cookie": "2.2.1", "js-cookie": "2.2.1",
"js-md5": "^0.7.3", "js-md5": "^0.7.3",
"jsencrypt": "3.0.0-rc.1", "jsencrypt": "3.0.0-rc.1",
"moment": "^2.29.4",
"node-sass": "^4.9.0",
"nprogress": "0.2.0", "nprogress": "0.2.0",
"qrcodejs2": "^0.0.2", "qrcodejs2": "^0.0.2",
"quill": "1.3.7", "quill": "1.3.7",
"node-sass": "^4.9.0",
"sass-loader": "^7.0.1", "sass-loader": "^7.0.1",
"save": "^2.5.0",
"screenfull": "5.0.2", "screenfull": "5.0.2",
"sortablejs": "1.10.2", "sortablejs": "1.10.2",
"vue": "2.6.12", "vue": "2.6.12",
@ -75,13 +77,13 @@
"@vue/cli-service": "4.4.6", "@vue/cli-service": "4.4.6",
"babel-eslint": "10.1.0", "babel-eslint": "10.1.0",
"chalk": "4.1.0", "chalk": "4.1.0",
"node-sass": "^4.9.0",
"sass-loader": "^7.0.1",
"connect": "3.6.6", "connect": "3.6.6",
"eslint": "7.15.0", "eslint": "7.15.0",
"eslint-plugin-vue": "7.2.0", "eslint-plugin-vue": "7.2.0",
"lint-staged": "10.5.3", "lint-staged": "10.5.3",
"node-sass": "^4.9.0",
"runjs": "4.4.2", "runjs": "4.4.2",
"sass-loader": "^7.0.1",
"script-ext-html-webpack-plugin": "2.1.5", "script-ext-html-webpack-plugin": "2.1.5",
"svg-sprite-loader": "5.1.1", "svg-sprite-loader": "5.1.1",
"vue-template-compiler": "2.6.12" "vue-template-compiler": "2.6.12"

BIN
public/images/icon01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
public/images/icon02.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
public/images/icon03.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
public/images/icon04.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -9,12 +9,17 @@
<link rel="stylesheet" href="<%= BASE_URL %>cdn/iconfont/1.0.0/index.css"> <link rel="stylesheet" href="<%= BASE_URL %>cdn/iconfont/1.0.0/index.css">
<link rel="stylesheet" href="<%= BASE_URL %>cdn/iconfont/1.0.0/iconfont.css"> <link rel="stylesheet" href="<%= BASE_URL %>cdn/iconfont/1.0.0/iconfont.css">
<link rel="stylesheet" href="//at.alicdn.com/t/font_2506643_9w119og75cs.css"> <link rel="stylesheet" href="//at.alicdn.com/t/font_2506643_9w119og75cs.css">
<link rel="stylesheet" href="//at.alicdn.com/t/c/font_2506643_9xrjupanl8d.css">
<script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=aabc97a5e095102787d405719847ecf0"></script> <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=aabc97a5e095102787d405719847ecf0"></script>
<script src="<%= BASE_URL %>js/config.js"></script> <script src="<%= BASE_URL %>js/config.js"></script>
<script src="https://webapi.amap.com/maps?v=1.4.15&key=aabc97a5e095102787d405719847ecf0&plugin=AMap.PlaceSearch"></script> <script src="https://webapi.amap.com/maps?v=1.4.15&key=aabc97a5e095102787d405719847ecf0&plugin=AMap.PlaceSearch"></script>
<script src="https://a.amap.com/jsapi_demos/static/demo-center/js/demoutils.js"></script> <script src="https://a.amap.com/jsapi_demos/static/demo-center/js/demoutils.js"></script>
<script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=aabc97a5e095102787d405719847ecf0&plugin=AMap.Geocoder"></script> <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=aabc97a5e095102787d405719847ecf0&plugin=AMap.Geocoder"></script>
<script type="text/javascript" src="<%= BASE_URL %>cdn/js/jessibuca/jessibuca.js"></script>
<title><%= webpackConfig.name %></title> <title><%= webpackConfig.name %></title>
<style> <style>
html, html,

View File

@ -0,0 +1,19 @@
import request from '@/utils/request'
// 查询能源 统计
export function getEnergyCensusList(query) {
return request({
url: '/sys/device/projectstat',
method: 'get',
params: query
})
}
// 查询能源 空间 统计
export function getEnergySpaceCensusList(query) {
return request({
url: '/sys/device/spacestat',
method: 'get',
params: query
})
}

View File

@ -0,0 +1 @@
<svg t="1660026423955" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2946" width="200" height="200"><path d="M0 236.307692m196.923077 0l315.076923 0q196.923077 0 196.923077 196.923077l0 315.076923q0 196.923077-196.923077 196.923077l-315.076923 0q-196.923077 0-196.923077-196.923077l0-315.076923q0-196.923077 196.923077-196.923077Z" fill="#1890FF" p-id="2947"></path><path d="M827.076923 787.692308h-118.153846v-354.461539c9.609846-103.739077-92.278154-196.923077-157.538462-196.923077H315.076923c0-108.740923 88.182154-157.538462 196.923077-157.538461h315.076923a196.923077 196.923077 0 0 1 196.923077 196.923077v315.076923a196.923077 196.923077 0 0 1-196.923077 196.923077z" fill="#1890FF" opacity=".3" p-id="2948"></path></svg>

After

Width:  |  Height:  |  Size: 776 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="amap-bigsc-location"> <div class="amap-bigsc-location">
<div id="container" style="width:100%; height:100%"></div> <div id="container" style="width: 100%; height: 100%"></div>
</div> </div>
</template> </template>
<script> <script>
@ -20,21 +20,21 @@ export default {
default: { default: {
lng: 116.397428, lng: 116.397428,
lat: 39.90923, lat: 39.90923,
address: "" address: "",
} },
}, },
zoom: { zoom: {
type: [String, Number], type: [String, Number],
default: 10 default: 10,
}, },
draggable: { draggable: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
projectList: { projectList: {
type: Array, type: Array,
default: [] default: [],
} },
}, },
data() { data() {
return { return {
@ -42,10 +42,10 @@ export default {
pointResult: { pointResult: {
lng: 119.275254, lng: 119.275254,
lat: 26.028928, lat: 26.028928,
address: "" address: "",
}, },
theme: "6c31a547eb9387caefc013b7809e9d21", theme: "6c31a547eb9387caefc013b7809e9d21",
infoWindow: null infoWindow: null,
}; };
}, },
mounted() { mounted() {
@ -53,7 +53,7 @@ export default {
}, },
watch: { watch: {
projectList: { projectList: {
handler: function(list, oldVal) { handler: function (list, oldVal) {
// //
if (this.aMap) { if (this.aMap) {
this.aMap.clearMap(); this.aMap.clearMap();
@ -62,8 +62,8 @@ export default {
// console.log("map_projectList: ", list); // console.log("map_projectList: ", list);
// this.textFu(); // this.textFu();
}, },
deep: true deep: true,
} },
}, },
methods: { methods: {
overview() { overview() {
@ -78,7 +78,7 @@ export default {
center: [this.mapCenter.lng, this.mapCenter.lat], center: [this.mapCenter.lng, this.mapCenter.lat],
resizeEnable: true, resizeEnable: true,
// zoom: this.zoom, // zoom: this.zoom,
mapStyle: "amap://styles/" + this.theme mapStyle: "amap://styles/" + this.theme,
}); });
this.createMarker(); this.createMarker();
// this.textFu(); // this.textFu();
@ -89,7 +89,7 @@ export default {
this.infoWindow = new AMap.InfoWindow({ this.infoWindow = new AMap.InfoWindow({
isCustom: true, //使 isCustom: true, //使
content: "", content: "",
offset: new AMap.Pixel(-3, -9) offset: new AMap.Pixel(-3, -9),
}); });
}, },
// //
@ -106,7 +106,7 @@ export default {
let marker = new AMap.Marker({ let marker = new AMap.Marker({
position: [116.4224009776628, 39.93482727239599], position: [116.4224009776628, 39.93482727239599],
icon: markerIcon, icon: markerIcon,
offset: new AMap.Pixel(-13, -30) offset: new AMap.Pixel(-13, -30),
}); });
var content = []; var content = [];
content.push( content.push(
@ -151,14 +151,17 @@ export default {
let marker = new AMap.Marker({ let marker = new AMap.Marker({
position: [ position: [
this.projectList[i].projectLng, this.projectList[i].projectLng,
this.projectList[i].projectLat this.projectList[i].projectLat,
], ],
// map: this.aMap, // map: this.aMap,
icon: this.projectList[i].tenantIndexVo['unProcessed'] > 0 ? markerAlarmIcon : markerIcon, icon:
offset: new AMap.Pixel(-13, -30) this.projectList[i].tenantIndexVo["unProcessed"] > 0
? markerAlarmIcon
: markerIcon,
offset: new AMap.Pixel(-13, -30),
}); });
var content = []; var content = [];
window['amapObj'] = this.aMap; window["amapObj"] = this.aMap;
content.push( content.push(
`<div class="info-block"> `<div class="info-block">
<span class="info-title">报警提醒</span> <span class="info-title">报警提醒</span>
@ -166,19 +169,27 @@ export default {
<img class="info-top" src="${infoTopIcon}" /> <img class="info-top" src="${infoTopIcon}" />
<div class="info-wrap"> <div class="info-wrap">
<div class="info-item"><span class="info-lable">项目</span> <div class="info-item"><span class="info-lable">项目</span>
<span class="info-value">${this.projectList[i].projectName}</span></div> <span class="info-value">${
this.projectList[i].projectName
}</span></div>
<div class="info-item"><span class="info-lable">地址</span> <div class="info-item"><span class="info-lable">地址</span>
<marquee style="margin: 0; width:calc(100% - 80px);" behavior="alternate" scrollamount="1" width="calc(100% - 40px)"> <marquee style="margin: 0; width:calc(100% - 80px);" behavior="alternate" scrollamount="1" width="calc(100% - 40px)">
<span class="info-value">${this.projectList[i].projectAddress}</span> <span class="info-value">${
this.projectList[i].projectAddress
}</span>
</marquee> </marquee>
</div> </div>
<div class="info-item"><span class="info-lable">报警总数</span> <div class="info-item"><span class="info-lable">报警总数</span>
<span class="info-value" style="color: #ff3739;font-size: 24px;font-weight: 500;">${this.projectList[i].tenantIndexVo?.unProcessed}</span></div> <span class="info-value" style="color: #ff3739;font-size: 24px;font-weight: 500;">${
this.projectList[i].tenantIndexVo?.unProcessed
}</span></div>
<div class="alarm-icon-block"> <div class="alarm-icon-block">
<img class="alarm-icon" src="${infoAlarmIcon}"/> <img class="alarm-icon" src="${infoAlarmIcon}"/>
</div> </div>
<div class="list-device"> <div class="list-device">
${this.resultDeviceListStr(this.projectList[i].deviceAlarmSimpleVoList || [])} ${this.resultDeviceListStr(
this.projectList[i].deviceAlarmSimpleVoList || []
)}
</div> </div>
</div> </div>
<img class="info-bottom" src="${infoBotIcon}"> <img class="info-bottom" src="${infoBotIcon}">
@ -193,20 +204,26 @@ export default {
this.aMap.setFitView(); this.aMap.setFitView();
}, },
resultDeviceListStr(list) { resultDeviceListStr(list) {
var resultStr = ''; var resultStr = "";
var _this = this; var _this = this;
window['_this'] = this; window["_this"] = this;
if (list && list.length > 0) { if (list && list.length > 0) {
list.forEach(v => { list.forEach((v) => {
// if (v.unProcessAlarmTotal > 0) { // if (v.unProcessAlarmTotal > 0) {
resultStr = resultStr + ` resultStr =
resultStr +
`
<div class="item-device" onclick="${_this}"> <div class="item-device" onclick="${_this}">
<img class="d-img" src="${infoDeviceIcon}" /> <img class="d-img" src="${infoDeviceIcon}" />
<span class="device-info" name="${v.deviceId}" <span class="device-info" name="${v.deviceId}"
onclick="window['_this'].$router.push({ name:'systemDevice', params: { 'deviceId': ${v.deviceId}, 'tempType': 'details' } })" onclick="window['_this'].$router.push({ name:'systemDevice', params: { 'deviceId': ${
style="${v.unProcessAlarmTotal > 0 ? 'color: #ff3739;':''}">${v.deviceName}</span> v.deviceId
}, 'tempType': 'details' } })"
style="${v.unProcessAlarmTotal > 0 ? "color: #ff3739;" : ""}">${
v.deviceName
}</span>
</div> </div>
` `;
// } // }
}); });
} }
@ -234,10 +251,10 @@ export default {
var _this = this; var _this = this;
// console.log(""+lng+""+lat); // console.log(""+lng+""+lat);
var lnglatXY = [lng, lat]; // var lnglatXY = [lng, lat]; //
AMap.service("AMap.Geocoder", function() { AMap.service("AMap.Geocoder", function () {
// //
var geocoder = new AMap.Geocoder({}); var geocoder = new AMap.Geocoder({});
geocoder.getAddress(lnglatXY, function(status, result) { geocoder.getAddress(lnglatXY, function (status, result) {
if (status === "complete" && result.info === "OK") { if (status === "complete" && result.info === "OK") {
// console.log(result.regeocode.formattedAddress); // console.log(result.regeocode.formattedAddress);
var address = result.regeocode.formattedAddress; var address = result.regeocode.formattedAddress;
@ -258,8 +275,8 @@ export default {
showInfoM(e) { showInfoM(e) {
this.pointResult["lat"] = e.lnglat.lat; this.pointResult["lat"] = e.lnglat.lat;
this.pointResult["lng"] = e.lnglat.lng; this.pointResult["lng"] = e.lnglat.lng;
} },
} },
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
@ -411,5 +428,6 @@ export default {
top: 25px; top: 25px;
z-index: 1; z-index: 1;
} }
} }
</style> </style>

View File

@ -77,7 +77,7 @@ export default {
this.aMap = new AMap.Map("container", { this.aMap = new AMap.Map("container", {
center: [this.mapCenter.lng, this.mapCenter.lat], center: [this.mapCenter.lng, this.mapCenter.lat],
resizeEnable: true, resizeEnable: true,
viewMode: '3D', viewMode: "3D",
// zoom: this.zoom, // zoom: this.zoom,
mapStyle: "amap://styles/" + this.theme, mapStyle: "amap://styles/" + this.theme,
}); });
@ -417,12 +417,12 @@ export default {
align-items: center; align-items: center;
} }
div.list-device { div.list-device {
width: 100%; width: calc(100% - 10px);
padding-left: 30px; padding-left: 30px;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
height: auto; height: auto;
padding-right: 30px; padding-right: 20px;
max-height: 150px; max-height: 150px;
overflow: auto; overflow: auto;
// justify-content: space-between; // justify-content: space-between;
@ -461,5 +461,19 @@ export default {
top: 25px; top: 25px;
z-index: 1; z-index: 1;
} }
div.list-device::-webkit-scrollbar {
width: 6px; //
height: 6px; //
}
//
div.list-device::-webkit-scrollbar-thumb {
border-radius: 3px;
background-color: #00f7f8//;
}
//
div.list-device::-webkit-scrollbar-track-piece {
background-color: #00f7f800;
}
} }
</style> </style>

View File

@ -0,0 +1,223 @@
<template>
<div class="census-card">
<div class="block-top">
<span class="count-num">{{ countNum || 0 }}</span>
<span class="count-unit"> {{ countUnit || "(吨标准煤)" }} </span>
</div>
<div class="block-dividing"></div>
<div class="block-content">
<div class="bit-left">
<img :src="icon" />
</div>
<div class="bit-right">
<div
class="b_list"
:id="'publishMain' + elementId"
v-show="activityList && activityList.length > 0"
>
<div :id="'publishMain1' + elementId">
<div class="b_item" v-for="(item, idx) in activityList" :key="idx">
<span class="b-label" :title="item[props['label']]">{{
item[props["label"]]
}}</span>
<span class="b-value" :title="item[props['value']]">{{
item[props["value"]]
}}</span>
</div>
</div>
<div :id="'publishMain2' + elementId"></div>
</div>
<!-- <el-empty v-else :image-size="200"></el-empty> -->
<div
style="
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
"
v-show="!(activityList && activityList.length > 0)"
>
暂无数据
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "CensusCard",
props: {
icon: {
type: String,
default: () => {
return "/images/icon01.png";
},
},
props: {
typd: Object,
default: {
label: "label",
key: "key",
value: "value",
},
},
countNum: {
type: [String, Number],
require: true,
},
countUnit: {
type: String,
},
activityList: {
type: Array,
require: true,
default: () => {
return [];
},
},
},
data() {
return {
timer: null,
elementId: "",
};
},
mounted() {
this.$nextTick(() => {
this.rollUp();
});
},
beforeDestroy() {
this.timer = null;
clearInterval(this.timer);
},
created() {
this.elementId = new Date().getTime();
},
methods: {
rollUp() {
let ul1 = document.getElementById("publishMain1" + this.elementId);
let ul2 = document.getElementById("publishMain2" + this.elementId);
let box = document.getElementById("publishMain" + this.elementId);
ul2.innerHTML = ul1.innerHTML;
box.scrollTop = 0;
function rollStart() {
if (box.scrollTop >= ul1.scrollHeight) {
box.scrollTop = 0;
} else {
box.scrollTop++;
}
}
this.timer = setInterval(rollStart, 100);
},
},
};
</script>
<style lang="scss">
.census-card {
width: 100%;
height: 100%;
.block-top {
height: 70px;
display: flex;
justify-content: space-between;
padding: 0 20px;
padding-right: 0;
align-items: center;
width: 100%;
.count-num {
height: 30px;
font-size: 24px;
font-family: "Source Han Sans CN";
font-weight: 600;
color: #ffcc00;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: calc(100% - 100px);
}
.count-unit {
height: 16px;
font-size: 16px;
font-family: "Source Han Sans CN";
font-weight: 400;
color: #00feff;
}
}
.block-dividing {
width: 100%;
height: 1px;
background: linear-gradient(
90deg,
rgba(0, 255, 241, 0) 0%,
rgba(0, 255, 241, 0.97) 48%,
rgba(0, 255, 241, 0) 100%
);
}
.block-content {
width: 100%;
height: 170px;
display: flex;
.bit-left {
width: 140px;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.bit-right {
width: calc(100% - 140px);
height: 100%;
padding: 10px 5px;
@keyframes scrollTop {
0% {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
100% {
-webkit-transform: translate3d(0, -300px, 0);
transform: translate3d(0, -300px, 0);
}
}
.b_list {
overflow: hidden;
height: 100%;
.b_item {
width: 100%;
display: flex;
justify-content: space-between;
height: 35px;
font-size: 14px;
font-family: "Source Han Sans CN";
font-weight: 400;
color: #89ffff;
line-height: 37px;
.b-label {
display: block;
width: calc(100% - 80px);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.b-value {
display: block;
width: 80px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-weight: 400;
color: #00feff;
font-size: 16px;
}
}
}
.b_scroll {
-webkit-animation: 10s scrollTop linear infinite normal;
animation: 10s scrollTop linear infinite normal;
}
}
}
}
</style>

View File

@ -0,0 +1,83 @@
.el-descriptions {
box-sizing: border-box;
font-size: 14px;
color: #303133;
}
.margin-top {
margin-top: 20px;
}
.el-descriptions__header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.el-descriptions__title {
font-size: 16px;
font-weight: 700;
}
.el-descriptions__extra {
box-sizing: border-box;
font-size: 14px;
color: #303133;
}
.el-descriptions__body {
color: #606266;
background-color: #fff;
}
.el-descriptions__table {
border-collapse: collapse;
width: 100%;
table-layout: fixed;
}
.is-bordered {
table-layout: auto;
}
.el-descriptions-row {
border-collapse: collapse;
width: 100%;
table-layout: fixed;
}
.el-descriptions .el-descriptions-item__cell {
padding-bottom: 12px;
}
.el-descriptions .el-descriptions-item__cell {
padding-bottom: 12px
}
.el-descriptions-row {}
.el-descriptions__body .el-descriptions__table .el-descriptions-item__cell {
box-sizing: border-box;
text-align: left;
font-weight: 400;
line-height: 1.5;
}
.el-descriptions-item__container {
display: flex;
}
.el-descriptions-item__label {
margin-right: 10px;
}
.el-descriptions-item__container .el-descriptions-item__content, .el-descriptions-item__container .el-descriptions-item__label {
display: inline-flex;
align-items: baseline;
}
.el-descriptions .is-bordered .el-descriptions-item__cell {
border: 1px solid #ebeef5;
padding: 12px 10px;
}
.el-descriptions-item__label.is-bordered-label {
font-weight: 700;
color: #909399;
background: #fafafa;
}
.el-descriptions__body .el-descriptions__table {
border-collapse: collapse;
width: 100%;
}

View File

@ -22,12 +22,33 @@
<div class="count-wrap"> <div class="count-wrap">
<div class="count-left"> <div class="count-left">
<div class="left-block-1"> <div class="left-block-1">
<device-proportion-wrap <project-count-temp
:projectId="projectId" :props="{
></device-proportion-wrap> label: 'spaceName',
<today-ratio-wrap key: 'spaceId',
:result="resultInfo.warningAnalysisStatisticsVo || []" value: 'coal',
></today-ratio-wrap> }"
title="年度能耗"
icon="/images/icon01.png"
unit="(吨标准煤)"
:tableList="projectSpaceCensusList"
:countNum="projectStatInfo['coal']"
></project-count-temp>
<project-count-temp
:props="{
label: 'spaceName',
key: 'spaceId',
value: 'ELECTRICITY_METER',
}"
title="年度用电"
icon="/images/icon02.png"
unit="万kwh"
:tableList="projectSpaceCensusList"
:countNum="projectStatInfo['ELECTRICITY_METER']"
></project-count-temp>
<trend-wrap :result="resultInfo.alarmChartDataVo || []"></trend-wrap>
</div> </div>
<div <div
class="map-block-1" class="map-block-1"
@ -38,9 +59,11 @@
tempUserType="userLoginType" tempUserType="userLoginType"
:fullscreen="fullscreen" :fullscreen="fullscreen"
:countResult="alarmInfoResult" :countResult="alarmInfoResult"
:result="alarmInfoResult"
@eventFullscreen="eventFullscreenMap" @eventFullscreen="eventFullscreenMap"
:projectList="projectList" :projectList="projectList"
></map-wrap> ></map-wrap>
<map-wrap-personal <map-wrap-personal
v-else v-else
:fullscreen="fullscreen" :fullscreen="fullscreen"
@ -49,18 +72,53 @@
@eventFullscreen="eventFullscreenMap" @eventFullscreen="eventFullscreenMap"
:projectList="projectList" :projectList="projectList"
></map-wrap-personal> ></map-wrap-personal>
<div
style="width: 100%; display: flex; justify-content: space-between;"
>
<wraring-info-wrap :result="alarmInfoResult"></wraring-info-wrap>
<device-proportion-wrap
:projectId="projectId"
></device-proportion-wrap>
</div> </div>
<div class="bottom-block-1"> </div>
<!-- <div class="bottom-block-1">
<alarm-table-list-wrap <alarm-table-list-wrap
:result="alarmInfoResult" :result="alarmInfoResult"
style="margin-top: -5px" style="margin-top: -5px"
:projectId="projectId" :projectId="projectId"
></alarm-table-list-wrap> ></alarm-table-list-wrap>
</div> </div> -->
</div> </div>
<div class="right-block-1"> <div class="right-block-1">
<wraring-info-wrap :result="alarmInfoResult"></wraring-info-wrap> <!-- <wraring-info-wrap :result="alarmInfoResult"></wraring-info-wrap> -->
<trend-wrap :result="resultInfo.alarmChartDataVo || []"></trend-wrap> <project-count-temp
:props="{
label: 'spaceName',
key: 'spaceId',
value: 'WATER_METER',
}"
title="年度用水"
icon="/images/icon03.png"
unit="(万吨)"
:tableList="projectSpaceCensusList"
:countNum="projectStatInfo['WATER_METER']"
></project-count-temp>
<project-count-temp
:props="{
label: 'spaceName',
key: 'spaceId',
value: 'GAS_METER',
}"
title="年度用气"
icon="/images/icon04.png"
unit="万m³"
:tableList="projectSpaceCensusList"
:countNum="projectStatInfo['GAS_METER']"
></project-count-temp>
<type-distribution-wrap <type-distribution-wrap
style="margin-top: -5px" style="margin-top: -5px"
:result="resultInfo.alarmCategoriesList || []" :result="resultInfo.alarmCategoriesList || []"
@ -83,9 +141,11 @@ import MapWrap from "./profile/mapWrap";
import MapWrapPersonal from "./profile/personalCenter"; import MapWrapPersonal from "./profile/personalCenter";
import { iotWebSocketAlarmBaseUrl } from "@/config/env"; import { iotWebSocketAlarmBaseUrl } from "@/config/env";
import Cookies from "js-cookie"; import Cookies from "js-cookie";
import { NextLoading } from '@/utils/loading'; import { NextLoading } from "@/utils/loading";
import ProjectCountTemp from "./profile/projectCountTemp"
import { getWarningAnalysis, homeCount, appProjectList } from "@/api/app"; import { getWarningAnalysis, homeCount, appProjectList } from "@/api/app";
import { getEnergySpaceCensusList, getEnergyCensusList } from '@/api/bigScreen/index'
export default { export default {
name: "Device_oneself", name: "Device_oneself",
components: { components: {
@ -98,6 +158,7 @@ export default {
trendWrap, trendWrap,
MapWrap, MapWrap,
MapWrapPersonal, MapWrapPersonal,
ProjectCountTemp
}, },
data() { data() {
return { return {
@ -115,6 +176,8 @@ export default {
stompClient: null, stompClient: null,
socket_flag: true, socket_flag: true,
setIntervalGetCountOpt: null, setIntervalGetCountOpt: null,
projectStatInfo: {},
projectSpaceCensusList: []
}; };
}, },
mounted() { mounted() {
@ -155,10 +218,30 @@ export default {
this.getProjectList(); this.getProjectList();
this.warningAnalysisList(); this.warningAnalysisList();
this.homeCount(); this.homeCount();
this.getEnergyCensus()
this.getEnergySpaceCensus()
// this.connection(); // this.connection();
}, },
methods: { methods: {
//
getEnergyCensus() {
getEnergyCensusList({
projectId: this.projectId
}).then(res => {
this.projectStatInfo = res.data || {}
})
},
//
getEnergySpaceCensus() {
this.projectSpaceCensusList = []
getEnergySpaceCensusList({
projectId: this.projectId
}).then(res => {
console.log(res)
this.projectSpaceCensusList = res.data || []
})
},
// ws // ws
connection() { connection() {
if (this.stompClient) { if (this.stompClient) {
@ -198,6 +281,8 @@ export default {
this.projectId = data; this.projectId = data;
this.homeCount(); this.homeCount();
this.warningAnalysisList(); this.warningAnalysisList();
this.getEnergyCensus()
this.getEnergySpaceCensus()
}, },
eventRegionalismId(data) { eventRegionalismId(data) {
this.regionalismId = data; this.regionalismId = data;
@ -282,7 +367,8 @@ export default {
height: calc(100vh - 0px); height: calc(100vh - 0px);
display: flex; display: flex;
justify-content: center; justify-content: center;
background-image: url("../../../assets/images/big/v3/bg.jpg"); // background-image: url("../../../assets/images/big/v3/bg.jpg");
background-color: #051832;
cursor: default; cursor: default;
.main-block { .main-block {
width: 100%; width: 100%;
@ -296,20 +382,23 @@ export default {
flex-wrap: wrap; flex-wrap: wrap;
color: #fff; color: #fff;
background: #1531f508; background: #1531f508;
padding: 0px 20px; padding: 0px 10px;
.count-left { .count-left {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
width: calc(100% - 400px); width: calc(100% - 400px);
height: calc(100%); height: calc(100%);
// padding-left: 20px; // padding-left: 20px;
padding: 0 10px;
.left-block-1 { .left-block-1 {
width: 400px; width: 400px;
height: calc(100% - 300px); height: calc(100% - 300px);
padding: 0 10px;
} }
.map-block-1 { .map-block-1 {
width: calc(100% - 405px); width: calc(100% - 405px);
height: calc(100% - 320px); height: calc(100% - 320px);
padding-left: 10px;
} }
.bottom-block-1 { .bottom-block-1 {
@ -321,6 +410,7 @@ export default {
width: 400px; width: 400px;
height: calc(100%); height: calc(100%);
position: relative; position: relative;
padding: 0 10px;
} }
} }
} }

View File

@ -0,0 +1,84 @@
<template>
<div class="census-temp-a" :style="`color: ${icolor};`">
<div class="census-cneter">
<icon :class="`iconfont ${icons} icon-t`"></icon>
</div>
<div class="census-right">
<span class="census-top">{{ value }}</span>
<div class="census-title">{{ title }}</div>
</div>
</div>
</template>
<script>
export default {
name: "CensusTmepA",
props: {
icolor: {
type: String,
},
icons: {
type: String,
},
title: {
type: String,
},
value: {
type: [String, Number],
},
},
};
</script>
<style lang="scss" scoped>
.census-temp-a {
width: 105px;
height: 70px;
display: flex;
width: 100%;
justify-content: center;
.census-cneter {
width: 80px;
background-image: url("../../../../assets/images/big/v3/censusTempA.png");
height: 60px;
display: flex;
justify-content: center;
align-items: center;
background-size: cover;
.icon-t {
font-size: 30px;
margin-top: 12px;
}
}
.census-right {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
width: calc(100% - 60px);
padding-left: 15px;
.census-top {
width: 100%;
display: flex;
justify-content: left;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
position: relative;
top: 5px;
font-size: 20px;
font-family: 'Source Han Sans CN';
font-weight: bold;
align-items: center;
}
.census-title {
width: 100%;
height: 20px;
font-size: 14px;
font-family: "Source Han Sans CN";
font-weight: 500;
color: #ffffff;
display: flex;
justify-content: left;
}
}
}
</style>

View File

@ -4,7 +4,7 @@
<echarts-radar-wrap <echarts-radar-wrap
slot="mk-center" slot="mk-center"
class="count-info" class="count-info"
:styles="'width: 100%; height: 240px;'" :styles="'width: 100%; height: 200px;'"
eId="echartsGaugeDP" eId="echartsGaugeDP"
:option="radarOption" :option="radarOption"
/> />
@ -77,11 +77,11 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
.big-device-proportion-wrap { .big-device-proportion-wrap {
width: 100%; width: calc((100% - 20px) / 2);
height: 300px; height: 190px;
.count-info { .count-info {
width: 100%; width: 100%;
height: 240px; height: 190px;
// background-image: url("../../../../assets/images/big/boxleft-center.png"); // background-image: url("../../../../assets/images/big/boxleft-center.png");
// background-size: contain; // background-size: contain;
padding-top: 10px; padding-top: 10px;

View File

@ -132,7 +132,7 @@ export default {
height: 72px; height: 72px;
width: 100%; width: 100%;
display: flex; display: flex;
background-image: url("../../../../assets/images/big/head_v2.png"); background-image: url("../../../../assets/images/big/v3/head.png");
background-size: cover; background-size: cover;
.left-wrap { .left-wrap {
width: 20%; width: 20%;
@ -191,6 +191,11 @@ export default {
letter-spacing: 2px; letter-spacing: 2px;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
font-size: 36px;
/* font-weight: bold; */
color: #66FFFF;
line-height: 18px;
letter-spacing: 8px;
} }
.right-wrap { .right-wrap {
width: 20%; width: 20%;
@ -212,12 +217,13 @@ export default {
border-radius: 5px 0; border-radius: 5px 0;
padding-top: 6px; padding-top: 6px;
font-size: 16px; font-size: 16px;
color: #00f7f8;
.el-icon-setting { .el-icon-setting {
font-weight: 600; font-weight: 600;
} }
} }
.el-button--texthover { .el-button--texthover {
background: transparent; background-color: transparent !important;
} }
} }
} }

View File

@ -2,12 +2,25 @@
<div class="big-map-wrap"> <div class="big-map-wrap">
<nav-temp htmlType="t3" title=""> <nav-temp htmlType="t3" title="">
<div class="center-wrap" slot="mk-center"> <div class="center-wrap" slot="mk-center">
<div class="alarm-census-wrap">
<div class="census-block">
<img src="@/assets/images/big/v3/iconG.png" />
已处理
<span style="color: #0cff00">{{result['processed']}}</span>
</div>
<div class="census-block image-twinkle">
<img src="@/assets/images/big/v3/iconR.png" />
未处理
<span style="color: red">{{result['unProcessed']}}</span>
</div>
</div>
<amap-wrap <amap-wrap
:mapCenter="{ :mapCenter="{
lng: 116.397428, lng: 116.397428,
lat: 39.90923, lat: 39.90923,
address: '', address: '',
}" }"
style="position: relative;top: -45px;"
ref="bigscLocationMap" ref="bigscLocationMap"
:projectList="projectList" :projectList="projectList"
></amap-wrap> ></amap-wrap>
@ -26,7 +39,7 @@ export default {
amapWrap, amapWrap,
NavTemp, NavTemp,
}, },
props: ["countResult", "projectList", "fullscreen"], props: ["countResult", "projectList", "fullscreen", 'result'],
data() { data() {
return { return {
imgs, imgs,
@ -198,6 +211,46 @@ export default {
} }
} }
} }
.alarm-census-wrap {
display: flex;
width: 100%;
color: #fff;
align-items: center;
padding-left: 20px;
z-index: 999;
height: 46px;
position: relative;
background: rgba(0,0,0,0.5000);
.census-block {
// width: 50%;
display: flex;
align-items: end;
justify-content: flex-start;
flex-wrap: nowrap;
font-size: 16px;
letter-spacing: 1px;
margin-right: 10px;
> img {
margin-right: 5px;
}
> span {
font-size: 18px;
font-family: Source Han Sans CN;
font-weight: bold;
color: #0cff00;
line-height: 26px;
}
}
.image-twinkle {
> img {
animation-name: light;
animation-duration: 1.25s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
}
}
} }
.botton-top-wrap-1 { .botton-top-wrap-1 {

View File

@ -63,7 +63,7 @@ export default {
height: 100%; height: 100%;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
margin-top: 15px; margin-top: 20px;
.mk-top { .mk-top {
height: 35px; height: 35px;
width: 100%; width: 100%;
@ -71,9 +71,9 @@ export default {
-webkit-box-pack: center; -webkit-box-pack: center;
-ms-flex-pack: center; -ms-flex-pack: center;
justify-content: center; justify-content: center;
font-size: 16px; font-size: 17px;
font-family: "Source Han Sans CN"; font-family: "Source Han Sans CN";
font-weight: 400; font-weight: 600;
color: #02d9fd; color: #02d9fd;
padding-left: 0; padding-left: 0;
-webkit-box-align: end; -webkit-box-align: end;
@ -81,7 +81,7 @@ export default {
padding-bottom: 0px; padding-bottom: 0px;
letter-spacing: 1px; letter-spacing: 1px;
background-size: cover; background-size: cover;
padding-top: 5px; padding-top: 0px;
align-items: center; align-items: center;
background-size: 100% 100%; background-size: 100% 100%;
} }
@ -89,11 +89,11 @@ export default {
background-image: url("../../../../assets/images/big/v3/boxleft-top.png"); background-image: url("../../../../assets/images/big/v3/boxleft-top.png");
} }
.mk-top-t2 { .mk-top-t2 {
background-image: url("../../../../assets/images/big/v3/boxgao-t.png"); background-image: url("../../../../assets/images/big/v3/boxbottom-top.png");
} }
.mk-top-t3 { .mk-top-t3 {
height: 28px; height: 28px;
background-image: url("../../../../assets/images/big/v3/boxmap-t.png"); background-image: url("../../../../assets/images/big/v3/boxcenter-top.png");
} }
.mk-center-t1 { .mk-center-t1 {
width: 100%; width: 100%;
@ -108,7 +108,7 @@ export default {
.mk-center-t2 { .mk-center-t2 {
width: 100%; width: 100%;
background-image: url("../../../../assets/images/big/v3/boxgao-c.png"); background-image: url("../../../../assets/images/big/v3/boxbottom-center.png");
background-size: contain; background-size: contain;
padding-top: 10px; padding-top: 10px;
padding: 5px; padding: 5px;
@ -117,7 +117,7 @@ export default {
.mk-center-t3 { .mk-center-t3 {
width: 100%; width: 100%;
background-image: url("../../../../assets/images/big/v3/boxmap-c.png"); background-image: url("../../../../assets/images/big/v3/boxcenter-center.png");
background-size: contain; background-size: contain;
padding-top: 10px; padding-top: 10px;
padding: 5px; padding: 5px;
@ -136,14 +136,14 @@ export default {
.mk-bottom-t2 { .mk-bottom-t2 {
height: 35px; height: 35px;
width: 100%; width: 100%;
background-image: url("../../../../assets/images/big/v3/boxgao-b.png"); background-image: url("../../../../assets/images/big/v3/boxbottom-bottom.png");
background-size: 100% 100%; background-size: 100% 100%;
} }
.mk-bottom-t3 { .mk-bottom-t3 {
height: 35px; height: 35px;
height: 28px; height: 28px;
width: 100%; width: 100%;
background-image: url("../../../../assets/images/big/v3/boxmap-b.png"); background-image: url("../../../../assets/images/big/v3/boxcenter-bottom.png");
background-size: 100% 100%; background-size: 100% 100%;
} }
} }

View File

@ -0,0 +1,133 @@
<template>
<div class="big-project-count">
<nav-temp htmlType="t1" :title="title">
<div slot="mk-center" style="height: 220px; width: 100%">
<census-card
:activityList="tableList"
:countNum="countNum"
:countUnit="unit"
:props="props"
:icon="icon"
></census-card>
</div>
</nav-temp>
</div>
</template>
<script>
import CensusCard from "@/components/Cards/CensusCard";
import NavTemp from "./navTemp";
export default {
name: "ProjectCountTemp",
components: {
NavTemp,
CensusCard,
},
props: {
title: {
type: String,
default: ''
},
tableList: {
type: Array,
default: () => {
return []
}
},
unit: {
type: String,
default: ''
},
props: {
type: Object,
default: () => {
return {
lebel: "label",
key: "key",
value: "value",
}
}
},
countNum: {
type: [String,Number],
default: () => {
return 0
}
},
icon: {
type: String,
default: () => {
return '/static/img/icon01.08d77e5b.png'
}
}
},
data() {
return {
countNum: 3456.7,
icons: '/static/img/icon01.08d77e5b.png',
prop: {
lebel: "label",
key: "key",
value: "value",
},
countUnit: "(吨标准煤)",
list: [
{
value: "112-55656",
label: "子項目名稱B",
},
{
value: "112-5565",
label: "子項目名稱A",
},
{
value: "112-5565",
label: "子項目名稱B",
},
{
value: "112-5565",
label: "子項目名稱A",
},
{
value: "112-5565",
label: "子項目名稱B",
},
{
value: "112-5565",
label: "子項目名稱A",
},
{
value: "112-5565",
label: "子項目名稱V",
},
{
value: "112-5565",
label: "子項目名稱A",
},
],
};
},
watch: {
projectId(val) {
this.getDeviceProportionList();
},
},
created() {
this.getDeviceProportionList();
},
methods: {
getDeviceProportionList() {},
},
};
</script>
<style lang="scss">
.big-project-count {
width: 100%;
overflow: hidden;
margin-bottom: 2px;
.count-info {
width: 100%;
height: 240px;
padding-top: 10px;
}
}
</style>

View File

@ -31,7 +31,7 @@ export default {
colorList: ["#FC6A16", "#1EEEFF"], colorList: ["#FC6A16", "#1EEEFF"],
eId: "trendEchartsLine", eId: "trendEchartsLine",
}, },
title: "报警预警趋势", title: "实时用能分析",
typeName: "alarm", typeName: "alarm",
resultOption: { resultOption: {
color: ["#FC6A16", "#1EEEFF"], color: ["#FC6A16", "#1EEEFF"],
@ -147,14 +147,12 @@ export default {
<style lang="scss"> <style lang="scss">
.big-trend-wrap-v3 { .big-trend-wrap-v3 {
width: 100%; width: 100%;
// height: 300px;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
// margin-top: 10px;
.trend-conter { .trend-conter {
width: 100%; width: 100%;
height: 260px; height: 280px;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: center; justify-content: center;

View File

@ -170,7 +170,7 @@ export default {
flex-wrap: wrap; flex-wrap: wrap;
.conter-block { .conter-block {
width: 100%; width: 100%;
height: 208px; height: 288px;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: center; justify-content: center;

View File

@ -2,28 +2,28 @@
<div class="big-wraring-info-wrap"> <div class="big-wraring-info-wrap">
<nav-temp htmlType="t1" :title="title"> <nav-temp htmlType="t1" :title="title">
<div class="conter-block" slot="mk-center"> <div class="conter-block" slot="mk-center">
<census-temp-a <census-temp-b
v-for="(item, idx) in radarOption2" v-for="(item, idx) in radarOption2"
:key="idx" :key="idx"
:icolor="item.icolor" :icolor="item.icolor"
:title="item.title" :title="item.title"
:value="result[item.key] || 0" :value="result[item.key] || 0"
:icons="item.icons" :icons="item.icons"
></census-temp-a> style="width: calc((100% - 20px) / 2)"
></census-temp-b>
</div> </div>
</nav-temp> </nav-temp>
</div> </div>
</template> </template>
<script> <script>
import EchartsBarWrap from "./echartsBar";
import NavTemp from "./navTemp"; import NavTemp from "./navTemp";
import CensusTempA from "./censusTempA"; import CensusTempA from "./censusTempA";
import censusTempB from "./censusTempB"
export default { export default {
name: "wraringInfoWrap", name: "wraringInfoWrap",
components: { components: {
EchartsBarWrap,
NavTemp, NavTemp,
CensusTempA, censusTempB,
}, },
props: ["result", 'countResult'], props: ["result", 'countResult'],
data() { data() {
@ -45,13 +45,6 @@ export default {
value: "456", value: "456",
key: 'pwTotal' key: 'pwTotal'
}, },
{
icolor: "#F1E156",
icons: "iconfugaidq",
title: "覆盖地区(个)",
value: "456",
key: 'projectTotal'
},
{ {
icolor: "#4FFFFF", icolor: "#4FFFFF",
icons: "iconqunchengyuan", icons: "iconqunchengyuan",
@ -66,6 +59,13 @@ export default {
value: "456", value: "456",
key: 'deviceTotal' key: 'deviceTotal'
}, },
{
icolor: "#F1E156",
icons: "iconfugaidq",
title: "覆盖地区(个)",
value: "456",
key: 'projectTotal'
},
{ {
icolor: "#00FF48", icolor: "#00FF48",
icons: "iconshebei", icons: "iconshebei",
@ -98,11 +98,11 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
.big-wraring-info-wrap { .big-wraring-info-wrap {
width: 400px; height: 190px;
height: 350px; width: calc((100% - 20px) / 2);
.conter-block { .conter-block {
width: 100%; width: 100%;
height: 290px; height: 190px;
background-size: contain; background-size: contain;
padding-top: 10px; padding-top: 10px;
padding: 5px; padding: 5px;
@ -110,6 +110,8 @@ export default {
flex-wrap: wrap; flex-wrap: wrap;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
align-items: center;
padding: 5px 35px;
.count-block { .count-block {
width: calc(100% - 40px); width: calc(100% - 40px);
height: 180px; height: 180px;