forked from integrated_whb/integrated_whb_vue
八项作业添加监控播放
parent
f9b2c57e26
commit
b3055a31fd
|
@ -1,49 +1,49 @@
|
||||||
<template>
|
<template>
|
||||||
<el-dialog v-model="visible" title="视频列表" width="1200px">
|
<el-dialog v-model="visible" title="视频列表" width="1200px">
|
||||||
<el-form
|
<el-form
|
||||||
:model="searchForm"
|
:model="searchForm"
|
||||||
label-width="100px"
|
label-width="100px"
|
||||||
@submit.prevent="fnResetPagination"
|
@submit.prevent="fnResetPagination"
|
||||||
>
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="关键字查询" prop="KEYWORDS">
|
<el-form-item label="关键字查询" prop="KEYWORDS">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="searchForm.KEYWORDS"
|
v-model="searchForm.KEYWORDS"
|
||||||
placeholder="请输入关键字"
|
placeholder="请输入关键字"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label-width="10px">
|
<el-form-item label-width="10px">
|
||||||
<el-button type="primary" native-type="submit">搜索</el-button>
|
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||||
<el-button native-type="reset" @click="fnResetPagination">
|
<el-button native-type="reset" @click="fnResetPagination">
|
||||||
重置
|
重置
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<layout-table
|
<layout-table
|
||||||
:data="list"
|
:data="list"
|
||||||
v-model:pagination="pagination"
|
v-model:pagination="pagination"
|
||||||
@get-data="fnGetData"
|
@get-data="fnGetData"
|
||||||
>
|
>
|
||||||
<el-table-column label="序号" width="70">
|
<el-table-column label="序号" width="70">
|
||||||
<template v-slot="{ $index }">
|
<template v-slot="{ $index }">
|
||||||
{{ serialNumber(pagination, $index) }}
|
{{ serialNumber(pagination, $index) }}
|
||||||
</template>
|
</template>
|
||||||
</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="视频名称" />
|
||||||
<el-table-column label="操作" width="80">
|
<el-table-column label="操作" width="80">
|
||||||
<template v-slot="{ row }">
|
<template v-slot="{ row }">
|
||||||
<el-button type="primary" text link @click="fnSubmit(row)">
|
<el-button type="primary" text link @click="fnSubmit(row)">
|
||||||
加入
|
加入
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</layout-table>
|
</layout-table>
|
||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="visible = false">关闭</el-button>
|
<el-button @click="visible = false">关闭</el-button>
|
||||||
|
@ -52,46 +52,53 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { serialNumber } from "@/assets/js/utils";
|
import { serialNumber } from "@/assets/js/utils";
|
||||||
import useListData from "@/assets/js/useListData";
|
import useListData from "@/assets/js/useListData";
|
||||||
import {
|
import {
|
||||||
getVideoManagerList, setEightWorkVideoManagerDelete,
|
getVideoManagerList,
|
||||||
setEightWorkVideoManagerList,
|
setEightWorkVideoManagerDelete,
|
||||||
setVideoManagerList
|
setEightWorkVideoManagerList,
|
||||||
} from "@/request/eightwork_videomanager";
|
setVideoManagerList,
|
||||||
import {useVModel} from "@vueuse/core";
|
} from "@/request/eightwork_videomanager";
|
||||||
import {debounce} from "throttle-debounce";
|
import { useVModel } from "@vueuse/core";
|
||||||
import {ElMessage, ElMessageBox} from "element-plus";
|
import { debounce } from "throttle-debounce";
|
||||||
const props = defineProps({
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
visible: {
|
const props = defineProps({
|
||||||
type: Boolean,
|
visible: {
|
||||||
required: true,
|
type: Boolean,
|
||||||
default: false,
|
required: true,
|
||||||
},
|
default: false,
|
||||||
checkNo: {
|
},
|
||||||
type: String,
|
checkNo: {
|
||||||
required: true,
|
type: String,
|
||||||
default: '',
|
required: true,
|
||||||
},
|
default: "",
|
||||||
});
|
},
|
||||||
const emits = defineEmits(["update:visible",'get-data']);
|
});
|
||||||
const visible = useVModel(props, "visible", emits);
|
const emits = defineEmits(["update:visible", "get-data"]);
|
||||||
const { list, pagination,searchForm, fnGetData, fnResetPagination } =
|
const visible = useVModel(props, "visible", emits);
|
||||||
useListData(getVideoManagerList);
|
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||||
const fnSubmit = debounce(
|
useListData(getVideoManagerList);
|
||||||
1000,
|
const fnSubmit = debounce(
|
||||||
async (row) => {
|
1000,
|
||||||
const resData = await setVideoManagerList({VIDEOMANAGER_ID:row.VIDEOMANAGER_ID})
|
async (row) => {
|
||||||
if(resData.pd){
|
const resData = await setVideoManagerList({
|
||||||
await setEightWorkVideoManagerDelete({EIGHTWORKVIDEOMANAGER_ID:resData.pd.EIGHTWORKVIDEOMANAGER_ID})
|
VIDEOMANAGER_ID: row.VIDEOMANAGER_ID,
|
||||||
await ElMessageBox.confirm("该监控已绑定其他作业,是否更改?", { type: "warning" });
|
});
|
||||||
}
|
if (resData.pd) {
|
||||||
await setEightWorkVideoManagerList({...row, CHECK_NO: props.checkNo})
|
await setEightWorkVideoManagerDelete({
|
||||||
ElMessage.success("操作成功");
|
EIGHTWORKVIDEOMANAGER_ID: resData.pd.EIGHTWORKVIDEOMANAGER_ID,
|
||||||
emits('get-data')
|
});
|
||||||
},
|
await ElMessageBox.confirm("该监控已绑定其他作业,是否更改?", {
|
||||||
{ atBegin: true }
|
type: "warning",
|
||||||
);
|
});
|
||||||
|
}
|
||||||
|
await setEightWorkVideoManagerList({ ...row, CHECK_NO: props.checkNo });
|
||||||
|
ElMessage.success("操作成功");
|
||||||
|
emits("get-data");
|
||||||
|
},
|
||||||
|
{ atBegin: true }
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|
|
@ -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>
|
|
@ -57,16 +57,16 @@
|
||||||
<el-button type="primary" @click="fnAdd"> 新增 </el-button>
|
<el-button type="primary" @click="fnAdd"> 新增 </el-button>
|
||||||
</template>
|
</template>
|
||||||
</layout-table>
|
</layout-table>
|
||||||
<layout-video
|
|
||||||
:src="data.videoDialog.src"
|
|
||||||
v-model:visible="data.videoDialog.visible"
|
|
||||||
/>
|
|
||||||
</layout-card>
|
</layout-card>
|
||||||
<add
|
<add
|
||||||
v-model:visible="data.addDialog.Visible"
|
v-model:visible="data.addDialog.Visible"
|
||||||
:check-no="data.addDialog.checkNo"
|
:check-no="data.addDialog.checkNo"
|
||||||
@get-data="fnResetPagination"
|
@get-data="fnResetPagination"
|
||||||
/>
|
/>
|
||||||
|
<video-view
|
||||||
|
v-model:visible="data.videoDialog.visible"
|
||||||
|
:src="data.videoDialog.src"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -81,10 +81,10 @@ 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 { ElMessageBox } from "element-plus";
|
||||||
import LayoutVideo from "@/components/video/index.vue";
|
import VideoView from "./components/video.vue";
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { CHECK_NO } = route.query;
|
const { CHECK_NO } = route.query;
|
||||||
|
|
||||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||||
useListData(getEightWorkVideoManagerList, {
|
useListData(getEightWorkVideoManagerList, {
|
||||||
otherParams: { CHECK_NO },
|
otherParams: { CHECK_NO },
|
||||||
|
|
Loading…
Reference in New Issue