feat(web): 前端 SPA 化 + 工具页任务面板统一与历史批量删除
- SPA 化:22 个 MPA html 入口与 *-main.ts 合并为 index.html + vue-router(URL 无 .html 后缀), 页面跳转全部 router-link,/new_web_source/xxx.html 旧路径归一为 /xxx - 任务面板统一:共享 TaskCenterPanel/TaskItemCard/TaskStatCards/HistoryTaskLayer, 16 个工具页右侧统一为统计卡 + 当前任务 + 历史任务弹层(任务ID/开始/结束/状态必展示) - 历史记录支持单条删除 + 批量勾选删除(确认框/全选/失败提示) - Java 7 模块(dedupe/convert/split/productrisk/shopmatch/pricetrack/deletebrand) history 接口补齐任务时间字段(VO+Service,复用 biz_file_task 列) - 图片工作台/API 层(brand/permission/user)既有未提交改动一并提交
This commit is contained in:
@@ -0,0 +1,138 @@
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
|
||||
/**
|
||||
* 数富AI 桌面前端 SPA 路由(无 .html 后缀)
|
||||
*
|
||||
* 原 MPA(22 个 html 入口 + 22 个 *-main.ts)合并为单入口 index.html;
|
||||
* 页面组件懒加载(每个工具页独立 chunk),URL 统一为 /xxx 路径形式。
|
||||
*/
|
||||
|
||||
const routes = [
|
||||
{ path: '/', redirect: '/home' },
|
||||
{
|
||||
path: '/login',
|
||||
name: 'login',
|
||||
component: () => import('@/pages/login/DesktopLoginPage.vue'),
|
||||
},
|
||||
{
|
||||
path: '/home',
|
||||
name: 'home',
|
||||
component: () => import('@/pages/home/DesktopHomePage.vue'),
|
||||
},
|
||||
{
|
||||
path: '/amazon-console',
|
||||
name: 'amazon-console',
|
||||
component: () => import('@/pages/amazon/AmazonConsolePage.vue'),
|
||||
},
|
||||
{
|
||||
path: '/image',
|
||||
name: 'image',
|
||||
component: () => import('@/pages/image/ImageWorkbenchPage.vue'),
|
||||
},
|
||||
{
|
||||
path: '/image-video',
|
||||
name: 'image-video',
|
||||
// 视图切换走 ?view=delivery(菜单页 / 带货视频工作台)
|
||||
component: () => import('@/pages/image-video/ImageVideoPage.vue'),
|
||||
},
|
||||
// ---- 亚马逊运营工具(品牌工具,右侧统一任务面板)----
|
||||
{
|
||||
path: '/collect-data',
|
||||
name: 'collect-data',
|
||||
component: () => import('@/pages/brand/components/BrandCollectDataTab.vue'),
|
||||
},
|
||||
{
|
||||
path: '/variant-collection',
|
||||
name: 'variant-collection',
|
||||
component: () => import('@/pages/brand/components/BrandVariantTab.vue'),
|
||||
},
|
||||
{
|
||||
path: '/dedupe',
|
||||
name: 'dedupe',
|
||||
component: () => import('@/pages/brand/components/BrandDedupeTab.vue'),
|
||||
},
|
||||
{
|
||||
path: '/similar-asin',
|
||||
name: 'similar-asin',
|
||||
component: () => import('@/pages/brand/components/BrandSimilarAsinTab.vue'),
|
||||
},
|
||||
{
|
||||
path: '/brand',
|
||||
name: 'brand',
|
||||
component: () => import('@/pages/brand/components/BrandBrandTab.vue'),
|
||||
},
|
||||
{
|
||||
path: '/appearance-patent',
|
||||
name: 'appearance-patent',
|
||||
component: () => import('@/pages/brand/components/BrandAppearancePatentTab.vue'),
|
||||
},
|
||||
{
|
||||
path: '/split',
|
||||
name: 'split',
|
||||
component: () => import('@/pages/brand/components/BrandSplitTab.vue'),
|
||||
},
|
||||
{
|
||||
path: '/convert',
|
||||
name: 'convert',
|
||||
component: () => import('@/pages/brand/components/BrandConvertTab.vue'),
|
||||
},
|
||||
{
|
||||
path: '/publish',
|
||||
name: 'publish',
|
||||
component: () => import('@/pages/brand/components/BrandPublishTab.vue'),
|
||||
},
|
||||
{
|
||||
path: '/delete-brand',
|
||||
name: 'delete-brand',
|
||||
component: () => import('@/pages/brand/components/BrandDeleteBrandTab.vue'),
|
||||
},
|
||||
{
|
||||
path: '/product-risk',
|
||||
name: 'product-risk',
|
||||
component: () => import('@/pages/brand/components/BrandProductRiskTab.vue'),
|
||||
},
|
||||
{
|
||||
path: '/shop-match',
|
||||
name: 'shop-match',
|
||||
component: () => import('@/pages/brand/components/BrandShopMatchTab.vue'),
|
||||
},
|
||||
{
|
||||
path: '/price-track',
|
||||
name: 'price-track',
|
||||
component: () => import('@/pages/brand/components/BrandPriceTrackTab.vue'),
|
||||
},
|
||||
{
|
||||
path: '/patrol-delete',
|
||||
name: 'patrol-delete',
|
||||
component: () => import('@/pages/brand/components/BrandPatrolDeleteTab.vue'),
|
||||
},
|
||||
{
|
||||
path: '/query-asin',
|
||||
name: 'query-asin',
|
||||
component: () => import('@/pages/brand/components/BrandQueryAsinTab.vue'),
|
||||
},
|
||||
{
|
||||
path: '/shop-data-crawl',
|
||||
name: 'shop-data-crawl',
|
||||
component: () => import('@/pages/brand/components/BrandShopDataCrawlTab.vue'),
|
||||
},
|
||||
{
|
||||
path: '/withdraw',
|
||||
name: 'withdraw',
|
||||
component: () => import('@/pages/brand/components/BrandWithdrawTab.vue'),
|
||||
},
|
||||
// ---- 兜底:未匹配路径回首页(保持与 MPA 时代"未知页 404 后回首页"一致体验)----
|
||||
{ path: '/:pathMatch(.*)*', redirect: '/home' },
|
||||
]
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
routes,
|
||||
scrollBehavior(to, _from, savedPosition) {
|
||||
// 返回工具台的 #group-xxx 锚点由组件 onMounted 处理;普通滚动回顶部
|
||||
if (savedPosition) return savedPosition
|
||||
return { top: 0 }
|
||||
},
|
||||
})
|
||||
|
||||
export default router
|
||||
Reference in New Issue
Block a user