From 6c86dc0760d6cf5c428decfbd903b0aa9f0b0dab Mon Sep 17 00:00:00 2001 From: houjunxiang Date: Thu, 27 Nov 2025 16:12:25 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E8=8F=9C=E5=8D=95=E5=8F=AF=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/my-tabBar/my-tabBar.vue | 18 +----- defaultBaseUrl.js | 2 +- nx/store/user.js | 16 +++-- pages.json | 22 +++---- pages/analysis/index/index.vue | 39 ++++-------- pages/{lims => device}/accept/detail.vue | 0 pages/{lims => device}/borrow/detail.vue | 0 pages/{lims => device}/borrow/list.vue | 0 .../calibrationList/calibration.api.js | 0 .../calibrationList/detail.vue | 0 .../calibrationList/index.vue | 0 .../deviceBusDailyCheck/dailyCheck.data.js | 0 .../deviceBusDailyCheck/detail.vue | 0 .../deviceBusDailyCheck/index.vue | 9 ++- .../deviceBusDailyCheck/list.vue | 0 .../deviceBusInfo/baseInfo.vue | 26 ++++---- .../deviceBusInfo/baseInfoCard.vue | 0 .../deviceBusInfo/deviceBusInfo.data.js | 0 .../{lims => device}/deviceBusInfo/index.vue | 4 +- .../deviceBusMaintain/detail.vue | 0 .../deviceBusMaintain/index.vue | 4 +- .../deviceBusMaintain/list.vue | 0 .../deviceBusUseRecord/detail.vue | 0 .../deviceBusUseRecord/index.vue | 4 +- .../deviceBusUseRecord/list.vue | 0 .../deviceBusUseRecord/useRecord.api.js | 0 .../documentList/document.api.js | 0 pages/{lims => device}/documentList/index.vue | 2 +- .../{lims => device}/documentList/preview.vue | 0 pages/{lims => device}/giveback/detail.vue | 0 pages/{lims => device}/giveback/list.vue | 0 pages/{lims => device}/index/index.vue | 17 ++---- pages/{lims => device}/knowledge/index.vue | 2 +- .../knowledge/knowledge.api.js | 0 .../periodCheckList/detail.vue | 0 .../periodCheckList/index.vue | 0 .../periodCheckList/period.api.js | 0 pages/{lims => device}/repair/detail.vue | 0 pages/{lims => device}/repair/list.vue | 0 pages/{lims => device}/scrap/detail.vue | 0 pages/{lims => device}/stop/detail.vue | 0 pages/{lims => device}/stop/list.vue | 0 pages/index/index.vue | 11 +--- pages/sampleWarehouse/index/index.vue | 59 ++++--------------- pages/sampleWarehouse/sampleTakeOff/index.vue | 4 +- pages/setting/SelectBaseData.vue | 2 +- 46 files changed, 79 insertions(+), 162 deletions(-) rename pages/{lims => device}/accept/detail.vue (100%) rename pages/{lims => device}/borrow/detail.vue (100%) rename pages/{lims => device}/borrow/list.vue (100%) rename pages/{lims => device}/calibrationList/calibration.api.js (100%) rename pages/{lims => device}/calibrationList/detail.vue (100%) rename pages/{lims => device}/calibrationList/index.vue (100%) rename pages/{lims => device}/deviceBusDailyCheck/dailyCheck.data.js (100%) rename pages/{lims => device}/deviceBusDailyCheck/detail.vue (100%) rename pages/{lims => device}/deviceBusDailyCheck/index.vue (97%) rename pages/{lims => device}/deviceBusDailyCheck/list.vue (100%) rename pages/{lims => device}/deviceBusInfo/baseInfo.vue (71%) rename pages/{lims => device}/deviceBusInfo/baseInfoCard.vue (100%) rename pages/{lims => device}/deviceBusInfo/deviceBusInfo.data.js (100%) rename pages/{lims => device}/deviceBusInfo/index.vue (97%) rename pages/{lims => device}/deviceBusMaintain/detail.vue (100%) rename pages/{lims => device}/deviceBusMaintain/index.vue (98%) rename pages/{lims => device}/deviceBusMaintain/list.vue (100%) rename pages/{lims => device}/deviceBusUseRecord/detail.vue (100%) rename pages/{lims => device}/deviceBusUseRecord/index.vue (98%) rename pages/{lims => device}/deviceBusUseRecord/list.vue (100%) rename pages/{lims => device}/deviceBusUseRecord/useRecord.api.js (100%) rename pages/{lims => device}/documentList/document.api.js (100%) rename pages/{lims => device}/documentList/index.vue (96%) rename pages/{lims => device}/documentList/preview.vue (100%) rename pages/{lims => device}/giveback/detail.vue (100%) rename pages/{lims => device}/giveback/list.vue (100%) rename pages/{lims => device}/index/index.vue (64%) rename pages/{lims => device}/knowledge/index.vue (97%) rename pages/{lims => device}/knowledge/knowledge.api.js (100%) rename pages/{lims => device}/periodCheckList/detail.vue (100%) rename pages/{lims => device}/periodCheckList/index.vue (100%) rename pages/{lims => device}/periodCheckList/period.api.js (100%) rename pages/{lims => device}/repair/detail.vue (100%) rename pages/{lims => device}/repair/list.vue (100%) rename pages/{lims => device}/scrap/detail.vue (100%) rename pages/{lims => device}/stop/detail.vue (100%) rename pages/{lims => device}/stop/list.vue (100%) diff --git a/components/my-tabBar/my-tabBar.vue b/components/my-tabBar/my-tabBar.vue index 569c1f5..810dd19 100644 --- a/components/my-tabBar/my-tabBar.vue +++ b/components/my-tabBar/my-tabBar.vue @@ -30,7 +30,7 @@ let props = defineProps({ }) const switchTabs = reactive([ { - pagePath: '/pages/lims/index/index', + pagePath: '/pages/index/index', iconName: 'home', text: '首页', name: 'home' @@ -42,22 +42,6 @@ const switchTabs = reactive([ name: 'account' } ]) -// const switchTabs = computed(() => { -// return [ -// { -// pagePath: '/pages/lims/index/index', -// iconName: 'home', -// text: '首页', -// name: 'home' -// }, -// { -// pagePath: '/pages/me/index', -// iconName: 'account', -// text: '我的', -// name: 'account' -// } -// ] -// }) function changeTabIndex(e) { let pagePath = switchTabs[e].pagePath diff --git a/defaultBaseUrl.js b/defaultBaseUrl.js index 5e209e7..5cda2c7 100644 --- a/defaultBaseUrl.js +++ b/defaultBaseUrl.js @@ -7,7 +7,7 @@ const BaseUrl = isDev ? 'http://192.168.26.116:888/admin-api' : 'http://192.168. const upgradeBaseUrl = 'http://192.168.26.116:888' const tenantId = '1' -export const clientId = 'lsky_lims' +export const clientId = 'zgty_lims' function initDefaultBaseUrl() { uni.setStorageSync('base_url', BaseUrl) diff --git a/nx/store/user.js b/nx/store/user.js index 757da71..b3a7a27 100644 --- a/nx/store/user.js +++ b/nx/store/user.js @@ -69,7 +69,6 @@ const user = defineStore({ icon: 'success', title: '登录成功' }) - // await this.getRoleMenus() // await this.getDeviceTimeout() // this.startTimeoutChecker() // 如果已经存在默认模块就跳转到对应的模块 @@ -86,19 +85,18 @@ const user = defineStore({ } }, async getUserInfo() { - const { user } = await userApi.getInfo() + const { user, menus } = await userApi.getInfo() if (user) { this.userInfo = user uni.setStorageSync('userInfo', this.userInfo) + this.getRoleMenus(menus) } }, - async getRoleMenus() { - let params = { - parentNodeUrl: '/lims/mobile' - } - const result = await userApi.getRoleMenusByParentMenuKey(params) - if (result.length > 0) { - this.roleMenus = result.map(item => ({ url: item.url, name: item.name, icon: item.otherConf })) + async getRoleMenus(menus) { + const parentNodePath = '/lims/mobile' + let result = menus.find(item => item.path === parentNodePath) + if (result) { + this.roleMenus = result.children uni.setStorageSync('roleMenus', this.roleMenus) } }, diff --git a/pages.json b/pages.json index 4f8bcda..88b9bfb 100644 --- a/pages.json +++ b/pages.json @@ -25,7 +25,7 @@ } }, { - "path": "pages/lims/index/index", + "path": "pages/device/index/index", "aliasPath": "/", "style": { "navigationBarTitleText": "设备管理系统", @@ -33,7 +33,7 @@ } }, { - "path": "pages/lims/deviceBusDailyCheck/index", + "path": "pages/device/deviceBusDailyCheck/index", "style": { "navigationBarTitleText": "点检", "navigationStyle": "custom" @@ -45,7 +45,7 @@ } }, { - "path": "pages/lims/deviceBusDailyCheck/list", + "path": "pages/device/deviceBusDailyCheck/list", "style": { "navigationBarTitleText": "点检记录", "navigationStyle": "custom" @@ -57,7 +57,7 @@ } }, { - "path": "pages/lims/deviceBusMaintain/index", + "path": "pages/device/deviceBusMaintain/index", "style": { "navigationBarTitleText": "维护保养", "navigationStyle": "custom" @@ -69,7 +69,7 @@ } }, { - "path": "pages/lims/deviceBusMaintain/list", + "path": "pages/device/deviceBusMaintain/list", "style": { "navigationBarTitleText": "维护保养记录", "navigationStyle": "custom" @@ -81,7 +81,7 @@ } }, { - "path": "pages/lims/deviceBusUseRecord/index", + "path": "pages/device/deviceBusUseRecord/index", "style": { "navigationBarTitleText": "使用记录", "navigationStyle": "custom" @@ -93,7 +93,7 @@ } }, { - "path": "pages/lims/deviceBusUseRecord/list", + "path": "pages/device/deviceBusUseRecord/list", "style": { "navigationBarTitleText": "设备使用记录查看", "navigationStyle": "custom" @@ -105,7 +105,7 @@ } }, { - "path": "pages/lims/deviceBusInfo/index", + "path": "pages/device/deviceBusInfo/index", "style": { "navigationBarTitleText": "设备查询", "navigationStyle": "custom" @@ -117,7 +117,7 @@ } }, { - "path": "pages/lims/deviceBusInfo/baseInfo", + "path": "pages/device/deviceBusInfo/baseInfo", "style": { "navigationBarTitleText": "设备信息", "navigationStyle": "custom" @@ -129,7 +129,7 @@ } }, { - "path": "pages/lims/documentList/preview", + "path": "pages/device/documentList/preview", "style": { "navigationBarTitleText": "文档预览", "navigationStyle": "custom" @@ -141,7 +141,7 @@ } }, { - "path": "pages/lims/knowledge/index", + "path": "pages/device/knowledge/index", "style": { "navigationBarTitleText": "知识库查询", "navigationStyle": "custom" diff --git a/pages/analysis/index/index.vue b/pages/analysis/index/index.vue index d44eda4..6220553 100644 --- a/pages/analysis/index/index.vue +++ b/pages/analysis/index/index.vue @@ -1,18 +1,12 @@