feat:菜单可配置
This commit is contained in:
@@ -1,18 +1,12 @@
|
||||
<template>
|
||||
<view>
|
||||
<navbar-back
|
||||
title="实验室管理系统【分析管理】"
|
||||
titleWidth="800"
|
||||
:autoBack="false"
|
||||
leftIcon=""
|
||||
:leftText="`您好!${userInfo.nickname}`"
|
||||
>
|
||||
<navbar-back title="实验室管理系统【分析管理】" titleWidth="800" :autoBack="false" leftIcon="" leftText="">
|
||||
<u-icon @click="popupShow = true" size="28" color="#FFF" name="setting-fill" />
|
||||
</navbar-back>
|
||||
|
||||
<up-grid :col="gridCol" :border="false">
|
||||
<up-grid-item class="mb20 mt20" v-for="item in menuItemList" :key="item.url" @click="goTo(item.url)">
|
||||
<u-icon :name="item.otherConf.icon" color="#0055A2" size="80" />
|
||||
<up-grid-item class="mb20 mt20" v-for="item in menuItemList" :key="item.id" @click="goTo(item.component)">
|
||||
<u-icon :name="`/static/images/menus/${item.path}.png`" color="#0055A2" size="80" />
|
||||
<view class="grid-text">{{ item.name }}</view>
|
||||
</up-grid-item>
|
||||
</up-grid>
|
||||
@@ -30,26 +24,15 @@ import mePopup from '@/pages/index/me-popup.vue'
|
||||
// 响应式数据
|
||||
const popupShow = ref(false)
|
||||
|
||||
const menuItemList = ref([
|
||||
{
|
||||
url: '/pages/analysis/sample/sample-work-list',
|
||||
otherConf: { icon: '/static/images/menus/ypfx.png' },
|
||||
name: '样品分析'
|
||||
},
|
||||
{
|
||||
url: '/pages/analysis/sample/sample-report-search',
|
||||
otherConf: { icon: '/static/images/menus/records.png' },
|
||||
name: '分析记录'
|
||||
},
|
||||
{
|
||||
url: '/pages/analysis/auncel/auncel-status',
|
||||
otherConf: { icon: '/static/images/menus/tpck.png' },
|
||||
name: '天平查看'
|
||||
const menuItemList = computed(() => {
|
||||
let roleMenus = nx.$store('user').roleMenus
|
||||
const result = roleMenus.find(item => item.path === 'fxgl')
|
||||
if (result) {
|
||||
return result.children
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
])
|
||||
|
||||
// 计算属性
|
||||
const userInfo = computed(() => nx.$store('user').userInfo)
|
||||
})
|
||||
|
||||
// 方法
|
||||
const goTo = url => {
|
||||
|
||||
@@ -132,7 +132,7 @@ let detailInfo = ref({})
|
||||
|
||||
const { scanQRInfo } = toRefs(nx.$store('biz'))
|
||||
watch(scanQRInfo, newVal => {
|
||||
if (newVal && nx.$router.getCurrentPage().route == 'pages/lims/deviceBusDailyCheck/index') {
|
||||
if (newVal && nx.$router.getCurrentPage().route == 'pages/device/deviceBusDailyCheck/index') {
|
||||
try {
|
||||
const codeObj = JSON.parse(newVal)
|
||||
if (!pageLoading.value) {
|
||||
@@ -215,7 +215,7 @@ function handleSubmit(type) {
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
detailInfo.value.checkDate = nx.$dayjs().format('YYYY-MM-DD HH:mm:ss')
|
||||
detailInfo.value.checkDate = nx.$dayjs().format('YYYY-MM-DD HH:mm:ss')
|
||||
modalType.value = type
|
||||
modalShow.value = true
|
||||
console.log(detailInfo.value)
|
||||
@@ -225,8 +225,7 @@ const submitLoading = ref(false)
|
||||
async function confirm() {
|
||||
if (submitLoading.value) return
|
||||
submitLoading.value = true
|
||||
|
||||
|
||||
|
||||
await dailyCheckApi.submit({ ...detailInfo.value, submitFlag: modalType.value }).finally(() => {
|
||||
submitLoading.value = false
|
||||
modalShow.value = false
|
||||
@@ -245,7 +244,7 @@ function handleCheckRecord() {
|
||||
deviceName: detailInfo.value.deviceName
|
||||
}
|
||||
nx.$store('biz').deviceInfo = deviceInfo
|
||||
nx.$router.go('/pages/lims/deviceBusDailyCheck/list')
|
||||
nx.$router.go('/pages/device/deviceBusDailyCheck/list')
|
||||
}
|
||||
// 新建点检
|
||||
function handleCreateDailyCheck() {
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user