|
@@ -1,10 +1,7 @@
|
|
|
<template>
|
|
|
<div class="eventRem">
|
|
|
<div class="reply" :style="{ color: color }">筛选查询</div>
|
|
|
- <x-form
|
|
|
- :formItems="selectItems"
|
|
|
- @onClickType="onClickType"
|
|
|
- ></x-form>
|
|
|
+ <x-form :formItems="selectItems" @onClickType="onClickType"></x-form>
|
|
|
<new-table
|
|
|
:height="600"
|
|
|
:title="title"
|
|
@@ -12,6 +9,14 @@
|
|
|
:tableItems="tableItems"
|
|
|
:shows="tableShows"
|
|
|
>
|
|
|
+ <template #alarmPicture="scope">
|
|
|
+ <img
|
|
|
+ :src="scope.row.alarmPicture"
|
|
|
+ @click="clickImg(scope.row.alarmPicture)"
|
|
|
+ alt="车辆通行"
|
|
|
+ width="140"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
<template #handler="scope">
|
|
|
<el-button type="text" @click="open(scope.row)">视频回看</el-button>
|
|
|
</template>
|
|
@@ -25,10 +30,10 @@
|
|
|
<el-dialog title="回放视频" :visible.sync="videoVisible" width="50%">
|
|
|
<div style="width: 100%; height: 600px">
|
|
|
<iframe
|
|
|
- v-if="videoVisible"
|
|
|
- :src="'static/dahua/index.html?' + rtsp"
|
|
|
- frameborder="0"
|
|
|
- style="width: 100%; height: 100%"
|
|
|
+ v-if="videoVisible"
|
|
|
+ :src="'static/dahua/index.html?' + rtsp"
|
|
|
+ frameborder="0"
|
|
|
+ style="width: 100%; height: 100%"
|
|
|
>
|
|
|
</iframe>
|
|
|
</div>
|
|
@@ -39,6 +44,15 @@
|
|
|
</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog title="事件提醒图片" :visible.sync="dialogVisible" width="50%">
|
|
|
+ <img :src="imgUrl" alt="事件提醒图片" width="100%" />
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="dialogVisible = false">
|
|
|
+ 确 定
|
|
|
+ </el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -47,13 +61,13 @@ import { mapState } from "vuex";
|
|
|
import XForm from "@/components/XForm";
|
|
|
import NewTable from "@/components/newTable/NewTable";
|
|
|
import TableFooter from "@/components/TableFooter";
|
|
|
-import {getEventList, getFaceToken} from "../../utils/api";
|
|
|
-import {getCarWashVideo} from "../../utils/chenApi";
|
|
|
+import { getEventList, getFaceToken } from "../../utils/api";
|
|
|
+import { getCarWashVideo } from "../../utils/chenApi";
|
|
|
|
|
|
export default {
|
|
|
name: "EventRem",
|
|
|
computed: {
|
|
|
- ...mapState(["color"]),
|
|
|
+ ...mapState(["color", "ip"]),
|
|
|
},
|
|
|
components: {
|
|
|
XForm,
|
|
@@ -108,10 +122,10 @@ export default {
|
|
|
slotName: "alarmPosition",
|
|
|
},
|
|
|
{
|
|
|
- prop: "alarmTypeName",
|
|
|
- label: "内容",
|
|
|
+ prop: "alarmPicture",
|
|
|
+ label: "图片",
|
|
|
minWidth: "100",
|
|
|
- slotName: "alarmTypeName",
|
|
|
+ slotName: "alarmPicture",
|
|
|
},
|
|
|
{
|
|
|
label: "操作",
|
|
@@ -126,10 +140,12 @@ export default {
|
|
|
total: 0,
|
|
|
pageNum: 1,
|
|
|
pageSize: 20,
|
|
|
- alarmStartDateString: '',
|
|
|
- alarmEndDateString: '',
|
|
|
- rtsp: '',
|
|
|
+ alarmStartDateString: "",
|
|
|
+ alarmEndDateString: "",
|
|
|
+ rtsp: "",
|
|
|
videoVisible: false,
|
|
|
+ dialogVisible: false,
|
|
|
+ imgUrl: "", // 点击图片后放大的图片路径
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -145,34 +161,39 @@ export default {
|
|
|
},
|
|
|
init() {
|
|
|
let params = {
|
|
|
- alarmStartDateString: this.alarmStartDateString ? this.alarmStartDateString + ' 00:00:00' : '',
|
|
|
- alarmEndDateString: this.alarmEndDateString ? this.alarmEndDateString + ' 23:59:59' : '',
|
|
|
+ alarmStartDateString: this.alarmStartDateString
|
|
|
+ ? this.alarmStartDateString + " 00:00:00"
|
|
|
+ : "",
|
|
|
+ alarmEndDateString: this.alarmEndDateString
|
|
|
+ ? this.alarmEndDateString + " 23:59:59"
|
|
|
+ : "",
|
|
|
pageNum: this.pageNum,
|
|
|
- pageSize: this.pageSize
|
|
|
- }
|
|
|
- getEventList(params).then(async res => {
|
|
|
- if(res.code === 0) {
|
|
|
+ pageSize: this.pageSize,
|
|
|
+ };
|
|
|
+ getEventList(params).then(async (res) => {
|
|
|
+ if (res.code === 0) {
|
|
|
const result = JSON.parse(res.data.result);
|
|
|
this.list = result.data.pageData;
|
|
|
+ console.log(this.list);
|
|
|
this.total = parseInt(res.total);
|
|
|
// const { token } = await getFaceToken();
|
|
|
- // this.list.forEach((item) => {
|
|
|
- // item.alarmPicture = `https://36.26.62.70:447/evo-pic/${item.alarmPicture}?token=${token}&oss_addr=172.16.3.223:8925`;
|
|
|
- // });
|
|
|
+ this.list.forEach((item) => {
|
|
|
+ item.alarmPicture = `${this.ip}/video/picture/get?alarmPicture=${item.alarmPicture}`;
|
|
|
+ });
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
setDay(data) {
|
|
|
this.day = data.type;
|
|
|
},
|
|
|
onClickType(data) {
|
|
|
console.log(data);
|
|
|
- if(data.type === 'search') {
|
|
|
- if(data.data.value1) {
|
|
|
+ if (data.type === "search") {
|
|
|
+ if (data.data.value1) {
|
|
|
this.alarmStartDateString = data.data.value1[0];
|
|
|
this.alarmEndDateString = data.data.value1[1];
|
|
|
}
|
|
|
- this.init()
|
|
|
+ this.init();
|
|
|
}
|
|
|
},
|
|
|
open(row) {
|
|
@@ -188,10 +209,15 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ // 点击图片放大
|
|
|
+ clickImg(url) {
|
|
|
+ this.dialogVisible = true;
|
|
|
+ this.imgUrl = url;
|
|
|
+ },
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.init()
|
|
|
- }
|
|
|
+ this.init();
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|