From 06b9225037fa7406753cbc2e8e818b473b131a47 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Mon, 2 Dec 2019 22:56:34 +0800 Subject: [PATCH] feat: add OptionsList. --- src/api/attachment.js | 10 +- src/api/option.js | 19 ++ src/views/system/OptionForm.vue | 2 +- .../system/developer/DeveloperOptions.vue | 12 +- .../system/developer/tabs/OptionsList.vue | 245 ++++++++++++++++++ 5 files changed, 280 insertions(+), 8 deletions(-) create mode 100644 src/views/system/developer/tabs/OptionsList.vue diff --git a/src/api/attachment.js b/src/api/attachment.js index 21584ad7..e36c11db 100644 --- a/src/api/attachment.js +++ b/src/api/attachment.js @@ -77,23 +77,23 @@ attachmentApi.type = { text: 'SM.MS' }, UPOSS: { - type: 'upyun', + type: 'uposs', text: '又拍云' }, QINIUOSS: { - type: 'qnyun', + type: 'qiniuoss', text: '七牛云' }, ALIOSS: { - type: 'aliyun', + type: 'alioss', text: '阿里云' }, BAIDUBOS: { - type: 'baiduyun', + type: 'baidubos', text: '百度云' }, TENCENTCOS: { - type: 'tencentyun', + type: 'tencentcos', text: '腾讯云' } } diff --git a/src/api/option.js b/src/api/option.js index 4b3e59be..f3ff61cc 100644 --- a/src/api/option.js +++ b/src/api/option.js @@ -14,6 +14,14 @@ optionApi.listAll = keys => { }) } +optionApi.query = params => { + return service({ + url: `${baseUrl}/list_view`, + params: params, + method: 'get' + }) +} + optionApi.save = options => { return service({ url: `${baseUrl}/map_view/saving`, @@ -22,4 +30,15 @@ optionApi.save = options => { }) } +optionApi.type = { + INTERNAL: { + type: 'internal', + text: '系统' + }, + CUSTOM: { + type: 'custom', + text: '自定义' + } +} + export default optionApi diff --git a/src/views/system/OptionForm.vue b/src/views/system/OptionForm.vue index c8de3fac..e8916134 100644 --- a/src/views/system/OptionForm.vue +++ b/src/views/system/OptionForm.vue @@ -160,7 +160,7 @@ - + diff --git a/src/views/system/developer/DeveloperOptions.vue b/src/views/system/developer/DeveloperOptions.vue index eb3955b2..7a1052f6 100644 --- a/src/views/system/developer/DeveloperOptions.vue +++ b/src/views/system/developer/DeveloperOptions.vue @@ -13,12 +13,18 @@ - + 实时日志 + + + 系统变量 + + + 设置 @@ -43,11 +49,13 @@ import { mapGetters } from 'vuex' import Environment from './tabs/Environment' import RuntimeLogs from './tabs/RuntimeLogs' import SettingsForm from './tabs/SettingsForm' +import OptionsList from './tabs/OptionsList' export default { components: { Environment, RuntimeLogs, - SettingsForm + SettingsForm, + OptionsList }, computed: { ...mapGetters(['options']) diff --git a/src/views/system/developer/tabs/OptionsList.vue b/src/views/system/developer/tabs/OptionsList.vue new file mode 100644 index 00000000..c8bcc567 --- /dev/null +++ b/src/views/system/developer/tabs/OptionsList.vue @@ -0,0 +1,245 @@ + +