From 0fa2db5c9603661e9d2ce57032722e10d77c63be Mon Sep 17 00:00:00 2001 From: ibuler Date: Tue, 19 May 2020 11:05:58 +0800 Subject: [PATCH 1/8] =?UTF-8?q?[Update]=20=E4=BF=AE=E6=94=B9=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Dialog/index.vue | 24 +++++- .../ListTable/TableAction/ExportDialog.vue | 2 +- .../ListTable/TableAction/ImportDialog.vue | 79 ++++++++++++++++--- src/store/modules/common.js | 4 +- src/utils/request.js | 12 +-- 5 files changed, 102 insertions(+), 19 deletions(-) diff --git a/src/components/Dialog/index.vue b/src/components/Dialog/index.vue index f93878e35..ed65d0cb9 100644 --- a/src/components/Dialog/index.vue +++ b/src/components/Dialog/index.vue @@ -7,8 +7,8 @@ @@ -21,6 +21,26 @@ export default { title: { type: String, default: 'Title' + }, + showCancel: { + type: Boolean, + default: true + }, + cancelTitle: { + type: String, + default() { + return this.$t('common.Cancel') + } + }, + showConfirm: { + type: Boolean, + default: true + }, + confirmTitle: { + type: String, + default() { + return this.$t('common.Confirm') + } } }, data() { diff --git a/src/components/ListTable/TableAction/ExportDialog.vue b/src/components/ListTable/TableAction/ExportDialog.vue index 527404204..a875d223d 100644 --- a/src/components/ListTable/TableAction/ExportDialog.vue +++ b/src/components/ListTable/TableAction/ExportDialog.vue @@ -1,5 +1,5 @@ diff --git a/src/views/dashboard/DatesLoginSummary/LoginMetric.vue b/src/views/dashboard/DatesLoginSummary/LoginMetric.vue index d8ffd30ec..80b319c58 100644 --- a/src/views/dashboard/DatesLoginSummary/LoginMetric.vue +++ b/src/views/dashboard/DatesLoginSummary/LoginMetric.vue @@ -1,134 +1,166 @@ + + diff --git a/src/views/dashboard/DatesLoginSummary/index.vue b/src/views/dashboard/DatesLoginSummary/index.vue index 6f0f04040..60875e6a0 100644 --- a/src/views/dashboard/DatesLoginSummary/index.vue +++ b/src/views/dashboard/DatesLoginSummary/index.vue @@ -16,7 +16,7 @@ - + diff --git a/yarn.lock b/yarn.lock index 7fc333ac1..6bbce58d4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2689,6 +2689,11 @@ core-js@^2.4.0, core-js@^2.5.0, core-js@^2.5.7, core-js@^2.6.5: version "2.6.11" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" +core-js@^3.4.4: + version "3.6.5" + resolved "https://registry.npm.taobao.org/core-js/download/core-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a" + integrity sha1-c5XcJzrzf7LlDpvT2f6EEoUjHRo= + core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -3331,21 +3336,6 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" -echarts-amap@1.0.0-rc.6: - version "1.0.0-rc.6" - resolved "https://registry.npm.taobao.org/echarts-amap/download/echarts-amap-1.0.0-rc.6.tgz#5782a74daee52ed44ce3f8f62577561783f09e16" - integrity sha1-V4KnTa7lLtRM4/j2JXdWF4PwnhY= - -echarts-liquidfill@^2.0.2: - version "2.0.5" - resolved "https://registry.npm.taobao.org/echarts-liquidfill/download/echarts-liquidfill-2.0.5.tgz#0d505a75c2dfb69950e18d440bdf3fe1795a0eed" - integrity sha1-DVBadcLftplQ4Y1EC98/4XlaDu0= - -echarts-wordcloud@^1.1.3: - version "1.1.3" - resolved "https://registry.npm.taobao.org/echarts-wordcloud/download/echarts-wordcloud-1.1.3.tgz#07b140c8ba76b19c317b43c310f3d5dc99289ff2" - integrity sha1-B7FAyLp2sZwxe0PDEPPV3Jkon/I= - echarts@^4.7.0: version "4.7.0" resolved "https://registry.npm.taobao.org/echarts/download/echarts-4.7.0.tgz?cache=0&sync_timestamp=1584522755461&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fecharts%2Fdownload%2Fecharts-4.7.0.tgz#5b3875a4c2f91e3929425fabab9eace7e4098b3f" @@ -6864,11 +6854,6 @@ number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" -numerify@1.2.9: - version "1.2.9" - resolved "https://registry.npm.taobao.org/numerify/download/numerify-1.2.9.tgz#af4696bb1d57f8d3970a615d8b0cd53d932bd559" - integrity sha1-r0aWux1X+NOXCmFdiwzVPZMr1Vk= - nwsapi@^2.0.7: version "2.2.0" resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7" @@ -8214,6 +8199,11 @@ reselect@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/reselect/-/reselect-3.0.1.tgz#efdaa98ea7451324d092b2b2163a6a1d7a9a2147" +resize-detector@^0.1.10: + version "0.1.10" + resolved "https://registry.npm.taobao.org/resize-detector/download/resize-detector-0.1.10.tgz#1da3f961aa5f914ccbcfd3752d52fd45beeb692c" + integrity sha1-HaP5YapfkUzLz9N1LVL9Rb7raSw= + resize-observer-polyfill@^1.5.0: version "1.5.1" resolved "https://registry.yarnpkg.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz#0e9020dd3d21024458d4ebd27e23e40269810464" @@ -9552,11 +9542,6 @@ utila@^0.4.0, utila@~0.4: version "0.4.0" resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" -utils-lite@0.1.10: - version "0.1.10" - resolved "https://registry.npm.taobao.org/utils-lite/download/utils-lite-0.1.10.tgz#d2908c0482e23c31e6b082558540e7134ffad7d7" - integrity sha1-0pCMBILiPDHmsIJVhUDnE0/619c= - utils-merge@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" @@ -9565,17 +9550,6 @@ uuid@^3.0.1, uuid@^3.3.2: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" -v-charts@^1.19.0: - version "1.19.0" - resolved "https://registry.npm.taobao.org/v-charts/download/v-charts-1.19.0.tgz#07b701800b159bd514264ffc8bf12b0405142da3" - integrity sha1-B7cBgAsVm9UUJk/8i/ErBAUULaM= - dependencies: - echarts-amap "1.0.0-rc.6" - echarts-liquidfill "^2.0.2" - echarts-wordcloud "^1.1.3" - numerify "1.2.9" - utils-lite "0.1.10" - validate-npm-package-license@^3.0.1: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" @@ -9616,6 +9590,15 @@ vue-cookie@^1.1.4: dependencies: tiny-cookie "^1.0" +vue-echarts@^5.0.0-beta.0: + version "5.0.0-beta.0" + resolved "https://registry.npm.taobao.org/vue-echarts/download/vue-echarts-5.0.0-beta.0.tgz#438dd4b0fc5ccea281709c1f7c6321b05352bdf4" + integrity sha1-Q43UsPxczqKBcJwffGMhsFNSvfQ= + dependencies: + core-js "^3.4.4" + lodash "^4.17.15" + resize-detector "^0.1.10" + vue-eslint-parser@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-2.0.3.tgz#c268c96c6d94cfe3d938a5f7593959b0ca3360d1" From 13a1082c79d2b77c30c799b02028662c1953bee7 Mon Sep 17 00:00:00 2001 From: ibuler Date: Tue, 19 May 2020 21:03:03 +0800 Subject: [PATCH 5/8] =?UTF-8?q?[Update]=20=E4=BF=AE=E6=94=B9dashboard?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dashboard/DatesLoginSummary/LoginActivePin.vue | 5 +++++ src/views/dashboard/DatesLoginSummary/LoginMetric.vue | 1 + 2 files changed, 6 insertions(+) diff --git a/src/views/dashboard/DatesLoginSummary/LoginActivePin.vue b/src/views/dashboard/DatesLoginSummary/LoginActivePin.vue index a86e4e2b9..c6d36201d 100644 --- a/src/views/dashboard/DatesLoginSummary/LoginActivePin.vue +++ b/src/views/dashboard/DatesLoginSummary/LoginActivePin.vue @@ -15,6 +15,7 @@ From b895af5cfea31557f9827e46b7df4aa6c9ed9c7c Mon Sep 17 00:00:00 2001 From: xinwen Date: Wed, 20 May 2020 16:40:53 +0800 Subject: [PATCH 7/8] [Add] gathered user task --- .../GatheredUserList.vue} | 23 +++++++++- .../xpack/GatheredUser/TaskCreateUpdate.vue | 46 +++++++++++++++++++ src/views/xpack/GatheredUser/TaskList.vue | 35 ++++++++++++++ src/views/xpack/router.js | 27 +++++++++-- 4 files changed, 127 insertions(+), 4 deletions(-) rename src/views/xpack/{GatherUser.vue => GatheredUser/GatheredUserList.vue} (61%) create mode 100644 src/views/xpack/GatheredUser/TaskCreateUpdate.vue create mode 100644 src/views/xpack/GatheredUser/TaskList.vue diff --git a/src/views/xpack/GatherUser.vue b/src/views/xpack/GatheredUser/GatheredUserList.vue similarity index 61% rename from src/views/xpack/GatherUser.vue rename to src/views/xpack/GatheredUser/GatheredUserList.vue index cc24229c5..77db4c940 100644 --- a/src/views/xpack/GatherUser.vue +++ b/src/views/xpack/GatheredUser/GatheredUserList.vue @@ -1,5 +1,5 @@ diff --git a/src/views/xpack/GatheredUser/TaskCreateUpdate.vue b/src/views/xpack/GatheredUser/TaskCreateUpdate.vue new file mode 100644 index 000000000..bc124141e --- /dev/null +++ b/src/views/xpack/GatheredUser/TaskCreateUpdate.vue @@ -0,0 +1,46 @@ + + + + + diff --git a/src/views/xpack/GatheredUser/TaskList.vue b/src/views/xpack/GatheredUser/TaskList.vue new file mode 100644 index 000000000..e0b8a33f8 --- /dev/null +++ b/src/views/xpack/GatheredUser/TaskList.vue @@ -0,0 +1,35 @@ + + + + + diff --git a/src/views/xpack/router.js b/src/views/xpack/router.js index 70a305604..0f340bb5f 100644 --- a/src/views/xpack/router.js +++ b/src/views/xpack/router.js @@ -21,9 +21,30 @@ export default { }, { path: 'gathered-users', - component: () => import('@/views/xpack/GatherUser'), - name: 'GatherUser', - meta: { title: 'GatherUser' } + component: () => import('@/views/xpack/GatheredUser/GatheredUserList'), + name: 'GatherUserList', + meta: { title: 'GatherUserList' } + }, + { + path: 'gathered-users/tasks', + component: () => import('@/views/xpack/GatheredUser/TaskList'), + name: 'GatherUserTaskList', + meta: { title: 'GatherUserTask' }, + hidden: true + }, + { + path: 'gathered-users/tasks/create', + component: () => import('@/views/xpack/GatheredUser/TaskCreateUpdate'), + name: 'GatherUserTaskCreate', + meta: { title: 'GatherUserTaskCreate', action: 'create' }, + hidden: true + }, + { + path: 'gathered-users/tasks/update', + component: () => import('@/views/xpack/GatheredUser/TaskCreateUpdate'), + name: 'GatherUserTaskUpdate', + meta: { title: 'GatherUserTaskUpdate', action: 'update' }, + hidden: true } ] } From 049db348c61b8137a2848149c6866a8bd66ad9be Mon Sep 17 00:00:00 2001 From: Eric_Lee Date: Wed, 20 May 2020 17:25:25 +0800 Subject: [PATCH 8/8] [Update] interface view (#55) --- src/components/UploadField/index.vue | 31 ++++--- src/i18n/langs/cn.json | 9 ++ src/views/xpack/InterfaceSettings.vue | 124 +++++++++++++++++++++----- src/views/xpack/api.js | 25 ++++++ src/views/xpack/router.js | 3 +- 5 files changed, 158 insertions(+), 34 deletions(-) create mode 100644 src/views/xpack/api.js diff --git a/src/components/UploadField/index.vue b/src/components/UploadField/index.vue index f87f907ec..d18184e77 100644 --- a/src/components/UploadField/index.vue +++ b/src/components/UploadField/index.vue @@ -1,12 +1,11 @@ diff --git a/src/views/xpack/api.js b/src/views/xpack/api.js new file mode 100644 index 000000000..25d386ca6 --- /dev/null +++ b/src/views/xpack/api.js @@ -0,0 +1,25 @@ +import request from '@/utils/request' + +export function postInterface(formData) { + return request({ + url: '/api/v1/xpack/interface/setting', + method: 'put', + headers: { + 'Content-Type': 'multipart/form-data' + }, + data: formData + }) +} +export function getInterfaceInfo() { + return request({ + url: '/api/v1/xpack/interface/setting', + method: 'get' + }) +} + +export function restoreInterface() { + return request({ + url: '/xpack/interface/restore/default', + method: 'get' + }) +} diff --git a/src/views/xpack/router.js b/src/views/xpack/router.js index 0f340bb5f..aa7d43865 100644 --- a/src/views/xpack/router.js +++ b/src/views/xpack/router.js @@ -1,4 +1,5 @@ import Layout from '@/layout/index' +import i18n from '@/i18n/i18n' export default { path: '/xpack', @@ -11,7 +12,7 @@ export default { path: 'interface-setting', component: () => import('@/views/xpack/InterfaceSettings.vue'), name: 'InterfaceSetting', - meta: { title: 'InterfaceSetting' } + meta: { title: i18n.t('xpack.InterfaceSettings') } }, { path: 'license',