diff --git a/index.html b/index.html
index 0fe90c2..d77b76c 100644
--- a/index.html
+++ b/index.html
@@ -4,9 +4,14 @@
-
diff --git a/public/css/v2.css b/public/css/v2.css
new file mode 100644
index 0000000..1403675
--- /dev/null
+++ b/public/css/v2.css
@@ -0,0 +1,38 @@
+#app .el-header{
+ background: #3894FF;
+ color: #fff;
+ height: 84px;
+}
+#app .el-header *{
+ color: #fff !important;
+}
+#app .el-header .logo-title-small{
+ color: #003F88 !important;
+ text-shadow: 1px 1px 1px #ffffff;
+}
+
+#app .el-aside{
+ background-color: #98C3F5;
+}
+#app .el-aside .el-menu{
+ background-color: transparent;
+}
+#app .el-aside .el-menu .el-menu-item{
+ color: #fff;
+}
+
+#app .el-aside .el-menu .el-menu-item:hover{
+ color: #fff;
+ background-color:#3894FF88;
+}
+#app .el-aside .el-menu .el-sub-menu__title{
+ color: #fff;
+}
+#app .el-aside .el-menu .router-link-active .el-menu-item{
+ background-color: #3894FF;
+ color: #333;
+ border-right-color: #fff;
+}
+use[aria-labelledby="icon-web"] path{
+ fill:red !important;
+}
\ No newline at end of file
diff --git a/src/api/menu/index.ts b/src/api/menu/index.ts
index 2e0d562..0833e47 100644
--- a/src/api/menu/index.ts
+++ b/src/api/menu/index.ts
@@ -5,7 +5,7 @@ class MenuAPI {
/**
* 获取路由列表
*/
- static getRoutes() {
+ static getRoutes() {
return new Promise((resolve) => {
resolve([
{
@@ -615,6 +615,410 @@ class MenuAPI {
});*/
}
+ static getRoutesV2() {
+ return new Promise((resolve) => {
+ resolve([
+ {
+ path: "/modelMgr",
+ component: "Layout",
+ redirect: "/modelMgr/index",
+ name: "/modelMgr",
+ meta: {
+ title: "算法分割管理",
+ icon: "split",
+ hidden: false,
+ roles: ["GUEST", "ADMIN", "ADMIN6"],
+ alwaysShow: false,
+ },
+ children: [
+ {
+ path: "index",
+ component: "model/index",
+ name: "modelIndex",
+ meta: {
+ title: "模型管理",
+ icon: "user",
+ hidden: true,
+ roles: ["ADMIN", "GUEST"],
+ keepAlive: true,
+ alwaysShow: false,
+ },
+ },
+ {
+ path: "uploadModel",
+ component: "model/uploadModel",
+ name: "uploadModel",
+ meta: {
+ title: "上传模型",
+ icon: "user",
+ hidden: true,
+ roles: ["ADMIN", "GUEST"],
+ keepAlive: true,
+ alwaysShow: false,
+ },
+ },
+ {
+ path: "modelDetail",
+ component: "model/modelDetail",
+ name: "modelDetail",
+ meta: {
+ title: "模型详情",
+ icon: "user",
+ hidden: true,
+ roles: ["ADMIN", "GUEST"],
+ keepAlive: true,
+ alwaysShow: false,
+ },
+ },
+ ],
+ },
+ {
+ path: "/connection",
+ component: "Layout",
+ redirect: "/connection/index",
+ name: "/connection",
+ meta: {
+ title: "互联协议管理",
+ icon: "web",
+ hidden: false,
+ roles: ["GUEST", "ADMIN", "ADMIN6"],
+ alwaysShow: false,
+ },
+ children: [
+ {
+ path: "index",
+ component: "connection/index",
+ name: "connectionIndex",
+ meta: {
+ title: "互联协议",
+ icon: "user",
+ hidden: true,
+ roles: ["ADMIN", "GUEST"],
+ keepAlive: true,
+ alwaysShow: false,
+ },
+ },
+ {
+ path: "edit",
+ component: "connection/edit",
+ name: "connectionEdit",
+ meta: {
+ title: "互联协议修改",
+ icon: "user",
+ hidden: true,
+ roles: ["ADMIN", "GUEST"],
+ keepAlive: true,
+ alwaysShow: false,
+ },
+ },
+ {
+ path: "detail",
+ component: "connection/detail",
+ name: "connectionDetail",
+ meta: {
+ title: "互联协议详情",
+ icon: "user",
+ hidden: true,
+ roles: ["ADMIN", "GUEST"],
+ keepAlive: true,
+ alwaysShow: false,
+ },
+ },
+ ],
+ },
+ {
+ path: "/simulationEvaluation",
+ component: "Layout",
+ redirect: "/simulationEvaluation/index",
+ name: "/simulationEvaluation",
+ meta: {
+ title: "仿真评估",
+ icon: "simu",
+ hidden: false,
+ roles: ["GUEST", "ADMIN", "ADMIN6"],
+ alwaysShow: false,
+ },
+ children: [
+ {
+ path: "index",
+ component: "simulationEvaluation/index",
+ name: "simulationEvaluationIndex",
+ meta: {
+ title: "编译部署",
+ icon: "user",
+ hidden: true,
+ roles: ["ADMIN", "GUEST"],
+ keepAlive: true,
+ alwaysShow: false,
+ },
+ },
+ {
+ path: "reportList",
+ component: "simulationEvaluation/reportList",
+ name: "simulationEvaluationReportList",
+ meta: {
+ title: "评估报告",
+ icon: "user",
+ hidden: false,
+ roles: ["ADMIN", "GUEST"],
+ keepAlive: true,
+ alwaysShow: false,
+ },
+ },
+ {
+ path: "addReport",
+ component: "simulationEvaluation/addReport",
+ name: "simulationEvaluationAddReport",
+ meta: {
+ title: "新建评估报告",
+ icon: "user",
+ hidden: true,
+ roles: ["ADMIN", "GUEST"],
+ keepAlive: true,
+ alwaysShow: false,
+ },
+ },
+ {
+ path: "reportDesc",
+ component: "simulationEvaluation/reportDesc",
+ name: "simulationEvaluationReportDesc",
+ meta: {
+ title: "评估报告详情",
+ icon: "user",
+ hidden: true,
+ roles: ["ADMIN", "GUEST"],
+ keepAlive: true,
+ alwaysShow: false,
+ },
+ },
+ {
+ path: "addTask",
+ component: "simulationEvaluation/addTask",
+ name: "simulationEvaluationAddTask",
+ meta: {
+ title: "新建推理任务",
+ icon: "oper",
+ hidden: false,
+ roles: ["ADMIN", "GUEST"],
+ keepAlive: true,
+ alwaysShow: false,
+ },
+ },
+ {
+ path: "execution",
+ component: "simulationEvaluation/execution",
+ name: "simulationEvaluationExecution",
+ meta: {
+ title: "执行中任务",
+ icon: "oper",
+ hidden: false,
+ roles: ["ADMIN6", "GUEST", "ADMIN"],
+ keepAlive: true,
+ alwaysShow: false,
+ },
+ },
+ {
+ path: "hisTaskList",
+ component: "simulationEvaluation/hisTaskList",
+ name: "simulationEvaluationHisTaskList",
+ meta: {
+ title: "历史任务列表",
+ icon: "oper",
+ hidden: false,
+ roles: ["ADMIN6", "GUEST", "ADMIN"],
+ keepAlive: true,
+ alwaysShow: false,
+ },
+ },
+ ],
+ },
+
+ {
+ path: "/dataMgr",
+ component: "Layout",
+ redirect: "/dataMgr/datas",
+ name: "/dataMgr",
+ meta: {
+ title: "数据集管理",
+ icon: "dict",
+ hidden: false,
+ roles: ["GUEST", "ADMIN", "ADMIN6"],
+ alwaysShow: false,
+ },
+ children: [
+ {
+ path: "datas",
+ component: "manage/datas/index",
+ name: "datas",
+ meta: {
+ title: "数据集管理",
+ icon: "dict",
+ hidden: false,
+ roles: ["ADMIN", "GUEST"],
+ keepAlive: true,
+ alwaysShow: false,
+ },
+ },
+ {
+ path: "datasAdd",
+ component: "manage/datas/add",
+ name: "datasAdd",
+ meta: {
+ title: "数据集新增",
+ hidden: true,
+ roles: ["ADMIN6", "GUEST", "ADMIN"],
+ keepAlive: true,
+ alwaysShow: false,
+ },
+ },
+ {
+ path: "datasEdit",
+ component: "manage/datas/edit",
+ name: "datasEdit",
+ meta: {
+ title: "数据集编辑",
+ hidden: true,
+ roles: ["ADMIN6", "GUEST", "ADMIN"],
+ keepAlive: true,
+ alwaysShow: false,
+ },
+ },
+ ],
+ },
+ {
+ path: "/tester",
+ component: "Layout",
+ redirect: "/tester/index",
+ name: "/tester",
+ meta: {
+ title: "算法测试仪管理",
+ icon: "test",
+ hidden: false,
+ roles: ["GUEST", "ADMIN", "ADMIN6"],
+ alwaysShow: false,
+ },
+ children: [
+ {
+ path: "equipment",
+ component: "manage/equipment/index",
+ name: "equipment",
+ meta: {
+ title: "计算设备管理",
+ icon: "setting",
+ hidden: false,
+ roles: ["ADMIN", "GUEST"],
+ keepAlive: true,
+ alwaysShow: false,
+ },
+ },
+ {
+ path: "equipmentEdit",
+ component: "manage/equipment/edit",
+ name: "equipmentEdit",
+ meta: {
+ title: "计算设备编辑",
+ hidden: true,
+ roles: ["ADMIN", "GUEST"],
+ keepAlive: true,
+ alwaysShow: false,
+ },
+ },
+ {
+ path: "equipmentUpgrades",
+ component: "manage/equipment/upGrades",
+ name: "equipmentUpgrades",
+ meta: {
+ title: "计算设备升级",
+ hidden: true,
+ roles: ["ADMIN", "GUEST"],
+ keepAlive: true,
+ alwaysShow: false,
+ },
+ },
+ {
+ path: "equipmentAddPcie",
+ component: "manage/equipment/addPcie",
+ name: "equipmentAddPcie",
+ meta: {
+ title: "计算PCIE设备新增",
+ hidden: true,
+ roles: ["ADMIN", "GUEST"],
+ keepAlive: true,
+ alwaysShow: false,
+ },
+ },
+ {
+ path: "equipmentAddNet",
+ component: "manage/equipment/addNet",
+ name: "equipmentAddNet",
+ meta: {
+ title: "计算网络设备新增",
+ hidden: true,
+ roles: ["ADMIN", "GUEST"],
+ keepAlive: true,
+ alwaysShow: false,
+ },
+ },
+ {
+ path: "equipmentDetail",
+ component: "manage/equipment/view",
+ name: "equipmentDetail",
+ meta: {
+ title: "计算设备查看",
+ hidden: true,
+ roles: ["ADMIN", "GUEST"],
+ keepAlive: true,
+ alwaysShow: false,
+ },
+ },
+ {
+ path: "otherTool",
+ component: "manage/otherTool/index",
+ name: "otherTool",
+ meta: {
+ title: "第三方工具管理",
+ icon: "setting",
+ hidden: false,
+ roles: ["ADMIN6", "GUEST", "ADMIN"],
+ keepAlive: true,
+ alwaysShow: false,
+ },
+ },
+ {
+ path: "otherToolAdd",
+ component: "manage/otherTool/add",
+ name: "otherToolAdd",
+ meta: {
+ title: "第三方工具编辑",
+ hidden: true,
+ roles: ["ADMIN6", "GUEST", "ADMIN"],
+ keepAlive: true,
+ alwaysShow: false,
+ },
+ },
+ {
+ path: "otherToolDetail",
+ component: "manage/otherTool/view",
+ name: "otherToolDetail",
+ meta: {
+ title: "查看第三方工具",
+ hidden: true,
+ roles: ["ADMIN6", "GUEST", "ADMIN"],
+ keepAlive: true,
+ alwaysShow: false,
+ },
+ },
+ ],
+ },
+
+ ]);
+ });
+ /*
+ return request
({
+ url: "/api/v1/menus/routes",
+ method: "get",
+ });*/
+ }
/**
* 获取菜单树形列表
*
diff --git a/src/assets/icons/simu.svg b/src/assets/icons/simu.svg
index d7fd711..2a13822 100644
--- a/src/assets/icons/simu.svg
+++ b/src/assets/icons/simu.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/assets/icons/split.svg b/src/assets/icons/split.svg
index a027db9..d05e88f 100644
--- a/src/assets/icons/split.svg
+++ b/src/assets/icons/split.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/assets/icons/test.svg b/src/assets/icons/test.svg
index 09c3bae..572e559 100644
--- a/src/assets/icons/test.svg
+++ b/src/assets/icons/test.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/assets/icons/web.svg b/src/assets/icons/web.svg
index f1946b2..bfef1d3 100644
--- a/src/assets/icons/web.svg
+++ b/src/assets/icons/web.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/lang/package/zh-cn.ts b/src/lang/package/zh-cn.ts
index 6a06154..9ec9e60 100644
--- a/src/lang/package/zh-cn.ts
+++ b/src/lang/package/zh-cn.ts
@@ -1,7 +1,7 @@
export default {
// 路由国际化
route: {
- dashboard: "首页",
+ dashboard: "数据总览",
document: "项目文档",
},
// 登录页面国际化
diff --git a/src/layout/components/NavBar/components/NavbarRight.vue b/src/layout/components/NavBar/components/NavbarRight.vue
index c204e85..8d1e262 100644
--- a/src/layout/components/NavBar/components/NavbarRight.vue
+++ b/src/layout/components/NavBar/components/NavbarRight.vue
@@ -3,7 +3,7 @@
- 中国航天
+ 中国航天
{{ "中国航天某某某某研究院" }}
diff --git a/src/layout/components/Sidebar/components/SidebarMixTopMenu.vue b/src/layout/components/Sidebar/components/SidebarMixTopMenu.vue
index 229832d..f2fb6a1 100644
--- a/src/layout/components/Sidebar/components/SidebarMixTopMenu.vue
+++ b/src/layout/components/Sidebar/components/SidebarMixTopMenu.vue
@@ -12,7 +12,7 @@
:index="route.path"
>
-
diff --git a/src/main.ts b/src/main.ts
index 42e8e10..2c969e3 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -15,7 +15,6 @@ import "vue3-json-viewer/dist/index.css"
import "@/styles/index.scss";
import "uno.css";
import "animate.css";
-
const app = createApp(App);
// 全局注册 自定义指令(directive)
setupDirective(app);
diff --git a/src/store/modules/permission.ts b/src/store/modules/permission.ts
index 00bf223..5541bc7 100644
--- a/src/store/modules/permission.ts
+++ b/src/store/modules/permission.ts
@@ -82,17 +82,31 @@ export const usePermissionStore = defineStore("permission", () => {
*/
function generateRoutes(roles: string[]) {
return new Promise((resolve, reject) => {
- // 接口获取所有路由
- MenuAPI.getRoutes()
- .then((data:any) => {
- // 过滤有权限的动态路由
- const accessedRoutes = filterAsyncRoutes(data, roles);
- setRoutes(accessedRoutes);
- resolve(accessedRoutes);
- })
- .catch((error) => {
- reject(error);
- });
+ if (window.isV2) {
+ // 接口获取所有路由
+ MenuAPI.getRoutesV2()
+ .then((data: any) => {
+ // 过滤有权限的动态路由
+ const accessedRoutes = filterAsyncRoutes(data, roles);
+ setRoutes(accessedRoutes);
+ resolve(accessedRoutes);
+ })
+ .catch((error) => {
+ reject(error);
+ });
+ } else {
+ // 接口获取所有路由
+ MenuAPI.getRoutes()
+ .then((data: any) => {
+ // 过滤有权限的动态路由
+ const accessedRoutes = filterAsyncRoutes(data, roles);
+ setRoutes(accessedRoutes);
+ resolve(accessedRoutes);
+ })
+ .catch((error) => {
+ reject(error);
+ });
+ }
});
}
diff --git a/src/typings/global.d.ts b/src/typings/global.d.ts
index 146d5bf..6cfb94e 100644
--- a/src/typings/global.d.ts
+++ b/src/typings/global.d.ts
@@ -16,6 +16,9 @@ declare global {
pageSize: number;
}
+ interface Window{
+ isV2?:any
+ }
/**
* 分页响应对象
*/
diff --git a/src/views/connection/index.vue b/src/views/connection/index.vue
index fe2a090..d1d6e9a 100644
--- a/src/views/connection/index.vue
+++ b/src/views/connection/index.vue
@@ -2,7 +2,7 @@
-
新建互联
@@ -35,12 +35,14 @@
查看
+
修改互联
新建互联
删除
+
@@ -64,6 +66,7 @@ const router = useRouter();
const selModelDlg = ref();
const loading = ref(false); // 加载状态
const removeIds = ref([]); // 删除用户ID集合 用于批量删除
+const isV2=window.isV2;
const queryParams = reactive({
page_num: 1,
page_size: 10,
diff --git a/src/views/dashboard/components/ModelFlow2.vue b/src/views/dashboard/components/ModelFlow2.vue
index 42dc5d3..c2c902b 100644
--- a/src/views/dashboard/components/ModelFlow2.vue
+++ b/src/views/dashboard/components/ModelFlow2.vue
@@ -1,43 +1,19 @@
-
+
-
-
任务描述
-
-
-

-
-
-
-
-
-
-
算子互联
-
-
-

-
-
-
-
-
-
-
-
-
+
编译部署
-
+

-
-
-
性能采集
-
+
+
推理评估
+
@@ -47,9 +23,9 @@
-
+
评估报告
-
+
@@ -57,22 +33,7 @@
-
-
-
-
-
-

-
-
-
算子管理
-
-
-
-
-
-
-
+
@@ -100,7 +61,7 @@
-
数据集管理
+
数据管理
@@ -109,22 +70,43 @@
-