From 157bc08f84999104e3dfedb464458a80fa89016d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Mon, 18 Jul 2022 15:09:18 +0800 Subject: [PATCH 1/8] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=8F=B3=E9=94=AE?= =?UTF-8?q?=E8=B5=84=E4=BA=A7=E6=A0=91=E5=90=8E=E7=82=B9=E5=87=BB=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E5=88=B0=E5=85=B6=E4=BB=96=E7=BB=84=E7=BB=87=E4=B8=8D?= =?UTF-8?q?=E7=94=9F=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/common.js | 8 ++++++-- src/utils/org.js | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/utils/common.js b/src/utils/common.js index 70e04abbf..4c260272c 100644 --- a/src/utils/common.js +++ b/src/utils/common.js @@ -155,8 +155,12 @@ export function formatDate(inputTime) { const uuidPattern = /[0-9a-zA-Z\-]{36}/ -export function hasUUID(s) { - return s.search(uuidPattern) !== -1 +export function hasUUID(path) { + const index = path.indexOf('?') + if (index !== -1) { + path = path.substring(0, index) + } + return path.search(uuidPattern) !== -1 } export function replaceUUID(s, n) { diff --git a/src/utils/org.js b/src/utils/org.js index 4eb18ba71..6cd0a5d3d 100644 --- a/src/utils/org.js +++ b/src/utils/org.js @@ -26,6 +26,10 @@ async function changeOrg(org) { path = _.trimEnd(path, '/') location.href = path } else { + const index = path.indexOf('?') + if (index !== -1) { + location.href = path.substring(0, index) + } setTimeout(() => location.reload(), 400) } } From 7701bc9b67ddaf47ee7e2494abcae413bb165ff4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Mon, 18 Jul 2022 16:04:15 +0800 Subject: [PATCH 2/8] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BB=8E=E5=AE=A1?= =?UTF-8?q?=E6=89=B9=E5=B7=A5=E5=8D=95=E8=BF=9B=E5=85=A5=E8=B5=84=E4=BA=A7?= =?UTF-8?q?=E6=8E=88=E6=9D=83=E7=82=B9=E5=87=BB=E6=9B=B4=E6=96=B0=E5=90=8E?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=B8=8D=E5=88=B0=E6=95=B0=E6=8D=AE=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/GenericDetailPage/index.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/layout/components/GenericDetailPage/index.vue b/src/layout/components/GenericDetailPage/index.vue index 33e65f5c9..f70de513b 100644 --- a/src/layout/components/GenericDetailPage/index.vue +++ b/src/layout/components/GenericDetailPage/index.vue @@ -197,6 +197,10 @@ export default { if (typeof route === 'string') { route = { name: route, params: {}} } + route = { + ...route, + query: this.$route.query || {} + } route.params.id = id this.$router.push(route) }, From 5dca562a1216e98d5e51b9f6f9c5ea3702063155 Mon Sep 17 00:00:00 2001 From: huangzhiwen Date: Tue, 19 Jul 2022 14:54:27 +0800 Subject: [PATCH 3/8] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E5=8A=A8=E4=BD=9C?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E4=B8=BA=E9=BB=98=E8=AE=A4=E5=85=A8=E5=B1=95?= =?UTF-8?q?=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/perms/components/PermissionFormActionField.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/perms/components/PermissionFormActionField.vue b/src/views/perms/components/PermissionFormActionField.vue index 32c640c39..2598273b3 100644 --- a/src/views/perms/components/PermissionFormActionField.vue +++ b/src/views/perms/components/PermissionFormActionField.vue @@ -3,7 +3,7 @@ :data="iData" show-checkbox node-key="id" - :default-expand-all="false" + :default-expand-all="true" :default-checked-keys="value" :props="defaultProps" v-bind="$attrs" From 25c04e9c05eb099d6a432395b8eb7c0847856f1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Tue, 19 Jul 2022 10:21:23 +0800 Subject: [PATCH 4/8] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E9=80=89=E4=B8=AD=E9=A1=B9=E9=BC=A0=E6=A0=87hover=E9=A2=9C?= =?UTF-8?q?=E8=89=B2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/theme/element-extra.css | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/public/theme/element-extra.css b/public/theme/element-extra.css index 63178e29f..b1c897cf7 100644 --- a/public/theme/element-extra.css +++ b/public/theme/element-extra.css @@ -200,15 +200,9 @@ td .el-button.el-button--mini { font-weight: 400; } -.el-select-dropdown.is-multiple .el-select-dropdown__item.selected { - color: #606266; - background-color: #ddd; - font-weight: 400; -} - -.el-select-dropdown__item.hover, .el-select-dropdown__item:hover { +.el-select-dropdown__item.hover { background-color: primary; - color: white!important; + color: white; } .el-select-dropdown__item.is-disabled:hover{ From 8b499d8f7ffb933f802d99a1b492ffd2581afc4e Mon Sep 17 00:00:00 2001 From: fit2bot <68588906+fit2bot@users.noreply.github.com> Date: Tue, 19 Jul 2022 15:14:45 +0800 Subject: [PATCH 5/8] =?UTF-8?q?pref:=20=E4=BC=98=E5=8C=96=E4=BD=93?= =?UTF-8?q?=E9=AA=8C=20(#1952)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * perf: 修改 padding * pref: 优化体验 Co-authored-by: ibuler --- public/theme/element-extra.css | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/public/theme/element-extra.css b/public/theme/element-extra.css index b1c897cf7..73e741bff 100644 --- a/public/theme/element-extra.css +++ b/public/theme/element-extra.css @@ -14,7 +14,7 @@ .el-button--text:hover { background-color: rgba(0, 0, 0, .05); } - + .el-button--success { background-color: success; border-color: success; @@ -412,6 +412,11 @@ td .el-button.el-button--mini { .el-dialog .el-dialog__body { max-height: 90vh; overflow: auto; + padding: 30px; +} + +.el-dialog .el-dialog__body form { + padding-right: 20px; } .el-cascader { From ea682a2aaa8768221ac97808b051cd05326736ef Mon Sep 17 00:00:00 2001 From: ibuler Date: Tue, 19 Jul 2022 15:36:23 +0800 Subject: [PATCH 6/8] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=20dialog=20foote?= =?UTF-8?q?r=20padding?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/theme/element-extra.css | 4 ++++ src/views/settings/Message/SelectDialog.vue | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/public/theme/element-extra.css b/public/theme/element-extra.css index 73e741bff..04a457f1e 100644 --- a/public/theme/element-extra.css +++ b/public/theme/element-extra.css @@ -419,6 +419,10 @@ td .el-button.el-button--mini { padding-right: 20px; } +.el-dialog .el-dialog__footer { + padding: 10px 30px 30px; +} + .el-cascader { line-height: 34px; } diff --git a/src/views/settings/Message/SelectDialog.vue b/src/views/settings/Message/SelectDialog.vue index 2964ff46b..706341665 100644 --- a/src/views/settings/Message/SelectDialog.vue +++ b/src/views/settings/Message/SelectDialog.vue @@ -2,8 +2,8 @@ Date: Mon, 18 Jul 2022 15:07:27 +0800 Subject: [PATCH 7/8] =?UTF-8?q?perf:=20=E4=BF=AE=E6=94=B9=20org=20?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/zh.json | 2 +- src/store/getters.js | 2 +- src/store/modules/users.js | 4 ++-- src/views/tickets/RequestApplicationPerm/CreateUpdate.vue | 4 ++-- src/views/tickets/RequestAssetPerm/CreateUpdate.vue | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/i18n/langs/zh.json b/src/i18n/langs/zh.json index 07d1fb96a..dada9281d 100644 --- a/src/i18n/langs/zh.json +++ b/src/i18n/langs/zh.json @@ -1530,7 +1530,7 @@ "NoLicense": "暂无许可证", "Node": "节点", "Organization": { - "AllOrganization": "所有组织", + "AllOrganization": "组织列表", "OrganizationCreate": "创建组织", "OrganizationLists": "组织列表", "OrganizationDetail": "组织详情", diff --git a/src/store/getters.js b/src/store/getters.js index f095f6bc6..6e491a8eb 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -7,7 +7,7 @@ const getters = { consoleOrgs: state => state.users.consoleOrgs, auditOrgs: state => state.users.auditOrgs, workbenchOrgs: state => state.users.workbenchOrgs, - notRootWorkbenchOrgs: state => state.users.notRootWorkbenchOrgs, + noRootWorkbenchOrgs: state => state.users.noRootWorkbenchOrgs, usingOrgs: state => state.users.usingOrgs, currentOrg: state => state.users.currentOrg, currentOrgIsDefault: state => state.users.currentOrg['is_default'], diff --git a/src/store/modules/users.js b/src/store/modules/users.js index 3878a3e32..3069a71cd 100644 --- a/src/store/modules/users.js +++ b/src/store/modules/users.js @@ -17,7 +17,7 @@ const getDefaultState = () => { auditOrgs: [], consoleOrgs: [], workbenchOrgs: [], - notRootWorkbenchOrgs: [], + noRootWorkbenchOrgs: [], usingOrgs: [], perms: [], MFAVerifyAt: null, @@ -43,7 +43,7 @@ const mutations = { state.perms = profile.perms state.consoleOrgs = profile['console_orgs'] state.workbenchOrgs = profile['workbench_orgs'] - state.notRootWorkbenchOrgs = profile['workbench_orgs'].filter(item => { + state.noRootWorkbenchOrgs = profile['workbench_orgs'].filter(item => { return item.id !== '00000000-0000-0000-0000-000000000000' }) state.auditOrgs = profile['audit_orgs'] diff --git a/src/views/tickets/RequestApplicationPerm/CreateUpdate.vue b/src/views/tickets/RequestApplicationPerm/CreateUpdate.vue index 6e95ba83d..f6f8249f6 100644 --- a/src/views/tickets/RequestApplicationPerm/CreateUpdate.vue +++ b/src/views/tickets/RequestApplicationPerm/CreateUpdate.vue @@ -127,7 +127,7 @@ export default { component: Select2, el: { multiple: false, - options: this.$store.state.users.notRootWorkbenchOrgs?.map((item) => { + options: this.$store.state.users.noRootWorkbenchOrgs?.map((item) => { return { label: item.name, value: item.id } }) }, @@ -161,7 +161,7 @@ export default { }, computed: { ...mapState({ - workbenchOrgs: state => state.users.notRootWorkbenchOrgs + workbenchOrgs: state => state.users.noRootWorkbenchOrgs }), ...mapGetters(['currentOrg']) }, diff --git a/src/views/tickets/RequestAssetPerm/CreateUpdate.vue b/src/views/tickets/RequestAssetPerm/CreateUpdate.vue index e50244dc4..c036b4fc7 100644 --- a/src/views/tickets/RequestAssetPerm/CreateUpdate.vue +++ b/src/views/tickets/RequestAssetPerm/CreateUpdate.vue @@ -105,7 +105,7 @@ export default { component: Select2, el: { multiple: false, - options: this.$store.state.users.notRootWorkbenchOrgs?.map((item) => { + options: this.$store.state.users.noRootWorkbenchOrgs?.map((item) => { return { label: item.name, value: item.id } }) }, @@ -135,7 +135,7 @@ export default { }, computed: { ...mapState({ - workbenchOrgs: state => state.users.notRootWorkbenchOrgs + workbenchOrgs: state => state.users.noRootWorkbenchOrgs }), ...mapGetters(['currentOrg']) }, From 86ead728588509ce6a31c96182318d09a7742a4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chuailei000=E2=80=9D?= <2280131253@qq.com> Date: Tue, 19 Jul 2022 10:48:28 +0800 Subject: [PATCH 8/8] =?UTF-8?q?fix:=20=E5=88=9B=E5=BB=BA=E5=B7=A5=E5=8D=95?= =?UTF-8?q?-=E5=88=87=E6=8D=A2=E7=BB=84=E7=BB=87=E6=97=B6=E6=B8=85?= =?UTF-8?q?=E7=A9=BA=E8=8A=82=E7=82=B9=E3=80=81=E8=B5=84=E4=BA=A7=E3=80=81?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E7=94=A8=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tickets/RequestApplicationPerm/CreateUpdate.vue | 8 ++++++++ src/views/tickets/RequestAssetPerm/CreateUpdate.vue | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/src/views/tickets/RequestApplicationPerm/CreateUpdate.vue b/src/views/tickets/RequestApplicationPerm/CreateUpdate.vue index f6f8249f6..c54c92619 100644 --- a/src/views/tickets/RequestApplicationPerm/CreateUpdate.vue +++ b/src/views/tickets/RequestApplicationPerm/CreateUpdate.vue @@ -139,6 +139,14 @@ export default { fieldsMeta.apply_applications.el.ajax.url = `/api/v1/applications/applications/suggestions/?oid=${vm.org_id}&category=${apply_category_type[0]}&type=${apply_category_type[1]}` fieldsMeta.apply_system_users.el.ajax.url = apply_category_type[0] === 'remote_app' ? `/api/v1/assets/system-users/suggestions/?oid=${vm.org_id}&protocol=rdp` : `/api/v1/assets/system-users/suggestions/?oid=${vm.org_id}&protocol=${apply_category_type[1]}` } + }, + on: { + change: ([event], updateForm) => { + updateForm({ + apply_applications: [], + apply_system_users: [] + }) + } } } }, diff --git a/src/views/tickets/RequestAssetPerm/CreateUpdate.vue b/src/views/tickets/RequestAssetPerm/CreateUpdate.vue index c036b4fc7..848481eae 100644 --- a/src/views/tickets/RequestAssetPerm/CreateUpdate.vue +++ b/src/views/tickets/RequestAssetPerm/CreateUpdate.vue @@ -114,6 +114,15 @@ export default { fieldsMeta.apply_system_users.el.ajax.url = `/api/v1/assets/system-users/suggestions/?oid=${form['org_id']}&protocol__in=rdp,ssh,vnc,telnet` fieldsMeta.apply_assets.el.ajax.url = `/api/v1/assets/assets/suggestions/?oid=${form['org_id']}` fieldsMeta.apply_nodes.el.ajax.url = `/api/v1/assets/nodes/suggestions/?oid=${form['org_id']}` + }, + on: { + change: ([event], updateForm) => { + updateForm({ + apply_nodes: [], + apply_assets: [], + apply_system_users: [] + }) + } } } },