1
This commit is contained in:
parent
f9cc3b73e8
commit
06cb62fad1
158
docs/进度条弹窗-使用清单.md
Normal file
158
docs/进度条弹窗-使用清单.md
Normal file
@ -0,0 +1,158 @@
|
||||
# 进度条类弹窗 / 表单使用清单
|
||||
|
||||
> 整理范围:`el-dialog` 内展示 `el-progress` 的“任务进度弹窗”,以及提交任务后在**弹窗表单内**原地展示进度的表单。
|
||||
> 不含页面内联进度(如库位容量、仪表盘统计、账号安全强度)。
|
||||
>
|
||||
> 示例入口:`order/waveOrder?tab=sandanFallbackOrders` → 「不符合波次策略订单列表」→ 工具栏「快速扫描」→ 波次策略快速扫描进度弹窗。
|
||||
|
||||
## 总览
|
||||
|
||||
- 共 **9 个组件**、约 **55 处使用**
|
||||
- 两种形态:
|
||||
1. **独立进度弹窗**:`el-dialog` + 任务 ID + `el-progress` + 状态/数量信息(6 个组件)
|
||||
2. **弹窗表单内嵌进度**:先做表单提交,任务开始后在同一个弹窗里显示进度(3 个组件)
|
||||
- 只改这 9 个组件即可覆盖全部此类 UI
|
||||
|
||||
---
|
||||
|
||||
## 一、通用复用组件(影响面最大)
|
||||
|
||||
### 1. `src/components/AsyncExportProgressDialog.vue`
|
||||
- 标题由调用方传入,默认形态:任务 ID、状态、进度百分比、更新时间、提示文案
|
||||
- 进度:`el-progress :stroke-width="16"`,宽 `min(520px, 92vw)`
|
||||
- 使用位置(23 个文件 / 25 处):
|
||||
|
||||
| 模块 | 文件 |
|
||||
|---|---|
|
||||
| 仓库 / 货主 | `views/warehouses/index.vue` |
|
||||
| 商品 | `views/stock/stock/index.vue`、`views/stock/external_stock/index.vue` |
|
||||
| 售后 | `views/afterSale/list/index.vue` |
|
||||
| 数据 | `views/data/packingflow/index.vue` |
|
||||
| 快递 | `views/express/waybill/index.vue`、`views/express/returnReceived/index.vue`、`views/express/returnUnpack/index.vue`、`views/express/returnUnpack/components/ExportDialog.vue` |
|
||||
| 入库 | `views/storage/entry/index.vue`、`views/storage/entry_owner/index.vue` |
|
||||
| 收货 | `views/storage/receiving/index.vue`、`views/storage/receiving_owner/index.vue` |
|
||||
| 库存 | `views/storage/inventory/index.vue` |
|
||||
| 盘点 | `views/storage/stockcheck/index.vue`(2 处) |
|
||||
| 报表 | `views/storage/report/index.vue`、`views/storage/report/store.vue`、`views/storage/generalreport/pages/ExportReportDialog.vue` |
|
||||
| 商品流水 | `views/storage/productflow/index.vue`、`views/storage/productflow/store/index.vue` |
|
||||
| 货主店铺 | `views/store/stores/index.vue`(2 处)、`views/store/stores/component/ExportDialog.vue` |
|
||||
| 基础管理 | `views/system/setting/basicManagement/newview/pages/ExportReportDialog.vue` |
|
||||
|
||||
### 2. `src/components/TaskProgressDialog.vue`
|
||||
- 通用异步任务进度:任务 ID、状态、进度、更新时间、错误/结果
|
||||
- 进度:`el-progress :stroke-width="16"`,执行中带条纹流动(`striped` / `striped-flow`)
|
||||
- 使用位置:
|
||||
- `views/order/orderManagement/pendingOrder.vue`(分配快递号进度)
|
||||
- `views/order/orderManagement/exceptionOrder.vue`(分配快递号进度)
|
||||
|
||||
### 3. `src/views/order/orderManagement/component/OrderExportProgressDialog.vue`
|
||||
- 订单导出进度:任务状态、任务 ID、条纹流动进度条
|
||||
- 使用位置(8 个订单页面):
|
||||
- `reviewOrder.vue`、`pendingOrder.vue`、`outboundOrder.vue`、`deliveryOrder.vue`
|
||||
- `exceptionOrder.vue`、`deliveryException.vue`、`archiveOrder.vue`、`entrustWarehouse.vue`
|
||||
|
||||
---
|
||||
|
||||
## 二、波次模块专用进度弹窗
|
||||
|
||||
### 4. `views/order/waveOrder/component/WaveStrategyQuickScanProgressDialog.vue`
|
||||
- 标题:`波次策略快速扫描`
|
||||
- 内容:任务 ID、扫描任务进度、提交状态/任务状态/仓库、处理数量、匹配/未匹配、受理时间
|
||||
- 使用位置(2 处):
|
||||
- `views/order/waveOrder/FallbackOrderListPanel.vue` ← **`tab=sandanFallbackOrders` 不符合波次策略订单列表**
|
||||
- `views/order/waveOrder/GroupWaveBatchListPanel.vue` ← `tab=groupWave` 团购波次
|
||||
- 触发:工具栏「快速扫描」(`wave-config.ts` 中 `label: '快速扫描'`)
|
||||
|
||||
### 5. `views/order/waveOrder/component/WaveFetchTaskProgressDialog.vue`
|
||||
- 标题:`抓取任务进度`
|
||||
- 使用位置(2 处):
|
||||
- `SandanWaveBatchListPanel.vue`(散单波次)
|
||||
- `GroupWaveBatchListPanel.vue`(团购波次)
|
||||
|
||||
### 6. `views/order/waveOrder/component/WaveBatchTaskProgressDialog.vue`
|
||||
- 标题由调用方传入,同一组件复用 4 类任务
|
||||
- 使用位置(8 处,散单波次 / 团购波次各 4 处):
|
||||
| 标题 | 所在文件 |
|
||||
|---|---|
|
||||
| `快递号分配任务进度` | `SandanWaveBatchListPanel.vue`、`GroupWaveBatchListPanel.vue` |
|
||||
| `储位分配任务进度` | 同上 |
|
||||
| `移除异常订单任务进度` | 同上 |
|
||||
| `批量取消波次任务进度` | 同上 |
|
||||
|
||||
---
|
||||
|
||||
## 三、弹窗表单内嵌进度(提交后原地显示进度)
|
||||
|
||||
### 7. `views/order/orderManagement/form/SyncOrderIdsForm.vue`
|
||||
- 表单:同步订单 ID(勾选数量 → 确认同步 → 任务 ID / 状态 / 处理进度 / 总数/已处理/成功/失败)
|
||||
- 使用位置(3 处):
|
||||
- `views/order/orderManagement/pendingOrder.vue`
|
||||
- `views/order/orderManagement/exceptionOrder.vue`
|
||||
- `views/order/waveOrder/component/PendingOrderListPanel.vue`(散单波次/团购波次的待处理订单列表)
|
||||
|
||||
### 8. `views/order/orderManagement/form/StorageAllocateForm.vue`
|
||||
- 表单:按订单批量分配 / 取消分配储位(允许存储储位开关 → 提交 → 进度)
|
||||
- 使用位置(3 处):同上(pendingOrder、exceptionOrder、wave 的 PendingOrderListPanel)
|
||||
|
||||
### 9. `views/order/orderManagement/form/BatchAsyncTaskForm.vue`
|
||||
- 表单:订单批量异步任务(拦截 / 解除拦截 / 锁定 / 解锁,配置见 `order-common-config.ts` 的 `PENDING_BATCH_ASYNC_TASK_ACTIONS`)
|
||||
- 使用位置(2 处):
|
||||
- `views/order/orderManagement/pendingOrder.vue`
|
||||
- `views/order/orderManagement/exceptionOrder.vue`
|
||||
|
||||
---
|
||||
|
||||
## 四、页面内联进度(不是任务弹窗,改造时无需处理)
|
||||
|
||||
| 文件 | 用途 |
|
||||
|---|---|
|
||||
| `views/warehouse/AreaRacksList.vue` | 库位容量占用条 |
|
||||
| `views/dashboard/components/StatsCardsWarehouse.vue` | 仪表盘统计卡片进度 |
|
||||
| `views/dashboard/components/StatsCardsStore.vue` | 仪表盘统计卡片进度 |
|
||||
| `views/profile/components/AccountSecurity.vue` | 账号安全强度条 |
|
||||
| `views/test/index.vue` | 独立测试页的豹子进度条演示 |
|
||||
|
||||
---
|
||||
|
||||
## 五、若统一替换为「豹子进度条」的改造入口
|
||||
|
||||
按影响面排序,优先改:
|
||||
|
||||
1. `src/components/AsyncExportProgressDialog.vue` → 覆盖 23 个页面 / 25 处
|
||||
2. `src/components/TaskProgressDialog.vue` → 2 处
|
||||
3. `src/views/order/orderManagement/component/OrderExportProgressDialog.vue` → 8 个订单页面
|
||||
4. 波次 3 个专用弹窗 → 12 处
|
||||
5. 3 个表单内嵌进度 → 8 处
|
||||
|
||||
> 说明:独立进度弹窗统一使用 `el-progress :stroke-width="16"`;表单内嵌同样使用 `stroke-width=16`,可将进度条部分抽成公共组件(如 `TaskProgressBar.vue`)后在一处替换。
|
||||
|
||||
---
|
||||
|
||||
## 六、「预计剩余时间」怎么显示
|
||||
|
||||
后端所有任务进度接口都**不返回**剩余时间,只有 `progress(_percent)` / `processed_count` /
|
||||
`total_count` / `duration_ms` / `submitted_at` / `update_time`。所以只能前端估算:
|
||||
|
||||
```
|
||||
预计剩余 ≈ 已用时长(duration_ms) × (100 - progress) / progress
|
||||
```
|
||||
|
||||
组件用法:给 `TaskProgressPanel` / `UnifiedTaskProgressDialog` 传 `elapsed-ms`(已用毫秒,
|
||||
取接口 `duration_ms`;没有该字段的接口可用 `Date.now() - 轮询开始时间`),组件会自动显示
|
||||
「预计剩余 12秒」:
|
||||
|
||||
```vue
|
||||
<UnifiedTaskProgressDialog
|
||||
:visible="visible"
|
||||
title="导出订单数据"
|
||||
:progress="percent"
|
||||
:elapsed-ms="progressData.duration_ms"
|
||||
/>
|
||||
```
|
||||
|
||||
规则(`src/components/task-progress/estimate.ts`):
|
||||
|
||||
- `progress` 为 0、`elapsedMs` 为 0 时不显示(无法外推)
|
||||
- `progress` 到 100 或状态为 `failed` 时不显示
|
||||
- 文案固定带「预计」前缀;`etaText` 仍可显式覆盖
|
||||
|
||||
BIN
public/animation/animation.gif
Normal file
BIN
public/animation/animation.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 148 KiB |
116
src/components/task-progress/CheetahProgressBar.vue
Normal file
116
src/components/task-progress/CheetahProgressBar.vue
Normal file
@ -0,0 +1,116 @@
|
||||
<template>
|
||||
<div class="cheetah-progress" :class="`is-${state}`">
|
||||
<div class="cheetah-progress__rail">
|
||||
<div class="cheetah-progress__track">
|
||||
<div class="cheetah-progress__fill" :style="{ width: `${clamped}%` }"></div>
|
||||
</div>
|
||||
<!-- 猎豹中线对齐进度条右侧(填充末端),左右各留半个身躯避免溢出 -->
|
||||
<div class="cheetah-progress__runner" :style="{ left: `${clamped}%` }">
|
||||
<span class="cheetah-progress__crop">
|
||||
<img
|
||||
class="cheetah-progress__img"
|
||||
src="/animation/animation.gif"
|
||||
alt="猎豹奔跑"
|
||||
draggable="false"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import type { ProgressState } from './types'
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
progress: number
|
||||
state?: ProgressState
|
||||
}>(),
|
||||
{
|
||||
state: 'running'
|
||||
}
|
||||
)
|
||||
|
||||
const clamped = computed(() => {
|
||||
const value = Number(props.progress || 0)
|
||||
if (!Number.isFinite(value)) return 0
|
||||
return Math.min(100, Math.max(0, value))
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.cheetah-progress {
|
||||
/* 猎豹显示宽度;轨道左右各留一半,保证首尾不溢出 */
|
||||
--runner-w: 120px;
|
||||
|
||||
margin-top: 68px;
|
||||
padding: 0 calc(var(--runner-w) / 2);
|
||||
|
||||
&__rail {
|
||||
position: relative;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
&__track {
|
||||
height: 10px;
|
||||
border-radius: 5px;
|
||||
background: #ebeef5;
|
||||
}
|
||||
|
||||
&__fill {
|
||||
height: 100%;
|
||||
border-radius: inherit;
|
||||
background: #409eff;
|
||||
transition: width 0.25s linear;
|
||||
}
|
||||
|
||||
&__runner {
|
||||
position: absolute;
|
||||
/* 轨道高 10px:GIF 底边贴在轨道上沿 */
|
||||
bottom: 10px;
|
||||
transform: translateX(-50%);
|
||||
transition: left 0.25s linear;
|
||||
pointer-events: none;
|
||||
will-change: left;
|
||||
}
|
||||
|
||||
/* GIF 裁切:原图 480x247,所有帧内容并集 467x227(偏移 x2 / y6) */
|
||||
&__crop {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: var(--runner-w);
|
||||
height: calc(var(--runner-w) * 227 / 467);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
&__img {
|
||||
position: absolute;
|
||||
left: calc(var(--runner-w) * -2 / 467);
|
||||
top: calc(var(--runner-w) * -6 / 467);
|
||||
width: calc(var(--runner-w) * 480 / 467);
|
||||
height: calc(var(--runner-w) * 247 / 467);
|
||||
display: block;
|
||||
user-select: none;
|
||||
pointer-events: none;
|
||||
/* GIF 白底在浅色背景上“隐身” */
|
||||
mix-blend-mode: multiply;
|
||||
}
|
||||
|
||||
&.is-success &__fill {
|
||||
background: #67c23a;
|
||||
}
|
||||
|
||||
&.is-failed &__fill {
|
||||
background: #f56c6c;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 520px) {
|
||||
.cheetah-progress {
|
||||
--runner-w: 100px;
|
||||
margin-top: 58px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
494
src/components/task-progress/TaskProgressPanel.vue
Normal file
494
src/components/task-progress/TaskProgressPanel.vue
Normal file
@ -0,0 +1,494 @@
|
||||
<template>
|
||||
<div class="task-panel" :class="`is-${mode}`">
|
||||
<header class="task-panel__head">
|
||||
<div class="task-panel__titles">
|
||||
<h2>{{ title }}</h2>
|
||||
<p v-if="subtitle">{{ subtitle }}</p>
|
||||
</div>
|
||||
|
||||
<span v-if="taskId" class="task-panel__task">任务ID:{{ taskId }}</span>
|
||||
|
||||
<button v-if="closable" class="task-panel__close" type="button" aria-label="关闭" @click="emit('close')">
|
||||
<svg viewBox="0 0 12 12" fill="none">
|
||||
<path d="M1 1L11 11M11 1L1 11" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" />
|
||||
</svg>
|
||||
</button>
|
||||
</header>
|
||||
|
||||
<div class="task-panel__body">
|
||||
<template v-if="mode === 'form'">
|
||||
<div v-if="fields.length" class="task-panel__form">
|
||||
<div v-for="field in fields" :key="field.label" class="task-panel__field">
|
||||
<span class="task-panel__field-label">{{ field.label }}</span>
|
||||
<span v-if="field.type === 'switch'" class="task-panel__switch" :class="{ 'is-on': field.active }">
|
||||
<i></i>
|
||||
</span>
|
||||
<strong v-else class="task-panel__field-value">{{ field.value ?? '—' }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
<p v-if="formTip" class="task-panel__form-tip">{{ formTip }}</p>
|
||||
</template>
|
||||
|
||||
<template v-else>
|
||||
<div v-if="summary && summary.length" class="task-panel__summary">
|
||||
<div v-for="item in summary" :key="item.label" class="task-panel__summary-item">
|
||||
<span>{{ item.label }}</span>
|
||||
<strong>{{ item.value }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="task-panel__progress">
|
||||
<div class="task-panel__progress-head">
|
||||
<div class="task-panel__percent">{{ roundedPercent }}<em>%</em></div>
|
||||
<div class="task-panel__state">
|
||||
<strong>{{ statusLabel }}</strong>
|
||||
<span v-if="detail">{{ detail }}</span>
|
||||
</div>
|
||||
<span v-if="etaLabel" class="task-panel__eta">{{ etaLabel }}</span>
|
||||
</div>
|
||||
|
||||
<CheetahProgressBar :progress="progress" :state="state" />
|
||||
|
||||
<div v-if="metrics && metrics.length" class="task-panel__metrics">
|
||||
<div v-for="item in metrics" :key="item.label" class="task-panel__metric">
|
||||
<span>{{ item.label }}</span>
|
||||
<strong>{{ item.value }}<em v-if="item.unit">{{ item.unit }}</em></strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p v-if="message" class="task-panel__message">{{ message }}</p>
|
||||
<p v-if="error" class="task-panel__error">{{ error }}</p>
|
||||
</div>
|
||||
|
||||
<div v-if="resultIds.length" class="task-panel__ids">
|
||||
<span>{{ resultIdsLabel }}</span>
|
||||
<p>{{ resultIds.join('、') }}</p>
|
||||
</div>
|
||||
|
||||
<p v-if="tip" class="task-panel__tip">{{ tip }}</p>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<footer v-if="$slots.footer" class="task-panel__foot">
|
||||
<slot name="footer" />
|
||||
</footer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import CheetahProgressBar from './CheetahProgressBar.vue'
|
||||
import { estimateRemainingText } from './estimate'
|
||||
import type {
|
||||
ProgressFormField,
|
||||
ProgressMetricItem,
|
||||
ProgressState,
|
||||
ProgressSummaryItem
|
||||
} from './types'
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
title: string
|
||||
subtitle?: string
|
||||
taskId?: string
|
||||
/** form:提交前参数;progress:任务进度 */
|
||||
mode?: 'form' | 'progress'
|
||||
state?: ProgressState
|
||||
/** 0-100 */
|
||||
progress?: number
|
||||
/** 优先于 state 的默认文案 */
|
||||
statusText?: string
|
||||
/** 进度下方的明细,如「已处理 1,286 / 2,040」 */
|
||||
detail?: string
|
||||
/** 已用时长(毫秒):传入后自动按「已用 × (100-进度)/进度」估算剩余时间 */
|
||||
elapsedMs?: number
|
||||
/** 右侧胶囊,如「预计剩余 6秒」;传入则优先于 elapsedMs 估算结果 */
|
||||
etaText?: string
|
||||
/** 参数摘要(仓库 / 策略 / 范围…) */
|
||||
summary?: ProgressSummaryItem[]
|
||||
/** 统计指标(匹配 / 未匹配 / 耗时…) */
|
||||
metrics?: ProgressMetricItem[]
|
||||
/** 表单态字段 */
|
||||
fields?: ProgressFormField[]
|
||||
/** 表单态提示 */
|
||||
formTip?: string
|
||||
/** 进度态结果 ID 列表 */
|
||||
resultIds?: Array<string | number>
|
||||
resultIdsLabel?: string
|
||||
/** 进度态底部提示 */
|
||||
tip?: string
|
||||
message?: string
|
||||
error?: string
|
||||
closable?: boolean
|
||||
}>(),
|
||||
{
|
||||
state: 'running',
|
||||
mode: 'progress',
|
||||
progress: 0,
|
||||
closable: true,
|
||||
subtitle: '',
|
||||
taskId: '',
|
||||
statusText: '',
|
||||
detail: '',
|
||||
etaText: '',
|
||||
elapsedMs: 0,
|
||||
summary: () => [],
|
||||
metrics: () => [],
|
||||
fields: () => [],
|
||||
formTip: '',
|
||||
resultIds: () => [],
|
||||
resultIdsLabel: '订单ID',
|
||||
tip: '',
|
||||
message: '',
|
||||
error: ''
|
||||
}
|
||||
)
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'close'): void
|
||||
}>()
|
||||
|
||||
const roundedPercent = computed(() => {
|
||||
const value = Number(props.progress || 0)
|
||||
if (!Number.isFinite(value)) return 0
|
||||
return Math.min(100, Math.max(0, Math.round(value)))
|
||||
})
|
||||
|
||||
const statusLabel = computed(() => {
|
||||
if (props.statusText) return props.statusText
|
||||
if (props.state === 'success') return '处理完成'
|
||||
if (props.state === 'failed') return '处理失败'
|
||||
return '处理中'
|
||||
})
|
||||
|
||||
/** 优先用调用方给的文案,否则根据已用时长本地预估 */
|
||||
const etaLabel = computed(
|
||||
() => props.etaText || estimateRemainingText(roundedPercent.value, props.elapsedMs, props.state)
|
||||
)
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.task-panel {
|
||||
background: #fff;
|
||||
color: #303133;
|
||||
|
||||
&__head {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 12px;
|
||||
/* 对齐 el-dialog 默认:容器 padding 16 + header 下内边距 16 */
|
||||
padding: 16px 16px 16px;
|
||||
}
|
||||
|
||||
&__titles {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
|
||||
h2 {
|
||||
margin: 0;
|
||||
font-size: 18px;
|
||||
line-height: 24px;
|
||||
font-weight: 400;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 4px 0 0;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
color: #909399;
|
||||
}
|
||||
}
|
||||
|
||||
&__task {
|
||||
flex: none;
|
||||
font-size: 12px;
|
||||
line-height: 24px;
|
||||
color: #909399;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&__close {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
flex: none;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
background: transparent;
|
||||
color: #909399;
|
||||
cursor: pointer;
|
||||
transition: color 0.2s;
|
||||
|
||||
svg {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: #409eff;
|
||||
}
|
||||
}
|
||||
|
||||
&__body {
|
||||
/* 对齐「新增投递计划」.form-body:标题下再留 12px */
|
||||
padding: 12px 16px 0;
|
||||
}
|
||||
|
||||
/* ---------- 参数摘要 ---------- */
|
||||
&__summary {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
||||
gap: 8px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
&__summary-item {
|
||||
padding: 8px 12px;
|
||||
border: 1px solid #ebeef5;
|
||||
border-radius: 4px;
|
||||
background: #fafafa;
|
||||
|
||||
span {
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
color: #909399;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
strong {
|
||||
display: block;
|
||||
font-size: 13px;
|
||||
line-height: 20px;
|
||||
font-weight: 500;
|
||||
color: #303133;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------- 进度面板 ---------- */
|
||||
&__progress {
|
||||
padding: 12px 14px 10px;
|
||||
border: 1px solid #e4e7ed;
|
||||
border-radius: 4px;
|
||||
background: #fafcff;
|
||||
}
|
||||
|
||||
&__progress-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
&__percent {
|
||||
flex: none;
|
||||
white-space: nowrap;
|
||||
font-size: 28px;
|
||||
line-height: 1;
|
||||
font-weight: 500;
|
||||
color: #409eff;
|
||||
font-variant-numeric: tabular-nums;
|
||||
|
||||
em {
|
||||
font-style: normal;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
color: #909399;
|
||||
margin-left: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
&__state {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
|
||||
strong {
|
||||
display: block;
|
||||
font-size: 13px;
|
||||
line-height: 20px;
|
||||
font-weight: 500;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
span {
|
||||
display: block;
|
||||
margin-top: 2px;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
color: #606266;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
}
|
||||
|
||||
&__eta {
|
||||
flex: none;
|
||||
padding: 2px 8px;
|
||||
border: 1px solid #d9ecff;
|
||||
border-radius: 4px;
|
||||
background: #ecf5ff;
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
color: #409eff;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
&__metrics {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
|
||||
margin-top: 12px;
|
||||
padding-top: 10px;
|
||||
border-top: 1px solid #ebeef5;
|
||||
}
|
||||
|
||||
&__metric {
|
||||
span {
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
color: #909399;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-size: 15px;
|
||||
line-height: 22px;
|
||||
font-weight: 500;
|
||||
color: #303133;
|
||||
font-variant-numeric: tabular-nums;
|
||||
|
||||
em {
|
||||
font-style: normal;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
color: #909399;
|
||||
margin-left: 1px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__message {
|
||||
margin: 8px 0 0;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
&__error {
|
||||
margin: 8px 0 0;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
color: #f56c6c;
|
||||
}
|
||||
|
||||
&__ids {
|
||||
margin-top: 10px;
|
||||
padding-top: 8px;
|
||||
border-top: 1px solid #ebeef5;
|
||||
|
||||
span {
|
||||
font-size: 12px;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 4px 0 0;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
color: #606266;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
|
||||
&__tip {
|
||||
margin: 8px 0 0;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
/* ---------- 表单态 ---------- */
|
||||
&__form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
&__field {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
min-height: 40px;
|
||||
padding: 8px 12px;
|
||||
border: 1px solid #ebeef5;
|
||||
border-radius: 4px;
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
&__field-label {
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
color: #606266;
|
||||
}
|
||||
|
||||
&__field-value {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: #303133;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
&__switch {
|
||||
position: relative;
|
||||
width: 40px;
|
||||
height: 20px;
|
||||
flex: none;
|
||||
border-radius: 10px;
|
||||
background: #dcdfe6;
|
||||
transition: background 0.2s;
|
||||
|
||||
i {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
left: 2px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border-radius: 50%;
|
||||
background: #fff;
|
||||
transition: left 0.2s;
|
||||
}
|
||||
|
||||
&.is-on {
|
||||
background: #409eff;
|
||||
|
||||
i {
|
||||
left: 22px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__form-tip {
|
||||
margin: 8px 0 0;
|
||||
padding: 8px 12px;
|
||||
border-radius: 4px;
|
||||
background: #f4f4f5;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
&__foot {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
/* 对齐 el-dialog 默认 footer:上间距 16、距底 16 */
|
||||
padding: 16px 16px 16px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
160
src/components/task-progress/UnifiedTaskProgressDialog.vue
Normal file
160
src/components/task-progress/UnifiedTaskProgressDialog.vue
Normal file
@ -0,0 +1,160 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:model-value="visible"
|
||||
class="unified-task-progress-dialog"
|
||||
width="min(560px, 92vw)"
|
||||
align-center
|
||||
append-to-body
|
||||
:show-close="false"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
@update:model-value="emit('update:visible', $event)"
|
||||
>
|
||||
<TaskProgressPanel v-bind="panelProps" @close="close">
|
||||
<template #footer>
|
||||
<span class="utp-hint">{{ footerHint }}</span>
|
||||
<div class="utp-actions">
|
||||
<slot name="footer">
|
||||
<template v-if="mode === 'form'">
|
||||
<el-button size="small" @click="close">取消</el-button>
|
||||
<el-button size="small" type="primary" @click="emit('submit')">{{ submitText }}</el-button>
|
||||
</template>
|
||||
<el-button v-else size="small" @click="close">
|
||||
{{ state === 'running' ? '后台运行' : '关闭' }}
|
||||
</el-button>
|
||||
</slot>
|
||||
</div>
|
||||
</template>
|
||||
</TaskProgressPanel>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import TaskProgressPanel from './TaskProgressPanel.vue'
|
||||
import type {
|
||||
ProgressFormField,
|
||||
ProgressMetricItem,
|
||||
ProgressState,
|
||||
ProgressSummaryItem
|
||||
} from './types'
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
visible: boolean
|
||||
title: string
|
||||
subtitle?: string
|
||||
taskId?: string
|
||||
mode?: 'form' | 'progress'
|
||||
state?: ProgressState
|
||||
progress?: number
|
||||
statusText?: string
|
||||
detail?: string
|
||||
/** 已用时长(毫秒):传入后自动显示「预计剩余 xx」 */
|
||||
elapsedMs?: number
|
||||
/** 右侧剩余时间胶囊;传入则优先生效,不传则由 elapsedMs 估算 */
|
||||
etaText?: string
|
||||
summary?: ProgressSummaryItem[]
|
||||
metrics?: ProgressMetricItem[]
|
||||
fields?: ProgressFormField[]
|
||||
formTip?: string
|
||||
resultIds?: Array<string | number>
|
||||
resultIdsLabel?: string
|
||||
tip?: string
|
||||
message?: string
|
||||
error?: string
|
||||
/** 底部左侧提示文案 */
|
||||
footerHint?: string
|
||||
/** 表单态主按钮文案 */
|
||||
submitText?: string
|
||||
}>(),
|
||||
{
|
||||
state: 'running',
|
||||
mode: 'progress',
|
||||
progress: 0,
|
||||
footerHint: '',
|
||||
submitText: '确认提交',
|
||||
subtitle: '',
|
||||
taskId: '',
|
||||
statusText: '',
|
||||
detail: '',
|
||||
etaText: '',
|
||||
elapsedMs: 0,
|
||||
summary: () => [],
|
||||
metrics: () => [],
|
||||
fields: () => [],
|
||||
formTip: '',
|
||||
resultIds: () => [],
|
||||
resultIdsLabel: '订单ID',
|
||||
tip: '',
|
||||
message: '',
|
||||
error: ''
|
||||
}
|
||||
)
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'update:visible', value: boolean): void
|
||||
(e: 'close'): void
|
||||
(e: 'submit'): void
|
||||
}>()
|
||||
|
||||
const panelProps = computed(() => ({
|
||||
title: props.title,
|
||||
subtitle: props.subtitle,
|
||||
taskId: props.taskId,
|
||||
mode: props.mode,
|
||||
state: props.state,
|
||||
progress: props.progress,
|
||||
statusText: props.statusText,
|
||||
detail: props.detail,
|
||||
etaText: props.etaText,
|
||||
elapsedMs: props.elapsedMs,
|
||||
summary: props.summary,
|
||||
metrics: props.metrics,
|
||||
fields: props.fields,
|
||||
formTip: props.formTip,
|
||||
resultIds: props.resultIds,
|
||||
resultIdsLabel: props.resultIdsLabel,
|
||||
tip: props.tip,
|
||||
message: props.message,
|
||||
error: props.error,
|
||||
closable: true
|
||||
}))
|
||||
|
||||
function close() {
|
||||
emit('update:visible', false)
|
||||
emit('close')
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.utp-hint {
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
.utp-actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss">
|
||||
/* el-dialog 会被 append 到 body,需非 scoped 样式去掉默认头/内边距
|
||||
注意:.el-dialog 自带 padding:16px,这里一并清零,内边距统一交给 TaskProgressPanel,
|
||||
避免与面板内边距叠加(对齐「新增投递计划」弹窗的内容内缩 16px)。
|
||||
面板是通栏白底,会盖住 .el-dialog 的 4px 圆角,故用 overflow:hidden 裁切保留圆角 */
|
||||
.el-dialog.unified-task-progress-dialog {
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
|
||||
.el-dialog__header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.el-dialog__body {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
44
src/components/task-progress/estimate.ts
Normal file
44
src/components/task-progress/estimate.ts
Normal file
@ -0,0 +1,44 @@
|
||||
/**
|
||||
* 进度弹窗的「预估剩余时间」计算。
|
||||
*
|
||||
* 后端所有异步任务进度接口都**不返回**剩余时间,只返回:
|
||||
* status / progress(_percent) / current_count / total_count / duration_ms / submitted_at / update_time
|
||||
* 因此这里只能按「当前速度线性外推」:
|
||||
* 剩余 ≈ 已用时长 × (100 - 进度) / 进度
|
||||
*
|
||||
* 约束:
|
||||
* - 进度为 0 时无法外推(除零 / 无样本),返回空串
|
||||
* - 进度已到 100 或任务失败时也不再展示
|
||||
* - 只是估算,文案必须带「预计」,避免被当成后端承诺
|
||||
*/
|
||||
|
||||
/** 把毫秒格式化成「12秒」「1分20秒」 */
|
||||
export function formatDuration(ms: number): string {
|
||||
if (!Number.isFinite(ms) || ms <= 0) return '0秒'
|
||||
const totalSeconds = Math.max(1, Math.round(ms / 1000))
|
||||
if (totalSeconds < 60) return `${totalSeconds}秒`
|
||||
const minutes = Math.floor(totalSeconds / 60)
|
||||
const seconds = totalSeconds % 60
|
||||
return seconds ? `${minutes}分${seconds}秒` : `${minutes}分`
|
||||
}
|
||||
|
||||
/**
|
||||
* 预估剩余时间文案。
|
||||
* @param progress 当前进度(0-100)
|
||||
* @param elapsedMs 已用时长(毫秒,一般取接口的 duration_ms 或本地轮询起点)
|
||||
* @param state 任务状态,failed/success 时不展示
|
||||
*/
|
||||
export function estimateRemainingText(
|
||||
progress: number,
|
||||
elapsedMs: number,
|
||||
state?: 'running' | 'success' | 'failed'
|
||||
): string {
|
||||
if (state === 'failed') return ''
|
||||
const p = Number(progress)
|
||||
const elapsed = Number(elapsedMs)
|
||||
if (!Number.isFinite(p) || !Number.isFinite(elapsed)) return ''
|
||||
if (p <= 0 || p >= 100 || elapsed <= 0) return ''
|
||||
const remainingMs = (elapsed * (100 - p)) / p
|
||||
if (!Number.isFinite(remainingMs) || remainingMs <= 0) return ''
|
||||
return `预计剩余 ${formatDuration(remainingMs)}`
|
||||
}
|
||||
25
src/components/task-progress/types.ts
Normal file
25
src/components/task-progress/types.ts
Normal file
@ -0,0 +1,25 @@
|
||||
/** 统一进度弹窗的公共类型 */
|
||||
|
||||
export type ProgressState = 'running' | 'success' | 'failed'
|
||||
|
||||
/** 参数摘要:仓库 / 波次策略 / 订单范围 等 */
|
||||
export interface ProgressSummaryItem {
|
||||
label: string
|
||||
value: string
|
||||
}
|
||||
|
||||
/** 统计指标:匹配订单 / 未匹配 / 耗时 等 */
|
||||
export interface ProgressMetricItem {
|
||||
label: string
|
||||
value: string | number
|
||||
unit?: string
|
||||
}
|
||||
|
||||
/** 表单字段(提交前的参数展示) */
|
||||
export interface ProgressFormField {
|
||||
label: string
|
||||
value?: string | number
|
||||
type?: 'text' | 'switch'
|
||||
/** type=switch 时是否开启 */
|
||||
active?: boolean
|
||||
}
|
||||
@ -1,407 +0,0 @@
|
||||
<template>
|
||||
<span
|
||||
class="cheetah-runner"
|
||||
:class="[`cheetah-runner--${mode}`, { 'is-running': running }]"
|
||||
:style="rootStyle"
|
||||
>
|
||||
<svg class="cheetah-runner__svg" viewBox="0 0 200 112" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<!-- 速度线 -->
|
||||
<g class="cheetah-speed">
|
||||
<path class="cheetah-speed__line cheetah-speed__line--1" d="M2 50H26" />
|
||||
<path class="cheetah-speed__line cheetah-speed__line--2" d="M-4 63H18" />
|
||||
<path class="cheetah-speed__line cheetah-speed__line--3" d="M2 76H22" />
|
||||
</g>
|
||||
|
||||
<!-- 地面投影 -->
|
||||
<ellipse class="cheetah-shadow" cx="104" cy="105" rx="62" ry="3.4" />
|
||||
|
||||
<g class="cheetah-body">
|
||||
<!-- 尾巴:从臀后水平拖出,尾尖上翘并逐渐变细 -->
|
||||
<g class="cheetah-tail">
|
||||
<path class="cheetah-tail-base" d="M56 50C42 50 28 47 17 42" />
|
||||
<path class="cheetah-tail-tip" d="M17 42C10 38 5 32 3 26" />
|
||||
</g>
|
||||
|
||||
<!-- 远侧后腿 -->
|
||||
<g class="cheetah-leg cheetah-leg--hind-far" style="transform-origin: 72px 58px">
|
||||
<path class="cheetah-thigh" d="M72 58L88 70" />
|
||||
<path class="cheetah-shin" d="M88 70L78 84" />
|
||||
<path class="cheetah-paw" d="M78 84L72 95" />
|
||||
</g>
|
||||
|
||||
<!-- 远侧前腿 -->
|
||||
<g class="cheetah-leg cheetah-leg--front-far" style="transform-origin: 134px 56px">
|
||||
<path class="cheetah-thigh" d="M134 56L144 70" />
|
||||
<path class="cheetah-shin" d="M144 70L138 84" />
|
||||
<path class="cheetah-paw" d="M138 84L134 95" />
|
||||
</g>
|
||||
|
||||
<!-- 躯干:隆背、深胸、收腰、厚臀 -->
|
||||
<path
|
||||
class="cheetah-torso"
|
||||
d="M56 54C62 42 78 36 96 35C112 34 130 38 140 44C146 48 147 55 143 60C137 65 126 65 116 62C106 59 96 57 86 57C74 57 62 60 57 58C53 56 54 56 56 54Z"
|
||||
/>
|
||||
|
||||
<!-- 颈部 -->
|
||||
<path class="cheetah-neck" d="M136 40C144 37 150 36 157 36L158 44C151 44 145 47 141 52Z" />
|
||||
|
||||
<!-- 头部:短而深的猫科头骨、钝鼻、双尖小耳 -->
|
||||
<path
|
||||
class="cheetah-skull"
|
||||
d="M156 40C155 33 160 28 167 28C172 28 176 31 178 35C180 36 181 38 181 40C181 43 179 45 176 45C173 46 169 46 166 45C161 45 157 44 156 40Z"
|
||||
/>
|
||||
<path class="cheetah-ear" d="M163 30L161 23L167 27Z" />
|
||||
<path class="cheetah-ear cheetah-ear--far" d="M168 25L168 19L173 24Z" />
|
||||
<circle class="cheetah-eye" cx="171" cy="35" r="1.4" />
|
||||
|
||||
<!-- 近侧后腿(Z 形蹬地) -->
|
||||
<g class="cheetah-leg cheetah-leg--hind-near" style="transform-origin: 66px 58px">
|
||||
<path class="cheetah-thigh" d="M66 58L48 72" />
|
||||
<path class="cheetah-shin" d="M48 72L34 86" />
|
||||
<path class="cheetah-paw" d="M34 86L28 97" />
|
||||
</g>
|
||||
|
||||
<!-- 近侧前腿 -->
|
||||
<g class="cheetah-leg cheetah-leg--front-near" style="transform-origin: 140px 58px">
|
||||
<path class="cheetah-thigh" d="M140 58L150 72" />
|
||||
<path class="cheetah-shin" d="M150 72L146 86" />
|
||||
<path class="cheetah-paw" d="M146 86L144 97" />
|
||||
</g>
|
||||
|
||||
<!-- 斑点 -->
|
||||
<g class="cheetah-spots">
|
||||
<circle cx="76" cy="42" r="1.8" />
|
||||
<circle cx="85" cy="39" r="1.7" />
|
||||
<circle cx="94" cy="38" r="1.8" />
|
||||
<circle cx="103" cy="38" r="1.7" />
|
||||
<circle cx="112" cy="39" r="1.8" />
|
||||
<circle cx="121" cy="41" r="1.7" />
|
||||
<circle cx="129" cy="44" r="1.8" />
|
||||
<circle cx="88" cy="46" r="1.7" />
|
||||
<circle cx="97" cy="46" r="1.8" />
|
||||
<circle cx="106" cy="47" r="1.7" />
|
||||
<circle cx="115" cy="48" r="1.8" />
|
||||
</g>
|
||||
</g>
|
||||
|
||||
<!-- 扬尘 -->
|
||||
<g class="cheetah-dust">
|
||||
<circle cx="28" cy="100" r="2.6" />
|
||||
<circle cx="18" cy="96" r="1.9" />
|
||||
<circle cx="9" cy="92" r="1.4" />
|
||||
</g>
|
||||
</svg>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
/** 剪影风格:line 标准 / bold 带投影 / ghost 半透明 */
|
||||
mode?: 'line' | 'bold' | 'ghost'
|
||||
running?: boolean
|
||||
/** 渲染宽度(px),高度按 200:112 等比 */
|
||||
width?: number
|
||||
/** 动画速度倍率 */
|
||||
speed?: number
|
||||
/** 剪影颜色,默认继承 */
|
||||
color?: string
|
||||
}>(),
|
||||
{
|
||||
mode: 'line',
|
||||
running: true,
|
||||
width: 110,
|
||||
speed: 1,
|
||||
color: ''
|
||||
}
|
||||
)
|
||||
|
||||
const rootStyle = computed(() => ({
|
||||
width: `${props.width}px`,
|
||||
color: props.color || 'inherit',
|
||||
'--dur': `${(0.46 / Math.max(0.2, props.speed)).toFixed(3)}s`
|
||||
}))
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.cheetah-runner {
|
||||
--dur: 0.46s;
|
||||
display: inline-block;
|
||||
line-height: 0;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.cheetah-runner--bold {
|
||||
filter: drop-shadow(0 4px 8px rgba(37, 99, 235, 0.22));
|
||||
}
|
||||
|
||||
.cheetah-runner--ghost {
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.cheetah-runner__svg {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
/* ---------- 剪影 ---------- */
|
||||
.cheetah-torso,
|
||||
.cheetah-neck,
|
||||
.cheetah-skull,
|
||||
.cheetah-ear {
|
||||
fill: currentColor;
|
||||
stroke: none;
|
||||
}
|
||||
|
||||
.cheetah-tail {
|
||||
transform-origin: 56px 50px;
|
||||
transform-box: view-box;
|
||||
}
|
||||
|
||||
.cheetah-tail path {
|
||||
fill: none;
|
||||
stroke: currentColor;
|
||||
stroke-linecap: round;
|
||||
}
|
||||
|
||||
.cheetah-tail-base {
|
||||
stroke-width: 6.5;
|
||||
}
|
||||
|
||||
.cheetah-tail-tip {
|
||||
stroke-width: 2.8;
|
||||
}
|
||||
|
||||
.cheetah-leg path {
|
||||
fill: none;
|
||||
stroke: currentColor;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: round;
|
||||
}
|
||||
|
||||
.cheetah-leg--hind-near .cheetah-thigh {
|
||||
stroke-width: 14;
|
||||
}
|
||||
|
||||
.cheetah-leg--hind-near .cheetah-shin {
|
||||
stroke-width: 6;
|
||||
}
|
||||
|
||||
.cheetah-leg--hind-near .cheetah-paw {
|
||||
stroke-width: 4;
|
||||
}
|
||||
|
||||
.cheetah-leg--front-near .cheetah-thigh {
|
||||
stroke-width: 9;
|
||||
}
|
||||
|
||||
.cheetah-leg--front-near .cheetah-shin {
|
||||
stroke-width: 5.4;
|
||||
}
|
||||
|
||||
.cheetah-leg--front-near .cheetah-paw {
|
||||
stroke-width: 4;
|
||||
}
|
||||
|
||||
.cheetah-leg--hind-far .cheetah-thigh {
|
||||
stroke-width: 11;
|
||||
}
|
||||
|
||||
.cheetah-leg--hind-far .cheetah-shin {
|
||||
stroke-width: 5.2;
|
||||
}
|
||||
|
||||
.cheetah-leg--hind-far .cheetah-paw {
|
||||
stroke-width: 3.4;
|
||||
}
|
||||
|
||||
.cheetah-leg--front-far .cheetah-thigh {
|
||||
stroke-width: 7.6;
|
||||
}
|
||||
|
||||
.cheetah-leg--front-far .cheetah-shin {
|
||||
stroke-width: 4.6;
|
||||
}
|
||||
|
||||
.cheetah-leg--front-far .cheetah-paw {
|
||||
stroke-width: 3.4;
|
||||
}
|
||||
|
||||
.cheetah-leg--hind-far,
|
||||
.cheetah-leg--front-far {
|
||||
opacity: 0.45;
|
||||
}
|
||||
|
||||
.cheetah-eye {
|
||||
fill: #fff;
|
||||
stroke: none;
|
||||
}
|
||||
|
||||
.cheetah-ear--far {
|
||||
opacity: 0.65;
|
||||
}
|
||||
|
||||
.cheetah-spots circle {
|
||||
fill: #bfdbfe;
|
||||
opacity: 0.9;
|
||||
stroke: none;
|
||||
}
|
||||
|
||||
.cheetah-shadow {
|
||||
fill: currentColor;
|
||||
opacity: 0.09;
|
||||
transform-origin: 104px 105px;
|
||||
transform-box: view-box;
|
||||
}
|
||||
|
||||
.cheetah-speed__line {
|
||||
fill: none;
|
||||
stroke: currentColor;
|
||||
stroke-width: 2.4;
|
||||
stroke-linecap: round;
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
.cheetah-dust circle {
|
||||
fill: currentColor;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
/* ---------- 奔跑动画 ---------- */
|
||||
.is-running .cheetah-body {
|
||||
animation: cheetah-bob var(--dur) ease-in-out infinite;
|
||||
transform-box: view-box;
|
||||
transform-origin: 100px 62px;
|
||||
}
|
||||
|
||||
.is-running .cheetah-leg--front-near {
|
||||
animation: cheetah-front var(--dur) ease-in-out infinite;
|
||||
}
|
||||
|
||||
.is-running .cheetah-leg--front-far {
|
||||
animation: cheetah-front var(--dur) ease-in-out infinite;
|
||||
animation-delay: calc(var(--dur) / -2);
|
||||
}
|
||||
|
||||
.is-running .cheetah-leg--hind-near {
|
||||
animation: cheetah-hind var(--dur) ease-in-out infinite;
|
||||
}
|
||||
|
||||
.is-running .cheetah-leg--hind-far {
|
||||
animation: cheetah-hind var(--dur) ease-in-out infinite;
|
||||
animation-delay: calc(var(--dur) / -2);
|
||||
}
|
||||
|
||||
.is-running .cheetah-tail {
|
||||
animation: cheetah-tail calc(var(--dur) * 1.6) ease-in-out infinite;
|
||||
}
|
||||
|
||||
.is-running .cheetah-shadow {
|
||||
animation: cheetah-shadow var(--dur) ease-in-out infinite;
|
||||
}
|
||||
|
||||
.is-running .cheetah-speed__line {
|
||||
animation: cheetah-streak calc(var(--dur) * 0.9) linear infinite;
|
||||
}
|
||||
|
||||
.is-running .cheetah-speed__line--2 {
|
||||
animation-delay: calc(var(--dur) * -0.3);
|
||||
}
|
||||
|
||||
.is-running .cheetah-speed__line--3 {
|
||||
animation-delay: calc(var(--dur) * -0.6);
|
||||
}
|
||||
|
||||
.is-running .cheetah-dust circle {
|
||||
animation: cheetah-dust calc(var(--dur) * 1.5) ease-out infinite;
|
||||
}
|
||||
|
||||
.is-running .cheetah-dust circle:nth-child(2) {
|
||||
animation-delay: calc(var(--dur) * -0.4);
|
||||
}
|
||||
|
||||
.is-running .cheetah-dust circle:nth-child(3) {
|
||||
animation-delay: calc(var(--dur) * -0.8);
|
||||
}
|
||||
|
||||
@keyframes cheetah-bob {
|
||||
0%,
|
||||
100% {
|
||||
transform: translateY(0);
|
||||
}
|
||||
50% {
|
||||
transform: translateY(-2.5px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes cheetah-front {
|
||||
0%,
|
||||
100% {
|
||||
transform: rotate(15deg);
|
||||
}
|
||||
50% {
|
||||
transform: rotate(-17deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes cheetah-hind {
|
||||
0%,
|
||||
100% {
|
||||
transform: rotate(-17deg);
|
||||
}
|
||||
50% {
|
||||
transform: rotate(15deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes cheetah-tail {
|
||||
0%,
|
||||
100% {
|
||||
transform: rotate(-6deg);
|
||||
}
|
||||
50% {
|
||||
transform: rotate(7deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes cheetah-streak {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: translateX(6px);
|
||||
}
|
||||
30% {
|
||||
opacity: 0.42;
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
transform: translateX(-12px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes cheetah-shadow {
|
||||
0%,
|
||||
100% {
|
||||
transform: scaleX(1);
|
||||
opacity: 0.09;
|
||||
}
|
||||
50% {
|
||||
transform: scaleX(0.88);
|
||||
opacity: 0.05;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes cheetah-dust {
|
||||
0% {
|
||||
opacity: 0.32;
|
||||
transform: translate(0, 0) scale(0.6);
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
transform: translate(-12px, 4px) scale(1.5);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,336 +0,0 @@
|
||||
<template>
|
||||
<div class="dialog-a">
|
||||
<header class="dialog-a__head">
|
||||
<div class="dialog-a__ident">
|
||||
<span class="dialog-a__mark"></span>
|
||||
<div class="dialog-a__titles">
|
||||
<h3>波次策略快速扫描</h3>
|
||||
<p>Wave strategy quick scan</p>
|
||||
</div>
|
||||
</div>
|
||||
<span class="dialog-a__task">W202610180931</span>
|
||||
</header>
|
||||
|
||||
<div class="dialog-a__form">
|
||||
<div class="field">
|
||||
<span class="field__label">仓库</span>
|
||||
<span class="field__box">
|
||||
深圳保税仓
|
||||
<svg class="field__caret" viewBox="0 0 10 6" fill="none">
|
||||
<path d="M1 1L5 5L9 1" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" />
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
<div class="field">
|
||||
<span class="field__label">波次策略</span>
|
||||
<span class="field__box">
|
||||
三单波次 · 自动
|
||||
<svg class="field__caret" viewBox="0 0 10 6" fill="none">
|
||||
<path d="M1 1L5 5L9 1" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" />
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
<div class="field field--full">
|
||||
<span class="field__label">订单范围</span>
|
||||
<div class="chips">
|
||||
<span class="chip chip--active">全部待处理</span>
|
||||
<span class="chip">仅异常单</span>
|
||||
<span class="chip">未分配快递</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="a-progress">
|
||||
<div class="a-progress__top">
|
||||
<div class="a-percent">{{ percent }}<small>%</small></div>
|
||||
<div class="a-status">
|
||||
<span class="a-status__dot"></span>
|
||||
{{ statusText }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="a-rail">
|
||||
<div class="a-rail__track">
|
||||
<div class="a-rail__fill" :style="{ width: `${progress}%` }"></div>
|
||||
</div>
|
||||
<div class="a-rail__runner" :style="{ left: `${runnerLeft}%` }">
|
||||
<CheetahRunner
|
||||
mode="line"
|
||||
:running="running && progress < 100"
|
||||
:width="118"
|
||||
:speed="1.15"
|
||||
color="#2563eb"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="a-meta">
|
||||
<span>已处理 <b>{{ processed.toLocaleString() }}</b> / {{ total.toLocaleString() }}</span>
|
||||
<span>匹配 <b>{{ matched.toLocaleString() }}</b></span>
|
||||
<span>未匹配 <b>{{ unmatched.toLocaleString() }}</b></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import CheetahRunner from './CheetahRunner.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
progress: number
|
||||
running: boolean
|
||||
}>()
|
||||
|
||||
const percent = computed(() => Math.round(props.progress))
|
||||
const runnerLeft = computed(() => Math.min(92, Math.max(8, props.progress)))
|
||||
|
||||
const total = 2040
|
||||
const processed = computed(() => Math.round((props.progress / 100) * total))
|
||||
const matched = computed(() => Math.round(processed.value * 0.86))
|
||||
const unmatched = computed(() => processed.value - matched.value)
|
||||
|
||||
const statusText = computed(() => {
|
||||
if (props.progress >= 100) return '扫描完成,正在汇总结果'
|
||||
const stages = ['正在拉取待扫描订单', '正在匹配波次策略', '正在校验波次约束', '正在汇总扫描结果']
|
||||
return stages[Math.min(stages.length - 1, Math.floor(props.progress / 25))]
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.dialog-a {
|
||||
background: #fff;
|
||||
border: 1px solid #e8eef7;
|
||||
border-radius: 16px;
|
||||
padding: 24px 26px 22px;
|
||||
box-shadow: 0 24px 48px -32px rgba(15, 23, 42, 0.35);
|
||||
color: #0f172a;
|
||||
|
||||
&__head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
&__ident {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
&__mark {
|
||||
position: relative;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
border-radius: 10px;
|
||||
background: linear-gradient(135deg, #3b82f6, #1d4ed8);
|
||||
flex: none;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 11px;
|
||||
border-radius: 50%;
|
||||
border: 2px solid rgba(255, 255, 255, 0.9);
|
||||
}
|
||||
}
|
||||
|
||||
&__titles {
|
||||
h3 {
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.01em;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 2px 0 0;
|
||||
font-size: 10px;
|
||||
letter-spacing: 0.14em;
|
||||
text-transform: uppercase;
|
||||
color: #94a3b8;
|
||||
}
|
||||
}
|
||||
|
||||
&__task {
|
||||
font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
|
||||
font-size: 11px;
|
||||
color: #3b82f6;
|
||||
background: #eff6ff;
|
||||
border-radius: 999px;
|
||||
padding: 5px 10px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&__form {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 14px;
|
||||
margin-top: 22px;
|
||||
}
|
||||
}
|
||||
|
||||
.field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 7px;
|
||||
|
||||
&--full {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
&__label {
|
||||
font-size: 11px;
|
||||
color: #94a3b8;
|
||||
}
|
||||
|
||||
&__box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
height: 38px;
|
||||
padding: 0 12px;
|
||||
border: 1px solid #e6ecf5;
|
||||
border-radius: 10px;
|
||||
background: #fbfdff;
|
||||
font-size: 13px;
|
||||
color: #1e293b;
|
||||
}
|
||||
|
||||
&__caret {
|
||||
width: 10px;
|
||||
height: 6px;
|
||||
color: #94a3b8;
|
||||
flex: none;
|
||||
}
|
||||
}
|
||||
|
||||
.chips {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.chip {
|
||||
height: 30px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 0 13px;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 999px;
|
||||
font-size: 12px;
|
||||
color: #64748b;
|
||||
|
||||
&--active {
|
||||
background: #eff6ff;
|
||||
border-color: #bfdbfe;
|
||||
color: #2563eb;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
.a-progress {
|
||||
margin-top: 24px;
|
||||
padding-top: 20px;
|
||||
border-top: 1px dashed #e8eef7;
|
||||
|
||||
&__top {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.a-percent {
|
||||
font-size: 40px;
|
||||
line-height: 1;
|
||||
font-weight: 650;
|
||||
letter-spacing: -0.03em;
|
||||
font-variant-numeric: tabular-nums;
|
||||
|
||||
small {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #64748b;
|
||||
margin-left: 3px;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.a-status {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 7px;
|
||||
font-size: 12px;
|
||||
color: #475569;
|
||||
padding-bottom: 4px;
|
||||
|
||||
&__dot {
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
border-radius: 50%;
|
||||
background: #3b82f6;
|
||||
box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5);
|
||||
animation: a-pulse 1.6s ease-out infinite;
|
||||
}
|
||||
}
|
||||
|
||||
.a-rail {
|
||||
position: relative;
|
||||
height: 10px;
|
||||
margin: 62px 0 0;
|
||||
|
||||
&__track {
|
||||
height: 10px;
|
||||
border-radius: 999px;
|
||||
background: #edf2f9;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
&__fill {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
border-radius: inherit;
|
||||
background: linear-gradient(90deg, #93c5fd, #3b82f6 70%, #2563eb);
|
||||
transition: width 0.25s linear;
|
||||
}
|
||||
|
||||
&__runner {
|
||||
position: absolute;
|
||||
bottom: -4px;
|
||||
transform: translateX(-58%);
|
||||
transition: left 0.25s linear;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
.a-meta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px 22px;
|
||||
margin-top: 20px;
|
||||
font-size: 12px;
|
||||
color: #64748b;
|
||||
font-variant-numeric: tabular-nums;
|
||||
|
||||
b {
|
||||
color: #1e293b;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes a-pulse {
|
||||
0% {
|
||||
box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.45);
|
||||
}
|
||||
70% {
|
||||
box-shadow: 0 0 0 7px rgba(59, 130, 246, 0);
|
||||
}
|
||||
100% {
|
||||
box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,329 +0,0 @@
|
||||
<template>
|
||||
<div class="dialog-b">
|
||||
<header class="dialog-b__head">
|
||||
<div class="dialog-b__title">
|
||||
<span class="live"><i></i>{{ percent >= 100 ? '已完成' : '运行中' }}</span>
|
||||
<h3>波次策略快速扫描</h3>
|
||||
</div>
|
||||
<span class="dialog-b__task">#W202610180931</span>
|
||||
</header>
|
||||
|
||||
<div class="dialog-b__body">
|
||||
<div class="params">
|
||||
<div class="param">
|
||||
<span>仓库</span>
|
||||
<strong>深圳保税仓</strong>
|
||||
</div>
|
||||
<div class="param">
|
||||
<span>波次策略</span>
|
||||
<strong>三单波次 · 自动</strong>
|
||||
</div>
|
||||
<div class="param">
|
||||
<span>订单范围</span>
|
||||
<strong>全部待处理</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="meter">
|
||||
<div class="meter__head">
|
||||
<span class="meter__label">扫描进度</span>
|
||||
<span class="meter__value">{{ percent }}<i>%</i></span>
|
||||
</div>
|
||||
|
||||
<div class="meter__rail">
|
||||
<div class="meter__fill" :style="{ width: `${progress}%` }">
|
||||
<span class="meter__stripes"></span>
|
||||
</div>
|
||||
<div class="meter__runner" :style="{ left: `${runnerLeft}%` }">
|
||||
<CheetahRunner
|
||||
mode="bold"
|
||||
:running="running && progress < 100"
|
||||
:width="112"
|
||||
:speed="1.05"
|
||||
color="#2563eb"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="meter__foot">
|
||||
<span>已处理 {{ processed.toLocaleString() }} / {{ total.toLocaleString() }}</span>
|
||||
<span>{{ throughput }} 单/秒</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid">
|
||||
<div class="cell">
|
||||
<span>匹配订单</span>
|
||||
<strong>{{ matched.toLocaleString() }}</strong>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<span>未匹配</span>
|
||||
<strong>{{ unmatched.toLocaleString() }}</strong>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<span>预计剩余</span>
|
||||
<strong>{{ eta }}<em>s</em></strong>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<span>已耗时</span>
|
||||
<strong>{{ elapsed }}<em>s</em></strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import CheetahRunner from './CheetahRunner.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
progress: number
|
||||
running: boolean
|
||||
}>()
|
||||
|
||||
const percent = computed(() => Math.round(props.progress))
|
||||
const runnerLeft = computed(() => Math.min(92, Math.max(8, props.progress)))
|
||||
|
||||
const total = 2040
|
||||
const processed = computed(() => Math.round((props.progress / 100) * total))
|
||||
const matched = computed(() => Math.round(processed.value * 0.86))
|
||||
const unmatched = computed(() => processed.value - matched.value)
|
||||
const throughput = computed(() => (props.running ? 168 : 0))
|
||||
const eta = computed(() => Math.max(0, Math.round(((100 - props.progress) / 100) * 14)))
|
||||
const elapsed = computed(() => ((props.progress / 100) * 14).toFixed(1))
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.dialog-b {
|
||||
background: #fff;
|
||||
border: 1px solid #e3ebf8;
|
||||
border-radius: 16px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 24px 48px -32px rgba(15, 23, 42, 0.4);
|
||||
color: #0f172a;
|
||||
|
||||
&__head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 18px 22px;
|
||||
background: linear-gradient(120deg, #1d4ed8 0%, #3b82f6 58%, #60a5fa 100%);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
&__title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
|
||||
h3 {
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.01em;
|
||||
}
|
||||
}
|
||||
|
||||
&__task {
|
||||
font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
|
||||
font-size: 11px;
|
||||
color: #fff;
|
||||
background: rgba(255, 255, 255, 0.16);
|
||||
border: 1px solid rgba(255, 255, 255, 0.22);
|
||||
padding: 5px 10px;
|
||||
border-radius: 999px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&__body {
|
||||
padding: 20px 22px 22px;
|
||||
}
|
||||
}
|
||||
|
||||
.live {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
height: 24px;
|
||||
padding: 0 10px;
|
||||
border-radius: 999px;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.04em;
|
||||
background: rgba(255, 255, 255, 0.18);
|
||||
border: 1px solid rgba(255, 255, 255, 0.26);
|
||||
|
||||
i {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
background: #bbf7d0;
|
||||
animation: b-blink 1.4s ease-in-out infinite;
|
||||
}
|
||||
}
|
||||
|
||||
.params {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.param {
|
||||
background: #f7faff;
|
||||
border: 1px solid #eaf0fa;
|
||||
border-radius: 10px;
|
||||
padding: 10px 12px;
|
||||
|
||||
span {
|
||||
display: block;
|
||||
font-size: 11px;
|
||||
color: #94a3b8;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-size: 12.5px;
|
||||
font-weight: 600;
|
||||
color: #1e293b;
|
||||
}
|
||||
}
|
||||
|
||||
.meter {
|
||||
margin-top: 20px;
|
||||
|
||||
&__head {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
&__label {
|
||||
font-size: 12px;
|
||||
color: #64748b;
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
|
||||
&__value {
|
||||
font-size: 28px;
|
||||
font-weight: 650;
|
||||
letter-spacing: -0.02em;
|
||||
color: #2563eb;
|
||||
font-variant-numeric: tabular-nums;
|
||||
|
||||
i {
|
||||
font-style: normal;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: #64748b;
|
||||
margin-left: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
&__rail {
|
||||
position: relative;
|
||||
height: 16px;
|
||||
margin: 52px 0 0;
|
||||
border-radius: 999px;
|
||||
background: #e8eefb;
|
||||
box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
|
||||
}
|
||||
|
||||
&__fill {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
border-radius: inherit;
|
||||
background: linear-gradient(90deg, #60a5fa, #2563eb);
|
||||
overflow: hidden;
|
||||
transition: width 0.25s linear;
|
||||
}
|
||||
|
||||
&__stripes {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background-image: repeating-linear-gradient(
|
||||
45deg,
|
||||
rgba(255, 255, 255, 0.32) 0 6px,
|
||||
rgba(255, 255, 255, 0) 6px 14px
|
||||
);
|
||||
background-size: 20px 20px;
|
||||
animation: b-stripes 0.8s linear infinite;
|
||||
}
|
||||
|
||||
&__runner {
|
||||
position: absolute;
|
||||
bottom: -2px;
|
||||
transform: translateX(-58%);
|
||||
transition: left 0.25s linear;
|
||||
pointer-events: none;
|
||||
filter: drop-shadow(0 6px 10px rgba(15, 23, 42, 0.34));
|
||||
}
|
||||
|
||||
&__foot {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 14px;
|
||||
font-size: 11.5px;
|
||||
color: #64748b;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
}
|
||||
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 1px;
|
||||
margin-top: 18px;
|
||||
background: #e8eef7;
|
||||
border: 1px solid #e8eef7;
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.cell {
|
||||
background: #fff;
|
||||
padding: 12px 14px;
|
||||
|
||||
span {
|
||||
display: block;
|
||||
font-size: 11px;
|
||||
color: #94a3b8;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-size: 17px;
|
||||
font-weight: 650;
|
||||
color: #0f172a;
|
||||
font-variant-numeric: tabular-nums;
|
||||
|
||||
em {
|
||||
font-style: normal;
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
color: #94a3b8;
|
||||
margin-left: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes b-blink {
|
||||
0%,
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
50% {
|
||||
opacity: 0.3;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes b-stripes {
|
||||
from {
|
||||
background-position: 0 0;
|
||||
}
|
||||
to {
|
||||
background-position: 20px 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,261 +0,0 @@
|
||||
<template>
|
||||
<div class="dialog-c">
|
||||
<header class="dialog-c__head">
|
||||
<div>
|
||||
<h3>波次策略快速扫描</h3>
|
||||
<p>任务 #W202610180931 · 深圳保税仓</p>
|
||||
</div>
|
||||
<div class="dialog-c__count">
|
||||
{{ percent }}<span>%</span>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="dialog-c__form">
|
||||
<div class="c-field">
|
||||
<span>波次策略</span>
|
||||
<strong>三单波次 · 自动</strong>
|
||||
</div>
|
||||
<div class="c-field">
|
||||
<span>订单范围</span>
|
||||
<strong>全部待处理</strong>
|
||||
</div>
|
||||
<div class="c-field c-field--muted">
|
||||
<span>并发</span>
|
||||
<strong>8 线程</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="track">
|
||||
<div class="track__rail">
|
||||
<div class="track__fill" :style="{ width: `${progress}%` }"></div>
|
||||
<span
|
||||
v-for="node in nodes"
|
||||
:key="node.label"
|
||||
class="track__node"
|
||||
:class="{ 'is-done': progress >= node.at }"
|
||||
:style="{ left: `${node.at}%` }"
|
||||
></span>
|
||||
<div class="track__runner" :style="{ left: `${runnerLeft}%` }">
|
||||
<CheetahRunner
|
||||
mode="line"
|
||||
:running="running && progress < 100"
|
||||
:width="104"
|
||||
:speed="1.25"
|
||||
color="#2563eb"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="track__stages">
|
||||
<span
|
||||
v-for="(node, index) in nodes"
|
||||
:key="node.label"
|
||||
:class="{ 'is-done': progress >= node.at, 'is-active': stageIndex === index }"
|
||||
>
|
||||
{{ node.label }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="dialog-c__foot">
|
||||
<span>已处理 {{ processed.toLocaleString() }} / {{ total.toLocaleString() }}</span>
|
||||
<span v-if="percent < 100">剩余约 {{ eta }} 秒</span>
|
||||
<span v-else class="is-done">正在生成扫描报告</span>
|
||||
</footer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import CheetahRunner from './CheetahRunner.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
progress: number
|
||||
running: boolean
|
||||
}>()
|
||||
|
||||
const nodes = [
|
||||
{ label: '提交任务', at: 0 },
|
||||
{ label: '拉取订单', at: 20 },
|
||||
{ label: '策略匹配', at: 50 },
|
||||
{ label: '结果汇总', at: 80 },
|
||||
{ label: '完成', at: 100 }
|
||||
]
|
||||
|
||||
const percent = computed(() => Math.round(props.progress))
|
||||
const runnerLeft = computed(() => Math.min(94, Math.max(6, props.progress)))
|
||||
const stageIndex = computed(() => {
|
||||
let index = 0
|
||||
nodes.forEach((node, i) => {
|
||||
if (props.progress >= node.at) index = i
|
||||
})
|
||||
return index
|
||||
})
|
||||
|
||||
const total = 2040
|
||||
const processed = computed(() => Math.round((props.progress / 100) * total))
|
||||
const eta = computed(() => Math.max(0, Math.round(((100 - props.progress) / 100) * 12)))
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.dialog-c {
|
||||
background: #fff;
|
||||
border: 1px solid #e8eef7;
|
||||
border-radius: 16px;
|
||||
padding: 22px 24px 20px;
|
||||
box-shadow: 0 24px 48px -32px rgba(15, 23, 42, 0.32);
|
||||
color: #0f172a;
|
||||
|
||||
&__head {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
|
||||
h3 {
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 5px 0 0;
|
||||
font-size: 11.5px;
|
||||
color: #94a3b8;
|
||||
font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
|
||||
}
|
||||
}
|
||||
|
||||
&__count {
|
||||
font-size: 26px;
|
||||
line-height: 1;
|
||||
font-weight: 650;
|
||||
color: #1d4ed8;
|
||||
font-variant-numeric: tabular-nums;
|
||||
|
||||
span {
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
color: #94a3b8;
|
||||
margin-left: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
&__form {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 10px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
&__foot {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 22px;
|
||||
font-size: 11.5px;
|
||||
color: #64748b;
|
||||
font-variant-numeric: tabular-nums;
|
||||
|
||||
.is-done {
|
||||
color: #2563eb;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.c-field {
|
||||
padding: 10px 12px;
|
||||
border-radius: 10px;
|
||||
background: #f7faff;
|
||||
border: 1px solid #eaf0fa;
|
||||
|
||||
span {
|
||||
display: block;
|
||||
font-size: 10.5px;
|
||||
color: #94a3b8;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-size: 12.5px;
|
||||
font-weight: 600;
|
||||
color: #1e293b;
|
||||
}
|
||||
|
||||
&--muted {
|
||||
background: transparent;
|
||||
border-style: dashed;
|
||||
|
||||
strong {
|
||||
color: #475569;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.track {
|
||||
margin-top: 24px;
|
||||
|
||||
&__rail {
|
||||
position: relative;
|
||||
height: 4px;
|
||||
margin: 46px 6px 0;
|
||||
border-radius: 999px;
|
||||
background: #e9eef7;
|
||||
}
|
||||
|
||||
&__fill {
|
||||
height: 100%;
|
||||
border-radius: inherit;
|
||||
background: linear-gradient(90deg, #93c5fd, #2563eb);
|
||||
transition: width 0.25s linear;
|
||||
}
|
||||
|
||||
&__node {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
border-radius: 50%;
|
||||
background: #fff;
|
||||
border: 2px solid #cbd5e1;
|
||||
transform: translate(-50%, -50%);
|
||||
transition: all 0.25s ease;
|
||||
|
||||
&.is-done {
|
||||
border-color: #2563eb;
|
||||
background: #2563eb;
|
||||
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
|
||||
}
|
||||
}
|
||||
|
||||
&__runner {
|
||||
position: absolute;
|
||||
bottom: -6px;
|
||||
transform: translateX(-58%);
|
||||
transition: left 0.25s linear;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
&__stages {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin: 16px -6px 0;
|
||||
|
||||
span {
|
||||
font-size: 10.5px;
|
||||
color: #94a3b8;
|
||||
letter-spacing: 0.02em;
|
||||
transition: color 0.2s ease;
|
||||
|
||||
&.is-done {
|
||||
color: #3b82f6;
|
||||
}
|
||||
|
||||
&.is-active {
|
||||
color: #1d4ed8;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,400 +0,0 @@
|
||||
<template>
|
||||
<div class="dialog-d">
|
||||
<header class="dialog-d__head">
|
||||
<span class="dialog-d__icon">
|
||||
<svg viewBox="0 0 24 24" fill="none">
|
||||
<path d="M12 3v4M12 17v4M3 12h4M17 12h4" stroke="currentColor" stroke-width="2" stroke-linecap="round" />
|
||||
<circle cx="12" cy="12" r="4.2" stroke="currentColor" stroke-width="2" />
|
||||
</svg>
|
||||
</span>
|
||||
<div class="dialog-d__titles">
|
||||
<h3>波次策略快速扫描</h3>
|
||||
<p>系统正在后台处理,可最小化窗口</p>
|
||||
</div>
|
||||
<button class="dialog-d__close" type="button" aria-label="关闭">
|
||||
<svg viewBox="0 0 12 12" fill="none">
|
||||
<path d="M1 1L11 11M11 1L1 11" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" />
|
||||
</svg>
|
||||
</button>
|
||||
</header>
|
||||
|
||||
<div class="dialog-d__body">
|
||||
<div class="form">
|
||||
<div class="form__field">
|
||||
<span>仓库</span>
|
||||
<div class="form__input">深圳保税仓</div>
|
||||
</div>
|
||||
<div class="form__field">
|
||||
<span>波次策略</span>
|
||||
<div class="form__input">三单波次 · 自动</div>
|
||||
</div>
|
||||
<div class="form__field">
|
||||
<span>订单范围</span>
|
||||
<div class="form__input">全部待处理(2,040 单)</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel__top">
|
||||
<div class="panel__percent">{{ percent }}<span>%</span></div>
|
||||
<div class="panel__status">
|
||||
<strong>{{ statusText }}</strong>
|
||||
<span>已处理 {{ processed.toLocaleString() }} / {{ total.toLocaleString() }} 单</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-rail">
|
||||
<div class="d-rail__track">
|
||||
<div class="d-rail__fill" :style="{ width: `${progress}%` }"></div>
|
||||
</div>
|
||||
<div class="d-rail__runner" :style="{ left: `${runnerLeft}%` }">
|
||||
<CheetahRunner
|
||||
mode="ghost"
|
||||
:running="running && progress < 100"
|
||||
:width="110"
|
||||
:speed="1"
|
||||
color="#1d4ed8"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel__stats">
|
||||
<div>
|
||||
<span>匹配</span>
|
||||
<b>{{ matched.toLocaleString() }}</b>
|
||||
</div>
|
||||
<div>
|
||||
<span>未匹配</span>
|
||||
<b>{{ unmatched.toLocaleString() }}</b>
|
||||
</div>
|
||||
<div>
|
||||
<span>预计剩余</span>
|
||||
<b>{{ eta }}<em>s</em></b>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="dialog-d__foot">
|
||||
<span class="hint">
|
||||
<svg viewBox="0 0 14 14" fill="none">
|
||||
<rect x="2.2" y="6" width="9.6" height="6" rx="1.6" stroke="currentColor" stroke-width="1.2" />
|
||||
<path d="M4.6 6V4.4a2.4 2.4 0 014.8 0V6" stroke="currentColor" stroke-width="1.2" />
|
||||
</svg>
|
||||
扫描期间请勿关闭窗口
|
||||
</span>
|
||||
<div class="actions">
|
||||
<button class="btn btn--ghost" type="button">后台运行</button>
|
||||
<button class="btn btn--primary" type="button">{{ percent >= 100 ? '完成' : '暂停扫描' }}</button>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import CheetahRunner from './CheetahRunner.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
progress: number
|
||||
running: boolean
|
||||
}>()
|
||||
|
||||
const percent = computed(() => Math.round(props.progress))
|
||||
const runnerLeft = computed(() => Math.min(92, Math.max(8, props.progress)))
|
||||
|
||||
const total = 2040
|
||||
const processed = computed(() => Math.round((props.progress / 100) * total))
|
||||
const matched = computed(() => Math.round(processed.value * 0.86))
|
||||
const unmatched = computed(() => processed.value - matched.value)
|
||||
const eta = computed(() => Math.max(0, Math.round(((100 - props.progress) / 100) * 13)))
|
||||
|
||||
const statusText = computed(() => {
|
||||
if (props.progress >= 100) return '扫描完成'
|
||||
if (props.running) return '正在匹配波次策略…'
|
||||
return '任务已暂停'
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.dialog-d {
|
||||
background: #fff;
|
||||
border: 1px solid #e8eef7;
|
||||
border-radius: 16px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 24px 48px -32px rgba(15, 23, 42, 0.4);
|
||||
color: #0f172a;
|
||||
|
||||
&__head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 18px 22px;
|
||||
border-bottom: 1px solid #eef3fa;
|
||||
}
|
||||
|
||||
&__icon {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
flex: none;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 10px;
|
||||
background: #eff6ff;
|
||||
color: #2563eb;
|
||||
|
||||
svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
&__titles {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
|
||||
h3 {
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 3px 0 0;
|
||||
font-size: 11.5px;
|
||||
color: #94a3b8;
|
||||
}
|
||||
}
|
||||
|
||||
&__close {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
flex: none;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
background: transparent;
|
||||
color: #94a3b8;
|
||||
cursor: pointer;
|
||||
transition: all 0.16s ease;
|
||||
|
||||
svg {
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: #f1f5f9;
|
||||
color: #475569;
|
||||
}
|
||||
}
|
||||
|
||||
&__body {
|
||||
padding: 20px 22px 4px;
|
||||
}
|
||||
|
||||
&__foot {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 16px 22px 18px;
|
||||
border-top: 1px solid #eef3fa;
|
||||
background: #fbfdff;
|
||||
}
|
||||
}
|
||||
|
||||
.form {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 12px;
|
||||
|
||||
&__field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
|
||||
> span {
|
||||
font-size: 11px;
|
||||
color: #94a3b8;
|
||||
}
|
||||
}
|
||||
|
||||
&__input {
|
||||
height: 36px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 11px;
|
||||
border: 1px solid #e6ecf5;
|
||||
border-radius: 9px;
|
||||
background: #fff;
|
||||
font-size: 12.5px;
|
||||
color: #1e293b;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
.panel {
|
||||
margin-top: 18px;
|
||||
padding: 16px 18px 14px;
|
||||
border: 1px solid #dce8fb;
|
||||
border-radius: 14px;
|
||||
background: linear-gradient(160deg, #f6faff 0%, #eef4ff 100%);
|
||||
|
||||
&__top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
&__percent {
|
||||
font-size: 34px;
|
||||
line-height: 1;
|
||||
font-weight: 650;
|
||||
letter-spacing: -0.03em;
|
||||
color: #1d4ed8;
|
||||
font-variant-numeric: tabular-nums;
|
||||
|
||||
span {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: #64748b;
|
||||
margin-left: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
&__status {
|
||||
text-align: right;
|
||||
|
||||
strong {
|
||||
display: block;
|
||||
font-size: 12.5px;
|
||||
font-weight: 600;
|
||||
color: #1e293b;
|
||||
}
|
||||
|
||||
span {
|
||||
display: block;
|
||||
margin-top: 4px;
|
||||
font-size: 11px;
|
||||
color: #64748b;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
}
|
||||
|
||||
&__stats {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
margin-top: 16px;
|
||||
padding-top: 12px;
|
||||
border-top: 1px dashed #d8e4f7;
|
||||
|
||||
> div {
|
||||
span {
|
||||
display: block;
|
||||
font-size: 10.5px;
|
||||
color: #94a3b8;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
b {
|
||||
font-size: 15px;
|
||||
font-weight: 650;
|
||||
color: #1e293b;
|
||||
font-variant-numeric: tabular-nums;
|
||||
|
||||
em {
|
||||
font-style: normal;
|
||||
font-size: 10.5px;
|
||||
font-weight: 500;
|
||||
color: #94a3b8;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.d-rail {
|
||||
position: relative;
|
||||
height: 6px;
|
||||
margin: 52px 0 0;
|
||||
|
||||
&__track {
|
||||
height: 6px;
|
||||
border-radius: 999px;
|
||||
background: #dbe6f8;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
&__fill {
|
||||
height: 100%;
|
||||
border-radius: inherit;
|
||||
background: linear-gradient(90deg, #93c5fd, #2563eb);
|
||||
transition: width 0.25s linear;
|
||||
}
|
||||
|
||||
&__runner {
|
||||
position: absolute;
|
||||
bottom: -4px;
|
||||
transform: translateX(-58%);
|
||||
transition: left 0.25s linear;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
.hint {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 11px;
|
||||
color: #94a3b8;
|
||||
|
||||
svg {
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
.actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
height: 34px;
|
||||
padding: 0 16px;
|
||||
border-radius: 9px;
|
||||
font-size: 12.5px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: all 0.16s ease;
|
||||
border: 1px solid transparent;
|
||||
|
||||
&--ghost {
|
||||
background: #fff;
|
||||
border-color: #dbe4f0;
|
||||
color: #475569;
|
||||
|
||||
&:hover {
|
||||
border-color: #bfd4ef;
|
||||
color: #1e293b;
|
||||
}
|
||||
}
|
||||
|
||||
&--primary {
|
||||
background: linear-gradient(135deg, #3b82f6, #2563eb);
|
||||
color: #fff;
|
||||
box-shadow: 0 8px 16px -10px rgba(37, 99, 235, 0.9);
|
||||
|
||||
&:hover {
|
||||
filter: brightness(1.05);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user