feat:样品库管理

This commit is contained in:
houjunxiang
2025-11-19 11:02:11 +08:00
parent 06210e79fd
commit 0494d224be
33 changed files with 1282 additions and 673 deletions

View File

@@ -7,7 +7,7 @@
leftIcon=""
:leftText="`您好!${userInfo.nickname}`"
>
<u-icon @click="popupShow = true" size="28" color="#FFF" name="account-fill" />
<u-icon @click="popupShow = true" size="28" color="#FFF" name="setting-fill" />
</navbar-back>
<up-grid :col="gridCol" :border="false">
@@ -29,7 +29,6 @@ import mePopup from '@/pages/index/me-popup.vue'
// 响应式数据
const popupShow = ref(false)
const isAllowAgainPrint = ref(false)
const menuItemList = ref([
{
@@ -57,63 +56,13 @@ const goTo = url => {
nx.$router.go(url)
}
const checkAllowAgainPrint = () => {
const param = {
userId: userInfo.value.id,
clientId: 'auncel'
}
nx.$api.user.getAppPermission(param).then(res => {
if (!res.success) return
const ret = res.result || []
if (ret.length === 0) return
for (let i = 0; i < ret.length; i++) {
if (ret[i].roleValue && ret[i].roleValue === 2) {
isAllowAgainPrint.value = true
}
}
})
}
const openLaboratoryWs = () => {
const regData = {
msgId: nx.$helper.uuid(),
cmd: 'register',
clientType: 'caaClient',
data: {
userId: userInfo.value.id,
tenantId: userInfo.value.loginTenantId,
userRealName: userInfo.value.realname
}
}
nx.$measure.setRegData(JSON.stringify(regData))
nx.$measure.open()
}
// 生命周期
onMounted(() => {
// checkAllowAgainPrint()
// openLaboratoryWs()
})
onMounted(() => {})
// 动态设置 grid 列数
const { gridCol } = useGridCol([400], [2, 3])
</script>
<style scoped lang="scss">
.title_content {
text-align: center;
padding-top: 75px;
letter-spacing: 10px;
width: 100%;
font-size: 36px;
color: #fff;
}
.banner {
overflow: hidden;
background-repeat: no-repeat;
background-size: 100%;
}
.grid-text {
font-size: 24px;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -14,11 +14,13 @@ import nx from '@/nx'
import { useGridCol } from '@/nx/hooks/useGridCol'
let list = reactive([
{ url: '/pages/lims/index/index', name: '设备管理', icon: 'device' },
{ url: '/pages/analysis/index/index', name: '分析管理', icon: 'analyse' }
{ url: '/pages/analysis/index/index', name: '分析管理', icon: 'analyse' },
{ url: '/pages/sampleWarehouse/index/index', name: '样品库管理', icon: 'sampleWarehouse' }
])
// const sysMenus = computed(() => nx.$store('user').sysMenus)
function goSystem(url) {
uni.setStorageSync('defaultModule', url)
uni.reLaunch({ url })
}

View File

@@ -9,6 +9,7 @@
<u-cell-group>
<u-cell icon="grid-fill" title="模块选择" :is-link="true" @click="handleTo('/pages/index/index')" />
<u-cell icon="order" title="打印设置" :isLink="true" @click="handleTo('/pages/setting/print')"></u-cell>
<u-cell icon="info-circle-fill" title="关于我们" :is-link="true" @click="handleTo('/pages/me/aboutMe')" />
</u-cell-group>

View File

@@ -1,7 +1,12 @@
<template>
<view>
<navbar-back title="设备管理系统" :autoBack="false" leftIcon="" :leftText="`您好!${userInfo.realname}`">
<u-icon @click="popupShow = true" size="28" color="#FFF" name="account-fill" />
<navbar-back
title="实验室管理系统【设备管理】"
:autoBack="false"
leftIcon=""
:leftText="`您好!${userInfo.realname}`"
>
<u-icon @click="popupShow = true" size="28" color="#FFF" name="setting-fill" />
</navbar-back>
<up-grid :border="false" :col="gridCol">
<up-grid-item

View File

@@ -5,6 +5,7 @@
</view>
<u-cell-group>
<u-cell icon="setting-fill" title="切换系统" :isLink="true" @click="handleTo('/pages/index/index')"></u-cell>
<u-cell icon="order" title="打印设置" :isLink="true" @click="handleTo('/pages/setting/print')"></u-cell>
<u-cell icon="info-circle-fill" title="关于我们" :isLink="true" @click="handleTo('/pages/me/aboutMe')"></u-cell>
</u-cell-group>
<u-button class="mt40" type="warning" :plain="true" text="退出当前账号" @click="handleLoginOut"></u-button>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,89 @@
<template>
<view>
<navbar-back
title="样品库管理"
titleWidth="800"
:autoBack="false"
leftIcon=""
:leftText="`您好!${userInfo.nickname}`"
>
<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" />
<view class="grid-text">{{ item.name }}</view>
</up-grid-item>
</up-grid>
<mePopup :show="popupShow" @update:show="val => (popupShow = val)" />
</view>
</template>
<script setup>
import { ref, computed, onMounted } from 'vue'
import nx from '@/nx'
import { onLoad, onShow } from '@dcloudio/uni-app'
import { useGridCol } from '@/nx/hooks/useGridCol'
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/returnToStock.png' },
name: '样品归库'
},
{
url: '/pages/sampleWarehouse/execChangeLocation/index',
otherConf: { icon: '/static/images/menus/execChangeLocation.png' },
name: '库位变更'
}
])
// 计算属性
const userInfo = computed(() => nx.$store('user').userInfo)
// 方法
const goTo = url => {
nx.$router.go(url)
}
onShow(() => {
//连接打印服务
let printList = uni.getStorageSync('KEY_PRINT_LIST')
if (printList && printList.length > 0) {
for (let print of printList) {
nx.$print.open(print.printIp, print.printPort)
}
} else {
uni.showModal({
title: '提示',
showCancel: false,
content: '打印服务未配置,请在系统设置中配置打印服务',
success: function (res) {
uni.navigateTo({
url: '/pages/setting/print'
})
}
})
}
})
// 生命周期
onMounted(() => {})
// 动态设置 grid 列数
const { gridCol } = useGridCol([400], [2, 3])
</script>
<style scoped lang="scss">
.grid-text {
font-size: 24px;
}
</style>

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More