Commit 258f9ed3 authored by forevertyler's avatar forevertyler

fix:视频监控,修改人员报警人员历史

parent 5d85dd25
......@@ -7,4 +7,12 @@ export function perAlarmHistory(query) {
method: 'get',
params: query
})
}
// 查询人员定位历史数据列表
export function perHistory(query) {
return request({
url: '/business/per/history/list',
method: 'get',
params: query
})
}
\ No newline at end of file
......@@ -68,12 +68,12 @@
<el-table-column label="分站名称" align="center" prop="stationName" />
<el-table-column label="分站位置" align="center" prop="location" />
<el-table-column label="所属区域" align="center" prop="areaName" />
<el-table-column label="时间" align="center" prop="alarmTime" >
<el-table-column label="时间" align="center" prop="time" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.alarmTime) }}</span>
<span>{{ parseTime(scope.row.time) }}</span>
</template>
</el-table-column>
<el-table-column label="分站距离(m)" align="center" prop=""/>
<el-table-column label="分站距离(m)" align="center" prop="distance"/>
</el-table>
......@@ -91,7 +91,7 @@
</template>
<script>
import { perAlarmHistory } from "@/api/tyler/perHis";
import { perHistory } from "@/api/tyler/perHis";
import { baseInfoDepartment, baseInfoArea, baseInfoStation, baseInfoWorkType, baseInfoPosition, baseInfoCardNumber } from "@/api/tyler/common";
export default {
......@@ -187,7 +187,7 @@ export default {
/** 查询人员定位实时数据列表 */
getList() {
this.loading = true;
perAlarmHistory(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
perHistory(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
this.perHisList = response.rows;
this.leaderList = response.remark;
this.total = response.total;
......
......@@ -17,7 +17,7 @@
<el-table-column v-if="labelName.departName" :label="labelName.departName" align="center" prop="departName" />
<el-table-column v-if="labelName.stationId" :label="labelName.stationId" align="center" prop="stationId" />
<el-table-column v-if="labelName.stationName" :label="labelName.stationName" align="center" prop="stationName" />
<el-table-column v-if="labelName.actionID" :label="labelName.actionID" align="center" prop="actionID" />
<el-table-column v-if="labelName.action" :label="labelName.action" align="center" prop="action" />
<el-table-column v-if="labelName.location" :label="labelName.location" align="center" prop="location" />
<el-table-column v-if="labelName.areaName" :label="labelName.areaName" align="center" prop="areaName" />
<el-table-column v-if="labelName.entryTime" :label="labelName.entryTime" align="center" prop="entryTime" />
......@@ -87,7 +87,7 @@ export default {
entryTime:null,
reason:null,
alarmTime:'报警时间',
actionID:'动作',
action:'动作',
overCapacityCount:'超员人数',
areaName:'区域名称',
stationId:null,
......@@ -138,7 +138,7 @@ export default {
entryTime:'入井时间',
reason:null,
alarmTime:'报警时间',
actionID:null,
action:null,
overCapacityCount:null,
areaName:null,
stationId:null,
......@@ -153,7 +153,7 @@ export default {
entryTime:null,
reason:null,
alarmTime:'报警时间',
actionID:'动作',
action:'动作',
overCapacityCount:'超员人数',
areaName:'区域名称',
stationId:null,
......@@ -170,7 +170,7 @@ export default {
reason:'原因',
alarmTime:'报警时间',
overCapacityCount:null,
actionID:null,
action:null,
areaName:null,
stationId:'分站编号',
stationName:'分站名称',
......@@ -186,7 +186,7 @@ export default {
reason:null,
alarmTime:'报警时间',
overCapacityCount:null,
actionID:null,
action:null,
stationId:'分站编号',
stationName:null,
areaName:'限制区名称',
......@@ -202,7 +202,7 @@ export default {
reason:null,
alarmTime:'报警时间',
overCapacityCount:null,
actionID:null,
action:null,
stationId:null,
stationName:null,
areaName:'未到达区域名称',
......@@ -218,7 +218,7 @@ export default {
reason:null,
alarmTime:'报警时间',
overCapacityCount:null,
actionID:null,
action:null,
stationId:null,
stationName:null,
areaName:null,
......
......@@ -12,7 +12,7 @@
@row-click="handleRowClick"
:row-class-name="rowClassName"
>
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column label="序号" align="center" type="index" width="50" />
<el-table-column label="分区名称" align="center" prop="partName" />
......@@ -113,6 +113,11 @@ export default {
this.partList = response.rows;
this.total = response.total;
this.loading = false;
if (this.partList.length > 0) {
this.$nextTick(() => {
this.handleRowClick(this.partList[0]);
});
}
});
},
// 取消按钮
......@@ -191,8 +196,10 @@ export default {
// 点击行时触发
handleRowClick(row) {
// 发射自定义事件,将行数据传递给父组件
this.$emit('row-click', row);
if (row) {
// 发射自定义事件,将行数据传递给父组件
this.$emit('row-click', row);
}
},
// 设置选中行的样式
rowClassName({ row, rowIndex }) {
......
......@@ -2,22 +2,24 @@
<div class="">
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>分区{{ selectedRow ? selectedRow.partName : '名称' }}</span>
<span>{{ selectedRow ? selectedRow.partName : '名称' }}</span>
<el-button style="float: right; padding: 3px 0" type="text" @click="handleAdd">添加摄像头</el-button>
</div>
<!-- 在这里可以添加其他逻辑,根据 selectedRow 渲染内容 -->
<el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="" align="center" prop="id" />
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column label="摄像头名称" align="center" prop="cameraName" />
<el-table-column label="摄像头编码" align="center" prop="cameraNum" />
<el-table-column label="摄像头通道编号" align="center" prop="cameraPassNum" />
<el-table-column label="摄像头ip" align="center" prop="cameraIp" />
<!-- <el-table-column label="摄像头ip" align="center" prop="cameraIp" /> -->
<el-table-column label="摄像头url" align="center" prop="cameraUrl" />
<el-table-column label="区域id" align="center" prop="partId" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="摄像头位置" align="center" prop="cameraWeizhi" />
<el-table-column label="状态 0不显示 1显示" align="center" prop="flag" />
<el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope">
<el-tag v-if="scope.row.status==1">正常</el-tag>
<el-tag v-else type="warning">异常</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
......@@ -25,14 +27,12 @@
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['business:table:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['business:table:remove']"
>删除</el-button>
</template>
</el-table-column>
......@@ -46,36 +46,27 @@
@pagination="getList"
/>
</el-card>
<!-- 添加或修改摄像头对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<!-- 添加或修改摄像头对话框 -->
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="摄像头名称" prop="cameraName">
<el-input v-model="form.cameraName" placeholder="请输入摄像头名称" />
</el-form-item>
<el-form-item label="摄像头编码" prop="cameraNum">
<el-input v-model="form.cameraNum" placeholder="请输入摄像头编码" />
</el-form-item>
<el-form-item label="摄像头通道编号" prop="cameraPassNum">
<el-form-item label="通道编号" prop="cameraPassNum">
<el-input v-model="form.cameraPassNum" placeholder="请输入摄像头通道编号" />
</el-form-item>
<el-form-item label="摄像头ip" prop="cameraIp">
<!-- <el-form-item label="摄像头ip" prop="cameraIp">
<el-input v-model="form.cameraIp" placeholder="请输入摄像头ip" />
</el-form-item>
</el-form-item> -->
<el-form-item label="摄像头url" prop="cameraUrl">
<el-input v-model="form.cameraUrl" placeholder="请输入摄像头url" />
</el-form-item>
<el-form-item label="区域id" prop="partId">
<el-input v-model="form.partId" placeholder="请输入区域id" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
<el-form-item label="摄像头位置" prop="cameraWeizhi">
<el-input v-model="form.cameraWeizhi" placeholder="请输入摄像头位置" />
</el-form-item>
<el-form-item label="状态 0不显示 1显示" prop="flag">
<el-input v-model="form.flag" placeholder="请输入状态 0不显示 1显示" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
......@@ -111,7 +102,7 @@ export default {
showSearch: true,
// 总条数
total: 0,
// 摄像头表格数据
// 摄像头表格数据
tableList: [],
// 弹出层标题
title: "",
......@@ -141,10 +132,23 @@ export default {
};
},
created() {
this.getList();
// this.getList();
},
watch: {
// 监听 selectedRow 的变化
selectedRow: {
immediate: true, // 立即执行
handler(newVal) {
if (newVal) {
this.queryParams.partId = newVal.id
this.getList();
}
},
},
},
methods: {
/** 查询摄像头列表 */
/** 查询摄像头列表 */
getList() {
this.loading = true;
listVideoTable(this.queryParams).then(response => {
......@@ -193,18 +197,18 @@ export default {
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.form.partId = this.selectedRow.id
this.open = true;
this.title = "添加摄像头";
this.title = "添加摄像头";
},
/** 修改按钮操作 */
handleUpdate(row) {
console.log(row,this.selectedRow,'this.selectedRow')
this.reset();
const id = row.id || this.ids
getVideoTable(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改摄像头列";
});
this.form = row;
this.open = true;
this.title = "修改摄像头";
},
/** 提交按钮 */
submitForm() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment