|
@@ -9,7 +9,7 @@
|
|
<div class="alarm-title-right"></div>
|
|
<div class="alarm-title-right"></div>
|
|
</div>
|
|
</div>
|
|
<div class="alarm-content" style="background: #0F152B">
|
|
<div class="alarm-content" style="background: #0F152B">
|
|
- <chart-pie></chart-pie>
|
|
|
|
|
|
+ <chart-pie :data="alarmPie"></chart-pie>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="alarm-divide">
|
|
<div class="alarm-divide">
|
|
@@ -19,7 +19,7 @@
|
|
<div class="alarm-title-right"></div>
|
|
<div class="alarm-title-right"></div>
|
|
</div>
|
|
</div>
|
|
<div class="alarm-content">
|
|
<div class="alarm-content">
|
|
- <alarm-bar></alarm-bar>
|
|
|
|
|
|
+ <alarm-bar :barData="list"></alarm-bar>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -95,7 +95,7 @@
|
|
<div class="alarm-top-left">
|
|
<div class="alarm-top-left">
|
|
<div class="alarm-title">
|
|
<div class="alarm-title">
|
|
<div class="alarm-title-left"></div>
|
|
<div class="alarm-title-left"></div>
|
|
- <div class="alarm-title-center">相应时间</div>
|
|
|
|
|
|
+ <div class="alarm-title-center">响应时间</div>
|
|
<div class="alarm-title-right"></div>
|
|
<div class="alarm-title-right"></div>
|
|
</div>
|
|
</div>
|
|
<div class="alarm-content">
|
|
<div class="alarm-content">
|
|
@@ -110,22 +110,19 @@
|
|
</div>
|
|
</div>
|
|
<div class="alarm-content alarm-flex">
|
|
<div class="alarm-content alarm-flex">
|
|
<div class="flex-left">
|
|
<div class="flex-left">
|
|
- <div class="box" v-for="item in 9" :key="item">
|
|
|
|
- <el-row :gutter="20" style="width: 500px; height: 100%">
|
|
|
|
|
|
+ <div class="box" v-for="(item, i) in alarmList" :key="i">
|
|
|
|
+ <el-row :gutter="20" style="width: 600px; height: 100%">
|
|
<el-col :span="2" style="height: 100%">
|
|
<el-col :span="2" style="height: 100%">
|
|
- <div :class="['box-logo', item === 1 ? 'logo1' : '', item === 2 ? 'logo2' : '', item === 3 ? 'logo3' : '' ]">{{item}}</div>
|
|
|
|
|
|
+ <div :class="['box-logo', i+1 === 1 ? 'logo1' : '', i+1 === 2 ? 'logo2' : '', i+1 === 3 ? 'logo3' : '' ]">{{i+1}}</div>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :span="10" style="height: 100%">
|
|
|
|
- <div>育肥1栋3单元温度过高!</div>
|
|
|
|
|
|
+ <el-col :span="14" style="height: 100%">
|
|
|
|
+ <div style="text-align: left">{{item.msg}}</div>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="4" style="height: 100%">
|
|
<el-col :span="4" style="height: 100%">
|
|
- <div>17:45:21</div>
|
|
|
|
|
|
+ <div>{{item.levelName}}</div>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="4" style="height: 100%">
|
|
<el-col :span="4" style="height: 100%">
|
|
- <div>二级</div>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="4" style="height: 100%">
|
|
|
|
- <div>处理</div>
|
|
|
|
|
|
+ <div>{{item.warningTime}}</div>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</div>
|
|
</div>
|
|
@@ -148,13 +145,30 @@
|
|
</div>
|
|
</div>
|
|
<div class="alarm-content">
|
|
<div class="alarm-content">
|
|
<swiper style="height: 100%; margin-top: auto; margin-bottom: auto;" class="swiper" :options="swiperOption">
|
|
<swiper style="height: 100%; margin-top: auto; margin-bottom: auto;" class="swiper" :options="swiperOption">
|
|
- <swiper-slide v-for="item in 10" :key="item">
|
|
|
|
- <div class="case"></div>
|
|
|
|
|
|
+ <swiper-slide v-for="(item, i) in personList" :key="i">
|
|
|
|
+ <div class="case" @click="open(item)">
|
|
|
|
+ <div class="case-left">
|
|
|
|
+ <img :src="item.recordImage" width="100%" alt="">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="case-right" style="text-align: left">
|
|
|
|
+ <div style="text-align: left">{{item.swingTime}}</div>
|
|
|
|
+ <div style="color: white; line-height: 30px">陌生人</div>
|
|
|
|
+ <div style="color: white; line-height: 30px">
|
|
|
|
+ 进入区域:
|
|
|
|
+ <span style="padding-left: 10px">{{item.deviceName}}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
</swiper-slide>
|
|
</swiper-slide>
|
|
</swiper>
|
|
</swiper>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="bio-dialog" v-show="dialog" @click="dialog = false">
|
|
|
|
+ <div class="dialog-content1">
|
|
|
|
+ <img :src="selectImg" width="100%" alt="">
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -165,7 +179,10 @@ import CostPie from "@/views/Alarm/chart/CostPie";
|
|
import ChartBar from "@/views/BioSafety/chart/ChartBar";
|
|
import ChartBar from "@/views/BioSafety/chart/ChartBar";
|
|
import { swiper, swiperSlide } from 'vue-awesome-swiper'
|
|
import { swiper, swiperSlide } from 'vue-awesome-swiper'
|
|
import 'swiper/css/swiper.css'
|
|
import 'swiper/css/swiper.css'
|
|
|
|
+import {getAlarmList, getWeekInfo, getPersonList, getFaceToken, getAlarmRate, getCountByDay} from "@/utils/api";
|
|
import img from '@/assets/Alarm/111.png';
|
|
import img from '@/assets/Alarm/111.png';
|
|
|
|
+import {timeDate} from "@/utils";
|
|
|
|
+
|
|
export default {
|
|
export default {
|
|
name: "Alarm",
|
|
name: "Alarm",
|
|
components: {
|
|
components: {
|
|
@@ -180,26 +197,10 @@ export default {
|
|
return {
|
|
return {
|
|
barData: {
|
|
barData: {
|
|
id: 1,
|
|
id: 1,
|
|
- salvProName: ['死猪运输', '车辆洗消', '人员违规', '猪只出售'],
|
|
|
|
- salvProValue: [489, 301, 315, 341]
|
|
|
|
|
|
+ salvProName: [],
|
|
|
|
+ salvProValue: []
|
|
},
|
|
},
|
|
pieData: [
|
|
pieData: [
|
|
- {
|
|
|
|
- name: '死猪运输',
|
|
|
|
- value: 42
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: '车辆洗消',
|
|
|
|
- value: 26
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: '人员违规',
|
|
|
|
- value: 20
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: '猪只出售',
|
|
|
|
- value: 12
|
|
|
|
- },
|
|
|
|
],
|
|
],
|
|
timeData: {
|
|
timeData: {
|
|
id: 1,
|
|
id: 1,
|
|
@@ -229,6 +230,16 @@ export default {
|
|
button2: 0,
|
|
button2: 0,
|
|
button3: 0,
|
|
button3: 0,
|
|
button4: 0,
|
|
button4: 0,
|
|
|
|
+ alarmList: [],
|
|
|
|
+ list: {
|
|
|
|
+ id: 2,
|
|
|
|
+ salvProName: ['一级', '二级', '三级'],
|
|
|
|
+ salvProValue: [0, 0, 0]
|
|
|
|
+ },
|
|
|
|
+ personList: [],
|
|
|
|
+ selectImg: '',
|
|
|
|
+ dialog: false,
|
|
|
|
+ alarmPie: [],
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -358,9 +369,60 @@ export default {
|
|
}
|
|
}
|
|
imgs.src = img;
|
|
imgs.src = img;
|
|
},
|
|
},
|
|
|
|
+ init() {
|
|
|
|
+ getAlarmList({quantity: 9}).then(res => {
|
|
|
|
+ if(res.code === 10000) {
|
|
|
|
+ this.alarmList = res.data;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ getWeekInfo({}).then(res => {
|
|
|
|
+ if(res.code === 10000) {
|
|
|
|
+ this.list.salvProValue = [res.data.one, res.data.two, res.data.three];
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ let params = {
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 20,
|
|
|
|
+ startSwingTime: timeDate(new Date().getTime()) + '00:00:00',
|
|
|
|
+ endSwingTime: timeDate(new Date().getTime()) + '23:59:59',
|
|
|
|
+ containDomain: 1,
|
|
|
|
+ openResult: 0
|
|
|
|
+ }
|
|
|
|
+ getPersonList(params).then(async res => {
|
|
|
|
+ let result = JSON.parse(res.result);
|
|
|
|
+ this.personList = result.data.pageData;
|
|
|
|
+ const { token } = await getFaceToken();
|
|
|
|
+ this.personList.forEach((item) => {
|
|
|
|
+ item.channelName = item.channelName.split("人脸门禁")[0];
|
|
|
|
+ item.recordImage = `https://36.26.62.70:447/evo-pic/${item.recordImage}?token=${token}&oss_addr=172.16.3.223:8925`;
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ getAlarmRate({}).then(res => {
|
|
|
|
+ if(res.code === 10000) {
|
|
|
|
+ this.alarmPie = res.data;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ getCountByDay({}).then(res => {
|
|
|
|
+ if(res.code === 10000) {
|
|
|
|
+ this.barData.salvProName = [];
|
|
|
|
+ this.barData.salvProValue = [];
|
|
|
|
+ res.data.forEach(item => {
|
|
|
|
+ this.barData.salvProName.push(item.name);
|
|
|
|
+ this.barData.salvProValue.push(item.value);
|
|
|
|
+ })
|
|
|
|
+ this.pieData = res.data;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 打开img
|
|
|
|
+ open(item) {
|
|
|
|
+ this.dialog = true;
|
|
|
|
+ this.selectImg = item.recordImage;
|
|
|
|
+ }
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
this.initCanvas()
|
|
this.initCanvas()
|
|
|
|
+ this.init();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
@@ -451,7 +513,7 @@ export default {
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
}
|
|
}
|
|
.flex-left {
|
|
.flex-left {
|
|
- width: 500px;
|
|
|
|
|
|
+ width: 600px;
|
|
height: 100%;
|
|
height: 100%;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
padding-top: 20px;
|
|
padding-top: 20px;
|
|
@@ -513,6 +575,17 @@ export default {
|
|
height: 100%;
|
|
height: 100%;
|
|
background: url("../../assets/BioSafety/some.png") no-repeat;
|
|
background: url("../../assets/BioSafety/some.png") no-repeat;
|
|
background-size: 100% 100%;
|
|
background-size: 100% 100%;
|
|
|
|
+ display: flex;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ }
|
|
|
|
+ .case-left {
|
|
|
|
+ width: 82px;
|
|
|
|
+ height: 100%;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ }
|
|
|
|
+ .case-right {
|
|
|
|
+ margin-left: 10px;
|
|
|
|
+ flex: 1
|
|
}
|
|
}
|
|
#canvas {
|
|
#canvas {
|
|
position: absolute;
|
|
position: absolute;
|
|
@@ -568,4 +641,21 @@ export default {
|
|
top: 100px;
|
|
top: 100px;
|
|
left: 340px;
|
|
left: 340px;
|
|
}
|
|
}
|
|
|
|
+ .bio-dialog {
|
|
|
|
+ width: 100vw;
|
|
|
|
+ height: 100vh;
|
|
|
|
+ position: absolute;
|
|
|
|
+ top: 0;
|
|
|
|
+ left: 0;
|
|
|
|
+ background-color: rgba(0,0,0 ,.6);
|
|
|
|
+ z-index: 999;
|
|
|
|
+ }
|
|
|
|
+ .dialog-content1 {
|
|
|
|
+ width: 15%;
|
|
|
|
+ position: absolute;
|
|
|
|
+ top: 50%;
|
|
|
|
+ left: 50%;
|
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
|
+ /*background-color: #fff;*/
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|