From ca871b16c49717341f2cf04e2c1048f0b62a9bc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=B9=BF?= Date: Fri, 11 Nov 2022 19:26:04 +0800 Subject: [PATCH 1/2] =?UTF-8?q?Revert=20"perf:=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E9=A1=B5=E9=9D=A2=E6=96=B9=E6=B3=95=EF=BC=8C?= =?UTF-8?q?=E9=81=BF=E5=85=8D=E5=88=B7=E6=96=B0=E6=97=B6=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E7=A9=BA=E7=99=BD"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit a514e88b7873e8bffeb2a7d0cb41334bad7452e3. --- src/App.vue | 11 ++--------- src/store/modules/common.js | 9 +-------- src/utils/org.js | 2 +- .../ChangeAuthPlanDetail/ChangeAuthPlanApp/index.vue | 2 +- .../ChangeAuthPlanAsset/index.vue | 4 ++-- .../AssetPermissionDetail/AssetPermissionAsset.vue | 2 +- .../sessions/SessionDetail/SessionDetailInfo.vue | 2 +- src/views/settings/Interface.vue | 4 ++-- src/views/settings/License.vue | 3 +-- .../RequestApplicationPerm/Detail/TicketDetail.vue | 2 +- .../tickets/RequestAssetPerm/Detail/TicketDetail.vue | 2 +- src/views/tickets/TicketFlow/Detail/TicketDetail.vue | 2 +- src/views/tickets/components/Comments.vue | 2 +- 13 files changed, 16 insertions(+), 31 deletions(-) diff --git a/src/App.vue b/src/App.vue index 8de84169c..fed5caa5f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,19 +1,12 @@ diff --git a/src/store/modules/common.js b/src/store/modules/common.js index f3ac0e80e..e26944216 100644 --- a/src/store/modules/common.js +++ b/src/store/modules/common.js @@ -2,8 +2,7 @@ import { optionUrlMeta } from '@/api/common' const getDefaultState = () => { return { - metaMap: {}, - isRouterAlive: true + metaMap: {} } } @@ -12,12 +11,6 @@ const state = getDefaultState() const mutations = { SET_URL_META: (state, { url, meta }) => { state.metaMap[url] = meta - }, - reload: (state) => { - state.isRouterAlive = false - setTimeout(() => { - state.isRouterAlive = true - }, 0) } } diff --git a/src/utils/org.js b/src/utils/org.js index ea18b8f77..6cd0a5d3d 100644 --- a/src/utils/org.js +++ b/src/utils/org.js @@ -30,7 +30,7 @@ async function changeOrg(org) { if (index !== -1) { location.href = path.substring(0, index) } - setTimeout(() => store.commit('common/reload'), 400) + setTimeout(() => location.reload(), 400) } } diff --git a/src/views/accounts/ChangeAuthPlan/AppChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanApp/index.vue b/src/views/accounts/ChangeAuthPlan/AppChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanApp/index.vue index 4d8ef9037..74ae7e95e 100644 --- a/src/views/accounts/ChangeAuthPlan/AppChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanApp/index.vue +++ b/src/views/accounts/ChangeAuthPlan/AppChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanApp/index.vue @@ -98,7 +98,7 @@ export default { that.iHasObjects = [...that.iHasObjects, ...objects] that.$refs.select2.clearSelected() this.$message.success(this.$t('common.updateSuccessMsg')) - this.$store.commit('common/reload') + window.location.reload() this.$refs.listTable.$refs.ListTable.reloadTable() } } diff --git a/src/views/accounts/ChangeAuthPlan/AssetChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanAsset/index.vue b/src/views/accounts/ChangeAuthPlan/AssetChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanAsset/index.vue index e420c086a..ecca8a67e 100644 --- a/src/views/accounts/ChangeAuthPlan/AssetChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanAsset/index.vue +++ b/src/views/accounts/ChangeAuthPlan/AssetChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanAsset/index.vue @@ -93,7 +93,7 @@ export default { onAddSuccess: (items, that) => { this.$log.debug('AssetSelect value', that.assets) this.$message.success(this.$t('common.updateSuccessMsg')) - this.$store.commit('common/reload') + window.location.reload() } }, nodeRelationConfig: { @@ -120,7 +120,7 @@ export default { that.iHasObjects = [...that.iHasObjects, ...objects] that.$refs.select2.clearSelected() this.$message.success(this.$t('common.updateSuccessMsg')) - this.$store.commit('common/reload') + window.location.reload() }, performDelete: (item) => { const data = { diff --git a/src/views/perms/AssetPermission/AssetPermissionDetail/AssetPermissionAsset.vue b/src/views/perms/AssetPermission/AssetPermissionDetail/AssetPermissionAsset.vue index 526e73bc4..2e4fa30e8 100644 --- a/src/views/perms/AssetPermission/AssetPermissionDetail/AssetPermissionAsset.vue +++ b/src/views/perms/AssetPermission/AssetPermissionDetail/AssetPermissionAsset.vue @@ -93,7 +93,7 @@ export default { this.$message.success(this.$t('common.updateSuccessMsg')) this.$refs.ListTable.reloadTable() that.$refs.assetSelect.$refs.select2.clearSelected() - this.$store.commit('common/reload') + window.location.reload() } }, nodeRelationConfig: { diff --git a/src/views/sessions/SessionDetail/SessionDetailInfo.vue b/src/views/sessions/SessionDetail/SessionDetailInfo.vue index 4dc3315b8..1bb503e75 100644 --- a/src/views/sessions/SessionDetail/SessionDetailInfo.vue +++ b/src/views/sessions/SessionDetail/SessionDetailInfo.vue @@ -49,7 +49,7 @@ export default { const msg = vm.$t('sessions.TerminateTaskSendSuccessMsg') vm.$message.success(msg) window.setTimeout(function() { - this.$store.commit('common/reload') + window.location.reload() }, 50000) }) } diff --git a/src/views/settings/Interface.vue b/src/views/settings/Interface.vue index 2b1e7aeac..b5b7b8800 100644 --- a/src/views/settings/Interface.vue +++ b/src/views/settings/Interface.vue @@ -175,7 +175,7 @@ export default { }).then(() => { restoreInterface().then(res => { this.$message.success(res.success) - this.$store.commit('common/reload') + location.reload() }) }) }.bind(this) @@ -221,7 +221,7 @@ export default { } } updateInterface(form).then(res => { - this.$store.commit('common/reload') + location.reload() }) } } diff --git a/src/views/settings/License.vue b/src/views/settings/License.vue index c485534a4..d3d9c19a5 100644 --- a/src/views/settings/License.vue +++ b/src/views/settings/License.vue @@ -140,7 +140,6 @@ export default { window.open(url, '_blank') }, importLicense() { - const vm = this if (this.licenseFile['file'] === undefined) { return } @@ -149,7 +148,7 @@ export default { importLicense(formData).then(res => { if (res.status) { this.$message.success(res.msg) - setTimeout(() => vm.$store.commit('common/reload'), 500) + setTimeout(() => location.reload(), 500) } else { this.$message.error(res.msg) } diff --git a/src/views/tickets/RequestApplicationPerm/Detail/TicketDetail.vue b/src/views/tickets/RequestApplicationPerm/Detail/TicketDetail.vue index d07cb7c4e..c710e7625 100644 --- a/src/views/tickets/RequestApplicationPerm/Detail/TicketDetail.vue +++ b/src/views/tickets/RequestApplicationPerm/Detail/TicketDetail.vue @@ -236,7 +236,7 @@ export default { return toSafeLocalDateStr(dataStr) }, reloadPage() { - this.$store.commit('common/reload') + window.location.reload() }, handleApprove() { if (this.object.approval_step === this.object.process_map.length) { diff --git a/src/views/tickets/RequestAssetPerm/Detail/TicketDetail.vue b/src/views/tickets/RequestAssetPerm/Detail/TicketDetail.vue index 82f93b6c3..8665046e5 100644 --- a/src/views/tickets/RequestAssetPerm/Detail/TicketDetail.vue +++ b/src/views/tickets/RequestAssetPerm/Detail/TicketDetail.vue @@ -244,7 +244,7 @@ export default { return toSafeLocalDateStr(dataStr) }, reloadPage() { - this.$store.commit('common/reload') + window.location.reload() }, handleApprove() { if (this.object.approval_step === this.object.process_map.length) { diff --git a/src/views/tickets/TicketFlow/Detail/TicketDetail.vue b/src/views/tickets/TicketFlow/Detail/TicketDetail.vue index 8d1db855d..c47920336 100644 --- a/src/views/tickets/TicketFlow/Detail/TicketDetail.vue +++ b/src/views/tickets/TicketFlow/Detail/TicketDetail.vue @@ -88,7 +88,7 @@ export default { return toSafeLocalDateStr(dataStr) }, reloadPage() { - this.$store.commit('common/reload') + window.location.reload() } } } diff --git a/src/views/tickets/components/Comments.vue b/src/views/tickets/components/Comments.vue index ea9513bf3..4e70e0bd6 100644 --- a/src/views/tickets/components/Comments.vue +++ b/src/views/tickets/components/Comments.vue @@ -199,7 +199,7 @@ export default { ) }, reloadPage() { - this.$store.commit('common/reload') + window.location.reload() } } From bb1d19610efa7b567e6ee694e8536778f622605a Mon Sep 17 00:00:00 2001 From: jiangweidong Date: Fri, 11 Nov 2022 11:20:05 +0800 Subject: [PATCH 2/2] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E6=97=A5=E5=BF=97=E7=95=8C=E9=9D=A2=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=9A=8F=E4=B8=BB=E9=A2=98=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TableFormatters/TwoTabFormatter.vue | 10 +++++----- src/utils/theme/index.js | 3 +++ src/views/audits/OperateLogList.vue | 12 ++++++++++-- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/components/TableFormatters/TwoTabFormatter.vue b/src/components/TableFormatters/TwoTabFormatter.vue index 97ef8747b..f429a5070 100644 --- a/src/components/TableFormatters/TwoTabFormatter.vue +++ b/src/components/TableFormatters/TwoTabFormatter.vue @@ -6,17 +6,17 @@
- {{ row.leftTitle }} -
- {{ key }}: {{ value }} + {{ row.leftTitle }} +
+ {{ key }}: {{ value }}
- {{ row.rightTitle }} + {{ row.rightTitle }}
- {{ key }}: {{ value }} + {{ key }}: {{ value }}
diff --git a/src/utils/theme/index.js b/src/utils/theme/index.js index 5b532a8a2..2ec465de9 100644 --- a/src/utils/theme/index.js +++ b/src/utils/theme/index.js @@ -39,6 +39,9 @@ export function changeElementColor(themeColors) { .el-link.el-link--${key}:after { border-color: ${value}!important; } + .el-tag--dark.el-tag--${key} { + background-color: ${value} !important; + } ` } } diff --git a/src/views/audits/OperateLogList.vue b/src/views/audits/OperateLogList.vue index cb21b4916..5cd6dfb0c 100644 --- a/src/views/audits/OperateLogList.vue +++ b/src/views/audits/OperateLogList.vue @@ -1,6 +1,10 @@