diff --git a/src/assets/css/components/views/setting/knowledgeBase.scss b/src/assets/css/components/views/setting/knowledgeBase.scss index 34602449..7495e195 100644 --- a/src/assets/css/components/views/setting/knowledgeBase.scss +++ b/src/assets/css/components/views/setting/knowledgeBase.scss @@ -1905,6 +1905,9 @@ &.update-dialog__table--psiphon3 { height: calc(90vh - 190px - 200px - 50px - 10px); } + &.update-dialog__table--system-user { + height: calc(100% - 139px); + } } .update-knowledge-form { .el-upload { diff --git a/src/components/table/setting/knowledgeBaseTableForCard.vue b/src/components/table/setting/knowledgeBaseTableForCard.vue index 61603ce2..e257dd9d 100644 --- a/src/components/table/setting/knowledgeBaseTableForCard.vue +++ b/src/components/table/setting/knowledgeBaseTableForCard.vue @@ -66,7 +66,9 @@
@@ -127,7 +129,7 @@
-
+
@@ -155,7 +161,7 @@ -
+
{{$t('knowledgeBase.psiphon3IpCount')}}
@@ -526,7 +532,9 @@ export default { timeChange () { this.timeFilter.endTime = window.$dayJs.tz().valueOf() this.timeFilter.startTime = this.timeFilter.endTime - this.selectTime * 60 * 1000 - this.init() + if (this.updateKnowledge.source === 'cn_psiphon3_ip') { + this.init() + } this.$nextTick(() => { this.handleActiveBar() }) @@ -536,7 +544,9 @@ export default { this.tabType = item.class } this.legendSelectChange(item) - this.init() + if (this.updateKnowledge.source === 'cn_psiphon3_ip') { + this.init() + } }, mouseenterTab (item) { if (this.isNoDataForPsiphon3) return @@ -578,7 +588,9 @@ export default { this.$message.success(this.$t('tip.success')) this.showAddUpdateDialog = false this.getCurTabData() - this.init() + if (this.updateKnowledge.source === 'cn_psiphon3_ip') { + this.init() + } /* } else { this.$message.error(this.$t('tip.uploadFailed', { msg: response.message })) } */ @@ -613,6 +625,13 @@ export default { data.isSelected = val this.$emit('checkboxStatusChange', val, data) }, + beforeClose (done) { + if (this.myChart) { + this.myChart.dispose() + this.myChart = null + } + done() + }, handleClose () { this.showUpdateDialog = false this.showAddUpdateDialog = false @@ -632,7 +651,9 @@ export default { this.updateKnowledge = data this.showEnable = showEnable await this.getCurTabData() - await this.init() + if (data.source === 'cn_psiphon3_ip') { + await this.init() + } this.showUpdate() this.$nextTick(() => { this.handleActiveBar() @@ -677,6 +698,9 @@ export default { // 切换tab handleClick (tab) { this.getCurTabData() + if (tab.index === '1') { + this.init() + } }, clearSelect () { this.$nextTick(() => { @@ -743,7 +767,9 @@ export default { }, timeFilter: { handler () { - this.init() + if (this.updateKnowledge.source === 'cn_psiphon3_ip') { + this.init() + } this.$nextTick(() => { this.handleActiveBar() }) @@ -772,6 +798,14 @@ export default { } } }, + activeTab (n) { + if (n === 'updateRecord') { + if (this.myChart) { + this.myChart.dispose() + this.myChart = null + } + } + }, showAddUpdateDialog: { handler (n) { if (!n) { @@ -780,8 +814,10 @@ export default { this.init() } } else { - this.myChart && this.myChart.dispose() - this.myChart = null + if (this.myChart) { + this.myChart.dispose() + this.myChart = null + } } } }