添加静态菜单及对应空白页面;

This commit is contained in:
lucienteng
2024-09-03 11:12:14 +08:00
parent 8881708e2b
commit 3352e03935
35 changed files with 516 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
import { http } from "@/utils/http";
import { baseUrlApi } from "./utils";
export type UserResult = {
success: boolean;
@@ -37,6 +38,7 @@ export type RefreshTokenResult = {
/** 登录 */
export const getLogin = (data?: object) => {
return http.request<UserResult>("post", "/login", { data });
return http.request<any>("post", baseUrlApi("login"), { data });
};
/** 刷新`token` */

4
src/api/utils.ts Normal file
View File

@@ -0,0 +1,4 @@
// 第一个代理后端地址
export const baseUrlApi = (url: string) => `/api/${url}`;
// 第二个代理后端地址
export const baseUrlOtherApi = (url: string) => `/otherApi/${url}`;

View File

@@ -0,0 +1,64 @@
const Layout = () => import("@/layout/index.vue");
export default {
path: "/aircraft",
name: "aircraft",
component: Layout,
redirect: "/aircraft/archives",
meta: {
icon: "ep:apple",
title: "飞机管理",
rank: 5
},
children: [
{
path: "/aircraft/archives",
name: "archives",
component: () => import("@/views/aircraft/archives/index.vue"),
meta: {
title: "飞机档案"
}
},
{
path: "/aircraft/time-control",
name: "timecontrol",
component: () => import("@/views/aircraft/timecontrol/index.vue"),
meta: {
title: "时控件"
}
},
{
path: "/aircraft/disassemble",
name: "disassemble",
component: () => import("@/views/aircraft/disassemble/index.vue"),
meta: {
title: "拆卸记录"
}
},
{
// Maintenance Planning Data
path: "/aircraft/mpd",
name: "mpd",
component: () => import("@/views/aircraft/mpd/index.vue"),
meta: {
title: "维修项目控制"
}
},
{
path: "/aircraft/ad-sb",
name: "adsb",
component: () => import("@/views/aircraft/adsb/index.vue"),
meta: {
title: "AD/SB"
}
},
{
path: "/aircraft/exchange",
name: "exchange",
component: () => import("@/views/aircraft/exchange/index.vue"),
meta: {
title: "串换件记录"
}
}
]
} satisfies RouteConfigsTable;

View File

@@ -0,0 +1,31 @@
const Layout = () => import("@/layout/index.vue");
export default {
path: "/airtools",
name: "airtools",
component: Layout,
redirect: "/airtools",
meta: {
icon: "ep:apple",
title: "工具管理",
rank: 7
},
children: [
{
path: "/airtools",
name: "airtools-mana",
component: () => import("@/views/airtools/index.vue"),
meta: {
title: "航材管理"
}
},
{
path: "/airtools/orders",
name: "airtools-orders",
component: () => import("@/views/airtools/orders/index.vue"),
meta: {
title: "借归还记录"
}
}
]
} satisfies RouteConfigsTable;

View File

@@ -0,0 +1,24 @@
const Layout = () => import("@/layout/index.vue");
export default {
path: "/airworthiness",
name: "airworthiness",
component: Layout,
redirect: "/airworthiness",
meta: {
icon: "ep:apple",
title: "适航资源",
rank: 2
},
children: [
{
path: "/airworthiness",
name: "airworthiness",
component: () => import("@/views/airworthiness/index.vue"),
meta: {
title: "适航资源",
roles: ["admin", "common"]
}
}
]
} satisfies RouteConfigsTable;

View File

@@ -3,7 +3,7 @@ export default {
redirect: "/error/403",
meta: {
icon: "ri:information-line",
// showLink: false,
showLink: false,
title: "异常页面",
rank: 9
},

View File

@@ -0,0 +1,23 @@
const Layout = () => import("@/layout/index.vue");
export default {
path: "/flightrecord",
name: "flightrecord",
component: Layout,
redirect: "/flightrecord",
meta: {
icon: "ep:apple",
title: "飞行记录",
rank: 1
},
children: [
{
path: "/flightrecord",
name: "flightrecord",
component: () => import("@/views/flightrecord/index.vue"),
meta: {
title: "飞行记录"
}
}
]
} satisfies RouteConfigsTable;

View File

@@ -0,0 +1,31 @@
const Layout = () => import("@/layout/index.vue");
export default {
path: "/material",
name: "material",
component: Layout,
redirect: "/material",
meta: {
icon: "ep:apple",
title: "航材管理",
rank: 6
},
children: [
{
path: "/material",
name: "material-mana",
component: () => import("@/views/material/index.vue"),
meta: {
title: "航材管理"
}
},
{
path: "/material/orders",
name: "material-orders",
component: () => import("@/views/material/orders/index.vue"),
meta: {
title: "借归还记录"
}
}
]
} satisfies RouteConfigsTable;

View File

@@ -0,0 +1,31 @@
const Layout = () => import("@/layout/index.vue");
export default {
path: "/sharing",
name: "res-sharing",
component: Layout,
redirect: "/sharing/material",
meta: {
icon: "ep:apple",
title: "资源共享",
rank: 3
},
children: [
{
path: "/sharing/material",
name: "material-sharing",
component: () => import("@/views/sharing/material/index.vue"),
meta: {
title: "共享航材"
}
},
{
path: "/sharing/airtools",
name: "airtools-sharing",
component: () => import("@/views/sharing/airtools/index.vue"),
meta: {
title: "共享工具"
}
}
]
} satisfies RouteConfigsTable;

View File

@@ -0,0 +1,39 @@
const Layout = () => import("@/layout/index.vue");
export default {
path: "/statistics",
name: "statistics",
component: Layout,
redirect: "/statistics/flightrecord",
meta: {
icon: "ep:apple",
title: "数据统计",
rank: 4
},
children: [
{
path: "/statistics/flight-record",
name: "flight-record-statistics",
component: () => import("@/views/statistics/flightrecord/index.vue"),
meta: {
title: "飞行记录汇总"
}
},
{
path: "/statistics/flight-time",
name: "flight-time-statistics",
component: () => import("@/views/statistics/flighttime/index.vue"),
meta: {
title: "飞行时长统计"
}
},
{
path: "/statistics/aircraft-data",
name: "aircraft-data-statistics",
component: () => import("@/views/statistics/aircraftdata/index.vue"),
meta: {
title: "飞行数据统计"
}
}
]
} satisfies RouteConfigsTable;

View File

@@ -0,0 +1,31 @@
const Layout = () => import("@/layout/index.vue");
export default {
path: "/syssettings",
name: "syssettings",
component: Layout,
redirect: "/syssettings/address",
meta: {
icon: "ep:apple",
title: "系统管理",
rank: 9
},
children: [
{
path: "/syssettings/address",
name: "air-address",
component: () => import("@/views/syssettings/address/index.vue"),
meta: {
title: "地址管理"
}
},
{
path: "/syssettings/backup",
name: "sysbackup",
component: () => import("@/views/syssettings/backup/index.vue"),
meta: {
title: "系统备份"
}
}
]
} satisfies RouteConfigsTable;

View File

@@ -0,0 +1,31 @@
const Layout = () => import("@/layout/index.vue");
export default {
path: "/user",
name: "user",
component: Layout,
redirect: "/user/sysuser",
meta: {
icon: "ep:apple",
title: "人员管理",
rank: 8
},
children: [
{
path: "/user/sysuser",
name: "sysuser",
component: () => import("@/views/user/sysuser/index.vue"),
meta: {
title: "系统用户管理"
}
},
{
path: "/user/companyuser",
name: "companyuser",
component: () => import("@/views/user/companyuser/index.vue"),
meta: {
title: "企业用户管理"
}
}
]
} satisfies RouteConfigsTable;

View File

@@ -0,0 +1,9 @@
<script setup lang="ts">
defineOptions({
name: "adsb"
});
</script>
<template>
<h1>AD/SB</h1>
</template>

View File

@@ -0,0 +1,9 @@
<script setup lang="ts">
defineOptions({
name: "archives"
});
</script>
<template>
<h1>飞机档案</h1>
</template>

View File

@@ -0,0 +1,9 @@
<script setup lang="ts">
defineOptions({
name: "disassemble"
});
</script>
<template>
<h1>拆卸记录</h1>
</template>

View File

@@ -0,0 +1,9 @@
<script setup lang="ts">
defineOptions({
name: "exchange"
});
</script>
<template>
<h1>串换件记录</h1>
</template>

View File

@@ -0,0 +1,9 @@
<script setup lang="ts">
defineOptions({
name: "mpd"
});
</script>
<template>
<h1>维修项目控制</h1>
</template>

View File

@@ -0,0 +1,9 @@
<script setup lang="ts">
defineOptions({
name: "timecontrol"
});
</script>
<template>
<h1>时控件</h1>
</template>

View File

@@ -0,0 +1,9 @@
<script setup lang="ts">
defineOptions({
name: "airtools-mana"
});
</script>
<template>
<h1>工具管理</h1>
</template>

View File

@@ -0,0 +1,9 @@
<script setup lang="ts">
defineOptions({
name: "airtools-orders"
});
</script>
<template>
<h1>借归还记录</h1>
</template>

View File

@@ -0,0 +1,9 @@
<script setup lang="ts">
defineOptions({
name: "airworthiness"
});
</script>
<template>
<h1>适航资源</h1>
</template>

View File

@@ -0,0 +1,9 @@
<script setup lang="ts">
defineOptions({
name: "flightrecord"
});
</script>
<template>
<h1>飞行记录</h1>
</template>

View File

@@ -0,0 +1,9 @@
<script setup lang="ts">
defineOptions({
name: "material-mana"
});
</script>
<template>
<h1>航材管理</h1>
</template>

View File

@@ -0,0 +1,9 @@
<script setup lang="ts">
defineOptions({
name: "material-orders"
});
</script>
<template>
<h1>借归还记录</h1>
</template>

View File

@@ -20,7 +20,7 @@ defineOptions({
拥有code'permission:btn:add' 权限可见
</el-button>
</Auth>
<Auth :value="['permission:btn:edit']">
<Auth :value="['permission:btn:edit1']">
<el-button plain type="primary">
拥有code['permission:btn:edit'] 权限可见
</el-button>

View File

@@ -0,0 +1,9 @@
<script setup lang="ts">
defineOptions({
name: "airtools-sharing"
});
</script>
<template>
<h1>共享工具</h1>
</template>

View File

@@ -0,0 +1,9 @@
<script setup lang="ts">
defineOptions({
name: "material-sharing"
});
</script>
<template>
<h1>共享航材</h1>
</template>

View File

@@ -0,0 +1,9 @@
<script setup lang="ts">
defineOptions({
name: "aircraft-data-statistics"
});
</script>
<template>
<h1>飞行数据统计</h1>
</template>

View File

@@ -0,0 +1,9 @@
<script setup lang="ts">
defineOptions({
name: "flight-record-statistics"
});
</script>
<template>
<h1>飞行记录汇总</h1>
</template>

View File

@@ -0,0 +1,9 @@
<script setup lang="ts">
defineOptions({
name: "flight-time-statistics"
});
</script>
<template>
<h1>飞行时长统计</h1>
</template>

View File

@@ -0,0 +1,9 @@
<script setup lang="ts">
defineOptions({
name: "air-address"
});
</script>
<template>
<h1>地址管理</h1>
</template>

View File

@@ -0,0 +1,9 @@
<script setup lang="ts">
defineOptions({
name: "sysbackup"
});
</script>
<template>
<h1>系统备份</h1>
</template>

View File

@@ -0,0 +1,9 @@
<script setup lang="ts">
defineOptions({
name: "companyuser"
});
</script>
<template>
<h1>企业用户管理</h1>
</template>

View File

@@ -0,0 +1,9 @@
<script setup lang="ts">
defineOptions({
name: "sysuser"
});
</script>
<template>
<h1>系统用户管理</h1>
</template>