ezhizao_zx 3 月之前
父節點
當前提交
913e3cf2c0
共有 1 個文件被更改,包括 10 次插入9 次删除
  1. 10 9
      src/views/business/outsourceInspectionVerify/index.vue

+ 10 - 9
src/views/business/outsourceInspectionVerify/index.vue

@@ -153,6 +153,7 @@ import {
 import { nextTick } from "vue";
 import { getToken } from '@/utils/auth'
 import useUserStore from '@/store/modules/user'
+import { patternNginxExportWsUrl } from "../../utils/ws"
 const { proxy } = getCurrentInstance();
 /** 字典数组区 */
 const { outsource_before_checkout_verify_status } = proxy.useDict(
@@ -222,9 +223,9 @@ function handleQuery() {
 
 /** 重置按钮操作 */
 function resetQuery() {
-  queryParams.value.endTime =  proxy.moment().format("YYYY-MM-DD"),
-  queryParams.value.startTime =  proxy.moment().subtract(1, "month").format("YYYY-MM-DD"),
-  proxy.resetForm("queryRef");
+  queryParams.value.endTime = proxy.moment().format("YYYY-MM-DD"),
+    queryParams.value.startTime = proxy.moment().subtract(1, "month").format("YYYY-MM-DD"),
+    proxy.resetForm("queryRef");
   handleQuery();
 }
 //批量通过
@@ -405,12 +406,12 @@ async function createWebSocket(id, token) {
     // const options = { headers: { Authorization: 'Bearer ' + token } }
     // console.log(options)
     var itemUrl = document.location.origin;
-    var wsUrl = "";
-    if (itemUrl.includes(hostIp)) {
-      wsUrl = innetUrl;
-    } else {
-      wsUrl = outnetUrl;
-    }
+    var wsUrl = patternNginxExportWsUrl();
+    // if (itemUrl.includes(hostIp)) {
+    //   wsUrl = innetUrl;
+    // } else {
+    //   wsUrl = outnetUrl;
+    // }
     ws = new WebSocket(wsUrl + id)
   } catch (e) {
     console.log(e)