From e1dd1dc9ba7135e3d64a65587d6c1be2c3e18c5a Mon Sep 17 00:00:00 2001 From: wangxinhui <wangxinhui@hnkhzn.com> Date: 星期三, 25 六月 2025 11:01:22 +0800 Subject: [PATCH] 提交最新优化代码 --- 代码管理/WMS/WIDESEA_WMSClient/src/views/Index.vue | 44 +++++++++++++++++++++++--------------------- 1 files changed, 23 insertions(+), 21 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/Index.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/Index.vue" index db301d8..a882a94 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/Index.vue" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/Index.vue" @@ -71,7 +71,7 @@ <img class="user-header" :src="userImg" :onerror="errorImg" /> </div> <div class="user"> - <span>{{ userName }}</span> + <span>{{ userTrueName }}</span> <span id="index-date"></span> </div> <div class="settings"> @@ -264,7 +264,7 @@ { name: "white", color: "#fff" }, ]); const links = ref([ - { text: "涓汉涓績", path: "/UserInfo", id: -1, icon: "el-icon-s-custom" }, + // { text: "涓汉涓績", path: "/UserInfo", id: -1, icon: "el-icon-s-custom" }, { text: "瀹夊叏閫�鍑�", path: "/login", @@ -281,6 +281,7 @@ //2022.05.29澧炲姞tab閫夐」涓庤彍鍗曡仈鍔ㄥ姛鑳� const currentMenuId = ref(0); const userName = ref("--"); + const userTrueName = ref("--"); const userInfo = ref({}); const visibleItem = reactive({ left: false, @@ -323,24 +324,24 @@ }); }; - const createSocket = (url) => { - // 鍒涘缓WebSocket杩炴帴 - //"ws://127.0.0.1:9295/admin" - client = new WebSocket(url); + // const createSocket = (url) => { + // // 鍒涘缓WebSocket杩炴帴 + // //"ws://127.0.0.1:9295/admin" + // client = new WebSocket(url); - client.onopen = function () { - client.onmessage = handleMessage; - store.commit("setWebsocket", client); - console.log("WebSocket 杩炴帴鎴愬姛"); - }; + // client.onopen = function () { + // client.onmessage = handleMessage; + // store.commit("setWebsocket", client); + // console.log("WebSocket 杩炴帴鎴愬姛"); + // }; - client.onclose = function () { - console.log("WebSocket 杩炴帴鍏抽棴"); - setTimeout(createSocket, 10000); - }; - - client.onerror = function () {}; - }; + // client.onclose = function () { + // console.log("WebSocket 杩炴帴鍏抽棴"); + // setTimeout(createSocket, 10000); + // }; + // //鐩戝惉socket閿欒淇℃伅 + // client.onerror = function () {}; + // }; const changeTheme = (name) => { if (theme.value != name) { @@ -598,14 +599,14 @@ let _userInfo = store.getters.getUserInfo(); if (_userInfo) { - console.log(_userInfo); - userName.value = _userInfo.trueNmae; + userName.value = _userInfo.userName; + userTrueName.value = _userInfo.userTrueName; if (_userInfo.img) { userImg.value = _config.base.getImgSrc(_userInfo.img, http.ipAddress); } } - createSocket("ws://127.0.0.1:9296/" + _userInfo.userName); + // createSocket("ws://127.0.0.1:9296/" + _userInfo.userName); Object.assign(_config.$tabs, { open: open, close: close }); @@ -661,6 +662,7 @@ errorImg, userInfo, userName, + userTrueName, userImg, selectId, selectMenuIndex, -- Gitblit v1.9.3