From 201e38e8f961269c3961e0709563338536196242 Mon Sep 17 00:00:00 2001
From: qx <1084500556@qq.com>
Date: 星期一, 28 七月 2025 17:38:20 +0800
Subject: [PATCH] Merge branch 'master' of http://101.42.27.146:5001/r/ltkj_peisweb

---
 src/main.js |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/main.js b/src/main.js
index 6aee2e6..e85e3f5 100644
--- a/src/main.js
+++ b/src/main.js
@@ -17,7 +17,7 @@
 import "./assets/icons";
 import "./permission";
 import { getDicts } from "@/api/system/dict/data";
-import { getConfigKey } from "@/api/system/config";
+import { getConfigKey,yidu } from "@/api/system/config";
 import {
   parseTime,
   resetForm,
@@ -36,7 +36,7 @@
 import DictData from "@/components/DictData";
 import * as echarts from "echarts";
 import VueBarcode from "vue-barcode";
-// import { initWebSocket, closeWebSocket } from "@/utils/websocket";
+import { initWebSocket, closeWebSocket } from "@/utils/websocket";
 import RightToolbar from "@/components/RightToolbar"
 
 // 娉ㄥ唽鍏ㄥ眬缁勪欢
@@ -63,7 +63,7 @@
 Vue.prototype.$echarts = echarts;
 
 // 閫氱煡绠$悊锛氳窡韪綋鍓嶉�氱煡鍜屽亸绉婚噺
-/* const notificationManager = {
+const notificationManager = {
   notifications: [], // 瀛樺偍褰撳墠鏄剧ず鐨勯�氱煡瀹炰緥
   baseOffset: 50, // 鍩虹鍋忕Щ閲�
   notificationHeight: 80, // 姣忎釜閫氱煡鐨勪及璁¢珮搴︼紙鍖呮嫭闂磋窛锛�
@@ -94,10 +94,10 @@
       notification.customClass = notification.customClass.replace(/notification-\d+/, `notification-${index + 1}`);
     });
   }
-}; */
+};
 
 // 鍏ㄥ眬閫氱煡鏂规硶锛屾坊鍔犫�滃凡璇烩�濇寜閽�
-/* Vue.prototype.$showNotification = function (type, title, message, onClick, noticeId) {
+ Vue.prototype.$showNotification = function (type, title, message, onClick, noticeId) {
   console.log('瑙﹀彂閫氱煡:', { type, title, message, noticeId, noticeIdType: typeof noticeId }); // 璋冭瘯锛氳褰� noticeId 鍜岀被鍨�
   const h = this.$createElement;
   const notification = this.$notify({
@@ -134,7 +134,8 @@
     appendTo: document.body
   });
   notificationManager.addNotification(notification); // 娣诲姞鍒伴�氱煡绠$悊
-}; */
+};
+
 
 // 鐩戝惉璺敱鍙樺寲
 router.afterEach(() => {
@@ -142,14 +143,14 @@
 });
 
 // 瀹氫箟 WebSocket 鍒濆鍖栨爣蹇楋紝闃叉閲嶅杩炴帴
-// let isWebSocketInitialized = false;
+let isWebSocketInitialized = false;
 
 const app = new Vue({
   el: "#app",
   router,
   store,
   render: (h) => h(App),
-  /* mounted() {
+ mounted() {
     const token = store.state.user.token || Cookies.get('token') || '';
     if (token && !isWebSocketInitialized) {
       console.log('鍒濆鍖� WebSocket锛孴oken:', token);
@@ -207,7 +208,7 @@
       isWebSocketInitialized = false;
       console.log('Vue 瀹炰緥閿�姣侊紝WebSocket 宸叉竻鐞�');
     }
-  } */
+  }
 });
 
 // 娉ㄥ唽鎻掍欢

--
Gitblit v1.8.0