feat:地址配置
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
<scroll-view scroll-y scroll-with-animation style="height: calc(82vh - 60px)">
|
||||
<block v-for="(sample, index) in sampleList" :key="index">
|
||||
<view class="sample-item">
|
||||
<u-row @click="showSampleDetail(sample.businessAssayTaskDataId, index)">
|
||||
<u-row @click="showSampleDetail(sample, index)">
|
||||
<u-col span="2" class="text-center">
|
||||
<view>
|
||||
<text>【{{ index + 1 }}】</text>
|
||||
@@ -61,8 +61,18 @@
|
||||
<rich-text :nodes="sample.assayProject"> </rich-text>
|
||||
</view>
|
||||
</u-col>
|
||||
<!-- <u-col span="2">
|
||||
<view class="remark-text">
|
||||
{{sample.remark}}
|
||||
</view>
|
||||
</u-col> -->
|
||||
</u-row>
|
||||
<u-icon class="sample-status" name="/static/images/status/return_b.png" size="45" />
|
||||
<u-icon
|
||||
v-if="sample.rollbackStatus"
|
||||
class="sample-status"
|
||||
:name="`/static/images/status/${sampleReturnIcon(sample.rollbackStatus)}.png`"
|
||||
size="45"
|
||||
/>
|
||||
</view>
|
||||
</block>
|
||||
</scroll-view>
|
||||
@@ -116,6 +126,18 @@ function handleScrolltolower() {
|
||||
scrollToLower()
|
||||
}
|
||||
|
||||
const sampleReturnIcon = rollbackStatus => {
|
||||
switch (rollbackStatus) {
|
||||
case 'returned':
|
||||
return 'return_returned'
|
||||
case 'rejected':
|
||||
return 'return_rejected'
|
||||
case 'in_progress':
|
||||
return 'return_in_progress'
|
||||
default:
|
||||
return ''
|
||||
}
|
||||
}
|
||||
const currentTask = computed(() => {
|
||||
if (listData.value.length > 0) {
|
||||
return listData.value[selectedIndex.value]
|
||||
@@ -129,8 +151,9 @@ const switchTask = async index => {
|
||||
getAssayTaskDetail(currentTask.value.id)
|
||||
}
|
||||
|
||||
const showSampleDetail = (id, index) => {
|
||||
detailId.value = id
|
||||
const showSampleDetail = (sample, index) => {
|
||||
if(sample.rollbackStatus === 'returned') return
|
||||
detailId.value = sample.businessAssayTaskDataId
|
||||
showDetailPopup.value = true
|
||||
}
|
||||
const searchParams = computed(() => ({
|
||||
@@ -205,4 +228,7 @@ onBackPress(() => {
|
||||
.selected_Sample {
|
||||
background-color: #d7e9fa;
|
||||
}
|
||||
.remark-text{
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -54,11 +54,11 @@
|
||||
class="u-tab-item"
|
||||
:class="[
|
||||
currentSampleIndex === index ? 'u-tab-item-active' : '',
|
||||
sample.rollbackStatus === 'in_progress' ? 'u-tab-item-disabled' : ''
|
||||
]"
|
||||
:data-current="index"
|
||||
@tap.stop="switchSample(index, false)"
|
||||
>
|
||||
<!-- sample.rollbackStatus === 'in_progress' ? 'u-tab-item-disabled' : '' 退回disabled暂不显示 -->
|
||||
<u-badge type="warning" :value="index + 1"></u-badge>
|
||||
<view class="ml20">
|
||||
<view>
|
||||
|
||||
@@ -268,12 +268,17 @@ const realFormData = computed(() => {
|
||||
// 实际保存逻辑
|
||||
async function handleSave(change) {
|
||||
let params = {}
|
||||
const staticFieldKeys = staticFormSchema.map(item => item.fieldKey);
|
||||
const dynamicData = Object.fromEntries(
|
||||
Object.entries(realFormData.value).filter(([key]) => !staticFieldKeys.includes(key))
|
||||
);
|
||||
console.log(dynamicData)
|
||||
if (change) {
|
||||
// 计算样品数据
|
||||
updateTableDataByConfigFields()
|
||||
params = {
|
||||
...realFormData.value,
|
||||
formValue: JSON.stringify(realFormData.value),
|
||||
formValue: JSON.stringify(dynamicData),
|
||||
assayTaskAnalysisDataList: tabs.value.map(item => ({
|
||||
datas: item.tableData,
|
||||
analysisType: item.name
|
||||
@@ -282,7 +287,7 @@ async function handleSave(change) {
|
||||
} else {
|
||||
params = {
|
||||
...realFormData.value,
|
||||
formValue: JSON.stringify(realFormData.value)
|
||||
formValue: JSON.stringify(dynamicData)
|
||||
}
|
||||
}
|
||||
await nx.$api.assayTask.saveBatchSmpleAndQcAnalysis(params)
|
||||
|
||||
@@ -61,6 +61,11 @@
|
||||
<rich-text :nodes="sample.assayProject"> </rich-text>
|
||||
</view>
|
||||
</u-col>
|
||||
<!-- <u-col span="2">
|
||||
<view class="remark-text">
|
||||
{{sample.remark}}
|
||||
</view>
|
||||
</u-col> -->
|
||||
</u-row>
|
||||
</u-col>
|
||||
</u-row>
|
||||
@@ -295,4 +300,8 @@ onBackPress(() => {
|
||||
font-size: 18px;
|
||||
width: 95%;
|
||||
}
|
||||
.remark-text{
|
||||
padding-top: 25px;
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user