|
@@ -1,57 +1,44 @@
|
|
|
<template>
|
|
|
<div class="goafCameraAlarm">
|
|
|
- <div class="table-head" >
|
|
|
- <div class="tab">
|
|
|
- <el-button class="tab-item" :type="conditions.goafAlarmStatus===0?'primary':''" @click="tabClick(0)">未处理</el-button>
|
|
|
- <el-button class="tab-item" :type="conditions.goafAlarmStatus===1?'primary':''" @click="tabClick(1)">已处理</el-button>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <el-button type="primary" @click="batchHandle" v-if="selection.length>0">批量处理</el-button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
<el-table
|
|
|
ref="multipleTableRef"
|
|
|
:data="dataList"
|
|
|
style="width:100%"
|
|
|
row-class-name="CustomRowClassName"
|
|
|
- @selection-change="handleSelectionChange"
|
|
|
>
|
|
|
- <el-table-column type="selection" width="55" v-if="conditions.goafAlarmStatus===0" />
|
|
|
- <el-table-column type="index" width="55" label="序号" v-if="conditions.goafAlarmStatus===1" />
|
|
|
- <el-table-column property="goafAlarmStatus" label="安装位置" width="200">
|
|
|
- <template #default="scope">{{NumConvertLM(scope.row.goafOrebelt)}}-{{scope.row.goafOrebody}}-{{scope.row.goafOreheight}}-{{scope.row.goafName}}</template>
|
|
|
- </el-table-column>
|
|
|
- <!-- <el-table-column property="goafDevId" label="设备ID" /> -->
|
|
|
- <el-table-column property="goafAlarmBegintime" label="抓拍图片" >
|
|
|
+ <el-table-column type="index" width="55" label="序号" />
|
|
|
+ <el-table-column property="date" label="日期" min-width="180"></el-table-column>
|
|
|
+ <el-table-column property="carPlate" label="车牌" min-width="150"></el-table-column>
|
|
|
+ <el-table-column property="exitTime" label="出场时间" min-width="200">
|
|
|
<template #default="scope">
|
|
|
+ <p>{{scope.row.exitTime}}</p>
|
|
|
<div class="snap-image__preview">
|
|
|
<el-image
|
|
|
- style="width: 50px; height: 50px"
|
|
|
- :src="scope.row.goafSnapPicurl"
|
|
|
- :preview-src-list="[scope.row.goafSnapPicurl]"
|
|
|
+ style="width: 30px; height: 30px"
|
|
|
+ :src="scope.row.exitTimeSnapPicurl"
|
|
|
+ :preview-src-list="[scope.row.exitTimeSnapPicurl]"
|
|
|
preview-teleported
|
|
|
fit="cover"
|
|
|
/>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column property="goafAlarmStatus" label="预警状态" width="100">
|
|
|
- <template #default="scope">{{ scope.row.goafAlarmStatus===0?'未处理':'已处理' }}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column property="goafAlarmBegintime" label="预警开始时间" width="240" />
|
|
|
- <el-table-column property="goafAlarmEndtime" label="预警结束时间" width="240" v-if="conditions.goafAlarmStatus===1" />
|
|
|
- <el-table-column property="goafAlarmHandleAccountname" label="处理人" v-if="conditions.goafAlarmStatus===1" />
|
|
|
- <el-table-column property="goafAlarmHandleGroupname" label="处理部门" v-if="conditions.goafAlarmStatus===1" />
|
|
|
- <el-table-column property="goafAlarmType" label="预警类型" >
|
|
|
- <template #default="scope">{{ scope.row.goafAlarmType===4?'入侵预警':'' }}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column fixed="right" label="操作" width="120" v-if="conditions.goafAlarmStatus===0">
|
|
|
+ <el-table-column property="enterTime" label="入场时间" min-width="200">
|
|
|
<template #default="scope">
|
|
|
- <el-button link type="primary" size="small" @click="showHandModel(scope.row)"
|
|
|
- >处理</el-button
|
|
|
- >
|
|
|
- </template>
|
|
|
+ <p>{{scope.row.enterTime}}</p>
|
|
|
+ <div class="snap-image__preview">
|
|
|
+ <el-image
|
|
|
+ style="width: 30px; height: 30px"
|
|
|
+ :src="scope.row.enterTimeSnapPicurl"
|
|
|
+ :preview-src-list="[scope.row.enterTimeSnapPicurl]"
|
|
|
+ preview-teleported
|
|
|
+ fit="cover"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column property="timeDifference" label="时差(分钟)" width="180"></el-table-column>
|
|
|
+ <el-table-column property="result" label="结论" width="100" />
|
|
|
</el-table>
|
|
|
<div class="el-pagination-wrap">
|
|
|
<el-pagination small layout="prev, pager, next"
|
|
@@ -64,8 +51,7 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import {ElMessage} from 'element-plus'
|
|
|
-import { goafCameraAlarmByPage,goafCameraAlarmHandle} from '@/api/goaf/sensor'
|
|
|
-import { NumConvertLM ,parseTime} from '@/utils'
|
|
|
+import { NumConvertLM ,parseTime,getTime} from '@/utils'
|
|
|
import HandleModel from './Model.vue'
|
|
|
export default {
|
|
|
name:"goafCameraAlarm",
|
|
@@ -77,11 +63,9 @@ import HandleModel from './Model.vue'
|
|
|
conditions: {
|
|
|
page: 1,
|
|
|
limit: 10,
|
|
|
- goafAlarmStatus:0
|
|
|
},
|
|
|
dataList:[],
|
|
|
total:0,
|
|
|
- selection:[]
|
|
|
}
|
|
|
},
|
|
|
created(){
|
|
@@ -90,44 +74,21 @@ import HandleModel from './Model.vue'
|
|
|
methods:{
|
|
|
NumConvertLM,
|
|
|
getData(){
|
|
|
- goafCameraAlarmByPage(this.conditions).then((res)=>{
|
|
|
- const {total,data}=res
|
|
|
- this.dataList=data
|
|
|
- this.total=total
|
|
|
- })
|
|
|
- },
|
|
|
- tabClick(state){
|
|
|
- this.conditions.goafAlarmStatus=state
|
|
|
- this.getData()
|
|
|
- },
|
|
|
- showHandModel(data){
|
|
|
- // let user=localStorage.getItem('user');
|
|
|
- // user=JSON.parse(user)
|
|
|
- goafCameraAlarmHandle({
|
|
|
- ...data,
|
|
|
- goafAlarmStatus:1,
|
|
|
- goafAlarmEndtime:parseTime(new Date())
|
|
|
- }).then(()=>{
|
|
|
- ElMessage.success('处理完毕')
|
|
|
- this.getData()
|
|
|
- })
|
|
|
- },
|
|
|
- async batchHandle(){
|
|
|
- if(this.selection.length<1){
|
|
|
- ElMessage.error('请选择要处理的预警')
|
|
|
- return
|
|
|
- }
|
|
|
- for(let i=0;i<this.selection.length;i++){
|
|
|
- await goafCameraAlarmHandle({
|
|
|
- ...this.selection[i],
|
|
|
- goafAlarmStatus:1,
|
|
|
- goafAlarmEndtime:parseTime(new Date())
|
|
|
+ let dataList=[]
|
|
|
+ for(let i=0;i<6;i++){
|
|
|
+ dataList.push({
|
|
|
+ date:parseTime(new Date()),
|
|
|
+ carPlate:"陕A12345",
|
|
|
+ exitTime:getTime(),
|
|
|
+ enterTime:getTime(0.5),
|
|
|
+ exitTimeSnapPicurl:'http://113.141.93.143:9000/file/20236161224471948394.jpg',
|
|
|
+ enterTimeSnapPicurl:'http://113.141.93.143:9000/file/20236161224471948394.jpg',
|
|
|
+ timeDifference:40,
|
|
|
+ result:i%2===0?'正常':'异常',
|
|
|
+
|
|
|
})
|
|
|
}
|
|
|
- this.getData()
|
|
|
- },
|
|
|
- handleSelectionChange(selection){
|
|
|
- this.selection=selection
|
|
|
+ this.dataList=dataList
|
|
|
},
|
|
|
handleSizeChange(limit){
|
|
|
this.conditions.limit=limit
|
|
@@ -162,19 +123,8 @@ import HandleModel from './Model.vue'
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- .table-head{
|
|
|
- display: flex;
|
|
|
- justify-content:space-between;
|
|
|
- align-items: center;
|
|
|
- background-color: #fff;
|
|
|
- padding:10px;
|
|
|
- border-bottom: 1px solid #f7f0f0;
|
|
|
- .tab{
|
|
|
- .tab-item{
|
|
|
- margin: 0;
|
|
|
- border-radius: 0;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+}
|
|
|
+.snap-image__preview{
|
|
|
+ padding-top: 8px;
|
|
|
}
|
|
|
</style>
|