This commit is contained in:
chengdandan 2023-05-16 09:26:28 +08:00
parent 355d666d55
commit 308b825869
7 changed files with 613 additions and 278 deletions

View File

@ -135,13 +135,26 @@ export default {
this.fun();
},
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);
let week = new Date(this.$moment().format("YYYY-MM-DD")).getDay();
this.week = this.weekList[week];
window.setInterval(() => {
setInterval(() => {
this.time = this.$moment().format("YYYY-MM-DD HH:mm:ss");
}, 100);
// window.setInterval(() => {
// this.time = this.$moment().format("YYYY-MM-DD HH:mm:ss");
// }, 100);
const that = this;
window.onresize = () => {
return () => {
@ -155,11 +168,15 @@ export default {
};
},
methods: {
goPage:function(name){
goPage(name)
},
// goIndex:function(){
// goIndex(e)
// },
//
menuChange(index, name) {
this.goPage(name);
this.menuAc = index;
this.menuBtn.forEach((item, index) => {
this.menuBtn.forEach((item, index) => {
if (index == 0) {
item.icon = require("./assets/images/shouYe.png");
} else if (index == 1) {
@ -175,27 +192,36 @@ export default {
}
});
if (index == 0) {
this.$router.push("/");
this.menuBtn[index].icon = require("./assets/images/shouYeAc.png");
this.$router.push("/");
} else if (index == 1) {
this.$router.push("court");
this.menuBtn[index].icon = require("./assets/images/faTingAc.png");
this.$router.push("court");
} else if (index == 2) {
this.$router.push("energySaving");
this.menuBtn[index].icon = require("./assets/images/jieNengAc.png");
this.$router.push("energySaving");
} else if (index == 3) {
this.menuBtn[index].icon = require("./assets/images/anFangAc.png");
this.$router.push("security");
this.menuBtn[index].icon = require("./assets/images/anFangAc.png");
} else if (index == 4) {
this.$router.push("operationMaintenance");
this.menuBtn[index].icon = require("./assets/images/yunWeiAc.png");
this.$router.push("operationMaintenance");
} else if (index == 5) {
this.menuBtn[index].icon = require("./assets/images/gaoJingAc.png");
this.$router.push("alarm");
this.menuBtn[index].icon = require("./assets/images/gaoJingAc.png");
}
},
goPage(name) {
console.log(name);
this.goPage(name);
// if (name!=""){
// this.goPage(name);
// }else{
// this.goIndex('');
// }
this.menuAc = index;
},
//
@ -244,7 +270,7 @@ export default {
#app {
// width: 6144px;
// height: 1920px;
background: rgba(1, 1, 7, 0);
background: rgba(1, 1, 7, 1);
// overflow: hidden;
.header {
height: 11%;

View File

@ -36,21 +36,8 @@ class mqttHandle {
// console.log("connectUrl",connectUrl)
const { host, port, endpoint, ...options } = this.connect;
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://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)
// }
// })
// }
const connectUrl = 'ws://138.227.208.100:1884/mqtt';
//const connectUrl = 'ws://172.16.1.253:1884/mqtt';
if (this.mqttClient == undefined) {
this.mqttClient = mqtt.connect(connectUrl, options);
this.mqttClient.on("connect", () => {
@ -64,17 +51,6 @@ class mqttHandle {
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;

View File

@ -195,7 +195,9 @@ export default {
risk: res.data.data[index].AlarmLevel,
};
});
});
}).catch(err => {
});
},
//
getSecondAlarm() {
@ -215,7 +217,9 @@ export default {
risk: res.data.data[index].AlarmLevel,
};
});
});
}).catch(err => {
});
},
//
getThirdAlarm() {
@ -235,7 +239,9 @@ export default {
risk: res.data.data[index].AlarmLevel,
};
});
});
}).catch(err => {
});
},
//mqtt
upmqttData(val) {

View File

@ -22,21 +22,7 @@
<div class="leftTwo">
<div class="caseTitle">案件统计</div>
<div class="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
<el-select
v-model="departmentValue"
:popper-append-to-body="false"
clearable
@ -51,6 +37,21 @@
>
</el-option>
</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 id="caseEcharts"></div>
</div>
@ -441,7 +442,8 @@ export default {
{
name: "收案",
type: "bar",
data: [22, 30, 50, 10],
// data: [22, 30, 50, 10],
data: [22, 30, 0, 0],
itemStyle: {
//
// color:params=>color[params.dataIndex],//()
@ -477,7 +479,8 @@ export default {
{
name: "结案",
type: "bar",
data: [20, 34, 20, 30],
// data: [20, 34, 20, 30],
data: [20, 34, 0, 0],
itemStyle: {
//
// color:params=>color[params.dataIndex],//()
@ -513,7 +516,8 @@ export default {
{
name: "存案",
type: "bar",
data: [12, 40, 20, 10],
// data: [12, 40, 20, 10],
data: [12, 40, 0, 0],
itemStyle: {
//
// color:params=>color[params.dataIndex],//()

View File

@ -301,6 +301,9 @@ export default {
},
], //
equipmentBtnList: [
{
name: "热回收空调",
},
{
name: "电梯系统",
},
@ -313,40 +316,38 @@ export default {
{
name: "恒温恒湿空调",
},
{
name: "热回收空调",
},
],
equipmentBtnAc: "", //
warnList: [
{
id: "1",
icon: require("../assets/images/jieNengImg/warnRed.png"),
time: "2023年03月12日 15:45:10",
case: "设备故障",
grade: "三级",
},
{
id: "2",
icon: require("../assets/images/jieNengImg/warnBlue.png"),
time: "2023年03月12日 15:45:10",
case: "设备故障",
grade: "三级",
},
{
id: "3",
icon: require("../assets/images/jieNengImg/warnWhite.png"),
time: "2023年03月12日 15:45:10",
case: "设备故障",
grade: "三级",
},
{
id: "4",
icon: require("../assets/images/jieNengImg/warnRed.png"),
time: "2023年03月12日 15:45:10",
case: "设备故障",
grade: "三级",
},
// {
// id: "1",
// icon: require("../assets/images/jieNengImg/warnRed.png"),
// time: "20230312 15:45:10",
// case: "",
// grade: "",
// },
// {
// id: "2",
// icon: require("../assets/images/jieNengImg/warnBlue.png"),
// time: "20230312 15:45:10",
// case: "",
// grade: "",
// },
// {
// id: "3",
// icon: require("../assets/images/jieNengImg/warnWhite.png"),
// time: "20230312 15:45:10",
// case: "",
// grade: "",
// },
// {
// id: "4",
// icon: require("../assets/images/jieNengImg/warnRed.png"),
// time: "20230312 15:45:10",
// case: "",
// grade: "",
// },
], //
sunList: [
{
@ -396,9 +397,14 @@ export default {
},
mounted() {
this.getAllDevicesInfo();
window.setInterval(() => {
this.getAllDevicesInfo();
}, 10000);
// setInterval(() => {
// this.getAllDevicesInfo();
// }, 10000);
setTimeout(()=> {
this.getAllDevicesInfo();
}, 10000);
this.getMqttData()
window.alarmSecondLevel= this.alarmSecondLevel
window.alarmThirdLevel= this.alarmThirdLevel
@ -448,7 +454,9 @@ export default {
};
getAreaList(dataList).then((res)=>{
this.calculateEcharts(res.data.data.child);
})
}).catch(err => {
})
},
//
getYOY() {
@ -463,7 +471,9 @@ export default {
//
getAreaList(dataList).then((res)=>{
this.calculateEchartsTwo(res.data.data.values);
})
}).catch(err => {
})
},
// //mqtt
// createMqtt() {
@ -586,6 +596,7 @@ export default {
},
//
getAllDevicesInfo() {
console.log("getAllDevices")
//
let allDevicesCode = [];
getAllDevices().then((res) => {
@ -599,7 +610,7 @@ export default {
);
res.data.dataResults.forEach((item, index) => {
allDevicesCode.push(item.metercode);
});
})
getRealData({
metercodes: allDevicesCode,
}).then((response) => {
@ -624,52 +635,67 @@ export default {
this.equipmentList1.push(this.equipmentList2.slice(i, i + 8));
}
});
});
}).catch(err => {
});;
}).catch(err => {
});
},
//
changeWarn(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) {
if (index == 0) {
let params = {
AlarmLevel: "",
DeviceTypes: "热回收",
};
GetLevelAlarm(params).then((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

View File

@ -182,6 +182,37 @@
</el-option>
</el-select>
</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">
<el-select
v-model="selectValue"
@ -280,6 +311,30 @@ export default {
data() {
return {
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: [
{
name: "空闲中",
@ -343,6 +398,20 @@ export default {
cause: "<空调设备>发生事故",
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: {
value: "79",
@ -359,19 +428,19 @@ export default {
value: "2",
},
],
selectDate: "3",
selectDate: 1,
dateOptions: [
{
label: "年",
value: "3",
value: 3,
},
{
label: "月",
value: "2",
value: 2,
},
{
label: "日",
value: "1",
value: 1,
},
],
cameraList: [
@ -511,7 +580,78 @@ export default {
};
getHikvision(dataList).then((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() {
@ -527,7 +667,9 @@ export default {
};
getHikvision(dataList).then((res) => {
console.log(res, "=============");
});
}).catch(err => {
});
},
//
getCamera() {
@ -555,7 +697,9 @@ export default {
// dataList.data.cameraIndexCode;
this.cameraList[0].video =res.data.result.data.url;
console.log(this.cameraList[0].video,'视频地址');
});
}).catch(err => {
});
let dataList1 = {
path: pathUrl,
@ -571,7 +715,9 @@ export default {
// "&code=" +
// dataList1.data.cameraIndexCode;
this.cameraList[1].video =res.data.result.data.url;
});
}).catch(err => {
});
let dataList2 = {
path: pathUrl,
data: {
@ -586,7 +732,9 @@ export default {
// "&code=" +
// dataList2.data.cameraIndexCode;
this.cameraList[2].video =res.data.result.data.url;
});
}).catch(err => {
});
let dataList3 = {
path: pathUrl,
data: {
@ -601,11 +749,14 @@ export default {
// "&code=" +
// dataList3.data.cameraIndexCode;
this.cameraList[3].video =res.data.result.data.url;
});
}).catch(err => {
});
},
//Id
getBuildingData() {
getBuildinginfos().then((res) => {
console.log("res",res)
//
this.buildingList = res.data.dataResults;
let buildArr = [];
@ -627,41 +778,69 @@ export default {
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) {
let nowTime = "";
if (val == 1) {
nowTime = this.$moment().format("YYYYMMDD");
this.selectDate = val
if (val == 1) {
this.dateShow = true
this.monthShow = false
this.yearShow = false
} else if (val == 2) {
nowTime = this.$moment().format("YYYYMM");
this.monthShow = true
this.yearShow = false
this.dateShow = false
} 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) {
let nowTime = "";
console.log("selectDate",this.selectDate)
if (this.selectDate == 1) {
nowTime = this.$moment().format("YYYYMMDD");
// nowTime = this.$moment().format("YYYYMMDD");
nowTime = this.value1
} else if (this.selectDate == 2) {
nowTime = this.$moment().format("YYYYMM");
} else {
nowTime = this.$moment().format("YYYY");
// nowTime = this.$moment().format("YYYYMM");
nowTime = this.value2
} 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 = {
buildingId: event.value, //id
customerId: "12345678",
@ -674,7 +853,9 @@ export default {
getAreaList(data).then((res) => {
console.log(res.data.data, "sssssssssssssss");
this.energyEcharts(res.data.data);
});
}).catch(err => {
});
},
//
changeCamera(path) {
@ -703,7 +884,9 @@ export default {
};
GetLevelAlarm(params).then((res) => {
this.upWainData(res.data.data);
});
}).catch(err => {
});
} else {
let params = {
AlarmLevel: "",
@ -711,7 +894,9 @@ export default {
};
GetLevelAlarm(params).then((res) => {
this.upWainData(res.data.data);
});
}).catch(err => {
});
}
},
//
@ -1031,7 +1216,9 @@ export default {
],
};
myChart.setOption(option);
});
}).catch(err => {
});
},
maintenanceLeft() {
var myChart = this.$echarts.init(
@ -1570,7 +1757,8 @@ export default {
}
}
.leftThree {
height: 48%;
// height: 48%;
height: 52%;
width: 100%;
.warnListTitle {
height: 6%;
@ -1630,7 +1818,8 @@ export default {
background-size: 100% 100%;
overflow: auto;
.warnListContent {
height: 27%;
// height: 27%;
height: 25%;
width: 100%;
border: 1px dashed #fff;
color: #fff;
@ -1775,7 +1964,7 @@ export default {
height: 10%;
position: absolute;
top: 22%;
right: 35%;
right: 60%;
/deep/ .el-select {
width: 100%;
height: 100%;
@ -1808,6 +1997,58 @@ export default {
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 {
height: 34%;

View File

@ -208,15 +208,15 @@ export default {
},
{
name: "摄像头总数",
count: "609",
count: "0",
},
{
name: "摄像头在线数量",
count: "602",
count: "0",
},
{
name: "摄像头离线数量",
count: "7",
count: "0",
},
{
name: "摄像头报警数",
@ -237,15 +237,15 @@ export default {
},
{
name: "门禁总数",
count: "609",
count: "0",
},
{
name: "门禁在线数量",
count: "602",
count: "0",
},
{
name: "门禁离线数量",
count: "7",
count: "0",
},
{
name: "门禁今日报警数",
@ -281,60 +281,60 @@ export default {
},
],
fireWarnList: [
{
icon: require("../assets/images/jieNengImg/warnBlue.png"),
time: "2023年03月12日 15:45:10",
position: "烟感",
status: "已解除",
},
{
icon: require("../assets/images/jieNengImg/warnBlue.png"),
time: "2023年03月12日 15:45:10",
position: "烟感",
status: "已解除",
},
{
icon: require("../assets/images/jieNengImg/warnWhite.png"),
time: "2023年03月12日 15:45:10",
position: "烟感",
status: "已解除",
},
{
icon: require("../assets/images/jieNengImg/warnBlue.png"),
time: "2023年03月12日 15:45:10",
position: "烟感",
status: "已解除",
},
// {
// icon: require("../assets/images/jieNengImg/warnBlue.png"),
// time: "20230312 15:45:10",
// position: "",
// status: "",
// },
// {
// icon: require("../assets/images/jieNengImg/warnBlue.png"),
// time: "20230312 15:45:10",
// position: "",
// status: "",
// },
// {
// icon: require("../assets/images/jieNengImg/warnWhite.png"),
// time: "20230312 15:45:10",
// position: "",
// status: "",
// },
// {
// icon: require("../assets/images/jieNengImg/warnBlue.png"),
// time: "20230312 15:45:10",
// position: "",
// status: "",
// },
], //
policeList: [
{
id: "1",
icon: require("../assets/images/anFang/exclamatory.png"),
time: "2023年03月12日 15:45:10",
position: "306门禁故障",
status: "已解除",
},
{
id: "2",
icon: require("../assets/images/anFang/exclamatory.png"),
time: "2023年03月12日 15:45:10",
position: "201门禁故障",
status: "已解除",
},
{
id: "3",
icon: require("../assets/images/anFang/exclamatory.png"),
time: "2023年03月12日 15:45:10",
position: "206门禁故障",
status: "已解除",
},
{
id: "4",
icon: require("../assets/images/anFang/exclamatory.png"),
time: "2023年03月12日 15:45:10",
position: "106门禁故障",
status: "已解除",
},
// {
// id: "1",
// icon: require("../assets/images/anFang/exclamatory.png"),
// time: "20230312 15:45:10",
// position: "306",
// status: "",
// },
// {
// id: "2",
// icon: require("../assets/images/anFang/exclamatory.png"),
// time: "20230312 15:45:10",
// position: "201",
// status: "",
// },
// {
// id: "3",
// icon: require("../assets/images/anFang/exclamatory.png"),
// time: "20230312 15:45:10",
// position: "206",
// status: "",
// },
// {
// id: "4",
// icon: require("../assets/images/anFang/exclamatory.png"),
// time: "20230312 15:45:10",
// position: "106",
// status: "",
// },
],
alarmFirstLevel: [],
alarmSecondLevel: [],
@ -342,6 +342,66 @@ export default {
};
},
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.getPoliceList();
@ -356,6 +416,7 @@ export default {
},
watch: {
alarmFirstLevel(val) {
// resize使
console.log("alarmFirstLevel", val);
@ -374,27 +435,27 @@ export default {
this.upmqttData(val);
},
},
watch: {
alarmFirstLevel(val) {
// watch: {
// alarmFirstLevel(val) {
// resize使
console.log("alarmFirstLevel",val)
if(val.length!=0){
this.upmqttData(val)
}
// // resize使
// console.log("alarmFirstLevel",val)
// if(val.length!=0){
// this.upmqttData(val)
// }
},
alarmSecondLevel(val) {
// resize使
console.log("alarmSecondLevel",val)
this.upmqttData(val)
},
alarmThirdLevel(val) {
// resize使
console.log("alarmThirdLevel",val)
this.upmqttData(val)
},
},
// },
// alarmSecondLevel(val) {
// // resize使
// console.log("alarmSecondLevel",val)
// this.upmqttData(val)
// },
// alarmThirdLevel(val) {
// // resize使
// console.log("alarmThirdLevel",val)
// this.upmqttData(val)
// },
// },
methods: {
//
getAlarmCount() {
@ -405,7 +466,9 @@ export default {
this.securityList[1].security[4].count = res.data.data.DoorTodayCount;
this.securityList[1].security[5].count =
res.data.data.DoorYesterdayCount;
});
}).catch(err => {
});
},
//线线
@ -482,8 +545,12 @@ export default {
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;
});
});
}).catch(err => {
});
}).catch(err => {
});
//
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;
});
});
}).catch(err => {
});
},
videoChange(index) {
this.warnCameraList.forEach((item, i) => {
@ -567,7 +636,9 @@ export default {
AlarmLevel: res.data.data[index].AlarmLevel,
};
});
});
}).catch(err => {
});
},
//
getPoliceList() {
@ -597,7 +668,9 @@ export default {
AlarmLevel: res.data.data[index].AlarmLevel,
};
});
});
}).catch(err => {
});
},
//mqtt
upmqttData(val) {
@ -642,25 +715,8 @@ export default {
}
}
},
getWarning(name) {
// console.log("name",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("消防联动 辅楼四层");
}
getWarning:function(name){
getWarning(name)
},
},
components: {},