diff --git a/src/store/modules/sample.js b/src/store/modules/sample.js index c13d6dd..71219e2 100644 --- a/src/store/modules/sample.js +++ b/src/store/modules/sample.js @@ -1,7 +1,7 @@ const sample = { - state: { + state: Object.freeze({ sampleList: [] // [{ inputFileName: String; data: Object; }] - }, + }), mutations: { SET_SAMPLE_LIST: (state, sampleList) => { state.sampleList = sampleList diff --git a/src/views/abnormalAlarm/alarmCenter/alarmHistory/index.vue b/src/views/abnormalAlarm/alarmCenter/alarmHistory/index.vue index 080e624..67b9c98 100644 --- a/src/views/abnormalAlarm/alarmCenter/alarmHistory/index.vue +++ b/src/views/abnormalAlarm/alarmCenter/alarmHistory/index.vue @@ -15,11 +15,12 @@ :canSelect="false" > @@ -91,6 +92,7 @@ const columns = [ { title: 'ALARM INFO', align: 'left', + ellipsis: true, dataIndex: 'alarmInfo', scopedSlots: { customRender: 'info', diff --git a/src/views/abnormalAlarm/analysisMonitor/alarmAnalysis/index.vue b/src/views/abnormalAlarm/analysisMonitor/alarmAnalysis/index.vue index cf03f68..b638675 100644 --- a/src/views/abnormalAlarm/analysisMonitor/alarmAnalysis/index.vue +++ b/src/views/abnormalAlarm/analysisMonitor/alarmAnalysis/index.vue @@ -41,6 +41,7 @@ export default { pieData: [], pieColors: ['#00bcd4', '#14b2a3', '#97b94b', '#47b55d'], pieTotal: 0, + sourceChart: null, } }, mounted() { @@ -113,6 +114,8 @@ export default { this.pieData = res.result.pieData this.pieTotal = res.result.pieTotal this.drawRightChart() + } else { + this.sourceChart.clear() } } else { this.$message.warning('This operation fails. Contact your system administrator') @@ -247,7 +250,7 @@ export default { }) }, drawRightChart() { - let myChart = echarts.init(document.getElementById('chartRight')) + this.sourceChart = echarts.init(document.getElementById('chartRight')) let options = { tooltip: { trigger: 'item', @@ -308,9 +311,9 @@ export default { }, ], } - myChart.setOption(options) + this.sourceChart.setOption(options) window.addEventListener('resize', function () { - myChart.resize() + this.sourceChart.resize() }) }, }, diff --git a/src/views/abnormalAlarm/databaseMonitor/alarmHistory/index.vue b/src/views/abnormalAlarm/databaseMonitor/alarmHistory/index.vue index 97f82ed..b34412b 100644 --- a/src/views/abnormalAlarm/databaseMonitor/alarmHistory/index.vue +++ b/src/views/abnormalAlarm/databaseMonitor/alarmHistory/index.vue @@ -10,13 +10,15 @@ :loading="loading" :pagination="false" :canSelect="false" + :scroll="{ y: 655 }" > .server-main { - width: 100%; + // width: 100%; height: calc(100% - 50px); overflow: hidden; padding-top: 15px; @@ -177,7 +180,7 @@ export default { } .info-alarm { font-family: ArialMT; - font-size: 18px; - color: #f62424; + font-size: 16px; + // color: #f62424; } \ No newline at end of file diff --git a/src/views/abnormalAlarm/emailMonitor/alarmHistory/index.vue b/src/views/abnormalAlarm/emailMonitor/alarmHistory/index.vue index 2bac943..ee3e663 100644 --- a/src/views/abnormalAlarm/emailMonitor/alarmHistory/index.vue +++ b/src/views/abnormalAlarm/emailMonitor/alarmHistory/index.vue @@ -10,13 +10,15 @@ :loading="loading" :pagination="false" :canSelect="false" + :scroll="{ y: 655 }" > .server-main { - width: 100%; + // width: 100%; height: calc(100% - 50px); overflow: hidden; padding-top: 15px; diff --git a/src/views/abnormalAlarm/serverMonitor/alarmHistory/index.vue b/src/views/abnormalAlarm/serverMonitor/alarmHistory/index.vue index d421b2c..18c1ba1 100644 --- a/src/views/abnormalAlarm/serverMonitor/alarmHistory/index.vue +++ b/src/views/abnormalAlarm/serverMonitor/alarmHistory/index.vue @@ -10,13 +10,15 @@ :loading="loading" :pagination="false" :canSelect="false" + :scroll="{ y: 655 }" > .server-main { - width: 100%; + // width: 100%; height: calc(100% - 50px); overflow: hidden; padding-top: 15px; diff --git a/src/views/spectrumAnalysis/beta-gamma-analysis.vue b/src/views/spectrumAnalysis/beta-gamma-analysis.vue index 12c1881..f921acb 100644 --- a/src/views/spectrumAnalysis/beta-gamma-analysis.vue +++ b/src/views/spectrumAnalysis/beta-gamma-analysis.vue @@ -307,8 +307,8 @@ export default { const { dbName, sampleId, inputFileName, analyst } = this.sample try { - this.isLoading = true this.cancelLastRequest() + this.isLoading = true const cancelToken = this.createCancelToken() const { success, result, message } = await getAction( '/spectrumAnalysis/getDBSpectrumChart', @@ -320,6 +320,7 @@ export default { cancelToken ) if (success) { + this.isLoading = false this.sampleDetail = result this.changeChartByType('sample') this.emitGetFiles(result) @@ -334,8 +335,10 @@ export default { } } catch (error) { console.error(error) - } finally { - this.isLoading = false + const isCancel = axios.isCancel(error) + if(!isCancel) { + this.isLoading = false + } } }, @@ -356,8 +359,8 @@ export default { qcFileName: this.sample.qcFileStatus ? this.sample.qcFileName : '', } try { - this.isLoading = true this.cancelLastRequest() + this.isLoading = true const cancelToken = this.createCancelToken() const { success, result, message } = await getAction( '/spectrumAnalysis/getFileSpectrumChart', @@ -379,12 +382,17 @@ export default { } } catch (error) { console.error(error) + const isCancel = axios.isCancel(error) + if(!isCancel) { + this.isLoading = false + } } }, cancelLastRequest() { if (this._cancelToken && typeof this._cancelToken == 'function') { this._cancelToken() + this._cancelToken = undefined } }, @@ -653,6 +661,8 @@ export default { this.resultDisplay = [] const sampleData = await this.$store.dispatch('GET_SAMPLE_DATA', newVal.inputFileName) if (sampleData) { + this.cancelLastRequest() + this.isLoading = false const { data, from } = sampleData this.sampleDetail = data this.changeChartByType('sample') diff --git a/src/views/spectrumAnalysis/gamma-analysis.vue b/src/views/spectrumAnalysis/gamma-analysis.vue index dd3e522..bbeca39 100644 --- a/src/views/spectrumAnalysis/gamma-analysis.vue +++ b/src/views/spectrumAnalysis/gamma-analysis.vue @@ -163,6 +163,36 @@ export default { StripModal, }, data() { + this.channelData = { + peakGroup: [], + spectrumLine: null, + baseLine: null, + lcLine: null, + scacLine: null, + all: null, + baseLineCP: [], + + compareLine: null, + stripSumOrCutLine: null, + stripReferenceLine: null, + } + + this.energyData = { + peakGroup: [], + spectrumLine: null, + baseLine: null, + lcLine: null, + scacLine: null, + all: null, + baseLineCP: [], + + compareLine: null, + stripSumOrCutLine: null, + stripReferenceLine: null, + } + ;(this.peakList = []), // Peak 列表(非点位) + (this.baseCtrls = {}) // BaseCtrls + return { abc: false, isLoading: false, @@ -183,35 +213,6 @@ export default { qcFlagsVisible: false, }, - channelData: { - peakGroup: [], - spectrumLine: null, - baseLine: null, - lcLine: null, - scacLine: null, - all: null, - baseLineCP: [], - - compareLine: null, - stripSumOrCutLine: null, - stripReferenceLine: null, - }, - energyData: { - peakGroup: [], - spectrumLine: null, - baseLine: null, - lcLine: null, - scacLine: null, - all: null, - baseLineCP: [], - - compareLine: null, - stripSumOrCutLine: null, - stripReferenceLine: null, - }, - peakList: [], // Peak 列表(非点位) - baseCtrls: {}, // BaseCtrls - nuclideLibraryList: [], // 当前鼠标点击选中的channel peakInfomationTooltip: { // Peak Infomation的位置 @@ -251,6 +252,8 @@ export default { window.addEventListener('keydown', this.handleKeyboardEvent) window.addEventListener('click', this.closePeakInfomationTooltip) + + console.log('%c [ this.channelData ]-256', 'font-size:13px; background:#e2a49d; color:#ffe8e1;', this.channelData) }, destroyed() { this.cancelLastRequest() @@ -502,9 +505,9 @@ export default { async getSampleDetail() { const { dbName, sampleId, analyst } = this.sample try { - this.isLoading = true // const { success, result, message } = Response this.cancelLastRequest() + this.isLoading = true const cancelToken = this.createCancelToken() const { success, result, message } = await getAction( @@ -516,7 +519,6 @@ export default { }, cancelToken ) - console.log('%c [ result ]-243', 'font-size:13px; background:pink; color:#bf2c9f;', result) if (success) { this.dataProcess(result, 'db') } else { @@ -526,7 +528,7 @@ export default { } catch (error) { console.error(error) const isCancel = axios.isCancel(error) - if(!isCancel) { + if (!isCancel) { this.isLoading = false } } @@ -535,10 +537,9 @@ export default { async getSampleDetail_file() { const { inputFileName: fileName } = this.sample try { - this.isLoading = true // const { success, result, message } = Response - this.cancelLastRequest() + this.isLoading = true const cancelToken = this.createCancelToken() const { success, result, message } = await getAction( @@ -548,7 +549,6 @@ export default { }, cancelToken ) - console.log('%c [ result ]-243', 'font-size:13px; background:pink; color:#bf2c9f;', result) if (success) { this.dataProcess(result, 'file') } else { @@ -557,7 +557,10 @@ export default { } } catch (error) { console.error(error) - this.isLoading = false + const isCancel = axios.isCancel(error) + if (!isCancel) { + this.isLoading = false + } } }, @@ -658,6 +661,8 @@ export default { baseLineCP: shapeEnergyData, } + console.log('%c [ this.channelData ]-664', 'font-size:13px; background:#9bcb26; color:#dfff6a;', this.channelData) + this.resetThumbnailChartDataMax() // 设置 Spectrum Line @@ -2190,5 +2195,6 @@ export default { pointer-events: none; background-color: #55a9fe; border-color: #55a9fe; + user-select: none; } diff --git a/src/views/spectrumAnalysis/index.vue b/src/views/spectrumAnalysis/index.vue index 76f1bea..5f7ace3 100644 --- a/src/views/spectrumAnalysis/index.vue +++ b/src/views/spectrumAnalysis/index.vue @@ -642,7 +642,6 @@ export default { // 加载选中的样本 async loadSelectedSample(sample) { - console.log('%c [ sample ]-381', 'font-size:13px; background:pink; color:red;', sample) // B是beta-gamma P G是gamma if (sample.sampleType == 'B') { this.analysisType = ANALYZE_TYPE.BETA_GAMMA diff --git a/src/views/stationOperation/components/MapPane.vue b/src/views/stationOperation/components/MapPane.vue index e250db4..ade94d8 100644 --- a/src/views/stationOperation/components/MapPane.vue +++ b/src/views/stationOperation/components/MapPane.vue @@ -169,18 +169,16 @@
Start Date
End Date
diff --git a/src/views/stationOperation/index.vue b/src/views/stationOperation/index.vue index 40b78d6..ebdc8c5 100644 --- a/src/views/stationOperation/index.vue +++ b/src/views/stationOperation/index.vue @@ -183,19 +183,6 @@ export default { ScrollContainer, DataListItem, }, - watch: { - $route: { - handler: function (val, oldVal) { - console.log('fasdfasde12312', val) - console.log('8765432', oldVal) - if (val.name === 'station-operation') { - this.getDataProvisionEfficiency(this.markerList_clone) - } - }, - deep: true, - // immediate: true, - }, - }, deactivated() { //等同于 销毁的生命周期 console.log('切换出发了3') @@ -205,6 +192,8 @@ export default { }, activated() { this.getFollowedStationList() + this.getStationList() + this.getStationTree() }, data() { return { @@ -246,9 +235,7 @@ export default { } }, created() { - this.getStationList() this.getStationTypeList() - this.getStationTree() }, beforeDestroy() { clearInterval(this.timer) @@ -270,7 +257,7 @@ export default { this.markerList = cloneDeep(res).filter((stationInfo) => stationInfo.stationType !== MarkerType.NuclearFacility) // 去除核设施 this.markerList_clone = cloneDeep(res) - this.getDataProvisionEfficiency(this.markerList_clone, 'one') + this.getDataProvisionEfficiency(this.markerList_clone) // this.timer = setInterval(() => { // setTimeout(() => { // this.getDataProvisionEfficiency(this.markerList_clone) @@ -287,17 +274,18 @@ export default { }, // 查询台站数据提供率及有效率 - async getDataProvisionEfficiency(arr, str) { + async getDataProvisionEfficiency(arr) { this.httpNum++ - if (str && this.$route.path == '/station-operation') { + if (!this.loaded && this.$route.path == '/station-operation') { this.$message.loading({ content: 'Loading station data, please wait...', key, duration: 0 }) } getAction('/stationOperation/getDataProvisionEfficiency') .then((res) => { if (res.success) { this.$message.destroy() - if (str && this.$route.path == '/station-operation') { + if (!this.loaded && this.$route.path == '/station-operation') { this.$message.success({ content: 'Loaded!', key, duration: 2 }) + this.loaded = true } res.result.forEach((item) => { if (Object.prototype.toString.call(item) == '[object Object]') {