代码提交
This commit is contained in:
parent
0777d975e0
commit
790b7d84ce
|
|
@ -7,10 +7,11 @@
|
||||||
<div class="middle">南京江北新区人民法院智慧运营平台</div>
|
<div class="middle">南京江北新区人民法院智慧运营平台</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<div class="quit">
|
<div class="quit">
|
||||||
<img
|
<!-- <img
|
||||||
src="./assets/images/quit.png"
|
src="./assets/images/quit.png"
|
||||||
style="width: 3%; height: 37%"
|
style="width: 3%; height: 37%"
|
||||||
/>
|
@click="goPage"
|
||||||
|
/> -->
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="storey">
|
<!-- <div class="storey">
|
||||||
<div
|
<div
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,9 @@ import axios from 'axios'
|
||||||
// 设置请求头参数 common 为设置所有的接口 post为设置post请求的接口
|
// 设置请求头参数 common 为设置所有的接口 post为设置post请求的接口
|
||||||
// axios.defaults.headers.common['Authorization'] = `Bearer ${localStorage.getItem('access_token')}`;
|
// axios.defaults.headers.common['Authorization'] = `Bearer ${localStorage.getItem('access_token')}`;
|
||||||
|
|
||||||
|
//根据等级获取报警数据
|
||||||
//
|
export const GetLevelAlarm = (params) => {
|
||||||
// export const getFindlist = (params) => {
|
return axios.get('api/GetLevelAlarm', {
|
||||||
// return axios.get('api/services/svBuildingInfo/findlist', {
|
params
|
||||||
// params
|
})
|
||||||
// })
|
};
|
||||||
// };
|
|
||||||
|
|
@ -19,8 +19,8 @@
|
||||||
<div style="margin-top: 2%">
|
<div style="margin-top: 2%">
|
||||||
报警原因:<span class="spancolor">{{
|
报警原因:<span class="spancolor">{{
|
||||||
"「" + item.cause + "」"
|
"「" + item.cause + "」"
|
||||||
}}</span
|
}}</span>
|
||||||
><span>{{ item.content }}</span>
|
<!-- <span>{{ item.content }}</span> -->
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 2%; float: left">
|
<div style="margin-top: 2%; float: left">
|
||||||
风险等级:<span class="spancolor">{{
|
风险等级:<span class="spancolor">{{
|
||||||
|
|
@ -50,8 +50,8 @@
|
||||||
<div style="margin-top: 2%">
|
<div style="margin-top: 2%">
|
||||||
报警原因:<span class="spancolor">{{
|
报警原因:<span class="spancolor">{{
|
||||||
"「" + item.cause + "」"
|
"「" + item.cause + "」"
|
||||||
}}</span
|
}}</span>
|
||||||
><span>{{ item.content }}</span>
|
<!-- <span>{{ item.content }}</span> -->
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 2%; float: left">
|
<div style="margin-top: 2%; float: left">
|
||||||
风险等级:<span class="spancolor">{{
|
风险等级:<span class="spancolor">{{
|
||||||
|
|
@ -84,7 +84,8 @@
|
||||||
报警原因:<span class="spancolor">{{
|
报警原因:<span class="spancolor">{{
|
||||||
"「" + item.cause + "」"
|
"「" + item.cause + "」"
|
||||||
}}</span
|
}}</span
|
||||||
><span>{{ item.content }}</span>
|
>
|
||||||
|
<!-- <span>{{ item.content }}</span> -->
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 2%; float: left">
|
<div style="margin-top: 2%; float: left">
|
||||||
风险等级:<span class="spancolor">{{
|
风险等级:<span class="spancolor">{{
|
||||||
|
|
@ -100,179 +101,17 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { GetLevelAlarm } from "../api/index";
|
||||||
export default {
|
export default {
|
||||||
name: "court",
|
name: "court",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
//报警数组 一级
|
//报警数组 一级
|
||||||
warnList1: [
|
warnList1: [],
|
||||||
{
|
|
||||||
id: "1",
|
|
||||||
icon: require("../assets/images/warnRed.png"),
|
|
||||||
time: "2023年03月18日 15:26:08",
|
|
||||||
cause: "机房02机箱",
|
|
||||||
content: "发生事故",
|
|
||||||
risk: "一级",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "2",
|
|
||||||
icon: require("../assets/images/warnRed.png"),
|
|
||||||
time: "2023年03月18日 15:26:08",
|
|
||||||
cause: "机房02机箱",
|
|
||||||
content: "发生事故",
|
|
||||||
risk: "一级",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "3",
|
|
||||||
icon: require("../assets/images/warnRed.png"),
|
|
||||||
time: "2023年03月18日 15:26:08",
|
|
||||||
cause: "机房02机箱",
|
|
||||||
content: "发生事故",
|
|
||||||
risk: "一级",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "4",
|
|
||||||
icon: require("../assets/images/warnRed.png"),
|
|
||||||
time: "2023年03月18日 15:26:08",
|
|
||||||
cause: "机房02机箱",
|
|
||||||
content: "发生事故",
|
|
||||||
risk: "一级",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "5",
|
|
||||||
icon: require("../assets/images/warnRed.png"),
|
|
||||||
time: "2023年03月18日 15:26:08",
|
|
||||||
cause: "机房02机箱",
|
|
||||||
content: "发生事故",
|
|
||||||
risk: "一级",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "6",
|
|
||||||
icon: require("../assets/images/warnRed.png"),
|
|
||||||
time: "2023年03月18日 15:26:08",
|
|
||||||
cause: "机房02机箱",
|
|
||||||
content: "发生事故",
|
|
||||||
risk: "一级",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
//报警数组 二级
|
//报警数组 二级
|
||||||
warnList2: [
|
warnList2: [],
|
||||||
{
|
|
||||||
id: "1",
|
|
||||||
icon: require("../assets/images/warnOrange.png"),
|
|
||||||
time: "2023年03月18日 15:26:08",
|
|
||||||
cause: "机房02机箱",
|
|
||||||
content: "发生事故",
|
|
||||||
risk: "二级",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "2",
|
|
||||||
icon: require("../assets/images/warnOrange.png"),
|
|
||||||
time: "2023年03月18日 15:26:08",
|
|
||||||
cause: "机房02机箱",
|
|
||||||
content: "发生事故",
|
|
||||||
risk: "二级",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "3",
|
|
||||||
icon: require("../assets/images/warnOrange.png"),
|
|
||||||
time: "2023年03月18日 15:26:08",
|
|
||||||
cause: "机房02机箱",
|
|
||||||
content: "发生事故",
|
|
||||||
risk: "二级",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "4",
|
|
||||||
icon: require("../assets/images/warnOrange.png"),
|
|
||||||
time: "2023年03月18日 15:26:08",
|
|
||||||
cause: "机房02机箱",
|
|
||||||
content: "发生事故",
|
|
||||||
risk: "二级",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "5",
|
|
||||||
icon: require("../assets/images/warnOrange.png"),
|
|
||||||
time: "2023年03月18日 15:26:08",
|
|
||||||
cause: "机房02机箱",
|
|
||||||
content: "发生事故",
|
|
||||||
risk: "二级",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "6",
|
|
||||||
icon: require("../assets/images/warnOrange.png"),
|
|
||||||
time: "2023年03月18日 15:26:08",
|
|
||||||
cause: "机房02机箱",
|
|
||||||
content: "发生事故",
|
|
||||||
risk: "二级",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
//报警数组 三级
|
//报警数组 三级
|
||||||
warnList3: [
|
warnList3: [],
|
||||||
{
|
|
||||||
id: "1",
|
|
||||||
icon: require("../assets/images/warnBlue.png"),
|
|
||||||
time: "2023年03月18日 15:26:08",
|
|
||||||
cause: "机房02机箱",
|
|
||||||
content: "发生事故",
|
|
||||||
risk: "三级",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "2",
|
|
||||||
icon: require("../assets/images/warnBlue.png"),
|
|
||||||
time: "2023年03月18日 15:26:08",
|
|
||||||
cause: "机房02机箱",
|
|
||||||
content: "发生事故",
|
|
||||||
risk: "三级",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "3",
|
|
||||||
icon: require("../assets/images/warnBlue.png"),
|
|
||||||
time: "2023年03月18日 15:26:08",
|
|
||||||
cause: "机房02机箱",
|
|
||||||
content: "发生事故",
|
|
||||||
risk: "三级",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "4",
|
|
||||||
icon: require("../assets/images/warnBlue.png"),
|
|
||||||
time: "2023年03月18日 15:26:08",
|
|
||||||
cause: "机房02机箱",
|
|
||||||
content: "发生事故",
|
|
||||||
risk: "三级",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "5",
|
|
||||||
icon: require("../assets/images/warnBlue.png"),
|
|
||||||
time: "2023年03月18日 15:26:08",
|
|
||||||
cause: "机房02机箱",
|
|
||||||
content: "发生事故",
|
|
||||||
risk: "三级",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "6",
|
|
||||||
icon: require("../assets/images/warnBlue.png"),
|
|
||||||
time: "2023年03月18日 15:26:08",
|
|
||||||
cause: "机房02机箱",
|
|
||||||
content: "发生事故",
|
|
||||||
risk: "三级",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "7",
|
|
||||||
icon: require("../assets/images/warnBlue.png"),
|
|
||||||
time: "2023年03月18日 15:26:08",
|
|
||||||
cause: "机房02机箱",
|
|
||||||
content: "发生事故",
|
|
||||||
risk: "三级",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "8",
|
|
||||||
icon: require("../assets/images/warnBlue.png"),
|
|
||||||
time: "2023年03月18日 15:26:08",
|
|
||||||
cause: "机房02机箱",
|
|
||||||
content: "发生事故",
|
|
||||||
risk: "三级",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
courtList: [
|
courtList: [
|
||||||
{
|
{
|
||||||
name: "空闲中",
|
name: "空闲中",
|
||||||
|
|
@ -294,8 +133,78 @@ export default {
|
||||||
houseList: ["blueHouse", "redHouse", "yellowHouse", "orangeHouse"],
|
houseList: ["blueHouse", "redHouse", "yellowHouse", "orangeHouse"],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {
|
||||||
methods: {},
|
|
||||||
|
// console.log(this.$moment('2023-04-03T10:05:31').format("YYYY-MM-DD HH:mm:ss"),'ssssss222222');
|
||||||
|
//一级告警
|
||||||
|
this.getFirstAlarm();
|
||||||
|
//二级告警
|
||||||
|
this.getSecondAlarm();
|
||||||
|
//三级告警
|
||||||
|
this.getThirdAlarm();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//获取一级告警
|
||||||
|
getFirstAlarm() {
|
||||||
|
GetLevelAlarm({
|
||||||
|
AlarmLevel: "1",
|
||||||
|
DeviceTypes:''
|
||||||
|
}).then((res) => {
|
||||||
|
this.warnList1 = Object.keys(res.data.data).map((item, index) => {
|
||||||
|
if (res.data.data[index].AlarmLevel == 1) {
|
||||||
|
res.data.data[index].AlarmLevel = "一级";
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
id: index+1,
|
||||||
|
icon: require("../assets/images/warnRed.png"),
|
||||||
|
time: this.$moment(res.data.data[index].AlarmTime).format("YYYY-MM-DD HH:mm:ss"),
|
||||||
|
cause: res.data.data[index].AlarmName,
|
||||||
|
risk: res.data.data[index].AlarmLevel,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//获取二级告警
|
||||||
|
getSecondAlarm() {
|
||||||
|
GetLevelAlarm({
|
||||||
|
AlarmLevel: "2",
|
||||||
|
DeviceTypes:''
|
||||||
|
}).then((res) => {
|
||||||
|
this.warnList2 = Object.keys(res.data.data).map((item, index) => {
|
||||||
|
if (res.data.data[index].AlarmLevel == 2) {
|
||||||
|
res.data.data[index].AlarmLevel = "二级";
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
id: index + 1,
|
||||||
|
icon: require("../assets/images/warnOrange.png"),
|
||||||
|
time: this.$moment(res.data.data[index].AlarmTime).format("YYYY-MM-DD HH:mm:ss"),
|
||||||
|
cause: res.data.data[index].AlarmName,
|
||||||
|
risk: res.data.data[index].AlarmLevel,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//获取三级告警
|
||||||
|
getThirdAlarm() {
|
||||||
|
GetLevelAlarm({
|
||||||
|
AlarmLevel: "3",
|
||||||
|
DeviceTypes:''
|
||||||
|
}).then((res) => {
|
||||||
|
this.warnList3 = Object.keys(res.data.data).map((item, index) => {
|
||||||
|
if (res.data.data[index].AlarmLevel == 3) {
|
||||||
|
res.data.data[index].AlarmLevel = "三级";
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
id: index + 1,
|
||||||
|
icon: require("../assets/images/warnBlue.png"),
|
||||||
|
time: this.$moment(res.data.data[index].AlarmTime).format("YYYY-MM-DD HH:mm:ss"),
|
||||||
|
cause: res.data.data[index].AlarmName,
|
||||||
|
risk: res.data.data[index].AlarmLevel,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
watch: {},
|
watch: {},
|
||||||
components: {},
|
components: {},
|
||||||
};
|
};
|
||||||
|
|
@ -370,6 +279,10 @@ export default {
|
||||||
line-height: 2;
|
line-height: 2;
|
||||||
.warnArrayBox {
|
.warnArrayBox {
|
||||||
margin-left: 3%;
|
margin-left: 3%;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
span {
|
span {
|
||||||
margin: 0.5rem;
|
margin: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
@ -443,6 +356,10 @@ export default {
|
||||||
// display: flex;
|
// display: flex;
|
||||||
// flex-direction: column;
|
// flex-direction: column;
|
||||||
// align-items: flex-start;
|
// align-items: flex-start;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
margin-left: 3%;
|
margin-left: 3%;
|
||||||
span {
|
span {
|
||||||
margin: 0.5rem;
|
margin: 0.5rem;
|
||||||
|
|
@ -524,6 +441,10 @@ export default {
|
||||||
// display: flex;
|
// display: flex;
|
||||||
// flex-direction: column;
|
// flex-direction: column;
|
||||||
// align-items: flex-start;
|
// align-items: flex-start;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
margin-left: 3%;
|
margin-left: 3%;
|
||||||
span {
|
span {
|
||||||
margin: 0.5rem;
|
margin: 0.5rem;
|
||||||
|
|
|
||||||
|
|
@ -817,7 +817,7 @@ export default {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 61%;
|
height: 61%;
|
||||||
width: 13%;
|
width: 14%;
|
||||||
.blueHouse {
|
.blueHouse {
|
||||||
background: url(../assets/images/blueHouse.png) no-repeat;
|
background: url(../assets/images/blueHouse.png) no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
|
|
|
||||||
|
|
@ -21,14 +21,19 @@
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
<el-carousel class="equipment" :autoplay="true" trigger="click" :interval="10000">
|
<el-carousel
|
||||||
|
class="equipment"
|
||||||
|
:autoplay="true"
|
||||||
|
trigger="click"
|
||||||
|
:interval="10000"
|
||||||
|
>
|
||||||
<el-carousel-item
|
<el-carousel-item
|
||||||
v-for="(item, index) in equipmentList1"
|
v-for="(item, index) in equipmentList1"
|
||||||
:key="index"
|
:key="index"
|
||||||
class="equipmentEnergy"
|
class="equipmentEnergy"
|
||||||
>
|
>
|
||||||
<div v-for="(i,k) in item" :key="k" class="equipmentEnergyChild">
|
<div v-for="(i, k) in item" :key="k" class="equipmentEnergyChild">
|
||||||
<div class="equipmentList">
|
<div class="equipmentList">
|
||||||
<span>{{ i.count }}</span>
|
<span>{{ i.count }}</span>
|
||||||
<span style="color: rgb(225, 177, 25); font-size: 0.4rem"
|
<span style="color: rgb(225, 177, 25); font-size: 0.4rem"
|
||||||
>KWH</span
|
>KWH</span
|
||||||
|
|
@ -37,8 +42,7 @@
|
||||||
<div class="equipmentName">
|
<div class="equipmentName">
|
||||||
{{ i.name }}
|
{{ i.name }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</el-carousel-item>
|
</el-carousel-item>
|
||||||
</el-carousel>
|
</el-carousel>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -178,113 +182,114 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { GetLevelAlarm } from "../api/index";
|
||||||
export default {
|
export default {
|
||||||
name: "energySaving",
|
name: "energySaving",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
equipmentList: [
|
equipmentList: [
|
||||||
{
|
{
|
||||||
name: "热回收机组1",
|
name: "热回收机组1",
|
||||||
count: "28.4",
|
count: "28.4",
|
||||||
value: "",
|
value: "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "热回收机组1",
|
name: "热回收机组1",
|
||||||
count: "28.4",
|
count: "28.4",
|
||||||
value: "",
|
value: "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "热回收机组1",
|
name: "热回收机组1",
|
||||||
count: "28.4",
|
count: "28.4",
|
||||||
value: "",
|
value: "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "热回收机组1",
|
name: "热回收机组1",
|
||||||
count: "28.4",
|
count: "28.4",
|
||||||
value: "",
|
value: "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "热回收机组1",
|
name: "热回收机组1",
|
||||||
count: "28.4",
|
count: "28.4",
|
||||||
value: "",
|
value: "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "热回收机组1",
|
name: "热回收机组1",
|
||||||
count: "28.4",
|
count: "28.4",
|
||||||
value: "",
|
value: "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "热回收机组1",
|
name: "热回收机组1",
|
||||||
count: "28.4",
|
count: "28.4",
|
||||||
value: "",
|
value: "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "热回收机组1",
|
name: "热回收机组1",
|
||||||
count: "28.4",
|
count: "28.4",
|
||||||
value: "",
|
value: "",
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "热回收机组1",
|
name: "热回收机组1",
|
||||||
count: "28.4",
|
count: "28.4",
|
||||||
value: "",
|
value: "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "热回收机组1",
|
name: "热回收机组1",
|
||||||
count: "28.4",
|
count: "28.4",
|
||||||
value: "",
|
value: "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "热回收机组1",
|
name: "热回收机组1",
|
||||||
count: "28.4",
|
count: "28.4",
|
||||||
value: "",
|
value: "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "热回收机组1",
|
name: "热回收机组1",
|
||||||
count: "28.4",
|
count: "28.4",
|
||||||
value: "",
|
value: "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "热回收机组1",
|
name: "热回收机组1",
|
||||||
count: "28.4",
|
count: "28.4",
|
||||||
value: "",
|
value: "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "热回收机组1",
|
name: "热回收机组1",
|
||||||
count: "28.4",
|
count: "28.4",
|
||||||
value: "",
|
value: "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "热回收机组1",
|
name: "热回收机组1",
|
||||||
count: "28.4",
|
count: "28.4",
|
||||||
value: "",
|
value: "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "热回收机组1",
|
name: "热回收机组1",
|
||||||
count: "28.4",
|
count: "28.4",
|
||||||
value: "",
|
value: "",
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "热回收机组1",
|
name: "热回收机组1",
|
||||||
count: "28.4",
|
count: "28.4",
|
||||||
value: "",
|
value: "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "热回收机组1",
|
name: "热回收机组1",
|
||||||
count: "28.4",
|
count: "28.4",
|
||||||
value: "",
|
value: "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "热回收机组1",
|
name: "热回收机组1",
|
||||||
count: "28.4",
|
count: "28.4",
|
||||||
value: "",
|
value: "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "热回收机组1",
|
name: "热回收机组1",
|
||||||
count: "28.4",
|
count: "28.4",
|
||||||
value: "",
|
value: "",
|
||||||
},
|
},
|
||||||
], //设备用能数据
|
], //设备用能数据
|
||||||
equipmentBtnList: [
|
equipmentBtnList: [
|
||||||
{
|
{
|
||||||
|
|
@ -338,19 +343,19 @@ export default {
|
||||||
{
|
{
|
||||||
name: "今日发电量",
|
name: "今日发电量",
|
||||||
icon: require("../assets/images/jieNengImg/energy.png"),
|
icon: require("../assets/images/jieNengImg/energy.png"),
|
||||||
count: "35.2",
|
count: "",
|
||||||
unit: "kWh",
|
unit: "kWh",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "总发电量",
|
name: "总发电量",
|
||||||
icon: require("../assets/images/jieNengImg/energy.png"),
|
icon: require("../assets/images/jieNengImg/energy.png"),
|
||||||
count: "35.2",
|
count: "",
|
||||||
unit: "kWh",
|
unit: "kWh",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "有功功率",
|
name: "有功功率",
|
||||||
icon: require("../assets/images/jieNengImg/power.png"),
|
icon: require("../assets/images/jieNengImg/power.png"),
|
||||||
count: "35.2",
|
count: "",
|
||||||
unit: "kWh",
|
unit: "kWh",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -362,7 +367,7 @@ export default {
|
||||||
{
|
{
|
||||||
name: "运行时间",
|
name: "运行时间",
|
||||||
icon: require("../assets/images/jieNengImg/runTime.png"),
|
icon: require("../assets/images/jieNengImg/runTime.png"),
|
||||||
count: "35.2",
|
count: "",
|
||||||
unit: "h",
|
unit: "h",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -373,16 +378,17 @@ export default {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
equipmentShow: false,
|
equipmentShow: false,
|
||||||
equipmentList1:[],
|
equipmentList1: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
for (let i = 0; i < this.equipmentList.length; i+=8) {
|
for (let i = 0; i < this.equipmentList.length; i += 8) {
|
||||||
this.equipmentList1.push(this.equipmentList.slice(i,i+8))
|
this.equipmentList1.push(this.equipmentList.slice(i, i + 8));
|
||||||
}
|
}
|
||||||
this.calculateEcharts();
|
this.calculateEcharts();
|
||||||
this.calculateEchartsTwo();
|
this.calculateEchartsTwo();
|
||||||
window.createMqtt = this.createMqtt();
|
window.createMqtt = this.createMqtt();
|
||||||
|
this.changeWarn(0)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//mqtt订阅数据
|
//mqtt订阅数据
|
||||||
|
|
@ -422,6 +428,68 @@ export default {
|
||||||
//预警点击
|
//预警点击
|
||||||
changeWarn(index) {
|
changeWarn(index) {
|
||||||
this.equipmentBtnAc = index;
|
this.equipmentBtnAc = index;
|
||||||
|
if (index == 0) {
|
||||||
|
let params = {
|
||||||
|
AlarmLevel: "",
|
||||||
|
DeviceTypes: "电梯",
|
||||||
|
};
|
||||||
|
GetLevelAlarm(params).then((res) => {
|
||||||
|
this.upWainData(res);
|
||||||
|
});
|
||||||
|
} else if (index == 1) {
|
||||||
|
let params = {
|
||||||
|
AlarmLevel: "",
|
||||||
|
DeviceTypes: "光伏",
|
||||||
|
};
|
||||||
|
GetLevelAlarm(params).then((res) => {
|
||||||
|
this.upWainData(res);
|
||||||
|
});
|
||||||
|
} else if (index == 2) {
|
||||||
|
let params = {
|
||||||
|
AlarmLevel: "",
|
||||||
|
DeviceTypes: "VRV",
|
||||||
|
};
|
||||||
|
GetLevelAlarm(params).then((res) => {
|
||||||
|
this.upWainData(res);
|
||||||
|
});
|
||||||
|
} else if (index == 3) {
|
||||||
|
let params = {
|
||||||
|
AlarmLevel: "",
|
||||||
|
DeviceTypes: "恒温恒湿",
|
||||||
|
};
|
||||||
|
GetLevelAlarm(params).then((res) => {
|
||||||
|
this.upWainData(res);
|
||||||
|
});
|
||||||
|
} else if (index == 4) {
|
||||||
|
let params = {
|
||||||
|
AlarmLevel: "",
|
||||||
|
DeviceTypes: "热回收",
|
||||||
|
};
|
||||||
|
GetLevelAlarm(params).then((res) => {
|
||||||
|
this.upWainData(res);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//更新预警数据
|
||||||
|
upWainData(res) {
|
||||||
|
this.warnList = Object.keys(res.data.data).map((item, index) => {
|
||||||
|
if (res.data.data[index].AlarmLevel == 1) {
|
||||||
|
res.data.data[index].AlarmLevel = "一级";
|
||||||
|
} else if (res.data.data[index].AlarmLevel == 2) {
|
||||||
|
res.data.data[index].AlarmLevel = "二级";
|
||||||
|
} else if (res.data.data[index].AlarmLevel == 3) {
|
||||||
|
res.data.data[index].AlarmLevel = "三级";
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
id: index + 1,
|
||||||
|
icon: require("../assets/images/jieNengImg/warnRed.png"),
|
||||||
|
time: this.$moment(res.data.data[index].AlarmTime).format(
|
||||||
|
"YYYY-MM-DD HH:mm:ss"
|
||||||
|
),
|
||||||
|
case: res.data.data[index].AlarmName,
|
||||||
|
grade: res.data.data[index].AlarmLevel,
|
||||||
|
};
|
||||||
|
});
|
||||||
},
|
},
|
||||||
calculateEcharts() {
|
calculateEcharts() {
|
||||||
let imgSrc = "/img/car.png";
|
let imgSrc = "/img/car.png";
|
||||||
|
|
@ -880,7 +948,7 @@ export default {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
/deep/ .el-carousel__indicators--horizontal{
|
/deep/ .el-carousel__indicators--horizontal {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.equipmentEnergy {
|
.equipmentEnergy {
|
||||||
|
|
@ -890,7 +958,7 @@ export default {
|
||||||
// animation: 10s wordsLoop linear infinite normal;
|
// animation: 10s wordsLoop linear infinite normal;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
.equipmentEnergyChild{
|
.equipmentEnergyChild {
|
||||||
width: 25%;
|
width: 25%;
|
||||||
height: 50%;
|
height: 50%;
|
||||||
.equipmentList {
|
.equipmentList {
|
||||||
|
|
@ -912,7 +980,6 @@ export default {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
::-webkit-scrollbar {
|
::-webkit-scrollbar {
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,7 @@
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
margin-left: 3%;
|
margin-left: 3%;
|
||||||
|
width:100%
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<span>报警时间:{{ item.time }}</span>
|
<span>报警时间:{{ item.time }}</span>
|
||||||
|
|
@ -87,11 +88,11 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-top: 2%;
|
margin-top: 2%;
|
||||||
|
width:100%
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<span>报警原因:{{ item.cause }}</span>
|
<span>报警原因:{{ item.cause }}</span>
|
||||||
<span style="position: relative; left: 50%"
|
<span style="margin-right:5%">风险等级:{{ item.risk }}</span
|
||||||
>风险等级:{{ item.risk }}</span
|
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -241,10 +242,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { GetLevelAlarm } from "../api/index";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dateData:'',//日期选择
|
dateData: "", //日期选择
|
||||||
wisdomList: [
|
wisdomList: [
|
||||||
{
|
{
|
||||||
name: "空闲中",
|
name: "空闲中",
|
||||||
|
|
@ -320,7 +322,7 @@ export default {
|
||||||
value: "2",
|
value: "2",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
selectDate:'',
|
selectDate: "",
|
||||||
dateOptions: [
|
dateOptions: [
|
||||||
{
|
{
|
||||||
label: "年",
|
label: "年",
|
||||||
|
|
@ -335,55 +337,110 @@ export default {
|
||||||
value: "3",
|
value: "3",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
cameraList: [
|
cameraList: [], //摄像
|
||||||
{
|
cameraBig: "",
|
||||||
icon: require("../assets/images/camera.png"),
|
cameraBigShow: false,
|
||||||
video:'video/video.html?src='
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: require("../assets/images/camera.png"),
|
|
||||||
video:'video/video.html?src='
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: require("../assets/images/camera.png"),
|
|
||||||
video:'video/video.html?src='
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: require("../assets/images/camera.png"),
|
|
||||||
video:'video/video.html?src='
|
|
||||||
},
|
|
||||||
], //摄像
|
|
||||||
cameraBig:'',
|
|
||||||
cameraBigShow:false,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this
|
let that = this;
|
||||||
this.warningOne();
|
this.warningOne();
|
||||||
this.warningTwo();
|
this.warningTwo();
|
||||||
this.maintenanceLeft();
|
this.maintenanceLeft();
|
||||||
this.maintenanceRight();
|
this.maintenanceRight();
|
||||||
this.energyEcharts();
|
this.energyEcharts();
|
||||||
window.createMqtt = this.createMqtt();
|
window.createMqtt = this.createMqtt();
|
||||||
window.addEventListener("message", function (e){
|
window.addEventListener("message", function (e) {
|
||||||
let val = e.data.val
|
let val = e.data.val;
|
||||||
if (val != null) {
|
if (val != null) {
|
||||||
that.changeCamera('video/video.html?src='+e.data.val)
|
that.changeCamera("video/video.html?src=" + e.data.val);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
let camera = [
|
||||||
|
{
|
||||||
|
icon: require("../assets/images/camera.png"),
|
||||||
|
video: "video/video.html?src=",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: require("../assets/images/camera.png"),
|
||||||
|
video: "video/video.html?src=",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: require("../assets/images/camera.png"),
|
||||||
|
video: "video/video.html?src=",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: require("../assets/images/camera.png"),
|
||||||
|
video: "video/video.html?src=",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
setTimeout(() => {
|
||||||
|
this.cameraList = camera;
|
||||||
|
}, 1000);
|
||||||
|
this.warnSelect(0)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//选中图片
|
//选中图片
|
||||||
changeCamera(path) {
|
changeCamera(path) {
|
||||||
this.cameraBig = path
|
this.cameraBig = path;
|
||||||
this.cameraBigShow = true
|
this.cameraBigShow = true;
|
||||||
},
|
},
|
||||||
closeCamer(){
|
closeCamer() {
|
||||||
this.cameraBigShow = false
|
this.cameraBigShow = false;
|
||||||
},
|
},
|
||||||
//报警选中
|
//报警选中
|
||||||
warnSelect(index) {
|
warnSelect(index) {
|
||||||
this.warnBtnAc = index;
|
this.warnBtnAc = index;
|
||||||
|
if (index == 0) {
|
||||||
|
let params = {
|
||||||
|
AlarmLevel: "",
|
||||||
|
DeviceTypes: "",
|
||||||
|
};
|
||||||
|
GetLevelAlarm(params).then((res) => {
|
||||||
|
this.upWainData(res);
|
||||||
|
});
|
||||||
|
} else if (index == 1) {
|
||||||
|
let params = {
|
||||||
|
AlarmLevel: "",
|
||||||
|
DeviceTypes: "门禁,视频监控",
|
||||||
|
};
|
||||||
|
GetLevelAlarm(params).then((res) => {
|
||||||
|
this.upWainData(res);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
let params = {
|
||||||
|
AlarmLevel: "",
|
||||||
|
DeviceTypes: "VRV,机房,消防,电梯,恒温恒湿,热回收,环境,光伏,能耗",
|
||||||
|
};
|
||||||
|
GetLevelAlarm(params).then((res) => {
|
||||||
|
this.upWainData(res);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//更新报警信息
|
||||||
|
upWainData(res) {
|
||||||
|
let icon = null;
|
||||||
|
this.warnList = Object.keys(res.data.data).map((item, index) => {
|
||||||
|
if (res.data.data[index].AlarmLevel == 1) {
|
||||||
|
res.data.data[index].AlarmLevel = "一级";
|
||||||
|
icon = require("../assets/images/warnRed.png");
|
||||||
|
} else if (res.data.data[index].AlarmLevel == 2) {
|
||||||
|
res.data.data[index].AlarmLevel = "二级";
|
||||||
|
icon = require("../assets/images/warnOrange.png");
|
||||||
|
} else if (res.data.data[index].AlarmLevel == 3) {
|
||||||
|
res.data.data[index].AlarmLevel = "三级";
|
||||||
|
icon = require("../assets/images/warnBlue.png");
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
id: index + 1,
|
||||||
|
icon: icon,
|
||||||
|
time: this.$moment(res.data.data[index].AlarmTime).format(
|
||||||
|
"YYYY-MM-DD HH:mm:ss"
|
||||||
|
),
|
||||||
|
cause: res.data.data[index].AlarmName,
|
||||||
|
risk: res.data.data[index].AlarmLevel,
|
||||||
|
};
|
||||||
|
});
|
||||||
},
|
},
|
||||||
//设备左
|
//设备左
|
||||||
warningOne() {
|
warningOne() {
|
||||||
|
|
@ -1344,13 +1401,13 @@ export default {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.pickerChange{
|
.pickerChange {
|
||||||
width: 23%;
|
width: 23%;
|
||||||
height: 10%;
|
height: 10%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 22%;
|
top: 22%;
|
||||||
right: 35%;
|
right: 35%;
|
||||||
/deep/ .el-select {
|
/deep/ .el-select {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
|
|
@ -1434,21 +1491,21 @@ export default {
|
||||||
width: 47.4%;
|
width: 47.4%;
|
||||||
height: 50%;
|
height: 50%;
|
||||||
border: 5px solid #01b0ca;
|
border: 5px solid #01b0ca;
|
||||||
.close{
|
.close {
|
||||||
width: 4%;
|
width: 4%;
|
||||||
height: 8%;
|
height: 8%;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top:1%;
|
top: 1%;
|
||||||
right:1%;
|
right: 1%;
|
||||||
background: url("../assets/images/close.png") no-repeat;
|
background: url("../assets/images/close.png") no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.remoteControl{
|
.remoteControl {
|
||||||
width: 15%;
|
width: 15%;
|
||||||
height: 27%;
|
height: 27%;
|
||||||
position:absolute;
|
position: absolute;
|
||||||
bottom: 2%;
|
bottom: 2%;
|
||||||
right: 2%;
|
right: 2%;
|
||||||
background: url("../assets/images/control.png") no-repeat;
|
background: url("../assets/images/control.png") no-repeat;
|
||||||
|
|
@ -1458,10 +1515,10 @@ export default {
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.remoteControl1{
|
.remoteControl1 {
|
||||||
width: 15%;
|
width: 15%;
|
||||||
height: 27%;
|
height: 27%;
|
||||||
position:absolute;
|
position: absolute;
|
||||||
bottom: 2%;
|
bottom: 2%;
|
||||||
right: 2%;
|
right: 2%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
|
|
@ -147,6 +147,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { GetLevelAlarm } from "../api/index";
|
||||||
export default {
|
export default {
|
||||||
name: "security",
|
name: "security",
|
||||||
data() {
|
data() {
|
||||||
|
|
@ -255,7 +256,12 @@ export default {
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {
|
||||||
|
//获取消防告警
|
||||||
|
this.getFireWarnList()
|
||||||
|
// 获取安防告警
|
||||||
|
this.getPoliceList()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
videoChange(index) {
|
videoChange(index) {
|
||||||
this.warnCameraList.forEach((item, i) => {
|
this.warnCameraList.forEach((item, i) => {
|
||||||
|
|
@ -265,6 +271,56 @@ export default {
|
||||||
index
|
index
|
||||||
].icon = require("../assets/images/anFang/videoAc.png");
|
].icon = require("../assets/images/anFang/videoAc.png");
|
||||||
},
|
},
|
||||||
|
//获取火灾报警、
|
||||||
|
getFireWarnList(){
|
||||||
|
let params = {
|
||||||
|
AlarmLevel: "",
|
||||||
|
DeviceTypes:'消防'
|
||||||
|
}
|
||||||
|
GetLevelAlarm(params).then((res) => {
|
||||||
|
let icon = null
|
||||||
|
this.fireWarnList = Object.keys(res.data.data).map((item, index) => {
|
||||||
|
if (res.data.data[index].Status == 1) {
|
||||||
|
res.data.data[index].Status = "未处理";
|
||||||
|
icon = require("../assets/images/jieNengImg/warnWhite.png")
|
||||||
|
}else{
|
||||||
|
res.data.data[index].Status = "已处理";
|
||||||
|
icon = require("../assets/images/jieNengImg/warnBlue.png")
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
icon: icon,
|
||||||
|
time: this.$moment(res.data.data[index].AlarmTime).format("YYYY-MM-DD HH:mm:ss"),
|
||||||
|
position: res.data.data[index].DeviceType,
|
||||||
|
status: res.data.data[index].AlarmLevel,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//获取安防报警、
|
||||||
|
getPoliceList(){
|
||||||
|
let params = {
|
||||||
|
AlarmLevel: "",
|
||||||
|
DeviceTypes:'门禁,视频监控'
|
||||||
|
}
|
||||||
|
GetLevelAlarm(params).then((res) => {
|
||||||
|
let icon = null
|
||||||
|
this.policeList = Object.keys(res.data.data).map((item, index) => {
|
||||||
|
if (res.data.data[index].Status == 1) {
|
||||||
|
res.data.data[index].Status = "未处理";
|
||||||
|
icon = require("../assets/images/jieNengImg/warnWhite.png")
|
||||||
|
}else{
|
||||||
|
res.data.data[index].Status = "已处理";
|
||||||
|
icon = require("../assets/images/jieNengImg/warnBlue.png")
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
icon: icon,
|
||||||
|
time: this.$moment(res.data.data[index].AlarmTime).format("YYYY-MM-DD HH:mm:ss"),
|
||||||
|
content: res.data.data[index].DeviceType,
|
||||||
|
status: res.data.data[index].AlarmLevel,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
watch: {},
|
watch: {},
|
||||||
components: {},
|
components: {},
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ module.exports = {
|
||||||
// port: 8989, // 开发服务器运行端口号
|
// port: 8989, // 开发服务器运行端口号
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': { //代理的名字
|
'/api': { //代理的名字
|
||||||
target:'http://122.51.103.65:8002/ecs-server',
|
target:'http://172.16.1.253:12308/api/',
|
||||||
ws: true,
|
ws: true,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite:{
|
pathRewrite:{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue