八项作业添加监控

pull/1/head
chenxinying 2024-01-12 14:38:08 +08:00
parent 8dd359b08f
commit f9b2c57e26
2 changed files with 56 additions and 14 deletions

View File

@ -3,10 +3,13 @@ import { post } from "@/request/axios.js";
export const getVideoManagerList = (params) =>
post("/videomanager/list", params); // 八项作业视频列表
export const getEightWorkVideoManagerList = (params) =>
post("/eightworkvideomanager/list", params); // 八项作业视频列表
export const setEightWorkVideoManagerList = (params) => post("/eightworkvideomanager/add", params); // 台账列表
export const setVideoManagerList = (params) => post("/eightworkvideomanager/goEdit", params); // 台账添加
export const setEightWorkVideoManagerDelete = (params) => post("/eightworkvideomanager/delete", params); // 删除
export const setEightWorkVideoManagerDeleteAll = (params) => post("/eightworkvideomanager/deleteAll", params); // 删除
post("/eightworkvideomanager/list", params); // 八项作业视频列表
export const setEightWorkVideoManagerList = (params) =>
post("/eightworkvideomanager/add", params); // 台账列表
export const setVideoManagerList = (params) =>
post("/eightworkvideomanager/goEdit", params); // 台账添加
export const setEightWorkVideoManagerDelete = (params) =>
post("/eightworkvideomanager/delete", params); // 删除
export const setEightWorkVideoManagerDeleteAll = (params) =>
post("/eightworkvideomanager/deleteAll", params); // 删除

View File

@ -39,27 +39,49 @@
</el-table-column>
<el-table-column prop="GBS_NUM" label="视频设备编号" />
<el-table-column prop="VIDEONAME" label="视频名称" />
<el-table-column label="操作" width="250">
<template v-slot="{ row }">
<el-button type="primary" text link @click="fnDeleteVideo(row)">
删除
</el-button>
<el-button
link
type="primary"
@click="fnPreviewVideo(row.VIDEOURL)"
>
播放
</el-button>
</template>
</el-table-column>
<template #button>
<el-button
type="primary"
@click="fnAdd"
>
新增
</el-button>
<el-button type="primary" @click="fnAdd"> </el-button>
</template>
</layout-table>
<layout-video
:src="data.videoDialog.src"
v-model:visible="data.videoDialog.visible"
/>
</layout-card>
<add v-model:visible="data.addDialog.Visible" :check-no="data.addDialog.checkNo" @get-data="fnResetPagination" />
<add
v-model:visible="data.addDialog.Visible"
:check-no="data.addDialog.checkNo"
@get-data="fnResetPagination"
/>
</div>
</template>
<script setup>
import { serialNumber } from "@/assets/js/utils";
import useListData from "@/assets/js/useListData.js";
import { getEightWorkVideoManagerList } from "@/request/eightwork_videomanager";
import {
getEightWorkVideoManagerList,
setEightWorkVideoManagerDelete,
} from "@/request/eightwork_videomanager";
import { reactive } from "vue";
import Add from "./components/add.vue";
import { useRoute } from "vue-router";
import { ElMessageBox } from "element-plus";
import LayoutVideo from "@/components/video/index.vue";
const route = useRoute();
const { CHECK_NO } = route.query;
@ -72,11 +94,28 @@ const data = reactive({
Visible: false,
checkNo: "",
},
videoDialog: {
visible: false,
src: "",
},
});
const fnAdd = () => {
data.addDialog.Visible = true;
data.addDialog.checkNo = CHECK_NO;
};
const fnDeleteVideo = async (row) => {
if (row) {
await ElMessageBox.confirm("确定要删除吗?", { type: "warning" });
await setEightWorkVideoManagerDelete({
EIGHTWORKVIDEOMANAGER_ID: row.EIGHTWORKVIDEOMANAGER_ID,
});
fnResetPagination();
}
};
const fnPreviewVideo = (VIDEOURL) => {
data.videoDialog.visible = true;
data.videoDialog.src = VIDEOURL;
};
</script>
<style scoped></style>