feat: 系统功能更新 - 添加错误统计、数据初始化、订单调度等功能
This commit is contained in:
@@ -33,14 +33,17 @@
|
||||
<div class="nav-item" @click="goToTextToVideo">
|
||||
<el-icon><VideoPlay /></el-icon>
|
||||
<span>{{ t('works.textToVideo') }}</span>
|
||||
<span class="badge-pro">Pro</span>
|
||||
</div>
|
||||
<div class="nav-item" @click="goToImageToVideo">
|
||||
<el-icon><Picture /></el-icon>
|
||||
<span>{{ t('works.imageToVideo') }}</span>
|
||||
<span class="badge-pro">Pro</span>
|
||||
</div>
|
||||
<div class="nav-item" @click="goToStoryboardVideo">
|
||||
<el-icon><Film /></el-icon>
|
||||
<span>{{ t('works.storyboardVideo') }}</span>
|
||||
<span class="badge-max">Max</span>
|
||||
</div>
|
||||
</nav>
|
||||
</aside>
|
||||
@@ -122,10 +125,10 @@
|
||||
size="small"
|
||||
clearable
|
||||
style="width: 220px"
|
||||
@keyup.enter.native="reload"
|
||||
@keyup.enter.native="doSearch"
|
||||
>
|
||||
<template #prefix>
|
||||
<el-icon><Search /></el-icon>
|
||||
<el-icon class="search-icon" @click="doSearch"><Search /></el-icon>
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
@@ -405,6 +408,10 @@
|
||||
<el-icon><Setting /></el-icon>
|
||||
<span>{{ t('profile.systemSettings') }}</span>
|
||||
</div>
|
||||
<div class="menu-item" @click="goToErrorStats">
|
||||
<el-icon><Warning /></el-icon>
|
||||
<span>错误统计</span>
|
||||
</div>
|
||||
</template>
|
||||
<!-- 修改密码 -->
|
||||
<div class="menu-item" @click.stop="goToChangePassword" style="cursor: pointer;">
|
||||
@@ -424,7 +431,7 @@
|
||||
import { ref, onMounted, onActivated, computed, onUnmounted } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { Star, User, Compass, Document, VideoPlay, Picture, Film, Search, MoreFilled, Loading, ArrowUp, VideoCamera, Refresh, Delete, CopyDocument, Download, Close, Setting, Lock } from '@element-plus/icons-vue'
|
||||
import { Star, User, Compass, Document, VideoPlay, Picture, Film, Search, MoreFilled, Loading, ArrowUp, VideoCamera, Refresh, Delete, CopyDocument, Download, Close, Setting, Lock, Warning } from '@element-plus/icons-vue'
|
||||
import { getMyWorks, getWorkDetail, deleteWork, recordDownload, getWorkFileUrl } from '@/api/userWorks'
|
||||
import { getCurrentUser } from '@/api/auth'
|
||||
import { useUserStore } from '@/stores/user'
|
||||
@@ -471,6 +478,7 @@ const resolution = ref(null)
|
||||
const sortBy = ref(null)
|
||||
const order = ref('desc')
|
||||
const keyword = ref('')
|
||||
const searchKeyword = ref('')
|
||||
const multiSelect = ref(false)
|
||||
const selectedIds = ref(new Set())
|
||||
|
||||
@@ -584,6 +592,13 @@ const goToMembers = () => {
|
||||
}
|
||||
}
|
||||
|
||||
const goToErrorStats = () => {
|
||||
showUserMenu.value = false
|
||||
if (userStore.isAdmin) {
|
||||
router.push('/admin/error-statistics')
|
||||
}
|
||||
}
|
||||
|
||||
const goToSettings = () => {
|
||||
showUserMenu.value = false
|
||||
if (userStore.isAdmin) {
|
||||
@@ -763,9 +778,9 @@ const filteredItems = computed(() => {
|
||||
})
|
||||
}
|
||||
|
||||
// 按关键词筛选
|
||||
if (keyword.value) {
|
||||
const keywordLower = keyword.value.toLowerCase()
|
||||
// 按关键词筛选(只有点击搜索或回车后才生效)
|
||||
if (searchKeyword.value) {
|
||||
const keywordLower = searchKeyword.value.toLowerCase()
|
||||
filtered = filtered.filter(item =>
|
||||
item.title.toLowerCase().includes(keywordLower) ||
|
||||
item.id.includes(keywordLower)
|
||||
@@ -781,6 +796,11 @@ const reload = () => {
|
||||
loadList()
|
||||
}
|
||||
|
||||
// 执行搜索
|
||||
const doSearch = () => {
|
||||
searchKeyword.value = keyword.value
|
||||
}
|
||||
|
||||
// 筛选变化时的处理
|
||||
const onFilterChange = () => {
|
||||
// 筛选是响应式的,不需要额外处理
|
||||
@@ -985,11 +1005,19 @@ const createSimilar = (item) => {
|
||||
duration: item.duration || ''
|
||||
}
|
||||
|
||||
// 添加参考图(图生视频需要,分镜图的 cover 是生成结果不传递)
|
||||
// 分镜图的 cover 是生成的分镜图,不是用户上传的原始参考图
|
||||
if (item.category !== '分镜图' && item.cover && item.cover !== '/images/backgrounds/welcome.jpg') {
|
||||
query.referenceImage = item.cover
|
||||
}
|
||||
|
||||
console.log('[做同款] 跳转参数:', query, 'category:', item.category)
|
||||
|
||||
if (item.category === '文生视频') {
|
||||
router.push({ path: '/text-to-video/create', query })
|
||||
} else if (item.category === '图生视频') {
|
||||
router.push({ path: '/image-to-video/create', query })
|
||||
} else if (item.category === '分镜视频') {
|
||||
} else if (item.category === '分镜视频' || item.category === '分镜图') {
|
||||
router.push({ path: '/storyboard-video/create', query })
|
||||
} else {
|
||||
// 默认跳转到文生视频
|
||||
@@ -1274,6 +1302,7 @@ const resetFilters = () => {
|
||||
resolution.value = null
|
||||
sortBy.value = null
|
||||
keyword.value = ''
|
||||
searchKeyword.value = ''
|
||||
ElMessage.success(t('works.filtersReset'))
|
||||
}
|
||||
|
||||
@@ -1486,6 +1515,10 @@ const loadUserInfo = async () => {
|
||||
ElMessage.error(t('profile.loadUserInfoFailed'))
|
||||
}
|
||||
} catch (error) {
|
||||
// 401错误由axios拦截器处理,不重复提示
|
||||
if (error.response?.status === 401) {
|
||||
return
|
||||
}
|
||||
console.error('加载用户信息失败:', error)
|
||||
ElMessage.error(t('profile.loadUserInfoFailed') + ': ' + (error.message || '未知错误'))
|
||||
}
|
||||
@@ -1846,6 +1879,15 @@ onActivated(() => {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.search-icon {
|
||||
cursor: pointer;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
|
||||
.search-icon:hover {
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
/* 筛选行:下拉框与重置按钮统一样式 - 匹配设计稿 */
|
||||
.filters-bar :deep(.el-select__wrapper),
|
||||
.filters-bar :deep(.el-button) {
|
||||
@@ -2512,6 +2554,24 @@ onActivated(() => {
|
||||
background-color: #1a1a1a !important;
|
||||
border-color: #333 !important;
|
||||
}
|
||||
|
||||
/* Sora2.0 SVG 风格标签 */
|
||||
.badge-pro, .badge-max {
|
||||
font-size: 9px;
|
||||
padding: 0 3px;
|
||||
border-radius: 2px;
|
||||
font-weight: 500;
|
||||
margin-left: 6px;
|
||||
background: rgba(62, 163, 255, 0.2);
|
||||
color: #5AE0FF;
|
||||
flex: 0 0 auto !important;
|
||||
width: auto !important;
|
||||
}
|
||||
|
||||
.badge-max {
|
||||
background: rgba(255, 100, 150, 0.2);
|
||||
color: #FF7EB3;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- 非 scoped 样式用于 @keyframes 动画 -->
|
||||
|
||||
Reference in New Issue
Block a user