监控点信息
This commit is contained in:
parent
d5d0947e30
commit
7b7b0a8400
|
|
@ -1,152 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.dkl.large.mapper.DklSecurityEquipmentMapper">
|
||||
|
||||
<resultMap type="DklSecurityEquipment" id="DklSecurityEquipmentResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="deviceName" column="device_name" />
|
||||
<result property="model" column="model" />
|
||||
<result property="installationPosition" column="installation_position" />
|
||||
<result property="buyTime" column="buy_time" />
|
||||
<result property="price" column="price" />
|
||||
<result property="maintenanceCycle" column="maintenance_cycle" />
|
||||
<result property="lastMaintenanceTime" column="last_maintenance_time" />
|
||||
<result property="maintenanceSituation" column="maintenance_situation" />
|
||||
<result property="maintenancePersonnel" column="maintenance_personnel" />
|
||||
<result property="state" column="state" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="monitoringPointsId" column="monitoring_points_id" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="sigenCode" column="sigen_code" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDklSecurityEquipmentVo">
|
||||
select dsp.id, dsp.device_name, dsp.model, dsp.installation_position, dsp.buy_time, dsp.price, dsp.maintenance_cycle, dsp.last_maintenance_time, dsp.maintenance_situation, dsp.maintenance_personnel, dsp.state, dsp.remark,
|
||||
dsp.monitoring_points_id, dsp.create_by, dsp.create_time, dsp.update_by, dsp.update_time, dsp.del_flag, dsp.dept_id,dsp.sigen_code,
|
||||
dmp.lng, dmp.lat, dmp.point_name AS pointName, dmp.point_address
|
||||
from dkl_security_equipment dsp
|
||||
Left join sys_dept d on dsp.dept_id = d.dept_id
|
||||
Left Join dkl_monitoring_points dmp on dmp.id = dsp.monitoring_points_id
|
||||
</sql>
|
||||
|
||||
<select id="selectDklSecurityEquipmentList" parameterType="DklSecurityEquipment" resultMap="DklSecurityEquipmentResult">
|
||||
<include refid="selectDklSecurityEquipmentVo"/>
|
||||
<where>
|
||||
<if test="deviceName != null and deviceName != ''"> and dsp.device_name like concat('%', #{deviceName}, '%')</if>
|
||||
<if test="model != null and model != ''"> and dsp.model = #{model}</if>
|
||||
<if test="installationPosition != null and installationPosition != ''"> and dsp.installation_position = #{installationPosition}</if>
|
||||
<if test="buyTime != null "> and dsp.buy_time = #{buyTime}</if>
|
||||
<if test="price != null "> and dsp.price = #{price}</if>
|
||||
<if test="maintenanceCycle != null and maintenanceCycle != ''"> and dsp.maintenance_cycle = #{maintenanceCycle}</if>
|
||||
<if test="lastMaintenanceTime != null "> and dsp.last_maintenance_time = #{lastMaintenanceTime}</if>
|
||||
<if test="maintenanceSituation != null and maintenanceSituation != ''"> and dsp.maintenance_situation = #{maintenanceSituation}</if>
|
||||
<if test="maintenancePersonnel != null and maintenancePersonnel != ''"> and dsp.maintenance_personnel = #{maintenancePersonnel}</if>
|
||||
<if test="state != null and state != ''"> and dsp.state = #{state}</if>
|
||||
<if test="monitoringPointsId != null "> and dsp.monitoring_points_id = #{monitoringPointsId}</if>
|
||||
<if test="delFlag != null and delFlag != ''"> and dsp.del_flag = #{delFlag}</if>
|
||||
<if test="startTime != null and endTime != null ">
|
||||
AND dsp.create_time BETWEEN #{startTime} and #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
order by dsp.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectDklSecurityEquipmentById" parameterType="Long" resultMap="DklSecurityEquipmentResult">
|
||||
<include refid="selectDklSecurityEquipmentVo"/>
|
||||
where dsp.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDklSecurityEquipment" parameterType="DklSecurityEquipment">
|
||||
insert into dkl_security_equipment
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="deviceName != null">device_name,</if>
|
||||
<if test="model != null">model,</if>
|
||||
<if test="installationPosition != null">installation_position,</if>
|
||||
<if test="buyTime != null">buy_time,</if>
|
||||
<if test="price != null">price,</if>
|
||||
<if test="maintenanceCycle != null">maintenance_cycle,</if>
|
||||
<if test="lastMaintenanceTime != null">last_maintenance_time,</if>
|
||||
<if test="maintenanceSituation != null">maintenance_situation,</if>
|
||||
<if test="maintenancePersonnel != null">maintenance_personnel,</if>
|
||||
<if test="state != null">state,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="monitoringPointsId != null">monitoring_points_id,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="sigenCode != null">sigen_code,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="deviceName != null">#{deviceName},</if>
|
||||
<if test="model != null">#{model},</if>
|
||||
<if test="installationPosition != null">#{installationPosition},</if>
|
||||
<if test="buyTime != null">#{buyTime},</if>
|
||||
<if test="price != null">#{price},</if>
|
||||
<if test="maintenanceCycle != null">#{maintenanceCycle},</if>
|
||||
<if test="lastMaintenanceTime != null">#{lastMaintenanceTime},</if>
|
||||
<if test="maintenanceSituation != null">#{maintenanceSituation},</if>
|
||||
<if test="maintenancePersonnel != null">#{maintenancePersonnel},</if>
|
||||
<if test="state != null">#{state},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="monitoringPointsId != null">#{monitoringPointsId},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="sigenCode != null">#{sigenCode},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDklSecurityEquipment" parameterType="DklSecurityEquipment">
|
||||
update dkl_security_equipment
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="deviceName != null">device_name = #{deviceName},</if>
|
||||
<if test="model != null">model = #{model},</if>
|
||||
<if test="installationPosition != null">installation_position = #{installationPosition},</if>
|
||||
<if test="buyTime != null">buy_time = #{buyTime},</if>
|
||||
<if test="price != null">price = #{price},</if>
|
||||
<if test="maintenanceCycle != null">maintenance_cycle = #{maintenanceCycle},</if>
|
||||
<if test="lastMaintenanceTime != null">last_maintenance_time = #{lastMaintenanceTime},</if>
|
||||
<if test="maintenanceSituation != null">maintenance_situation = #{maintenanceSituation},</if>
|
||||
<if test="maintenancePersonnel != null">maintenance_personnel = #{maintenancePersonnel},</if>
|
||||
<if test="state != null">state = #{state},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="monitoringPointsId != null">monitoring_points_id = #{monitoringPointsId},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
<if test="sigenCode != null">sigen_code = #{sigenCode},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDklSecurityEquipmentById" parameterType="Long">
|
||||
delete from dkl_security_equipment where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDklSecurityEquipmentByIds" parameterType="String">
|
||||
delete from dkl_security_equipment where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,337 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="选择时间" prop="holidayName">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
type="datetimerange"
|
||||
unlink-panels
|
||||
range-separator="至"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
:shortcuts="filterShortcuts"
|
||||
class="custom-date-picker"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="监控名称" prop="srcIndex">
|
||||
<el-select
|
||||
v-model="queryParams.srcIndex"
|
||||
placeholder="监控名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in jklistCamera2List"
|
||||
:key="dict.filePath"
|
||||
:label="dict.name"
|
||||
:value="dict.filePath"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="tablebox">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="analysisList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="事件 Id" align="center" prop="eventId" />
|
||||
<el-table-column
|
||||
label="事件从接收者"
|
||||
align="center"
|
||||
prop="sendTime"
|
||||
width="180"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{
|
||||
parseTime(scope.row.sendTime, "{y}-{m}-{d} {h}:{i}:{s}")
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="监控名称" align="center" prop="method" />
|
||||
<el-table-column label="点位纬度" align="center" prop="latitude" />
|
||||
<el-table-column label="点位经度" align="center" prop="longitude" />
|
||||
<el-table-column
|
||||
label="算法名称"
|
||||
align="center"
|
||||
prop="baseAlgorithmName"
|
||||
/>
|
||||
<el-table-column label="进区域人口" align="center" prop="enter" />
|
||||
<el-table-column label="出区域人口" align="center" prop="exit" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="Analysis">
|
||||
import {
|
||||
listAnalysis,
|
||||
getAnalysis,
|
||||
delAnalysis,
|
||||
addAnalysis,
|
||||
updateAnalysis,
|
||||
} from "@/api/analysis";
|
||||
import moment from "moment";
|
||||
import { getCameralistOutAll } from "@/api/camera";
|
||||
const { proxy } = getCurrentInstance();
|
||||
const jklistCamera2List = ref([]);
|
||||
const analysisList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const dateRange = ref([]);
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
sendTime: null,
|
||||
ability: null,
|
||||
eventId: null,
|
||||
srcIndex: null,
|
||||
srcType: null,
|
||||
eventType: null,
|
||||
status: null,
|
||||
timeout: null,
|
||||
happenTime: null,
|
||||
componentId: null,
|
||||
latitude: null,
|
||||
tenantIndexCode: null,
|
||||
verifyTimeLimit: null,
|
||||
presetIndexCode: null,
|
||||
bigTime: null,
|
||||
lockTime: null,
|
||||
applicationOrderUuid: null,
|
||||
aiFunctionCode: null,
|
||||
parentEventId: null,
|
||||
tag: null,
|
||||
ruleId: null,
|
||||
longitude: null,
|
||||
baseAlgorithmId: null,
|
||||
locationName: null,
|
||||
level: null,
|
||||
verified: null,
|
||||
videoLock: null,
|
||||
regionPeopleNum: null,
|
||||
applicant: null,
|
||||
eventCode: null,
|
||||
region: null,
|
||||
baseAlgorithmName: null,
|
||||
taskId: null,
|
||||
text: null,
|
||||
startTime: undefined,
|
||||
endTime: undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
const formatDateTime = (dateStr) => {
|
||||
if (!dateStr) return "";
|
||||
const date = new Date(dateStr);
|
||||
const pad = (num) => num.toString().padStart(2, "0");
|
||||
return `${date.getFullYear()}年${pad(date.getMonth() + 1)}月${pad(
|
||||
date.getDate()
|
||||
)}日 ${pad(date.getHours())}时${pad(date.getMinutes())}分${pad(
|
||||
date.getSeconds()
|
||||
)}秒`;
|
||||
};
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
function getjklistCamera2() {
|
||||
let params = {
|
||||
delFlag: 0,
|
||||
};
|
||||
getCameralistOutAll(params).then((res) => {
|
||||
jklistCamera2List.value = res.rows;
|
||||
});
|
||||
}
|
||||
/** 查询算法推送列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listAnalysis(queryParams.value).then((response) => {
|
||||
analysisList.value = response.rows;
|
||||
total.value = response.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
// 取消按钮
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
|
||||
// 表单重置
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: null,
|
||||
sendTime: null,
|
||||
ability: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
delFlag: null,
|
||||
eventId: null,
|
||||
srcIndex: null,
|
||||
srcType: null,
|
||||
eventType: null,
|
||||
status: null,
|
||||
timeout: null,
|
||||
happenTime: null,
|
||||
componentId: null,
|
||||
latitude: null,
|
||||
tenantIndexCode: null,
|
||||
verifyTimeLimit: null,
|
||||
presetIndexCode: null,
|
||||
bigTime: null,
|
||||
lockTime: null,
|
||||
applicationOrderUuid: null,
|
||||
aiFunctionCode: null,
|
||||
parentEventId: null,
|
||||
tag: null,
|
||||
ruleId: null,
|
||||
longitude: null,
|
||||
baseAlgorithmId: null,
|
||||
locationName: null,
|
||||
level: null,
|
||||
verified: null,
|
||||
videoLock: null,
|
||||
regionPeopleNum: null,
|
||||
applicant: null,
|
||||
eventCode: null,
|
||||
region: null,
|
||||
baseAlgorithmName: null,
|
||||
taskId: null,
|
||||
text: null,
|
||||
startTime: undefined,
|
||||
endTime: undefined,
|
||||
};
|
||||
proxy.resetForm("analysisRef");
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNum = 1;
|
||||
// 这里修改为只更新时间参数,而不是覆盖整个queryParams
|
||||
if (dateRange.value && dateRange.value.length === 2) {
|
||||
queryParams.value.startTime = moment(dateRange.value[0]).format(
|
||||
"YYYY-MM-DD HH:mm:ss"
|
||||
);
|
||||
queryParams.value.endTime = moment(dateRange.value[1]).format(
|
||||
"YYYY-MM-DD HH:mm:ss"
|
||||
);
|
||||
} else {
|
||||
// 如果dateRange为空,则清空时间参数
|
||||
queryParams.value.startTime = undefined;
|
||||
queryParams.value.endTime = undefined;
|
||||
}
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
proxy.resetForm("queryRef");
|
||||
dateRange.value = [];
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
// 多选框选中数据
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "添加算法推送";
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
const _id = row.id || ids.value;
|
||||
getAnalysis(_id).then((response) => {
|
||||
form.value = response.data;
|
||||
open.value = true;
|
||||
title.value = "修改算法推送";
|
||||
});
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs["analysisRef"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (form.value.id != null) {
|
||||
updateAnalysis(form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
addAnalysis(form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const _ids = row.id || ids.value;
|
||||
proxy.$modal
|
||||
.confirm('是否确认删除算法推送编号为"' + _ids + '"的数据项?')
|
||||
.then(function () {
|
||||
return delAnalysis(_ids);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.download(
|
||||
"large/analysis/export",
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`analysis_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
getjklistCamera2();
|
||||
getList();
|
||||
</script>
|
||||
Loading…
Reference in New Issue