|
@@ -1,24 +1,36 @@
|
|
<!--
|
|
<!--
|
|
* @Author: your name
|
|
* @Author: your name
|
|
* @Date: 2021-09-13 17:52:31
|
|
* @Date: 2021-09-13 17:52:31
|
|
- * @LastEditTime: 2021-11-19 15:02:04
|
|
|
|
|
|
+ * @LastEditTime: 2021-11-28 15:38:04
|
|
* @LastEditors: Please set LastEditors
|
|
* @LastEditors: Please set LastEditors
|
|
* @Description: In User Settings Edit
|
|
* @Description: In User Settings Edit
|
|
* @FilePath: \hyyfClient\src\views\BioSafety\CarAdmin.vue
|
|
* @FilePath: \hyyfClient\src\views\BioSafety\CarAdmin.vue
|
|
-->
|
|
-->
|
|
<template>
|
|
<template>
|
|
<div class="car-admin">
|
|
<div class="car-admin">
|
|
- <head-btns
|
|
|
|
- :btnNames="btnNames"
|
|
|
|
|
|
+ <head-btns
|
|
|
|
+ :btnNames="btnNames"
|
|
:btnSelected="btnSelected"
|
|
:btnSelected="btnSelected"
|
|
- @btnSelected="getBtnSelected">
|
|
|
|
|
|
+ @btnSelected="getBtnSelected"
|
|
|
|
+ >
|
|
</head-btns>
|
|
</head-btns>
|
|
|
|
|
|
<!-- 筛选条件 -->
|
|
<!-- 筛选条件 -->
|
|
- <query-conditions :formItems="formItems" :propFormData="propFormData" @getQueryParams="handleQuery"></query-conditions>
|
|
|
|
|
|
+ <query-conditions
|
|
|
|
+ :formItems="formItems"
|
|
|
|
+ :propFormData="propFormData"
|
|
|
|
+ :defaultEmit="true"
|
|
|
|
+ @getQueryParams="handleQuery"
|
|
|
|
+ ></query-conditions>
|
|
|
|
|
|
<!-- 表格 -->
|
|
<!-- 表格 -->
|
|
- <new-table :title="title" :listData="listData" :tableItems="tableItems" :shows="tableShows" :height="475">
|
|
|
|
|
|
+ <new-table
|
|
|
|
+ :title="title"
|
|
|
|
+ :listData="listData"
|
|
|
|
+ :tableItems="tableItems"
|
|
|
|
+ :shows="tableShows"
|
|
|
|
+ :height="475"
|
|
|
|
+ >
|
|
<template v-slot:right>
|
|
<template v-slot:right>
|
|
<template v-if="btnSelected === 1">
|
|
<template v-if="btnSelected === 1">
|
|
<div>
|
|
<div>
|
|
@@ -37,49 +49,82 @@
|
|
</template>
|
|
</template>
|
|
</template>
|
|
</template>
|
|
<template v-slot:carNum="slotProps">
|
|
<template v-slot:carNum="slotProps">
|
|
- {{ slotProps.row.carNum? slotProps.row.carNum: '未识别' }}
|
|
|
|
|
|
+ {{ slotProps.row.carNum ? slotProps.row.carNum : "未识别" }}
|
|
</template>
|
|
</template>
|
|
<template v-slot:originalPicPath="slotProps">
|
|
<template v-slot:originalPicPath="slotProps">
|
|
- <img :src="slotProps.row.originalPicPath" @click="clickImg(slotProps.row.originalPicPath)" alt="车辆通行" width="120"/>
|
|
|
|
|
|
+ <img
|
|
|
|
+ :src="slotProps.row.originalPicPath"
|
|
|
|
+ @click="clickImg(slotProps.row.originalPicPath)"
|
|
|
|
+ alt="车辆通行"
|
|
|
|
+ width="120"
|
|
|
|
+ />
|
|
</template>
|
|
</template>
|
|
<template v-slot:alarmPicture="slotProps">
|
|
<template v-slot:alarmPicture="slotProps">
|
|
- <img :src="slotProps.row.alarmPicture" @click="clickImg(slotProps.row.alarmPicture)" alt="车辆通行" width="120"/>
|
|
|
|
|
|
+ <img
|
|
|
|
+ :src="slotProps.row.alarmPicture"
|
|
|
|
+ @click="clickImg(slotProps.row.alarmPicture)"
|
|
|
|
+ alt="车辆通行"
|
|
|
|
+ width="120"
|
|
|
|
+ />
|
|
</template>
|
|
</template>
|
|
<template v-slot:handler="slotProps">
|
|
<template v-slot:handler="slotProps">
|
|
- <el-button size="mini" @click="clickEvent(slotProps.row)">查看回放</el-button>
|
|
|
|
|
|
+ <el-button size="mini" @click="clickEvent(slotProps.row)"
|
|
|
|
+ >查看回放</el-button
|
|
|
|
+ >
|
|
</template>
|
|
</template>
|
|
-
|
|
|
|
</new-table>
|
|
</new-table>
|
|
<table-footer
|
|
<table-footer
|
|
:totals="total"
|
|
:totals="total"
|
|
:size="size"
|
|
:size="size"
|
|
@sizeChange="sizeChange"
|
|
@sizeChange="sizeChange"
|
|
- @pageChange="pageChange">
|
|
|
|
|
|
+ @pageChange="pageChange"
|
|
|
|
+ >
|
|
</table-footer>
|
|
</table-footer>
|
|
- <el-dialog
|
|
|
|
- title="车辆图片"
|
|
|
|
- :visible.sync="dialogVisible"
|
|
|
|
- width="50%">
|
|
|
|
- <img :src="imgUrl" alt="车辆通行" width="100%"/>
|
|
|
|
|
|
+ <el-dialog title="车辆图片" :visible.sync="dialogVisible" width="50%">
|
|
|
|
+ <img :src="imgUrl" alt="车辆通行" width="100%" />
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
|
- <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="dialogVisible = false"
|
|
|
|
+ >确 定</el-button
|
|
|
|
+ >
|
|
|
|
+ </span>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ <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%"
|
|
|
|
+ >
|
|
|
|
+ </iframe> -->
|
|
|
|
+ </div>
|
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="videoVisible = false">取 消</el-button>
|
|
|
|
+ <el-button type="primary" @click="videoVisible = false">
|
|
|
|
+ 确 定
|
|
|
|
+ </el-button>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import HeadBtns from 'components/bioSafety/Btns'
|
|
|
|
-import QueryConditions from 'components/bioSafety/QueryConditions'
|
|
|
|
-import NewTable from 'components/newTable/NewTable'
|
|
|
|
|
|
+import HeadBtns from "components/bioSafety/Btns";
|
|
|
|
+import QueryConditions from "components/bioSafety/QueryConditions";
|
|
|
|
+import NewTable from "components/newTable/NewTable";
|
|
import TableFooter from "../../components/TableFooter";
|
|
import TableFooter from "../../components/TableFooter";
|
|
|
|
|
|
-import { formItems, propFormData } from './carAdmin/queryCondition.config'
|
|
|
|
-import { titles, tableItems, tableShows } from './carAdmin/table.config'
|
|
|
|
|
|
+import { formItems, propFormData } from "./carAdmin/queryCondition.config";
|
|
|
|
+import { titles, tableItems, tableShows } from "./carAdmin/table.config";
|
|
|
|
|
|
-import { getCarPassage, getCarWash, getCarWashTotal } from '../../utils/chenApi'
|
|
|
|
-import { getFaceToken } from '../../utils/api'
|
|
|
|
|
|
+import {
|
|
|
|
+ getCarPassage,
|
|
|
|
+ getCarWash,
|
|
|
|
+ getCarWashTotal,
|
|
|
|
+ getCarWashVideo,
|
|
|
|
+} from "../../utils/chenApi";
|
|
|
|
+import { getFaceToken } from "../../utils/api";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "CarAdmin",
|
|
name: "CarAdmin",
|
|
@@ -87,19 +132,20 @@ export default {
|
|
HeadBtns,
|
|
HeadBtns,
|
|
QueryConditions,
|
|
QueryConditions,
|
|
NewTable,
|
|
NewTable,
|
|
- TableFooter
|
|
|
|
|
|
+ TableFooter,
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- btnNames: [ // 按钮情况
|
|
|
|
- { id: 1, name: '车辆通行' },
|
|
|
|
- { id: 2, name: '车辆洗消' },
|
|
|
|
- { id: 3, name: '车辆烘干' }
|
|
|
|
|
|
+ btnNames: [
|
|
|
|
+ // 按钮情况
|
|
|
|
+ { id: 1, name: "车辆通行" },
|
|
|
|
+ { id: 2, name: "车辆洗消" },
|
|
|
|
+ { id: 3, name: "车辆烘干" },
|
|
],
|
|
],
|
|
btnSelected: 2, // 选中的按钮
|
|
btnSelected: 2, // 选中的按钮
|
|
formItems: [], // 传给 QueryCondition 组件的 formItems
|
|
formItems: [], // 传给 QueryCondition 组件的 formItems
|
|
propFormData: {}, // 传给 QueryCondition 组件的 propFormData
|
|
propFormData: {}, // 传给 QueryCondition 组件的 propFormData
|
|
- title: '', // 传给 BioTable 组件的 title
|
|
|
|
|
|
+ title: "", // 传给 BioTable 组件的 title
|
|
listData: [], // 传给 BioTable 组件的表格展示的值 listData
|
|
listData: [], // 传给 BioTable 组件的表格展示的值 listData
|
|
tableItems: [], // 传给 BioTable 组件的表格的列表 tableItems
|
|
tableItems: [], // 传给 BioTable 组件的表格的列表 tableItems
|
|
tableShows: {},
|
|
tableShows: {},
|
|
@@ -107,73 +153,76 @@ export default {
|
|
total: 0,
|
|
total: 0,
|
|
size: 20,
|
|
size: 20,
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
- selectId: '',
|
|
|
|
|
|
+ selectId: "",
|
|
params: {},
|
|
params: {},
|
|
dialogVisible: false,
|
|
dialogVisible: false,
|
|
- imgUrl: '' // 点击图片后放大的图片路径
|
|
|
|
- }
|
|
|
|
|
|
+ imgUrl: "", // 点击图片后放大的图片路径
|
|
|
|
+ videoVisible: false, // 车辆回放
|
|
|
|
+ rtsp: "", // 车辆回放的地址
|
|
|
|
+ };
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- this.formItems = formItems[this.btnSelected - 1]
|
|
|
|
- this.propFormData = propFormData[this.btnSelected - 1]
|
|
|
|
- this.title = titles[this.btnSelected - 1]
|
|
|
|
- this.tableItems = tableItems[this.btnSelected - 1]
|
|
|
|
- this.tableShows = tableShows
|
|
|
|
|
|
+ this.formItems = formItems[this.btnSelected - 1];
|
|
|
|
+ this.propFormData = propFormData[this.btnSelected - 1];
|
|
|
|
+ console.log(this.propFormData);
|
|
|
|
+ this.title = titles[this.btnSelected - 1];
|
|
|
|
+ this.tableItems = tableItems[this.btnSelected - 1];
|
|
|
|
+ this.tableShows = tableShows;
|
|
if (this.btnSelected === 1) {
|
|
if (this.btnSelected === 1) {
|
|
- this.carPassage()
|
|
|
|
|
|
+ this.carPassage();
|
|
} else if (this.btnSelected === 2) {
|
|
} else if (this.btnSelected === 2) {
|
|
- this.carWash()
|
|
|
|
- }
|
|
|
|
|
|
+ this.carWash();
|
|
|
|
+ }
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
getBtnSelected(id) {
|
|
getBtnSelected(id) {
|
|
- this.btnSelected = id
|
|
|
|
- this.formItems = formItems[id - 1]
|
|
|
|
- this.propFormData = propFormData[id - 1]
|
|
|
|
- this.title = titles[id - 1]
|
|
|
|
- this.tableItems = tableItems[id - 1]
|
|
|
|
|
|
+ this.btnSelected = id;
|
|
|
|
+ this.formItems = formItems[id - 1];
|
|
|
|
+ this.propFormData = propFormData[id - 1];
|
|
|
|
+ this.title = titles[id - 1];
|
|
|
|
+ this.tableItems = tableItems[id - 1];
|
|
if (this.btnSelected === 1) {
|
|
if (this.btnSelected === 1) {
|
|
- this.carPassage()
|
|
|
|
|
|
+ this.carPassage();
|
|
} else if (this.btnSelected === 2) {
|
|
} else if (this.btnSelected === 2) {
|
|
- this.carWash()
|
|
|
|
|
|
+ this.carWash();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 获取查询条件
|
|
// 获取查询条件
|
|
handleQuery(params) {
|
|
handleQuery(params) {
|
|
- console.log(params)
|
|
|
|
- this.params = params
|
|
|
|
|
|
+ console.log(params);
|
|
|
|
+ this.params = params;
|
|
if (this.btnSelected === 1) {
|
|
if (this.btnSelected === 1) {
|
|
- this.carPassage()
|
|
|
|
|
|
+ this.carPassage();
|
|
} else if (this.btnSelected === 2) {
|
|
} else if (this.btnSelected === 2) {
|
|
- this.carWash()
|
|
|
|
- this.carWashTotal()
|
|
|
|
|
|
+ this.carWash();
|
|
|
|
+ this.carWashTotal();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 修改size
|
|
// 修改size
|
|
sizeChange(val) {
|
|
sizeChange(val) {
|
|
this.size = val;
|
|
this.size = val;
|
|
if (this.btnSelected === 1) {
|
|
if (this.btnSelected === 1) {
|
|
- this.carPassage()
|
|
|
|
|
|
+ this.carPassage();
|
|
} else if (this.btnSelected === 2) {
|
|
} else if (this.btnSelected === 2) {
|
|
- this.carWash()
|
|
|
|
|
|
+ this.carWash();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 修改页数
|
|
// 修改页数
|
|
pageChange(val) {
|
|
pageChange(val) {
|
|
- this.pageNum= val;
|
|
|
|
|
|
+ this.pageNum = val;
|
|
if (this.btnSelected === 1) {
|
|
if (this.btnSelected === 1) {
|
|
- this.carPassage()
|
|
|
|
|
|
+ this.carPassage();
|
|
} else if (this.btnSelected === 2) {
|
|
} else if (this.btnSelected === 2) {
|
|
- this.carWash()
|
|
|
|
|
|
+ this.carWash();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
init() {
|
|
init() {
|
|
let params = {
|
|
let params = {
|
|
pageNum: this.pageNum,
|
|
pageNum: this.pageNum,
|
|
pageSize: this.size,
|
|
pageSize: this.size,
|
|
- searchStr: this.keyword
|
|
|
|
- }
|
|
|
|
- console.log(params)
|
|
|
|
|
|
+ searchStr: this.keyword,
|
|
|
|
+ };
|
|
|
|
+ console.log(params);
|
|
// 获取后端数据
|
|
// 获取后端数据
|
|
},
|
|
},
|
|
// 车辆通行 查询
|
|
// 车辆通行 查询
|
|
@@ -181,71 +230,75 @@ export default {
|
|
let queryParams = {
|
|
let queryParams = {
|
|
pageNum: this.pageNum,
|
|
pageNum: this.pageNum,
|
|
pageSize: this.size,
|
|
pageSize: this.size,
|
|
- carNum: this.params.name || undefined
|
|
|
|
- }
|
|
|
|
- getCarPassage(queryParams).then(res => {
|
|
|
|
- console.log('res:', JSON.parse(res.result))
|
|
|
|
- const result = JSON.parse(res.result)
|
|
|
|
- this.listData = result.data.pageData
|
|
|
|
- this.listData.forEach(item => {
|
|
|
|
- item.originalPicPath = `https://36.26.62.70:447/evo-apigw/${item.originalPicPath}`
|
|
|
|
- item.devChnName = item.devChnName.split('_')[0]
|
|
|
|
- })
|
|
|
|
- this.total = parseInt(result.data.totalRows)
|
|
|
|
- })
|
|
|
|
|
|
+ carNum: this.params.name || undefined,
|
|
|
|
+ };
|
|
|
|
+ getCarPassage(queryParams).then((res) => {
|
|
|
|
+ console.log("res:", JSON.parse(res.result));
|
|
|
|
+ const result = JSON.parse(res.result);
|
|
|
|
+ this.listData = result.data.pageData;
|
|
|
|
+ this.listData.forEach((item) => {
|
|
|
|
+ item.originalPicPath = `https://36.26.62.70:447/evo-apigw/${item.originalPicPath}`;
|
|
|
|
+ item.devChnName = item.devChnName.split("_")[0];
|
|
|
|
+ });
|
|
|
|
+ this.total = parseInt(result.data.totalRows);
|
|
|
|
+ });
|
|
},
|
|
},
|
|
// 点击图片放大
|
|
// 点击图片放大
|
|
clickImg(url) {
|
|
clickImg(url) {
|
|
- this.dialogVisible = true
|
|
|
|
- this.imgUrl = url
|
|
|
|
|
|
+ this.dialogVisible = true;
|
|
|
|
+ this.imgUrl = url;
|
|
},
|
|
},
|
|
// 车辆洗消
|
|
// 车辆洗消
|
|
carWash() {
|
|
carWash() {
|
|
let queryParams = {
|
|
let queryParams = {
|
|
pageNum: this.pageNum,
|
|
pageNum: this.pageNum,
|
|
pageSize: this.size,
|
|
pageSize: this.size,
|
|
- alarmStartDateString: this.params.time[0] + ' 00:00:00',
|
|
|
|
- alarmEndDateString: this.params.time[1] + ' 23:59:59',
|
|
|
|
|
|
+ alarmStartDateString: this.params.time[0] + " 00:00:00",
|
|
|
|
+ alarmEndDateString: this.params.time[1] + " 23:59:59",
|
|
nodeCodeList: ["1002871$1$0$0", "1002872$1$0$0", "1002873$1$0$0"],
|
|
nodeCodeList: ["1002871$1$0$0", "1002872$1$0$0", "1002873$1$0$0"],
|
|
deviceCategory: 1,
|
|
deviceCategory: 1,
|
|
alarmType: 303,
|
|
alarmType: 303,
|
|
- dbType: 0
|
|
|
|
- }
|
|
|
|
- getCarWash(queryParams).then(async res => {
|
|
|
|
- console.log('res:', JSON.parse(res.result))
|
|
|
|
- const result = JSON.parse(res.result)
|
|
|
|
- this.listData = result.data.pageData
|
|
|
|
- const { token } = await getFaceToken()
|
|
|
|
- this.listData.forEach(item => {
|
|
|
|
- item.alarmPicture = `https://36.26.62.70:447/evo-pic/${item.alarmPicture}?token=${token}&oss_addr=172.16.3.223:8925`
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
|
|
+ dbType: 0,
|
|
|
|
+ };
|
|
|
|
+ getCarWash(queryParams).then(async (res) => {
|
|
|
|
+ console.log("res:", JSON.parse(res.result));
|
|
|
|
+ const result = JSON.parse(res.result);
|
|
|
|
+ this.listData = result.data.pageData;
|
|
|
|
+ const { token } = await getFaceToken();
|
|
|
|
+ this.listData.forEach((item) => {
|
|
|
|
+ item.alarmPicture = `https://36.26.62.70:447/evo-pic/${item.alarmPicture}?token=${token}&oss_addr=172.16.3.223:8925`;
|
|
|
|
+ });
|
|
|
|
+ });
|
|
},
|
|
},
|
|
// 车辆洗消 - 按钮
|
|
// 车辆洗消 - 按钮
|
|
clickEvent(row) {
|
|
clickEvent(row) {
|
|
- console.log(row)
|
|
|
|
|
|
+ getCarWashVideo({
|
|
|
|
+ happendTime: row.alarmDate,
|
|
|
|
+ channelId: row.nodeCode,
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
+ this.rtsp = res.URL;
|
|
|
|
+ this.videoVisible = true;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
},
|
|
},
|
|
// 车辆洗消 - 总条数
|
|
// 车辆洗消 - 总条数
|
|
carWashTotal() {
|
|
carWashTotal() {
|
|
let queryParams = {
|
|
let queryParams = {
|
|
- "orgCodeList": [],
|
|
|
|
- "nodeCodeList": [
|
|
|
|
- "1002871$1$0$0",
|
|
|
|
- "1002872$1$0$0",
|
|
|
|
- "1002873$1$0$0"
|
|
|
|
- ],
|
|
|
|
- "deviceCategory": 1,
|
|
|
|
- "alarmStartDateString": this.params.time[0] + ' 00:00:00',
|
|
|
|
- "alarmEndDateString": this.params.time[1] + ' 23:59:59',
|
|
|
|
- "alarmType": 303,
|
|
|
|
- "dbType": 0
|
|
|
|
- }
|
|
|
|
- getCarWashTotal(queryParams).then(res => {
|
|
|
|
- this.total = JSON.parse(res.result).data.value
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ orgCodeList: [],
|
|
|
|
+ nodeCodeList: ["1002871$1$0$0", "1002872$1$0$0", "1002873$1$0$0"],
|
|
|
|
+ deviceCategory: 1,
|
|
|
|
+ alarmStartDateString: this.params.time[0] + " 00:00:00",
|
|
|
|
+ alarmEndDateString: this.params.time[1] + " 23:59:59",
|
|
|
|
+ alarmType: 303,
|
|
|
|
+ dbType: 0,
|
|
|
|
+ };
|
|
|
|
+ getCarWashTotal(queryParams).then((res) => {
|
|
|
|
+ this.total = JSON.parse(res.result).data.value;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
},
|
|
},
|
|
-}
|
|
|
|
|
|
+};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|