feat: 添加任务状态级联触发器,优化支付和做同款功能
主要更新: - 添加 MySQL 触发器实现 task_status 表到其他表的状态级联 - 移除控制器中的多表状态检查代码 - 完善做同款功能,支持参数传递 - 支付宝 USD 转 CNY 汇率转换 - 修复状态枚举映射问题 注意: 触发器仅在 task_status 更新时触发,部分代码仍直接更新业务表
This commit is contained in:
@@ -8,13 +8,19 @@
|
||||
</div>
|
||||
|
||||
<div class="progress-section" v-if="taskStatus">
|
||||
<div class="progress-bar">
|
||||
<!-- 排队中:不确定进度条 -->
|
||||
<div v-if="taskStatus.status === 'PENDING'" class="progress-bar indeterminate">
|
||||
<div class="progress-fill-indeterminate"></div>
|
||||
</div>
|
||||
<!-- 生成中:动态进度条 -->
|
||||
<div v-else class="progress-bar">
|
||||
<div
|
||||
class="progress-fill"
|
||||
class="progress-fill animated"
|
||||
:style="{ width: taskStatus.progress + '%' }"
|
||||
></div>
|
||||
</div>
|
||||
<div class="progress-text">{{ taskStatus.progress }}%</div>
|
||||
<div class="progress-text" v-if="taskStatus.status !== 'PENDING'">{{ taskStatus.progress }}%</div>
|
||||
<div class="progress-text" v-else>排队中...</div>
|
||||
</div>
|
||||
|
||||
<div class="task-info">
|
||||
@@ -283,6 +289,59 @@ onUnmounted(() => {
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg, #3b82f6, #1d4ed8);
|
||||
transition: width 0.3s ease;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* 动态进度条动画 */
|
||||
.progress-fill.animated {
|
||||
background: linear-gradient(90deg, #3b82f6, #60a5fa, #3b82f6);
|
||||
background-size: 200% 100%;
|
||||
animation: progress-gradient 2s ease infinite, progress-pulse 1.5s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.progress-fill.animated::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
|
||||
animation: progress-shine 1.5s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes progress-gradient {
|
||||
0% { background-position: 0% 50%; }
|
||||
50% { background-position: 100% 50%; }
|
||||
100% { background-position: 0% 50%; }
|
||||
}
|
||||
|
||||
@keyframes progress-pulse {
|
||||
0%, 100% { opacity: 1; }
|
||||
50% { opacity: 0.85; }
|
||||
}
|
||||
|
||||
@keyframes progress-shine {
|
||||
0% { transform: translateX(-100%); }
|
||||
100% { transform: translateX(100%); }
|
||||
}
|
||||
|
||||
/* 不确定进度条(排队中) */
|
||||
.progress-bar.indeterminate {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.progress-fill-indeterminate {
|
||||
width: 30%;
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg, transparent, #3b82f6, #60a5fa, #3b82f6, transparent);
|
||||
border-radius: 4px;
|
||||
animation: indeterminate-slide 1.5s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes indeterminate-slide {
|
||||
0% { transform: translateX(-100%); }
|
||||
100% { transform: translateX(400%); }
|
||||
}
|
||||
|
||||
.progress-text {
|
||||
|
||||
Reference in New Issue
Block a user