This commit is contained in:
zlwu committed 2026-06-16 15:17:32 +08:00
1 parent 4f24d3b687
commit 1ff73b9a74
202 files changed
+11989 -10045

No files matched your search

@@ -99,6 +99,7 @@
import { SHOW_QC_TASK_MATERIAL_USAGE } from '@/utils/qc-material-ui'
import {
taskTypeLabel,
taskTypeTagType,
taskStatusLabel,
qcBizTypeLabel,
qcBizTypeTagType,
@@ -372,7 +373,7 @@
{
label: '检测类型',
value: taskTypeLabel(d.taskType),
tagType: d.taskType === 'sysz' ? 'success' : 'info'
tagType: taskTypeTagType(d.taskType)
},
{ label: '检测项目', value: d.itemName },
{ label: '项目编码', value: d.itemCode || '—' },
@@ -44,7 +44,7 @@
>
<div class="qc-detail-card__header">
<span class="qc-detail-card__name">{{ task.itemName || '—' }}</span>
<el-tag type="info" size="small">{{
<el-tag :type="taskTypeTagType(task.taskType || '')" size="small">{{
task.taskTypeLabel || taskTypeLabel(task.taskType || '')
}}</el-tag>
</div>
@@ -102,6 +102,7 @@
qcBizTypeLabel,
workOrderStatusLabel,
taskTypeLabel,
taskTypeTagType,
taskStatusLabel,
qcTaskConclusionLabel,
qcTaskConclusionTagType
@@ -18,7 +18,6 @@
<section class="sample-qc-grouped-panel__block">
<h4 class="sample-qc-grouped-panel__subtitle">生产过程质检</h4>
<p class="sample-qc-grouped-panel__hint">过程参考,不参与入库放行判定</p>
<div v-if="!processQcInfoList?.length" class="sample-qc-grouped-panel__empty">
暂无生产过程质检工单
@@ -118,14 +117,6 @@
border-left: 3px solid #10b981;
}
.sample-qc-grouped-panel__hint {
margin: 0;
padding-left: 13px;
font-size: 12px;
color: var(--mint-text-muted, #334155);
line-height: 1.4;
}
.sample-qc-grouped-panel__empty {
padding: 4px 0 4px 13px;
font-size: 13px;
@@ -26,32 +26,65 @@
</div>
<!-- sections -->
<div v-for="(section, si) in sections" :key="sectionKey(section, si)" class="view-section">
<div
v-for="(section, si) in sections"
:key="sectionKey(section, si)"
class="view-section"
:class="{ 'view-section--with-aside': section.asideSlot }"
>
<h3 v-if="section.title && section.titleStyle !== 'field'">{{ section.title }}</h3>
<div v-else-if="section.title && section.titleStyle === 'field'" class="view-field-label">
{{ section.title }}
</div>
<template v-if="section.fieldGroups?.length">
<div
v-for="(group, gi) in section.fieldGroups"
:key="`${si}-fg-${gi}`"
class="view-field-group"
:class="{ 'view-field-group--spaced': gi > 0 }"
>
<h3 v-if="group.title && group.titleStyle === 'section'">{{ group.title }}</h3>
<div
v-else-if="group.title && group.titleStyle !== 'section'"
class="view-field-label"
>
{{ group.title }}
</div>
<div class="view-section-body">
<div class="view-section-main">
<template v-if="section.fieldGroups?.length">
<div
v-for="(group, gi) in section.fieldGroups"
:key="`${si}-fg-${gi}`"
class="view-field-group"
:class="{ 'view-field-group--spaced': gi > 0 }"
>
<h3 v-if="group.title && group.titleStyle === 'section'">{{ group.title }}</h3>
<div
v-else-if="group.title && group.titleStyle !== 'section'"
class="view-field-label"
>
{{ group.title }}
</div>
<dl
v-if="group.fields.length"
class="view-kv-grid"
:class="`view-kv-grid--cols-${gridColumns}`"
>
<div
v-for="field in group.fields"
:key="field.label"
class="view-kv"
:class="{ 'view-kv-span-2': field.span }"
>
<dt>{{ field.label }}</dt>
<dd>
<el-tag v-if="field.tagType" :type="field.tagType" size="small">{{
formatViewValue(field.value)
}}</el-tag>
<ul v-else-if="field.items?.length" class="view-plain-list">
<li v-for="(item, idx) in field.items" :key="idx">{{ item }}</li>
</ul>
<template v-else>{{ formatViewValue(field.value) }}</template>
</dd>
</div>
</dl>
<p v-else-if="group.title" class="view-empty-hint">{{ group.emptyHint || '—' }}</p>
</div>
</template>
<dl
v-if="group.fields.length"
v-else-if="section.fields.length"
class="view-kv-grid"
:class="`view-kv-grid--cols-${gridColumns}`"
>
<div
v-for="field in group.fields"
v-for="field in section.fields"
:key="field.label"
class="view-kv"
:class="{ 'view-kv-span-2': field.span }"
@@ -68,41 +101,20 @@
</dd>
</div>
</dl>
<p v-else-if="group.title" class="view-empty-hint">{{ group.emptyHint || '—' }}</p>
<div
v-if="section.slotTitle && section.slotTitleStyle === 'field'"
class="view-field-label"
>
{{ section.slotTitle }}
</div>
<h3 v-else-if="section.slotTitle">{{ section.slotTitle }}</h3>
<div v-if="section.slot" class="view-section-slot">
<slot :name="section.slot" />
</div>
</div>
</template>
<dl
v-else-if="section.fields.length"
class="view-kv-grid"
:class="`view-kv-grid--cols-${gridColumns}`"
>
<div
v-for="field in section.fields"
:key="field.label"
class="view-kv"
:class="{ 'view-kv-span-2': field.span }"
>
<dt>{{ field.label }}</dt>
<dd>
<el-tag v-if="field.tagType" :type="field.tagType" size="small">{{
formatViewValue(field.value)
}}</el-tag>
<ul v-else-if="field.items?.length" class="view-plain-list">
<li v-for="(item, idx) in field.items" :key="idx">{{ item }}</li>
</ul>
<template v-else>{{ formatViewValue(field.value) }}</template>
</dd>
</div>
</dl>
<div
v-if="section.slotTitle && section.slotTitleStyle === 'field'"
class="view-field-label"
>
{{ section.slotTitle }}
</div>
<h3 v-else-if="section.slotTitle">{{ section.slotTitle }}</h3>
<div v-if="section.slot" class="view-section-slot">
<slot :name="section.slot" />
<aside v-if="section.asideSlot" class="view-section-aside">
<slot :name="section.asideSlot" />
</aside>
</div>
</div>
<slot name="append" />
@@ -164,6 +176,8 @@
slotTitleStyle?: 'section' | 'field'
/** 区块内追加内容(如附件列表),对应具名插槽名 */
slot?: string
/** 区块右侧附加区(如二维码),对应具名插槽名 */
asideSlot?: string
}
const props = withDefaults(
@@ -294,6 +308,26 @@
}
}
.view-section-body {
display: flex;
gap: 20px;
align-items: flex-start;
}
.view-section-main {
flex: 1;
min-width: 0;
}
.view-section-aside {
flex-shrink: 0;
width: 148px;
}
.view-section--with-aside .view-kv-grid--cols-4 {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.view-kv-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
@@ -390,6 +424,20 @@
.view-kv-grid--cols-4 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.view-section--with-aside .view-section-body {
flex-direction: column;
}
.view-section-aside {
width: 100%;
max-width: 180px;
margin: 0 auto;
}
.view-section--with-aside .view-kv-grid--cols-4 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (max-width: 640px) {
@@ -536,13 +584,6 @@
}
.system-view-dialog--compact {
.view-section-slot .view-subtable-wrap .el-table.view-subtable {
.el-table__header th.el-table__cell,
.el-table__body td.el-table__cell {
font-size: 13px;
}
}
.view-section-slot .view-empty-hint {
font-size: 12px;
}