添加静态菜单及对应空白页面;
This commit is contained in:
@@ -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
4
src/api/utils.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
// 第一个代理后端地址
|
||||
export const baseUrlApi = (url: string) => `/api/${url}`;
|
||||
// 第二个代理后端地址
|
||||
export const baseUrlOtherApi = (url: string) => `/otherApi/${url}`;
|
||||
64
src/router/modules/aircraft.ts
Normal file
64
src/router/modules/aircraft.ts
Normal 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;
|
||||
31
src/router/modules/airtools.ts
Normal file
31
src/router/modules/airtools.ts
Normal 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;
|
||||
24
src/router/modules/airworthiness.ts
Normal file
24
src/router/modules/airworthiness.ts
Normal 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;
|
||||
@@ -3,7 +3,7 @@ export default {
|
||||
redirect: "/error/403",
|
||||
meta: {
|
||||
icon: "ri:information-line",
|
||||
// showLink: false,
|
||||
showLink: false,
|
||||
title: "异常页面",
|
||||
rank: 9
|
||||
},
|
||||
|
||||
23
src/router/modules/flightrecord.ts
Normal file
23
src/router/modules/flightrecord.ts
Normal 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;
|
||||
31
src/router/modules/material.ts
Normal file
31
src/router/modules/material.ts
Normal 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;
|
||||
31
src/router/modules/sharing.ts
Normal file
31
src/router/modules/sharing.ts
Normal 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;
|
||||
39
src/router/modules/statistics.ts
Normal file
39
src/router/modules/statistics.ts
Normal 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;
|
||||
31
src/router/modules/syssettings.ts
Normal file
31
src/router/modules/syssettings.ts
Normal 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;
|
||||
31
src/router/modules/user.ts
Normal file
31
src/router/modules/user.ts
Normal 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;
|
||||
9
src/views/aircraft/adsb/index.vue
Normal file
9
src/views/aircraft/adsb/index.vue
Normal file
@@ -0,0 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
defineOptions({
|
||||
name: "adsb"
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>AD/SB</h1>
|
||||
</template>
|
||||
9
src/views/aircraft/archives/index.vue
Normal file
9
src/views/aircraft/archives/index.vue
Normal file
@@ -0,0 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
defineOptions({
|
||||
name: "archives"
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>飞机档案</h1>
|
||||
</template>
|
||||
9
src/views/aircraft/disassemble/index.vue
Normal file
9
src/views/aircraft/disassemble/index.vue
Normal file
@@ -0,0 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
defineOptions({
|
||||
name: "disassemble"
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>拆卸记录</h1>
|
||||
</template>
|
||||
9
src/views/aircraft/exchange/index.vue
Normal file
9
src/views/aircraft/exchange/index.vue
Normal file
@@ -0,0 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
defineOptions({
|
||||
name: "exchange"
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>串换件记录</h1>
|
||||
</template>
|
||||
9
src/views/aircraft/mpd/index.vue
Normal file
9
src/views/aircraft/mpd/index.vue
Normal file
@@ -0,0 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
defineOptions({
|
||||
name: "mpd"
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>维修项目控制</h1>
|
||||
</template>
|
||||
9
src/views/aircraft/timecontrol/index.vue
Normal file
9
src/views/aircraft/timecontrol/index.vue
Normal file
@@ -0,0 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
defineOptions({
|
||||
name: "timecontrol"
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>时控件</h1>
|
||||
</template>
|
||||
9
src/views/airtools/index.vue
Normal file
9
src/views/airtools/index.vue
Normal file
@@ -0,0 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
defineOptions({
|
||||
name: "airtools-mana"
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>工具管理</h1>
|
||||
</template>
|
||||
9
src/views/airtools/orders/index.vue
Normal file
9
src/views/airtools/orders/index.vue
Normal file
@@ -0,0 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
defineOptions({
|
||||
name: "airtools-orders"
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>借归还记录</h1>
|
||||
</template>
|
||||
9
src/views/airworthiness/index.vue
Normal file
9
src/views/airworthiness/index.vue
Normal file
@@ -0,0 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
defineOptions({
|
||||
name: "airworthiness"
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>适航资源</h1>
|
||||
</template>
|
||||
9
src/views/flightrecord/index.vue
Normal file
9
src/views/flightrecord/index.vue
Normal file
@@ -0,0 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
defineOptions({
|
||||
name: "flightrecord"
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>飞行记录</h1>
|
||||
</template>
|
||||
9
src/views/material/index.vue
Normal file
9
src/views/material/index.vue
Normal file
@@ -0,0 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
defineOptions({
|
||||
name: "material-mana"
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>航材管理</h1>
|
||||
</template>
|
||||
9
src/views/material/orders/index.vue
Normal file
9
src/views/material/orders/index.vue
Normal file
@@ -0,0 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
defineOptions({
|
||||
name: "material-orders"
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>借归还记录</h1>
|
||||
</template>
|
||||
@@ -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>
|
||||
|
||||
9
src/views/sharing/airtools/index.vue
Normal file
9
src/views/sharing/airtools/index.vue
Normal file
@@ -0,0 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
defineOptions({
|
||||
name: "airtools-sharing"
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>共享工具</h1>
|
||||
</template>
|
||||
9
src/views/sharing/material/index.vue
Normal file
9
src/views/sharing/material/index.vue
Normal file
@@ -0,0 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
defineOptions({
|
||||
name: "material-sharing"
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>共享航材</h1>
|
||||
</template>
|
||||
9
src/views/statistics/aircraftdata/index.vue
Normal file
9
src/views/statistics/aircraftdata/index.vue
Normal file
@@ -0,0 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
defineOptions({
|
||||
name: "aircraft-data-statistics"
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>飞行数据统计</h1>
|
||||
</template>
|
||||
9
src/views/statistics/flightrecord/index.vue
Normal file
9
src/views/statistics/flightrecord/index.vue
Normal file
@@ -0,0 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
defineOptions({
|
||||
name: "flight-record-statistics"
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>飞行记录汇总</h1>
|
||||
</template>
|
||||
9
src/views/statistics/flighttime/index.vue
Normal file
9
src/views/statistics/flighttime/index.vue
Normal file
@@ -0,0 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
defineOptions({
|
||||
name: "flight-time-statistics"
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>飞行时长统计</h1>
|
||||
</template>
|
||||
9
src/views/syssettings/address/index.vue
Normal file
9
src/views/syssettings/address/index.vue
Normal file
@@ -0,0 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
defineOptions({
|
||||
name: "air-address"
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>地址管理</h1>
|
||||
</template>
|
||||
9
src/views/syssettings/backup/index.vue
Normal file
9
src/views/syssettings/backup/index.vue
Normal file
@@ -0,0 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
defineOptions({
|
||||
name: "sysbackup"
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>系统备份</h1>
|
||||
</template>
|
||||
9
src/views/user/companyuser/index.vue
Normal file
9
src/views/user/companyuser/index.vue
Normal file
@@ -0,0 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
defineOptions({
|
||||
name: "companyuser"
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>企业用户管理</h1>
|
||||
</template>
|
||||
9
src/views/user/sysuser/index.vue
Normal file
9
src/views/user/sysuser/index.vue
Normal file
@@ -0,0 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
defineOptions({
|
||||
name: "sysuser"
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>系统用户管理</h1>
|
||||
</template>
|
||||
@@ -24,7 +24,20 @@ export default ({ mode }: ConfigEnv): UserConfigExport => {
|
||||
port: VITE_PORT,
|
||||
host: "0.0.0.0",
|
||||
// 本地跨域代理 https://cn.vitejs.dev/config/server-options.html#server-proxy
|
||||
proxy: {},
|
||||
proxy: {
|
||||
// 第一个代理后端地址
|
||||
"/api": {
|
||||
target: "http://127.0.0.1:3000",
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/api/, "")
|
||||
},
|
||||
// 第二个代理后端地址
|
||||
"/otherApi": {
|
||||
target: "http://127.0.0.1:3290",
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/otherApi/, "")
|
||||
}
|
||||
},
|
||||
// 预热文件以提前转换和缓存结果,降低启动期间的初始页面加载时长并防止转换瀑布
|
||||
warmup: {
|
||||
clientFiles: ["./index.html", "./src/{views,components}/*"]
|
||||
|
||||
Reference in New Issue
Block a user