From 0f5bd3db43a7ea07d3373b38bd24126544de5e2f Mon Sep 17 00:00:00 2001 From: zhuguifei <zhuguifei@zhuguifeideiMac.local> Date: 星期一, 21 四月 2025 18:32:39 +0800 Subject: [PATCH] 完成设备点检 --- eims-ui-mobile/src/pages/home/index.vue | 90 +++++++++++++++++++++++++++----------------- 1 files changed, 55 insertions(+), 35 deletions(-) diff --git a/eims-ui-mobile/src/pages/home/index.vue b/eims-ui-mobile/src/pages/home/index.vue index cb1e18e..bd131e7 100644 --- a/eims-ui-mobile/src/pages/home/index.vue +++ b/eims-ui-mobile/src/pages/home/index.vue @@ -71,33 +71,18 @@ <template #title> <view class="flex items-center menu-title-box"> <view class="menu-indicator"></view> - <view class="ml-1 text-xs">鏁版嵁鎬昏</view> + <view class="ml-1 text-xs">璁惧绠$悊</view> </view> </template> <wd-grid :column="4"> - <wd-grid-item use-slot class="flex justify-center items-center"> - <image class="slot-img text-center" src="/static/menu/menu2.png" /> - <text>12</text> - </wd-grid-item> - <wd-grid-item use-slot class="flex justify-center items-center"> - <image class="slot-img text-center" src="/static/menu/menu2.png" /> - <text>12</text> - </wd-grid-item> - <wd-grid-item use-slot class="flex justify-center items-center"> - <image class="slot-img text-center" src="/static/menu/menu2.png" /> - <text>12</text> - </wd-grid-item> - <wd-grid-item use-slot is-dot class="flex justify-center items-center"> - <image class="slot-img text-center" src="/static/menu/menu2.png" /> - <text>12</text> - </wd-grid-item> - <wd-grid-item use-slot class="flex justify-center items-center"> - <image class="slot-img text-center" src="/static/menu/menu2.png" /> - <text>12</text> - </wd-grid-item> - <wd-grid-item use-slot class="flex justify-center items-center"> - <image class="slot-img text-center" src="/static/menu/menu2.png" /> - <text>12</text> + <wd-grid-item + use-slot + class="flex justify-center items-center" + v-for="(item, index) in equMenu" + @click.stop="goItemPage(item.path)" + > + <image class="slot-img text-center" :src="item.icon" /> + <text>{{ item.name }}</text> </wd-grid-item> </wd-grid> </wd-card> @@ -108,17 +93,18 @@ <template #title> <view class="flex items-center menu-title-box"> <view class="menu-indicator"></view> - <view class="ml-1 text-xs">鏁版嵁鎬昏</view> + <view class="ml-1 text-xs">璁惧鐐规</view> </view> </template> <wd-grid :column="4"> <wd-grid-item use-slot class="flex justify-center items-center" - v-for="(item, index) in menuList" + v-for="(item, index) in inspectMenu" :key="item.id" + @click.stop="goItemPage(item.path)" > - <image class="slot-img text-center" :src="item.url" /> + <image class="slot-img text-center" :src="item.icon" /> <text>{{ item.name }}</text> </wd-grid-item> </wd-grid> @@ -142,28 +128,62 @@ console.error(menuList) } +const goItemPage = (path: string) => { + const url = `/${path}` + uni.navigateTo({ + url, + }) +} + onLoad(() => { // getAllMenus() }) -const menuList = reactive([ +const equMenu = reactive([ { id: 1, - name: '娴嬭瘯', - url: '/static/menu/menu1.png', + name: '璁惧绠$悊', + icon: '/static/menu/menu1.png', + path: 'pages/equ/equ-list', + } +]) + +const inspectMenu = reactive([ + /* { + id: 0, + name: '璁惧鐐规', + icon: '/static/menu/menu0.png', + path: 'pages/inspect/insp-add', + }, */ + { + id: 1, + name: '鐐规姒傝', + icon: '/static/menu/menu1.png', + path: 'pages/inspect/insp-st', }, { id: 2, - name: '娴嬭瘯', - url: '/static/menu/menu1.png', + name: '鐐规姹囨��', + icon: '/static/menu/menu2.png', + path: 'pages/inspect/insp-st', + }, + { + id: 3, + name: '鐐规璁板綍', + icon: '/static/menu/menu3.png', + path: 'pages/inspect/insp-record', + }, + { + id: 4, + name: '鐐规璁″垝', + icon: '/static/menu/menu4.png', + path: 'pages/inspect/insp-add', }, ]) function handleUserInfo() { getAllMenus() } - - </script> <style lang="scss" scoped> @@ -201,6 +221,6 @@ .slot-img { width: 72rpx; height: 72rpx; - border-radius: 8rpx; + margin-left: 4rpx; } </style> -- Gitblit v1.9.3