20230516
This commit is contained in:
parent
355d666d55
commit
308b825869
56
src/App.vue
56
src/App.vue
|
@ -135,13 +135,26 @@ export default {
|
||||||
this.fun();
|
this.fun();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
window.goPage = this.goPage();
|
// window.goPage = function(e) {
|
||||||
|
// console.log(e)
|
||||||
|
// }
|
||||||
|
window['goPage'] = (b) => {
|
||||||
|
// alert("goPage:"+b);
|
||||||
|
console.log("b")
|
||||||
|
};
|
||||||
|
// window['goIndex'] = (a) => {
|
||||||
|
// console.log(a)
|
||||||
|
// };
|
||||||
|
// window.goPage = this.goPage();
|
||||||
this.menuChange(0, this.menuBtn[0].name);
|
this.menuChange(0, this.menuBtn[0].name);
|
||||||
let week = new Date(this.$moment().format("YYYY-MM-DD")).getDay();
|
let week = new Date(this.$moment().format("YYYY-MM-DD")).getDay();
|
||||||
this.week = this.weekList[week];
|
this.week = this.weekList[week];
|
||||||
window.setInterval(() => {
|
setInterval(() => {
|
||||||
this.time = this.$moment().format("YYYY-MM-DD HH:mm:ss");
|
this.time = this.$moment().format("YYYY-MM-DD HH:mm:ss");
|
||||||
}, 100);
|
}, 100);
|
||||||
|
// window.setInterval(() => {
|
||||||
|
// this.time = this.$moment().format("YYYY-MM-DD HH:mm:ss");
|
||||||
|
// }, 100);
|
||||||
const that = this;
|
const that = this;
|
||||||
window.onresize = () => {
|
window.onresize = () => {
|
||||||
return () => {
|
return () => {
|
||||||
|
@ -155,11 +168,15 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
goPage:function(name){
|
||||||
|
goPage(name)
|
||||||
|
},
|
||||||
|
// goIndex:function(){
|
||||||
|
// goIndex(e)
|
||||||
|
// },
|
||||||
//菜单选中
|
//菜单选中
|
||||||
menuChange(index, name) {
|
menuChange(index, name) {
|
||||||
this.goPage(name);
|
this.menuBtn.forEach((item, index) => {
|
||||||
this.menuAc = index;
|
|
||||||
this.menuBtn.forEach((item, index) => {
|
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
item.icon = require("./assets/images/shouYe.png");
|
item.icon = require("./assets/images/shouYe.png");
|
||||||
} else if (index == 1) {
|
} else if (index == 1) {
|
||||||
|
@ -175,27 +192,36 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
|
this.$router.push("/");
|
||||||
this.menuBtn[index].icon = require("./assets/images/shouYeAc.png");
|
this.menuBtn[index].icon = require("./assets/images/shouYeAc.png");
|
||||||
this.$router.push("/");
|
|
||||||
} else if (index == 1) {
|
} else if (index == 1) {
|
||||||
|
this.$router.push("court");
|
||||||
this.menuBtn[index].icon = require("./assets/images/faTingAc.png");
|
this.menuBtn[index].icon = require("./assets/images/faTingAc.png");
|
||||||
this.$router.push("court");
|
|
||||||
} else if (index == 2) {
|
} else if (index == 2) {
|
||||||
|
this.$router.push("energySaving");
|
||||||
this.menuBtn[index].icon = require("./assets/images/jieNengAc.png");
|
this.menuBtn[index].icon = require("./assets/images/jieNengAc.png");
|
||||||
this.$router.push("energySaving");
|
|
||||||
} else if (index == 3) {
|
} else if (index == 3) {
|
||||||
this.menuBtn[index].icon = require("./assets/images/anFangAc.png");
|
|
||||||
this.$router.push("security");
|
this.$router.push("security");
|
||||||
|
this.menuBtn[index].icon = require("./assets/images/anFangAc.png");
|
||||||
|
|
||||||
} else if (index == 4) {
|
} else if (index == 4) {
|
||||||
|
this.$router.push("operationMaintenance");
|
||||||
this.menuBtn[index].icon = require("./assets/images/yunWeiAc.png");
|
this.menuBtn[index].icon = require("./assets/images/yunWeiAc.png");
|
||||||
this.$router.push("operationMaintenance");
|
|
||||||
} else if (index == 5) {
|
} else if (index == 5) {
|
||||||
this.menuBtn[index].icon = require("./assets/images/gaoJingAc.png");
|
|
||||||
this.$router.push("alarm");
|
this.$router.push("alarm");
|
||||||
|
this.menuBtn[index].icon = require("./assets/images/gaoJingAc.png");
|
||||||
}
|
}
|
||||||
},
|
this.goPage(name);
|
||||||
goPage(name) {
|
// if (name!="首页"){
|
||||||
console.log(name);
|
// this.goPage(name);
|
||||||
|
// }else{
|
||||||
|
// this.goIndex('进入首页');
|
||||||
|
// }
|
||||||
|
|
||||||
|
this.menuAc = index;
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//选中楼层
|
//选中楼层
|
||||||
|
@ -244,7 +270,7 @@ export default {
|
||||||
#app {
|
#app {
|
||||||
// width: 6144px;
|
// width: 6144px;
|
||||||
// height: 1920px;
|
// height: 1920px;
|
||||||
background: rgba(1, 1, 7, 0);
|
background: rgba(1, 1, 7, 1);
|
||||||
// overflow: hidden;
|
// overflow: hidden;
|
||||||
.header {
|
.header {
|
||||||
height: 11%;
|
height: 11%;
|
||||||
|
|
|
@ -36,21 +36,8 @@ class mqttHandle {
|
||||||
// console.log("connectUrl",connectUrl)
|
// console.log("connectUrl",connectUrl)
|
||||||
const { host, port, endpoint, ...options } = this.connect;
|
const { host, port, endpoint, ...options } = this.connect;
|
||||||
console.log("this.connect.host", this.connect.host)
|
console.log("this.connect.host", this.connect.host)
|
||||||
// const connectUrl = 'ws://138.227.111.141:8083/mqtt';
|
const connectUrl = 'ws://138.227.208.100:1884/mqtt';
|
||||||
// const connectUrl = 'ws://138.227.208.100:1884/mqtt';
|
//const connectUrl = 'ws://172.16.1.253:1884/mqtt';
|
||||||
const connectUrl = 'ws://172.16.1.253:1884/mqtt';
|
|
||||||
// const connectUrl = `ws://${this.connect.host}:${this.connect.port}`;
|
|
||||||
// if (!client.connected) {
|
|
||||||
// client.on('connect', function () {
|
|
||||||
// console.log('连接成功')
|
|
||||||
// })
|
|
||||||
// } else {
|
|
||||||
// client.publish('test/clientE', ms, {'qos': 2}, function (err) {
|
|
||||||
// if (err) {
|
|
||||||
// console.log(err)
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
if (this.mqttClient == undefined) {
|
if (this.mqttClient == undefined) {
|
||||||
this.mqttClient = mqtt.connect(connectUrl, options);
|
this.mqttClient = mqtt.connect(connectUrl, options);
|
||||||
this.mqttClient.on("connect", () => {
|
this.mqttClient.on("connect", () => {
|
||||||
|
@ -64,17 +51,6 @@ class mqttHandle {
|
||||||
console.log("Connection failed");
|
console.log("Connection failed");
|
||||||
});
|
});
|
||||||
|
|
||||||
//配置topic
|
|
||||||
// const { topic, qos } = this.subscription;
|
|
||||||
// console.log(topic, qos,'topic, qos');
|
|
||||||
// this._client.subscribe(topic, { qos: qos }, (error, res) => {
|
|
||||||
// if (error) {
|
|
||||||
// console.log("Subscribe to topics error", error);
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// this.subscribeSuccess = true;
|
|
||||||
// console.log("Subscribe to topics res", res[0].qos, res[0].topic);
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.mqttClient;
|
return this.mqttClient;
|
||||||
|
|
|
@ -195,7 +195,9 @@ export default {
|
||||||
risk: res.data.data[index].AlarmLevel,
|
risk: res.data.data[index].AlarmLevel,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
});
|
}).catch(err => {
|
||||||
|
|
||||||
|
});
|
||||||
},
|
},
|
||||||
//获取二级告警
|
//获取二级告警
|
||||||
getSecondAlarm() {
|
getSecondAlarm() {
|
||||||
|
@ -215,7 +217,9 @@ export default {
|
||||||
risk: res.data.data[index].AlarmLevel,
|
risk: res.data.data[index].AlarmLevel,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
});
|
}).catch(err => {
|
||||||
|
|
||||||
|
});
|
||||||
},
|
},
|
||||||
//获取三级告警
|
//获取三级告警
|
||||||
getThirdAlarm() {
|
getThirdAlarm() {
|
||||||
|
@ -235,7 +239,9 @@ export default {
|
||||||
risk: res.data.data[index].AlarmLevel,
|
risk: res.data.data[index].AlarmLevel,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
});
|
}).catch(err => {
|
||||||
|
|
||||||
|
});
|
||||||
},
|
},
|
||||||
//获取mqtt数据
|
//获取mqtt数据
|
||||||
upmqttData(val) {
|
upmqttData(val) {
|
||||||
|
|
|
@ -22,21 +22,7 @@
|
||||||
<div class="leftTwo">
|
<div class="leftTwo">
|
||||||
<div class="caseTitle">案件统计</div>
|
<div class="caseTitle">案件统计</div>
|
||||||
<div class="select">
|
<div class="select">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="userValue"
|
|
||||||
:popper-append-to-body="false"
|
|
||||||
clearable
|
|
||||||
placeholder="请选择"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="(item, index) in userOptions"
|
|
||||||
:key="index"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
<el-select
|
|
||||||
v-model="departmentValue"
|
v-model="departmentValue"
|
||||||
:popper-append-to-body="false"
|
:popper-append-to-body="false"
|
||||||
clearable
|
clearable
|
||||||
|
@ -51,6 +37,21 @@
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
<el-select
|
||||||
|
v-model="userValue"
|
||||||
|
:popper-append-to-body="false"
|
||||||
|
clearable
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="(item, index) in userOptions"
|
||||||
|
:key="index"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div id="caseEcharts"></div>
|
<div id="caseEcharts"></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -441,7 +442,8 @@ export default {
|
||||||
{
|
{
|
||||||
name: "收案",
|
name: "收案",
|
||||||
type: "bar",
|
type: "bar",
|
||||||
data: [22, 30, 50, 10],
|
// data: [22, 30, 50, 10],
|
||||||
|
data: [22, 30, 0, 0],
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
//定义柱子的样式
|
//定义柱子的样式
|
||||||
// color:params=>color[params.dataIndex],//定义每根柱子的不同颜色(不渐变)
|
// color:params=>color[params.dataIndex],//定义每根柱子的不同颜色(不渐变)
|
||||||
|
@ -477,7 +479,8 @@ export default {
|
||||||
{
|
{
|
||||||
name: "结案",
|
name: "结案",
|
||||||
type: "bar",
|
type: "bar",
|
||||||
data: [20, 34, 20, 30],
|
// data: [20, 34, 20, 30],
|
||||||
|
data: [20, 34, 0, 0],
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
//定义柱子的样式
|
//定义柱子的样式
|
||||||
// color:params=>color[params.dataIndex],//定义每根柱子的不同颜色(不渐变)
|
// color:params=>color[params.dataIndex],//定义每根柱子的不同颜色(不渐变)
|
||||||
|
@ -513,7 +516,8 @@ export default {
|
||||||
{
|
{
|
||||||
name: "存案",
|
name: "存案",
|
||||||
type: "bar",
|
type: "bar",
|
||||||
data: [12, 40, 20, 10],
|
// data: [12, 40, 20, 10],
|
||||||
|
data: [12, 40, 0, 0],
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
//定义柱子的样式
|
//定义柱子的样式
|
||||||
// color:params=>color[params.dataIndex],//定义每根柱子的不同颜色(不渐变)
|
// color:params=>color[params.dataIndex],//定义每根柱子的不同颜色(不渐变)
|
||||||
|
|
|
@ -301,6 +301,9 @@ export default {
|
||||||
},
|
},
|
||||||
], //设备用能数据
|
], //设备用能数据
|
||||||
equipmentBtnList: [
|
equipmentBtnList: [
|
||||||
|
{
|
||||||
|
name: "热回收空调",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "电梯系统",
|
name: "电梯系统",
|
||||||
},
|
},
|
||||||
|
@ -313,40 +316,38 @@ export default {
|
||||||
{
|
{
|
||||||
name: "恒温恒湿空调",
|
name: "恒温恒湿空调",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "热回收空调",
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
equipmentBtnAc: "", //点击预警
|
equipmentBtnAc: "", //点击预警
|
||||||
warnList: [
|
warnList: [
|
||||||
{
|
// {
|
||||||
id: "1",
|
// id: "1",
|
||||||
icon: require("../assets/images/jieNengImg/warnRed.png"),
|
// icon: require("../assets/images/jieNengImg/warnRed.png"),
|
||||||
time: "2023年03月12日 15:45:10",
|
// time: "2023年03月12日 15:45:10",
|
||||||
case: "设备故障",
|
// case: "设备故障",
|
||||||
grade: "三级",
|
// grade: "三级",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: "2",
|
// id: "2",
|
||||||
icon: require("../assets/images/jieNengImg/warnBlue.png"),
|
// icon: require("../assets/images/jieNengImg/warnBlue.png"),
|
||||||
time: "2023年03月12日 15:45:10",
|
// time: "2023年03月12日 15:45:10",
|
||||||
case: "设备故障",
|
// case: "设备故障",
|
||||||
grade: "三级",
|
// grade: "三级",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: "3",
|
// id: "3",
|
||||||
icon: require("../assets/images/jieNengImg/warnWhite.png"),
|
// icon: require("../assets/images/jieNengImg/warnWhite.png"),
|
||||||
time: "2023年03月12日 15:45:10",
|
// time: "2023年03月12日 15:45:10",
|
||||||
case: "设备故障",
|
// case: "设备故障",
|
||||||
grade: "三级",
|
// grade: "三级",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: "4",
|
// id: "4",
|
||||||
icon: require("../assets/images/jieNengImg/warnRed.png"),
|
// icon: require("../assets/images/jieNengImg/warnRed.png"),
|
||||||
time: "2023年03月12日 15:45:10",
|
// time: "2023年03月12日 15:45:10",
|
||||||
case: "设备故障",
|
// case: "设备故障",
|
||||||
grade: "三级",
|
// grade: "三级",
|
||||||
},
|
// },
|
||||||
], //故障数组
|
], //故障数组
|
||||||
sunList: [
|
sunList: [
|
||||||
{
|
{
|
||||||
|
@ -396,9 +397,14 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getAllDevicesInfo();
|
this.getAllDevicesInfo();
|
||||||
window.setInterval(() => {
|
|
||||||
this.getAllDevicesInfo();
|
// setInterval(() => {
|
||||||
}, 10000);
|
|
||||||
|
// this.getAllDevicesInfo();
|
||||||
|
// }, 10000);
|
||||||
|
setTimeout(()=> {
|
||||||
|
this.getAllDevicesInfo();
|
||||||
|
}, 10000);
|
||||||
this.getMqttData()
|
this.getMqttData()
|
||||||
window.alarmSecondLevel= this.alarmSecondLevel
|
window.alarmSecondLevel= this.alarmSecondLevel
|
||||||
window.alarmThirdLevel= this.alarmThirdLevel
|
window.alarmThirdLevel= this.alarmThirdLevel
|
||||||
|
@ -448,7 +454,9 @@ export default {
|
||||||
};
|
};
|
||||||
getAreaList(dataList).then((res)=>{
|
getAreaList(dataList).then((res)=>{
|
||||||
this.calculateEcharts(res.data.data.child);
|
this.calculateEcharts(res.data.data.child);
|
||||||
})
|
}).catch(err => {
|
||||||
|
|
||||||
|
})
|
||||||
},
|
},
|
||||||
//获取能耗计量同比分析
|
//获取能耗计量同比分析
|
||||||
getYOY() {
|
getYOY() {
|
||||||
|
@ -463,7 +471,9 @@ export default {
|
||||||
//接口调用
|
//接口调用
|
||||||
getAreaList(dataList).then((res)=>{
|
getAreaList(dataList).then((res)=>{
|
||||||
this.calculateEchartsTwo(res.data.data.values);
|
this.calculateEchartsTwo(res.data.data.values);
|
||||||
})
|
}).catch(err => {
|
||||||
|
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// //mqtt订阅数据
|
// //mqtt订阅数据
|
||||||
// createMqtt() {
|
// createMqtt() {
|
||||||
|
@ -586,6 +596,7 @@ export default {
|
||||||
},
|
},
|
||||||
//获取所有设备信息
|
//获取所有设备信息
|
||||||
getAllDevicesInfo() {
|
getAllDevicesInfo() {
|
||||||
|
console.log("getAllDevices")
|
||||||
//调用接口数据
|
//调用接口数据
|
||||||
let allDevicesCode = [];
|
let allDevicesCode = [];
|
||||||
getAllDevices().then((res) => {
|
getAllDevices().then((res) => {
|
||||||
|
@ -599,7 +610,7 @@ export default {
|
||||||
);
|
);
|
||||||
res.data.dataResults.forEach((item, index) => {
|
res.data.dataResults.forEach((item, index) => {
|
||||||
allDevicesCode.push(item.metercode);
|
allDevicesCode.push(item.metercode);
|
||||||
});
|
})
|
||||||
getRealData({
|
getRealData({
|
||||||
metercodes: allDevicesCode,
|
metercodes: allDevicesCode,
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
|
@ -624,52 +635,67 @@ export default {
|
||||||
this.equipmentList1.push(this.equipmentList2.slice(i, i + 8));
|
this.equipmentList1.push(this.equipmentList2.slice(i, i + 8));
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
}).catch(err => {
|
||||||
});
|
|
||||||
|
});;
|
||||||
|
}).catch(err => {
|
||||||
|
|
||||||
|
});
|
||||||
},
|
},
|
||||||
//预警点击
|
//预警点击
|
||||||
changeWarn(index) {
|
changeWarn(index) {
|
||||||
this.equipmentBtnAc = index;
|
this.equipmentBtnAc = index;
|
||||||
if (index == 0) {
|
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 = {
|
let params = {
|
||||||
AlarmLevel: "",
|
AlarmLevel: "",
|
||||||
DeviceTypes: "热回收",
|
DeviceTypes: "热回收",
|
||||||
};
|
};
|
||||||
GetLevelAlarm(params).then((res) => {
|
GetLevelAlarm(params).then((res) => {
|
||||||
this.upWainData(res);
|
this.upWainData(res);
|
||||||
});
|
}).catch(err => {
|
||||||
|
|
||||||
|
});;
|
||||||
|
}
|
||||||
|
if (index == 1) {
|
||||||
|
let params = {
|
||||||
|
AlarmLevel: "",
|
||||||
|
DeviceTypes: "电梯",
|
||||||
|
};
|
||||||
|
GetLevelAlarm(params).then((res) => {
|
||||||
|
this.upWainData(res);
|
||||||
|
}).catch(err => {
|
||||||
|
|
||||||
|
});
|
||||||
|
} else if (index == 2) {
|
||||||
|
let params = {
|
||||||
|
AlarmLevel: "",
|
||||||
|
DeviceTypes: "光伏",
|
||||||
|
};
|
||||||
|
GetLevelAlarm(params).then((res) => {
|
||||||
|
this.upWainData(res);
|
||||||
|
}).catch(err => {
|
||||||
|
|
||||||
|
});
|
||||||
|
} else if (index == 3) {
|
||||||
|
let params = {
|
||||||
|
AlarmLevel: "",
|
||||||
|
DeviceTypes: "VRV",
|
||||||
|
};
|
||||||
|
GetLevelAlarm(params).then((res) => {
|
||||||
|
this.upWainData(res);
|
||||||
|
}).catch(err => {
|
||||||
|
|
||||||
|
});
|
||||||
|
} else if (index == 4) {
|
||||||
|
let params = {
|
||||||
|
AlarmLevel: "",
|
||||||
|
DeviceTypes: "恒温恒湿",
|
||||||
|
};
|
||||||
|
GetLevelAlarm(params).then((res) => {
|
||||||
|
this.upWainData(res);
|
||||||
|
}).catch(err => {
|
||||||
|
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//获取mqtt数据
|
//获取mqtt数据
|
||||||
|
|
|
@ -182,6 +182,37 @@
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="selectChange1">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="value1"
|
||||||
|
v-if= "yearShow"
|
||||||
|
align="right"
|
||||||
|
type="year"
|
||||||
|
value-format="yyyy"
|
||||||
|
placeholder="选择年"
|
||||||
|
@change="selectTime"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="value2"
|
||||||
|
v-if= "monthShow"
|
||||||
|
type="month"
|
||||||
|
value-format="yyyyMM"
|
||||||
|
placeholder="选择月"
|
||||||
|
@change="selectTimeMM"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="value3"
|
||||||
|
v-if= "dateShow"
|
||||||
|
type="date"
|
||||||
|
placeholder="选择日"
|
||||||
|
value-format="yyyyMMdd"
|
||||||
|
:picker-options="pickerOptions"
|
||||||
|
@change="selectTimeDD"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</div>
|
||||||
<div class="selectChange">
|
<div class="selectChange">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="selectValue"
|
v-model="selectValue"
|
||||||
|
@ -280,6 +311,30 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dateData: "", //日期选择
|
dateData: "", //日期选择
|
||||||
|
value1: '',
|
||||||
|
value2: '',
|
||||||
|
value3: '',
|
||||||
|
yearShow:true,
|
||||||
|
monthShow:false,
|
||||||
|
dateShow:false,
|
||||||
|
pickerOptions: {
|
||||||
|
disabledDate(time) {
|
||||||
|
return time.getTime() > Date.now();
|
||||||
|
},
|
||||||
|
shortcuts: [{
|
||||||
|
text: '今天',
|
||||||
|
onClick(picker) {
|
||||||
|
picker.$emit('pick', new Date());
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
text: '昨天',
|
||||||
|
onClick(picker) {
|
||||||
|
const date = new Date();
|
||||||
|
date.setTime(date.getTime() - 3600 * 1000 * 24);
|
||||||
|
picker.$emit('pick', date);
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
},
|
||||||
wisdomList: [
|
wisdomList: [
|
||||||
{
|
{
|
||||||
name: "空闲中",
|
name: "空闲中",
|
||||||
|
@ -343,6 +398,20 @@ export default {
|
||||||
cause: "<空调设备>发生事故",
|
cause: "<空调设备>发生事故",
|
||||||
risk: "三级",
|
risk: "三级",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: "4",
|
||||||
|
icon: require("../assets/images/warnOrange.png"),
|
||||||
|
time: "2023年03月18日 15:26:08",
|
||||||
|
cause: "<空调设备>发生事故",
|
||||||
|
risk: "三级",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "5",
|
||||||
|
icon: require("../assets/images/warnOrange.png"),
|
||||||
|
time: "2023年03月18日 15:26:08",
|
||||||
|
cause: "<空调设备>发生事故",
|
||||||
|
risk: "三级",
|
||||||
|
},
|
||||||
], //报警数组
|
], //报警数组
|
||||||
selectValue: {
|
selectValue: {
|
||||||
value: "79",
|
value: "79",
|
||||||
|
@ -359,19 +428,19 @@ export default {
|
||||||
value: "2",
|
value: "2",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
selectDate: "3",
|
selectDate: 1,
|
||||||
dateOptions: [
|
dateOptions: [
|
||||||
{
|
{
|
||||||
label: "年",
|
label: "年",
|
||||||
value: "3",
|
value: 3,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "月",
|
label: "月",
|
||||||
value: "2",
|
value: 2,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "日",
|
label: "日",
|
||||||
value: "1",
|
value: 1,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
cameraList: [
|
cameraList: [
|
||||||
|
@ -511,7 +580,78 @@ export default {
|
||||||
};
|
};
|
||||||
getHikvision(dataList).then((res) => {
|
getHikvision(dataList).then((res) => {
|
||||||
console.log(res, "=============");
|
console.log(res, "=============");
|
||||||
});
|
}).catch(err => {
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
selectTime(val){
|
||||||
|
if(val){
|
||||||
|
console.log("val",val)
|
||||||
|
this.value1 = val
|
||||||
|
let data = {
|
||||||
|
buildingId: this.selectValue.value, //建筑id
|
||||||
|
customerId: "12345678",
|
||||||
|
date: this.value1,
|
||||||
|
dateType: 1,
|
||||||
|
meterType: "1", //1.电,2.水
|
||||||
|
pbuildingId: this.selectValue.parentId, //建组父id
|
||||||
|
};
|
||||||
|
//接口获取区域
|
||||||
|
getAreaList(data).then((res) => {
|
||||||
|
this.energyEcharts(res.data.data);
|
||||||
|
}).catch(err => {
|
||||||
|
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
// this.filters.year = ""
|
||||||
|
// this.filters.month = ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selectTimeMM(val){
|
||||||
|
if(val){
|
||||||
|
console.log("val",val)
|
||||||
|
this.value2 = val
|
||||||
|
let data = {
|
||||||
|
buildingId: this.selectValue.value, //建筑id
|
||||||
|
customerId: "12345678",
|
||||||
|
date: this.value2,
|
||||||
|
dateType: 2,
|
||||||
|
meterType: "1", //1.电,2.水
|
||||||
|
pbuildingId: this.selectValue.parentId, //建组父id
|
||||||
|
};
|
||||||
|
//接口获取区域
|
||||||
|
getAreaList(data).then((res) => {
|
||||||
|
this.energyEcharts(res.data.data);
|
||||||
|
}).catch(err => {
|
||||||
|
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
// this.filters.year = ""
|
||||||
|
// this.filters.month = ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selectTimeDD(val){
|
||||||
|
if(val){
|
||||||
|
console.log("val",val)
|
||||||
|
this.value3 = val
|
||||||
|
let data = {
|
||||||
|
buildingId: this.selectValue.value, //建筑id
|
||||||
|
customerId: "12345678",
|
||||||
|
date: this.value3,
|
||||||
|
dateType: 3,
|
||||||
|
meterType: "1", //1.电,2.水
|
||||||
|
pbuildingId: this.selectValue.parentId, //建组父id
|
||||||
|
};
|
||||||
|
//接口获取区域
|
||||||
|
getAreaList(data).then((res) => {
|
||||||
|
this.energyEcharts(res.data.data);
|
||||||
|
}).catch(err => {
|
||||||
|
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
// this.filters.year = ""
|
||||||
|
// this.filters.month = ""
|
||||||
|
}
|
||||||
},
|
},
|
||||||
//缩小变焦
|
//缩小变焦
|
||||||
reduceZoom() {
|
reduceZoom() {
|
||||||
|
@ -527,7 +667,9 @@ export default {
|
||||||
};
|
};
|
||||||
getHikvision(dataList).then((res) => {
|
getHikvision(dataList).then((res) => {
|
||||||
console.log(res, "=============");
|
console.log(res, "=============");
|
||||||
});
|
}).catch(err => {
|
||||||
|
|
||||||
|
});
|
||||||
},
|
},
|
||||||
//获取视频流
|
//获取视频流
|
||||||
getCamera() {
|
getCamera() {
|
||||||
|
@ -555,7 +697,9 @@ export default {
|
||||||
// dataList.data.cameraIndexCode;
|
// dataList.data.cameraIndexCode;
|
||||||
this.cameraList[0].video =res.data.result.data.url;
|
this.cameraList[0].video =res.data.result.data.url;
|
||||||
console.log(this.cameraList[0].video,'视频地址');
|
console.log(this.cameraList[0].video,'视频地址');
|
||||||
});
|
}).catch(err => {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
let dataList1 = {
|
let dataList1 = {
|
||||||
path: pathUrl,
|
path: pathUrl,
|
||||||
|
@ -571,7 +715,9 @@ export default {
|
||||||
// "&code=" +
|
// "&code=" +
|
||||||
// dataList1.data.cameraIndexCode;
|
// dataList1.data.cameraIndexCode;
|
||||||
this.cameraList[1].video =res.data.result.data.url;
|
this.cameraList[1].video =res.data.result.data.url;
|
||||||
});
|
}).catch(err => {
|
||||||
|
|
||||||
|
});
|
||||||
let dataList2 = {
|
let dataList2 = {
|
||||||
path: pathUrl,
|
path: pathUrl,
|
||||||
data: {
|
data: {
|
||||||
|
@ -586,7 +732,9 @@ export default {
|
||||||
// "&code=" +
|
// "&code=" +
|
||||||
// dataList2.data.cameraIndexCode;
|
// dataList2.data.cameraIndexCode;
|
||||||
this.cameraList[2].video =res.data.result.data.url;
|
this.cameraList[2].video =res.data.result.data.url;
|
||||||
});
|
}).catch(err => {
|
||||||
|
|
||||||
|
});
|
||||||
let dataList3 = {
|
let dataList3 = {
|
||||||
path: pathUrl,
|
path: pathUrl,
|
||||||
data: {
|
data: {
|
||||||
|
@ -601,11 +749,14 @@ export default {
|
||||||
// "&code=" +
|
// "&code=" +
|
||||||
// dataList3.data.cameraIndexCode;
|
// dataList3.data.cameraIndexCode;
|
||||||
this.cameraList[3].video =res.data.result.data.url;
|
this.cameraList[3].video =res.data.result.data.url;
|
||||||
});
|
}).catch(err => {
|
||||||
|
|
||||||
|
});
|
||||||
},
|
},
|
||||||
//获取建筑Id
|
//获取建筑Id
|
||||||
getBuildingData() {
|
getBuildingData() {
|
||||||
getBuildinginfos().then((res) => {
|
getBuildinginfos().then((res) => {
|
||||||
|
console.log("res",res)
|
||||||
// 接口取值
|
// 接口取值
|
||||||
this.buildingList = res.data.dataResults;
|
this.buildingList = res.data.dataResults;
|
||||||
let buildArr = [];
|
let buildArr = [];
|
||||||
|
@ -627,41 +778,69 @@ export default {
|
||||||
parentId: this.buildingList[index].parentId,
|
parentId: this.buildingList[index].parentId,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
});
|
}).catch(err => {
|
||||||
|
|
||||||
|
});
|
||||||
},
|
},
|
||||||
//智慧节能选择时间
|
//智慧节能选择时间
|
||||||
|
// selectDataList(val) {
|
||||||
|
// let nowTime = "";
|
||||||
|
// if (val == 1) {
|
||||||
|
// nowTime = this.$moment().format("YYYYMMDD");
|
||||||
|
// } else if (val == 2) {
|
||||||
|
// nowTime = this.$moment().format("YYYYMM");
|
||||||
|
// } else {
|
||||||
|
// nowTime = this.$moment().format("YYYY");
|
||||||
|
// }
|
||||||
|
// let data = {
|
||||||
|
// buildingId: this.selectValue.value, //建筑id
|
||||||
|
// customerId: "12345678",
|
||||||
|
// date: nowTime,
|
||||||
|
// dateType: val,
|
||||||
|
// meterType: "1", //1.电,2.水
|
||||||
|
// pbuildingId: this.selectValue.parentId, //建组父id
|
||||||
|
// };
|
||||||
|
// //接口获取区域
|
||||||
|
// getAreaList(data).then((res) => {
|
||||||
|
// this.energyEcharts(res.data.data);
|
||||||
|
// }).catch(err => {
|
||||||
|
|
||||||
|
// });
|
||||||
|
// },
|
||||||
selectDataList(val) {
|
selectDataList(val) {
|
||||||
let nowTime = "";
|
this.selectDate = val
|
||||||
if (val == 1) {
|
if (val == 1) {
|
||||||
nowTime = this.$moment().format("YYYYMMDD");
|
this.dateShow = true
|
||||||
|
this.monthShow = false
|
||||||
|
this.yearShow = false
|
||||||
} else if (val == 2) {
|
} else if (val == 2) {
|
||||||
nowTime = this.$moment().format("YYYYMM");
|
this.monthShow = true
|
||||||
|
this.yearShow = false
|
||||||
|
this.dateShow = false
|
||||||
} else {
|
} else {
|
||||||
nowTime = this.$moment().format("YYYY");
|
this.yearShow = true
|
||||||
|
this.monthShow = false
|
||||||
|
this.dateShow = false
|
||||||
}
|
}
|
||||||
let data = {
|
|
||||||
buildingId: this.selectValue.value, //建筑id
|
|
||||||
customerId: "12345678",
|
|
||||||
date: nowTime,
|
|
||||||
dateType: val,
|
|
||||||
meterType: "1", //1.电,2.水
|
|
||||||
pbuildingId: this.selectValue.parentId, //建组父id
|
|
||||||
};
|
|
||||||
//接口获取区域
|
|
||||||
getAreaList(data).then((res) => {
|
|
||||||
this.energyEcharts(res.data.data);
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
//智慧节能选择类型
|
//智慧节能选择类型
|
||||||
selectMeterType(event) {
|
selectMeterType(event) {
|
||||||
let nowTime = "";
|
let nowTime = "";
|
||||||
|
console.log("selectDate",this.selectDate)
|
||||||
if (this.selectDate == 1) {
|
if (this.selectDate == 1) {
|
||||||
nowTime = this.$moment().format("YYYYMMDD");
|
// nowTime = this.$moment().format("YYYYMMDD");
|
||||||
|
nowTime = this.value1
|
||||||
} else if (this.selectDate == 2) {
|
} else if (this.selectDate == 2) {
|
||||||
nowTime = this.$moment().format("YYYYMM");
|
// nowTime = this.$moment().format("YYYYMM");
|
||||||
} else {
|
nowTime = this.value2
|
||||||
nowTime = this.$moment().format("YYYY");
|
} else if (this.selectDate == 3){
|
||||||
|
// nowTime = this.$moment().format("YYYY");
|
||||||
|
nowTime = this.value3
|
||||||
}
|
}
|
||||||
|
console.log("this.value1",this.value1)
|
||||||
|
console.log("this.value2",this.value2)
|
||||||
|
console.log("this.value3",this.value3)
|
||||||
|
console.log("nowTime",nowTime)
|
||||||
let data = {
|
let data = {
|
||||||
buildingId: event.value, //建筑id
|
buildingId: event.value, //建筑id
|
||||||
customerId: "12345678",
|
customerId: "12345678",
|
||||||
|
@ -674,7 +853,9 @@ export default {
|
||||||
getAreaList(data).then((res) => {
|
getAreaList(data).then((res) => {
|
||||||
console.log(res.data.data, "sssssssssssssss");
|
console.log(res.data.data, "sssssssssssssss");
|
||||||
this.energyEcharts(res.data.data);
|
this.energyEcharts(res.data.data);
|
||||||
});
|
}).catch(err => {
|
||||||
|
|
||||||
|
});
|
||||||
},
|
},
|
||||||
//选中图片
|
//选中图片
|
||||||
changeCamera(path) {
|
changeCamera(path) {
|
||||||
|
@ -703,7 +884,9 @@ export default {
|
||||||
};
|
};
|
||||||
GetLevelAlarm(params).then((res) => {
|
GetLevelAlarm(params).then((res) => {
|
||||||
this.upWainData(res.data.data);
|
this.upWainData(res.data.data);
|
||||||
});
|
}).catch(err => {
|
||||||
|
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
let params = {
|
let params = {
|
||||||
AlarmLevel: "",
|
AlarmLevel: "",
|
||||||
|
@ -711,7 +894,9 @@ export default {
|
||||||
};
|
};
|
||||||
GetLevelAlarm(params).then((res) => {
|
GetLevelAlarm(params).then((res) => {
|
||||||
this.upWainData(res.data.data);
|
this.upWainData(res.data.data);
|
||||||
});
|
}).catch(err => {
|
||||||
|
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//更新报警信息
|
//更新报警信息
|
||||||
|
@ -1031,7 +1216,9 @@ export default {
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
myChart.setOption(option);
|
myChart.setOption(option);
|
||||||
});
|
}).catch(err => {
|
||||||
|
|
||||||
|
});
|
||||||
},
|
},
|
||||||
maintenanceLeft() {
|
maintenanceLeft() {
|
||||||
var myChart = this.$echarts.init(
|
var myChart = this.$echarts.init(
|
||||||
|
@ -1570,7 +1757,8 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.leftThree {
|
.leftThree {
|
||||||
height: 48%;
|
// height: 48%;
|
||||||
|
height: 52%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
.warnListTitle {
|
.warnListTitle {
|
||||||
height: 6%;
|
height: 6%;
|
||||||
|
@ -1630,7 +1818,8 @@ export default {
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
.warnListContent {
|
.warnListContent {
|
||||||
height: 27%;
|
// height: 27%;
|
||||||
|
height: 25%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border: 1px dashed #fff;
|
border: 1px dashed #fff;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
@ -1775,7 +1964,7 @@ export default {
|
||||||
height: 10%;
|
height: 10%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 22%;
|
top: 22%;
|
||||||
right: 35%;
|
right: 60%;
|
||||||
/deep/ .el-select {
|
/deep/ .el-select {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
@ -1808,6 +1997,58 @@ export default {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.selectChange1 {
|
||||||
|
width: 23%;
|
||||||
|
height: 10%;
|
||||||
|
position: absolute;
|
||||||
|
top: 22%;
|
||||||
|
right: 35%;
|
||||||
|
/deep/ .el-date-editor.el-input, .el-date-editor.el-input__inner {
|
||||||
|
width: 134px;
|
||||||
|
}
|
||||||
|
/deep/ .el-select {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
border-radius: 15px;
|
||||||
|
}
|
||||||
|
/deep/ .el-input__inner {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: transparent;
|
||||||
|
border: 1px solid rgb(1, 176, 202);
|
||||||
|
border-radius: 15px;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
/deep/ .el-select-dropdown {
|
||||||
|
background: transparent;
|
||||||
|
border: 1px solid rgb(1, 176, 202);
|
||||||
|
border-radius: 5px;
|
||||||
|
// left: -30px !important;
|
||||||
|
}
|
||||||
|
/deep/ .el-select-dropdown__item {
|
||||||
|
color: turquoise;
|
||||||
|
}
|
||||||
|
/deep/ .el-select .el-input .el-select__caret {
|
||||||
|
color: rgb(1, 176, 202);
|
||||||
|
font-size: 0.3rem;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
/deep/ .el-input__suffix {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
/deep/ .el-input__icon {
|
||||||
|
height: 100%;
|
||||||
|
width: 25px;
|
||||||
|
text-align: center;
|
||||||
|
-webkit-transition: all .3s;
|
||||||
|
transition: all .3s;
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
/deep/ .el-input--suffix .el-input__inner {
|
||||||
|
padding-right: 18px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.rightThree {
|
.rightThree {
|
||||||
height: 34%;
|
height: 34%;
|
||||||
|
|
|
@ -208,15 +208,15 @@ export default {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "摄像头总数",
|
name: "摄像头总数",
|
||||||
count: "609",
|
count: "0",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "摄像头在线数量",
|
name: "摄像头在线数量",
|
||||||
count: "602",
|
count: "0",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "摄像头离线数量",
|
name: "摄像头离线数量",
|
||||||
count: "7",
|
count: "0",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "摄像头报警数",
|
name: "摄像头报警数",
|
||||||
|
@ -237,15 +237,15 @@ export default {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "门禁总数",
|
name: "门禁总数",
|
||||||
count: "609",
|
count: "0",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "门禁在线数量",
|
name: "门禁在线数量",
|
||||||
count: "602",
|
count: "0",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "门禁离线数量",
|
name: "门禁离线数量",
|
||||||
count: "7",
|
count: "0",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "门禁今日报警数",
|
name: "门禁今日报警数",
|
||||||
|
@ -281,60 +281,60 @@ export default {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
fireWarnList: [
|
fireWarnList: [
|
||||||
{
|
// {
|
||||||
icon: require("../assets/images/jieNengImg/warnBlue.png"),
|
// icon: require("../assets/images/jieNengImg/warnBlue.png"),
|
||||||
time: "2023年03月12日 15:45:10",
|
// time: "2023年03月12日 15:45:10",
|
||||||
position: "烟感",
|
// position: "烟感",
|
||||||
status: "已解除",
|
// status: "已解除",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
icon: require("../assets/images/jieNengImg/warnBlue.png"),
|
// icon: require("../assets/images/jieNengImg/warnBlue.png"),
|
||||||
time: "2023年03月12日 15:45:10",
|
// time: "2023年03月12日 15:45:10",
|
||||||
position: "烟感",
|
// position: "烟感",
|
||||||
status: "已解除",
|
// status: "已解除",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
icon: require("../assets/images/jieNengImg/warnWhite.png"),
|
// icon: require("../assets/images/jieNengImg/warnWhite.png"),
|
||||||
time: "2023年03月12日 15:45:10",
|
// time: "2023年03月12日 15:45:10",
|
||||||
position: "烟感",
|
// position: "烟感",
|
||||||
status: "已解除",
|
// status: "已解除",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
icon: require("../assets/images/jieNengImg/warnBlue.png"),
|
// icon: require("../assets/images/jieNengImg/warnBlue.png"),
|
||||||
time: "2023年03月12日 15:45:10",
|
// time: "2023年03月12日 15:45:10",
|
||||||
position: "烟感",
|
// position: "烟感",
|
||||||
status: "已解除",
|
// status: "已解除",
|
||||||
},
|
// },
|
||||||
], //故障数组
|
], //故障数组
|
||||||
policeList: [
|
policeList: [
|
||||||
{
|
// {
|
||||||
id: "1",
|
// id: "1",
|
||||||
icon: require("../assets/images/anFang/exclamatory.png"),
|
// icon: require("../assets/images/anFang/exclamatory.png"),
|
||||||
time: "2023年03月12日 15:45:10",
|
// time: "2023年03月12日 15:45:10",
|
||||||
position: "306门禁故障",
|
// position: "306门禁故障",
|
||||||
status: "已解除",
|
// status: "已解除",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: "2",
|
// id: "2",
|
||||||
icon: require("../assets/images/anFang/exclamatory.png"),
|
// icon: require("../assets/images/anFang/exclamatory.png"),
|
||||||
time: "2023年03月12日 15:45:10",
|
// time: "2023年03月12日 15:45:10",
|
||||||
position: "201门禁故障",
|
// position: "201门禁故障",
|
||||||
status: "已解除",
|
// status: "已解除",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: "3",
|
// id: "3",
|
||||||
icon: require("../assets/images/anFang/exclamatory.png"),
|
// icon: require("../assets/images/anFang/exclamatory.png"),
|
||||||
time: "2023年03月12日 15:45:10",
|
// time: "2023年03月12日 15:45:10",
|
||||||
position: "206门禁故障",
|
// position: "206门禁故障",
|
||||||
status: "已解除",
|
// status: "已解除",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: "4",
|
// id: "4",
|
||||||
icon: require("../assets/images/anFang/exclamatory.png"),
|
// icon: require("../assets/images/anFang/exclamatory.png"),
|
||||||
time: "2023年03月12日 15:45:10",
|
// time: "2023年03月12日 15:45:10",
|
||||||
position: "106门禁故障",
|
// position: "106门禁故障",
|
||||||
status: "已解除",
|
// status: "已解除",
|
||||||
},
|
// },
|
||||||
],
|
],
|
||||||
alarmFirstLevel: [],
|
alarmFirstLevel: [],
|
||||||
alarmSecondLevel: [],
|
alarmSecondLevel: [],
|
||||||
|
@ -342,6 +342,66 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
window['getWarning'] = (name) => {
|
||||||
|
// alert("goPage:"+b);
|
||||||
|
// console.log("name",name)
|
||||||
|
if (name.indexOf("法院一层") != -1 ) {
|
||||||
|
if (name.indexOf("走道") != -1 || name.indexOf("大厅") != -1|| name.indexOf("楼梯") != -1|| name.indexOf("自助立案") != -1|| name.indexOf("门厅") != -1|| name.indexOf("展厅") != -1) {
|
||||||
|
console.log("消防联动,主楼一层,公共区");
|
||||||
|
}else{
|
||||||
|
console.log("消防联动,主楼一层,办公区");
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if(name.indexOf("法院四层") != -1) {
|
||||||
|
if (name.indexOf("走道") != -1 || name.indexOf("大厅") != -1|| name.indexOf("楼梯") != -1|| name.indexOf("自助立案") != -1) {
|
||||||
|
console.log("消防联动,主楼四层,公共区");
|
||||||
|
}else{
|
||||||
|
console.log("消防联动,主楼四层,办公区");
|
||||||
|
}
|
||||||
|
}else if(name.indexOf("法院二层") != -1) {
|
||||||
|
//console.log("消防联动 主楼二层");
|
||||||
|
if (name.indexOf("走道") != -1 || name.indexOf("大厅") != -1|| name.indexOf("楼梯") != -1|| name.indexOf("自助立案") != -1) {
|
||||||
|
console.log("消防联动,主楼二层,公共区");
|
||||||
|
}else{
|
||||||
|
console.log("消防联动,主楼二层,办公区");
|
||||||
|
}
|
||||||
|
}else if(name.indexOf("法院三层") != -1) {
|
||||||
|
// console.log("消防联动 主楼三层");
|
||||||
|
if (name.indexOf("走道") != -1 || name.indexOf("大厅") != -1|| name.indexOf("楼梯") != -1|| name.indexOf("自助立案") != -1) {
|
||||||
|
console.log("消防联动,主楼三层,公共区");
|
||||||
|
}else{
|
||||||
|
console.log("消防联动,主楼三层,办公区");
|
||||||
|
}
|
||||||
|
}else if(name.indexOf("辅楼1层") != -1) {
|
||||||
|
// console.log("消防联动 辅楼一层");
|
||||||
|
if (name.indexOf("走道") != -1 || name.indexOf("大厅") != -1|| name.indexOf("楼梯") != -1|| name.indexOf("自助立案") != -1) {
|
||||||
|
console.log("消防联动,辅楼一层,公共区");
|
||||||
|
}else{
|
||||||
|
console.log("消防联动,辅楼一层,办公区");
|
||||||
|
}
|
||||||
|
}else if(name.indexOf("辅楼2层") != -1) {
|
||||||
|
// console.log("消防联动 辅楼二层");
|
||||||
|
if (name.indexOf("走道") != -1 || name.indexOf("大厅") != -1|| name.indexOf("楼梯") != -1) {
|
||||||
|
console.log("消防联动,辅楼二层,公共区");
|
||||||
|
}else{
|
||||||
|
console.log("消防联动,辅楼二层,办公区");
|
||||||
|
}
|
||||||
|
}else if(name.indexOf("辅楼3层") != -1) {
|
||||||
|
//console.log("消防联动 辅楼三层");
|
||||||
|
if (name.indexOf("走道") != -1 || name.indexOf("大厅") != -1|| name.indexOf("楼梯") != -1|| name.indexOf("电梯") != -1) {
|
||||||
|
console.log("消防联动,辅楼三层,公共区");
|
||||||
|
}else{
|
||||||
|
console.log("消防联动,辅楼三层,办公区");
|
||||||
|
}
|
||||||
|
}else if(name.indexOf("辅楼4层") != -1) {
|
||||||
|
//console.log("消防联动 辅楼四层");
|
||||||
|
if (name.indexOf("走道") != -1 || name.indexOf("大厅") != -1|| name.indexOf("楼梯") != -1|| name.indexOf("电梯") != -1) {
|
||||||
|
console.log("消防联动,辅楼四层,公共区");
|
||||||
|
}else{
|
||||||
|
console.log("消防联动,辅楼四层,办公区");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
this.getAnfang();
|
this.getAnfang();
|
||||||
//获取消防告警
|
//获取消防告警
|
||||||
this.getPoliceList();
|
this.getPoliceList();
|
||||||
|
@ -356,6 +416,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
|
|
||||||
alarmFirstLevel(val) {
|
alarmFirstLevel(val) {
|
||||||
// 为了避免频繁触发resize函数导致页面卡顿,使用定时器
|
// 为了避免频繁触发resize函数导致页面卡顿,使用定时器
|
||||||
console.log("alarmFirstLevel", val);
|
console.log("alarmFirstLevel", val);
|
||||||
|
@ -374,27 +435,27 @@ export default {
|
||||||
this.upmqttData(val);
|
this.upmqttData(val);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
// watch: {
|
||||||
alarmFirstLevel(val) {
|
// alarmFirstLevel(val) {
|
||||||
|
|
||||||
// 为了避免频繁触发resize函数导致页面卡顿,使用定时器
|
// // 为了避免频繁触发resize函数导致页面卡顿,使用定时器
|
||||||
console.log("alarmFirstLevel",val)
|
// console.log("alarmFirstLevel",val)
|
||||||
if(val.length!=0){
|
// if(val.length!=0){
|
||||||
this.upmqttData(val)
|
// this.upmqttData(val)
|
||||||
}
|
// }
|
||||||
|
|
||||||
},
|
// },
|
||||||
alarmSecondLevel(val) {
|
// alarmSecondLevel(val) {
|
||||||
// 为了避免频繁触发resize函数导致页面卡顿,使用定时器
|
// // 为了避免频繁触发resize函数导致页面卡顿,使用定时器
|
||||||
console.log("alarmSecondLevel",val)
|
// console.log("alarmSecondLevel",val)
|
||||||
this.upmqttData(val)
|
// this.upmqttData(val)
|
||||||
},
|
// },
|
||||||
alarmThirdLevel(val) {
|
// alarmThirdLevel(val) {
|
||||||
// 为了避免频繁触发resize函数导致页面卡顿,使用定时器
|
// // 为了避免频繁触发resize函数导致页面卡顿,使用定时器
|
||||||
console.log("alarmThirdLevel",val)
|
// console.log("alarmThirdLevel",val)
|
||||||
this.upmqttData(val)
|
// this.upmqttData(val)
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
methods: {
|
methods: {
|
||||||
//获取昨天今天的报警数量
|
//获取昨天今天的报警数量
|
||||||
getAlarmCount() {
|
getAlarmCount() {
|
||||||
|
@ -405,7 +466,9 @@ export default {
|
||||||
this.securityList[1].security[4].count = res.data.data.DoorTodayCount;
|
this.securityList[1].security[4].count = res.data.data.DoorTodayCount;
|
||||||
this.securityList[1].security[5].count =
|
this.securityList[1].security[5].count =
|
||||||
res.data.data.DoorYesterdayCount;
|
res.data.data.DoorYesterdayCount;
|
||||||
});
|
}).catch(err => {
|
||||||
|
|
||||||
|
});
|
||||||
},
|
},
|
||||||
//获取设备离线在线数据
|
//获取设备离线在线数据
|
||||||
|
|
||||||
|
@ -482,8 +545,12 @@ export default {
|
||||||
this.securityList[1].security[3].count = offLineList.length;
|
this.securityList[1].security[3].count = offLineList.length;
|
||||||
//门禁在线数数量
|
//门禁在线数数量
|
||||||
this.securityList[1].security[2].count = this.securityList[1].security[1].count - this.securityList[1].security[3].count;
|
this.securityList[1].security[2].count = this.securityList[1].security[1].count - this.securityList[1].security[3].count;
|
||||||
});
|
}).catch(err => {
|
||||||
});
|
|
||||||
|
});
|
||||||
|
}).catch(err => {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
//获取视频状态
|
//获取视频状态
|
||||||
let cameraList = {
|
let cameraList = {
|
||||||
|
@ -527,7 +594,9 @@ export default {
|
||||||
//门禁在线数数量
|
//门禁在线数数量
|
||||||
this.securityList[0].security[2].count = this.securityList[0].security[1].count - this.securityList[0].security[3].count;
|
this.securityList[0].security[2].count = this.securityList[0].security[1].count - this.securityList[0].security[3].count;
|
||||||
});
|
});
|
||||||
});
|
}).catch(err => {
|
||||||
|
|
||||||
|
});
|
||||||
},
|
},
|
||||||
videoChange(index) {
|
videoChange(index) {
|
||||||
this.warnCameraList.forEach((item, i) => {
|
this.warnCameraList.forEach((item, i) => {
|
||||||
|
@ -567,7 +636,9 @@ export default {
|
||||||
AlarmLevel: res.data.data[index].AlarmLevel,
|
AlarmLevel: res.data.data[index].AlarmLevel,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
});
|
}).catch(err => {
|
||||||
|
|
||||||
|
});
|
||||||
},
|
},
|
||||||
//获取安防报警、
|
//获取安防报警、
|
||||||
getPoliceList() {
|
getPoliceList() {
|
||||||
|
@ -597,7 +668,9 @@ export default {
|
||||||
AlarmLevel: res.data.data[index].AlarmLevel,
|
AlarmLevel: res.data.data[index].AlarmLevel,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
});
|
}).catch(err => {
|
||||||
|
|
||||||
|
});
|
||||||
},
|
},
|
||||||
//获取mqtt数据
|
//获取mqtt数据
|
||||||
upmqttData(val) {
|
upmqttData(val) {
|
||||||
|
@ -642,25 +715,8 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getWarning(name) {
|
getWarning:function(name){
|
||||||
// console.log("name",name)
|
getWarning(name)
|
||||||
if (name.indexOf("法院一层") != -1) {
|
|
||||||
console.log("消防联动 主楼一层");
|
|
||||||
} else if(name.indexOf("法院四层") != -1) {
|
|
||||||
console.log("消防联动 主楼四层");
|
|
||||||
}else if(name.indexOf("法院二层") != -1) {
|
|
||||||
console.log("消防联动 主楼二层");
|
|
||||||
}else if(name.indexOf("法院三层") != -1) {
|
|
||||||
console.log("消防联动 主楼三层");
|
|
||||||
}else if(name.indexOf("辅楼1层") != -1) {
|
|
||||||
console.log("消防联动 辅楼一层");
|
|
||||||
}else if(name.indexOf("辅楼2层") != -1) {
|
|
||||||
console.log("消防联动 辅楼二层");
|
|
||||||
}else if(name.indexOf("辅楼3层") != -1) {
|
|
||||||
console.log("消防联动 辅楼三层");
|
|
||||||
}else if(name.indexOf("辅楼4层") != -1) {
|
|
||||||
console.log("消防联动 辅楼四层");
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
components: {},
|
components: {},
|
||||||
|
|
Loading…
Reference in New Issue