From 74da138e28fcaaa3119d5c79500cc87b0d176a98 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=89=E8=99=B9=E7=9D=BF?= <297504645@qq.com>
Date: Fri, 8 Sep 2023 15:46:27 +0800
Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=8E=A5=E5=8F=A3=E7=9C=8B=E6=9D=BF?=
=?UTF-8?q?=E3=80=91404=E9=A1=B5=E9=9D=A2=E8=B7=B3=E8=BD=AC=E5=8F=8A404?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=BC=80=E5=8F=91=EF=BC=8C=E6=89=80=E6=9C=89?=
=?UTF-8?q?=E8=8F=9C=E5=8D=95=E9=A1=B5=E9=9D=A2=E8=B0=83=E6=95=B4=E5=BC=80?=
=?UTF-8?q?=E5=8F=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
PC/InterFace.Dash/src/router/index.js | 10 +-
.../src/views/dashboard/index copy.vue | 222 ------------------
.../src/views/error-page/404.vue | 23 +-
PC/InterFace.Dash/src/views/menuAll/index.vue | 33 ++-
4 files changed, 33 insertions(+), 255 deletions(-)
delete mode 100644 PC/InterFace.Dash/src/views/dashboard/index copy.vue
diff --git a/PC/InterFace.Dash/src/router/index.js b/PC/InterFace.Dash/src/router/index.js
index f6b73a3..d566d78 100644
--- a/PC/InterFace.Dash/src/router/index.js
+++ b/PC/InterFace.Dash/src/router/index.js
@@ -145,11 +145,11 @@ export let constantRoutes = [
export let asyncRoutes = [
/** when your routing map is too long, you can split it into small modules **/
// 404 page must be placed at the end !!!
- // {
- // path: '*',
- // redirect: '/404',
- // hidden: true
- // }
+ {
+ path: '*',
+ redirect: '/404',
+ hidden: true
+ }
]
const createRouter = () => new Router({
diff --git a/PC/InterFace.Dash/src/views/dashboard/index copy.vue b/PC/InterFace.Dash/src/views/dashboard/index copy.vue
deleted file mode 100644
index cf7251a..0000000
--- a/PC/InterFace.Dash/src/views/dashboard/index copy.vue
+++ /dev/null
@@ -1,222 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/PC/InterFace.Dash/src/views/error-page/404.vue b/PC/InterFace.Dash/src/views/error-page/404.vue
index 1791f55..87c6213 100644
--- a/PC/InterFace.Dash/src/views/error-page/404.vue
+++ b/PC/InterFace.Dash/src/views/error-page/404.vue
@@ -8,13 +8,10 @@
-
OOPS!
-
-
{{ message }}
-
Please check that the URL you entered is correct, or click the button below to return to the homepage.
-
Back to home
+
访问发生错误!
+
暂无该页面,或者您没有访问权限
+
请检查您输入的地址是否正确,
以及是否有该权限,
或者单击下面的按钮返回主页。
+
返回主页
@@ -24,11 +21,6 @@
export default {
name: 'Page404',
- computed: {
- message() {
- return 'The webmaster said that you can not enter this page...'
- }
- }
}
@@ -167,10 +159,11 @@ export default {
line-height: 40px;
color: #1482f0;
opacity: 0;
- margin-bottom: 20px;
+ margin-bottom: 30px;
animation-name: slideUp;
animation-duration: 0.5s;
animation-fill-mode: forwards;
+ padding-top: 20px;
}
&__headline {
font-size: 20px;
@@ -185,11 +178,11 @@ export default {
animation-fill-mode: forwards;
}
&__info {
- font-size: 13px;
+ font-size: 16px;
line-height: 21px;
color: grey;
opacity: 0;
- margin-bottom: 30px;
+ margin-bottom: 40px;
animation-name: slideUp;
animation-duration: 0.5s;
animation-delay: 0.2s;
diff --git a/PC/InterFace.Dash/src/views/menuAll/index.vue b/PC/InterFace.Dash/src/views/menuAll/index.vue
index 72f061e..e5615fc 100644
--- a/PC/InterFace.Dash/src/views/menuAll/index.vue
+++ b/PC/InterFace.Dash/src/views/menuAll/index.vue
@@ -27,24 +27,31 @@ export default {
])
},
mounted(){
- this.initData(this.permission_routes)
+ let _menus = JSON.parse(JSON.stringify(this.permission_routes))
+ // let _showList = _menus.filter(item=>{
+ // return !item.hidden
+ // })
+ this.navList = this.initData(_menus,true)
},
methods:{
- initData(data){
+ initData(data,first){
+ let _list = []
data.forEach(item => {
- if(item.path !== '/' && item.meta) {
- let _item = {
- title:item.meta.title,
- name:item.name,
- path:item.path,
- children:item.children
- }
- this.navList.push(_item)
+ // 多层数据
+ if(item.meta){
+ item.title = item.meta.title
+ _list.push(item)
}
- if(item.children){
- this.initData(item.children)
+ // 默认为单层
+ else{
+ if(item.children && item.children.length > 0)_list.push(item.children[0])
}
- })
+ if(item.children && item.children.length > 0)item.children = this.initData(item.children)
+ });
+ // _list = _list.filter(item=>{
+ // return !item.hidden
+ // })
+ return _list
},
goPage(item){
this.$router.push({name: item.name})