fix: 增加删除sample列表时清理 calibration-gamma 的功能

This commit is contained in:
Xu Zhimeng 2023-11-02 18:02:33 +08:00
parent 2704aab82d
commit ea08ccdf63
2 changed files with 6 additions and 0 deletions

View File

@ -1,5 +1,7 @@
import { deleteAction } from '@/api/manage'
import store from '@/store'
import Vue from 'vue'
/**
* 发起请求清理后端对sample的缓存
* @param {Array<any>} sampleList
@ -15,5 +17,6 @@ export const clearSampleCache = (sampleList) => {
}
deleteAction(url, params)
store.commit('REMOVE_SAMPLE_DATA', fileName)
Vue.ls.remove(`calibration-gamma:${fileName}`)
})
}

View File

@ -414,11 +414,14 @@ export default {
// inputFileName: 'CAX05_001-20230731_1528_S_FULL_37563.6.PHD',
// })
this.getColorConfig()
window.addEventListener('beforeunload', this.handleCleanAll)
},
destroyed() {
this.$bus.$off('reanalyse', this.handleReanalyse)
this.$store.commit('CLEAR_SAMPLE_DATA')
this.handleCleanAll()
window.removeEventListener('beforeunload', this.handleCleanAll)
},
methods: {