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

@@ -250,8 +250,7 @@ function getWeightStyle(auncel) {
display: flex;
justify-content: center;
align-items: center;
background-color: #000;
opacity: 0.6;
background-color: rgba(31, 41, 55, 0.55);
color: #fff;
font-weight: 500;
z-index: 10;

View File

@@ -12,6 +12,15 @@ const getAssayTaskList = params => {
}
})
}
const getAssayTaskPage = params => {
return request({
url: '/qms/business-assay-task/page',
method: 'GET',
params: {
...params
}
})
}
// 获取样品列表
const getAssayTaskDataList = params => {
return request({
@@ -20,6 +29,13 @@ const getAssayTaskDataList = params => {
method: 'GET'
})
}
const getAssayTaskDetailList = params => {
return request({
url: `/qms/business-assay-task-detail/list`,
params,
method: 'GET'
})
}
// 获取样品分析配置数据
const getSampleAnalysisByTaskId = businessAssayTaskId => {
return request({
@@ -192,6 +208,17 @@ const submitTask = params => {
})
}
const taskIngredients = params => {
return request({
url: '/qms/bus/sample/analysis/issuedIngredients',
method: 'POST',
params,
custom: {
showSuccess: true
}
})
}
// 撤销提交任务明细
const redoAssayTaskDetail = params => {
return request({
@@ -230,13 +257,11 @@ const reportAssayTask = id => {
})
}
const rollbackAssayTask = id => {
const rollbackAssayTask = data => {
return request({
url: taskPrefix + '/rollbackAssayTask',
url: '/qms/bus/sample/analysis/rollbackAnalysisSample',
method: 'POST',
params: {
id
}
data
})
}
@@ -262,7 +287,9 @@ const queryQmsDicSampleProcessCodeList = () => {
export default {
getAssayTaskList,
getAssayTaskPage,
getAssayTaskDataList,
getAssayTaskDetailList,
getSampleAnalysisByTaskId,
batchSampleAndQcAnalysisByTaskId,
saveBatchSmpleAndQcAnalysis,
@@ -283,5 +310,6 @@ export default {
createRollbackApply,
rollbackAssayTask,
submitTask,
taskIngredients,
queryQmsDicSampleProcessCodeList
}

View File

@@ -7,9 +7,7 @@ export function useListData({ searchParams, api, needInitListData = false, proce
const loadingData = ref(true)
const pageParams = reactive({
pageNo: 1,
pageSize: 10,
order: 'desc',
column: 'createTime'
pageSize: 5
})
const total = ref(0)
const loadStatus = ref('loadmore')
@@ -21,12 +19,12 @@ export function useListData({ searchParams, api, needInitListData = false, proce
...unref(searchParams),
...pageParams
}
let { records, total: pageTotal } = await api(params)
let { list, total: pageTotal } = await api(params)
total.value = pageTotal
if (processData) {
records = processData(records)
list = processData(list)
}
return records
return list
}
// 页面底部触底加载更多

View File

@@ -21,7 +21,7 @@
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "系统选择"
"navigationBarTitleText": "模块选择"
}
},
{
@@ -171,6 +171,7 @@
"path": "pages/analysis/sample/sample-work-list",
"style": {
"navigationBarTitleText": "样品分析列表",
"enablePullDownRefresh": true,
"navigationStyle": "custom"
}
},

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

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