From d8986921d5d8b4dae3413648c5b00aab4685b5c7 Mon Sep 17 00:00:00 2001 From: Rain_ <904416525@qq.com> Date: Tue, 9 Dec 2025 09:18:05 +0800 Subject: [PATCH] =?UTF-8?q?flx=EF=BC=9A=E4=BF=AE=E6=94=B9=E6=B5=B7?= =?UTF-8?q?=E5=BA=B7=E7=9B=91=E6=8E=A7=E6=8F=92=E4=BB=B6=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modules/login.ts | 4 + src/stores/index.ts | 6 +- src/stores/interface/index.ts | 1 + src/utils/util.ts | 5 + src/views/login/index.vue | 15 +- .../components/iscPlayer.vue | 1 + .../components/isc_plugin.vue | 29 +- .../components/video_isc_plugin.js | 4 +- .../homeworkControlProcess/index.vue | 27 +- src/views/sevenLargeScreen/indexL.vue | 1819 +++++++++-------- .../videoManagement/index.vue | 28 +- .../videoManagement/isc_plugin_h5.vue | 3 +- 12 files changed, 1035 insertions(+), 907 deletions(-) diff --git a/src/api/modules/login.ts b/src/api/modules/login.ts index 9a50875..bc2a787 100644 --- a/src/api/modules/login.ts +++ b/src/api/modules/login.ts @@ -62,3 +62,7 @@ export const getAllModule = (params?: any) => { export const getScreenAuthModuleAndMenuApi = (params?: any) => { return http.get(BASEURL + "/xmgl/screenAuth/getModuleAndMenu", params); }; + +export const getUserConfigListApi = (params?: any) => { + return http.get(BASEURL + "/xmgl/userConfig/list", params); +}; diff --git a/src/stores/index.ts b/src/stores/index.ts index 32ff13f..39b7867 100644 --- a/src/stores/index.ts +++ b/src/stores/index.ts @@ -59,7 +59,8 @@ export const GlobalStore = defineStore({ tabsIcon: false, // 页脚 footer: false - } + }, + forceH5Play: 0, }), getters: {}, actions: { @@ -67,6 +68,9 @@ export const GlobalStore = defineStore({ setSN(sn: string | null) { this.sn = sn; }, + setForceH5Play(forceH5Play: number | null) { + this.forceH5Play = forceH5Play; + }, // setToken setToken(token: string | null) { this.token = token; diff --git a/src/stores/interface/index.ts b/src/stores/interface/index.ts index 62740aa..9cf3189 100644 --- a/src/stores/interface/index.ts +++ b/src/stores/interface/index.ts @@ -19,6 +19,7 @@ export interface GlobalState { isManager: string | null; isIframe: boolean | null; userId: string | null; + forceH5Play: number | null; } /* themeConfigProp */ diff --git a/src/utils/util.ts b/src/utils/util.ts index f97c6de..7c8831d 100644 --- a/src/utils/util.ts +++ b/src/utils/util.ts @@ -314,4 +314,9 @@ export function filterEnum( // 获取assets静态资源 export const getAssetsFile = (url: string) => { return new URL(`../assets/images/${url}`, import.meta.url).href +} + +// 判断当前系统是不是windows系统 +export function isWindows() { + return navigator.userAgent.indexOf('Windows') !== -1; } \ No newline at end of file diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 5779e6d..bde0001 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -42,7 +42,7 @@ import { ref, reactive, onMounted, onBeforeUnmount } from "vue"; import { useRouter } from "vue-router"; import { Login } from "@/api/interface"; import { ElMessage, ElNotification } from "element-plus"; -import { loginApi, jumpLoginApi } from "@/api/modules/login"; +import { loginApi, jumpLoginApi, getUserConfigListApi } from "@/api/modules/login"; import { GlobalStore } from "@/stores"; import { TabsStore } from "@/stores/modules/tabs"; import { KeepAliveStore } from "@/stores/modules/keepAlive"; @@ -86,7 +86,7 @@ const login = (formEl: FormInstance | undefined) => { globalStore.setAccountType(result.accountType); globalStore.setProjectDateAuth(result.menuAuthority); globalStore.setIsManager(result.isManager); //我已知晓 - + getUserConfigList(result.userId); // 2.添加动态路由 // await initDynamicRouter(); // router.push(arr[result.accountType - 1]); @@ -176,6 +176,17 @@ onMounted(async () => { } }; }); +const getUserConfigList = (userId: string) => { + getUserConfigListApi({ + userId: userId, + }).then((res: any) => { + if (res.code === 200) { + if (res.result instanceof Array && res.result.length > 0) { + globalStore.setProjectDateAuth(res.result[0].forceH5Play); + } + } + }); +}; // login页面销毁时,需要去掉enter监听 onBeforeUnmount(() => { document.onkeydown = null; diff --git a/src/views/sevenLargeScreen/homeworkControlProcess/components/iscPlayer.vue b/src/views/sevenLargeScreen/homeworkControlProcess/components/iscPlayer.vue index a3bd33e..1c09e7b 100644 --- a/src/views/sevenLargeScreen/homeworkControlProcess/components/iscPlayer.vue +++ b/src/views/sevenLargeScreen/homeworkControlProcess/components/iscPlayer.vue @@ -392,6 +392,7 @@ const getPreviewUrl = row => { let tempCode = row.monitoringNumber; const param = { cameraIndexCode: tempCode, + streamType: row.defaultStreamType && row.eIndex < 4 ? row.defaultStreamType : "", // streamType: row.defaultStreamType == 2 ? 0 : row.defaultStreamType, type: window.location.protocol.includes("https") ? "wss" : "ws", transmode: 1, diff --git a/src/views/sevenLargeScreen/homeworkControlProcess/components/isc_plugin.vue b/src/views/sevenLargeScreen/homeworkControlProcess/components/isc_plugin.vue index 652fe9f..df54c53 100644 --- a/src/views/sevenLargeScreen/homeworkControlProcess/components/isc_plugin.vue +++ b/src/views/sevenLargeScreen/homeworkControlProcess/components/isc_plugin.vue @@ -39,6 +39,7 @@ const getPreviewUrl = (row) => { const param = { cameraIndexCode: tempCode, type: window.location.protocol.includes("https") ? "wss" : "ws", + streamType: row.defaultStreamType && row.eIndex < 4 ? row.defaultStreamType : "", transmode: 1, itemId: row.itemId, projectSn: row.projectSn, @@ -95,8 +96,11 @@ onMounted(() => { layout.value = tempLayout if (props.devList.length > 0) { - props.devList.forEach(element => { - play(element) + props.devList.forEach((element, index) => { + play({ + ...element, + eIndex: index, + }) }) } }) @@ -110,21 +114,30 @@ onBeforeUnmount(() => { // 监听器 // watch(() => props.devList, (newVal) => { // if (newVal.length > 0) { -// newVal.forEach(element => { -// play(element) +// newVal.forEach((element, index) => { +// play({ +// ...element, +// eIndex: index, +// }) // }) // } // }) - -watch(() => props.equipmentDialog, (newVal) => { +const isVisible = computed(() => { + return { + equipmentDialog: props.equipmentDialog, + visibleDialog: props.visibleDialog, + } +}) +watch(() => isVisible, (newVal) => { + console.log("我进来了", videoPlugin.value,) if (videoPlugin.value) { - if (newVal) { + if (newVal.value.equipmentDialog || newVal.value.visibleDialog) { videoPlugin.value.hidePluginWindow() } else { videoPlugin.value.showPluginWindow() } } -}) +}, { deep: true }) diff --git a/src/views/sevenLargeScreen/videoManagement/index.vue b/src/views/sevenLargeScreen/videoManagement/index.vue index adb47dd..ac86182 100644 --- a/src/views/sevenLargeScreen/videoManagement/index.vue +++ b/src/views/sevenLargeScreen/videoManagement/index.vue @@ -3,8 +3,8 @@