forked from integrated_whb/integrated_whb_vue
ai视频报警
parent
41f08a759e
commit
04f28b4acc
|
@ -818,13 +818,13 @@ export default [
|
||||||
path: "/keyprojects/inspection/record_list",
|
path: "/keyprojects/inspection/record_list",
|
||||||
meta: {
|
meta: {
|
||||||
title: "查看列表",
|
title: "查看列表",
|
||||||
activeMenu: "/keyprojects/inspection"
|
activeMenu: "/keyprojects/inspection",
|
||||||
},
|
},
|
||||||
component: "children",
|
component: "children",
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "",
|
path: "",
|
||||||
component: "keyprojects/inspection/record_list"
|
component: "keyprojects/inspection/record_list",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/keyprojects/inspection/record_view",
|
path: "/keyprojects/inspection/record_view",
|
||||||
|
@ -834,9 +834,9 @@ export default [
|
||||||
},
|
},
|
||||||
component: "keyprojects/inspection/record_view",
|
component: "keyprojects/inspection/record_view",
|
||||||
},
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/keyprojects/hidden",
|
path: "/keyprojects/hidden",
|
||||||
|
@ -851,13 +851,13 @@ export default [
|
||||||
path: "/keyprojects/hidden/record_list",
|
path: "/keyprojects/hidden/record_list",
|
||||||
meta: {
|
meta: {
|
||||||
title: "查看列表",
|
title: "查看列表",
|
||||||
activeMenu: "/keyprojects/hidden"
|
activeMenu: "/keyprojects/hidden",
|
||||||
},
|
},
|
||||||
component: "children",
|
component: "children",
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "",
|
path: "",
|
||||||
component: "keyprojects/hidden/record_list"
|
component: "keyprojects/hidden/record_list",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/keyprojects/hidden/record_view",
|
path: "/keyprojects/hidden/record_view",
|
||||||
|
@ -867,9 +867,9 @@ export default [
|
||||||
},
|
},
|
||||||
component: "keyprojects/hidden/record_view",
|
component: "keyprojects/hidden/record_view",
|
||||||
},
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/keyprojects/punish",
|
path: "/keyprojects/punish",
|
||||||
|
@ -884,13 +884,13 @@ export default [
|
||||||
path: "/keyprojects/punish/record_list",
|
path: "/keyprojects/punish/record_list",
|
||||||
meta: {
|
meta: {
|
||||||
title: "查看列表",
|
title: "查看列表",
|
||||||
activeMenu: "/keyprojects/punish"
|
activeMenu: "/keyprojects/punish",
|
||||||
},
|
},
|
||||||
component: "children",
|
component: "children",
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "",
|
path: "",
|
||||||
component: "keyprojects/punish/record_list"
|
component: "keyprojects/punish/record_list",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/keyprojects/punish/record_view",
|
path: "/keyprojects/punish/record_view",
|
||||||
|
@ -900,9 +900,9 @@ export default [
|
||||||
},
|
},
|
||||||
component: "keyprojects/punish/record_view",
|
component: "keyprojects/punish/record_view",
|
||||||
},
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/keyprojects/aiwarning",
|
path: "/keyprojects/aiwarning",
|
||||||
|
@ -1969,6 +1969,11 @@ export default [
|
||||||
meta: { title: "视频设备列表", isSubMenu: false },
|
meta: { title: "视频设备列表", isSubMenu: false },
|
||||||
component: "video_manager/video_manager/index",
|
component: "video_manager/video_manager/index",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "/video_manager/ai_warning",
|
||||||
|
meta: { title: "Ai报警", isSubMenu: false },
|
||||||
|
component: "video_manager/ai_warning/index",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
import { post } from "@/request/axios.js";
|
||||||
|
|
||||||
|
export const getAiWarningList = (params) => post("/aiwarning/list", params); // ai报警列表
|
||||||
|
|
||||||
|
export const getAiWarningView = (params) => post("/aiwarning/goEdit", params); // 台账添加
|
||||||
|
export const setAiWarningDelete = (params) =>
|
||||||
|
post("/aiwarning/removeByIds", params); // 删除
|
||||||
|
export const setAiWarningEdit = (params) => post("/aiwarning/edit", params); // 修改
|
|
@ -58,8 +58,8 @@
|
||||||
<el-form-item label="定位卡号" prop="CARDNO">
|
<el-form-item label="定位卡号" prop="CARDNO">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="data.form.CARDNO"
|
v-model="data.form.CARDNO"
|
||||||
maxlength="4"
|
maxlength="5"
|
||||||
minlength="4"
|
minlength="5"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -33,7 +33,10 @@
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
disabled
|
disabled
|
||||||
/>
|
/>
|
||||||
<el-button type="primary" @click="fnRegName" style="margin-left: 10px"
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
@click="data.drawer = true"
|
||||||
|
style="margin-left: 10px"
|
||||||
>添加</el-button
|
>添加</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -48,84 +51,24 @@
|
||||||
<el-button @click="fnClose">取消</el-button>
|
<el-button @click="fnClose">取消</el-button>
|
||||||
<el-button type="primary" @click="fnSubmit"> 确定 </el-button>
|
<el-button type="primary" @click="fnSubmit"> 确定 </el-button>
|
||||||
</template>
|
</template>
|
||||||
|
<electronic-fence v-model:visible="data.drawer" v-model:form="form" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-drawer
|
|
||||||
v-model="data.drawer"
|
|
||||||
title="电子围栏台账"
|
|
||||||
direction="rtl"
|
|
||||||
:before-close="handleClose"
|
|
||||||
size="50%"
|
|
||||||
>
|
|
||||||
<el-card>
|
|
||||||
<el-form
|
|
||||||
:model="searchForm"
|
|
||||||
label-width="20px"
|
|
||||||
@submit.prevent="fnResetPagination"
|
|
||||||
>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="关键字" prop="KEYWORDS" label-width="60px">
|
|
||||||
<el-input
|
|
||||||
v-model="searchForm.KEYWORDS"
|
|
||||||
placeholder="请输入关键字"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label-width="30px">
|
|
||||||
<el-button type="primary" native-type="submit">搜索</el-button>
|
|
||||||
<el-button native-type="reset" @click="fnResetPagination">
|
|
||||||
重置
|
|
||||||
</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</el-card>
|
|
||||||
<layout-card>
|
|
||||||
<layout-table
|
|
||||||
ref="tableRef"
|
|
||||||
:data="list"
|
|
||||||
v-model:pagination="pagination"
|
|
||||||
@get-data="fnGetData"
|
|
||||||
>
|
|
||||||
<el-table-column reserve-selection type="selection" width="55" />
|
|
||||||
<el-table-column label="序号" width="70">
|
|
||||||
<template v-slot="{ $index }">
|
|
||||||
{{ serialNumber(pagination, $index) }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column property="layName" label="所属图层" width="150" />
|
|
||||||
<el-table-column property="regName" label="名称" />
|
|
||||||
<el-table-column label="操作" width="200">
|
|
||||||
<template v-slot="{ row }">
|
|
||||||
<el-button type="primary" text link @click="handleJoin(row)"
|
|
||||||
>绑定</el-button
|
|
||||||
>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</layout-table>
|
|
||||||
</layout-card>
|
|
||||||
</el-drawer>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { serialNumber } from "@/assets/js/utils.js";
|
import { reactive, ref } from "vue";
|
||||||
import { nextTick, reactive, ref } from "vue";
|
|
||||||
import { useVModels } from "@vueuse/core";
|
import { useVModels } from "@vueuse/core";
|
||||||
import { debounce } from "throttle-debounce";
|
import { debounce } from "throttle-debounce";
|
||||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import {
|
import {
|
||||||
getRiskPointListAll,
|
getRiskPointListAll,
|
||||||
getRyRegionList,
|
|
||||||
setIdentifyingPartsAdd,
|
setIdentifyingPartsAdd,
|
||||||
setIdentifyingPartsEdit,
|
setIdentifyingPartsEdit,
|
||||||
} from "@/request/risk_control.js";
|
} from "@/request/risk_control.js";
|
||||||
import LayoutUpload from "@/components/upload/index.vue";
|
import LayoutUpload from "@/components/upload/index.vue";
|
||||||
import useListData from "@/assets/js/useListData.js";
|
import ElectronicFence from "./electronic_fence.vue";
|
||||||
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
|
|
||||||
useListData(getRyRegionList);
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
visible: {
|
visible: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
@ -177,16 +120,7 @@ const fnClose = () => {
|
||||||
formRef.value.resetFields();
|
formRef.value.resetFields();
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
};
|
};
|
||||||
const handleJoin = debounce(
|
|
||||||
1000,
|
|
||||||
async (row) => {
|
|
||||||
form.value.ELECTRONIC_FENCE = row.regName;
|
|
||||||
form.value.ELECTRONIC_FENCE_ID = row.uuid;
|
|
||||||
data.drawer = false;
|
|
||||||
await nextTick();
|
|
||||||
},
|
|
||||||
{ atBegin: true }
|
|
||||||
);
|
|
||||||
const fnRemoveRegName = debounce(
|
const fnRemoveRegName = debounce(
|
||||||
1000,
|
1000,
|
||||||
async () => {
|
async () => {
|
||||||
|
@ -195,18 +129,7 @@ const fnRemoveRegName = debounce(
|
||||||
},
|
},
|
||||||
{ atBegin: true }
|
{ atBegin: true }
|
||||||
);
|
);
|
||||||
const fnRegName = debounce(
|
|
||||||
1000,
|
|
||||||
async () => {
|
|
||||||
data.drawer = true;
|
|
||||||
await fnResetPagination();
|
|
||||||
},
|
|
||||||
{ atBegin: true }
|
|
||||||
);
|
|
||||||
|
|
||||||
const handleClose = () => {
|
|
||||||
data.drawer = false;
|
|
||||||
};
|
|
||||||
const fnSubmit = debounce(
|
const fnSubmit = debounce(
|
||||||
1000,
|
1000,
|
||||||
async () => {
|
async () => {
|
||||||
|
|
|
@ -0,0 +1,81 @@
|
||||||
|
<template>
|
||||||
|
<el-drawer v-model="visible" title="电子围栏台账" direction="rtl" size="50%">
|
||||||
|
<el-card>
|
||||||
|
<el-form
|
||||||
|
:model="searchForm"
|
||||||
|
label-width="20px"
|
||||||
|
@submit.prevent="fnResetPagination"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="关键字" prop="KEYWORDS" label-width="60px">
|
||||||
|
<el-input
|
||||||
|
v-model="searchForm.KEYWORDS"
|
||||||
|
placeholder="请输入关键字"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label-width="30px">
|
||||||
|
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||||
|
<el-button native-type="reset" @click="fnResetPagination">
|
||||||
|
重置
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
<layout-card>
|
||||||
|
<layout-table
|
||||||
|
ref="tableRef"
|
||||||
|
:data="list"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
@get-data="fnGetData"
|
||||||
|
>
|
||||||
|
<el-table-column reserve-selection type="selection" width="55" />
|
||||||
|
<el-table-column label="序号" width="70">
|
||||||
|
<template v-slot="{ $index }">
|
||||||
|
{{ serialNumber(pagination, $index) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column property="layName" label="所属图层" width="150" />
|
||||||
|
<el-table-column property="regName" label="名称" />
|
||||||
|
<el-table-column label="操作" width="200">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<el-button type="primary" text link @click="handleJoin(row)"
|
||||||
|
>绑定</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</layout-table>
|
||||||
|
</layout-card>
|
||||||
|
</el-drawer>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import { serialNumber } from "@/assets/js/utils.js";
|
||||||
|
import useListData from "@/assets/js/useListData.js";
|
||||||
|
import { getRyRegionList } from "@/request/risk_control.js";
|
||||||
|
import { useVModels } from "@vueuse/core";
|
||||||
|
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
|
||||||
|
useListData(getRyRegionList);
|
||||||
|
const props = defineProps({
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
default: () => {},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const emits = defineEmits(["update:visible", "update:form"]);
|
||||||
|
const { visible, form } = useVModels(props, emits);
|
||||||
|
const handleJoin = (row) => {
|
||||||
|
form.value.ELECTRONIC_FENCE = row.regName;
|
||||||
|
form.value.ELECTRONIC_FENCE_ID = row.uuid;
|
||||||
|
visible.value = false;
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -0,0 +1,155 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
v-model="visible"
|
||||||
|
:title="type === 'edit' ? '审核' : '新增'"
|
||||||
|
:before-close="fnClose"
|
||||||
|
>
|
||||||
|
<el-form ref="formRef" :rules="rules" :model="form" label-width="150px">
|
||||||
|
<el-form-item label="监控设备名称" prop="VIDEONAME">
|
||||||
|
<el-input v-model="form.VIDEONAME" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="监控设备编码" prop="CODE">
|
||||||
|
<el-input v-model="form.CODE" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报警类型" prop="TYPE">
|
||||||
|
<el-input v-model="form.TYPE" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报警时间" prop="CREATTIME">
|
||||||
|
<el-input v-model="form.CREATTIME" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="form.IMG_PATH" label="报警截图" prop="IMG_PATH">
|
||||||
|
<img
|
||||||
|
v-viewer
|
||||||
|
:src="VITE_FILE_URL + form.IMG_PATH"
|
||||||
|
width="100"
|
||||||
|
height="100"
|
||||||
|
alt=""
|
||||||
|
class="ml-10"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="form.VIDEO_PATH" label="报警视频" prop="VIDEO_PATH">
|
||||||
|
<el-icon
|
||||||
|
size="30px"
|
||||||
|
@click="
|
||||||
|
data.videoDialog.visible = true;
|
||||||
|
data.videoDialog.src = form.VIDEO_PATH;
|
||||||
|
"
|
||||||
|
style="cursor: pointer"
|
||||||
|
>
|
||||||
|
<video-play />
|
||||||
|
</el-icon>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否真实报警" prop="ISTRUE">
|
||||||
|
<el-select
|
||||||
|
v-model="form.ISTRUE"
|
||||||
|
class="m-2"
|
||||||
|
placeholder="Select"
|
||||||
|
size="large"
|
||||||
|
style="width: 240px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="fnClose">取消</el-button>
|
||||||
|
<el-button type="primary" @click="fnSubmit"> 确定 </el-button>
|
||||||
|
</template>
|
||||||
|
<layout-video
|
||||||
|
v-model:visible="data.videoDialog.visible"
|
||||||
|
:src="data.videoDialog.src"
|
||||||
|
/>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { reactive, ref } from "vue";
|
||||||
|
import { useVModels } from "@vueuse/core";
|
||||||
|
import { debounce } from "throttle-debounce";
|
||||||
|
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
import { VideoPlay } from "@element-plus/icons-vue";
|
||||||
|
import LayoutVideo from "@/components/video/index.vue";
|
||||||
|
import { setAiWarningEdit } from "@/request/aiwarning_manager.js";
|
||||||
|
const VITE_FILE_URL = import.meta.env.VITE_FILE_URL;
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const options = [
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: "是",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 2,
|
||||||
|
label: "否",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 3,
|
||||||
|
label: "请选择",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
const data = reactive({
|
||||||
|
videoDialog: {
|
||||||
|
visible: false,
|
||||||
|
src: "",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
|
||||||
|
const { visible, form } = useVModels(props, emits);
|
||||||
|
const rules = {
|
||||||
|
VIDEONAME: [{ required: true, message: "视频名称不能为空", trigger: "blur" }],
|
||||||
|
VIDEOURL: [
|
||||||
|
{ required: true, message: "播放地址不能为空", trigger: "change" },
|
||||||
|
],
|
||||||
|
CODE: [
|
||||||
|
{ required: true, message: "监控设备编码不能为空", trigger: "change" },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
const formRef = ref(null);
|
||||||
|
|
||||||
|
const fnClose = () => {
|
||||||
|
formRef.value.resetFields();
|
||||||
|
visible.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
const fnSubmit = debounce(
|
||||||
|
1000,
|
||||||
|
async () => {
|
||||||
|
if (form.value.ISTRUE === 3) {
|
||||||
|
ElMessage.warning("请选是否真实报警");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await useFormValidate(formRef);
|
||||||
|
await setAiWarningEdit({ ...form.value });
|
||||||
|
ElMessage.success("操作成功");
|
||||||
|
fnClose();
|
||||||
|
emits("get-data");
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,174 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card>
|
||||||
|
<el-form
|
||||||
|
:model="searchForm"
|
||||||
|
label-width="50px"
|
||||||
|
@submit.prevent="fnResetPagination"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item prop="KEYWORDS">
|
||||||
|
<el-input
|
||||||
|
v-model="searchForm.KEYWORDS"
|
||||||
|
placeholder="请输入关键字"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label-width="10px">
|
||||||
|
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||||
|
<el-button native-type="reset" @click="fnResetPagination">
|
||||||
|
重置
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
<layout-card>
|
||||||
|
<layout-table
|
||||||
|
ref="tableRef"
|
||||||
|
:data="list"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
@get-data="fnGetData"
|
||||||
|
row-key="AIWARNING_ID"
|
||||||
|
>
|
||||||
|
<el-table-column reserve-selection type="selection" width="55" />
|
||||||
|
<el-table-column label="序号" width="70">
|
||||||
|
<template v-slot="{ $index }">
|
||||||
|
{{ serialNumber(pagination, $index) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="VIDEONAME" label="监控设备名称" />
|
||||||
|
<el-table-column prop="CODE" label="监控设备编码" />
|
||||||
|
<el-table-column prop="TYPE" label="报警类型" />
|
||||||
|
<el-table-column prop="CREATTIME" label="报警时间" />
|
||||||
|
<el-table-column prop="IMG_PATH" label="报警截图">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<layout-tooltip-img
|
||||||
|
:imgs="row.IMG_PATH ? fnToArray(row.IMG_PATH) : []"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="ISTRUE" label="是否审核">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<span v-if="row.ISTRUE === 3">未审核</span>
|
||||||
|
<span v-if="row.ISTRUE === 2">已审核 忽略报警</span>
|
||||||
|
<span v-if="row.ISTRUE === 1">已审核 真实报警</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="250">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<el-button
|
||||||
|
v-if="row.ISTRUE === 3"
|
||||||
|
type="primary"
|
||||||
|
text
|
||||||
|
link
|
||||||
|
@click="fnAddOrEdit(row.AIWARNING_ID, 'edit')"
|
||||||
|
>
|
||||||
|
审核
|
||||||
|
</el-button>
|
||||||
|
<el-button type="primary" text link @click="fnDeleteAiWarning(row)">
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<template #button>
|
||||||
|
<el-button type="danger" @click="fnBatchDelete()">
|
||||||
|
批量删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</layout-table>
|
||||||
|
</layout-card>
|
||||||
|
<add
|
||||||
|
v-model:visible="data.addDialog.Visible"
|
||||||
|
v-model:form="data.addDialog.form"
|
||||||
|
:type="data.addDialog.type"
|
||||||
|
@get-data="fnResetPagination"
|
||||||
|
/>
|
||||||
|
<video-view
|
||||||
|
v-model:visible="data.videoDialog.visible"
|
||||||
|
:src="data.videoDialog.src"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { serialNumber } from "@/assets/js/utils.js";
|
||||||
|
import useListData from "@/assets/js/useListData.js";
|
||||||
|
import LayoutTooltipImg from "@/components/tooltip_img/index.vue";
|
||||||
|
|
||||||
|
import {
|
||||||
|
getAiWarningList,
|
||||||
|
getAiWarningView,
|
||||||
|
setAiWarningDelete,
|
||||||
|
} from "@/request/aiwarning_manager.js";
|
||||||
|
import Add from "./components/add.vue";
|
||||||
|
import { nextTick, reactive } from "vue";
|
||||||
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
|
import { debounce } from "throttle-debounce";
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
addDialog: {
|
||||||
|
Visible: false,
|
||||||
|
type: "",
|
||||||
|
form: {
|
||||||
|
VIDEONAME: "",
|
||||||
|
VIDEOURL: "",
|
||||||
|
CODE: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
videoDialog: {
|
||||||
|
visible: false,
|
||||||
|
src: "",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
|
||||||
|
useListData(getAiWarningList);
|
||||||
|
const fnDeleteAiWarning = async (row) => {
|
||||||
|
if (row) {
|
||||||
|
const ids = [];
|
||||||
|
ids.push(row.AIWARNING_ID);
|
||||||
|
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
|
||||||
|
await setAiWarningDelete({
|
||||||
|
AIWARNING_IDS: ids.join(","),
|
||||||
|
});
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
fnResetPagination();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const fnToArray = (value) => {
|
||||||
|
const arr = [];
|
||||||
|
arr.push({ FILEPATH: value });
|
||||||
|
return arr;
|
||||||
|
};
|
||||||
|
const fnBatchDelete = debounce(
|
||||||
|
1000,
|
||||||
|
async () => {
|
||||||
|
const selectionData = tableRef.value.getSelectionRows();
|
||||||
|
if (selectionData.length === 0) {
|
||||||
|
ElMessage.warning("请选中要删除的项");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await ElMessageBox.confirm("确定要删除选中的数据吗?", { type: "warning" });
|
||||||
|
const DATA_IDS = selectionData.map((item) => item.AIWARNING_ID).join(",");
|
||||||
|
await setAiWarningDelete({ AIWARNING_IDS: DATA_IDS });
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
fnResetPagination();
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
|
const fnAddOrEdit = async (AIWARNING_ID, type) => {
|
||||||
|
data.addDialog.Visible = true;
|
||||||
|
await nextTick();
|
||||||
|
data.addDialog.type = type;
|
||||||
|
if (type === "edit") {
|
||||||
|
const resData = await getAiWarningView({ AIWARNING_ID });
|
||||||
|
data.addDialog.form = resData.pd;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
Loading…
Reference in New Issue