提交
This commit is contained in:
1 parent
87dbbf1247
commit
5254eea4a2
39 files changed
+1296
-2988
No files matched your search
@@ -1,510 +0,0 @@
|
||||
<!-- 弹窗详情/表单加载骨架(Fresh Mint,对齐 SystemViewDialog / dialog-form-layout) -->
|
||||
<template>
|
||||
<div
|
||||
class="dialog-detail-skeleton"
|
||||
:class="[
|
||||
`dialog-detail-skeleton--${variant}`,
|
||||
{ 'dialog-detail-skeleton--compact': compact }
|
||||
]"
|
||||
aria-busy="true"
|
||||
aria-label="内容加载中"
|
||||
>
|
||||
<!-- SystemViewDialog 布局 -->
|
||||
<template v-if="variant === 'system-view' || variant === 'system-view-image'">
|
||||
<el-skeleton animated class="dds-hero">
|
||||
<template #template>
|
||||
<div class="dds-hero__inner">
|
||||
<el-skeleton-item
|
||||
:variant="variant === 'system-view-image' ? 'image' : 'rect'"
|
||||
class="dds-hero__icon"
|
||||
/>
|
||||
<div class="dds-hero__main">
|
||||
<el-skeleton-item variant="h1" class="dds-hero__title" />
|
||||
<el-skeleton-item variant="text" class="dds-hero__meta" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-skeleton>
|
||||
<div
|
||||
v-for="i in resolvedSectionCount"
|
||||
:key="`sv-${i}`"
|
||||
class="dds-section dds-section--view"
|
||||
>
|
||||
<el-skeleton animated>
|
||||
<template #template>
|
||||
<el-skeleton-item variant="h3" class="dds-section__title" />
|
||||
<div class="dds-kv-grid" :class="`dds-kv-grid--cols-${gridColumns}`">
|
||||
<div v-for="f in resolvedFieldCount" :key="f" class="dds-kv-field">
|
||||
<el-skeleton-item variant="text" class="dds-kv-field__label" />
|
||||
<el-skeleton-item variant="p" class="dds-kv-field__value" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-skeleton>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- CRUD 表单弹窗(无 Tab) -->
|
||||
<template v-else-if="variant === 'form'">
|
||||
<div
|
||||
v-for="i in resolvedSectionCount"
|
||||
:key="`form-${i}`"
|
||||
class="dds-section dds-section--form"
|
||||
>
|
||||
<el-skeleton animated>
|
||||
<template #template>
|
||||
<el-skeleton-item variant="h3" class="dds-section__title dds-section__title--form" />
|
||||
<div class="dds-form-grid" :class="`dds-form-grid--cols-${gridColumns}`">
|
||||
<div v-for="f in resolvedFieldCount" :key="f" class="dds-form-field">
|
||||
<el-skeleton-item variant="text" class="dds-form-field__label" />
|
||||
<el-skeleton-item variant="rect" class="dds-form-field__control" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-skeleton>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- 带 Sticky Tab 的表单弹窗(协议单/捐赠单等) -->
|
||||
<template v-else-if="variant === 'tabs-form'">
|
||||
<div class="dds-tabs">
|
||||
<el-skeleton-item
|
||||
v-for="t in resolvedTabCount"
|
||||
:key="t"
|
||||
variant="rect"
|
||||
class="dds-tabs__item"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
v-for="i in resolvedSectionCount"
|
||||
:key="`tf-${i}`"
|
||||
class="dds-section dds-section--form"
|
||||
>
|
||||
<el-skeleton animated>
|
||||
<template #template>
|
||||
<el-skeleton-item variant="h3" class="dds-section__title dds-section__title--form" />
|
||||
<div class="dds-form-grid dds-form-grid--cols-2">
|
||||
<div v-for="f in resolvedFieldCount" :key="f" class="dds-form-field">
|
||||
<el-skeleton-item variant="text" class="dds-form-field__label" />
|
||||
<el-skeleton-item variant="rect" class="dds-form-field__control" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-skeleton>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- 大宽查看弹窗(采集协议单等:KPI + 多区块) -->
|
||||
<template v-else-if="variant === 'tabs-detail'">
|
||||
<div class="dds-tabs">
|
||||
<el-skeleton-item
|
||||
v-for="t in resolvedTabCount"
|
||||
:key="t"
|
||||
variant="rect"
|
||||
class="dds-tabs__item"
|
||||
/>
|
||||
</div>
|
||||
<el-skeleton animated class="dds-kpi">
|
||||
<template #template>
|
||||
<div class="dds-kpi__grid">
|
||||
<div v-for="i in 4" :key="i" class="dds-kpi__card">
|
||||
<el-skeleton-item variant="circle" class="dds-kpi__icon" />
|
||||
<div class="dds-kpi__text">
|
||||
<el-skeleton-item variant="text" class="dds-kpi__label" />
|
||||
<el-skeleton-item variant="h3" class="dds-kpi__value" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-skeleton>
|
||||
<div
|
||||
v-for="(sec, sIdx) in tabsDetailSections"
|
||||
:key="sec.key"
|
||||
class="dds-section"
|
||||
:class="{ 'dds-section--green': sec.tone === 'green' }"
|
||||
>
|
||||
<el-skeleton animated>
|
||||
<template #template>
|
||||
<el-skeleton-item variant="h3" class="dds-section__title" />
|
||||
<div
|
||||
v-if="sec.fieldCount > 0"
|
||||
class="dds-data-grid"
|
||||
:class="`dds-data-grid--${sec.cols}`"
|
||||
>
|
||||
<div v-for="f in sec.fieldCount" :key="f" class="dds-data-field">
|
||||
<el-skeleton-item variant="text" class="dds-data-field__label" />
|
||||
<el-skeleton-item variant="p" class="dds-data-field__value" />
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="sIdx === 1" class="dds-subcards">
|
||||
<div v-for="j in 3" :key="j" class="dds-subcard">
|
||||
<el-skeleton-item variant="text" style="width: 28%; margin-bottom: 12px" />
|
||||
<div class="dds-data-grid dds-data-grid--4">
|
||||
<div v-for="k in 4" :key="k" class="dds-data-field">
|
||||
<el-skeleton-item variant="text" class="dds-data-field__label" />
|
||||
<el-skeleton-item variant="p" class="dds-data-field__value" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-skeleton>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- 简易块(工作流/订单等自定义弹窗) -->
|
||||
<template v-else>
|
||||
<div
|
||||
v-for="i in resolvedSectionCount"
|
||||
:key="`simple-${i}`"
|
||||
class="dds-section dds-section--simple"
|
||||
>
|
||||
<el-skeleton animated :rows="resolvedFieldCount" />
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
/** system-view | system-view-image | form | tabs-form | tabs-detail | simple */
|
||||
variant?: 'system-view' | 'system-view-image' | 'form' | 'tabs-form' | 'tabs-detail' | 'simple'
|
||||
sectionCount?: number
|
||||
fieldCount?: number
|
||||
tabCount?: number
|
||||
gridColumns?: 2 | 3 | 4
|
||||
compact?: boolean
|
||||
}>(),
|
||||
{
|
||||
variant: 'system-view',
|
||||
sectionCount: 2,
|
||||
fieldCount: 6,
|
||||
tabCount: 5,
|
||||
gridColumns: 2,
|
||||
compact: false
|
||||
}
|
||||
)
|
||||
|
||||
const resolvedSectionCount = computed(() => Math.max(1, props.sectionCount))
|
||||
const resolvedFieldCount = computed(() => Math.max(2, props.fieldCount))
|
||||
const resolvedTabCount = computed(() => Math.max(3, props.tabCount))
|
||||
|
||||
const tabsDetailSections = [
|
||||
{ key: 'basic', tone: 'white' as const, cols: 4, fieldCount: 8 },
|
||||
{ key: 'party', tone: 'green' as const, cols: 4, fieldCount: 0 },
|
||||
{ key: 'collection', tone: 'white' as const, cols: 4, fieldCount: 8 },
|
||||
{ key: 'sample', tone: 'white' as const, cols: 4, fieldCount: 6 },
|
||||
{ key: 'payment', tone: 'white' as const, cols: 4, fieldCount: 8 }
|
||||
]
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.dialog-detail-skeleton {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0;
|
||||
min-height: min(360px, calc(100vh - 240px));
|
||||
|
||||
&--form,
|
||||
&--tabs-form {
|
||||
gap: 16px;
|
||||
padding: 2px 0 8px;
|
||||
min-height: min(320px, calc(100vh - 240px));
|
||||
}
|
||||
|
||||
&--tabs-detail {
|
||||
gap: 20px;
|
||||
min-height: min(640px, calc(100vh - 240px));
|
||||
}
|
||||
|
||||
&--compact {
|
||||
min-height: min(280px, calc(100vh - 200px));
|
||||
}
|
||||
}
|
||||
|
||||
.dds-hero {
|
||||
:deep(.el-skeleton) {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.dds-hero__inner {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
padding: 20px 22px;
|
||||
background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 55%);
|
||||
border-bottom: 1px solid #d9e8e2;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.dds-hero__icon {
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
border-radius: 12px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.dds-hero__main {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.dds-hero__title {
|
||||
width: 42%;
|
||||
height: 22px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.dds-hero__meta {
|
||||
width: 58%;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.dialog-detail-skeleton--compact .dds-hero__inner {
|
||||
padding: 12px 18px;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.dialog-detail-skeleton--compact .dds-hero__icon {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
}
|
||||
|
||||
.dds-section--view {
|
||||
padding: 18px 22px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
:deep(.el-skeleton) {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.dds-section--form,
|
||||
.dds-section--simple {
|
||||
padding: 4px 0;
|
||||
|
||||
:deep(.el-skeleton) {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.dds-section--green {
|
||||
padding: 22px 24px;
|
||||
background: #f0fdf4;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
|
||||
.dds-section:not(.dds-section--view):not(.dds-section--green) {
|
||||
&.dds-section--form {
|
||||
padding: 8px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.dds-section__title {
|
||||
width: 96px;
|
||||
height: 18px;
|
||||
margin-bottom: 14px;
|
||||
|
||||
&--form {
|
||||
width: 80px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.dds-kv-grid {
|
||||
display: grid;
|
||||
gap: 12px 20px;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
|
||||
&--cols-3 {
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
.dds-kv-field {
|
||||
display: grid;
|
||||
grid-template-columns: 96px 1fr;
|
||||
gap: 8px 12px;
|
||||
}
|
||||
|
||||
.dds-kv-field__label {
|
||||
width: 80%;
|
||||
height: 13px;
|
||||
}
|
||||
|
||||
.dds-kv-field__value {
|
||||
width: 92%;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.dds-form-grid {
|
||||
display: grid;
|
||||
gap: 14px 20px;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
|
||||
&--cols-3 {
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
.dds-form-field__label {
|
||||
width: 40%;
|
||||
height: 12px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.dds-form-field__control {
|
||||
width: 100%;
|
||||
height: 36px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.dds-tabs {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px;
|
||||
padding: 4px;
|
||||
background: #f0fdf4;
|
||||
border-radius: 8px;
|
||||
width: fit-content;
|
||||
max-width: 100%;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.dds-tabs__item {
|
||||
width: 88px;
|
||||
height: 36px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.dds-kpi {
|
||||
margin-bottom: 4px;
|
||||
|
||||
:deep(.el-skeleton) {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.dds-kpi__grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
padding: 6px;
|
||||
background: linear-gradient(135deg, #ecfdf5 0%, #f8fafc 52%, #ecfdf5 100%);
|
||||
border: 1px solid #a7f3d0;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.dds-kpi__card {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
padding: 14px 18px;
|
||||
|
||||
&:not(:last-child) {
|
||||
border-right: 1px solid rgba(167, 243, 208, 0.75);
|
||||
}
|
||||
}
|
||||
|
||||
.dds-kpi__icon {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.dds-kpi__text {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.dds-kpi__label {
|
||||
width: 48%;
|
||||
height: 11px;
|
||||
}
|
||||
|
||||
.dds-kpi__value {
|
||||
width: 72%;
|
||||
height: 16px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.dds-section:not(.dds-section--view) {
|
||||
border-radius: 12px;
|
||||
padding: 22px 24px;
|
||||
background: #fff;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
|
||||
|
||||
:deep(.el-skeleton) {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.dds-data-grid {
|
||||
display: grid;
|
||||
gap: 14px 20px;
|
||||
|
||||
&--4 {
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
.dds-data-field__label {
|
||||
width: 56%;
|
||||
height: 12px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.dds-data-field__value {
|
||||
width: 88%;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.dds-subcards {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 16px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.dds-subcard {
|
||||
padding: 16px;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
border: 1px solid #e2e8f0;
|
||||
}
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
.dds-kpi__grid {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
|
||||
.dds-kpi__card {
|
||||
border-right: none !important;
|
||||
border-bottom: 1px solid rgba(167, 243, 208, 0.75);
|
||||
|
||||
&:nth-last-child(-n + 2) {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
|
||||
.dds-subcards {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.dds-data-grid--4 {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.dds-kv-grid--cols-3 {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,51 +1,23 @@
|
||||
<!-- 弹窗正文:加载中显示骨架,避免 dialog-form-layout 先小后大 -->
|
||||
<!-- 弹窗正文:加载中显示 v-loading,避免 dialog-form-layout 先小后大 -->
|
||||
<template>
|
||||
<div
|
||||
class="dialog-form-body"
|
||||
:class="[bodyClass, { 'is-dialog-loading': loading }]"
|
||||
:class="bodyClass"
|
||||
v-loading="loading"
|
||||
>
|
||||
<DialogDetailSkeleton
|
||||
v-if="loading"
|
||||
:variant="skeletonVariant"
|
||||
:section-count="skeletonSectionCount"
|
||||
:field-count="skeletonFieldCount"
|
||||
:tab-count="skeletonTabCount"
|
||||
:grid-columns="skeletonGridColumns"
|
||||
:compact="skeletonCompact"
|
||||
/>
|
||||
<slot v-else />
|
||||
<slot />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import DialogDetailSkeleton from '@/components/business/dialog-detail-skeleton/index.vue'
|
||||
|
||||
withDefaults(
|
||||
defineProps<{
|
||||
loading?: boolean
|
||||
bodyClass?: string
|
||||
skeletonVariant?: 'system-view' | 'system-view-image' | 'form' | 'tabs-form' | 'tabs-detail' | 'simple'
|
||||
skeletonSectionCount?: number
|
||||
skeletonFieldCount?: number
|
||||
skeletonTabCount?: number
|
||||
skeletonGridColumns?: 2 | 3 | 4
|
||||
skeletonCompact?: boolean
|
||||
}>(),
|
||||
{
|
||||
loading: false,
|
||||
bodyClass: '',
|
||||
skeletonVariant: 'form',
|
||||
skeletonSectionCount: 2,
|
||||
skeletonFieldCount: 6,
|
||||
skeletonTabCount: 5,
|
||||
skeletonGridColumns: 2,
|
||||
skeletonCompact: false
|
||||
bodyClass: ''
|
||||
}
|
||||
)
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.dialog-form-body.is-dialog-loading {
|
||||
min-height: min(400px, calc(100vh - 220px));
|
||||
}
|
||||
</style>
|
||||
@@ -9,14 +9,7 @@
|
||||
@update:model-value="emit('update:modelValue', $event)"
|
||||
@closed="handleClosed"
|
||||
>
|
||||
<div class="product-form-container" :class="{ 'is-view-loading': loading }">
|
||||
<DialogDetailSkeleton
|
||||
v-if="loading"
|
||||
variant="system-view-image"
|
||||
:section-count="3"
|
||||
:grid-columns="2"
|
||||
/>
|
||||
<template v-else>
|
||||
<div class="product-form-container" v-loading="loading">
|
||||
<div class="view-hero">
|
||||
<el-image
|
||||
v-if="formData.imageUrl"
|
||||
@@ -236,7 +229,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
@@ -269,7 +261,6 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, reactive, ref, watch } from 'vue'
|
||||
import { Close, Document, Money, Picture, Setting, VideoPlay } from '@element-plus/icons-vue'
|
||||
import DialogDetailSkeleton from '@/components/business/dialog-detail-skeleton/index.vue'
|
||||
import { buildTreePathLabelFromFlat } from '@/utils/tree-path'
|
||||
import {
|
||||
fetchProductDetail,
|
||||
@@ -626,10 +617,6 @@ watch(
|
||||
max-height: 62vh;
|
||||
overflow-y: auto;
|
||||
|
||||
&.is-view-loading {
|
||||
min-height: min(420px, calc(100vh - 220px));
|
||||
overflow: hidden;
|
||||
}
|
||||
padding-right: 6px;
|
||||
&::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
:meta="viewDetail?.taskNo || ''"
|
||||
:sections="viewSections"
|
||||
:loading="loading"
|
||||
:skeleton-section-count="3"
|
||||
:skeleton-field-count="8"
|
||||
append-to-body
|
||||
compact
|
||||
modal-class="qc-task-view-dialog-mask"
|
||||
|
||||
@@ -13,16 +13,7 @@
|
||||
:modal-class="modalClass"
|
||||
style="backdrop-filter: none"
|
||||
>
|
||||
<div class="dialog-scroll" :class="{ 'is-view-loading': loading }">
|
||||
<DialogDetailSkeleton
|
||||
v-if="loading"
|
||||
variant="system-view"
|
||||
:section-count="skeletonSectionCount"
|
||||
:field-count="skeletonFieldCount"
|
||||
:grid-columns="gridColumns"
|
||||
:compact="compact"
|
||||
/>
|
||||
<template v-else>
|
||||
<div class="dialog-scroll" v-loading="loading">
|
||||
<!-- hero -->
|
||||
<div class="view-hero">
|
||||
<div class="view-hero-icon">
|
||||
@@ -73,7 +64,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<slot name="append" />
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
@@ -87,7 +77,6 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, type Component } from 'vue'
|
||||
import { Close, Document } from '@element-plus/icons-vue'
|
||||
import DialogDetailSkeleton from '@/components/business/dialog-detail-skeleton/index.vue'
|
||||
|
||||
function isIconComponent(val: unknown): val is Component {
|
||||
return val != null && (typeof val === 'object' || typeof val === 'function')
|
||||
@@ -140,12 +129,8 @@
|
||||
dialogClass?: string
|
||||
/** 紧凑布局:缩小头部/区块间距与内容区最大高度 */
|
||||
compact?: boolean
|
||||
/** 详情异步加载中:展示骨架屏 */
|
||||
/** 详情异步加载中 */
|
||||
loading?: boolean
|
||||
/** 骨架区块数量(默认 2) */
|
||||
skeletonSectionCount?: number
|
||||
/** 每区块骨架字段行数(默认 6) */
|
||||
skeletonFieldCount?: number
|
||||
}>(),
|
||||
{
|
||||
width: '720px',
|
||||
@@ -154,9 +139,7 @@
|
||||
modalClass: '',
|
||||
dialogClass: '',
|
||||
compact: false,
|
||||
loading: false,
|
||||
skeletonSectionCount: 2,
|
||||
skeletonFieldCount: 6
|
||||
loading: false
|
||||
}
|
||||
)
|
||||
|
||||
@@ -186,10 +169,6 @@
|
||||
.dialog-scroll {
|
||||
overflow-y: auto;
|
||||
max-height: calc(100vh - 120px);
|
||||
|
||||
&.is-view-loading {
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.view-hero {
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_production_work_order_usetaskstepeditor_ts", "label": "useTaskStepEditor.ts", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/useTaskStepEditor.ts", "source_location": "L1"}, {"id": "production_work_order_usetaskstepeditor_toapiflag", "label": "toApiFlag()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/useTaskStepEditor.ts", "source_location": "L24"}, {"id": "production_work_order_usetaskstepeditor_fromapiflag", "label": "fromApiFlag()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/useTaskStepEditor.ts", "source_location": "L28"}, {"id": "production_work_order_usetaskstepeditor_normalizestepsubtables", "label": "normalizeStepSubTables()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/useTaskStepEditor.ts", "source_location": "L31"}, {"id": "production_work_order_usetaskstepeditor_parseordernum", "label": "parseOrderNum()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/useTaskStepEditor.ts", "source_location": "L46"}, {"id": "production_work_order_usetaskstepeditor_usetaskstepeditor", "label": "useTaskStepEditor()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/useTaskStepEditor.ts", "source_location": "L53"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_production_work_order_usetaskstepeditor_ts", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_api_production_task", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/useTaskStepEditor.ts", "source_location": "L1", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_production_work_order_usetaskstepeditor_ts", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_api_production", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/useTaskStepEditor.ts", "source_location": "L13", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_production_work_order_usetaskstepeditor_ts", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_api_admin", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/useTaskStepEditor.ts", "source_location": "L21", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_production_work_order_usetaskstepeditor_ts", "target": "production_work_order_usetaskstepeditor_toapiflag", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/useTaskStepEditor.ts", "source_location": "L24", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_production_work_order_usetaskstepeditor_ts", "target": "production_work_order_usetaskstepeditor_fromapiflag", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/useTaskStepEditor.ts", "source_location": "L28", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_production_work_order_usetaskstepeditor_ts", "target": "production_work_order_usetaskstepeditor_normalizestepsubtables", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/useTaskStepEditor.ts", "source_location": "L31", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_production_work_order_usetaskstepeditor_ts", "target": "production_work_order_usetaskstepeditor_parseordernum", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/useTaskStepEditor.ts", "source_location": "L46", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_production_work_order_usetaskstepeditor_ts", "target": "production_work_order_usetaskstepeditor_usetaskstepeditor", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/useTaskStepEditor.ts", "source_location": "L53", "weight": 1.0}], "raw_calls": [{"caller_nid": "productLine truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_production_production_work_order_stepdetailpanel_vue", "label": "StepDetailPanel.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/production-work-order/StepDetailPanel.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
|
||||
@@ -12,9 +12,6 @@
|
||||
<DialogFormBody
|
||||
:loading="dialogFormLoading"
|
||||
body-class="protocol-dialog-body min-h-[200px]"
|
||||
skeleton-variant="tabs-form"
|
||||
:skeleton-tab-count="formTabs.length"
|
||||
:skeleton-section-count="4"
|
||||
>
|
||||
<div class="detail-tabs">
|
||||
<div
|
||||
|
||||
@@ -24,13 +24,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<DialogDetailSkeleton
|
||||
v-if="detailLoading && !bundle"
|
||||
variant="tabs-detail"
|
||||
:tab-count="formTabs.length"
|
||||
/>
|
||||
|
||||
<template v-else-if="bundle">
|
||||
<template v-if="bundle">
|
||||
<div v-loading="detailLoading && !bundle">
|
||||
<!-- KPI 摘要条 -->
|
||||
<div class="kpi-strip">
|
||||
<div class="kpi-card">
|
||||
@@ -768,6 +763,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
@@ -800,7 +796,6 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, nextTick, ref, watch } from 'vue'
|
||||
import { Calendar, CircleCheck, Close, Document, User } from '@element-plus/icons-vue'
|
||||
import DialogDetailSkeleton from '@/components/business/dialog-detail-skeleton/index.vue'
|
||||
import ProtocolAttachmentReadonly from './ProtocolAttachmentReadonly.vue'
|
||||
import SampleQcInfoCards from '@/components/business/sample-qc-info-cards/index.vue'
|
||||
import {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
>
|
||||
<div class="channel-view-body" :class="{ 'is-sub-loading': loading && channel }">
|
||||
<template v-if="channel">
|
||||
<div class="detail-tabs">
|
||||
<div v-loading="loading" class="detail-tabs">
|
||||
<div
|
||||
v-for="tab in viewTabs"
|
||||
:key="tab.key"
|
||||
@@ -304,14 +304,8 @@
|
||||
<el-empty v-else description="暂无协议信息" :image-size="48" />
|
||||
</div>
|
||||
|
||||
<DialogDetailSkeleton
|
||||
v-if="loading"
|
||||
variant="simple"
|
||||
:section-count="2"
|
||||
class="channel-view-sub-skeleton"
|
||||
/>
|
||||
</template>
|
||||
<DialogDetailSkeleton v-else variant="tabs-detail" :tab-count="viewTabs.length" />
|
||||
<div v-else v-loading="true" style="min-height: 200px"></div>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
@@ -344,7 +338,6 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, nextTick, ref, watch } from 'vue'
|
||||
import { Calendar, Close, CollectionTag, OfficeBuilding, User } from '@element-plus/icons-vue'
|
||||
import DialogDetailSkeleton from '@/components/business/dialog-detail-skeleton/index.vue'
|
||||
import ProtocolAttachmentReadonly from '@/views/cell-storage/protocol/ProtocolAttachmentReadonly.vue'
|
||||
import { downloadAttachmentFile } from '@/utils/download-attachment'
|
||||
import {
|
||||
|
||||
@@ -261,11 +261,10 @@
|
||||
<!-- 中间:步骤列表 -->
|
||||
<div
|
||||
class="route-config-center"
|
||||
v-loading="stepListLoading"
|
||||
@dragover.prevent
|
||||
@drop="onDropToCenter"
|
||||
>
|
||||
<el-skeleton v-if="stepListLoading" animated :rows="6" class="route-config-step-skeleton" />
|
||||
<template v-else>
|
||||
<div class="route-config-center-header">
|
||||
<h3>工序步骤</h3>
|
||||
<span class="route-config-step-count">共 {{ stepList.length }} 步</span>
|
||||
@@ -316,7 +315,6 @@
|
||||
<p>从左侧拖拽工序到此处,添加路线步骤</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<!-- 右侧:步骤详情 -->
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -75,9 +75,7 @@
|
||||
<el-empty v-if="!editor.filteredProcessLibrary.value.length" description="暂无工艺数据" :image-size="48" />
|
||||
</div>
|
||||
|
||||
<div class="route-config-center" @dragover.prevent @drop="editor.onDropToCenter">
|
||||
<el-skeleton v-if="editor.stepListLoading.value" animated :rows="6" />
|
||||
<template v-else>
|
||||
<div class="route-config-center" v-loading="editor.stepListLoading.value" @dragover.prevent @drop="editor.onDropToCenter">
|
||||
<div class="route-config-center-header">
|
||||
<h3>工序步骤</h3>
|
||||
<span class="route-config-step-count">共 {{ editor.stepList.value.length }} 步</span>
|
||||
@@ -108,7 +106,6 @@
|
||||
<p>从左侧拖拽工序到此处,添加任务步骤</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<StepDetailPanel :editor="editor" />
|
||||
|
||||
@@ -2,7 +2,31 @@
|
||||
<template>
|
||||
<div class="route-config-right">
|
||||
<template v-if="editor.selectedStep.value">
|
||||
<div class="route-config-right-header"><h3>步骤详情</h3></div>
|
||||
<div class="route-config-right-header">
|
||||
<h3>步骤详情</h3>
|
||||
<div v-if="editor.mode.value === 'execution' && editor.selectedStep.value" class="step-status-bar">
|
||||
<el-tag :type="editor.stepStatusTag(editor.selectedStep.value.stepStatus || 'dzx').type" size="small">
|
||||
{{ editor.stepStatusTag(editor.selectedStep.value.stepStatus || 'dzx').label }}
|
||||
</el-tag>
|
||||
<el-button
|
||||
v-if="editor.selectedStep.value.stepStatus === 'dzx'"
|
||||
class="btn-op-item primary"
|
||||
size="small"
|
||||
@click="editor.handleStartStep(editor.selectedStep.value)"
|
||||
>
|
||||
<el-icon><VideoPlay /></el-icon>开始执行
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="editor.selectedStep.value.stepStatus === 'jxz'"
|
||||
class="btn-op-item"
|
||||
size="small"
|
||||
type="success"
|
||||
@click="editor.handleCompleteStep(editor.selectedStep.value)"
|
||||
>
|
||||
<el-icon><Check /></el-icon>完成步骤
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="route-config-right-body">
|
||||
<el-form label-position="top" class="route-config-step-form">
|
||||
<div class="form-grid-2">
|
||||
@@ -70,6 +94,11 @@
|
||||
<el-input v-model="row.standardUsage" placeholder="用量" class="inner-cell-input" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="editor.mode.value === 'execution'" label="实际用量" min-width="110" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.actualUsage" placeholder="实际用量" class="inner-cell-input" @change="editor.saveReagents" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位" min-width="120" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-select v-model="row.unit" placeholder="请选择单位" clearable filterable remote
|
||||
@@ -133,6 +162,11 @@
|
||||
<el-input v-model="row.standardUsage" placeholder="用量" class="inner-cell-input" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="editor.mode.value === 'execution'" label="实际用量" min-width="110" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.actualUsage" placeholder="实际用量" class="inner-cell-input" @change="editor.saveConsumables" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位" min-width="120" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-select v-model="row.unit" placeholder="请选择单位" clearable filterable remote
|
||||
@@ -231,6 +265,11 @@
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="editor.mode.value === 'execution'" label="采集值" min-width="140" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.collectionValue" placeholder="输入采集值" class="inner-cell-input" @change="editor.saveDataCollections" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" min-width="120" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.remark" placeholder="备注" class="inner-cell-input"
|
||||
@@ -264,7 +303,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Check, Plus, Rank } from '@element-plus/icons-vue'
|
||||
import { Check, Plus, Rank, VideoPlay } from '@element-plus/icons-vue'
|
||||
import { useTaskStepEditor } from './useTaskStepEditor'
|
||||
|
||||
defineProps<{
|
||||
@@ -274,4 +313,11 @@
|
||||
|
||||
<style scoped lang="scss">
|
||||
@use '../../../styles/route-config' as *;
|
||||
|
||||
.step-status-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
margin-left: 12px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,335 @@
|
||||
<!-- 生产任务执行弹窗 -->
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
:title="`任务执行 — ${taskName}`"
|
||||
width="96vw"
|
||||
class="dialog-form-layout execution-dialog"
|
||||
align-center
|
||||
destroy-on-close
|
||||
:close-on-click-modal="false"
|
||||
@close="handleClose"
|
||||
>
|
||||
<!-- 顶部:任务基本信息一行展示 -->
|
||||
<div v-if="editor.taskDetail.value" class="execution-header">
|
||||
<div class="execution-header-row">
|
||||
<span class="execution-header-item">任务号:<b>{{ editor.taskDetail.value.taskNo }}</b></span>
|
||||
<span class="execution-header-item">工单号:{{ editor.taskDetail.value.workOrderNo || '—' }}</span>
|
||||
<span class="execution-header-item">任务名称:{{ editor.taskDetail.value.taskName || '—' }}</span>
|
||||
<el-tag :type="editor.taskStatusTag(editor.taskDetail.value.taskStatus).type">
|
||||
{{ editor.taskStatusTag(editor.taskDetail.value.taskStatus).label }}
|
||||
</el-tag>
|
||||
<div class="execution-header-actions">
|
||||
<el-button
|
||||
v-if="editor.taskDetail.value.taskStatus === 'dpz'"
|
||||
class="btn-main"
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="editor.handleStartTask"
|
||||
>
|
||||
<el-icon><VideoPlay /></el-icon>开始执行
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="editor.taskDetail.value.taskStatus === 'jxz'"
|
||||
class="btn-main"
|
||||
type="success"
|
||||
size="small"
|
||||
@click="editor.handleCompleteTask"
|
||||
>
|
||||
<el-icon><Check /></el-icon>完成任务
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="editor.taskDetail.value.remark" class="execution-header-remark">{{ editor.taskDetail.value.remark }}</div>
|
||||
</div>
|
||||
|
||||
<!-- 四栏布局:工艺库 + 任务I/O(上下叠放) + 步骤列表 + 步骤详情 -->
|
||||
<div class="route-config-body execution-route-config-body">
|
||||
<!-- 最左侧:任务输入/输出上下叠放 -->
|
||||
<div class="execution-io-column">
|
||||
<!-- 任务输入 -->
|
||||
<div class="execution-io-block">
|
||||
<div class="execution-io-header">
|
||||
<h4><span class="section-bar"></span>任务输入</h4>
|
||||
<div class="execution-io-actions">
|
||||
<el-button class="btn-main" type="primary" size="small" @click="editor.addTaskInputRow"><el-icon><Plus /></el-icon>添加</el-button>
|
||||
<el-button class="btn-main" type="primary" size="small" :loading="editor.inputSaving.value" @click="editor.saveTaskInputs"><el-icon><Check /></el-icon>保存</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table :data="editor.taskInputs.value" stripe class="inner-table" max-height="200">
|
||||
<el-table-column type="index" label="序号" width="50" align="center" :index="(i: number) => i + 1" />
|
||||
<el-table-column label="输入类型" min-width="100" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-select v-model="row.inputType" placeholder="选择类型" class="inner-cell-select">
|
||||
<el-option label="样本" value="sample" />
|
||||
<el-option label="细胞产品" value="cell_product" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="输入编码" min-width="110" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.inputCode" placeholder="输入编码" class="inner-cell-input" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="输入名称" min-width="110" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.inputName" placeholder="输入名称" class="inner-cell-input" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="60" align="center">
|
||||
<template #default="{ $index }">
|
||||
<el-button link type="danger" size="small" @click="editor.removeTaskInputRow($index)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-empty v-if="!editor.taskInputs.value.length" description="暂无输入项" :image-size="28" />
|
||||
</div>
|
||||
|
||||
<!-- 任务输出 -->
|
||||
<div class="execution-io-block">
|
||||
<div class="execution-io-header">
|
||||
<h4><span class="section-bar"></span>任务输出</h4>
|
||||
<div class="execution-io-actions">
|
||||
<el-button class="btn-main" type="primary" size="small" @click="editor.addTaskOutputRow"><el-icon><Plus /></el-icon>添加</el-button>
|
||||
<el-button class="btn-main" type="primary" size="small" :loading="editor.outputSaving.value" @click="editor.saveTaskOutputs"><el-icon><Check /></el-icon>保存</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table :data="editor.taskOutputs.value" stripe class="inner-table" max-height="200">
|
||||
<el-table-column type="index" label="序号" width="50" align="center" :index="(i: number) => i + 1" />
|
||||
<el-table-column label="输出名称" min-width="100" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.outputName" placeholder="输出名称" class="inner-cell-input" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="输出条码" min-width="100" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.outputBarcode" placeholder="扫码或输入" class="inner-cell-input" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" min-width="80" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-input-number v-model="row.quantity" :min="0" :precision="2" controls-position="right" style="width: 100%" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位" min-width="70" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.unit" placeholder="单位" class="inner-cell-input" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="60" align="center">
|
||||
<template #default="{ $index }">
|
||||
<el-button link type="danger" size="small" @click="editor.removeTaskOutputRow($index)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-empty v-if="!editor.taskOutputs.value.length" description="暂无输出项" :image-size="28" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 工艺库 -->
|
||||
<div class="route-config-left">
|
||||
<div class="route-config-left-header">
|
||||
<h3>工艺库</h3>
|
||||
<el-input v-model="editor.processSearchKeyword.value" placeholder="搜索工序" clearable size="small" class="route-config-search" />
|
||||
</div>
|
||||
<el-collapse v-model="editor.expandedCategories.value" class="route-config-collapse">
|
||||
<el-collapse-item v-for="cat in editor.filteredProcessLibrary.value" :key="cat.categoryId" :name="cat.categoryId">
|
||||
<template #title>
|
||||
<span class="route-config-cat-bar"></span>
|
||||
<span>{{ cat.categoryName }}</span>
|
||||
</template>
|
||||
<div v-for="(proc, procIndex) in cat.processes" :key="proc.id" class="route-config-process-card" draggable="true" @dragstart="editor.onDragStart($event, proc)">
|
||||
<div class="route-config-process-info">
|
||||
<div class="route-config-process-name">
|
||||
<span class="route-config-process-seq">{{ procIndex + 1 }}</span>{{ proc.processName }}
|
||||
</div>
|
||||
<div class="route-config-process-code">{{ proc.processCode }}</div>
|
||||
</div>
|
||||
<el-icon class="route-config-process-drag"><Rank /></el-icon>
|
||||
</div>
|
||||
<el-empty v-if="!cat.processes.length" description="该分类暂无工序" :image-size="32" />
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
<el-empty v-if="!editor.filteredProcessLibrary.value.length" description="暂无工艺数据" :image-size="48" />
|
||||
</div>
|
||||
|
||||
<!-- 中间:步骤列表 -->
|
||||
<div class="route-config-center" v-loading="editor.stepListLoading.value" @dragover.prevent @drop="editor.onDropToCenter">
|
||||
<div class="route-config-center-header">
|
||||
<h3>工序步骤</h3>
|
||||
<span class="route-config-step-count">共 {{ editor.stepList.value.length }} 步</span>
|
||||
</div>
|
||||
<div class="route-config-center-dropzone">
|
||||
<draggable v-model="editor.stepList.value" handle=".route-config-step-handle" :animation="200" @end="editor.onStepDragEnd">
|
||||
<div v-for="(element, index) in editor.stepList.value" :key="element.id" class="route-config-step-card" :class="{ 'is-active': editor.selectedStepId.value === element.id }" @click="editor.selectStep(element)">
|
||||
<div class="route-config-step-handle"><el-icon><Rank /></el-icon></div>
|
||||
<div class="route-config-step-order">{{ index + 1 }}</div>
|
||||
<div class="route-config-step-info">
|
||||
<div class="route-config-step-name">{{ element.processName || '未命名步骤' }}</div>
|
||||
<div class="route-config-step-desc">{{ element.description || '' }}</div>
|
||||
</div>
|
||||
<el-tag v-if="element.stepStatus" :type="editor.stepStatusTag(element.stepStatus).type" size="small" style="margin-right:4px">{{ editor.stepStatusTag(element.stepStatus).label }}</el-tag>
|
||||
<el-button link type="primary" size="small" title="复制步骤" @click.stop="editor.handleCopyStep(element)">
|
||||
<el-icon><CopyDocument /></el-icon>
|
||||
</el-button>
|
||||
<el-button link type="danger" size="small" @click.stop="editor.handleDeleteStep(element)">
|
||||
<el-icon><Delete /></el-icon>
|
||||
</el-button>
|
||||
</div>
|
||||
</draggable>
|
||||
<div v-if="!editor.stepList.value.length" class="route-config-center-empty">
|
||||
<el-icon :size="32" color="#a7f3d0"><Plus /></el-icon>
|
||||
<p>从左侧拖拽工序到此处,添加任务步骤</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 右侧:步骤详情 -->
|
||||
<StepDetailPanel :editor="editor" />
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Rank, Plus, Check, VideoPlay, CopyDocument, Delete } from '@element-plus/icons-vue'
|
||||
import { VueDraggable as draggable } from 'vue-draggable-plus'
|
||||
import { useTaskStepEditor } from './useTaskStepEditor'
|
||||
import StepDetailPanel from './StepDetailPanel.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
visible: boolean
|
||||
taskId: string
|
||||
taskName: string
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'update:visible', val: boolean): void
|
||||
(e: 'success'): void
|
||||
}>()
|
||||
|
||||
const dialogVisible = computed({
|
||||
get: () => props.visible,
|
||||
set: (val) => emit('update:visible', val)
|
||||
})
|
||||
|
||||
const editor = useTaskStepEditor()
|
||||
|
||||
function handleClose() {
|
||||
dialogVisible.value = false
|
||||
emit('success')
|
||||
}
|
||||
|
||||
watch(() => props.visible, async (val) => {
|
||||
if (val && props.taskId) {
|
||||
await editor.initEditor(props.taskId, { mode: 'execution' })
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@use '../../../styles/route-config' as *;
|
||||
|
||||
.execution-dialog {
|
||||
:deep(.el-dialog) {
|
||||
margin: 2vh auto !important;
|
||||
}
|
||||
:deep(.el-dialog__body) {
|
||||
max-height: calc(96vh - 54px);
|
||||
overflow-y: auto;
|
||||
padding: 12px 16px;
|
||||
}
|
||||
}
|
||||
|
||||
/* 顶部信息一行展示,极致压缩 */
|
||||
.execution-header {
|
||||
padding: 6px 16px;
|
||||
background: #f0fdf4;
|
||||
border-radius: 6px;
|
||||
margin-bottom: 8px;
|
||||
border: 1px solid #d1fae5;
|
||||
}
|
||||
|
||||
.execution-header-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
font-size: 13px;
|
||||
color: #475569;
|
||||
|
||||
b { color: #1e293b; }
|
||||
}
|
||||
|
||||
.execution-header-item {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.execution-header-actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.execution-header-remark {
|
||||
margin-top: 4px;
|
||||
font-size: 12px;
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
/* 工艺库右侧 I/O 列 */
|
||||
.execution-io-column {
|
||||
width: 320px;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.execution-io-block {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border: 1px solid #e5e7eb;
|
||||
border-radius: 8px;
|
||||
padding: 8px;
|
||||
overflow: hidden;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.execution-io-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 6px;
|
||||
flex-shrink: 0;
|
||||
|
||||
h4 {
|
||||
margin: 0;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: #1e293b;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.execution-io-actions {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.section-bar {
|
||||
display: inline-block;
|
||||
width: 3px;
|
||||
height: 14px;
|
||||
background: #10b981;
|
||||
border-radius: 2px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.execution-route-config-body {
|
||||
height: calc(96vh - 110px);
|
||||
min-height: 400px;
|
||||
}
|
||||
</style>
|
||||
@@ -8,7 +8,10 @@ import {
|
||||
fetchReplaceStepReagents,
|
||||
fetchReplaceStepConsumables,
|
||||
fetchReplaceStepDataCollection,
|
||||
fetchReplaceStepOutputs
|
||||
fetchReplaceStepOutputs,
|
||||
fetchUpdateProductionTaskStatus,
|
||||
fetchSetTaskInputs,
|
||||
fetchSetTaskOutputs
|
||||
} from '@/api/production-task'
|
||||
import {
|
||||
fetchAllProcesses,
|
||||
@@ -59,6 +62,14 @@ export function useTaskStepEditor() {
|
||||
const processSearchKeyword = ref('')
|
||||
const configSuppressSave = ref(false)
|
||||
|
||||
// ── execution-mode state ────────────────────────────────────────────
|
||||
const mode = ref<'edit' | 'execution'>('edit')
|
||||
const taskDetail = ref<Record<string, any> | null>(null)
|
||||
const taskInputs = ref<Record<string, any>[]>([])
|
||||
const taskOutputs = ref<Record<string, any>[]>([])
|
||||
const inputSaving = ref(false)
|
||||
const outputSaving = ref(false)
|
||||
|
||||
const processLibrary = ref<Record<string, any>[]>([])
|
||||
const expandedCategories = ref<string[]>([])
|
||||
const categoryOptions = ref<Record<string, any>[]>([])
|
||||
@@ -341,16 +352,22 @@ export function useTaskStepEditor() {
|
||||
processLibrary.value = Object.values(catMap)
|
||||
await Promise.all([searchItemUnitOptions(''), searchReagentOptions(''), searchConsumableOptions('')])
|
||||
}
|
||||
async function loadTaskDetail() {
|
||||
if (!taskId.value) return
|
||||
async function loadTaskDetail(overrideId?: string) {
|
||||
const id = overrideId || taskId.value
|
||||
if (!id) return
|
||||
try {
|
||||
const detail = await fetchProductionTaskDetail(taskId.value)
|
||||
const detail = await fetchProductionTaskDetail(id)
|
||||
stepList.value = (detail.steps || []).map(normalizeStepSubTables)
|
||||
ensureAllStepReagentOptions()
|
||||
ensureAllStepConsumableOptions()
|
||||
ensureAllStepUnitOptions()
|
||||
if (stepList.value.length > 0 && !selectedStepId.value)
|
||||
selectedStepId.value = stepList.value[0].id
|
||||
if (mode.value === 'execution') {
|
||||
taskDetail.value = detail
|
||||
taskInputs.value = (detail.inputs || []).map((i: Record<string, any>) => ({ ...i }))
|
||||
taskOutputs.value = (detail.outputs || []).map((o: Record<string, any>) => ({ ...o }))
|
||||
}
|
||||
} catch {
|
||||
stepList.value = []
|
||||
}
|
||||
@@ -365,7 +382,7 @@ export function useTaskStepEditor() {
|
||||
if (!processId || !taskId.value) return
|
||||
stepListLoading.value = true
|
||||
try {
|
||||
const newStep = await fetchAddTaskStep(taskId.value, { processId })
|
||||
const newStep = await fetchAddTaskStep(taskId.value, { process_id: processId })
|
||||
await loadTaskDetail()
|
||||
if (newStep?.id) selectedStepId.value = newStep.id
|
||||
ElMessage.success('步骤添加成功')
|
||||
@@ -524,7 +541,82 @@ export function useTaskStepEditor() {
|
||||
}
|
||||
}
|
||||
|
||||
async function initEditor(id: string) {
|
||||
async function handleStartStep(step: Record<string, any>) {
|
||||
if (!taskId.value || !step.id) return
|
||||
await fetchUpdateTaskStep(taskId.value, step.id, { step_status: 'jxz' })
|
||||
ElMessage.success('步骤已开始执行')
|
||||
await loadTaskDetail()
|
||||
}
|
||||
|
||||
async function handleCompleteStep(step: Record<string, any>) {
|
||||
if (!taskId.value || !step.id) return
|
||||
await ElMessageBox.confirm('确定完成该步骤吗?', '提示', { type: 'warning' })
|
||||
await fetchUpdateTaskStep(taskId.value, step.id, { step_status: 'ywc' })
|
||||
ElMessage.success('步骤已完成')
|
||||
await loadTaskDetail()
|
||||
}
|
||||
|
||||
async function handleStartTask() {
|
||||
if (!taskDetail.value?.id) return
|
||||
await ElMessageBox.confirm('确定开始执行该任务吗?', '提示', { type: 'warning' })
|
||||
await fetchUpdateProductionTaskStatus(taskDetail.value.id, { taskStatus: 'jxz' })
|
||||
ElMessage.success('任务已开始执行')
|
||||
await loadTaskDetail(taskDetail.value.id)
|
||||
}
|
||||
|
||||
async function handleCompleteTask() {
|
||||
if (!taskDetail.value?.id) return
|
||||
await ElMessageBox.confirm('确定完成该任务吗?完成后不可恢复。', '提示', { type: 'warning' })
|
||||
await fetchUpdateProductionTaskStatus(taskDetail.value.id, { taskStatus: 'ywc' })
|
||||
ElMessage.success('任务已完成')
|
||||
await loadTaskDetail(taskDetail.value.id)
|
||||
}
|
||||
|
||||
function addTaskInputRow() {
|
||||
taskInputs.value.push({ inputType: 'sample', inputCode: '', inputName: '' })
|
||||
}
|
||||
function removeTaskInputRow(i: number) { taskInputs.value.splice(i, 1) }
|
||||
async function saveTaskInputs() {
|
||||
if (!taskDetail.value?.id) return
|
||||
inputSaving.value = true
|
||||
try {
|
||||
await fetchSetTaskInputs(taskDetail.value.id, { items: taskInputs.value })
|
||||
ElMessage.success('输入已保存')
|
||||
} catch { /* global error handling */ } finally { inputSaving.value = false }
|
||||
}
|
||||
|
||||
function addTaskOutputRow() {
|
||||
taskOutputs.value.push({ cellProductId: '', storageSlotId: '', outputName: '', outputBarcode: '', quantity: 0, unit: '', remark: '' })
|
||||
}
|
||||
function removeTaskOutputRow(i: number) { taskOutputs.value.splice(i, 1) }
|
||||
async function saveTaskOutputs() {
|
||||
if (!taskDetail.value?.id) return
|
||||
outputSaving.value = true
|
||||
try {
|
||||
await fetchSetTaskOutputs(taskDetail.value.id, { items: taskOutputs.value })
|
||||
ElMessage.success('输出已保存')
|
||||
} catch { /* global error handling */ } finally { outputSaving.value = false }
|
||||
}
|
||||
|
||||
function taskStatusTag(status: string) {
|
||||
const map: Record<string, { label: string; type: string }> = {
|
||||
dpz: { label: '待配置', type: 'info' },
|
||||
jxz: { label: '进行中', type: 'warning' },
|
||||
ywc: { label: '已完成', type: 'success' }
|
||||
}
|
||||
return map[status] || { label: status, type: 'info' }
|
||||
}
|
||||
function stepStatusTag(status: string) {
|
||||
const map: Record<string, { label: string; type: string }> = {
|
||||
dzx: { label: '待执行', type: 'info' },
|
||||
jxz: { label: '进行中', type: 'warning' },
|
||||
ywc: { label: '已完成', type: 'success' }
|
||||
}
|
||||
return map[status] || { label: status, type: 'info' }
|
||||
}
|
||||
|
||||
async function initEditor(id: string, options?: { mode?: 'edit' | 'execution' }) {
|
||||
mode.value = options?.mode || 'edit'
|
||||
taskId.value = id
|
||||
selectedStepId.value = ''
|
||||
activeSubTab.value = 'reagent'
|
||||
@@ -542,6 +634,7 @@ export function useTaskStepEditor() {
|
||||
return {
|
||||
taskId, stepList, selectedStepId, selectedStep, stepListLoading,
|
||||
activeSubTab, processSearchKeyword, configSuppressSave,
|
||||
mode, taskDetail, taskInputs, taskOutputs, inputSaving, outputSaving,
|
||||
processLibrary, filteredProcessLibrary, expandedCategories,
|
||||
categoryOptions, sopOptions, outputTypeOptions,
|
||||
itemUnitOptions, itemUnitOptionsLoading,
|
||||
@@ -550,6 +643,11 @@ export function useTaskStepEditor() {
|
||||
sopIdsArr,
|
||||
onDragStart, onDropToCenter, onStepDragEnd, selectStep,
|
||||
handleCopyStep, handleDeleteStep,
|
||||
handleStartStep, handleCompleteStep,
|
||||
handleStartTask, handleCompleteTask,
|
||||
addTaskInputRow, removeTaskInputRow, saveTaskInputs,
|
||||
addTaskOutputRow, removeTaskOutputRow, saveTaskOutputs,
|
||||
taskStatusTag, stepStatusTag,
|
||||
saveStepBasic, onSopIdsChange,
|
||||
searchItemUnitOptions, searchReagentOptions, searchConsumableOptions,
|
||||
onReagentRowSelect, onConsumableRowSelect,
|
||||
|
||||
@@ -153,10 +153,6 @@
|
||||
>
|
||||
<DialogFormBody
|
||||
:loading="resultLoading"
|
||||
skeleton-variant="form"
|
||||
:skeleton-section-count="2"
|
||||
:skeleton-field-count="6"
|
||||
:skeleton-grid-columns="3"
|
||||
>
|
||||
<el-form label-position="top" class="biz-dialog-form">
|
||||
<div class="form-section">
|
||||
|
||||
@@ -12,9 +12,6 @@
|
||||
<DialogFormBody
|
||||
:loading="dialogFormLoading"
|
||||
body-class="protocol-dialog-body min-h-[200px]"
|
||||
skeleton-variant="tabs-form"
|
||||
:skeleton-tab-count="formTabs.length"
|
||||
:skeleton-section-count="4"
|
||||
>
|
||||
<div class="detail-tabs">
|
||||
<div
|
||||
|
||||
@@ -24,13 +24,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<DialogDetailSkeleton
|
||||
v-if="loading && !bundle"
|
||||
variant="tabs-detail"
|
||||
:tab-count="formTabs.length"
|
||||
/>
|
||||
|
||||
<template v-else-if="bundle">
|
||||
<template v-if="bundle">
|
||||
<div v-loading="loading && !bundle">
|
||||
<!-- KPI 摘要条 -->
|
||||
<div class="kpi-strip">
|
||||
<div class="kpi-card">
|
||||
@@ -547,6 +542,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
@@ -579,7 +575,6 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, nextTick, ref, watch } from 'vue'
|
||||
import { Calendar, CircleCheck, Close, Document, User } from '@element-plus/icons-vue'
|
||||
import DialogDetailSkeleton from '@/components/business/dialog-detail-skeleton/index.vue'
|
||||
import ProtocolAttachmentReadonly from '@/views/cell-storage/protocol/ProtocolAttachmentReadonly.vue'
|
||||
import SampleQcInfoCards from '@/components/business/sample-qc-info-cards/index.vue'
|
||||
import {
|
||||
|
||||
@@ -295,15 +295,7 @@
|
||||
class="order-module-dialog order-detail-dialog"
|
||||
modal-class="order-module-dialog-mask"
|
||||
>
|
||||
<div class="dialog-scroll order-detail-dialog-scroll" :class="{ 'is-view-loading': detailLoading }">
|
||||
<DialogDetailSkeleton
|
||||
v-if="detailLoading"
|
||||
variant="system-view"
|
||||
:section-count="4"
|
||||
:field-count="8"
|
||||
:grid-columns="3"
|
||||
/>
|
||||
<template v-else>
|
||||
<div class="dialog-scroll order-detail-dialog-scroll" v-loading="detailLoading">
|
||||
<div class="view-hero order-view-hero">
|
||||
<div class="order-view-hero-icon">
|
||||
<el-icon><ShoppingBag /></el-icon>
|
||||
@@ -818,7 +810,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</div>
|
||||
<template #footer>
|
||||
<el-button class="btn-ghost" @click="viewVisible = false"><el-icon><Close /></el-icon>关闭</el-button>
|
||||
@@ -839,15 +830,7 @@
|
||||
</el-dialog>
|
||||
|
||||
<div v-else v-show="viewVisible" class="order-embedded-detail">
|
||||
<div class="dialog-scroll order-detail-dialog-scroll" :class="{ 'is-view-loading': detailLoading }">
|
||||
<DialogDetailSkeleton
|
||||
v-if="detailLoading"
|
||||
variant="system-view"
|
||||
:section-count="4"
|
||||
:field-count="8"
|
||||
:grid-columns="3"
|
||||
/>
|
||||
<template v-else>
|
||||
<div class="dialog-scroll order-detail-dialog-scroll" v-loading="detailLoading">
|
||||
<div class="view-hero order-view-hero">
|
||||
<div class="order-view-hero-icon">
|
||||
<el-icon><ShoppingBag /></el-icon>
|
||||
@@ -1152,7 +1135,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1400,14 +1382,8 @@
|
||||
modal-class="order-module-dialog-mask"
|
||||
@opened="loadOrderPriceVersionDetail"
|
||||
>
|
||||
<div class="order-pv-body" :class="{ 'is-view-loading': orderPriceVersionLoading }">
|
||||
<DialogDetailSkeleton
|
||||
v-if="orderPriceVersionLoading"
|
||||
variant="system-view"
|
||||
:section-count="2"
|
||||
:field-count="6"
|
||||
/>
|
||||
<template v-else-if="orderPriceVersionDetail">
|
||||
<div class="order-pv-body" v-loading="orderPriceVersionLoading">
|
||||
<template v-if="orderPriceVersionDetail">
|
||||
<div class="view-hero order-pv-hero">
|
||||
<div class="order-view-hero-icon">
|
||||
<el-icon><Setting /></el-icon>
|
||||
@@ -1540,7 +1516,6 @@
|
||||
} from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import DialogDetailSkeleton from '@/components/business/dialog-detail-skeleton/index.vue'
|
||||
import { withFullscreenLoading, fullscreenLoadingText } from '@/utils/fullscreen-loading'
|
||||
import {
|
||||
ArrowDown,
|
||||
|
||||
@@ -168,9 +168,6 @@
|
||||
<DialogFormBody
|
||||
:loading="postBindLoading"
|
||||
body-class="post-bind-dialog-body"
|
||||
skeleton-variant="form"
|
||||
:skeleton-section-count="1"
|
||||
:skeleton-field-count="4"
|
||||
>
|
||||
<p v-if="postBindPostName" class="post-bind-subtitle">
|
||||
职位:<strong>{{ postBindPostName }}</strong>
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
destroy-on-close
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<DialogFormBody :loading="menuDialogLoading" skeleton-variant="simple" :skeleton-section-count="1">
|
||||
<DialogFormBody :loading="menuDialogLoading">
|
||||
<!-- 父子关联勾选:选父级全选子级,选子级自动带上父级(与 check-strictly 互斥,故不加) -->
|
||||
<el-tree
|
||||
ref="menuTreeRef"
|
||||
@@ -363,9 +363,8 @@
|
||||
:sections="viewSections"
|
||||
>
|
||||
<template #menuTree>
|
||||
<div class="role-view-tree-block">
|
||||
<el-skeleton v-if="viewDetailLoading" animated :rows="5" class="role-view-tree-skeleton" />
|
||||
<div v-else-if="viewMenuTreeData.length" class="role-view-tree-scroll">
|
||||
<div class="role-view-tree-block" v-loading="viewDetailLoading">
|
||||
<div v-if="viewMenuTreeData.length" class="role-view-tree-scroll">
|
||||
<el-tree
|
||||
:key="'menu-' + viewTreeRenderKey"
|
||||
ref="viewMenuTreeRef"
|
||||
@@ -382,9 +381,8 @@
|
||||
</div>
|
||||
</template>
|
||||
<template #customDeptTree>
|
||||
<div class="role-view-tree-block">
|
||||
<el-skeleton v-if="viewDetailLoading" animated :rows="5" class="role-view-tree-skeleton" />
|
||||
<div v-else-if="viewDeptTreeData.length" class="role-view-tree-scroll">
|
||||
<div class="role-view-tree-block" v-loading="viewDetailLoading">
|
||||
<div v-if="viewDeptTreeData.length" class="role-view-tree-scroll">
|
||||
<el-tree
|
||||
:key="'dept-' + viewTreeRenderKey"
|
||||
ref="viewDeptTreeRef"
|
||||
|
||||
@@ -10,10 +10,7 @@
|
||||
:show-close="false"
|
||||
style="backdrop-filter: none"
|
||||
>
|
||||
<div v-if="bizLoading" class="dialog-scroll is-view-loading" style="min-height: 120px">
|
||||
<DialogDetailSkeleton variant="simple" :section-count="2" :field-count="4" />
|
||||
</div>
|
||||
<div v-else class="dialog-scroll">
|
||||
<div v-loading="bizLoading" class="dialog-scroll">
|
||||
<!-- Hero header -->
|
||||
<div class="view-hero">
|
||||
<div class="view-hero-icon">
|
||||
@@ -77,7 +74,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import DialogDetailSkeleton from '@/components/business/dialog-detail-skeleton/index.vue'
|
||||
import { fetchApproveTask, fetchRejectTask, fetchInstanceDetail } from '@/api/workflow'
|
||||
import { Checked, Close, Check } from '@element-plus/icons-vue'
|
||||
|
||||
|
||||
@@ -126,14 +126,8 @@
|
||||
:show-close="false"
|
||||
style="backdrop-filter: none"
|
||||
>
|
||||
<div class="dialog-scroll" :class="{ 'is-view-loading': detailLoading }">
|
||||
<DialogDetailSkeleton
|
||||
v-if="detailLoading"
|
||||
variant="system-view"
|
||||
:section-count="2"
|
||||
:field-count="6"
|
||||
/>
|
||||
<template v-else-if="detailData">
|
||||
<div class="dialog-scroll" v-loading="detailLoading">
|
||||
<template v-if="detailData">
|
||||
<div class="view-hero">
|
||||
<div class="view-hero-icon">
|
||||
<el-icon :size="28"><Document /></el-icon>
|
||||
@@ -200,7 +194,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import DialogDetailSkeleton from '@/components/business/dialog-detail-skeleton/index.vue'
|
||||
import { fetchMyInstances, fetchBusinessAllTasks } from '@/api/workflow'
|
||||
import ProcessStatusTag from '../components/ProcessStatusTag.vue'
|
||||
import { Document, View, Search, RefreshLeft, Close } from '@element-plus/icons-vue'
|
||||
|
||||
@@ -127,14 +127,8 @@
|
||||
:show-close="false"
|
||||
style="backdrop-filter: none"
|
||||
>
|
||||
<div class="dialog-scroll" :class="{ 'is-view-loading': detailLoading }">
|
||||
<DialogDetailSkeleton
|
||||
v-if="detailLoading"
|
||||
variant="system-view"
|
||||
:section-count="2"
|
||||
:field-count="6"
|
||||
/>
|
||||
<template v-else-if="detailData">
|
||||
<div class="dialog-scroll" v-loading="detailLoading">
|
||||
<template v-if="detailData">
|
||||
<div class="view-hero">
|
||||
<div class="view-hero-icon">
|
||||
<el-icon :size="28"><Document /></el-icon>
|
||||
@@ -203,7 +197,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import DialogDetailSkeleton from '@/components/business/dialog-detail-skeleton/index.vue'
|
||||
import { fetchCompletedTasks, fetchInstanceDetail } from '@/api/workflow'
|
||||
import ProcessStatusTag from '../components/ProcessStatusTag.vue'
|
||||
import { Document, View, Search, RefreshLeft, Close } from '@element-plus/icons-vue'
|
||||
|
||||
@@ -124,14 +124,8 @@
|
||||
:show-close="false"
|
||||
style="backdrop-filter: none"
|
||||
>
|
||||
<div class="dialog-scroll" :class="{ 'is-view-loading': detailLoading }">
|
||||
<DialogDetailSkeleton
|
||||
v-if="detailLoading"
|
||||
variant="system-view"
|
||||
:section-count="2"
|
||||
:field-count="6"
|
||||
/>
|
||||
<template v-else-if="detailData">
|
||||
<div class="dialog-scroll" v-loading="detailLoading">
|
||||
<template v-if="detailData">
|
||||
<div class="view-hero">
|
||||
<div class="view-hero-icon">
|
||||
<el-icon :size="28"><Document /></el-icon>
|
||||
@@ -200,7 +194,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import DialogDetailSkeleton from '@/components/business/dialog-detail-skeleton/index.vue'
|
||||
import { fetchPendingTasks, fetchInstanceDetail } from '@/api/workflow'
|
||||
import ApprovalDialog from '../components/ApprovalDialog.vue'
|
||||
import ProcessStatusTag from '../components/ProcessStatusTag.vue'
|
||||
|
||||
Reference in new issue
Block a user