提交
This commit is contained in:
1 parent
a1c2511eb7
commit
eaf7d490ec
382 files changed
+44146
-34245
No files matched your search
@@ -288,7 +288,7 @@
|
||||
<div class="data-item">
|
||||
<div class="data-label">采集量</div>
|
||||
<div class="data-value"
|
||||
>{{ dash(row.collectAmount) }} {{ unitName(row.unitId) }}</div
|
||||
>{{ dash(row.collectAmount) }} {{ unitName(row.unitId, row.unitName) }}</div
|
||||
>
|
||||
</div>
|
||||
<div class="data-item">
|
||||
@@ -443,8 +443,9 @@
|
||||
</template>
|
||||
<div v-else class="sample-reception-empty">暂未接收</div>
|
||||
</div>
|
||||
<SampleQcInfoCards
|
||||
:qc-info="row.qcInfo"
|
||||
<SampleQcInfoGroupedPanel
|
||||
:gate-qc-info="row.qcInfo"
|
||||
:process-qc-info-list="row.processQcInfoList"
|
||||
:sample-reception="row.sampleReception"
|
||||
/>
|
||||
<SampleProductionInfoCards :production-info="row.productionInfo" />
|
||||
@@ -1146,7 +1147,7 @@
|
||||
import { computed, nextTick, ref, watch } from 'vue'
|
||||
import { Close } from '@element-plus/icons-vue'
|
||||
import ProtocolAttachmentReadonly from './ProtocolAttachmentReadonly.vue'
|
||||
import SampleQcInfoCards from '@/components/business/sample-qc-info-cards/index.vue'
|
||||
import SampleQcInfoGroupedPanel from '@/components/business/sample-qc-info-grouped-panel/index.vue'
|
||||
import SampleProductionInfoCards from '@/components/business/sample-production-info-cards/index.vue'
|
||||
import SampleStorageReleaseInfo from '@/components/business/sample-storage-release-info/index.vue'
|
||||
import {
|
||||
@@ -1660,8 +1661,30 @@
|
||||
return sampleTypeOptions.value.find((x) => x.id === id)?.typeName || dash(id)
|
||||
}
|
||||
|
||||
function unitName(id: string) {
|
||||
return unitOptions.value.find((x) => x.id === id)?.unitName || dash(id)
|
||||
function unitName(id: string, fallbackName?: string) {
|
||||
const fromOptions = unitOptions.value.find((x) => x.id === id)?.unitName
|
||||
if (fromOptions) return fromOptions
|
||||
const name = String(fallbackName || '').trim()
|
||||
if (name) return name
|
||||
return dash(id)
|
||||
}
|
||||
|
||||
function ensureUnitsInOptions(samples: Array<Record<string, any>>) {
|
||||
const merged = [...unitOptions.value]
|
||||
for (const s of samples) {
|
||||
const id = String(s.unitId || '')
|
||||
if (!id) continue
|
||||
const name = String(s.unitName || '').trim()
|
||||
const existing = merged.find((x) => x.id === id)
|
||||
if (existing) {
|
||||
if (name && (!existing.unitName || existing.unitName === existing.id)) {
|
||||
existing.unitName = name
|
||||
}
|
||||
continue
|
||||
}
|
||||
merged.push({ id, unitName: name || id })
|
||||
}
|
||||
unitOptions.value = merged
|
||||
}
|
||||
|
||||
function siteName(id: string) {
|
||||
@@ -1927,6 +1950,7 @@
|
||||
lookupLoading.value = true
|
||||
try {
|
||||
await baseLookupsPromise
|
||||
ensureUnitsInOptions((data.samples as Array<Record<string, any>>) || [])
|
||||
await loadConditionalLookups(data)
|
||||
} finally {
|
||||
lookupLoading.value = false
|
||||
|
||||
Reference in new issue
Block a user