feat:菜单可配置
This commit is contained in:
@@ -30,7 +30,7 @@ let props = defineProps({
|
|||||||
})
|
})
|
||||||
const switchTabs = reactive([
|
const switchTabs = reactive([
|
||||||
{
|
{
|
||||||
pagePath: '/pages/lims/index/index',
|
pagePath: '/pages/index/index',
|
||||||
iconName: 'home',
|
iconName: 'home',
|
||||||
text: '首页',
|
text: '首页',
|
||||||
name: 'home'
|
name: 'home'
|
||||||
@@ -42,22 +42,6 @@ const switchTabs = reactive([
|
|||||||
name: 'account'
|
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) {
|
function changeTabIndex(e) {
|
||||||
let pagePath = switchTabs[e].pagePath
|
let pagePath = switchTabs[e].pagePath
|
||||||
|
|||||||
@@ -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 upgradeBaseUrl = 'http://192.168.26.116:888'
|
||||||
|
|
||||||
const tenantId = '1'
|
const tenantId = '1'
|
||||||
export const clientId = 'lsky_lims'
|
export const clientId = 'zgty_lims'
|
||||||
|
|
||||||
function initDefaultBaseUrl() {
|
function initDefaultBaseUrl() {
|
||||||
uni.setStorageSync('base_url', BaseUrl)
|
uni.setStorageSync('base_url', BaseUrl)
|
||||||
|
|||||||
@@ -69,7 +69,6 @@ const user = defineStore({
|
|||||||
icon: 'success',
|
icon: 'success',
|
||||||
title: '登录成功'
|
title: '登录成功'
|
||||||
})
|
})
|
||||||
// await this.getRoleMenus()
|
|
||||||
// await this.getDeviceTimeout()
|
// await this.getDeviceTimeout()
|
||||||
// this.startTimeoutChecker()
|
// this.startTimeoutChecker()
|
||||||
// 如果已经存在默认模块就跳转到对应的模块
|
// 如果已经存在默认模块就跳转到对应的模块
|
||||||
@@ -86,19 +85,18 @@ const user = defineStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async getUserInfo() {
|
async getUserInfo() {
|
||||||
const { user } = await userApi.getInfo()
|
const { user, menus } = await userApi.getInfo()
|
||||||
if (user) {
|
if (user) {
|
||||||
this.userInfo = user
|
this.userInfo = user
|
||||||
uni.setStorageSync('userInfo', this.userInfo)
|
uni.setStorageSync('userInfo', this.userInfo)
|
||||||
|
this.getRoleMenus(menus)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async getRoleMenus() {
|
async getRoleMenus(menus) {
|
||||||
let params = {
|
const parentNodePath = '/lims/mobile'
|
||||||
parentNodeUrl: '/lims/mobile'
|
let result = menus.find(item => item.path === parentNodePath)
|
||||||
}
|
if (result) {
|
||||||
const result = await userApi.getRoleMenusByParentMenuKey(params)
|
this.roleMenus = result.children
|
||||||
if (result.length > 0) {
|
|
||||||
this.roleMenus = result.map(item => ({ url: item.url, name: item.name, icon: item.otherConf }))
|
|
||||||
uni.setStorageSync('roleMenus', this.roleMenus)
|
uni.setStorageSync('roleMenus', this.roleMenus)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
22
pages.json
22
pages.json
@@ -25,7 +25,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/lims/index/index",
|
"path": "pages/device/index/index",
|
||||||
"aliasPath": "/",
|
"aliasPath": "/",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "设备管理系统",
|
"navigationBarTitleText": "设备管理系统",
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/lims/deviceBusDailyCheck/index",
|
"path": "pages/device/deviceBusDailyCheck/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "点检",
|
"navigationBarTitleText": "点检",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/lims/deviceBusDailyCheck/list",
|
"path": "pages/device/deviceBusDailyCheck/list",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "点检记录",
|
"navigationBarTitleText": "点检记录",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/lims/deviceBusMaintain/index",
|
"path": "pages/device/deviceBusMaintain/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "维护保养",
|
"navigationBarTitleText": "维护保养",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/lims/deviceBusMaintain/list",
|
"path": "pages/device/deviceBusMaintain/list",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "维护保养记录",
|
"navigationBarTitleText": "维护保养记录",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/lims/deviceBusUseRecord/index",
|
"path": "pages/device/deviceBusUseRecord/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "使用记录",
|
"navigationBarTitleText": "使用记录",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/lims/deviceBusUseRecord/list",
|
"path": "pages/device/deviceBusUseRecord/list",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "设备使用记录查看",
|
"navigationBarTitleText": "设备使用记录查看",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/lims/deviceBusInfo/index",
|
"path": "pages/device/deviceBusInfo/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "设备查询",
|
"navigationBarTitleText": "设备查询",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
@@ -117,7 +117,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/lims/deviceBusInfo/baseInfo",
|
"path": "pages/device/deviceBusInfo/baseInfo",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "设备信息",
|
"navigationBarTitleText": "设备信息",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
@@ -129,7 +129,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/lims/documentList/preview",
|
"path": "pages/device/documentList/preview",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "文档预览",
|
"navigationBarTitleText": "文档预览",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
@@ -141,7 +141,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/lims/knowledge/index",
|
"path": "pages/device/knowledge/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "知识库查询",
|
"navigationBarTitleText": "知识库查询",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
|
|||||||
@@ -1,18 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<navbar-back
|
<navbar-back title="实验室管理系统【分析管理】" titleWidth="800" :autoBack="false" leftIcon="" leftText="">
|
||||||
title="实验室管理系统【分析管理】"
|
|
||||||
titleWidth="800"
|
|
||||||
:autoBack="false"
|
|
||||||
leftIcon=""
|
|
||||||
:leftText="`您好!${userInfo.nickname}`"
|
|
||||||
>
|
|
||||||
<u-icon @click="popupShow = true" size="28" color="#FFF" name="setting-fill" />
|
<u-icon @click="popupShow = true" size="28" color="#FFF" name="setting-fill" />
|
||||||
</navbar-back>
|
</navbar-back>
|
||||||
|
|
||||||
<up-grid :col="gridCol" :border="false">
|
<up-grid :col="gridCol" :border="false">
|
||||||
<up-grid-item class="mb20 mt20" v-for="item in menuItemList" :key="item.url" @click="goTo(item.url)">
|
<up-grid-item class="mb20 mt20" v-for="item in menuItemList" :key="item.id" @click="goTo(item.component)">
|
||||||
<u-icon :name="item.otherConf.icon" color="#0055A2" size="80" />
|
<u-icon :name="`/static/images/menus/${item.path}.png`" color="#0055A2" size="80" />
|
||||||
<view class="grid-text">{{ item.name }}</view>
|
<view class="grid-text">{{ item.name }}</view>
|
||||||
</up-grid-item>
|
</up-grid-item>
|
||||||
</up-grid>
|
</up-grid>
|
||||||
@@ -30,26 +24,15 @@ import mePopup from '@/pages/index/me-popup.vue'
|
|||||||
// 响应式数据
|
// 响应式数据
|
||||||
const popupShow = ref(false)
|
const popupShow = ref(false)
|
||||||
|
|
||||||
const menuItemList = ref([
|
const menuItemList = computed(() => {
|
||||||
{
|
let roleMenus = nx.$store('user').roleMenus
|
||||||
url: '/pages/analysis/sample/sample-work-list',
|
const result = roleMenus.find(item => item.path === 'fxgl')
|
||||||
otherConf: { icon: '/static/images/menus/ypfx.png' },
|
if (result) {
|
||||||
name: '样品分析'
|
return result.children
|
||||||
},
|
} else {
|
||||||
{
|
return []
|
||||||
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 userInfo = computed(() => nx.$store('user').userInfo)
|
|
||||||
|
|
||||||
// 方法
|
// 方法
|
||||||
const goTo = url => {
|
const goTo = url => {
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ let detailInfo = ref({})
|
|||||||
|
|
||||||
const { scanQRInfo } = toRefs(nx.$store('biz'))
|
const { scanQRInfo } = toRefs(nx.$store('biz'))
|
||||||
watch(scanQRInfo, newVal => {
|
watch(scanQRInfo, newVal => {
|
||||||
if (newVal && nx.$router.getCurrentPage().route == 'pages/lims/deviceBusDailyCheck/index') {
|
if (newVal && nx.$router.getCurrentPage().route == 'pages/device/deviceBusDailyCheck/index') {
|
||||||
try {
|
try {
|
||||||
const codeObj = JSON.parse(newVal)
|
const codeObj = JSON.parse(newVal)
|
||||||
if (!pageLoading.value) {
|
if (!pageLoading.value) {
|
||||||
@@ -226,7 +226,6 @@ async function confirm() {
|
|||||||
if (submitLoading.value) return
|
if (submitLoading.value) return
|
||||||
submitLoading.value = true
|
submitLoading.value = true
|
||||||
|
|
||||||
|
|
||||||
await dailyCheckApi.submit({ ...detailInfo.value, submitFlag: modalType.value }).finally(() => {
|
await dailyCheckApi.submit({ ...detailInfo.value, submitFlag: modalType.value }).finally(() => {
|
||||||
submitLoading.value = false
|
submitLoading.value = false
|
||||||
modalShow.value = false
|
modalShow.value = false
|
||||||
@@ -245,7 +244,7 @@ function handleCheckRecord() {
|
|||||||
deviceName: detailInfo.value.deviceName
|
deviceName: detailInfo.value.deviceName
|
||||||
}
|
}
|
||||||
nx.$store('biz').deviceInfo = deviceInfo
|
nx.$store('biz').deviceInfo = deviceInfo
|
||||||
nx.$router.go('/pages/lims/deviceBusDailyCheck/list')
|
nx.$router.go('/pages/device/deviceBusDailyCheck/list')
|
||||||
}
|
}
|
||||||
// 新建点检
|
// 新建点检
|
||||||
function handleCreateDailyCheck() {
|
function handleCreateDailyCheck() {
|
||||||
@@ -25,19 +25,19 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive, onMounted, computed } from 'vue'
|
import { ref, reactive, onMounted, computed } from 'vue'
|
||||||
import nx from '@/nx'
|
import nx from '@/nx'
|
||||||
import BaseInfoCard from '@/pages/lims/deviceBusInfo/baseInfoCard'
|
import BaseInfoCard from '@/pages/device/deviceBusInfo/baseInfoCard'
|
||||||
import AcceptDetail from '@/pages/lims/accept/detail'
|
import AcceptDetail from '@/pages/device/accept/detail'
|
||||||
import DailyCheckList from '@/pages/lims/deviceBusDailyCheck/list'
|
import DailyCheckList from '@/pages/device/deviceBusDailyCheck/list'
|
||||||
import MaintainList from '@/pages/lims/deviceBusMaintain/list'
|
import MaintainList from '@/pages/device/deviceBusMaintain/list'
|
||||||
import UseRecordList from '@/pages/lims/deviceBusUseRecord/list'
|
import UseRecordList from '@/pages/device/deviceBusUseRecord/list'
|
||||||
import PeriodCheckList from '@/pages/lims/periodCheckList/index'
|
import PeriodCheckList from '@/pages/device/periodCheckList/index'
|
||||||
import CalibrationList from '@/pages/lims/calibrationList/index'
|
import CalibrationList from '@/pages/device/calibrationList/index'
|
||||||
import RepairList from '@/pages/lims/repair/list'
|
import RepairList from '@/pages/device/repair/list'
|
||||||
import BorrowList from '@/pages/lims/borrow/list'
|
import BorrowList from '@/pages/device/borrow/list'
|
||||||
import GivebackList from '@/pages/lims/giveback/list'
|
import GivebackList from '@/pages/device/giveback/list'
|
||||||
import StopList from '@/pages/lims/stop/list'
|
import StopList from '@/pages/device/stop/list'
|
||||||
import DocumentList from '@/pages/lims/documentList/index'
|
import DocumentList from '@/pages/device/documentList/index'
|
||||||
import ScrapInfo from '@/pages/lims/scrap/detail'
|
import ScrapInfo from '@/pages/device/scrap/detail'
|
||||||
import { tabList } from './deviceBusInfo.data'
|
import { tabList } from './deviceBusInfo.data'
|
||||||
|
|
||||||
let activeIndex = ref(0)
|
let activeIndex = ref(0)
|
||||||
@@ -77,7 +77,7 @@ const roomTreeData = ref([])
|
|||||||
|
|
||||||
const { scanQRInfo } = toRefs(nx.$store('biz'))
|
const { scanQRInfo } = toRefs(nx.$store('biz'))
|
||||||
watch(scanQRInfo, newVal => {
|
watch(scanQRInfo, newVal => {
|
||||||
if (newVal && nx.$router.getCurrentPage().route == 'pages/lims/deviceBusInfo/index') {
|
if (newVal && nx.$router.getCurrentPage().route == 'pages/device/deviceBusInfo/index') {
|
||||||
try {
|
try {
|
||||||
const codeObj = JSON.parse(newVal)
|
const codeObj = JSON.parse(newVal)
|
||||||
handleDetail({ id: codeObj.id })
|
handleDetail({ id: codeObj.id })
|
||||||
@@ -175,7 +175,7 @@ function handleReset() {
|
|||||||
async function handleDetail(row, index) {
|
async function handleDetail(row, index) {
|
||||||
nx.$store('biz').deviceInfo = row
|
nx.$store('biz').deviceInfo = row
|
||||||
await getDeviceBusInfoById(row.id)
|
await getDeviceBusInfoById(row.id)
|
||||||
nx.$router.go('/pages/lims/deviceBusInfo/baseInfo')
|
nx.$router.go('/pages/device/deviceBusInfo/baseInfo')
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -126,7 +126,7 @@ let detailInfo = ref({})
|
|||||||
let checkList = ref([])
|
let checkList = ref([])
|
||||||
const { scanQRInfo } = toRefs(nx.$store('biz'))
|
const { scanQRInfo } = toRefs(nx.$store('biz'))
|
||||||
watch(scanQRInfo, newVal => {
|
watch(scanQRInfo, newVal => {
|
||||||
if (newVal && nx.$router.getCurrentPage().route == 'pages/lims/deviceBusMaintain/index') {
|
if (newVal && nx.$router.getCurrentPage().route == 'pages/device/deviceBusMaintain/index') {
|
||||||
try {
|
try {
|
||||||
const codeObj = JSON.parse(newVal)
|
const codeObj = JSON.parse(newVal)
|
||||||
if (!pageLoading.value) {
|
if (!pageLoading.value) {
|
||||||
@@ -222,7 +222,7 @@ function handleCheckRecord() {
|
|||||||
deviceName: detailInfo.value.deviceName
|
deviceName: detailInfo.value.deviceName
|
||||||
}
|
}
|
||||||
nx.$store('biz').deviceInfo = deviceInfo
|
nx.$store('biz').deviceInfo = deviceInfo
|
||||||
nx.$router.go('/pages/lims/deviceBusMaintain/list')
|
nx.$router.go('/pages/device/deviceBusMaintain/list')
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ let detailInfo = ref({})
|
|||||||
|
|
||||||
const { scanQRInfo } = toRefs(nx.$store('biz'))
|
const { scanQRInfo } = toRefs(nx.$store('biz'))
|
||||||
watch(scanQRInfo, newVal => {
|
watch(scanQRInfo, newVal => {
|
||||||
if (newVal && nx.$router.getCurrentPage().route == 'pages/lims/deviceBusUseRecord/index') {
|
if (newVal && nx.$router.getCurrentPage().route == 'pages/device/deviceBusUseRecord/index') {
|
||||||
try {
|
try {
|
||||||
const codeObj = JSON.parse(newVal)
|
const codeObj = JSON.parse(newVal)
|
||||||
if (!pageLoading.value) {
|
if (!pageLoading.value) {
|
||||||
@@ -295,7 +295,7 @@ function reset() {
|
|||||||
}
|
}
|
||||||
function handleUseRecord() {
|
function handleUseRecord() {
|
||||||
nx.$store('biz').deviceInfo = detailInfo.value
|
nx.$store('biz').deviceInfo = detailInfo.value
|
||||||
nx.$router.go('/pages/lims/deviceBusUseRecord/list')
|
nx.$router.go('/pages/device/deviceBusUseRecord/list')
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -105,7 +105,7 @@ async function handleDetail(row) {
|
|||||||
fileInfo.value.documentContent = documentContent
|
fileInfo.value.documentContent = documentContent
|
||||||
fileShow.value = true
|
fileShow.value = true
|
||||||
} else {
|
} else {
|
||||||
nx.$router.go('/pages/lims/documentList/preview', { documentUrl: row.documentUrl })
|
nx.$router.go('/pages/device/documentList/preview', { documentUrl: row.documentUrl })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -1,11 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<navbar-back
|
<navbar-back title="实验室管理系统【设备管理】" :autoBack="false" leftIcon="" leftText="">
|
||||||
title="实验室管理系统【设备管理】"
|
|
||||||
:autoBack="false"
|
|
||||||
leftIcon=""
|
|
||||||
:leftText="`您好!${userInfo.realname}`"
|
|
||||||
>
|
|
||||||
<u-icon @click="popupShow = true" size="28" color="#FFF" name="setting-fill" />
|
<u-icon @click="popupShow = true" size="28" color="#FFF" name="setting-fill" />
|
||||||
</navbar-back>
|
</navbar-back>
|
||||||
<up-grid :border="false" :col="gridCol">
|
<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])
|
const { gridCol } = useGridCol([400, 600], [2, 3, 4])
|
||||||
let popupShow = ref(false)
|
let popupShow = ref(false)
|
||||||
let list = reactive([
|
let list = reactive([
|
||||||
{ url: '/pages/lims/deviceBusDailyCheck/index', name: '点检', icon: 'dailyCheck' },
|
{ url: '/pages/device/deviceBusDailyCheck/index', name: '点检', icon: 'dailyCheck' },
|
||||||
{ url: '/pages/lims/deviceBusMaintain/index', name: '维护保养', icon: 'maintain' },
|
{ url: '/pages/device/deviceBusMaintain/index', name: '维护保养', icon: 'maintain' },
|
||||||
{ url: '/pages/lims/deviceBusUseRecord/index', name: '使用', icon: 'useRecord' },
|
{ url: '/pages/device/deviceBusUseRecord/index', name: '使用', icon: 'useRecord' },
|
||||||
{ url: '/pages/lims/deviceBusInfo/index', name: '设备查询', icon: 'baseInfo' },
|
{ url: '/pages/device/deviceBusInfo/index', name: '设备查询', icon: 'baseInfo' },
|
||||||
{ url: '/pages/lims/knowledge/index', name: '知识库查询', icon: 'knowledge' }
|
{ url: '/pages/device/knowledge/index', name: '知识库查询', icon: 'knowledge' }
|
||||||
])
|
])
|
||||||
|
|
||||||
const roleMenus = computed(() => nx.$store('user').roleMenus)
|
const roleMenus = computed(() => nx.$store('user').roleMenus)
|
||||||
@@ -127,7 +127,7 @@ async function handleDetail(row) {
|
|||||||
fileInfo.value.documentContent = documentContent
|
fileInfo.value.documentContent = documentContent
|
||||||
fileShow.value = true
|
fileShow.value = true
|
||||||
} else {
|
} else {
|
||||||
nx.$router.go('/pages/lims/documentList/preview', { documentUrl: row.documentUrl })
|
nx.$router.go('/pages/device/documentList/preview', { documentUrl: row.documentUrl })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="page bg-w pt30">
|
<view class="page bg-w pt30">
|
||||||
<up-grid :border="false" :col="gridCol">
|
<up-grid :border="false" :col="gridCol">
|
||||||
<up-grid-item class="mb25 mt25" v-for="(item, listIndex) in list" :key="listIndex" @click="goSystem(item.url)">
|
<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.icon}.png`"></image>
|
<image style="width: 80px; height: 80px" :src="`/static/images/menus/${item.path}.png`"></image>
|
||||||
<text class="grid-text">{{ item.name }}</text>
|
<text class="grid-text">{{ item.name }}</text>
|
||||||
</up-grid-item>
|
</up-grid-item>
|
||||||
</up-grid>
|
</up-grid>
|
||||||
@@ -13,13 +13,8 @@
|
|||||||
import { reactive, ref, computed, onMounted } from 'vue'
|
import { reactive, ref, computed, onMounted } from 'vue'
|
||||||
import nx from '@/nx'
|
import nx from '@/nx'
|
||||||
import { useGridCol } from '@/nx/hooks/useGridCol'
|
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) {
|
function goSystem(url) {
|
||||||
uni.setStorageSync('defaultModule', url)
|
uni.setStorageSync('defaultModule', url)
|
||||||
uni.reLaunch({ url })
|
uni.reLaunch({ url })
|
||||||
|
|||||||
@@ -1,18 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<navbar-back
|
<navbar-back title="实验室管理系统【样品库管理】" titleWidth="800" :autoBack="false" leftIcon="" leftText="">
|
||||||
title="样品库管理"
|
|
||||||
titleWidth="800"
|
|
||||||
:autoBack="false"
|
|
||||||
leftIcon=""
|
|
||||||
:leftText="`您好!${userInfo.nickname}`"
|
|
||||||
>
|
|
||||||
<u-icon @click="popupShow = true" size="28" color="#FFF" name="setting-fill" />
|
<u-icon @click="popupShow = true" size="28" color="#FFF" name="setting-fill" />
|
||||||
</navbar-back>
|
</navbar-back>
|
||||||
|
|
||||||
<up-grid :col="gridCol" :border="false">
|
<up-grid :col="gridCol" :border="false">
|
||||||
<up-grid-item class="mb20 mt20" v-for="item in menuItemList" :key="item.url" @click="goTo(item.url)">
|
<up-grid-item class="mb20 mt20" v-for="item in menuItemList" :key="item.id" @click="goTo(item.component)">
|
||||||
<u-icon :name="item.otherConf.icon" color="#0055A2" size="60" />
|
<u-icon :name="`/static/images/menus/${item.path}.png`" color="#0055A2" size="60" />
|
||||||
<view class="grid-text">{{ item.name }}</view>
|
<view class="grid-text">{{ item.name }}</view>
|
||||||
</up-grid-item>
|
</up-grid-item>
|
||||||
</up-grid>
|
</up-grid>
|
||||||
@@ -31,46 +25,15 @@ import mePopup from '@/pages/index/me-popup.vue'
|
|||||||
// 响应式数据
|
// 响应式数据
|
||||||
const popupShow = ref(false)
|
const popupShow = ref(false)
|
||||||
|
|
||||||
const menuItemList = ref([
|
const menuItemList = computed(() => {
|
||||||
{
|
let roleMenus = nx.$store('user').roleMenus
|
||||||
url: '/pages/sampleWarehouse/sampleSearch/index',
|
const result = roleMenus.find(item => item.path === 'ypkgl')
|
||||||
otherConf: { icon: '/static/images/menus/records.png' },
|
if (result) {
|
||||||
name: '样品查询'
|
return result.children
|
||||||
},
|
} else {
|
||||||
{
|
return []
|
||||||
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 userInfo = computed(() => nx.$store('user').userInfo)
|
|
||||||
|
|
||||||
// 方法
|
// 方法
|
||||||
const goTo = url => {
|
const goTo = url => {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<up-input
|
<up-input
|
||||||
class="mt10"
|
class="mt10"
|
||||||
v-model="targetCode"
|
v-model="targetCode"
|
||||||
placeholder="请扫描需要调拨的样品编号"
|
placeholder="请扫描需要下架的样品编号"
|
||||||
prefixIcon="scan"
|
prefixIcon="scan"
|
||||||
fontSize="16"
|
fontSize="16"
|
||||||
prefixIconStyle="font-size: 30px;"
|
prefixIconStyle="font-size: 30px;"
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
>
|
>
|
||||||
</up-input>
|
</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>
|
<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>
|
<scroll-view style="height: 49vh" scroll-y scroll-with-animation>
|
||||||
<uni-card margin="5px" v-for="item in sampleList" class="sample-item">
|
<uni-card margin="5px" v-for="item in sampleList" class="sample-item">
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ export default {
|
|||||||
async goIndex() {
|
async goIndex() {
|
||||||
await this.$store.dispatch('getRoleMenus', this.$store.state.postCode)
|
await this.$store.dispatch('getRoleMenus', this.$store.state.postCode)
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: 'pages/lims/index/index'
|
url: 'pages/device/index/index'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
submitForm() {
|
submitForm() {
|
||||||
|
|||||||
Reference in New Issue
Block a user