保存进度!
This commit is contained in:
parent
1064fce554
commit
75c0ed90ca
|
@ -8,6 +8,7 @@
|
||||||
"name": "admin_system",
|
"name": "admin_system",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@element-plus/icons-vue": "^2.0.10",
|
||||||
"axios": "^1.2.1",
|
"axios": "^1.2.1",
|
||||||
"core-js": "^3.8.3",
|
"core-js": "^3.8.3",
|
||||||
"element-plus": "^2.2.26",
|
"element-plus": "^2.2.26",
|
||||||
|
@ -1734,7 +1735,7 @@
|
||||||
},
|
},
|
||||||
"node_modules/@element-plus/icons-vue": {
|
"node_modules/@element-plus/icons-vue": {
|
||||||
"version": "2.0.10",
|
"version": "2.0.10",
|
||||||
"resolved": "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.0.10.tgz",
|
"resolved": "https://registry.npmjs.org/@element-plus/icons-vue/-/icons-vue-2.0.10.tgz",
|
||||||
"integrity": "sha512-ygEZ1mwPjcPo/OulhzLE7mtDrQBWI8vZzEWSNB2W/RNCRjoQGwbaK4N8lV4rid7Ts4qvySU3njMN7YCiSlSaTQ==",
|
"integrity": "sha512-ygEZ1mwPjcPo/OulhzLE7mtDrQBWI8vZzEWSNB2W/RNCRjoQGwbaK4N8lV4rid7Ts4qvySU3njMN7YCiSlSaTQ==",
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"vue": "^3.2.0"
|
"vue": "^3.2.0"
|
||||||
|
@ -6783,9 +6784,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/json5": {
|
"node_modules/json5": {
|
||||||
"version": "2.2.1",
|
"version": "2.2.3",
|
||||||
"resolved": "https://registry.npmmirror.com/json5/-/json5-2.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
|
||||||
"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
|
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"json5": "lib/cli.js"
|
"json5": "lib/cli.js"
|
||||||
|
@ -6893,9 +6894,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/loader-utils/node_modules/json5": {
|
"node_modules/loader-utils/node_modules/json5": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmmirror.com/json5/-/json5-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
|
||||||
"integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
|
"integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"minimist": "^1.2.0"
|
"minimist": "^1.2.0"
|
||||||
|
@ -12268,7 +12269,7 @@
|
||||||
},
|
},
|
||||||
"@element-plus/icons-vue": {
|
"@element-plus/icons-vue": {
|
||||||
"version": "2.0.10",
|
"version": "2.0.10",
|
||||||
"resolved": "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.0.10.tgz",
|
"resolved": "https://registry.npmjs.org/@element-plus/icons-vue/-/icons-vue-2.0.10.tgz",
|
||||||
"integrity": "sha512-ygEZ1mwPjcPo/OulhzLE7mtDrQBWI8vZzEWSNB2W/RNCRjoQGwbaK4N8lV4rid7Ts4qvySU3njMN7YCiSlSaTQ==",
|
"integrity": "sha512-ygEZ1mwPjcPo/OulhzLE7mtDrQBWI8vZzEWSNB2W/RNCRjoQGwbaK4N8lV4rid7Ts4qvySU3njMN7YCiSlSaTQ==",
|
||||||
"requires": {}
|
"requires": {}
|
||||||
},
|
},
|
||||||
|
@ -16359,9 +16360,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"json5": {
|
"json5": {
|
||||||
"version": "2.2.1",
|
"version": "2.2.3",
|
||||||
"resolved": "https://registry.npmmirror.com/json5/-/json5-2.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
|
||||||
"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
|
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"jsonfile": {
|
"jsonfile": {
|
||||||
|
@ -16443,9 +16444,9 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"json5": {
|
"json5": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmmirror.com/json5/-/json5-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
|
||||||
"integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
|
"integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"minimist": "^1.2.0"
|
"minimist": "^1.2.0"
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
"lint": "vue-cli-service lint"
|
"lint": "vue-cli-service lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@element-plus/icons-vue": "^2.0.10",
|
||||||
"axios": "^1.2.1",
|
"axios": "^1.2.1",
|
||||||
"core-js": "^3.8.3",
|
"core-js": "^3.8.3",
|
||||||
"element-plus": "^2.2.26",
|
"element-plus": "^2.2.26",
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2023-01-04 11:05:44
|
* @Date: 2023-01-04 11:05:44
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-01-05 16:35:15
|
* @LastEditTime: 2023-01-06 17:45:34
|
||||||
* @FilePath: \admin_system\src\layout\index.vue
|
* @FilePath: \admin_system\src\layout\index.vue
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
|
@ -44,13 +44,13 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
#layout-aside {
|
#layout-aside {
|
||||||
width: 200px;
|
width: 175px;
|
||||||
background-color: #344a5f;
|
background-color: #223142;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
#layout-header {
|
#layout-header {
|
||||||
/* height: 75px; */
|
height: 50px;
|
||||||
/* background-color: #77bc99; */
|
/* background-color: #77bc99; */
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,28 +2,34 @@
|
||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2023-01-04 11:30:33
|
* @Date: 2023-01-04 11:30:33
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-01-05 21:37:17
|
* @LastEditTime: 2023-01-06 18:08:03
|
||||||
* @FilePath: \admin_system\src\layout\components\Aside.vue
|
* @FilePath: \admin_system\src\layout\components\Aside.vue
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-menu id="side-bar" default-active="/console" unique-opened="true" background-color="#344a5f" text-color="#fff"
|
<el-menu id="side-bar" router default-active="/desktop" unique-opened="true" background-color="#223142"
|
||||||
active-text-color="#ffd04b">
|
text-color="#fff" active-text-color="#ffd04b">
|
||||||
<template v-for="route in this.routers" :key="route.path">
|
<template v-for="route in this.routers" :key="route.path">
|
||||||
<template v-if="!route.hidden">
|
<template v-if="!route.hidden">
|
||||||
<el-menu-item v-if="!route.children" :index="route.path">
|
<template v-if="hasOnlyChild(route.children)">
|
||||||
<template #title>{{ route.meta && route.meta.title }}</template>
|
<!-- 当只有一个子路由时,直接渲染子路由 -->
|
||||||
</el-menu-item>
|
<el-menu-item :index="route.children[0].path">
|
||||||
<el-sub-menu v-else :index="route.path">
|
<template #title>{{ route.children[0].meta && route.children[0].meta.title }}</template>
|
||||||
<template #title>{{ route.meta && route.meta.title }}</template>
|
</el-menu-item>
|
||||||
<template v-for="child in route.children" :key="child.path">
|
</template>
|
||||||
<el-menu-item v-if="!child.hidden" :index="child.path">
|
<template v-else>
|
||||||
<template #title>{{ child.mate && child.mate.title }}</template>
|
<!-- 不是一个子路由时,有可能没有子路由,或者是多个子路由 -->
|
||||||
</el-menu-item>
|
<el-sub-menu v-if="route.children && route.children.length" :index="route.path">
|
||||||
</template>
|
<template #title>{{ route.meta && route.meta.title }}</template>
|
||||||
</el-sub-menu>
|
<template v-for="child in route.children" :key="child.path">
|
||||||
|
<el-menu-item v-if="!child.hidden" :index="child.path">
|
||||||
|
<template #title>{{ child.meta && child.meta.title }}</template>
|
||||||
|
</el-menu-item>
|
||||||
|
</template>
|
||||||
|
</el-sub-menu>
|
||||||
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</el-menu>
|
</el-menu>
|
||||||
|
@ -40,6 +46,31 @@ export default {
|
||||||
routers: null,
|
routers: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
//用于判断一个路由是否只有一项子路由
|
||||||
|
hasOnlyChild: function (children)
|
||||||
|
{
|
||||||
|
//防御验证
|
||||||
|
if (!children)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//剔除掉hidden的路由
|
||||||
|
const routes = children.filter((item) =>
|
||||||
|
{
|
||||||
|
return item.hidden ? false : true;
|
||||||
|
});
|
||||||
|
|
||||||
|
if (routes.length === 1)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
created()
|
created()
|
||||||
{
|
{
|
||||||
this.routers = useRouter().options.routes;
|
this.routers = useRouter().options.routes;
|
||||||
|
@ -55,4 +86,13 @@ export default {
|
||||||
/* border-left: 5px solid #1d74b2; */
|
/* border-left: 5px solid #1d74b2; */
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.is-active {
|
||||||
|
background-color: #ffffff4f !important;
|
||||||
|
border-left: 5px solid #1d74b2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.is-opened {
|
||||||
|
border-left: none;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
|
@ -2,7 +2,7 @@
|
||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2023-01-04 11:39:04
|
* @Date: 2023-01-04 11:39:04
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-01-05 16:17:43
|
* @LastEditTime: 2023-01-06 17:10:33
|
||||||
* @FilePath: \admin_system\src\layout\components\Header.vue
|
* @FilePath: \admin_system\src\layout\components\Header.vue
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
<span class="company_name">CPIC</span>
|
<span class="company_name">CPIC</span>
|
||||||
<div class="version_div">
|
<div class="version_div">
|
||||||
<div>测试版</div>
|
<div>测试版</div>
|
||||||
<div>3.6.7 x64 Build202208301257</div>
|
<div>3.6.7 x64 Build 202208301257</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="buttons_div"></div>
|
<div class="buttons_div"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2023-01-04 11:40:03
|
* @Date: 2023-01-04 11:40:03
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-01-04 11:40:04
|
* @LastEditTime: 2023-01-06 12:54:17
|
||||||
* @FilePath: \admin_system\src\layout\components\Main.vue
|
* @FilePath: \admin_system\src\layout\components\Main.vue
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
Main
|
<router-view />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -2,15 +2,16 @@
|
||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2022-12-14 15:12:46
|
* @Date: 2022-12-14 15:12:46
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-01-05 21:38:13
|
* @LastEditTime: 2023-01-06 16:44:57
|
||||||
* @FilePath: \admin_system\src\router\index.js
|
* @FilePath: \admin_system\src\router\index.js
|
||||||
* @Description:
|
* @Description: 定义应用路由配置
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
import { createRouter, createWebHashHistory } from 'vue-router';
|
import { createRouter, createWebHashHistory } from 'vue-router';
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
|
//框架路由
|
||||||
{
|
{
|
||||||
path: "/",
|
path: "/",
|
||||||
name: "Root",
|
name: "Root",
|
||||||
|
@ -26,22 +27,32 @@ const routes = [
|
||||||
{
|
{
|
||||||
path: "/home",
|
path: "/home",
|
||||||
name: "Home",
|
name: "Home",
|
||||||
|
hidden: true,
|
||||||
meta: {
|
meta: {
|
||||||
title: "控制台"
|
title: "控制台"
|
||||||
},
|
},
|
||||||
|
component: () => import("../layout/Index.vue"),
|
||||||
|
},
|
||||||
|
//侧边导航栏路由
|
||||||
|
{ //首页
|
||||||
|
path: "/console",
|
||||||
|
name: "Console",
|
||||||
|
meta: {
|
||||||
|
title: "总览"
|
||||||
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "/console",
|
path: "/desktop",
|
||||||
name: "Console",
|
name: "DeskTop",
|
||||||
mate: {
|
meta: {
|
||||||
title: "首页"
|
title: "工作台"
|
||||||
},
|
},
|
||||||
component: () => import("../layout/Index.vue"),
|
component: () => import("../views/overview/OverView.vue"),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
component: () => import("../layout/Index.vue"),
|
component: () => import("../layout/Index.vue"),
|
||||||
},
|
},
|
||||||
{
|
{//信息管理
|
||||||
path: "/news",
|
path: "/news",
|
||||||
name: "News",
|
name: "News",
|
||||||
meta: {
|
meta: {
|
||||||
|
@ -51,10 +62,18 @@ const routes = [
|
||||||
{
|
{
|
||||||
path: "/newsIndex",
|
path: "/newsIndex",
|
||||||
name: "NewsIndex",
|
name: "NewsIndex",
|
||||||
mate: {
|
meta: {
|
||||||
title: "信息列表"
|
title: "信息列表"
|
||||||
},
|
},
|
||||||
component: () => import("../layout/Index.vue"),
|
component: () => import("../views/news/News.vue"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/newsIndex",
|
||||||
|
name: "NewsIndex",
|
||||||
|
meta: {
|
||||||
|
title: "信息编辑"
|
||||||
|
},
|
||||||
|
component: () => import("../views/news/News.vue"),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
component: () => import("../layout/Index.vue"),
|
component: () => import("../layout/Index.vue"),
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
<!--
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-01-06 15:26:44
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @LastEditTime: 2023-01-06 15:26:46
|
||||||
|
* @FilePath: \admin_system\src\views\news\News.vue
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
信息管理
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "NewsPage"
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
|
@ -0,0 +1,23 @@
|
||||||
|
<!--
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-01-06 15:30:12
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @LastEditTime: 2023-01-06 15:30:14
|
||||||
|
* @FilePath: \admin_system\src\views\overview\OverView.vue
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
总览
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "OverVue"
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
Loading…
Reference in New Issue