From be880650e2b4cb8a5ed3814c8c1c0c1638d78a22 Mon Sep 17 00:00:00 2001 From: sakuya <81883387@qq.com> Date: Sun, 16 May 2021 23:05:19 +0800 Subject: [PATCH] UP 1.0.9 --- package.json | 2 +- public/json/login.json | 84 ++++++++++++++-------- src/api/index.js | 16 ++++- src/components/scTable/index.vue | 5 +- src/config/index.js | 5 +- src/layout/components/NavMenu.vue | 2 +- src/layout/components/side.vue | 6 +- src/layout/components/sideM.vue | 4 +- src/router/index.js | 5 +- src/views/home/components/C2.vue | 12 ++++ src/views/other/iframe.vue | 5 +- src/views/setting/log/index.vue | 46 +++++-------- src/views/setting/log/info.vue | 48 +++++++++++++ src/views/setting/menu/index.vue | 85 ++++++++++++++++++++--- src/views/setting/menu/save.vue | 111 ++++++++++++++++++++++++++++++ 15 files changed, 352 insertions(+), 84 deletions(-) create mode 100644 src/views/setting/log/info.vue create mode 100644 src/views/setting/menu/save.vue diff --git a/package.json b/package.json index da76473f..fa46f965 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "SCUI-Admin", - "version": "1.0.4", + "version": "1.0.9", "private": true, "scripts": { "serve": "vue-cli-service serve", diff --git a/public/json/login.json b/public/json/login.json index 066e66a0..876b6e7c 100644 --- a/public/json/login.json +++ b/public/json/login.json @@ -10,14 +10,16 @@ "path": "/vab", "meta": { "title": "组件", - "icon": "el-icon-takeaway-box" + "icon": "el-icon-takeaway-box", + "type": "menu" }, "children": [ { "path": "/vab/drag", "name": "drag", "meta": { - "title": "拖拽排序" + "title": "拖拽排序", + "type": "menu" }, "component": "vab/drag" }, @@ -25,7 +27,8 @@ "path": "/vab/chart", "name": "chart", "meta": { - "title": "图表 Echarts" + "title": "图表 Echarts", + "type": "menu" }, "component": "vab/chart" }, @@ -33,7 +36,8 @@ "path": "/vab/filterbar", "name": "filterBar", "meta": { - "title": "过滤器" + "title": "过滤器", + "type": "menu" }, "component": "vab/filterBar" }, @@ -41,7 +45,8 @@ "path": "/vab/print", "name": "print", "meta": { - "title": "打印" + "title": "打印", + "type": "menu" }, "component": "vab/print" } @@ -52,14 +57,16 @@ "path": "/template", "meta": { "title": "模板", - "icon": "el-icon-files" + "icon": "el-icon-files", + "type": "menu" }, "children": [ { "path": "/template/blank", "name": "blank", "meta": { - "title": "空白模板" + "title": "空白模板", + "type": "menu" }, "component": "template/blank" }, @@ -67,7 +74,8 @@ "path": "/template/list", "name": "list", "meta": { - "title": "普通列表" + "title": "普通列表", + "type": "menu" }, "component": "template/list" }, @@ -75,7 +83,8 @@ "path": "/template/sideList", "name": "sideList", "meta": { - "title": "分栏列表" + "title": "分栏列表", + "type": "menu" }, "component": "template/sideList" }, @@ -84,6 +93,7 @@ "name": "show", "meta": { "title": "详情", + "type": "menu", "hidden": true }, "component": "template/show" @@ -92,7 +102,8 @@ "path": "/template/itemList", "name": "itemList", "meta": { - "title": "个性列表" + "title": "个性列表", + "type": "menu" }, "component": "template/itemList" } @@ -103,7 +114,8 @@ "path": "/other", "meta": { "title": "其他", - "icon": "el-icon-more" + "icon": "el-icon-more", + "type": "menu" }, "children": [ { @@ -111,7 +123,8 @@ "name": "外部链接", "meta": { "title": "外部链接", - "icon": "el-icon-link" + "icon": "el-icon-link", + "type": "menu" }, "children": [ { @@ -119,7 +132,7 @@ "name": "百度", "meta": { "title": "百度", - "target": "_blank" + "type": "link" } }, { @@ -127,7 +140,7 @@ "name": "谷歌", "meta": { "title": "谷歌", - "target": "_blank" + "type": "link" } } ] @@ -137,21 +150,24 @@ "name": "Iframe", "meta": { "title": "Iframe", - "icon": "el-icon-position" + "icon": "el-icon-position", + "type": "menu" }, "children": [ { "path": "https://vue3js.cn/docs/zh/", - "name": "VUE 3", + "name": "vue3", "meta": { - "title": "VUE 3" + "title": "VUE 3", + "type": "iframe" } }, { "path": "https://element-plus.org?id=1", - "name": "Element Plus", + "name": "elementplus", "meta": { - "title": "Element Plus" + "title": "Element Plus", + "type": "iframe" } } ] @@ -163,23 +179,25 @@ "path": "/test", "meta": { "title": "实验室", - "icon": "el-icon-folder" - }, - "children": [] + "icon": "el-icon-folder", + "type": "menu" + } }, { "name": "setting", "path": "/setting", "meta": { "title": "配置", - "icon": "el-icon-setting" + "icon": "el-icon-setting", + "type": "menu" }, "children": [ { "path": "/setting/system", "name": "system", "meta": { - "title": "系统设置" + "title": "系统设置", + "type": "menu" }, "component": "setting/system" }, @@ -187,7 +205,8 @@ "path": "/setting/user", "name": "user", "meta": { - "title": "用户管理" + "title": "用户管理", + "type": "menu" }, "component": "setting/user" }, @@ -195,7 +214,8 @@ "path": "/setting/role", "name": "role", "meta": { - "title": "角色管理" + "title": "角色管理", + "type": "menu" }, "component": "setting/role" }, @@ -203,7 +223,8 @@ "path": "/setting/dic", "name": "dic", "meta": { - "title": "字典管理" + "title": "字典管理", + "type": "menu" }, "component": "setting/dic" }, @@ -211,7 +232,8 @@ "path": "/setting/menu", "name": "settingMenu", "meta": { - "title": "菜单管理" + "title": "菜单管理", + "type": "menu" }, "component": "setting/menu" }, @@ -219,7 +241,8 @@ "path": "/setting/client", "name": "client", "meta": { - "title": "应用管理" + "title": "应用管理", + "type": "menu" }, "component": "setting/client" }, @@ -227,7 +250,8 @@ "path": "/setting/log", "name": "log", "meta": { - "title": "系统日志" + "title": "系统日志", + "type": "menu" }, "component": "setting/log" } diff --git a/src/api/index.js b/src/api/index.js index 8660dab7..b02d4e13 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -81,9 +81,21 @@ const api = { } } }, + menu: { + list: { + url: `${config.API_URL}/json/login.json`, + name: "菜单管理", + get: async function(){ + // 这里接口对象偷懒重复了登录接口 + var res = await http.get(this.url); + res.data = res.data.menuList; + return res; + } + } + }, log: { list: { - url: `${config.API_URL}/json/log.json`, + url: `${config.MOCK_URL}/loglist`, name: "日志列表", get: async function(){ return await http.get(this.url); @@ -92,7 +104,7 @@ const api = { }, demo: { upload: { - url: `https://www.fastmock.site/mock/44c807475f7eeba73409792255781935/api/upload`, + url: `${config.MOCK_URL}/upload`, name: "文件上传接口" }, select: { diff --git a/src/components/scTable/index.vue b/src/components/scTable/index.vue index 55fc3fd0..567d4f88 100644 --- a/src/components/scTable/index.vue +++ b/src/components/scTable/index.vue @@ -19,7 +19,9 @@
- +
+ +
@@ -47,6 +49,7 @@ data: { type: Object, default: () => {} }, rowKey: { type: String, default: "" }, column: { type: Object, default: () => {} }, + hidePagination: { type: Boolean, default: false }, hideDo: { type: Boolean, default: false }, stripe: { type: Boolean, default: false }, highlightCurrentRow: { type: Boolean, default: false }, diff --git a/src/config/index.js b/src/config/index.js index be07d8be..2ef870f7 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -3,10 +3,13 @@ const DEFAULT_CONFIG = { APP_NAME: "SCUI", //版本号 - APP_VER: "1.0.4", + APP_VER: "1.0.9", //接口地址 API_URL: "", + + //MOCK接口地址 + MOCK_URL: "https://www.fastmock.site/mock/44c807475f7eeba73409792255781935/api", //是否开启多标签 LAYOUT_TAGS: true, diff --git a/src/layout/components/NavMenu.vue b/src/layout/components/NavMenu.vue index df91c969..dd91dc5c 100644 --- a/src/layout/components/NavMenu.vue +++ b/src/layout/components/NavMenu.vue @@ -4,7 +4,7 @@
+ + diff --git a/src/views/setting/menu/index.vue b/src/views/setting/menu/index.vue index c6f59761..908ab894 100644 --- a/src/views/setting/menu/index.vue +++ b/src/views/setting/menu/index.vue @@ -1,28 +1,91 @@ - diff --git a/src/views/setting/menu/save.vue b/src/views/setting/menu/save.vue new file mode 100644 index 00000000..b538fc91 --- /dev/null +++ b/src/views/setting/menu/save.vue @@ -0,0 +1,111 @@ + + + + +