diff --git a/public/json/app.json b/public/json/app.json index 0211e556..ab014744 100644 --- a/public/json/app.json +++ b/public/json/app.json @@ -7,16 +7,16 @@ "appName": "自助机", "appId": "selfHelp", "secret": "YuOju6lP3t4thLbZOhRSV4UZ79vdnwIC", - "type": "ALL", - "exp": "长期" + "type": ["ALL"], + "exp": "2035-01-01 00:00:00" }, { "id": "101", "appName": "微信小程序", "appId": "WechatApp", "secret": "WgBbsRtCeXiNXIYkkShxxvqOGrAYKK2e", - "type": "", - "exp": "长期" + "type": ["UPDATA", "QUERY"], + "exp": "2023-06-01 00:00:00" } ], "message": "" diff --git a/public/json/login.json b/public/json/login.json index e1523ed8..066e66a0 100644 --- a/public/json/login.json +++ b/public/json/login.json @@ -209,7 +209,7 @@ }, { "path": "/setting/menu", - "name": "menu", + "name": "settingMenu", "meta": { "title": "菜单管理" }, @@ -222,6 +222,14 @@ "title": "应用管理" }, "component": "setting/client" + }, + { + "path": "/setting/log", + "name": "log", + "meta": { + "title": "系统日志" + }, + "component": "setting/log" } ] } diff --git a/src/api/index.js b/src/api/index.js index 7c85ac2e..8660dab7 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -81,7 +81,20 @@ const api = { } } }, + log: { + list: { + url: `${config.API_URL}/json/log.json`, + name: "日志列表", + get: async function(){ + return await http.get(this.url); + } + } + }, demo: { + upload: { + url: `https://www.fastmock.site/mock/44c807475f7eeba73409792255781935/api/upload`, + name: "文件上传接口" + }, select: { url: `${config.API_URL}/json/select.json`, name: "下拉菜单数据", diff --git a/src/components/scUpload/index.vue b/src/components/scUpload/index.vue index 7c91ad12..4f34ea9a 100644 --- a/src/components/scUpload/index.vue +++ b/src/components/scUpload/index.vue @@ -4,10 +4,10 @@
- +
- +

{{title}}

@@ -22,6 +22,9 @@ export default { props: { modelValue: { type: String, default: "" }, + action: { type: String, default: "#" }, + accept: { type: String, default: ".jpg, .png, .jpeg, .gif" }, + maxSize: { type: Number, default: 10 }, title: { type: String, default: "上传" }, }, data() { @@ -45,6 +48,11 @@ }, methods: { before(file){ + const maxSize = file.size / 1024 / 1024 < this.maxSize; + if (!maxSize) { + this.$message.warning('上传文件大小不能超过 10MB!'); + return false; + } this.tempImg = URL.createObjectURL(file); this.loading = true; }, @@ -56,6 +64,7 @@ }else{ this.img = res.data.src; } + this.$emit('on-success', res) }, error(err){ this.$notify.error({ @@ -74,11 +83,9 @@ diff --git a/src/views/setting/dic/index.vue b/src/views/setting/dic/index.vue index 44f5ddbc..33a8d49d 100644 --- a/src/views/setting/dic/index.vue +++ b/src/views/setting/dic/index.vue @@ -43,7 +43,7 @@ @@ -158,6 +158,9 @@ this.dicMode = 'edit'; this.dicDialogVisible = true; this.$nextTick(() => { + var editNode = this.$refs.dic.getNode(data.id); + var editNodeParentId = editNode.level==1?undefined:editNode.parent.data.id + data.parentId = editNodeParentId this.$refs.dicDialog.setData(data) }) }, diff --git a/src/views/setting/log/index.vue b/src/views/setting/log/index.vue new file mode 100644 index 00000000..77127169 --- /dev/null +++ b/src/views/setting/log/index.vue @@ -0,0 +1,73 @@ + + + + + diff --git a/src/views/setting/menu/index.vue b/src/views/setting/menu/index.vue index 349c0ce0..c6f59761 100644 --- a/src/views/setting/menu/index.vue +++ b/src/views/setting/menu/index.vue @@ -1,6 +1,9 @@