| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | 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> |
| | |
| | | .slot-img { |
| | | width: 72rpx; |
| | | height: 72rpx; |
| | | border-radius: 8rpx; |
| | | margin-left: 4rpx; |
| | | } |
| | | </style> |