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