From 207c316d53055c3c3dcdcbb4eff672468344b142 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E7=8F=AE=E5=AE=87?= Date: Mon, 11 Mar 2024 15:23:19 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=85=88=E6=9F=A5=E6=9C=89=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=9A=84=E6=97=A5=E6=9C=9F=EF=BC=8C=E5=86=8D=E6=9F=A5?= =?UTF-8?q?=E6=B2=A1=E6=95=B0=E6=8D=AE=E7=9A=84=E6=97=A5=E6=9C=9F=EF=BC=8C?= =?UTF-8?q?=E9=A5=BC=E5=9B=BE=E6=95=B0=E6=8D=AE=E6=B2=A1=E6=B8=85=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../analysisMonitor/alarmAnalysis/index.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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() }) }, }, From 628689fb45df5532cf9d1913131a30bd3da116bd Mon Sep 17 00:00:00 2001 From: Xu Zhimeng Date: Mon, 11 Mar 2024 18:24:34 +0800 Subject: [PATCH 2/5] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E9=83=A8=E5=88=86?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=80=A7=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/sample.js | 4 +- .../spectrumAnalysis/beta-gamma-analysis.vue | 18 ++++- src/views/spectrumAnalysis/gamma-analysis.vue | 78 ++++++++++--------- src/views/spectrumAnalysis/index.vue | 1 - 4 files changed, 58 insertions(+), 43 deletions(-) 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/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 6269585..66bcb00 100644 --- a/src/views/spectrumAnalysis/index.vue +++ b/src/views/spectrumAnalysis/index.vue @@ -602,7 +602,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 From 89a06fab30dbd33564da045fe075c6e71099e2f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E7=8F=AE=E5=AE=87?= Date: Tue, 12 Mar 2024 11:52:11 +0800 Subject: [PATCH 3/5] =?UTF-8?q?Database=20Monitor=20=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=96=E5=80=BC=E5=AD=97=E6=AE=B5=EF=BC=8C?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B6=85=E5=87=BA=E9=9A=90=E8=97=8F=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=20=E6=B7=BB=E5=8A=A0=E6=82=AC=E6=B5=AE=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E6=A1=86=EF=BC=8C=E5=8F=8A=E6=A0=B7=E5=BC=8F=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../databaseMonitor/alarmHistory/index.vue | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) 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 From fa9ad25892c63699f47284fc1b518b6bdba3f64a Mon Sep 17 00:00:00 2001 From: Xu Zhimeng Date: Tue, 12 Mar 2024 14:01:50 +0800 Subject: [PATCH 4/5] =?UTF-8?q?fix:=20=E5=A2=9E=E5=8A=A0=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E5=88=B0=E5=8F=B0=E7=AB=99=E5=9C=B0=E5=9B=BE=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E5=8F=B0=E7=AB=99=E5=88=97=E8=A1=A8=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=EF=BC=8C=E4=BF=AE=E6=94=B9=E5=B0=8F=E8=BD=A6=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E8=AF=B7=E6=B1=82=E7=9A=84=E6=97=A5=E6=9C=9F=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stationOperation/components/MapPane.vue | 10 +++---- src/views/stationOperation/index.vue | 26 +++++-------------- 2 files changed, 11 insertions(+), 25 deletions(-) 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]') { From 88eb8d89b7c4f722aac1ad59b3e9a2e6f6c39700 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E7=8F=AE=E5=AE=87?= Date: Tue, 12 Mar 2024 14:57:48 +0800 Subject: [PATCH 5/5] =?UTF-8?q?center=20=E6=9C=8D=E5=8A=A1=E5=99=A8=20?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=20=E9=82=AE=E7=AE=B1=20=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=A1=B5=E9=9D=A2=E8=B0=83=E6=95=B4=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E5=BD=A2=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alarmCenter/alarmHistory/index.vue | 12 +++++++----- .../emailMonitor/alarmHistory/index.vue | 15 +++++++++------ .../serverMonitor/alarmHistory/index.vue | 15 +++++++++------ 3 files changed, 25 insertions(+), 17 deletions(-) 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/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;