diff --git a/public/config/config.json b/public/config/config.json index 1d590fe..4aeb8c9 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title": "安全生产智慧监管系统", - "baseUrl": "http://192.168.83.42:6909/safe-server/", + "baseUrl": "http://192.168.83.55:6909/safe-server/", "deployPathDec": "****************注意:这个/alarm的alarm一定要改成部署的文件夹的名字***************************", "deployPath": "/alarm", "mediaBaseUrl": "http://192.168.83.42:8099", @@ -65,7 +65,7 @@ "useApprovalDesc": "是否使用审批", "useApproval": "true", "useGatewayDesc": "sm是否走网关", - "useGateway": "true", + "useGateway": "false", "isOpenDebugDesc": "视频播放插件是否开启debug", "isOpenDebug": "true" } diff --git a/public/config/config.json b/public/config/config.json index 1d590fe..4aeb8c9 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title": "安全生产智慧监管系统", - "baseUrl": "http://192.168.83.42:6909/safe-server/", + "baseUrl": "http://192.168.83.55:6909/safe-server/", "deployPathDec": "****************注意:这个/alarm的alarm一定要改成部署的文件夹的名字***************************", "deployPath": "/alarm", "mediaBaseUrl": "http://192.168.83.42:8099", @@ -65,7 +65,7 @@ "useApprovalDesc": "是否使用审批", "useApproval": "true", "useGatewayDesc": "sm是否走网关", - "useGateway": "true", + "useGateway": "false", "isOpenDebugDesc": "视频播放插件是否开启debug", "isOpenDebug": "true" } diff --git a/src/api/indexMedia.ts b/src/api/indexMedia.ts index 5c6915b..be97698 100644 --- a/src/api/indexMedia.ts +++ b/src/api/indexMedia.ts @@ -143,11 +143,12 @@ toLogin() } else { - const message: string = error.response.data.message - ElMessage({ - message, - type: 'error', - }) + // const message: string = error.response.data.message + // ElMessage({ + // message, + // type: 'error', + // }) + ElMessage.warning('取流失败') } } else if (error.message) { diff --git a/public/config/config.json b/public/config/config.json index 1d590fe..4aeb8c9 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title": "安全生产智慧监管系统", - "baseUrl": "http://192.168.83.42:6909/safe-server/", + "baseUrl": "http://192.168.83.55:6909/safe-server/", "deployPathDec": "****************注意:这个/alarm的alarm一定要改成部署的文件夹的名字***************************", "deployPath": "/alarm", "mediaBaseUrl": "http://192.168.83.42:8099", @@ -65,7 +65,7 @@ "useApprovalDesc": "是否使用审批", "useApproval": "true", "useGatewayDesc": "sm是否走网关", - "useGateway": "true", + "useGateway": "false", "isOpenDebugDesc": "视频播放插件是否开启debug", "isOpenDebug": "true" } diff --git a/src/api/indexMedia.ts b/src/api/indexMedia.ts index 5c6915b..be97698 100644 --- a/src/api/indexMedia.ts +++ b/src/api/indexMedia.ts @@ -143,11 +143,12 @@ toLogin() } else { - const message: string = error.response.data.message - ElMessage({ - message, - type: 'error', - }) + // const message: string = error.response.data.message + // ElMessage({ + // message, + // type: 'error', + // }) + ElMessage.warning('取流失败') } } else if (error.message) { diff --git a/src/views/alarm/policyConfig/monitorPoint/editDialog.vue b/src/views/alarm/policyConfig/monitorPoint/editDialog.vue index c83d096..2086551 100644 --- a/src/views/alarm/policyConfig/monitorPoint/editDialog.vue +++ b/src/views/alarm/policyConfig/monitorPoint/editDialog.vue @@ -581,7 +581,7 @@ formData.value.rtspUrl = row.rtspUrl || 'http://192.168.83.42/rtsp' // rtsp地址 formData.value.mediaServerId = row.mediaServerId // 流媒体 formData.value.recognitionGb = row.recognitionGb // 识别流国标号 - formData.value.isProxyStream = row.isProxyStream || '0' // 是否是代理流 + formData.value.isProxyStream = `${row.isProxyStream}` || '0' // 是否是代理流 } if (dialogstatus === 'detail') { formDataRef.value?.clearValidate() diff --git a/public/config/config.json b/public/config/config.json index 1d590fe..4aeb8c9 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title": "安全生产智慧监管系统", - "baseUrl": "http://192.168.83.42:6909/safe-server/", + "baseUrl": "http://192.168.83.55:6909/safe-server/", "deployPathDec": "****************注意:这个/alarm的alarm一定要改成部署的文件夹的名字***************************", "deployPath": "/alarm", "mediaBaseUrl": "http://192.168.83.42:8099", @@ -65,7 +65,7 @@ "useApprovalDesc": "是否使用审批", "useApproval": "true", "useGatewayDesc": "sm是否走网关", - "useGateway": "true", + "useGateway": "false", "isOpenDebugDesc": "视频播放插件是否开启debug", "isOpenDebug": "true" } diff --git a/src/api/indexMedia.ts b/src/api/indexMedia.ts index 5c6915b..be97698 100644 --- a/src/api/indexMedia.ts +++ b/src/api/indexMedia.ts @@ -143,11 +143,12 @@ toLogin() } else { - const message: string = error.response.data.message - ElMessage({ - message, - type: 'error', - }) + // const message: string = error.response.data.message + // ElMessage({ + // message, + // type: 'error', + // }) + ElMessage.warning('取流失败') } } else if (error.message) { diff --git a/src/views/alarm/policyConfig/monitorPoint/editDialog.vue b/src/views/alarm/policyConfig/monitorPoint/editDialog.vue index c83d096..2086551 100644 --- a/src/views/alarm/policyConfig/monitorPoint/editDialog.vue +++ b/src/views/alarm/policyConfig/monitorPoint/editDialog.vue @@ -581,7 +581,7 @@ formData.value.rtspUrl = row.rtspUrl || 'http://192.168.83.42/rtsp' // rtsp地址 formData.value.mediaServerId = row.mediaServerId // 流媒体 formData.value.recognitionGb = row.recognitionGb // 识别流国标号 - formData.value.isProxyStream = row.isProxyStream || '0' // 是否是代理流 + formData.value.isProxyStream = `${row.isProxyStream}` || '0' // 是否是代理流 } if (dialogstatus === 'detail') { formDataRef.value?.clearValidate() diff --git a/src/views/alarm/policyConfig/videoPreview/videoPreview.vue b/src/views/alarm/policyConfig/videoPreview/videoPreview.vue index b3c31ae..f66c535 100644 --- a/src/views/alarm/policyConfig/videoPreview/videoPreview.vue +++ b/src/views/alarm/policyConfig/videoPreview/videoPreview.vue @@ -112,7 +112,9 @@ leafLoading.value = true // 叶子结点加载流的时候显示Loading图标 currentLeafId.value = data.device.id currentData.value = data.device - title.value = data.device.monitorName?.replace('-', ' - ') + // if (systemType.value === 'gm') { + // title.value = data.device.monitorName?.replace('-', ' - ') + // } recognitionGb.value = data.device.recognitionGb ? data.device.recognitionGb : '' if (data.type === '3') { if (!data.children.length) { @@ -128,6 +130,9 @@ leafLoading.value = false mediaUrl.value = `${res}?token=${window.localStorage.getItem('token')}` console.log('播放原始流', jessibucaRef.value) + if (res) { + title.value = data.device.monitorName?.replace('-', ' - ') + } jessibucaRef.value.play(mediaUrl.value) }).catch(() => { ElMessage.warning('未获取到流!请联系管理员!') @@ -135,7 +140,7 @@ }) } else if (systemType.value === 'gm') { // 国米 - playGmStream(data.device.cameraIndexCode) + playGmStream(data.device.cameraIndexCode, data.device.monitorName) } } else if (radio.value === '2') { // 识别流 @@ -150,10 +155,12 @@ } } if (systemType.value === 'sm') { // sm识别流 - // 获取原始流 fetchRecognitionUrl(data.device.boxId, data.device.recognitionGb, data.device.mediaServerId, user.deptId).then((res: any) => { leafLoading.value = false mediaUrl.value = `${res}?token=${window.localStorage.getItem('token')}` + if (res) { + title.value = data.device.monitorName?.replace('-', ' - ') + } jessibucaRef.value.play(mediaUrl.value) }).catch(() => { ElMessage.warning('未获取到识别流!请联系管理员!') @@ -223,7 +230,7 @@ } // 播放流 -async function playGmStream(cameraIndexCode: string) { +async function playGmStream(cameraIndexCode: string, monitorName = '') { // 先停心跳 if (timer.value) { clearInterval(timer.value) @@ -256,6 +263,9 @@ try { leafLoading.value = true // 开始加载时显示 loading const res: any = await fetchStream(cameraIndexCode) + if (monitorName) { + title.value = monitorName?.replace('-', ' - ') + } // 解析响应数据 const { url, createStreamResponseId } = res