fix: 1.CN-1446 学习IP趋势图里未按照选择的时间范围展示对应时间周期;2.初次进入知识库的学习引擎日志tab,底部柱状图未初始化当前tab

This commit is contained in:
hyx
2023-11-01 16:05:34 +08:00
parent 98948ff179
commit 65827d27e4

View File

@@ -256,7 +256,7 @@
</el-form> </el-form>
</div> </div>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button @click="showAddUpdateDialog = false">{{ $t('overall.cancel') }}</el-button> <el-button @click="cancle">{{ $t('overall.cancel') }}</el-button>
<el-button type="primary" @click="submitConfirm">{{ $t('tip.confirm') }}</el-button> <el-button type="primary" @click="submitConfirm">{{ $t('tip.confirm') }}</el-button>
</div> </div>
</template> </template>
@@ -283,8 +283,8 @@
<div class="dialog-message">{{ confirmSwitchLearningTip }}</div> <div class="dialog-message">{{ confirmSwitchLearningTip }}</div>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="showConfirmSwitch = false">{{ $t('overall.cancel') }}</el-button> <el-button @click="cancleSwitch">{{ $t('overall.cancel') }}</el-button>
<el-button type="primary" @click="switchLearning">OK</el-button> <el-button type="primary" @click="switchLearning">{{$t('tip.confirm')}}</el-button>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
@@ -427,7 +427,6 @@ export default {
}, },
xAxis: { xAxis: {
type: 'time', type: 'time',
boundaryGap: ['1%', '3%'],
axisLine: { axisLine: {
show: false show: false
}, },
@@ -605,10 +604,19 @@ export default {
}, },
submitConfirm () { submitConfirm () {
this.showConfirmDialog = true this.showConfirmDialog = true
this.$nextTick(() => {
this.handleActiveBar()
})
}, },
submit () { submit () {
this.$refs.knowledgeUpload.submit() this.$refs.knowledgeUpload.submit()
}, },
cancle(){
this.showAddUpdateDialog = false
this.$nextTick(() => {
this.handleActiveBar()
})
},
clickCard (data, event) { clickCard (data, event) {
if (data.isSelected) { // 原来为选中,当前点击后未选中 if (data.isSelected) { // 原来为选中,当前点击后未选中
const index = this.checkList.indexOf(data) const index = this.checkList.indexOf(data)
@@ -704,6 +712,9 @@ export default {
this.getCurTabData() this.getCurTabData()
if (tab.index === '1') { if (tab.index === '1') {
this.init() this.init()
this.$nextTick(() => {
this.handleActiveBar()
})
} }
}, },
clearSelect () { clearSelect () {
@@ -743,6 +754,9 @@ export default {
this.switchKnowledgeId = id this.switchKnowledgeId = id
return false return false
}, },
cancleSwitch(){
this.showConfirmSwitch = false
},
switchLearning () { switchLearning () {
const hint = this.aiTaggingList.find(d => d.knowledgeId === this.switchKnowledgeId) const hint = this.aiTaggingList.find(d => d.knowledgeId === this.switchKnowledgeId)
const toStatus = hint.status === 0 ? 1 : 0 const toStatus = hint.status === 0 ? 1 : 0