浏览代码

[Fix SEC-20260913-R2] 基座业务地址去 :9999 直连,统一 /modelreq 反代

lizuo 1 周之前
父节点
当前提交
42820dacc2

+ 4 - 3
src/views/vent/monitorManager/comment/components/reportInfo.vue

@@ -39,7 +39,8 @@
   });
 
   // [SEC-20260913] 去掉 DEV 分支硬编码 IP,统一按当前主机名取(与生产一致)
-  const remoteUrl = 'http://' + window.location.hostname;
+  // [SEC-20260913-R2] 去掉 :9999 网关直连,统一走 /modelreq 反代(保持绝对地址,供 OnlyOffice 服务端回源)
+  const remoteUrl = window.location.origin + '/modelreq';
   const userStore = useUserStore(); //获取用户信息
   let userId = unref(userStore.getUserInfo).id;
   let userName = unref(userStore.getUserInfo).username;
@@ -74,7 +75,7 @@
           height: '860px',
           document: {
             title: '文档管理',
-            url: remoteUrl + ':9999/safety/reportInfo/onlyOffice/read?id=' + props.editID + '&type=' + '', //id表示文件id,后端接口用这个id来加载文件
+            url: remoteUrl + '/safety/reportInfo/onlyOffice/read?id=' + props.editID + '&type=' + '', //id表示文件id,后端接口用这个id来加载文件
             fileType: props.fileType == 'doc' ? 'docx' : props.fileType == 'xls' ? 'xlsx' : props.fileType == 'ppt' ? 'pptx' : props.fileType, //当文件类型为doc、xls、ppt时,对应用docx、xlsx、pptx否则会保存异常。
             key: '',
             lang: 'zh-CN',
@@ -88,7 +89,7 @@
           editorConfig: {
             lang: 'zh-CN',
             mode: 'view', //view:只读且可复制内容,edit:可编辑
-            callbackUrl: remoteUrl + ':9999/safety/reportInfo/onlyOffice/save?id=' + props.editID + '&type=' + '', //id表示文件id,后端接口用这个id来加载文件
+            callbackUrl: remoteUrl + '/safety/reportInfo/onlyOffice/save?id=' + props.editID + '&type=' + '', //id表示文件id,后端接口用这个id来加载文件
             coEditing: {
               mode: 'fast',
               change: true,

+ 3 - 2
src/views/vent/monitorManager/gateMonitor/components/CarDamageTable.vue

@@ -99,10 +99,11 @@
       pageSize: pagination.pageSize,
     });
     // [SEC-20260913] 去掉 DEV 分支硬编码 IP,统一按当前主机名取(与生产一致)
-    const remoteUrl = 'http://' + window.location.hostname;
+    // [SEC-20260913-R2] 去掉 :9999 网关直连,统一走 /modelreq 反代
+    const remoteUrl = window.location.origin + '/modelreq';
     dataSource.value = res.records.map((el) => {
       return {
-        photoC: `${remoteUrl}:9999/sys/common/static/${el.photo.substring(el.photo.indexOf('/gate_monitor'))}`,
+        photoC: `${remoteUrl}/sys/common/static/${el.photo.substring(el.photo.indexOf('/gate_monitor'))}`,
         ...el,
       };
     });

+ 4 - 3
src/views/vent/performance/comment/DeviceModal.vue

@@ -41,7 +41,8 @@
   console.log(userName, '用户名');
   const record = reactive({ strtype: '', strname: '' });
   // [SEC-20260913] 去掉 DEV 分支硬编码 IP,统一按当前主机名取(与生产一致)
-  const remoteUrl = 'http://' + window.location.hostname;
+  // [SEC-20260913-R2] 去掉 :9999 网关直连,统一走 /modelreq 反代(保持绝对地址,供 OnlyOffice 服务端回源)
+  const remoteUrl = window.location.origin + '/modelreq';
   //表单赋值
   const [registerModal, { setModalProps }] = useModalInner(async (data) => {
     //重置表单
@@ -67,7 +68,7 @@
         height: '100%',
         document: {
           title: '文档管理',
-          url: remoteUrl + ':9999/ventanaly-sharefile/fileServer/onlyOffice/read?id=' + props.editID, //id表示文件id,后端接口用这个id来加载文件
+          url: remoteUrl + '/ventanaly-sharefile/fileServer/onlyOffice/read?id=' + props.editID, //id表示文件id,后端接口用这个id来加载文件
           // url: `${window.location.origin}:9999/ventanaly-sharefile/fileServer/onlyOffice/read?id=${props.editID}`, //id表示文件id,后端接口用这个id来加载文件
           fileType: props.fileType == 'doc' ? 'docx' : props.fileType == 'xls' ? 'xlsx' : props.fileType == 'ppt' ? 'pptx' : props.fileType, //当文件类型为doc、xls、ppt时,对应用docx、xlsx、pptx否则会保存异常。
           key: '',
@@ -82,7 +83,7 @@
         editorConfig: {
           lang: 'zh-CN',
           mode: 'edit', //view:只读且可复制内容,edit:可编辑
-          callbackUrl: remoteUrl + ':9999/ventanaly-sharefile/fileServer/onlyOffice/save?id=' + props.editID, //id表示文件id,后端接口用这个id来加载文件
+          callbackUrl: remoteUrl + '/ventanaly-sharefile/fileServer/onlyOffice/save?id=' + props.editID, //id表示文件id,后端接口用这个id来加载文件
           // callbackUrl: `${window.location.origin}:9999/ventanaly-sharefile/fileServer/onlyOffice/save?id=${props.editID}`, //id表示文件id,后端接口用这个id来加载文件
           coEditing: {
             mode: 'fast',

+ 4 - 3
src/views/vent/reportManager/comment/DeviceModal.vue

@@ -122,7 +122,8 @@
     },
   });
   // [SEC-20260913] 去掉 DEV 分支硬编码 IP,统一按当前主机名取(与生产一致)
-  const remoteUrl = 'http://' + window.location.hostname;
+  // [SEC-20260913-R2] 去掉 :9999 网关直连,统一走 /modelreq 反代(保持绝对地址,供 OnlyOffice 服务端回源)
+  const remoteUrl = window.location.origin + '/modelreq';
   const userStore = useUserStore(); //获取用户信息
   let userId = unref(userStore.getUserInfo).id;
   let userName = unref(userStore.getUserInfo).username;
@@ -195,7 +196,7 @@
         height: '860px',
         document: {
           title: '文档管理',
-          url: remoteUrl + ':9999/safety/reportInfo/onlyOffice/read?id=' + props.editID + '&type=' + props.reportLogHis, //id表示文件id,后端接口用这个id来加载文件
+          url: remoteUrl + '/safety/reportInfo/onlyOffice/read?id=' + props.editID + '&type=' + props.reportLogHis, //id表示文件id,后端接口用这个id来加载文件
           fileType: props.fileType == 'doc' ? 'docx' : props.fileType == 'xls' ? 'xlsx' : props.fileType == 'ppt' ? 'pptx' : props.fileType, //当文件类型为doc、xls、ppt时,对应用docx、xlsx、pptx否则会保存异常。
           key: '',
           lang: 'zh-CN',
@@ -209,7 +210,7 @@
         editorConfig: {
           lang: 'zh-CN',
           mode: props.reportLogHis ? 'view' : 'edit', //view:只读且可复制内容,edit:可编辑
-          callbackUrl: remoteUrl + ':9999/safety/reportInfo/onlyOffice/save?id=' + props.editID + '&type=' + props.reportLogHis, //id表示文件id,后端接口用这个id来加载文件
+          callbackUrl: remoteUrl + '/safety/reportInfo/onlyOffice/save?id=' + props.editID + '&type=' + props.reportLogHis, //id表示文件id,后端接口用这个id来加载文件
           coEditing: {
             mode: 'fast',
             change: true,