八项作业添加监控播放

pull/1/head
chenxinying 2024-01-15 10:09:11 +08:00
parent f9b2c57e26
commit b3055a31fd
3 changed files with 126 additions and 90 deletions

View File

@ -52,17 +52,18 @@
</template>
<script setup>
import { serialNumber } from "@/assets/js/utils";
import useListData from "@/assets/js/useListData";
import {
getVideoManagerList, setEightWorkVideoManagerDelete,
import { serialNumber } from "@/assets/js/utils";
import useListData from "@/assets/js/useListData";
import {
getVideoManagerList,
setEightWorkVideoManagerDelete,
setEightWorkVideoManagerList,
setVideoManagerList
} from "@/request/eightwork_videomanager";
import {useVModel} from "@vueuse/core";
import {debounce} from "throttle-debounce";
import {ElMessage, ElMessageBox} from "element-plus";
const props = defineProps({
setVideoManagerList,
} from "@/request/eightwork_videomanager";
import { useVModel } from "@vueuse/core";
import { debounce } from "throttle-debounce";
import { ElMessage, ElMessageBox } from "element-plus";
const props = defineProps({
visible: {
type: Boolean,
required: true,
@ -71,27 +72,33 @@
checkNo: {
type: String,
required: true,
default: '',
default: "",
},
});
const emits = defineEmits(["update:visible",'get-data']);
const visible = useVModel(props, "visible", emits);
const { list, pagination,searchForm, fnGetData, fnResetPagination } =
});
const emits = defineEmits(["update:visible", "get-data"]);
const visible = useVModel(props, "visible", emits);
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
useListData(getVideoManagerList);
const fnSubmit = debounce(
const fnSubmit = debounce(
1000,
async (row) => {
const resData = await setVideoManagerList({VIDEOMANAGER_ID:row.VIDEOMANAGER_ID})
if(resData.pd){
await setEightWorkVideoManagerDelete({EIGHTWORKVIDEOMANAGER_ID:resData.pd.EIGHTWORKVIDEOMANAGER_ID})
await ElMessageBox.confirm("该监控已绑定其他作业,是否更改?", { type: "warning" });
const resData = await setVideoManagerList({
VIDEOMANAGER_ID: row.VIDEOMANAGER_ID,
});
if (resData.pd) {
await setEightWorkVideoManagerDelete({
EIGHTWORKVIDEOMANAGER_ID: resData.pd.EIGHTWORKVIDEOMANAGER_ID,
});
await ElMessageBox.confirm("该监控已绑定其他作业,是否更改?", {
type: "warning",
});
}
await setEightWorkVideoManagerList({...row, CHECK_NO: props.checkNo})
await setEightWorkVideoManagerList({ ...row, CHECK_NO: props.checkNo });
ElMessage.success("操作成功");
emits('get-data')
emits("get-data");
},
{ atBegin: true }
);
);
</script>
<style scoped lang="scss"></style>

View File

@ -0,0 +1,29 @@
<template>
<el-dialog v-model="visible" title="播放视频">
<iframe :src="src" style="width: 100%; height: 500px" />
<template #footer>
<el-button @click="visible = false">关闭</el-button>
</template>
</el-dialog>
</template>
<script setup>
import { useVModel } from "@vueuse/core";
const prosp = defineProps({
visible: {
type: Boolean,
required: true,
default: false,
},
src: {
type: String,
required: true,
default: "",
},
});
const emits = defineEmits(["update:visible"]);
const visible = useVModel(prosp, "visible", emits);
</script>
<style scoped lang="scss"></style>

View File

@ -57,16 +57,16 @@
<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"
/>
<video-view
v-model:visible="data.videoDialog.visible"
:src="data.videoDialog.src"
/>
</div>
</template>
@ -81,10 +81,10 @@ 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";
import VideoView from "./components/video.vue";
const route = useRoute();
const { CHECK_NO } = route.query;
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
useListData(getEightWorkVideoManagerList, {
otherParams: { CHECK_NO },