feat:样品分析

This commit is contained in:
houjunxiang
2025-11-15 18:09:04 +08:00
parent d3f6ad4bf6
commit 00e21aebd3
60 changed files with 299 additions and 200 deletions

View File

@@ -1,22 +1,25 @@
<template>
<view>
<navbar-back title="天平状态"></navbar-back>
<up-grid border :col="4">
<up-grid-item v-for="(auncel, index) in auncelList" :index="index" :key="index">
<view class="auncel-item" :style="{ backgroundImage: `url(${balanceBackground})` }">
<view class="auncel-header">
<view class="auncel-code">{{ auncel.deviceCode }}</view>
<view class="auncel-name">{{ auncel.controlRealName }}</view>
</view>
<view class="weight">
<view :class="getWeightClass(auncel)" :style="getWeightStyle(auncel)">
{{ getWeightText(auncel) }}
<view class="p20">
<up-grid :col="4" style="gap: 20px">
<up-grid-item v-for="(auncel, index) in auncelList" :key="index">
<view class="auncel-item" :style="{ backgroundImage: `url(${balanceBackground})` }">
<view class="auncel-header">
<view class="auncel-code">{{ auncel.deviceCode }}</view>
<view class="auncel-name">{{ auncel.controlRealName }}</view>
</view>
<view class="weight">
<view :class="getWeightClass(auncel)" :style="getWeightStyle(auncel)">
{{ getWeightText(auncel) }}
</view>
<view v-if="auncel.isConnected === 1" class="weight-unit">{{ auncel.weightUnit }}</view>
</view>
<view v-if="auncel.isConnected === 1" class="weight-unit">{{ auncel.weightUnit }}</view>
</view>
</view>
</up-grid-item>
</up-grid>
<view v-if="auncel.isConnected != 1" class="shade">天平断开</view>
</up-grid-item>
</up-grid>
</view>
</view>
</template>
@@ -114,7 +117,7 @@ function handleDeviceStatus(res) {
if (item.id === res.deviceId) {
item.isConnected = res.connected
if (res.connected == 0) {
item.weightData = '天平断开'
item.weightData = ''
item.weightUnit = ''
item.weightStable = 0
}
@@ -135,7 +138,7 @@ function handleConnClose() {
function getWeightText(auncel) {
if (auncel.isConnected !== 1) {
return '天平断开'
return ''
}
return auncel.weightData || ''
}
@@ -175,7 +178,21 @@ function getWeightStyle(auncel) {
padding: 10px;
box-sizing: border-box;
}
.shade {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
background-color: rgba(31, 41, 55, 0.55);
color: #fff;
font-weight: 500;
z-index: 10;
border-radius: 8px;
}
.auncel-header {
display: flex;
flex-direction: column;

View File

@@ -1,6 +1,12 @@
<template>
<view>
<navbar-back title="检斤检化验系统" :autoBack="false" leftIcon="" :leftText="`您好!${userInfo.nickname}`">
<navbar-back
title="实验室管理系统【分析管理】"
titleWidth="800"
:autoBack="false"
leftIcon=""
:leftText="`您好!${userInfo.nickname}`"
>
<u-icon @click="popupShow = true" size="28" color="#FFF" name="account-fill" />
</navbar-back>
@@ -26,12 +32,21 @@ const popupShow = ref(false)
const isAllowAgainPrint = ref(false)
const menuItemList = ref([
// { url: '/pages/analysis/sample/sample-receive', otherConf: { icon: 'arrow-downward' }, name: '收样' },
{ url: '/pages/analysis/sample/sample-work-list', otherConf: { icon: 'edit-pen-fill' }, name: '样品分析' },
// { url: '/pages/analysis/sample/sample-report', otherConf: { icon: 'arrow-upward' }, name: '数据上报' },
{ url: '/pages/analysis/sample/sample-report-search', otherConf: { icon: 'search' }, name: '待审数据' },
// { url: '/pages/analysis/sample/sample-print', otherConf: { icon: 'file-text-fill' }, name: '单据补打' },
{ url: '/pages/analysis/setting/setting', otherConf: { icon: 'setting-fill' }, name: '系统设置' }
{
url: '/pages/analysis/sample/sample-work-list',
otherConf: { icon: '/static/images/menus/sampleAnalysis.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/balance.png' },
name: '天平查看'
}
])
// 计算属性

View File

@@ -3,8 +3,11 @@
<view class="u-tab-item" :class="{ 'u-tab-item-active': active }" @tap.stop="handleClick">
<u-row class="full-width">
<u-col span="2" class="text-center" style="position: relative">
<u-icon :color="taskStyle(task)" name="tags-fill" size="40"></u-icon>
<text class="seq">{{ seq }}</text>
<slot name="tag" v-if="$slots.tag" :task="task"></slot>
<template v-else>
<u-icon :color="taskStyle(task)" name="tags-fill" size="40"></u-icon>
<text class="seq">{{ seq }}</text>
</template>
</u-col>
<u-col span="10">
<view class="fs18">{{ task.taskNo }}</view>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -13,8 +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: 'device' },
{ url: '/pages/analysis/index/index', name: '化学分析系统', icon: 'analyse' }
{ url: '/pages/lims/index/index', name: '设备管理', icon: 'device' },
{ url: '/pages/analysis/index/index', name: '分析管理', icon: 'analyse' }
])
// const sysMenus = computed(() => nx.$store('user').sysMenus)

View File

@@ -8,7 +8,7 @@
</view>
<u-cell-group>
<u-cell icon="grid-fill" title="切换系统" :is-link="true" @click="handleTo('/pages/index/index')" />
<u-cell icon="grid-fill" title="模块选择" :is-link="true" @click="handleTo('/pages/index/index')" />
<u-cell icon="info-circle-fill" title="关于我们" :is-link="true" @click="handleTo('/pages/me/aboutMe')" />
</u-cell-group>

View File

@@ -3,7 +3,7 @@
<view>
<view class="aboutme">
<view class="content">
<image class="logo" src="../../static/images/logo_mas.png"></image>
<image class="logo" src="../../static/images/logo_lims.png"></image>
<view style="font-size: 40px; padding-top: 20px">{{ state.appName }}</view>
<view style="padding-top: 20px; font-size: 22px">当前APP版本{{ state.appVersion }}</view>
<rich-text :nodes="state.aboutMe"></rich-text>
@@ -23,8 +23,8 @@ import { onLoad } from '@dcloudio/uni-app'
import { reactive } from 'vue'
let state = reactive({
pageHeight: 0,
appVersion: '1.1.0',
appName: '管理系统',
appVersion: '1.0.0',
appName: '实验室管理系统',
copyrightYear: '2019',
aboutMe:
'<div style="text-align:left;font-size:20px;padding:18px"><p style="text-indent:2em;line-height:32px"></p></div>'