From 10c746c4f9aeea42d0aa29253995078cd99bcc64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B4=8B=E5=B7=9D?= <604737071@qq.com> Date: Thu, 11 Apr 2024 18:04:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E6=9D=83=E9=99=90?= =?UTF-8?q?=EF=BC=8C=E8=B7=AF=E7=94=B1=E4=BB=A3=E7=A0=81=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=AF=B9=E5=BA=94=E6=A8=A1=E5=9D=97=E7=9A=84=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E8=B7=B3=E8=BD=AC=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf-ui/src/api/FDS/installList.js | 44 ++++++++ sf-ui/src/router/index.js | 103 ++++++++++++++++++ sf-ui/src/store/modules/permission.js | 9 +- sf-ui/src/views/FDS/installationList/add.vue | 39 +++---- .../src/views/FDS/installationList/detail.vue | 34 ++++-- .../src/views/FDS/installationList/index.vue | 63 ++++------- sf-ui/src/views/FDS/publishList/index.vue | 19 ++-- .../views/FDS/whiteListManagement/index.vue | 26 ++--- sf-ui/src/views/deploy/INFO/add.vue | 98 ++++++++--------- sf-ui/src/views/deploy/INFO/index.vue | 15 +-- 10 files changed, 284 insertions(+), 166 deletions(-) create mode 100644 sf-ui/src/api/FDS/installList.js diff --git a/sf-ui/src/api/FDS/installList.js b/sf-ui/src/api/FDS/installList.js new file mode 100644 index 0000000..b544121 --- /dev/null +++ b/sf-ui/src/api/FDS/installList.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询安装包管理(新)列表 +export function listINFO(query) { + return request({ + url: '/deploy/INFO/list', + method: 'get', + params: query + }) +} + +// 查询安装包管理(新)详细 +export function getINFO(id) { + return request({ + url: '/deploy/INFO/' + id, + method: 'get' + }) +} + +// 新增安装包管理(新) +export function addINFO(data) { + return request({ + url: '/deploy/INFO', + method: 'post', + data: data + }) +} + +// 修改安装包管理(新) +export function updateINFO(data) { + return request({ + url: '/deploy/INFO', + method: 'put', + data: data + }) +} + +// 删除安装包管理(新) +export function delINFO(id) { + return request({ + url: '/deploy/INFO/' + id, + method: 'delete' + }) +} diff --git a/sf-ui/src/router/index.js b/sf-ui/src/router/index.js index 95ad5da..1e0bcd9 100644 --- a/sf-ui/src/router/index.js +++ b/sf-ui/src/router/index.js @@ -160,7 +160,110 @@ export const dynamicRoutes = [ meta: { title: '修改生成配置', activeMenu: '/tool/gen' } } ] + }, + { + path: '/build/install', + component: Layout, + hidden: true, + permissions: ['build:install:add'], + children: [ + { + path: 'add', + component: () => import('@/views/FDS/installationList/add'), + name: 'InstallAdd', + meta: { title: '新增安装包', activeMenu: '/build/installationList' } + } + ] + }, + { + path: '/build/install', + component: Layout, + hidden: true, + permissions: ['build:install:detail'], + children: [ + { + path: 'detail', + component: () => import('@/views/FDS/installationList/detail'), + name: 'InstallDetail', + meta: { title: '安装包详情', activeMenu: '/build/installationList' } + } + ] + }, + + { + path: '/build/publishList', + component: Layout, + hidden: true, + permissions: ['build:publishList:add'], + children: [ + { + path: 'add', + component: () => import('@/views/FDS/publishList/add'), + name: 'PublishAdd', + meta: { title: '新增发布', activeMenu: '/build/publish' } + } + ] + }, + { + path: '/build/publishList', + component: Layout, + hidden: true, + permissions: ['build:publishList:detail'], + children: [ + { + path: 'detail', + component: () => import('@/views/FDS/publishList/detail'), + name: 'PublishDetail', + meta: { title: '发布详情', activeMenu: '/build/publish' } + } + ] + }, + + { + path: '/build/WhiteList', + component: Layout, + hidden: true, + permissions: ['build:WhiteList:add'], + children: [ + { + path: 'add', + component: () => import('@/views/FDS/whiteListManagement/add'), + name: 'WhiteListAdd', + meta: { title: '新增白名单', activeMenu: '/build/whiteList' } + } + ] + }, + + { + path: '/build/WhiteList', + component: Layout, + hidden: true, + permissions: ['build:WhiteList:detail'], + children: [ + { + path: 'detail', + component: () => import('@/views/FDS/whiteListManagement/detail'), + name: 'WhiteListDetail', + meta: { title: '白名单详情', activeMenu: '/build/whiteList' } + } + ] + }, + + { + path: '/build/WhiteList', + component: Layout, + hidden: true, + permissions: ['build:WhiteList:addConfig'], + children: [ + { + path: 'addConfig', + component: () => import('@/views/FDS/whiteListManagement/addConfig'), + name: 'WhiteListAdd', + meta: { title: '新增白名单配置', activeMenu: '/build/whiteList' } + } + ] } + ] // 防止连续点击多次路由报错 diff --git a/sf-ui/src/store/modules/permission.js b/sf-ui/src/store/modules/permission.js index e3ce028..95d0163 100644 --- a/sf-ui/src/store/modules/permission.js +++ b/sf-ui/src/store/modules/permission.js @@ -26,7 +26,7 @@ const permission = { }, SET_SIDEBAR_ROUTERS: (state, routes) => { state.sidebarRouters = routes - }, + } }, actions: { // 生成路由 @@ -38,9 +38,12 @@ const permission = { const rdata = JSON.parse(JSON.stringify(res.data)) const sidebarRoutes = filterAsyncRouter(sdata) const rewriteRoutes = filterAsyncRouter(rdata, false, true) - const asyncRoutes = filterDynamicRoutes(dynamicRoutes); + const asyncRoutes = filterDynamicRoutes(dynamicRoutes) + console.log(asyncRoutes) + console.log(dynamicRoutes) + rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true }) - router.addRoutes(asyncRoutes); + router.addRoutes(asyncRoutes) commit('SET_ROUTES', rewriteRoutes) commit('SET_SIDEBAR_ROUTERS', constantRoutes.concat(sidebarRoutes)) commit('SET_DEFAULT_ROUTES', sidebarRoutes) diff --git a/sf-ui/src/views/FDS/installationList/add.vue b/sf-ui/src/views/FDS/installationList/add.vue index 95b9c9c..5fb726f 100644 --- a/sf-ui/src/views/FDS/installationList/add.vue +++ b/sf-ui/src/views/FDS/installationList/add.vue @@ -63,16 +63,13 @@ - - - -