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() {
|
||||
@@ -25,19 +25,19 @@
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted, computed } from 'vue'
|
||||
import nx from '@/nx'
|
||||
import BaseInfoCard from '@/pages/lims/deviceBusInfo/baseInfoCard'
|
||||
import AcceptDetail from '@/pages/lims/accept/detail'
|
||||
import DailyCheckList from '@/pages/lims/deviceBusDailyCheck/list'
|
||||
import MaintainList from '@/pages/lims/deviceBusMaintain/list'
|
||||
import UseRecordList from '@/pages/lims/deviceBusUseRecord/list'
|
||||
import PeriodCheckList from '@/pages/lims/periodCheckList/index'
|
||||
import CalibrationList from '@/pages/lims/calibrationList/index'
|
||||
import RepairList from '@/pages/lims/repair/list'
|
||||
import BorrowList from '@/pages/lims/borrow/list'
|
||||
import GivebackList from '@/pages/lims/giveback/list'
|
||||
import StopList from '@/pages/lims/stop/list'
|
||||
import DocumentList from '@/pages/lims/documentList/index'
|
||||
import ScrapInfo from '@/pages/lims/scrap/detail'
|
||||
import BaseInfoCard from '@/pages/device/deviceBusInfo/baseInfoCard'
|
||||
import AcceptDetail from '@/pages/device/accept/detail'
|
||||
import DailyCheckList from '@/pages/device/deviceBusDailyCheck/list'
|
||||
import MaintainList from '@/pages/device/deviceBusMaintain/list'
|
||||
import UseRecordList from '@/pages/device/deviceBusUseRecord/list'
|
||||
import PeriodCheckList from '@/pages/device/periodCheckList/index'
|
||||
import CalibrationList from '@/pages/device/calibrationList/index'
|
||||
import RepairList from '@/pages/device/repair/list'
|
||||
import BorrowList from '@/pages/device/borrow/list'
|
||||
import GivebackList from '@/pages/device/giveback/list'
|
||||
import StopList from '@/pages/device/stop/list'
|
||||
import DocumentList from '@/pages/device/documentList/index'
|
||||
import ScrapInfo from '@/pages/device/scrap/detail'
|
||||
import { tabList } from './deviceBusInfo.data'
|
||||
|
||||
let activeIndex = ref(0)
|
||||
@@ -77,7 +77,7 @@ const roomTreeData = ref([])
|
||||
|
||||
const { scanQRInfo } = toRefs(nx.$store('biz'))
|
||||
watch(scanQRInfo, newVal => {
|
||||
if (newVal && nx.$router.getCurrentPage().route == 'pages/lims/deviceBusInfo/index') {
|
||||
if (newVal && nx.$router.getCurrentPage().route == 'pages/device/deviceBusInfo/index') {
|
||||
try {
|
||||
const codeObj = JSON.parse(newVal)
|
||||
handleDetail({ id: codeObj.id })
|
||||
@@ -175,7 +175,7 @@ function handleReset() {
|
||||
async function handleDetail(row, index) {
|
||||
nx.$store('biz').deviceInfo = row
|
||||
await getDeviceBusInfoById(row.id)
|
||||
nx.$router.go('/pages/lims/deviceBusInfo/baseInfo')
|
||||
nx.$router.go('/pages/device/deviceBusInfo/baseInfo')
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -126,7 +126,7 @@ let detailInfo = ref({})
|
||||
let checkList = ref([])
|
||||
const { scanQRInfo } = toRefs(nx.$store('biz'))
|
||||
watch(scanQRInfo, newVal => {
|
||||
if (newVal && nx.$router.getCurrentPage().route == 'pages/lims/deviceBusMaintain/index') {
|
||||
if (newVal && nx.$router.getCurrentPage().route == 'pages/device/deviceBusMaintain/index') {
|
||||
try {
|
||||
const codeObj = JSON.parse(newVal)
|
||||
if (!pageLoading.value) {
|
||||
@@ -222,7 +222,7 @@ function handleCheckRecord() {
|
||||
deviceName: detailInfo.value.deviceName
|
||||
}
|
||||
nx.$store('biz').deviceInfo = deviceInfo
|
||||
nx.$router.go('/pages/lims/deviceBusMaintain/list')
|
||||
nx.$router.go('/pages/device/deviceBusMaintain/list')
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -123,7 +123,7 @@ let detailInfo = ref({})
|
||||
|
||||
const { scanQRInfo } = toRefs(nx.$store('biz'))
|
||||
watch(scanQRInfo, newVal => {
|
||||
if (newVal && nx.$router.getCurrentPage().route == 'pages/lims/deviceBusUseRecord/index') {
|
||||
if (newVal && nx.$router.getCurrentPage().route == 'pages/device/deviceBusUseRecord/index') {
|
||||
try {
|
||||
const codeObj = JSON.parse(newVal)
|
||||
if (!pageLoading.value) {
|
||||
@@ -295,7 +295,7 @@ function reset() {
|
||||
}
|
||||
function handleUseRecord() {
|
||||
nx.$store('biz').deviceInfo = detailInfo.value
|
||||
nx.$router.go('/pages/lims/deviceBusUseRecord/list')
|
||||
nx.$router.go('/pages/device/deviceBusUseRecord/list')
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -105,7 +105,7 @@ async function handleDetail(row) {
|
||||
fileInfo.value.documentContent = documentContent
|
||||
fileShow.value = true
|
||||
} else {
|
||||
nx.$router.go('/pages/lims/documentList/preview', { documentUrl: row.documentUrl })
|
||||
nx.$router.go('/pages/device/documentList/preview', { documentUrl: row.documentUrl })
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,11 +1,6 @@
|
||||
<template>
|
||||
<view>
|
||||
<navbar-back
|
||||
title="实验室管理系统【设备管理】"
|
||||
:autoBack="false"
|
||||
leftIcon=""
|
||||
:leftText="`您好!${userInfo.realname}`"
|
||||
>
|
||||
<navbar-back title="实验室管理系统【设备管理】" :autoBack="false" leftIcon="" leftText="">
|
||||
<u-icon @click="popupShow = true" size="28" color="#FFF" name="setting-fill" />
|
||||
</navbar-back>
|
||||
<up-grid :border="false" :col="gridCol">
|
||||
@@ -31,11 +26,11 @@ import mePopup from '@/pages/index/me-popup.vue'
|
||||
const { gridCol } = useGridCol([400, 600], [2, 3, 4])
|
||||
let popupShow = ref(false)
|
||||
let list = reactive([
|
||||
{ url: '/pages/lims/deviceBusDailyCheck/index', name: '点检', icon: 'dailyCheck' },
|
||||
{ url: '/pages/lims/deviceBusMaintain/index', name: '维护保养', icon: 'maintain' },
|
||||
{ url: '/pages/lims/deviceBusUseRecord/index', name: '使用', icon: 'useRecord' },
|
||||
{ url: '/pages/lims/deviceBusInfo/index', name: '设备查询', icon: 'baseInfo' },
|
||||
{ url: '/pages/lims/knowledge/index', name: '知识库查询', icon: 'knowledge' }
|
||||
{ url: '/pages/device/deviceBusDailyCheck/index', name: '点检', icon: 'dailyCheck' },
|
||||
{ url: '/pages/device/deviceBusMaintain/index', name: '维护保养', icon: 'maintain' },
|
||||
{ url: '/pages/device/deviceBusUseRecord/index', name: '使用', icon: 'useRecord' },
|
||||
{ url: '/pages/device/deviceBusInfo/index', name: '设备查询', icon: 'baseInfo' },
|
||||
{ url: '/pages/device/knowledge/index', name: '知识库查询', icon: 'knowledge' }
|
||||
])
|
||||
|
||||
const roleMenus = computed(() => nx.$store('user').roleMenus)
|
||||
@@ -127,7 +127,7 @@ async function handleDetail(row) {
|
||||
fileInfo.value.documentContent = documentContent
|
||||
fileShow.value = true
|
||||
} else {
|
||||
nx.$router.go('/pages/lims/documentList/preview', { documentUrl: row.documentUrl })
|
||||
nx.$router.go('/pages/device/documentList/preview', { documentUrl: row.documentUrl })
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<view class="page bg-w pt30">
|
||||
<up-grid :border="false" :col="gridCol">
|
||||
<up-grid-item class="mb25 mt25" v-for="(item, listIndex) in list" :key="listIndex" @click="goSystem(item.url)">
|
||||
<image style="width: 80px; height: 80px" :src="`/static/images/menus/${item.icon}.png`"></image>
|
||||
<up-grid-item class="mb25 mt25" v-for="item in roleMenus" :key="item.id" @click="goSystem(item.component)">
|
||||
<image style="width: 80px; height: 80px" :src="`/static/images/menus/${item.path}.png`"></image>
|
||||
<text class="grid-text">{{ item.name }}</text>
|
||||
</up-grid-item>
|
||||
</up-grid>
|
||||
@@ -13,13 +13,8 @@
|
||||
import { reactive, ref, computed, onMounted } from 'vue'
|
||||
import nx from '@/nx'
|
||||
import { useGridCol } from '@/nx/hooks/useGridCol'
|
||||
let list = reactive([
|
||||
// { url: '/pages/lims/index/index', name: '设备管理', icon: '设备管理' },
|
||||
{ url: '/pages/analysis/index/index', name: '分析管理', icon: 'fxgl' },
|
||||
{ url: '/pages/sampleWarehouse/index/index', name: '样品库管理', icon: 'ypkgl' }
|
||||
])
|
||||
|
||||
// const sysMenus = computed(() => nx.$store('user').sysMenus)
|
||||
const roleMenus = computed(() => nx.$store('user').roleMenus)
|
||||
function goSystem(url) {
|
||||
uni.setStorageSync('defaultModule', url)
|
||||
uni.reLaunch({ url })
|
||||
|
||||
@@ -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="60" />
|
||||
<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="60" />
|
||||
<view class="grid-text">{{ item.name }}</view>
|
||||
</up-grid-item>
|
||||
</up-grid>
|
||||
@@ -31,46 +25,15 @@ import mePopup from '@/pages/index/me-popup.vue'
|
||||
// 响应式数据
|
||||
const popupShow = ref(false)
|
||||
|
||||
const menuItemList = ref([
|
||||
{
|
||||
url: '/pages/sampleWarehouse/sampleSearch/index',
|
||||
otherConf: { icon: '/static/images/menus/records.png' },
|
||||
name: '样品查询'
|
||||
},
|
||||
{
|
||||
url: '/pages/sampleWarehouse/returnToStock/index',
|
||||
otherConf: { icon: '/static/images/menus/ypgk.png' },
|
||||
name: '样品归库'
|
||||
},
|
||||
{
|
||||
url: '/pages/sampleWarehouse/execChangeLocation/index',
|
||||
otherConf: { icon: '/static/images/menus/kwbg.png' },
|
||||
name: '库位变更'
|
||||
},
|
||||
{
|
||||
url: '/pages/sampleWarehouse/sampleDispatchInternal/index',
|
||||
otherConf: { icon: '/static/images/menus/nbdb.png' },
|
||||
name: '内部调拨'
|
||||
},
|
||||
{
|
||||
url: '/pages/sampleWarehouse/sampleDispatchExternal/index',
|
||||
otherConf: { icon: '/static/images/menus/wbdb.png' },
|
||||
name: '外部调拨'
|
||||
},
|
||||
{
|
||||
url: '/pages/sampleWarehouse/dispatchGiveBack/index',
|
||||
otherConf: { icon: '/static/images/menus/dbgh.png' },
|
||||
name: '调拨归还'
|
||||
},
|
||||
{
|
||||
url: '/pages/sampleWarehouse/sampleTakeOff/index',
|
||||
otherConf: { icon: '/static/images/menus/ypxj.png' },
|
||||
name: '样品下架'
|
||||
const menuItemList = computed(() => {
|
||||
let roleMenus = nx.$store('user').roleMenus
|
||||
const result = roleMenus.find(item => item.path === 'ypkgl')
|
||||
if (result) {
|
||||
return result.children
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
])
|
||||
|
||||
// 计算属性
|
||||
const userInfo = computed(() => nx.$store('user').userInfo)
|
||||
})
|
||||
|
||||
// 方法
|
||||
const goTo = url => {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<up-input
|
||||
class="mt10"
|
||||
v-model="targetCode"
|
||||
placeholder="请扫描需要调拨的样品编号"
|
||||
placeholder="请扫描需要下架的样品编号"
|
||||
prefixIcon="scan"
|
||||
fontSize="16"
|
||||
prefixIconStyle="font-size: 30px;"
|
||||
@@ -25,7 +25,7 @@
|
||||
>
|
||||
</up-input>
|
||||
|
||||
<uni-section v-if="sampleList.length > 0" type="line" title="调拨样品明细" titleFontSize="15px">
|
||||
<uni-section v-if="sampleList.length > 0" type="line" title="下架样品明细" titleFontSize="15px">
|
||||
<template #right> <up-text type="error" size="18" bold :text="sampleList.length"></up-text></template>
|
||||
<scroll-view style="height: 49vh" scroll-y scroll-with-animation>
|
||||
<uni-card margin="5px" v-for="item in sampleList" class="sample-item">
|
||||
|
||||
@@ -81,7 +81,7 @@ export default {
|
||||
async goIndex() {
|
||||
await this.$store.dispatch('getRoleMenus', this.$store.state.postCode)
|
||||
uni.reLaunch({
|
||||
url: 'pages/lims/index/index'
|
||||
url: 'pages/device/index/index'
|
||||
})
|
||||
},
|
||||
submitForm() {
|
||||
|
||||
Reference in New Issue
Block a user