八项作业添加监控

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

@ -4,9 +4,12 @@ export const getVideoManagerList = (params) =>
post("/videomanager/list", params); // 八项作业视频列表 post("/videomanager/list", params); // 八项作业视频列表
export const getEightWorkVideoManagerList = (params) => export const getEightWorkVideoManagerList = (params) =>
post("/eightworkvideomanager/list", params); // 八项作业视频列表 post("/eightworkvideomanager/list", params); // 八项作业视频列表
export const setEightWorkVideoManagerList = (params) => post("/eightworkvideomanager/add", 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); // 删除
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>
<el-table-column prop="GBS_NUM" label="视频设备编号" /> <el-table-column prop="GBS_NUM" label="视频设备编号" />
<el-table-column prop="VIDEONAME" label="视频名称" /> <el-table-column prop="VIDEONAME" label="视频名称" />
<template #button> <el-table-column label="操作" width="250">
<template v-slot="{ row }">
<el-button type="primary" text link @click="fnDeleteVideo(row)">
删除
</el-button>
<el-button <el-button
link
type="primary" type="primary"
@click="fnAdd" @click="fnPreviewVideo(row.VIDEOURL)"
> >
新增 播放
</el-button> </el-button>
</template> </template>
</el-table-column>
<template #button>
<el-button type="primary" @click="fnAdd"> </el-button>
</template>
</layout-table> </layout-table>
<layout-video
:src="data.videoDialog.src"
v-model:visible="data.videoDialog.visible"
/>
</layout-card> </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> </div>
</template> </template>
<script setup> <script setup>
import { serialNumber } from "@/assets/js/utils"; import { serialNumber } from "@/assets/js/utils";
import useListData from "@/assets/js/useListData.js"; 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 { reactive } from "vue";
import Add from "./components/add.vue"; import Add from "./components/add.vue";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import { ElMessageBox } from "element-plus";
import LayoutVideo from "@/components/video/index.vue";
const route = useRoute(); const route = useRoute();
const { CHECK_NO } = route.query; const { CHECK_NO } = route.query;
@ -72,11 +94,28 @@ const data = reactive({
Visible: false, Visible: false,
checkNo: "", checkNo: "",
}, },
videoDialog: {
visible: false,
src: "",
},
}); });
const fnAdd = () => { const fnAdd = () => {
data.addDialog.Visible = true; data.addDialog.Visible = true;
data.addDialog.checkNo = CHECK_NO; 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> </script>
<style scoped></style> <style scoped></style>