| ¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "session_id": "e6b9225b-2892-4ba9-8585-7ee1b6e2ef6f", |
| | | "ended_at": "2026-03-24T03:25:50.783Z", |
| | | "reason": "other", |
| | | "agents_spawned": 0, |
| | | "agents_completed": 0, |
| | | "modes_used": [] |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "version": "1.0.0", |
| | | "lastScanned": 1774322743799, |
| | | "projectRoot": "d:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Client", |
| | | "techStack": { |
| | | "languages": [ |
| | | { |
| | | "name": "JavaScript/TypeScript", |
| | | "version": null, |
| | | "confidence": "high", |
| | | "markers": [ |
| | | "package.json" |
| | | ] |
| | | } |
| | | ], |
| | | "frameworks": [ |
| | | { |
| | | "name": "vue", |
| | | "version": "3.2.37", |
| | | "category": "frontend" |
| | | }, |
| | | { |
| | | "name": "vite", |
| | | "version": "5.0.0", |
| | | "category": "build" |
| | | } |
| | | ], |
| | | "packageManager": "pnpm", |
| | | "runtime": null |
| | | }, |
| | | "build": { |
| | | "buildCommand": "pnpm build", |
| | | "testCommand": null, |
| | | "lintCommand": "pnpm lint", |
| | | "devCommand": null, |
| | | "scripts": { |
| | | "serve": "vite", |
| | | "build": "vite build", |
| | | "preview": "vite preview", |
| | | "lint": "eslint --ext .js,.vue src" |
| | | } |
| | | }, |
| | | "conventions": { |
| | | "namingStyle": null, |
| | | "importStyle": null, |
| | | "testPattern": null, |
| | | "fileOrganization": "type-based" |
| | | }, |
| | | "structure": { |
| | | "isMonorepo": false, |
| | | "workspaces": [], |
| | | "mainDirectories": [ |
| | | "public", |
| | | "src", |
| | | "tests" |
| | | ], |
| | | "gitBranches": { |
| | | "defaultBranch": "master", |
| | | "branchingStrategy": null |
| | | } |
| | | }, |
| | | "customNotes": [], |
| | | "directoryMap": { |
| | | "config": { |
| | | "path": "config", |
| | | "purpose": "Configuration files", |
| | | "fileCount": 1, |
| | | "lastAccessed": 1774322743642, |
| | | "keyFiles": [ |
| | | "buttons.js" |
| | | ] |
| | | }, |
| | | "dist": { |
| | | "path": "dist", |
| | | "purpose": "Distribution/build output", |
| | | "fileCount": 3, |
| | | "lastAccessed": 1774322743642, |
| | | "keyFiles": [ |
| | | "index.html", |
| | | "wcslogo.png", |
| | | "wms_d.png" |
| | | ] |
| | | }, |
| | | "public": { |
| | | "path": "public", |
| | | "purpose": "Public files", |
| | | "fileCount": 3, |
| | | "lastAccessed": 1774322743680, |
| | | "keyFiles": [ |
| | | "index.html", |
| | | "wcslogo.png", |
| | | "wms_d.png" |
| | | ] |
| | | }, |
| | | "src": { |
| | | "path": "src", |
| | | "purpose": "Source code", |
| | | "fileCount": 2, |
| | | "lastAccessed": 1774322743680, |
| | | "keyFiles": [ |
| | | "App.vue", |
| | | "main.js" |
| | | ] |
| | | }, |
| | | "tests": { |
| | | "path": "tests", |
| | | "purpose": "Test files", |
| | | "fileCount": 0, |
| | | "lastAccessed": 1774322743682, |
| | | "keyFiles": [] |
| | | }, |
| | | "dist\\assets": { |
| | | "path": "dist\\assets", |
| | | "purpose": "Static assets", |
| | | "fileCount": 80, |
| | | "lastAccessed": 1774322743684, |
| | | "keyFiles": [ |
| | | "401-D9QhAVFF.js", |
| | | "404-DCIcd6re.js", |
| | | "Audit-C52MvHzW.css" |
| | | ] |
| | | }, |
| | | "dist\\static": { |
| | | "path": "dist\\static", |
| | | "purpose": "Static files", |
| | | "fileCount": 1, |
| | | "lastAccessed": 1774322743684, |
| | | "keyFiles": [ |
| | | "login_bg.png" |
| | | ] |
| | | }, |
| | | "public\\static": { |
| | | "path": "public\\static", |
| | | "purpose": "Static files", |
| | | "fileCount": 1, |
| | | "lastAccessed": 1774322743685, |
| | | "keyFiles": [ |
| | | "login_bg.png" |
| | | ] |
| | | }, |
| | | "src\\api": { |
| | | "path": "src\\api", |
| | | "purpose": "API routes", |
| | | "fileCount": 3, |
| | | "lastAccessed": 1774322743686, |
| | | "keyFiles": [ |
| | | "http.js", |
| | | "permission.js", |
| | | "useTest.js" |
| | | ] |
| | | }, |
| | | "src\\assets": { |
| | | "path": "src\\assets", |
| | | "purpose": "Static assets", |
| | | "fileCount": 1, |
| | | "lastAccessed": 1774322743687, |
| | | "keyFiles": [ |
| | | "logo.png" |
| | | ] |
| | | }, |
| | | "src\\components": { |
| | | "path": "src\\components", |
| | | "purpose": "UI components", |
| | | "fileCount": 0, |
| | | "lastAccessed": 1774322743688, |
| | | "keyFiles": [] |
| | | }, |
| | | "src\\views": { |
| | | "path": "src\\views", |
| | | "purpose": "View templates", |
| | | "fileCount": 3, |
| | | "lastAccessed": 1774322743689, |
| | | "keyFiles": [ |
| | | "Home.vue", |
| | | "Index.vue", |
| | | "Login.vue" |
| | | ] |
| | | } |
| | | }, |
| | | "hotPaths": [], |
| | | "userDirectives": [] |
| | | } |
| | |
| | | <span style="display: none">{{ navIndex }}</span> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | <!-- å³é®èå --> |
| | | <!-- éæ½æé¿æ»å´ --> |
| | | <div v-show="contextMenuVisible"> |
| | | <ul :style="{ left: menuLeft + 'px', top: menuTop + 'px' }" class="contextMenu"> |
| | | <li v-show="visibleItem.all"> |
| | | <el-button link @click="closeTabs()"> |
| | | <i class="el-icon-close"></i> |
| | | {{ |
| | | navigation.length == 2 ? "å
³éèå" : "å
³éææ" |
| | | navigation.length == 2 ? "éæ½æ£´é¿æ»å´" : "éæ½æ£´éµâ¬é? |
| | | }}</el-button> |
| | | </li> |
| | | <li v-show="visibleItem.left"> |
| | | <el-button link @click="closeTabs('left')"><i class="el-icon-back"></i>å
³é左边</el-button> |
| | | <el-button link @click="closeTabs('left')"><i class="el-icon-back"></i>éæ½æ£´å®¸ï¹ç«</el-button> |
| | | </li> |
| | | <li v-show="visibleItem.right"> |
| | | <el-button link @click="closeTabs('right')"> |
| | | <i class="el-icon-right"></i>å
³éå³è¾¹</el-button> |
| | | <i class="el-icon-right"></i>éæ½æ£´éå® ç«</el-button> |
| | | </li> |
| | | <li v-show="visibleItem.other"> |
| | | <el-button link @click="closeTabs('other')"><i class="el-icon-right"></i>å
³éå
¶ä» |
| | | <el-button link @click="closeTabs('other')"><i class="el-icon-right"></i>éæ½æ£´éæµç²¬ |
| | | </el-button> |
| | | </li> |
| | | </ul> |
| | |
| | | </el-scrollbar> |
| | | </div> |
| | | </div> |
| | | <el-drawer title="鿩䏻é¢" v-model="drawer_model" direction="rtl" destroy-on-close> |
| | | <el-drawer title="é«å¤å«¨æ¶å©î½" v-model="drawer_model" direction="rtl" destroy-on-close> |
| | | <div class="theme-selector"> |
| | | <div @click="changeTheme(item.name)" class="item" v-for="(item, index) in theme_color" :key="index" |
| | | :style="{ background: item.color }"> |
| | |
| | | </div> |
| | | </el-drawer> |
| | | |
| | | <el-drawer title="æ¶æ¯å表" v-model="messageModel" direction="rtl" destroy-on-close> |
| | | <el-drawer title="å¨å ä¼
鿥ã" v-model="messageModel" direction="rtl" destroy-on-close> |
| | | <Message :list="messageList"></Message> |
| | | </el-drawer> |
| | | </div> |
| | |
| | | otherTabs: true, |
| | | menuLeft: 0, |
| | | menuTop: 0, |
| | | // contextMenuVisible: false, // å³é®å
³éæ¾/é |
| | | // contextMenuVisible: false, // éæ½æéæ½æ£´é?é
? |
| | | }; |
| | | }, |
| | | setup(props, context) { |
| | | // è·åå
¨å±å±æ§åæ¹æ³ |
| | | // é¾å³°å½éã¥ç¬çç´â¬Ñæ°éè§ç¡¶ |
| | | const { proxy } = getCurrentInstance(); |
| | | |
| | | // èå导èªé»è®¤å®½åº¦ |
| | | // é¿æ»å´çµè°å
æ¦æ¨¿î
»ç¹è害 |
| | | const menuWidth = ref(200); |
| | | const contextMenuVisible = ref(false); |
| | | const isCollapse = ref(false); |
| | |
| | | ]); |
| | | 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: "æ¡æ¶ææ¡£", |
| | | // 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: "å®å
¨éåº", |
| | | text: "ç¹å¤åé«â¬é?, |
| | | path: "/login", |
| | | id: -4, |
| | | icon: "el-icon-switch-button", |
| | |
| | | 'this.src="' + errorImgSrc + '"' |
| | | ); |
| | | const selectId = ref("1"); |
| | | // ãé¦é¡µãæ ç¾åºå·(å½åå³é®éä¸çèå) |
| | | // éæ°î»æ¤¤ç¹â¬æç£ç»æ§ç°é?褰æ³å¢ éæ½æé«å¤è
é¨å®å½é? |
| | | const selectMenuIndex = ref("0"); |
| | | //2022.05.29å¢å tabé项ä¸èåèå¨åè½ |
| | | //2022.05.29æ¾§ç²å§tabé«å¤ãæ¶åº¤å½éæ¡ä»éã¥å§é³? |
| | | const currentMenuId = ref(0); |
| | | const userName = ref("--"); |
| | | const userInfo = ref({}); |
| | |
| | | }); |
| | | const userImg = ref(""); |
| | | const navigation = reactive([ |
| | | { orderNo: "0", id: "1", name: "é¦é¡µ", path: "/home" }, |
| | | { orderNo: "0", id: "1", name: "棣æ ã", path: "/home" }, |
| | | ]); |
| | | const logo = ref(imgUrl); |
| | | const theme = ref("blue2"); |
| | |
| | | isCollapse.value = !isCollapse.value; |
| | | menuWidth.value = isCollapse.value ? 63 : 200; |
| | | }; |
| | | //2021.08.28弿¾æå¨æå èåæ¹æ³ |
| | | //2021.08.28寮â¬éç¬å¢éã¦å§éçºå½éææå¨? |
| | | _config.menu = { |
| | | show() { |
| | | toggleLeft(); |
| | |
| | | localStorage.setItem("vol3_theme", name); |
| | | }; |
| | | const to = (item) => { |
| | | /* 2020.07.31å¢å æå¨æå¼tabs*/ |
| | | /* 2020.07.31æ¾§ç²å§éµå¬ªå§©éµæ³ç´tabs*/ |
| | | if (item.path.indexOf("http") != -1) { |
| | | window.open(item.path); |
| | | return; |
| | | } |
| | | if (typeof item == "string" || item.path == "/login") { |
| | | if (item == "/login" || item.path == "/login") { |
| | | //确认æ¯å¦éåº |
| | | //çºî¿î
»éîæé«â¬é? |
| | | store.commit("clearUserInfo", ""); |
| | | window.location.href = "/"; |
| | | return; |
| | |
| | | open(item); |
| | | }; |
| | | const open = (item, useRoute) => { |
| | | /* 2020.07.31å¢å æå¨æå¼tabs*/ |
| | | /* 2020.07.31æ¾§ç²å§éµå¬ªå§©éµæ³ç´tabs*/ |
| | | let _index = navigation.findIndex((x) => { |
| | | return x.path == item.path; |
| | | }); |
| | | if (_index == -1) { |
| | | navigation.push({ |
| | | // orderNo: String(navigation.length),// åºå· |
| | | // 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æ¶åæ°ä¸¢å¤±çé®é¢ |
| | | query: item.query, //2021.03.20æ·î¼î²é·îç¾æ¶å¤ç°©å¨â墦寮â¬$tabsé跺弬é颿¶ªæ¾¶è¾©æ®éîî½ |
| | | }); |
| | | //æ°æå¼çtabç§»è³æåä¸ä¸ªé项 |
| | | //éç墦寮â¬é¨åabç»æå¦éâ¬éåºç«´æ¶îâ¬å¤ã |
| | | selectId.value = navigation.length - 1 + ""; |
| | | } else { |
| | | selectId.value = _index + ""; |
| | | } |
| | | if (useRoute === undefined) { |
| | | //éæ åèåï¼è®°å½æå䏿¬¡è·³è½¬ç页é¢ï¼ç¨äºå·æ° |
| | | //éç´ç£éåå½éæªç´çæ¿ç¶éâ¬éåºç«´å¨Â¤ç¦æîæ®æ¤¤ç¸æ½°é岿¤æµåº¡åé? |
| | | setItem(item); |
| | | router.push(item); |
| | | // this.$router.push(item); |
| | | } |
| | | currentMenuId.value = item.id * 1; |
| | | // tabèåç»å®å³é®äºä»¶ |
| | | // tabé¿æ»å´ç¼æç¾éæ½ææµå¬©æ¬¢ |
| | | proxy.$nextTick(function (e) { |
| | | proxy.bindRightClickMenu(true); |
| | | }); |
| | | }; |
| | | const close = (path) => { |
| | | /* 2020.07.31å¢å æå¨æå¼tabs*/ |
| | | /* 2020.07.31æ¾§ç²å§éµå¬ªå§©éµæ³ç´tabs*/ |
| | | let index = navigation.findIndex((x) => { |
| | | return x.path == path; |
| | | }); |
| | | if (index == -1) { |
| | | return _config.$Message.error("æªæ¾å°èå"); |
| | | return _config.$Message.error("éî
å£éæå½é?); |
| | | } |
| | | removeNav(index); |
| | | }; |
| | | const setItem = (item) => { |
| | | /* 2020.07.31å¢å æå¨æå¼tabs*/ |
| | | /* 2020.07.31æ¾§ç²å§éµå¬ªå§©éµæ³ç´tabs*/ |
| | | localStorage.setItem( |
| | | window.location.origin + "_tabs", |
| | | JSON.stringify(item) |
| | | ); |
| | | }; |
| | | const getItem = () => { |
| | | /* 2020.07.31å¢å æå¨æå¼tabs*/ |
| | | /* 2020.07.31æ¾§ç²å§éµå¬ªå§©éµæ³ç´tabs*/ |
| | | let nav = localStorage.getItem(window.location.origin + "_tabs"); |
| | | return nav ? JSON.parse(nav) : null; |
| | | }; |
| | | const selectNav = (item) => { |
| | | //å级elementæ£å¼çä¿®æ¹ |
| | | //éå©éªelementå§ï½
ç´¡éå æ
¨é? |
| | | selectId.value = item.props.name; |
| | | let _path = navigation[item.index].path; |
| | | currentMenuId.value = ( |
| | |
| | | |
| | | const removeNav = (_index) => { |
| | | return new Promise(() => { |
| | | //å
³éçå½å项,跳转å°åä¸ä¸ªé¡µé¢ |
| | | //éæ½æ£´é¨å«ç¶éå¶ã,çºå® æµéæ¿å¢ æ¶â¬æ¶îãé? |
| | | if (selectId.value == _index + "") { |
| | | console.log(navigation[_index - 1]); |
| | | setItem(navigation[_index - 1]); |
| | | router.push({ |
| | | path: navigation[_index - 1].path, |
| | | //2022.06.27ä¿®å¤tabsäºæ¬¡åæ¢å忰䏢失çé®é¢ |
| | | //2022.06.27æ·î¼î²tabsæµå±¾î¼éå¨å´²é庡弬é颿¶ªæ¾¶è¾©æ®éîî½ |
| | | query: navigation[_index - 1].query, |
| | | }); |
| | | navigation.splice(_index, 1); |
| | |
| | | }); |
| | | }; |
| | | const onSelect = (treeId) => { |
| | | /* 2020.07.31å¢å æå¨æå¼tabs*/ |
| | | /* 2020.07.31æ¾§ç²å§éµå¬ªå§©éµæ³ç´tabs*/ |
| | | var item = getSelectMenuName(treeId); |
| | | open(item, false); |
| | | }; |
| | | |
| | | /** |
| | | * æ¾ç¤ºå³é®èå |
| | | * @param {*} e äºä»¶å¯¹è±¡ |
| | | * éå§ãéæ½æé¿æ»å´ |
| | | * @param {*} e æµå¬©æ¬¢çµç¡
è |
| | | */ |
| | | const openTabsMenu = function (e) { |
| | | e.preventDefault(); // 鲿¢é»è®¤èåå¼¹åº |
| | | e.preventDefault(); // éåîæ¦æ¨¿î
»é¿æ»å´å¯®ç°å |
| | | let tabId = e.target.id.split("-")[1] * 1; |
| | | |
| | | //è®°å½å½åéä¸çèåindex |
| | | //çæ¿ç¶è¤°æ³å¢ é«å¤è
é¨å®å½éæ³ndex |
| | | selectMenuIndex.value = |
| | | document.getElementById("pane-" + tabId).children[0].textContent * 1; |
| | | //åªæé¦é¡µæ¶ä¸æ¾ç¤º |
| | | //éî
æ¹æ££æ ãéæµç¬éå§ã |
| | | if (navigation.length == 1) { |
| | | return; |
| | | } |
| | | |
| | | //é¦é¡µè®¾ç½®æ¾ç¤ºå
³éå³è¾¹èå |
| | | //棣æ ãçå§çéå§ãéæ½æ£´éå® ç«é¿æ»å´ |
| | | if (!selectMenuIndex.value) { |
| | | visibleItem.all = false; |
| | | visibleItem.right = true; |
| | |
| | | visibleItem.other = false; |
| | | } else { |
| | | visibleItem.all = true; |
| | | //䏿¯æåä¸ä¸ªæ¾ç¤ºå
³éå³è¾¹èå |
| | | //æ¶å¶æ§¸éâ¬éåºç«´æ¶î
æ¨ç»åå§éî
彸æç¡
å½é? |
| | | visibleItem.right = selectMenuIndex.value != navigation.length - 1; |
| | | //åªæä¸¤ä¸ªè忶䏿¾ç¤ºå
³é左边 |
| | | //éî
æ¹æ¶ãéé¿æ»å´éæµç¬éå§ãéæ½æ£´å®¸ï¹ç« |
| | | visibleItem.left = navigation.length != 2; |
| | | //åªæä¸¤ä¸ªè忶䏿¾ç¤ºå
³éå
¶ä» |
| | | //éî
æ¹æ¶ãéé¿æ»å´éæµç¬éå§ãéæ½æ£´éæµç²¬ |
| | | visibleItem.other = navigation.length != 2; |
| | | } |
| | | contextMenuVisible.value = true; |
| | | // 设置å³é®èåæ¾ç¤ºçä½ç½® |
| | | // çå§çéæ½æé¿æ»å´éå§ãé¨åªç¶
ç¼? |
| | | proxy.menuLeft = |
| | | e.target.getBoundingClientRect().left - (isCollapse.value ? 63 : 198); //-e.target.clientWidth |
| | | proxy.menuTop = 36; |
| | | }; |
| | | |
| | | /** |
| | | * å
³éå³é®èå |
| | | * éæ½æ£´éæ½æé¿æ»å´ |
| | | */ |
| | | const closeTabsMenu = () => { |
| | | contextMenuVisible.value = false; |
| | |
| | | }); |
| | | }; |
| | | /** |
| | | * å
³éå
¶å®æ ç¾é¡µ |
| | | * @param {*} par å
³éç±»å(left,right,other) |
| | | * éæ½æ£´éè·ºç éå©î·æ¤¤? |
| | | * @param {*} par éæ½æ£´ç»«è¯²ç·(left,right,other) |
| | | */ |
| | | const closeTabs = (value) => { |
| | | let _menuId = navigation[selectId.value * 1].id; |
| | | let currnetIndex = selectId.value * 1; // navigation.findIndex(c => { return c.id == selectId.value }); |
| | | switch (value) { |
| | | case "left": { |
| | | // å é¤å·¦ä¾§tabæ ç¾ |
| | | navigation.splice(1, currnetIndex - 1); // å é¤å·¦ä¾§tabæ ç¾ |
| | | // éç»æ«å®¸ï¸¿æ¶tabéå©î· |
| | | navigation.splice(1, currnetIndex - 1); // éç»æ«å®¸ï¸¿æ¶tabéå©î· |
| | | break; |
| | | } |
| | | case "right": { |
| | | // å é¤å³ä¾§tabæ ç¾ |
| | | // éç»æ«éå
æ¶tabéå©î· |
| | | if (selectMenuIndex.value == 0) { |
| | | navigation.splice(currnetIndex); // å é¤å³ä¾§tabæ ç¾ |
| | | navigation.splice(currnetIndex); // éç»æ«éå
æ¶tabéå©î· |
| | | toHome(); |
| | | } else { |
| | | navigation.splice(currnetIndex + 1); // å é¤å³ä¾§tabæ ç¾ |
| | | navigation.splice(currnetIndex + 1); // éç»æ«éå
æ¶tabéå©î· |
| | | if (selectMenuIndex.value < currnetIndex) { |
| | | navigation.splice( |
| | | selectMenuIndex.value, |
| | |
| | | break; |
| | | } |
| | | case "other": { |
| | | // å é¤å
¶ä»æætabæ ç¾ |
| | | navigation.splice(currnetIndex + 1); // å é¤å³ä¾§tabæ ç¾(è¿éå¿
é¡»æç
§å³â左顺åºå é¤) |
| | | navigation.splice(1, currnetIndex - 1); // å é¤å·¦ä¾§tabæ ç¾ |
| | | // éç»æ«éæµç²¬éµâ¬é塼abéå©î· |
| | | navigation.splice(currnetIndex + 1); // éç»æ«éå
æ¶tabéå©î·(æ©æ¬å·è¹å´ãé¸å¤å鿥å宸ï¹ãæ´å¿å¹é? |
| | | navigation.splice(1, currnetIndex - 1); // éç»æ«å®¸ï¸¿æ¶tabéå©î· |
| | | break; |
| | | } |
| | | default: { |
| | | //å
³éææ |
| | | //éæ½æ£´éµâ¬é? |
| | | navigation.splice(1, navigation.length); |
| | | toHome(); |
| | | break; |
| | |
| | | watch( |
| | | () => contextMenuVisible.value, |
| | | (newVal, oldVal) => { |
| | | // çè§ |
| | | // 驿£î |
| | | if (newVal) { |
| | | document.body.addEventListener("click", closeTabsMenu); |
| | | } else { |
| | |
| | | ); |
| | | |
| | | /** |
| | | * ç³»ç»å建å¼å§ |
| | | * 绯è¤ç²ºéæ¶ç¼å¯®â¬æ¿®? |
| | | */ |
| | | /** |
| | | * æ¹æ³ç®çï¼è¡¥é½å端èåæªé
ç½®æ¶çæ°é¡µé¢å
¥å£ï¼é¿å
æ°å¢é¡µé¢æ å
¥å£ã |
| | | * åæ°å«ä¹ï¼data 为å端è¿åçèåæ°ç»ã |
| | | * è¿åå¼ï¼è¿åè¡¥é½åçèåæ°ç»ã |
| | | * å
³é®é»è¾ï¼ä»
å¨èåä¸ä¸åå¨ç¸å 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) { |
| | |
| | | Object.assign(_config.$tabs, { open: open, close: close }); |
| | | |
| | | http.get("api/Sys_Menu/getTreeMenu", {}, true).then((data) => { |
| | | data.push({ id: "1", name: "é¦é¡µ", url: "/home" }); // 为äºè·åéä¸idä½¿ç¨ |
| | | data = ensureBuiltinMenus(data); |
| | | data.push({ id: "1", name: "棣æ ã", url: "/home" }); // æ¶è½°ç°¡é¾å³°å½é«å¤è
idæµ£è·¨æ¤ |
| | | data.forEach((d) => { |
| | | d.path = (d.url || "").replace("/Manager", ""); |
| | | d.to = (d.url || "").replace("/Manager", ""); |
| | |
| | | menuOptions.value = data; |
| | | permissionInited.value = true; |
| | | |
| | | //å¼å¯æ¶æ¯æ¨éï¼main.jsä¸è®¾ç½®æ¯å¦å¼å¯signalRï¼2022.05.05 |
| | | //寮â¬éîç§·éî帹é«ä¾ç´main.jsæ¶î
¡îç¼î½æ§¸éï¹ç´éçµignalRé?022.05.05 |
| | | if (_config.$global.signalR) { |
| | | MessageConfig(http, (result) => { |
| | | messageList.unshift(result); |
| | |
| | | }); |
| | | } |
| | | |
| | | //å½åå·æ°æ¯ä¸æ¯é¦é¡µ |
| | | //褰æ³å¢ ééæéîç¬éîî»æ¤¤? |
| | | if (router.currentRoute.value.path != navigation[0].path) { |
| | | //æ¥æ¾ç³»ç»èå |
| | | //éã¦å£ç»¯è¤ç²ºé¿æ»å´ |
| | | let item = menuOptions.value.find((x) => { |
| | | return x.path == router.currentRoute.value.path; //this.$route.path; |
| | | }); |
| | | if (item) return onSelect(item.id); |
| | | //æ¥æ¾é¡¶é¨å¿«æ·è¿æ¥ |
| | | //éã¦å£æ¤¤å å´è¹î£åµæ©ç´å¸´ |
| | | item = links.value.find((x) => { |
| | | return x.path == router.currentRoute.value.path; //this.$route.path; |
| | | }); |
| | | //æ¥æ¾æå䏿¬¡è·³è½¬çé¡µé¢ |
| | | //éã¦å£éâ¬éåºç«´å¨Â¤ç¦æîæ®æ¤¤ç¸æ½° |
| | | if (!item) { |
| | | item = getItem(); |
| | | } |
| | |
| | | }; |
| | | }, |
| | | /** |
| | | * æè½½é©å彿° |
| | | * é¸åæµé½âçéè¥æ |
| | | */ |
| | | mounted() { |
| | | let _date = showTime(); |
| | |
| | | |
| | | methods: { |
| | | /** |
| | | * ç»å®å³é®äºä»¶ |
| | | * @param {*} enable æ¯å¦å¯ç¨å³é®äºä»¶[true:å¯ç¨;false:ç¦ç¨;] |
| | | * @param {*} $event äºä»¶ |
| | | * ç¼æç¾éæ½ææµå¬©æ¬¢ |
| | | * @param {*} enable éîæéîæ¤éæ½ææµå¬©æ¬¢[true:éîæ¤;false:ç»ä½ºæ¤;] |
| | | * @param {*} $event æµå¬©æ¬¢ |
| | | */ |
| | | bindRightClickMenu(enable) { |
| | | if (!enable) return; |
| | | let that = this; |
| | | // 使ç¨åçjs 为å个domç»å®é¼ æ å³å»äºä»¶ |
| | | // 浣跨æ¤éçºæjs æ¶åå´æ¶çomç¼æç¾æ¦§ç³ç£éå²å®æµå¬©æ¬¢ |
| | | that.$nextTick(() => { |
| | | let tab_top_dom = Object.assign( |
| | | [], |
| | |
| | | }, |
| | | |
| | | /** |
| | | * 鿝é©å彿° |
| | | * é¿â¬å§£ä¾æ¬çæ¬å±é? |
| | | */ |
| | | destroyed() { |
| | | $this = null; |
| | |
| | | }, |
| | | }); |
| | | const week = new Array( |
| | | "ææä¸", |
| | | "ææäº", |
| | | "ææä¸", |
| | | "ææå", |
| | | "ææäº", |
| | | "ææå
", |
| | | "æææ¥" |
| | | "éç¸æ¹¡æ¶â¬", |
| | | "éç¸æ¹¡æµ?, |
| | | "éç¸æ¹¡æ¶?, |
| | | "éç¸æ¹¡é¥?, |
| | | "éç¸æ¹¡æµ?, |
| | | "éç¸æ¹¡é?, |
| | | "éç¸æ¹¡é? |
| | | ); |
| | | function showTime() { |
| | | let date = new Date(); |
| | |
| | | "." + |
| | | (month < 10 ? "0" + month : month) + |
| | | "." + |
| | | (day < 10 ? "0" + day : day) + //202.08.08ä¿®å¤æ¥æå¤©æ°å°äº10æ¶æ·»å 0 |
| | | (day < 10 ? "0" + day : day) + //202.08.08æ·î¼î²éã¦æ¹¡æ¾¶âæçå¿ç°¬10éèµåé? |
| | | "" + |
| | | " " + |
| | | (hour < 10 ? "0" + hour : hour) + |
| | |
| | | (minutes < 10 ? "0" + minutes : minutes) + |
| | | ":" + |
| | | (second < 10 ? "0" + second : second) + |
| | | " " + //2020.08.30ä¿®å¤é¦é¡µæ¥æææå¤©ä¸æ¾ç¤ºçé®é¢ |
| | | " " + //2020.08.30æ·î¼î²æ££æ ãéã¦æ¹¡éç¸æ¹¡æ¾¶âç¬éå§ãé¨å¯æ£¶æ£°? |
| | | (week[date.getDay() - 1] || week[6]) |
| | | ); |
| | | } |
| | |
| | | - `dotnet run --project WIDESEA_WMSServer/WIDESEA_WMSServer.csproj`ï¼æ¬å°å¯å¨ APIã |
| | | |
| | | å端ï¼å¨ `WIDESEA_WMSClient` ç®å½æ§è¡ï¼ï¼ |
| | | - `yarn install`ï¼å®è£
ä¾èµã |
| | | - `yarn dev`ï¼å¯å¨ Vite å¼åæå¡ã |
| | | - `yarn build`ï¼æå»ºç产å
ã |
| | | - `yarn preview`ï¼é¢è§ç产æå»ºç»æã |
| | | - `yarn test:unit`ï¼è¿è¡åå
æµè¯ã |
| | | - `yarn lint`ï¼æ§è¡ä»£ç æ£æ¥ã |
| | | - `npm install`ï¼å®è£
ä¾èµã |
| | | - `npm run serve`ï¼å¯å¨æ¬å°å¼åæå¡ï¼Viteï¼ã |
| | | - `npm run build`ï¼æå»ºçäº§èµæºã |
| | | - `npm run lint`ï¼æ§è¡ ESLint æ£æ¥ã |
| | | |
| | | ## å¼åæµç¨å¼ºå¶è§è |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // 页颿©å±é
ç½®ï¼é¢çç»ä¸å¡äºæ¬¡æ©å±é»è¾ã |
| | | let extension = { |
| | | components: { |
| | | gridHeader: "", |
| | | gridBody: "", |
| | | gridFooter: "", |
| | | modelHeader: "", |
| | | modelBody: "", |
| | | modelFooter: "", |
| | | }, |
| | | tableAction: "", |
| | | buttons: { view: [], box: [], detail: [] }, |
| | | methods: { |
| | | onInit() { |
| | | return true; |
| | | }, |
| | | onInited() { |
| | | return true; |
| | | }, |
| | | searchBefore(param) { |
| | | return true; |
| | | }, |
| | | searchAfter(result) { |
| | | return true; |
| | | }, |
| | | addBefore(formData) { |
| | | return true; |
| | | }, |
| | | updateBefore(formData) { |
| | | return true; |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | return true; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | return true; |
| | | }, |
| | | }, |
| | | }; |
| | | |
| | | export default extension; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // 页颿©å±é
ç½®ï¼é¢çç»åºå页é¢äºæ¬¡å¼åã |
| | | let extension = { |
| | | components: { |
| | | gridHeader: "", |
| | | gridBody: "", |
| | | gridFooter: "", |
| | | modelHeader: "", |
| | | modelBody: "", |
| | | modelFooter: "", |
| | | }, |
| | | tableAction: "", |
| | | buttons: { view: [], box: [], detail: [] }, |
| | | methods: { |
| | | onInit() { |
| | | return true; |
| | | }, |
| | | onInited() { |
| | | return true; |
| | | }, |
| | | searchBefore(param) { |
| | | return true; |
| | | }, |
| | | searchAfter(result) { |
| | | return true; |
| | | }, |
| | | addBefore(formData) { |
| | | return true; |
| | | }, |
| | | updateBefore(formData) { |
| | | return true; |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | return true; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | return true; |
| | | }, |
| | | }, |
| | | }; |
| | | |
| | | export default extension; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // 页颿©å±é
ç½®ï¼é¢çç»ç§æ·ä¸å¡é»è¾æ©å±ã |
| | | let extension = { |
| | | components: { |
| | | gridHeader: "", |
| | | gridBody: "", |
| | | gridFooter: "", |
| | | modelHeader: "", |
| | | modelBody: "", |
| | | modelFooter: "", |
| | | }, |
| | | tableAction: "", |
| | | buttons: { view: [], box: [], detail: [] }, |
| | | methods: { |
| | | onInit() { |
| | | return true; |
| | | }, |
| | | onInited() { |
| | | return true; |
| | | }, |
| | | searchBefore(param) { |
| | | return true; |
| | | }, |
| | | searchAfter(result) { |
| | | return true; |
| | | }, |
| | | addBefore(formData) { |
| | | return true; |
| | | }, |
| | | updateBefore(formData) { |
| | | return true; |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | return true; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | return true; |
| | | }, |
| | | }, |
| | | }; |
| | | |
| | | export default extension; |
| | |
| | | |
| | |  |
| | | let viewgird = [ |
| | | { |
| | | path: '/Sys_Log', |
| | |
| | | name: 'mesOutboundOrder', |
| | | component: () => import('@/views/outbound/mesOutboundOrder.vue') |
| | | } |
| | | , { |
| | | path: '/OutStockLockInfo', |
| | | name: 'OutStockLockInfo', |
| | | component: () => import('@/views/outbound/outStockLockInfo.vue') |
| | | } |
| | | , { |
| | | path: '/Sys_Tenant', |
| | | name: 'Sys_Tenant', |
| | | component: () => import('@/views/system/Sys_Tenant.vue') |
| | | } |
| | | , { |
| | | path: '/Stock', |
| | | name: 'Stock', |
| | | component: () => import('@/views/stock/stock.vue') |
| | | } |
| | | , { |
| | | path: '/PDA', |
| | | name: 'PDA', |
| | | component: () => import('@/views/system/PDA.vue') |
| | | } |
| | | ] |
| | | |
| | | export default viewgird |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view-grid |
| | | ref="grid" |
| | | :columns="columns" |
| | | :detail="detail" |
| | | :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" |
| | | :searchFormFields="searchFormFields" |
| | | :searchFormOptions="searchFormOptions" |
| | | :table="table" |
| | | :extend="extend" |
| | | > |
| | | </view-grid> |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/outbound/outStockLockInfo.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | |
| | | export default defineComponent({ |
| | | setup() { |
| | | // 页颿 ¸å¿é
ç½®ï¼ç»å®å端 OutStockLockInfo æ§å¶å¨ã |
| | | const table = ref({ |
| | | key: "id", |
| | | footer: "Foots", |
| | | cnName: "åºåºé宿ç»", |
| | | name: "outStockLockInfo", |
| | | url: "/OutStockLockInfo/", |
| | | sortName: "id", |
| | | }); |
| | | |
| | | // æ°å¢/ç¼è¾è¡¨ååæ®µï¼ä¸å端å®ä½åæ®µä¿æä¸è´ï¼é¿å
åæ®µä¸¢å¤±ã |
| | | const editFormFields = ref({ |
| | | orderNo: "", |
| | | orderDetailId: "", |
| | | orderType: "", |
| | | batchNo: "", |
| | | materielCode: "", |
| | | materielName: "", |
| | | stockId: "", |
| | | orderQuantity: "", |
| | | originalQuantity: "", |
| | | assignQuantity: "", |
| | | locationCode: "", |
| | | palletCode: "", |
| | | unit: "", |
| | | taskNum: "", |
| | | status: "", |
| | | remark: "", |
| | | }); |
| | | |
| | | const editFormOptions = ref([ |
| | | [ |
| | | { field: "orderNo", title: "åæ®ç¼å·", type: "string", required: true }, |
| | | { field: "orderType", title: "åæ®ç±»å", type: "select", dataKey: "outOrderType", data: [] }, |
| | | { field: "batchNo", title: "æ¹æ¬¡å·", type: "string" }, |
| | | { field: "materielCode", title: "ç©æç¼å·", type: "string" }, |
| | | { field: "materielName", title: "ç©æåç§°", type: "string" }, |
| | | ], |
| | | [ |
| | | { field: "palletCode", title: "æçç¼å·", type: "string" }, |
| | | { field: "locationCode", title: "è´§ä½ç¼å·", type: "string" }, |
| | | { field: "assignQuantity", title: "åé
åºåºé", type: "decimal" }, |
| | | { field: "status", title: "ç¶æ", type: "select", dataKey: "outStockStatus", data: [] }, |
| | | { field: "remark", title: "夿³¨", type: "textarea" }, |
| | | ], |
| | | ]); |
| | | |
| | | // æ¥è¯¢åæ®µï¼æä¾ä¸å¡å®ä½å¸¸ç¨æ¡ä»¶ã |
| | | const searchFormFields = ref({ |
| | | orderNo: "", |
| | | batchNo: "", |
| | | materielCode: "", |
| | | palletCode: "", |
| | | locationCode: "", |
| | | status: "", |
| | | }); |
| | | |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "åæ®ç¼å·", field: "orderNo", type: "like" }, |
| | | { title: "æ¹æ¬¡å·", field: "batchNo", type: "like" }, |
| | | { title: "ç©æç¼å·", field: "materielCode", type: "like" }, |
| | | ], |
| | | [ |
| | | { title: "æçç¼å·", field: "palletCode", type: "like" }, |
| | | { title: "è´§ä½ç¼å·", field: "locationCode", type: "like" }, |
| | | { title: "ç¶æ", field: "status", type: "select", dataKey: "outStockStatus", data: [] }, |
| | | ], |
| | | ]); |
| | | |
| | | const columns = ref([ |
| | | { field: "id", title: "Id", type: "int", width: 90, hidden: true, readonly: true, require: true, align: "left" }, |
| | | { field: "orderNo", title: "åæ®ç¼å·", type: "string", width: 160, align: "left" }, |
| | | { field: "orderType", title: "åæ®ç±»å", type: "int", width: 110, align: "left", bind: { key: "outOrderType", data: [] } }, |
| | | { field: "orderDetailId", title: "åæ®æç»ä¸»é®", type: "int", width: 120, align: "left", hidden: true }, |
| | | { field: "batchNo", title: "æ¹æ¬¡å·", type: "string", width: 120, align: "left" }, |
| | | { field: "materielCode", title: "ç©æç¼å·", type: "string", width: 130, align: "left" }, |
| | | { field: "materielName", title: "ç©æåç§°", type: "string", width: 180, align: "left" }, |
| | | { field: "stockId", title: "åºå主é®", type: "int", width: 110, align: "left", hidden: true }, |
| | | { field: "orderQuantity", title: "åæ®æ°é", type: "decimal", width: 110, align: "left" }, |
| | | { field: "originalQuantity", title: "åå§åºåé", type: "decimal", width: 110, align: "left" }, |
| | | { field: "assignQuantity", title: "åé
åºåºé", type: "decimal", width: 120, align: "left" }, |
| | | { field: "locationCode", title: "è´§ä½ç¼å·", type: "string", width: 120, align: "left" }, |
| | | { field: "palletCode", title: "æçç¼å·", type: "string", width: 120, align: "left" }, |
| | | { field: "unit", title: "åä½", type: "string", width: 90, align: "left" }, |
| | | { field: "taskNum", title: "ä»»å¡å·", type: "int", width: 100, align: "left" }, |
| | | { field: "status", title: "ç¶æ", type: "int", width: 100, align: "left", bind: { key: "outStockStatus", data: [] } }, |
| | | { field: "creater", title: "å建人", type: "string", width: 100, align: "left" }, |
| | | { field: "createDate", title: "å建æ¶é´", type: "datetime", width: 160, align: "left" }, |
| | | { field: "modifier", title: "ä¿®æ¹äºº", type: "string", width: 100, align: "left", hidden: true }, |
| | | { field: "modifyDate", title: "ä¿®æ¹æ¶é´", type: "datetime", width: 160, align: "left", hidden: true }, |
| | | { field: "remark", title: "夿³¨", type: "string", width: 120, align: "left", hidden: true }, |
| | | ]); |
| | | |
| | | const detail = ref({ |
| | | cnName: "#detailCnName", |
| | | table: "", |
| | | columns: [], |
| | | sortName: "", |
| | | }); |
| | | |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view-grid |
| | | ref="grid" |
| | | :columns="columns" |
| | | :detail="detail" |
| | | :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" |
| | | :searchFormFields="searchFormFields" |
| | | :searchFormOptions="searchFormOptions" |
| | | :table="table" |
| | | :extend="extend" |
| | | > |
| | | </view-grid> |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/stock/stock.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | |
| | | export default defineComponent({ |
| | | setup() { |
| | | // åºååºç¡é¡µï¼å¯¹æ¥ Stock æ§å¶å¨ï¼æ¯æåºåä¸»è®°å½æ¥è¯¢ç»´æ¤ã |
| | | const table = ref({ |
| | | key: "id", |
| | | footer: "Foots", |
| | | cnName: "åºå", |
| | | name: "stock", |
| | | url: "/Stock/", |
| | | sortName: "id", |
| | | }); |
| | | |
| | | const editFormFields = ref({ |
| | | palletCode: "", |
| | | palletType: "", |
| | | locationId: "", |
| | | locationCode: "", |
| | | warehouseId: "", |
| | | stockStatus: "", |
| | | outboundDate: "", |
| | | remark: "", |
| | | }); |
| | | |
| | | const editFormOptions = ref([ |
| | | [ |
| | | { field: "palletCode", title: "æçç¼å·", type: "string", required: true }, |
| | | { field: "palletType", title: "æçç±»å", type: "number" }, |
| | | { field: "locationCode", title: "è´§ä½ç¼å·", type: "string" }, |
| | | ], |
| | | [ |
| | | { field: "warehouseId", title: "ä»åº", type: "select", dataKey: "warehouses", data: [] }, |
| | | { field: "stockStatus", title: "åºåç¶æ", type: "select", dataKey: "stockStatusEmun", data: [] }, |
| | | { field: "outboundDate", title: "åºåºæ¥æ", type: "datetime" }, |
| | | ], |
| | | [{ field: "remark", title: "夿³¨", type: "textarea" }], |
| | | ]); |
| | | |
| | | const searchFormFields = ref({ |
| | | palletCode: "", |
| | | locationCode: "", |
| | | warehouseId: "", |
| | | stockStatus: "", |
| | | outboundDate: "", |
| | | }); |
| | | |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "æçç¼å·", field: "palletCode", type: "like" }, |
| | | { title: "è´§ä½ç¼å·", field: "locationCode", type: "like" }, |
| | | { title: "ä»åº", field: "warehouseId", type: "select", dataKey: "warehouses", data: [] }, |
| | | ], |
| | | [ |
| | | { title: "åºåç¶æ", field: "stockStatus", type: "select", dataKey: "stockStatusEmun", data: [] }, |
| | | { title: "åºåºæ¥æ", field: "outboundDate", type: "datetime" }, |
| | | ], |
| | | ]); |
| | | |
| | | const columns = ref([ |
| | | { field: "id", title: "Id", type: "int", width: 90, hidden: true, readonly: true, require: true, align: "left" }, |
| | | { field: "palletCode", title: "æçç¼å·", type: "string", width: 130, align: "left" }, |
| | | { field: "palletType", title: "æçç±»å", type: "int", width: 110, align: "left" }, |
| | | { field: "locationId", title: "è´§ä½ID", type: "int", width: 110, align: "left", hidden: true }, |
| | | { field: "locationCode", title: "è´§ä½ç¼å·", type: "string", width: 130, align: "left" }, |
| | | { field: "warehouseId", title: "ä»åº", type: "select", width: 110, align: "left", bind: { key: "warehouses", data: [] } }, |
| | | { field: "stockStatus", title: "åºåç¶æ", type: "int", width: 120, align: "left", bind: { key: "stockStatusEmun", data: [] } }, |
| | | { field: "outboundDate", title: "åºåºæ¥æ", type: "datetime", width: 160, align: "left" }, |
| | | { field: "creater", title: "å建人", type: "string", width: 100, align: "left" }, |
| | | { field: "createDate", title: "å建æ¶é´", type: "datetime", width: 160, align: "left" }, |
| | | { field: "modifier", title: "ä¿®æ¹äºº", type: "string", width: 100, align: "left", hidden: true }, |
| | | { field: "modifyDate", title: "ä¿®æ¹æ¶é´", type: "datetime", width: 160, align: "left", hidden: true }, |
| | | { field: "remark", title: "夿³¨", type: "string", width: 140, align: "left" }, |
| | | ]); |
| | | |
| | | const detail = ref({ |
| | | cnName: "#detailCnName", |
| | | table: "", |
| | | columns: [], |
| | | sortName: "", |
| | | }); |
| | | |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="pda-container"> |
| | | <el-card class="pda-card" shadow="hover"> |
| | | <template #header> |
| | | <div class="card-header">PDA åºç¨ç®¡ç</div> |
| | | </template> |
| | | |
| | | <el-form label-width="120px"> |
| | | <el-form-item label="å½åçæ¬å·"> |
| | | <el-input v-model="clientVersion" placeholder="请è¾å
¥å½åPDAçæ¬å·" style="max-width: 280px" /> |
| | | <el-button type="primary" style="margin-left: 10px" @click="checkVersion">æ£æ¥æ´æ°</el-button> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="æå¡ç«¯çæ¬ç»æ"> |
| | | <span>{{ checkResult }}</span> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="ä¸è½½å®è£
å
"> |
| | | <el-button type="success" @click="downloadApp">ä¸è½½ææ° APK</el-button> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="ä¸ä¼ å®è£
å
"> |
| | | <el-upload |
| | | :action="uploadUrl" |
| | | :headers="uploadHeaders" |
| | | name="fileInput" |
| | | :show-file-list="true" |
| | | :before-upload="beforeUpload" |
| | | :on-success="onUploadSuccess" |
| | | :on-error="onUploadError" |
| | | > |
| | | <el-button type="warning">ä¸ä¼ æ° APK</el-button> |
| | | </el-upload> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-card> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { defineComponent, ref, computed, getCurrentInstance } from "vue"; |
| | | import store from "@/store/index"; |
| | | import http from "@/api/http"; |
| | | |
| | | export default defineComponent({ |
| | | setup() { |
| | | const clientVersion = ref(""); |
| | | const checkResult = ref("æªæ£æ¥"); |
| | | const { proxy } = getCurrentInstance(); |
| | | |
| | | // ä¸ä¼ å°åï¼å¤ç¨å
¨å± http åºç¡å°åï¼ä¿è¯ä¸å½åç¯å¢ä¸è´ã |
| | | const uploadUrl = computed(() => `${http.ipAddress}api/PDA/UploadApp`); |
| | | |
| | | // ä¸ä¼ é´æï¼æ²¿ç¨ç°æ token æºå¶ï¼é¿å
æ¥å£ 401ã |
| | | const uploadHeaders = computed(() => ({ |
| | | Authorization: store.getters.getToken(), |
| | | })); |
| | | |
| | | const checkVersion = () => { |
| | | if (!clientVersion.value) { |
| | | proxy.$message.warning("请è¾å
¥çæ¬å·"); |
| | | return; |
| | | } |
| | | |
| | | http |
| | | .get(`api/PDA/GetPDAVersion?version=${encodeURIComponent(clientVersion.value)}`, {}, true) |
| | | .then((res) => { |
| | | if (!res.status) { |
| | | checkResult.value = res.message || "æ£æ¥å¤±è´¥"; |
| | | return; |
| | | } |
| | | checkResult.value = res.data ? "éè¦æ´æ°" : "å·²æ¯ææ°çæ¬"; |
| | | }); |
| | | }; |
| | | |
| | | const downloadApp = () => { |
| | | window.open(`${http.ipAddress}api/PDA/DownLoadApp`, "_blank"); |
| | | }; |
| | | |
| | | // ä¸ä¼ åæ ¡éªï¼éå¶ä¸ä¼ apkï¼åå°æ æè¯·æ±ã |
| | | const beforeUpload = (file) => { |
| | | if (!file || !file.name || !file.name.toLowerCase().endsWith(".apk")) { |
| | | proxy.$message.error("åªå
许ä¸ä¼ .apk æä»¶"); |
| | | return false; |
| | | } |
| | | return true; |
| | | }; |
| | | |
| | | const onUploadSuccess = (response) => { |
| | | proxy.$message[response && response.status ? "success" : "error"]( |
| | | (response && response.message) || "ä¸ä¼ 宿" |
| | | ); |
| | | }; |
| | | |
| | | const onUploadError = () => { |
| | | proxy.$message.error("ä¸ä¼ 失败"); |
| | | }; |
| | | |
| | | return { |
| | | clientVersion, |
| | | checkResult, |
| | | uploadUrl, |
| | | uploadHeaders, |
| | | checkVersion, |
| | | downloadApp, |
| | | beforeUpload, |
| | | onUploadSuccess, |
| | | onUploadError, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | .pda-container { |
| | | height: 100%; |
| | | padding: 12px; |
| | | } |
| | | |
| | | .pda-card { |
| | | max-width: 920px; |
| | | } |
| | | |
| | | .card-header { |
| | | font-size: 16px; |
| | | font-weight: 600; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view-grid |
| | | ref="grid" |
| | | :columns="columns" |
| | | :detail="detail" |
| | | :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" |
| | | :searchFormFields="searchFormFields" |
| | | :searchFormOptions="searchFormOptions" |
| | | :table="table" |
| | | :extend="extend" |
| | | > |
| | | </view-grid> |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/system/Sys_Tenant.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | |
| | | export default defineComponent({ |
| | | setup() { |
| | | // ç§æ·ç®¡ç主é
ç½®ï¼å¯¹æ¥ api/tenantã |
| | | const table = ref({ |
| | | key: "tenantId", |
| | | footer: "Foots", |
| | | cnName: "ç§æ·ç®¡ç", |
| | | name: "sys_Tenant", |
| | | url: "/tenant/", |
| | | sortName: "tenantId", |
| | | }); |
| | | |
| | | const editFormFields = ref({ |
| | | tenantName: "", |
| | | tenantType: "", |
| | | dbType: "", |
| | | connectionString: "", |
| | | status: "", |
| | | remark: "", |
| | | }); |
| | | |
| | | const editFormOptions = ref([ |
| | | [ |
| | | { field: "tenantName", title: "ç§æ·åç§°", type: "string", required: true }, |
| | | { field: "tenantType", title: "ç§æ·ç±»å", type: "number", required: true }, |
| | | { field: "dbType", title: "æ°æ®åºç±»å", type: "number", required: true }, |
| | | ], |
| | | [ |
| | | { field: "status", title: "ç¶æ", type: "select", dataKey: "enableStatusEnum", data: [] }, |
| | | { field: "connectionString", title: "è¿æ¥å符串", type: "textarea" }, |
| | | { field: "remark", title: "夿³¨", type: "textarea" }, |
| | | ], |
| | | ]); |
| | | |
| | | const searchFormFields = ref({ |
| | | tenantName: "", |
| | | tenantType: "", |
| | | dbType: "", |
| | | status: "", |
| | | }); |
| | | |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "ç§æ·åç§°", field: "tenantName", type: "like" }, |
| | | { title: "ç§æ·ç±»å", field: "tenantType", type: "number" }, |
| | | { title: "æ°æ®åºç±»å", field: "dbType", type: "number" }, |
| | | { title: "ç¶æ", field: "status", type: "select", dataKey: "enableStatusEnum", data: [] }, |
| | | ], |
| | | ]); |
| | | |
| | | const columns = ref([ |
| | | { field: "tenantId", title: "ç§æ·ID", type: "int", width: 90, align: "left" }, |
| | | { field: "tenantName", title: "ç§æ·åç§°", type: "string", width: 180, align: "left" }, |
| | | { field: "tenantType", title: "ç§æ·ç±»å", type: "int", width: 110, align: "left" }, |
| | | { field: "dbType", title: "æ°æ®åºç±»å", type: "int", width: 110, align: "left" }, |
| | | { field: "status", title: "ç¶æ", type: "int", width: 100, align: "left", bind: { key: "enableStatusEnum", data: [] } }, |
| | | { field: "connectionString", title: "è¿æ¥å符串", type: "string", width: 280, align: "left" }, |
| | | { field: "creater", title: "å建人", type: "string", width: 100, align: "left" }, |
| | | { field: "createDate", title: "å建æ¶é´", type: "datetime", width: 160, align: "left" }, |
| | | { field: "modifier", title: "ä¿®æ¹äºº", type: "string", width: 100, align: "left", hidden: true }, |
| | | { field: "modifyDate", title: "ä¿®æ¹æ¶é´", type: "datetime", width: 160, align: "left", hidden: true }, |
| | | { field: "remark", title: "夿³¨", type: "string", width: 180, align: "left" }, |
| | | ]); |
| | | |
| | | const detail = ref({ |
| | | cnName: "#detailCnName", |
| | | table: "", |
| | | columns: [], |
| | | sortName: "", |
| | | }); |
| | | |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |