From ce1292c9cf37195b6abd2699dfc5d6cb3e143c9b Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期日, 12 四月 2026 23:38:19 +0800
Subject: [PATCH] feat(MES): 添加MES接口相关实体和DTO JS扩展文件至JSX格式并更新配置

---
 Code/WCS/WIDESEAWCS_Client/src/views/Index.vue |   99 +++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 78 insertions(+), 21 deletions(-)

diff --git a/Code/WCS/WIDESEAWCS_Client/src/views/Index.vue b/Code/WCS/WIDESEAWCS_Client/src/views/Index.vue
index fa2bff7..87753e2 100644
--- a/Code/WCS/WIDESEAWCS_Client/src/views/Index.vue
+++ b/Code/WCS/WIDESEAWCS_Client/src/views/Index.vue
@@ -116,11 +116,12 @@
 @import "./index/index.less";
 </style>
 <script>
-import loading from "@/components/basic/RouterLoading";
+import loading from "@/components/basic/RouterLoading.vue";
 import VolMenu from "@/components/basic/VolElementMenu.vue";
 import Message from "./index/Message.vue";
 import MessageConfig from "./index/MessageConfig.js";
-var imgUrl = require("@/assets/imgs/wcs_x.png");
+import imgUrl from "@/assets/imgs/wcs_x.png";
+import errorImgSrc from "@/assets/imgs/error-img.png";
 var $this;
 var $interval;
 var $indexDate;
@@ -150,7 +151,7 @@
       otherTabs: true,
       menuLeft: 0,
       menuTop: 0,
-      //  contextMenuVisible: false, // 鍙抽敭鍏抽棴鏄�/闅�
+      //  contextMenuVisible: false, // 鍙抽敭鍏抽棴鏄惁鍙
     };
   },
   setup(props, context) {
@@ -177,21 +178,21 @@
     ]);
     const links = ref([
       // {
-      //   text: "妗嗘灦瑙嗛",
+      //   text: "妗嗘灦瑙嗛鏁欑▼",
       //   path: "https://www.cctalk.com/m/group/90268531",
       //   id: -3,
       // },
-      // { text: "澶у睆鏁版嵁", path: "/bigdata", id: -3 },
+      // { text: "澶ф暟鎹�", path: "/bigdata", id: -3 },
       // {
       //   text: "妗嗘灦鏂囨。",
       //   path: "http://v2.volcore.xyz/document/guide",
       //   id: -2,
       // },   {
-      //   text: "妗嗘灦浼佷笟鐗�",
+      //   text: "妗嗘灦浜у搧",
       //   path: "http://pro.volcore.xyz/",
       //   id: 10,
       // },
-      { text: "涓汉涓績", path: "/UserInfo", id: -1, icon: "el-icon-s-custom" },
+      { text: "涓汉淇℃伅", path: "/UserInfo", id: -1, icon: "el-icon-s-custom" },
       {
         text: "瀹夊叏閫�鍑�",
         path: "/login",
@@ -200,7 +201,7 @@
       },
     ]);
     const errorImg = ref(
-      'this.src="' + require("@/assets/imgs/error-img.png") + '"'
+      'this.src="' + errorImgSrc + '"'
     );
     const selectId = ref("1");
     // 銆愰椤点�戞爣绛惧簭鍙�(褰撳墠鍙抽敭閫変腑鐨勮彍鍗�)
@@ -273,11 +274,11 @@
         navigation.push({
           //  orderNo: String(navigation.length),// 搴忓彿
           id: item.id + "",
-          name: item.name || item.text || "鏃犳爣棰�",
+          name: item.name || item.text || "鏃犳爣绛�",
           path: item.path,
           query: item.query, //2021.03.20淇鑷畾涔変簩娆℃墦寮�$tabs鏃跺弬鏁颁涪澶辩殑闂
         });
-        //鏂版墦寮�鐨則ab绉昏嚦鏈�鍚庝竴涓�夐」
+        //鏂板缓鎵撳紑鐨則ab閫変腑鍒版渶鍚庝竴涓�夐」
         selectId.value = navigation.length - 1 + "";
       } else {
         selectId.value = _index + "";
@@ -289,7 +290,7 @@
         // this.$router.push(item);
       }
       currentMenuId.value = item.id * 1;
-      // tab鑿滃崟缁戝畾鍙抽敭浜嬩欢
+      // tab鍙抽敭鑿滃崟缁戝畾鐐瑰嚮浜嬩欢
       proxy.$nextTick(function (e) {
         proxy.bindRightClickMenu(true);
       });
@@ -398,7 +399,7 @@
         visibleItem.right = selectMenuIndex.value != navigation.length - 1;
         //鍙湁涓や釜鑿滃崟鏃朵笉鏄剧ず鍏抽棴宸﹁竟
         visibleItem.left = navigation.length != 2;
-        //鍙湁涓や釜鑿滃崟鏃朵笉鏄剧ず鍏抽棴鍏朵粬
+        //鍙湁涓や釜鑿滃崟鏃朵笉鏄剧ず鍏抽棴鍏朵粬鑿滃崟
         visibleItem.other = navigation.length != 2;
       }
       contextMenuVisible.value = true;
@@ -421,7 +422,7 @@
       });
     };
     /**
-     * 鍏抽棴鍏跺畠鏍囩椤�
+     * 鍏抽棴鍏朵粬鏍囩椤�
      * @param {*} par 鍏抽棴绫诲瀷(left,right,other)
      */
     const closeTabs = (value) => {
@@ -456,7 +457,7 @@
           break;
         }
         default: {
-          //鍏抽棴鎵�鏈�
+          //鍏抽棴鎵�鏈夋爣绛�
           navigation.splice(1, navigation.length);
           toHome();
           break;
@@ -472,7 +473,7 @@
     watch(
       () => contextMenuVisible.value,
       (newVal, oldVal) => {
-        // 鐩戣
+        // 鐩戣 contextMenuVisible 鐨勫彉鍖栵紝娣诲姞鎴栫Щ闄ょ偣鍑讳簨浠剁洃鍚櫒
         if (newVal) {
           document.body.addEventListener("click", closeTabsMenu);
         } else {
@@ -484,6 +485,61 @@
     /**
      * 绯荤粺鍒涘缓寮�濮�
      */
+    /**
+     * 鏂规硶鐩殑锛氳ˉ榻愬悗绔彍鍗曟湭閰嶇疆鏃剁殑鏂伴〉闈㈠叆鍙o紝閬垮厤鏂板椤甸潰鏃犲叆鍙c��
+     * 鍙傛暟鍚箟锛歞ata 涓哄悗绔繑鍥炵殑鑿滃崟鏁扮粍銆�
+     * 杩斿洖鍊硷細杩斿洖琛ラ綈鍚庣殑鑿滃崟鏁扮粍銆�
+     * 鍏抽敭閫昏緫锛氫粎鍦ㄨ彍鍗曚腑涓嶅瓨鍦ㄧ浉鍚� url 鏃惰拷鍔犻粯璁よ彍鍗曪紝閬垮厤瑕嗙洊宸叉湁閰嶇疆銆�
+     * 寮傚父澶勭悊锛氳鏂规硶浠呮搷浣滃唴瀛樻暟鎹紝涓嶆秹鍙婂閮ㄨ皟鐢紝寮傚父鐢变笂灞傛祦绋嬬粺涓�鎹曡幏銆�
+     */
+    const ensureBuiltinMenus = (data) => {
+      const menus = Array.isArray(data) ? data : [];
+      const exists = (url) => menus.some((m) => (m.url || "") === url);
+      const maxId = menus.reduce((max, item) => {
+        const current = Number(item.id);
+        return Number.isFinite(current) ? Math.max(max, current) : max;
+      }, 0);
+
+      const defaultMenus = [
+        // {
+        //   id: maxId + 1001,
+        //   name: "绉熸埛绠$悊",
+        //   url: "/Sys_Tenant",
+        //   parentId: 0,
+        //   icon: "el-icon-office-building",
+        //   enable: 1,
+        //   tableName: "Sys_Tenant",
+        //   permission: ["Search", "Add", "Update", "Delete"],
+        // },
+        // {
+        //   id: maxId + 1002,
+        //   name: "浠诲姟鍘嗗彶",
+        //   url: "/taskHty",
+        //   parentId: 0,
+        //   icon: "el-icon-time",
+        //   enable: 1,
+        //   tableName: "taskHty",
+        //   permission: ["Search", "Export"],
+        // },
+        {
+          id: maxId + 1003,
+          name: "璋冨害鎺у埗",
+          url: "/scheduler",
+          parentId: 0,
+          icon: "el-icon-video-play",
+          enable: 1,
+          tableName: "scheduler",
+          permission: ["Search", "Update"],
+        },
+      ];
+
+      defaultMenus.forEach((menu) => {
+        if (!exists(menu.url)) {
+          menus.push(menu);
+        }
+      });
+      return menus;
+    };
     const created = () => {
       let _theme = localStorage.getItem("vol3_theme");
       if (_theme) {
@@ -500,6 +556,7 @@
       Object.assign(_config.$tabs, { open: open, close: close });
 
       http.get("api/Sys_Menu/getTreeMenu", {}, true).then((data) => {
+        data = ensureBuiltinMenus(data);
         data.push({ id: "1", name: "棣栭〉", url: "/home" }); // 涓轰簡鑾峰彇閫変腑id浣跨敤
         data.forEach((d) => {
           d.path = (d.url || "").replace("/Manager", "");
@@ -512,7 +569,7 @@
         menuOptions.value = data;
         permissionInited.value = true;
 
-        //寮�鍚秷鎭帹閫侊紙main.js涓缃槸鍚﹀紑鍚痵ignalR锛�2022.05.05
+         //寮�鍚秷鎭帹閫侊紙main.js涓缃槸鍚﹀紑鍚痵ignalR锛�2022.05.05
         if (_config.$global.signalR) {
           MessageConfig(http, (result) => {
             messageList.unshift(result);
@@ -531,7 +588,7 @@
           item = links.value.find((x) => {
             return x.path == router.currentRoute.value.path; //this.$route.path;
           });
-          //鏌ユ壘鏈�鍚庝竴娆¤烦杞殑椤甸潰
+          //鏌ユ壘鏈�鍚庤闂殑椤甸潰
           if (!item) {
             item = getItem();
           }
@@ -578,7 +635,7 @@
     };
   },
   /**
-   * 鎸傝浇閽╁瓙鍑芥暟
+   * 鎸傝浇瀹屾垚鍚庢墽琛岀殑鍑芥暟
    */
   mounted() {
     let _date = showTime();
@@ -593,9 +650,9 @@
 
   methods: {
     /**
-     * 缁戝畾鍙抽敭浜嬩欢
-     * @param {*} enable 鏄惁鍚敤鍙抽敭浜嬩欢[true:鍚敤;false:绂佺敤;]
-     * @param {*} $event 浜嬩欢
+     * 缁戝畾鍙抽敭鑿滃崟浜嬩欢
+     * @param {*} enable 鏄惁鍚敤鍙抽敭鑿滃崟浜嬩欢[true:鍚敤;false:绂佺敤;]
+     * @param {*} $event 浜嬩欢瀵硅薄
      */
     bindRightClickMenu(enable) {
       if (!enable) return;

--
Gitblit v1.9.3