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; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
background-color: #000; background-color: rgba(31, 41, 55, 0.55);
opacity: 0.6;
color: #fff; color: #fff;
font-weight: 500; font-weight: 500;
z-index: 10; 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 => { const getAssayTaskDataList = params => {
return request({ return request({
@@ -20,6 +29,13 @@ const getAssayTaskDataList = params => {
method: 'GET' method: 'GET'
}) })
} }
const getAssayTaskDetailList = params => {
return request({
url: `/qms/business-assay-task-detail/list`,
params,
method: 'GET'
})
}
// 获取样品分析配置数据 // 获取样品分析配置数据
const getSampleAnalysisByTaskId = businessAssayTaskId => { const getSampleAnalysisByTaskId = businessAssayTaskId => {
return request({ 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 => { const redoAssayTaskDetail = params => {
return request({ return request({
@@ -230,13 +257,11 @@ const reportAssayTask = id => {
}) })
} }
const rollbackAssayTask = id => { const rollbackAssayTask = data => {
return request({ return request({
url: taskPrefix + '/rollbackAssayTask', url: '/qms/bus/sample/analysis/rollbackAnalysisSample',
method: 'POST', method: 'POST',
params: { data
id
}
}) })
} }
@@ -262,7 +287,9 @@ const queryQmsDicSampleProcessCodeList = () => {
export default { export default {
getAssayTaskList, getAssayTaskList,
getAssayTaskPage,
getAssayTaskDataList, getAssayTaskDataList,
getAssayTaskDetailList,
getSampleAnalysisByTaskId, getSampleAnalysisByTaskId,
batchSampleAndQcAnalysisByTaskId, batchSampleAndQcAnalysisByTaskId,
saveBatchSmpleAndQcAnalysis, saveBatchSmpleAndQcAnalysis,
@@ -283,5 +310,6 @@ export default {
createRollbackApply, createRollbackApply,
rollbackAssayTask, rollbackAssayTask,
submitTask, submitTask,
taskIngredients,
queryQmsDicSampleProcessCodeList queryQmsDicSampleProcessCodeList
} }

View File

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

View File

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

View File

@@ -1,8 +1,9 @@
<template> <template>
<view> <view>
<navbar-back title="天平状态"></navbar-back> <navbar-back title="天平状态"></navbar-back>
<up-grid border :col="4"> <view class="p20">
<up-grid-item v-for="(auncel, index) in auncelList" :index="index" :key="index"> <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-item" :style="{ backgroundImage: `url(${balanceBackground})` }">
<view class="auncel-header"> <view class="auncel-header">
<view class="auncel-code">{{ auncel.deviceCode }}</view> <view class="auncel-code">{{ auncel.deviceCode }}</view>
@@ -15,9 +16,11 @@
<view v-if="auncel.isConnected === 1" class="weight-unit">{{ auncel.weightUnit }}</view> <view v-if="auncel.isConnected === 1" class="weight-unit">{{ auncel.weightUnit }}</view>
</view> </view>
</view> </view>
<view v-if="auncel.isConnected != 1" class="shade">天平断开</view>
</up-grid-item> </up-grid-item>
</up-grid> </up-grid>
</view> </view>
</view>
</template> </template>
<script setup> <script setup>
@@ -114,7 +117,7 @@ function handleDeviceStatus(res) {
if (item.id === res.deviceId) { if (item.id === res.deviceId) {
item.isConnected = res.connected item.isConnected = res.connected
if (res.connected == 0) { if (res.connected == 0) {
item.weightData = '天平断开' item.weightData = ''
item.weightUnit = '' item.weightUnit = ''
item.weightStable = 0 item.weightStable = 0
} }
@@ -135,7 +138,7 @@ function handleConnClose() {
function getWeightText(auncel) { function getWeightText(auncel) {
if (auncel.isConnected !== 1) { if (auncel.isConnected !== 1) {
return '天平断开' return ''
} }
return auncel.weightData || '' return auncel.weightData || ''
} }
@@ -175,7 +178,21 @@ function getWeightStyle(auncel) {
padding: 10px; padding: 10px;
box-sizing: border-box; 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 { .auncel-header {
display: flex; display: flex;
flex-direction: column; flex-direction: column;

View File

@@ -1,6 +1,12 @@
<template> <template>
<view> <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" /> <u-icon @click="popupShow = true" size="28" color="#FFF" name="account-fill" />
</navbar-back> </navbar-back>
@@ -26,12 +32,21 @@ const popupShow = ref(false)
const isAllowAgainPrint = ref(false) const isAllowAgainPrint = ref(false)
const menuItemList = ref([ 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-work-list',
// { url: '/pages/analysis/sample/sample-report', otherConf: { icon: 'arrow-upward' }, name: '数据上报' }, otherConf: { icon: '/static/images/menus/sampleAnalysis.png' },
{ url: '/pages/analysis/sample/sample-report-search', otherConf: { icon: 'search' }, name: '待审数据' }, 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-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"> <view class="u-tab-item" :class="{ 'u-tab-item-active': active }" @tap.stop="handleClick">
<u-row class="full-width"> <u-row class="full-width">
<u-col span="2" class="text-center" style="position: relative"> <u-col span="2" class="text-center" style="position: relative">
<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> <u-icon :color="taskStyle(task)" name="tags-fill" size="40"></u-icon>
<text class="seq">{{ seq }}</text> <text class="seq">{{ seq }}</text>
</template>
</u-col> </u-col>
<u-col span="10"> <u-col span="10">
<view class="fs18">{{ task.taskNo }}</view> <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