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(); 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,10 +168,14 @@ export default {
}; };
}, },
methods: { methods: {
goPage:function(name){
goPage(name)
},
// goIndex:function(){
// goIndex(e)
// },
// //
menuChange(index, name) { menuChange(index, name) {
this.goPage(name);
this.menuAc = index;
this.menuBtn.forEach((item, 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");
@ -175,27 +192,36 @@ export default {
} }
}); });
if (index == 0) { if (index == 0) {
this.menuBtn[index].icon = require("./assets/images/shouYeAc.png");
this.$router.push("/"); this.$router.push("/");
this.menuBtn[index].icon = require("./assets/images/shouYeAc.png");
} else if (index == 1) { } else if (index == 1) {
this.menuBtn[index].icon = require("./assets/images/faTingAc.png");
this.$router.push("court"); this.$router.push("court");
this.menuBtn[index].icon = require("./assets/images/faTingAc.png");
} else if (index == 2) { } else if (index == 2) {
this.menuBtn[index].icon = require("./assets/images/jieNengAc.png");
this.$router.push("energySaving"); this.$router.push("energySaving");
this.menuBtn[index].icon = require("./assets/images/jieNengAc.png");
} 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.menuBtn[index].icon = require("./assets/images/yunWeiAc.png");
this.$router.push("operationMaintenance"); this.$router.push("operationMaintenance");
this.menuBtn[index].icon = require("./assets/images/yunWeiAc.png");
} 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%;

View File

@ -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;

View File

@ -195,6 +195,8 @@ export default {
risk: res.data.data[index].AlarmLevel, risk: res.data.data[index].AlarmLevel,
}; };
}); });
}).catch(err => {
}); });
}, },
// //
@ -215,6 +217,8 @@ export default {
risk: res.data.data[index].AlarmLevel, risk: res.data.data[index].AlarmLevel,
}; };
}); });
}).catch(err => {
}); });
}, },
// //
@ -235,6 +239,8 @@ export default {
risk: res.data.data[index].AlarmLevel, risk: res.data.data[index].AlarmLevel,
}; };
}); });
}).catch(err => {
}); });
}, },
//mqtt //mqtt

View File

@ -22,20 +22,6 @@
<div class="leftTwo"> <div class="leftTwo">
<div class="caseTitle">案件统计</div> <div class="caseTitle">案件统计</div>
<div class="select"> <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" v-model="departmentValue"
:popper-append-to-body="false" :popper-append-to-body="false"
@ -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],//()

View File

@ -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: "20230312 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: "20230312 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: "20230312 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: "20230312 15:45:10",
case: "设备故障", // case: "",
grade: "三级", // grade: "",
}, // },
], // ], //
sunList: [ sunList: [
{ {
@ -396,7 +397,12 @@ export default {
}, },
mounted() { mounted() {
this.getAllDevicesInfo(); this.getAllDevicesInfo();
window.setInterval(() => {
// setInterval(() => {
// this.getAllDevicesInfo();
// }, 10000);
setTimeout(()=> {
this.getAllDevicesInfo(); this.getAllDevicesInfo();
}, 10000); }, 10000);
this.getMqttData() this.getMqttData()
@ -448,6 +454,8 @@ export default {
}; };
getAreaList(dataList).then((res)=>{ getAreaList(dataList).then((res)=>{
this.calculateEcharts(res.data.data.child); this.calculateEcharts(res.data.data.child);
}).catch(err => {
}) })
}, },
// //
@ -463,6 +471,8 @@ 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
@ -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,51 +635,66 @@ 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);
}).catch(err => {
});;
}
if (index == 1) {
let params = { let params = {
AlarmLevel: "", AlarmLevel: "",
DeviceTypes: "电梯", DeviceTypes: "电梯",
}; };
GetLevelAlarm(params).then((res) => { GetLevelAlarm(params).then((res) => {
this.upWainData(res); this.upWainData(res);
}).catch(err => {
}); });
} else if (index == 1) { } else if (index == 2) {
let params = { let params = {
AlarmLevel: "", AlarmLevel: "",
DeviceTypes: "光伏", DeviceTypes: "光伏",
}; };
GetLevelAlarm(params).then((res) => { GetLevelAlarm(params).then((res) => {
this.upWainData(res); this.upWainData(res);
}).catch(err => {
}); });
} else if (index == 2) { } else if (index == 3) {
let params = { let params = {
AlarmLevel: "", AlarmLevel: "",
DeviceTypes: "VRV", DeviceTypes: "VRV",
}; };
GetLevelAlarm(params).then((res) => { GetLevelAlarm(params).then((res) => {
this.upWainData(res); this.upWainData(res);
}).catch(err => {
}); });
} else if (index == 3) { } 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 => {
} else if (index == 4) {
let params = {
AlarmLevel: "",
DeviceTypes: "热回收",
};
GetLevelAlarm(params).then((res) => {
this.upWainData(res);
}); });
} }
}, },

View File

@ -181,6 +181,37 @@
> >
</el-option> </el-option>
</el-select> </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>
<div class="selectChange"> <div class="selectChange">
<el-select <el-select
@ -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,6 +667,8 @@ export default {
}; };
getHikvision(dataList).then((res) => { getHikvision(dataList).then((res) => {
console.log(res, "============="); console.log(res, "=============");
}).catch(err => {
}); });
}, },
// //
@ -555,6 +697,8 @@ 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 = {
@ -571,6 +715,8 @@ 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,
@ -586,6 +732,8 @@ 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,
@ -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,6 +853,8 @@ 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 => {
}); });
}, },
// //
@ -703,6 +884,8 @@ 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 = {
@ -711,6 +894,8 @@ export default {
}; };
GetLevelAlarm(params).then((res) => { GetLevelAlarm(params).then((res) => {
this.upWainData(res.data.data); this.upWainData(res.data.data);
}).catch(err => {
}); });
} }
}, },
@ -1031,6 +1216,8 @@ export default {
], ],
}; };
myChart.setOption(option); myChart.setOption(option);
}).catch(err => {
}); });
}, },
maintenanceLeft() { maintenanceLeft() {
@ -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%;

View File

@ -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: "20230312 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: "20230312 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: "20230312 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: "20230312 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: "20230312 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: "20230312 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: "20230312 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: "20230312 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,6 +466,8 @@ 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,7 +545,11 @@ 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 => {
}); });
// //
@ -527,6 +594,8 @@ 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) {
@ -567,6 +636,8 @@ export default {
AlarmLevel: res.data.data[index].AlarmLevel, AlarmLevel: res.data.data[index].AlarmLevel,
}; };
}); });
}).catch(err => {
}); });
}, },
// //
@ -597,6 +668,8 @@ export default {
AlarmLevel: res.data.data[index].AlarmLevel, AlarmLevel: res.data.data[index].AlarmLevel,
}; };
}); });
}).catch(err => {
}); });
}, },
//mqtt //mqtt
@ -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: {},