From 3add369ae1672bec4e4a307ffc2a4ff50731ef8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E7=8F=AE=E5=AE=87?= Date: Thu, 11 Jan 2024 14:01:15 +0800 Subject: [PATCH 01/12] =?UTF-8?q?spectrumAnalysis/getDBSearchList=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=A2=9E=E5=8A=A0=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Modals/CompareFromDBModal.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/views/spectrumAnalysis/components/Modals/CompareFromDBModal.vue b/src/views/spectrumAnalysis/components/Modals/CompareFromDBModal.vue index e42f966..fa3f05d 100644 --- a/src/views/spectrumAnalysis/components/Modals/CompareFromDBModal.vue +++ b/src/views/spectrumAnalysis/components/Modals/CompareFromDBModal.vue @@ -108,6 +108,7 @@ export default { this.columns = cloneDeep(columns) this.disableMixinCreated = true return { + searchSampleType: 'All', visible: false, loadType: 'compare', queryParam: { @@ -252,6 +253,7 @@ export default { const { success, result, message } = await getAction('/spectrumAnalysis/getDBSearchList', { AllUsers: this.allUsersValue, + sampleType: this.searchSampleType, }) if (success) { this.stationList = result.stationCode.map((item) => ({ label: item, value: item })) @@ -342,16 +344,22 @@ export default { }, ] if (event == 'B') { + this.searchSampleType = 'Beta' + this.getStationAndDetectorList() this.sampleTypeOption = arr_B this.$nextTick(() => { this.queryParam.sampleType = 'B' }) } else if (event == 'G') { + this.searchSampleType = 'Gamma' + this.getStationAndDetectorList() this.sampleTypeOption = arr_G this.$nextTick(() => { this.queryParam.sampleType = 'P' }) } else { + this.searchSampleType = 'All' + this.getStationAndDetectorList() this.sampleTypeOption = arr_A this.$nextTick(() => { this.queryParam.sampleType = '' From a7db410b164a6cfc926370a87e3e97fcb8f5b7d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E7=8F=AE=E5=AE=87?= Date: Thu, 11 Jan 2024 14:17:11 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=9C=80=E5=B0=8F?= =?UTF-8?q?=E5=8F=8A=EF=BC=8C=E5=8F=8A=E9=BB=98=E8=AE=A4=E5=80=BC=E5=9B=9E?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Modals/AnalyzeInteractiveToolModal/index.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue index 374841c..03e8b58 100644 --- a/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue +++ b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/index.vue @@ -127,6 +127,7 @@ @@ -762,6 +763,7 @@ export default { async getSelPosNuclide(row) { this.model.possibleNuclide = '' this.model.identifiedNuclide = '' + this.model.tolerance = 0.5 if (!row._possible) { this.$set(row, '_loading', true) From b63599ddf64cb8ef740c8c17588e443aaf40ff8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E7=8F=AE=E5=AE=87?= Date: Thu, 11 Jan 2024 15:27:33 +0800 Subject: [PATCH 03/12] =?UTF-8?q?=E6=97=A5=E6=9C=9F=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E8=A6=81=E4=B8=80=E5=91=A8=20=E5=88=87=E6=8D=A2=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=8F=B0=E7=AB=99=E5=92=8C=E6=97=A5=E6=9C=9F=E4=B8=8D?= =?UTF-8?q?=E8=A6=81=E6=B8=85=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/imsData/met/index.vue | 7 +- .../imsData/stateOfHealth/alerts.vue | 7 +- .../imsData/stateOfHealth/rmssoh.vue | 7 +- src/views/statistics/list.vue | 90 +++++++++++-------- 4 files changed, 66 insertions(+), 45 deletions(-) diff --git a/src/views/statistics/imsData/met/index.vue b/src/views/statistics/imsData/met/index.vue index 3ccea72..1a846e7 100644 --- a/src/views/statistics/imsData/met/index.vue +++ b/src/views/statistics/imsData/met/index.vue @@ -100,6 +100,7 @@ import { compareDate } from '../../commom' import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { getAction, getFileAction } from '../../../../api/manage' import dateFormat from '../../../../components/jeecg/JEasyCron/format-date' +import moment from 'moment' export default { name: 'menuTree', mixins: [JeecgListMixin], @@ -109,9 +110,9 @@ export default { isImmediate: true, columns, queryParam: { - startTime: dateFormat(new Date(), 'yyyy-MM-dd'), - endTime: dateFormat(new Date(), 'yyyy-MM-dd'), - stationIds: [], + startTime: sessionStorage.getItem('currStartDate') || moment().subtract(6, 'days').format('YYYY-MM-DD'), + endTime: sessionStorage.getItem('currEndDate') || moment().format('YYYY-MM-DD'), + stationIds: sessionStorage.getItem('selectedSta').split(',') || [], }, url: { list: '/webStatistics/findMetPage', diff --git a/src/views/statistics/imsData/stateOfHealth/alerts.vue b/src/views/statistics/imsData/stateOfHealth/alerts.vue index e3f9532..0ae0d36 100644 --- a/src/views/statistics/imsData/stateOfHealth/alerts.vue +++ b/src/views/statistics/imsData/stateOfHealth/alerts.vue @@ -80,6 +80,7 @@ import { compareDate } from '../../commom' import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { getAction, getFileAction } from '../../../../api/manage' import dateFormat from '../../../../components/jeecg/JEasyCron/format-date' +import moment from 'moment' export default { name: 'menuTree', mixins: [JeecgListMixin], @@ -89,9 +90,9 @@ export default { isImmediate: true, columns, queryParam: { - startTime: dateFormat(new Date(), 'yyyy-MM-dd'), - endTime: dateFormat(new Date(), 'yyyy-MM-dd'), - stationIds: [], + startTime: sessionStorage.getItem('currStartDate') || moment().subtract(6, 'days').format('YYYY-MM-DD'), + endTime: sessionStorage.getItem('currEndDate') || moment().format('YYYY-MM-DD'), + stationIds: sessionStorage.getItem('selectedSta').split(',') || [], }, url: { list: '/webStatistics/findAlertSohPage', diff --git a/src/views/statistics/imsData/stateOfHealth/rmssoh.vue b/src/views/statistics/imsData/stateOfHealth/rmssoh.vue index ff22b61..7ed5aba 100644 --- a/src/views/statistics/imsData/stateOfHealth/rmssoh.vue +++ b/src/views/statistics/imsData/stateOfHealth/rmssoh.vue @@ -78,6 +78,7 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { getAction, getFileAction } from '../../../../api/manage' import dateFormat from '../../../../components/jeecg/JEasyCron/format-date' import FileDetail from '../../fileDetail.vue' +import moment from 'moment' export default { name: 'menuTree', mixins: [JeecgListMixin], @@ -90,9 +91,9 @@ export default { isImmediate: true, columns, queryParam: { - startTime: dateFormat(new Date(), 'yyyy-MM-dd'), - endTime: dateFormat(new Date(), 'yyyy-MM-dd'), - stationIds: [], + startTime: sessionStorage.getItem('currStartDate') || moment().subtract(6, 'days').format('YYYY-MM-DD'), + endTime: sessionStorage.getItem('currEndDate') || moment().format('YYYY-MM-DD'), + stationIds: sessionStorage.getItem('selectedSta').split(',') || [], }, url: { list: '/webStatistics/findSohPage', diff --git a/src/views/statistics/list.vue b/src/views/statistics/list.vue index 7704928..f81ebfe 100644 --- a/src/views/statistics/list.vue +++ b/src/views/statistics/list.vue @@ -44,6 +44,7 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { getAction, getFileAction } from '../../api/manage' import dateFormat from '../../components/jeecg/JEasyCron/format-date' import Detail from './detail.vue' +import moment from 'moment' export default { name: 'menuTree', props: { @@ -76,18 +77,18 @@ export default { components: { Detail, }, - watch: { - fileName: { - handler: function (val) { - if (val === 'QCPHD' || val === 'SPHDF' || val === 'SPHDP') { - this.$nextTick(() => { - this.queryParam.startTime = this.getBeforeDate(6) - }) - } - }, - immediate: true, - }, - }, + // watch: { + // fileName: { + // handler: function (val) { + // // if (val === 'QCPHD' || val === 'SPHDF' || val === 'SPHDP') { + // this.$nextTick(() => { + // this.queryParam.startTime = this.getBeforeDate(6) + // }) + // // } + // }, + // immediate: true, + // }, + // }, data() { return { excelLoading: false, @@ -96,9 +97,9 @@ export default { isDetail: false, queryParam: { dataType: this.dataType, - startTime: dateFormat(new Date(), 'yyyy-MM-dd'), - endTime: dateFormat(new Date(), 'yyyy-MM-dd'), - stationIds: [], + startTime: sessionStorage.getItem('currStartDate') || moment().subtract(6, 'days').format('YYYY-MM-DD'), + endTime: sessionStorage.getItem('currEndDate') || moment().format('YYYY-MM-DD'), + stationIds: sessionStorage.getItem('selectedSta').split(',') || [], spectralQualifie: this.spectralQualifie, }, url: { @@ -185,6 +186,8 @@ export default { this.isDetail = flag }, handleSelectChange(val) { + console.log(val) + window.sessionStorage.setItem('selectedSta', val) let length = this.stationList.length if (val.length === length) { this.allChecked = true @@ -196,35 +199,44 @@ export default { this.allChecked = val if (val) { this.queryParam.stationIds = this.stationList.map((item) => item.value) + window.sessionStorage.setItem('selectedSta', vathis.queryParam.stationIdsl) } else { this.queryParam.stationIds = [] + window.sessionStorage.setItem('selectedSta', []) } }, filterOption(input, option) { return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 }, - // 获取n天前的日期 - getBeforeDate(n) { - var n = n - var d = new Date() - var year = d.getFullYear() - var mon = d.getMonth() + 1 - var day = d.getDate() - if (day <= n) { - if (mon > 1) { - mon = mon - 1 - } else { - year = year - 1 - mon = 12 - } - } - d.setDate(d.getDate() - n) - year = d.getFullYear() - mon = d.getMonth() + 1 - day = d.getDate() - var s = year + '-' + (mon < 10 ? '0' + mon : mon) + '-' + (day < 10 ? '0' + day : day) - return s + handleStartDateChange(date, dateString) { + console.log(date, dateString) + window.sessionStorage.setItem('currStartDate', date) }, + handleEndDateChange(date) { + window.sessionStorage.setItem('currEndDate', date) + }, + // // 获取n天前的日期 + // getBeforeDate(n) { + // var n = n + // var d = new Date() + // var year = d.getFullYear() + // var mon = d.getMonth() + 1 + // var day = d.getDate() + // if (day <= n) { + // if (mon > 1) { + // mon = mon - 1 + // } else { + // year = year - 1 + // mon = 12 + // } + // } + // d.setDate(d.getDate() - n) + // year = d.getFullYear() + // mon = d.getMonth() + 1 + // day = d.getDate() + // var s = year + '-' + (mon < 10 ? '0' + mon : mon) + '-' + (day < 10 ? '0' + day : day) + // return s + // }, }, computed: { formItems() { @@ -278,6 +290,9 @@ export default { width: '200px', }, }, + on: { + change: this.handleStartDateChange, + }, style: { width: 'auto', }, @@ -294,6 +309,9 @@ export default { width: '200px', }, }, + on: { + change: this.handleEndDateChange, + }, style: { width: 'auto', }, From 1cfb91a933eb6f6c4ce65c153955c2cbdd5aba8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E7=8F=AE=E5=AE=87?= Date: Thu, 11 Jan 2024 16:14:02 +0800 Subject: [PATCH 04/12] =?UTF-8?q?=20=E6=A0=B8=E8=AE=BE=E6=96=BD=E5=92=8C?= =?UTF-8?q?=E5=AE=9E=E9=AA=8C=E5=AE=A4=E4=B8=8D=E8=83=BD=E6=9C=89=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=BB=9F=E8=AE=A1=E7=9A=84=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/stationOperation/index.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/views/stationOperation/index.vue b/src/views/stationOperation/index.vue index 07a503c..bfffec8 100644 --- a/src/views/stationOperation/index.vue +++ b/src/views/stationOperation/index.vue @@ -254,7 +254,7 @@ export default { try { this.isGettingDataList = true const res = await getAction('/jeecg-station-operation/stationOperation/findList') - res.forEach(item => { + res.forEach((item) => { const { stationId, stationName, stationType } = item item._stationId = `${stationId}${stationName}${stationType}` }) @@ -548,7 +548,10 @@ export default { // 地图图标点击 onMarkerClick(stationInfo) { - this.$refs.mapPane.handleOpenAnalyzeModal(stationInfo) + const { stationType } = stationInfo + if (stationType !== 'NRL' && stationType !== 'Nuclear Facility') { + this.$refs.mapPane.handleOpenAnalyzeModal(stationInfo) + } }, /** From 183c1e96833b4f2d8f4b5427ab6bff1caf995dce Mon Sep 17 00:00:00 2001 From: orgin Date: Thu, 11 Jan 2024 17:13:03 +0800 Subject: [PATCH 05/12] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9arr=E5=92=8Crrr?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=EF=BC=8C=E4=BF=AE=E6=94=B9=E6=8E=A2=E6=B5=8B?= =?UTF-8?q?=E5=99=A8=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../statistics/imsProducts/arr/index.vue | 36 +++- .../statistics/imsProducts/rrr/index.vue | 38 +++- src/views/system/DetectorInfo.vue | 185 +++++++++++++----- 3 files changed, 204 insertions(+), 55 deletions(-) diff --git a/src/views/statistics/imsProducts/arr/index.vue b/src/views/statistics/imsProducts/arr/index.vue index 18fc93a..6fee30b 100644 --- a/src/views/statistics/imsProducts/arr/index.vue +++ b/src/views/statistics/imsProducts/arr/index.vue @@ -72,6 +72,16 @@ const columns = [ align: 'left', dataIndex: 'sampleId', }, + { + title: 'Qualifie', + align: 'left', + dataIndex: 'spectralQualifie', + }, + { + title: 'Analyst', + align: 'left', + dataIndex: 'analyst', + } ] import { compareDate } from '../../commom' import { JeecgListMixin } from '@/mixins/JeecgListMixin' @@ -210,6 +220,9 @@ export default { this.queryParam.stationIds = [] } }, + handleQualifieChange(val){ + this.queryParam.qualifie = val + }, getBeforeDate(n) { var n = n var d = new Date() @@ -238,7 +251,7 @@ export default { computed: { formItems() { return [ - { + /*{ type: 'a-input', label: '', name: 'search', @@ -251,7 +264,7 @@ export default { style: { width: 'auto', }, - }, + },*/ { type: 'custom-all-select', label: 'Stations', @@ -307,6 +320,25 @@ export default { width: 'auto', }, }, + { + type: 'a-select', + label: 'Qualifie', + name: 'qualifie', + props: { + allowClear: true, + placeholder: 'Select qualifie', + options: [{label: 'FULL', value: "FULL"}, {label: 'PREL', value: "PREL"}], + style: { + width: '200px', + }, + }, + on: { + change: this.handleQualifieChange, + }, + style: { + width: 'auto', + }, + } ] }, }, diff --git a/src/views/statistics/imsProducts/rrr/index.vue b/src/views/statistics/imsProducts/rrr/index.vue index 81dc4db..751c936 100644 --- a/src/views/statistics/imsProducts/rrr/index.vue +++ b/src/views/statistics/imsProducts/rrr/index.vue @@ -72,6 +72,16 @@ const columns = [ align: 'left', dataIndex: 'sampleId', }, + { + title: 'Qualifie', + align: 'left', + dataIndex: 'spectralQualifie', + }, + { + title: 'Analyst', + align: 'left', + dataIndex: 'analyst', + } ] import { compareDate } from '../../commom' import { JeecgListMixin } from '@/mixins/JeecgListMixin' @@ -93,6 +103,7 @@ export default { startTime: dateFormat(new Date(), 'yyyy-MM-dd'), endTime: dateFormat(new Date(), 'yyyy-MM-dd'), stationIds: [], + qualifie: '' }, url: { list: '/radionuclide/findReviewedPage', @@ -194,7 +205,6 @@ export default { }) }, handleSelectChange(val) { - console.log(val) let length = this.stationList.length if (val.length === length) { this.allChecked = true @@ -210,6 +220,9 @@ export default { this.queryParam.stationIds = [] } }, + handleQualifieChange(val){ + this.queryParam.qualifie = val + }, getBeforeDate(n) { var n = n var d = new Date() @@ -238,7 +251,7 @@ export default { computed: { formItems() { return [ - { + /*{ type: 'a-input', label: '', name: 'search', @@ -251,7 +264,7 @@ export default { style: { width: 'auto', }, - }, + },*/ { type: 'custom-all-select', label: 'Stations', @@ -307,6 +320,25 @@ export default { width: 'auto', }, }, + { + type: 'a-select', + label: 'Qualifie', + name: 'qualifie', + props: { + allowClear: true, + placeholder: 'Select qualifie', + options: [{label: 'FULL', value: "FULL"}, {label: 'PREL', value: "PREL"}], + style: { + width: '200px', + }, + }, + on: { + change: this.handleQualifieChange, + }, + style: { + width: 'auto', + }, + } ] }, }, diff --git a/src/views/system/DetectorInfo.vue b/src/views/system/DetectorInfo.vue index 766d778..09449f5 100644 --- a/src/views/system/DetectorInfo.vue +++ b/src/views/system/DetectorInfo.vue @@ -43,52 +43,92 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -198,23 +238,28 @@ export default { data() { this.columns = columns const validateDetectorCode = (_, value, callback) => { - if (!value) { - callback(new Error('Please Enter Detector Code')) - } else { - if (value.length > 9) { - callback(new Error('Detector Code Limit 9')) + if(this.model.stationId){ + if (value) { + if (value.length > 9) { + callback(new Error('Detector Code Limit 9')) + } else { + callback() + } } else { - callback() + callback(new Error('Please Enter Code')) } + }else { + callback('Select Station First'); } } return { queryParam: {}, rules: { - detectorId: [{ required: true, message: 'Please Enter Detector Id' }], + // detectorId: [{ required: true, message: 'Please Enter Id' }, { validator: this.checkId }], detectorCode: [{ required: true, validator: validateDetectorCode }], - moddate: [{ required: true, message: 'Please Select Moddate' }] + stationId: [{ required: true, message: 'Please Select Station' }], + status: [{ required: true, message: 'Please Select Status' }] }, url: { list: '/gardsDetectors/findPage', @@ -222,7 +267,8 @@ export default { add: '/gardsDetectors/create', edit: '/gardsDetectors/update' }, - typeList: [] + typeList: [], + stationOptions: [], } }, created() { @@ -231,7 +277,7 @@ export default { methods: { async getTypeList() { try { - const res = await getAction('/gardsDetectors/findType') + const res = await getAction( '/gardsDetectors/findType') this.typeList = res.filter(item => item).map(item => ({ label: item, value: item })) } catch (error) { console.error(error) @@ -244,13 +290,15 @@ export default { onAdd() { this.isAdd = true - this.model = {} + this.model = { status: 'Operating' } + this.getStationList() this.visible = true }, onEdit() { if (this.selectedRowKeys && this.selectedRowKeys.length) { this.isAdd = false this.visible = true + this.getStationList() const find = this.dataSource.find(item => item.detectorId === this.selectedRowKeys[0]) this.model = cloneDeep(find) } else { @@ -274,6 +322,43 @@ export default { beforeSubmit() { this.model.moddate = moment(this.model.moddate).format('yyyy-MM-DD HH:mm:ss') + }, + + async getStationList() { + await getAction('/webStatistics/findStationList', { menuName: '' }).then((res) => { + if (res.success) { + if (res.result.length > 0) { + this.stationOptions = res.result.map((item) => { + return { + label: item.stationCode, + value: item.stationId, + } + }) + } else { + this.stationOptions = [] + } + } else { + this.$message.warning('This operation fails. Contact your system administrator') + } + }) + }, + + enterCode(){ + let stationId = this.model.stationId + if (stationId){ + let current = this.model.detectorCode + let stationCode = this.stationOptions.find(option => option.value === stationId).label; + let prefix = stationCode + "_" + if (!current.startsWith(prefix)){ + this.model.detectorCode = prefix + current + }else { + if (prefix === current){ + this.model.detectorCode = '' + } + } + }else { + this.model.detectorCode = '' + } } }, computed: { From 21102c3d0cec85a639ebdacd04e2921be20b026e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E7=8F=AE=E5=AE=87?= Date: Fri, 12 Jan 2024 16:04:18 +0800 Subject: [PATCH 06/12] =?UTF-8?q?=E5=A4=84=E7=90=86web=20=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E7=9A=84=E6=8A=A5=E9=94=99=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/list.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/views/statistics/list.vue b/src/views/statistics/list.vue index f81ebfe..a1c5468 100644 --- a/src/views/statistics/list.vue +++ b/src/views/statistics/list.vue @@ -97,9 +97,13 @@ export default { isDetail: false, queryParam: { dataType: this.dataType, - startTime: sessionStorage.getItem('currStartDate') || moment().subtract(6, 'days').format('YYYY-MM-DD'), - endTime: sessionStorage.getItem('currEndDate') || moment().format('YYYY-MM-DD'), - stationIds: sessionStorage.getItem('selectedSta').split(',') || [], + startTime: sessionStorage.getItem('currStartDate') + ? sessionStorage.getItem('currStartDate') + : moment().subtract(6, 'days').format('YYYY-MM-DD'), + endTime: sessionStorage.getItem('currEndDate') + ? sessionStorage.getItem('currEndDate') + : moment().format('YYYY-MM-DD'), + stationIds: sessionStorage.getItem('selectedSta') ? sessionStorage.getItem('selectedSta').split(',') : [], spectralQualifie: this.spectralQualifie, }, url: { From c5d177ad72fb412e2022fd18e352853962265e67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E7=8F=AE=E5=AE=87?= Date: Mon, 15 Jan 2024 16:41:07 +0800 Subject: [PATCH 07/12] =?UTF-8?q?=E5=A4=84=E7=90=86=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=90=8E=EF=BC=8C=E4=B8=8B=E6=8B=89=E6=A1=86?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=80=89=E9=A1=B9id=20=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96=EF=BC=8C?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../radionuclide/particulate/blankphd.vue | 212 ------------------ src/views/statistics/list.vue | 22 +- 2 files changed, 9 insertions(+), 225 deletions(-) diff --git a/src/views/statistics/imsData/radionuclide/particulate/blankphd.vue b/src/views/statistics/imsData/radionuclide/particulate/blankphd.vue index bdafcd6..1ab6ad4 100644 --- a/src/views/statistics/imsData/radionuclide/particulate/blankphd.vue +++ b/src/views/statistics/imsData/radionuclide/particulate/blankphd.vue @@ -1,35 +1,6 @@ \ No newline at end of file diff --git a/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/detbkphd.vue b/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/detbkphd.vue index 50119ae..40609d1 100644 --- a/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/detbkphd.vue +++ b/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/detbkphd.vue @@ -1,18 +1,25 @@ \ No newline at end of file diff --git a/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/qcphd.vue b/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/qcphd.vue index 6128d25..b31392f 100644 --- a/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/qcphd.vue +++ b/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/qcphd.vue @@ -1,18 +1,25 @@ \ No newline at end of file diff --git a/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/sphdf.vue b/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/sphdf.vue index fe399f6..9acd2f6 100644 --- a/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/sphdf.vue +++ b/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/sphdf.vue @@ -1,18 +1,26 @@ \ No newline at end of file diff --git a/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/sphdp.vue b/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/sphdp.vue index d5d79db..d0662a8 100644 --- a/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/sphdp.vue +++ b/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/sphdp.vue @@ -1,18 +1,26 @@ \ No newline at end of file diff --git a/src/views/statistics/imsData/radionuclide/nobleGas/hpge/calibphd.vue b/src/views/statistics/imsData/radionuclide/nobleGas/hpge/calibphd.vue index 91016c7..2f2c9d6 100644 --- a/src/views/statistics/imsData/radionuclide/nobleGas/hpge/calibphd.vue +++ b/src/views/statistics/imsData/radionuclide/nobleGas/hpge/calibphd.vue @@ -1,18 +1,25 @@ \ No newline at end of file diff --git a/src/views/statistics/imsData/radionuclide/nobleGas/hpge/detbkphd.vue b/src/views/statistics/imsData/radionuclide/nobleGas/hpge/detbkphd.vue index b4cf57e..7f32129 100644 --- a/src/views/statistics/imsData/radionuclide/nobleGas/hpge/detbkphd.vue +++ b/src/views/statistics/imsData/radionuclide/nobleGas/hpge/detbkphd.vue @@ -1,18 +1,25 @@ \ No newline at end of file diff --git a/src/views/statistics/imsData/radionuclide/nobleGas/hpge/qcphd.vue b/src/views/statistics/imsData/radionuclide/nobleGas/hpge/qcphd.vue index ac9f1eb..96ada18 100644 --- a/src/views/statistics/imsData/radionuclide/nobleGas/hpge/qcphd.vue +++ b/src/views/statistics/imsData/radionuclide/nobleGas/hpge/qcphd.vue @@ -1,18 +1,25 @@ \ No newline at end of file diff --git a/src/views/statistics/imsData/radionuclide/nobleGas/hpge/sphdf.vue b/src/views/statistics/imsData/radionuclide/nobleGas/hpge/sphdf.vue index 2f30266..4b52c35 100644 --- a/src/views/statistics/imsData/radionuclide/nobleGas/hpge/sphdf.vue +++ b/src/views/statistics/imsData/radionuclide/nobleGas/hpge/sphdf.vue @@ -1,18 +1,26 @@ \ No newline at end of file diff --git a/src/views/statistics/imsData/radionuclide/nobleGas/hpge/sphdp.vue b/src/views/statistics/imsData/radionuclide/nobleGas/hpge/sphdp.vue index 4940e15..8690e4e 100644 --- a/src/views/statistics/imsData/radionuclide/nobleGas/hpge/sphdp.vue +++ b/src/views/statistics/imsData/radionuclide/nobleGas/hpge/sphdp.vue @@ -1,18 +1,26 @@ \ No newline at end of file diff --git a/src/views/statistics/imsData/radionuclide/particulate/blankphd.vue b/src/views/statistics/imsData/radionuclide/particulate/blankphd.vue index 1ab6ad4..0bd7fed 100644 --- a/src/views/statistics/imsData/radionuclide/particulate/blankphd.vue +++ b/src/views/statistics/imsData/radionuclide/particulate/blankphd.vue @@ -1,6 +1,13 @@ \ No newline at end of file diff --git a/src/views/statistics/imsData/radionuclide/particulate/detbkphd.vue b/src/views/statistics/imsData/radionuclide/particulate/detbkphd.vue index cfd0e21..4bff72c 100644 --- a/src/views/statistics/imsData/radionuclide/particulate/detbkphd.vue +++ b/src/views/statistics/imsData/radionuclide/particulate/detbkphd.vue @@ -1,6 +1,13 @@ diff --git a/src/views/statistics/imsData/radionuclide/particulate/qcphd.vue b/src/views/statistics/imsData/radionuclide/particulate/qcphd.vue index 246e6e5..93f3613 100644 --- a/src/views/statistics/imsData/radionuclide/particulate/qcphd.vue +++ b/src/views/statistics/imsData/radionuclide/particulate/qcphd.vue @@ -1,18 +1,25 @@ \ No newline at end of file diff --git a/src/views/statistics/imsData/radionuclide/particulate/sphdf.vue b/src/views/statistics/imsData/radionuclide/particulate/sphdf.vue index a412a18..82d2f03 100644 --- a/src/views/statistics/imsData/radionuclide/particulate/sphdf.vue +++ b/src/views/statistics/imsData/radionuclide/particulate/sphdf.vue @@ -1,18 +1,26 @@ \ No newline at end of file diff --git a/src/views/statistics/imsData/radionuclide/particulate/sphdp.vue b/src/views/statistics/imsData/radionuclide/particulate/sphdp.vue index 8ab5d85..0159de3 100644 --- a/src/views/statistics/imsData/radionuclide/particulate/sphdp.vue +++ b/src/views/statistics/imsData/radionuclide/particulate/sphdp.vue @@ -1,18 +1,26 @@ \ No newline at end of file diff --git a/src/views/statistics/imsData/stateOfHealth/alerts.vue b/src/views/statistics/imsData/stateOfHealth/alerts.vue index 0ae0d36..477285c 100644 --- a/src/views/statistics/imsData/stateOfHealth/alerts.vue +++ b/src/views/statistics/imsData/stateOfHealth/alerts.vue @@ -79,7 +79,6 @@ const columns = [ import { compareDate } from '../../commom' import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { getAction, getFileAction } from '../../../../api/manage' -import dateFormat from '../../../../components/jeecg/JEasyCron/format-date' import moment from 'moment' export default { name: 'menuTree', @@ -90,9 +89,13 @@ export default { isImmediate: true, columns, queryParam: { - startTime: sessionStorage.getItem('currStartDate') || moment().subtract(6, 'days').format('YYYY-MM-DD'), - endTime: sessionStorage.getItem('currEndDate') || moment().format('YYYY-MM-DD'), - stationIds: sessionStorage.getItem('selectedSta').split(',') || [], + startTime: sessionStorage.getItem('currStartDate_sta') + ? sessionStorage.getItem('currStartDate_sta') + : moment().subtract(6, 'days').format('YYYY-MM-DD'), + endTime: sessionStorage.getItem('currEndDate_sta') + ? sessionStorage.getItem('currEndDate_sta') + : moment().format('YYYY-MM-DD'), + stationIds: [], }, url: { list: '/webStatistics/findAlertSohPage', @@ -113,11 +116,6 @@ export default { handleExcel() { if (this.dataSource.length > 0) { this.excelLoading = true - // this.queryParam = { - // startTime: "2023-07-17", - // endTime: "2023-07-17", - // stationIds: [1] - // } let params = { ...this.queryParam, } @@ -145,11 +143,6 @@ export default { let days = compareDate(this.queryParam.startTime, this.queryParam.endTime) if (days <= 10) { this.isImmediate = false - // this.queryParam = { - // startTime: "2023-01-01", - // endTime: "2023-07-10", - // stationIds: [209, 210] - // } let params = { ...this.queryParam, pageNo: 1, @@ -176,6 +169,12 @@ export default { if (res.success) { if (res.result.length > 0) { this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId })) + // 进入页面自动查询 + let arr = sessionStorage.getItem('selectedSta_sta') + ? sessionStorage.getItem('selectedSta_sta').split(',') + : [] + this.queryParam.stationIds = arr.map((item) => Number(item)) + this.searchQueryData() } else { this.stationList = [] } @@ -185,7 +184,7 @@ export default { }) }, handleSelectChange(val) { - console.log(val) + window.sessionStorage.setItem('selectedSta_sta', val) let length = this.stationList.length if (val.length === length) { this.allChecked = true @@ -197,13 +196,21 @@ export default { this.allChecked = val if (val) { this.queryParam.stationIds = this.stationList.map((item) => item.value) + window.sessionStorage.setItem('selectedSta_sta', this.queryParam.stationIds) } else { this.queryParam.stationIds = [] + window.sessionStorage.setItem('selectedSta_sta', []) } }, filterOption(input, option) { return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 }, + handleStartDateChange(date) { + window.sessionStorage.setItem('currStartDate_sta', date) + }, + handleEndDateChange(date) { + window.sessionStorage.setItem('currEndDate_sta', date) + }, }, computed: { formItems() { @@ -257,6 +264,9 @@ export default { width: '200px', }, }, + on: { + change: this.handleStartDateChange, + }, style: { width: 'auto', }, @@ -273,6 +283,9 @@ export default { width: '200px', }, }, + on: { + change: this.handleEndDateChange, + }, style: { width: 'auto', }, diff --git a/src/views/statistics/imsData/stateOfHealth/rmssoh.vue b/src/views/statistics/imsData/stateOfHealth/rmssoh.vue index 7ed5aba..9922d31 100644 --- a/src/views/statistics/imsData/stateOfHealth/rmssoh.vue +++ b/src/views/statistics/imsData/stateOfHealth/rmssoh.vue @@ -91,9 +91,13 @@ export default { isImmediate: true, columns, queryParam: { - startTime: sessionStorage.getItem('currStartDate') || moment().subtract(6, 'days').format('YYYY-MM-DD'), - endTime: sessionStorage.getItem('currEndDate') || moment().format('YYYY-MM-DD'), - stationIds: sessionStorage.getItem('selectedSta').split(',') || [], + startTime: sessionStorage.getItem('currStartDate_sta') + ? sessionStorage.getItem('currStartDate_sta') + : moment().subtract(6, 'days').format('YYYY-MM-DD'), + endTime: sessionStorage.getItem('currEndDate_sta') + ? sessionStorage.getItem('currEndDate_sta') + : moment().format('YYYY-MM-DD'), + stationIds: [], }, url: { list: '/webStatistics/findSohPage', @@ -151,11 +155,6 @@ export default { let days = compareDate(this.queryParam.startTime, this.queryParam.endTime) if (days <= 10) { this.isImmediate = false - // this.queryParam = { - // startTime: "2023-01-01", - // endTime: "2023-07-10", - // stationIds: [209, 210] - // } let params = { ...this.queryParam, pageNo: 1, @@ -182,6 +181,12 @@ export default { if (res.success) { if (res.result.length > 0) { this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId })) + // 进入页面自动查询 + let arr = sessionStorage.getItem('selectedSta_sta') + ? sessionStorage.getItem('selectedSta_sta').split(',') + : [] + this.queryParam.stationIds = arr.map((item) => Number(item)) + this.searchQueryData() } else { this.stationList = [] } @@ -191,7 +196,7 @@ export default { }) }, handleSelectChange(val) { - console.log(val) + window.sessionStorage.setItem('selectedSta_sta', val) let length = this.stationList.length if (val.length === length) { this.allChecked = true @@ -203,13 +208,21 @@ export default { this.allChecked = val if (val) { this.queryParam.stationIds = this.stationList.map((item) => item.value) + window.sessionStorage.setItem('selectedSta_sta', this.queryParam.stationIds) } else { this.queryParam.stationIds = [] + window.sessionStorage.setItem('selectedSta_sta', []) } }, filterOption(input, option) { return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 }, + handleStartDateChange(date) { + window.sessionStorage.setItem('currStartDate_sta', date) + }, + handleEndDateChange(date) { + window.sessionStorage.setItem('currEndDate_sta', date) + }, }, computed: { formItems() { @@ -263,6 +276,9 @@ export default { width: '200px', }, }, + on: { + change: this.handleStartDateChange, + }, style: { width: 'auto', }, @@ -279,6 +295,9 @@ export default { width: '200px', }, }, + on: { + change: this.handleEndDateChange, + }, style: { width: 'auto', }, diff --git a/src/views/statistics/imsProducts/arr/index.vue b/src/views/statistics/imsProducts/arr/index.vue index 7567157..5d736a2 100644 --- a/src/views/statistics/imsProducts/arr/index.vue +++ b/src/views/statistics/imsProducts/arr/index.vue @@ -100,11 +100,11 @@ export default { isImmediate: true, columns, queryParam: { - startTime: sessionStorage.getItem('currStartDate') - ? sessionStorage.getItem('currStartDate') + startTime: sessionStorage.getItem('currStartDate_pro') + ? sessionStorage.getItem('currStartDate_pro') : moment().subtract(6, 'days').format('YYYY-MM-DD'), - endTime: sessionStorage.getItem('currEndDate') - ? sessionStorage.getItem('currEndDate') + endTime: sessionStorage.getItem('currEndDate_pro') + ? sessionStorage.getItem('currEndDate_pro') : moment().format('YYYY-MM-DD'), stationIds: [], qualifie: undefined, @@ -165,11 +165,6 @@ export default { let days = compareDate(this.queryParam.startTime, this.queryParam.endTime) if (days <= 10) { this.isImmediate = false - // this.queryParam = { - // startTime: "2023-01-01", - // endTime: "2023-07-10", - // stationIds: [209, 210] - // } let params = { ...this.queryParam, pageNo: 1, @@ -197,7 +192,9 @@ export default { if (res.result.length > 0) { this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId })) // 进入页面自动查询 - let arr = sessionStorage.getItem('selectedSta') ? sessionStorage.getItem('selectedSta').split(',') : [] + let arr = sessionStorage.getItem('selectedSta_pro') + ? sessionStorage.getItem('selectedSta_pro').split(',') + : [] this.queryParam.stationIds = arr.map((item) => Number(item)) this.queryParam.qualifie = sessionStorage.getItem('qualifie') ? sessionStorage.getItem('qualifie') @@ -212,7 +209,7 @@ export default { }) }, handleSelectChange(val) { - console.log(val) + window.sessionStorage.setItem('selectedSta_pro', val) let length = this.stationList.length if (val.length === length) { this.allChecked = true @@ -224,14 +221,22 @@ export default { this.allChecked = val if (val) { this.queryParam.stationIds = this.stationList.map((item) => item.value) + window.sessionStorage.setItem('selectedSta_pro', this.queryParam.stationIds) } else { this.queryParam.stationIds = [] + window.sessionStorage.setItem('selectedSta_pro', []) } }, handleQualifieChange(val) { this.queryParam.qualifie = val sessionStorage.setItem('qualifie', val) }, + handleStartDateChange(date) { + window.sessionStorage.setItem('currStartDate_pro', date) + }, + handleEndDateChange(date) { + window.sessionStorage.setItem('currEndDate_pro', date) + }, getBeforeDate(n) { var n = n var d = new Date() @@ -309,6 +314,9 @@ export default { width: '200px', }, }, + on: { + change: this.handleStartDateChange, + }, style: { width: 'auto', }, @@ -325,6 +333,9 @@ export default { width: '200px', }, }, + on: { + change: this.handleEndDateChange, + }, style: { width: 'auto', }, diff --git a/src/views/statistics/imsProducts/rrr/index.vue b/src/views/statistics/imsProducts/rrr/index.vue index 0ac6009..42d1aae 100644 --- a/src/views/statistics/imsProducts/rrr/index.vue +++ b/src/views/statistics/imsProducts/rrr/index.vue @@ -100,11 +100,11 @@ export default { isImmediate: true, columns, queryParam: { - startTime: sessionStorage.getItem('currStartDate') - ? sessionStorage.getItem('currStartDate') + startTime: sessionStorage.getItem('currStartDate_pro') + ? sessionStorage.getItem('currStartDate_pro') : moment().subtract(6, 'days').format('YYYY-MM-DD'), - endTime: sessionStorage.getItem('currEndDate') - ? sessionStorage.getItem('currEndDate') + endTime: sessionStorage.getItem('currEndDate_pro') + ? sessionStorage.getItem('currEndDate_pro') : moment().format('YYYY-MM-DD'), stationIds: [], qualifie: undefined, @@ -197,7 +197,9 @@ export default { if (res.result.length > 0) { this.stationList = res.result.map((res) => ({ label: res.stationCode, value: res.stationId })) // 进入页面自动查询 - let arr = sessionStorage.getItem('selectedSta') ? sessionStorage.getItem('selectedSta').split(',') : [] + let arr = sessionStorage.getItem('selectedSta_pro') + ? sessionStorage.getItem('selectedSta_pro').split(',') + : [] this.queryParam.stationIds = arr.map((item) => Number(item)) this.queryParam.qualifie = sessionStorage.getItem('qualifie') ? sessionStorage.getItem('qualifie') @@ -212,6 +214,7 @@ export default { }) }, handleSelectChange(val) { + window.sessionStorage.setItem('selectedSta_pro', val) let length = this.stationList.length if (val.length === length) { this.allChecked = true @@ -223,14 +226,22 @@ export default { this.allChecked = val if (val) { this.queryParam.stationIds = this.stationList.map((item) => item.value) + window.sessionStorage.setItem('selectedSta_pro', this.queryParam.stationIds) } else { this.queryParam.stationIds = [] + window.sessionStorage.setItem('selectedSta_pro', []) } }, handleQualifieChange(val) { this.queryParam.qualifie = val sessionStorage.setItem('qualifie', val) }, + handleStartDateChange(date) { + window.sessionStorage.setItem('currStartDate_pro', date) + }, + handleEndDateChange(date) { + window.sessionStorage.setItem('currEndDate_pro', date) + }, getBeforeDate(n) { var n = n var d = new Date() @@ -308,6 +319,9 @@ export default { width: '200px', }, }, + on: { + change: this.handleStartDateChange, + }, style: { width: 'auto', }, @@ -324,6 +338,9 @@ export default { width: '200px', }, }, + on: { + change: this.handleEndDateChange, + }, style: { width: 'auto', }, diff --git a/src/views/statistics/list.vue b/src/views/statistics/list.vue index 993065c..be70c7e 100644 --- a/src/views/statistics/list.vue +++ b/src/views/statistics/list.vue @@ -72,6 +72,10 @@ export default { type: String, default: '', }, + menuType: { + type: String, + default: '', + }, }, mixins: [JeecgListMixin], components: { @@ -80,13 +84,22 @@ export default { watch: { stationList: { handler(val) { - let arr = sessionStorage.getItem('selectedSta') ? sessionStorage.getItem('selectedSta').split(',') : [] + let arr = sessionStorage.getItem(`selectedSta_${this.menuType}`) + ? sessionStorage.getItem(`selectedSta_${this.menuType}`).split(',') + : [] this.queryParam.stationIds = arr.map((item) => Number(item)) - this.loadData() + ;(this.queryParam.startTime = sessionStorage.getItem(`currStartDate_${this.menuType}`) + ? sessionStorage.getItem(`currStartDate_${this.menuType}`) + : moment().subtract(6, 'days').format('YYYY-MM-DD')), + (this.queryParam.endTime = sessionStorage.getItem(`currEndDate_${this.menuType}`) + ? sessionStorage.getItem(`currEndDate_${this.menuType}`) + : moment().format('YYYY-MM-DD')), + this.loadData() }, }, }, data() { + this.disableMixinCreated = true return { excelLoading: false, spinning: false, @@ -94,12 +107,8 @@ export default { isDetail: false, queryParam: { dataType: this.dataType, - startTime: sessionStorage.getItem('currStartDate') - ? sessionStorage.getItem('currStartDate') - : moment().subtract(6, 'days').format('YYYY-MM-DD'), - endTime: sessionStorage.getItem('currEndDate') - ? sessionStorage.getItem('currEndDate') - : moment().format('YYYY-MM-DD'), + startTime: '', + endTime: '', stationIds: [], spectralQualifie: this.spectralQualifie, }, @@ -188,7 +197,7 @@ export default { }, handleSelectChange(val) { console.log(val) - window.sessionStorage.setItem('selectedSta', val) + window.sessionStorage.setItem(`selectedSta_${this.menuType}`, val) let length = this.stationList.length if (val.length === length) { this.allChecked = true @@ -200,44 +209,21 @@ export default { this.allChecked = val if (val) { this.queryParam.stationIds = this.stationList.map((item) => item.value) - window.sessionStorage.setItem('selectedSta', vathis.queryParam.stationIdsl) + window.sessionStorage.setItem(`selectedSta_${this.menuType}`, this.queryParam.stationIds) } else { this.queryParam.stationIds = [] - window.sessionStorage.setItem('selectedSta', []) + window.sessionStorage.setItem(`selectedSta_${this.menuType}`, []) } }, filterOption(input, option) { return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 }, - handleStartDateChange(date, dateString) { - console.log(date, dateString) - window.sessionStorage.setItem('currStartDate', date) + handleStartDateChange(date) { + window.sessionStorage.setItem(`currStartDate_${this.menuType}`, date) }, handleEndDateChange(date) { - window.sessionStorage.setItem('currEndDate', date) + window.sessionStorage.setItem(`currEndDate_${this.menuType}`, date) }, - // // 获取n天前的日期 - // getBeforeDate(n) { - // var n = n - // var d = new Date() - // var year = d.getFullYear() - // var mon = d.getMonth() + 1 - // var day = d.getDate() - // if (day <= n) { - // if (mon > 1) { - // mon = mon - 1 - // } else { - // year = year - 1 - // mon = 12 - // } - // } - // d.setDate(d.getDate() - n) - // year = d.getFullYear() - // mon = d.getMonth() + 1 - // day = d.getDate() - // var s = year + '-' + (mon < 10 ? '0' + mon : mon) + '-' + (day < 10 ? '0' + day : day) - // return s - // }, }, computed: { formItems() { From d75ecd3017e9b2e06e3c31dc7086b1855e19ad41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E7=8F=AE=E5=AE=87?= Date: Mon, 15 Jan 2024 19:05:55 +0800 Subject: [PATCH 11/12] =?UTF-8?q?ALERTS=20=20=20RMSSOH=20=20=20MET=20=20?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E9=9A=90=E8=97=8Finput=E7=9A=84=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/imsData/met/index.vue | 28 +++++++++---------- .../imsData/stateOfHealth/alerts.vue | 28 +++++++++---------- .../imsData/stateOfHealth/rmssoh.vue | 28 +++++++++---------- 3 files changed, 42 insertions(+), 42 deletions(-) diff --git a/src/views/statistics/imsData/met/index.vue b/src/views/statistics/imsData/met/index.vue index bedff32..834b3a5 100644 --- a/src/views/statistics/imsData/met/index.vue +++ b/src/views/statistics/imsData/met/index.vue @@ -231,20 +231,20 @@ export default { computed: { formItems() { return [ - { - type: 'a-input', - label: '', - name: 'search', - props: { - placeholder: 'search...', - style: { - width: '166px', - }, - }, - style: { - width: 'auto', - }, - }, + // { + // type: 'a-input', + // label: '', + // name: 'search', + // props: { + // placeholder: 'search...', + // style: { + // width: '166px', + // }, + // }, + // style: { + // width: 'auto', + // }, + // }, { type: 'custom-all-select', label: 'Stations', diff --git a/src/views/statistics/imsData/stateOfHealth/alerts.vue b/src/views/statistics/imsData/stateOfHealth/alerts.vue index 477285c..bcf1b72 100644 --- a/src/views/statistics/imsData/stateOfHealth/alerts.vue +++ b/src/views/statistics/imsData/stateOfHealth/alerts.vue @@ -215,20 +215,20 @@ export default { computed: { formItems() { return [ - { - type: 'a-input', - label: '', - name: 'search', - props: { - placeholder: 'search...', - style: { - width: '166px', - }, - }, - style: { - width: 'auto', - }, - }, + // { + // type: 'a-input', + // label: '', + // name: 'search', + // props: { + // placeholder: 'search...', + // style: { + // width: '166px', + // }, + // }, + // style: { + // width: 'auto', + // }, + // }, { type: 'custom-all-select', label: 'Stations', diff --git a/src/views/statistics/imsData/stateOfHealth/rmssoh.vue b/src/views/statistics/imsData/stateOfHealth/rmssoh.vue index 9922d31..465561a 100644 --- a/src/views/statistics/imsData/stateOfHealth/rmssoh.vue +++ b/src/views/statistics/imsData/stateOfHealth/rmssoh.vue @@ -227,20 +227,20 @@ export default { computed: { formItems() { return [ - { - type: 'a-input', - label: '', - name: 'search', - props: { - placeholder: 'search...', - style: { - width: '166px', - }, - }, - style: { - width: 'auto', - }, - }, + // { + // type: 'a-input', + // label: '', + // name: 'search', + // props: { + // placeholder: 'search...', + // style: { + // width: '166px', + // }, + // }, + // style: { + // width: 'auto', + // }, + // }, { type: 'custom-all-select', label: 'Stations', From 06d577684386ee27f43c93c1e5ecc4db839e04c4 Mon Sep 17 00:00:00 2001 From: Xu Zhimeng Date: Wed, 17 Jan 2024 14:22:50 +0800 Subject: [PATCH 12/12] =?UTF-8?q?fix:=20beta=E5=9B=BE=E8=A1=A8=E4=B8=ADsca?= =?UTF-8?q?tterGL=E7=9B=96=E4=BD=8F=E6=96=B9=E6=A1=86=E7=BA=BF=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/BetaGammaSpectrumChart.vue | 263 +++--------------- 1 file changed, 42 insertions(+), 221 deletions(-) diff --git a/src/views/spectrumAnalysis/components/BetaGammaSpectrumChart.vue b/src/views/spectrumAnalysis/components/BetaGammaSpectrumChart.vue index 36d40f7..977c622 100644 --- a/src/views/spectrumAnalysis/components/BetaGammaSpectrumChart.vue +++ b/src/views/spectrumAnalysis/components/BetaGammaSpectrumChart.vue @@ -18,6 +18,7 @@ { + this.opts.notMerge = false + this.twoDOption.brush = { toolbox: [] } + }) }, methods: { @@ -357,8 +357,6 @@ export default { this.twoDOption.yAxis.max = 256 this.emitRangeChange([0, 256, 0, 256]) - this.reDrawRect() - this.buildScatterList() }, @@ -436,9 +434,6 @@ export default { this.twoDOption.yAxis.max = rangeNumberFunc(y2) this.emitRangeChange([x1, x2, y1, y2]) - - this.reDrawRect() - this.buildScatterList() } @@ -452,14 +447,14 @@ export default { yAxis: { min: minY, max: maxY } } = this.twoDOption - this.twoDOption.series.data = this.histogramDataDList + this.twoDOption.series[0].data = this.histogramDataDList .filter(({ b, g, c }) => c && b >= minX && b <= maxX && g >= minY && g <= maxY) .map(({ b, g, c }) => this.buildScatterItem(b, g, c)) }, // 构造一个scatter 的点 buildScatterItem(xAxis, yAxis, count) { - const { r, g, b } = this.interpolateColor(1 - (count / this.currCount)) + const { r, g, b } = this.interpolateColor(1 - count / this.currCount) return { value: [xAxis, yAxis], itemStyle: { @@ -488,7 +483,6 @@ export default { this.twoDOption.yAxis.max = x2 } - this.reDrawRect() this.buildScatterList() }, @@ -498,217 +492,44 @@ export default { if (this.showROI) { this.boundaryData.forEach(({ minX, maxX, minY, maxY, color }) => { - // rect 遵循 左下 右下 右上 左上 的顺序 + // rect 遵循 左下 右下 右上 左上 左下 的顺序 const rect = [ [minX, minY], [maxX, minY], [maxX, maxY], - [minX, maxY] + [minX, maxY], + [minX, minY] ] - rectList.push(...this.drawOneRect(rect, color)) + rectList.push(this.drawOneRect(rect, color)) }) } - this.twoDOption.series.markLine.data = rectList + const lineSeries = rectList.map(rect => ({ + type: 'line', + ...rect, + zlevel: 11 + })) + + this.opts.notMerge = true + this.twoDOption.series.splice(1, this.twoDOption.series.length - 1, ...lineSeries) + this.$nextTick(() => { + this.opts.notMerge = false + this.twoDOption.brush = { toolbox: [] } + }) }, /** * 绘制一个矩形框区域 - * 矩形框在这里的实现是由几条线段围起来的,但由于线段在超出图表区域显示有问题,故作了以下处理 - * @param {*} rect 左下 右下 右上 左上 的顺序 + * @param {*} rect 左下 右下 右上 左上 左下 的顺序 */ drawOneRect(rect, color) { - const rectList = [] - const { - xAxis: { min: minX, max: maxX }, - yAxis: { min: minY, max: maxY } - } = this.twoDOption - - const inchartPoints = this.getInChartPoints(rect) - const outchartPoints = rect.filter(pointItem => !inchartPoints.includes(pointItem)) - // 如果框选范围内只有俩点 - if (inchartPoints.length == 2) { - const [point1, point2] = inchartPoints - const isVerticleLine = this.isVerticleLine(point1, point2) - // 如果是纵向标记线,判断另两个点是在左边还是右边 - if (isVerticleLine) { - const find = outchartPoints.find(outcharPoint => point1[1] == outcharPoint[1]) // 找出纵坐标相同的在图表外面的点 - // 判断在图表外的这个点是在左边还是右边 - const isLeft = find[0] <= point1[0] - /** - * 如果在左边,推入左边俩点构成矩形 - * y - * |________________ - * | | - * |________________| - * | - * |——————————————————— x - **/ - - if (isLeft) { - inchartPoints.forEach(point => { - rectList.push(this.generateLineDataByTwoPoints([minX, point[1]], point)) - }) - - rectList.push(this.generateLineDataByTwoPoints(point1, point2)) - } - // 如果是右边,同理,推入右边俩点构成矩形 - else { - inchartPoints.forEach(point => { - rectList.push(this.generateLineDataByTwoPoints([maxX, point[1]], point)) - }) - rectList.push(this.generateLineDataByTwoPoints(point1, point2)) - } - } - // 如果是纵向标记线,判断另两个点是在上边还是下边 - else { - const find = outchartPoints.find(outcharPoint => point1[0] == outcharPoint[0]) // 找出横坐标相同的在图表外面的点 - // 判断在图表外的这个点是在上边还是右边 - const isBottom = find[1] <= point1[1] - /** - * 如果在下边,推入下边俩点构成矩形 - **/ - - if (isBottom) { - inchartPoints.forEach(point => { - rectList.push(this.generateLineDataByTwoPoints([point[0], minY], point)) - }) - - rectList.push(this.generateLineDataByTwoPoints(point1, point2)) - } - // 如果是上边,同理,推入上边俩点构成矩形 - else { - inchartPoints.forEach(point => { - rectList.push(this.generateLineDataByTwoPoints([point[0], maxY], point)) - }) - - rectList.push(this.generateLineDataByTwoPoints(point1, point2)) - } - } - } - // 只有一个点在范围内,则是选中了矩形的一个角 - else if (inchartPoints.length == 1) { - const point = inchartPoints[0] - const isLeft = !!outchartPoints.find(outPoint => outPoint[0] < point[0]) - const isBottom = !!outchartPoints.find(outPoint => outPoint[1] < point[1]) - // 截取的右上角 - if (isLeft && isBottom) { - rectList.push(this.generateLineDataByTwoPoints(point, [minX, point[1]])) - rectList.push(this.generateLineDataByTwoPoints(point, [point[0], minY])) - } - // 截取的右下角 - if (isLeft && !isBottom) { - rectList.push(this.generateLineDataByTwoPoints(point, [minX, point[1]])) - rectList.push(this.generateLineDataByTwoPoints(point, [point[0], maxY])) - } - // 截取的左下角 - if (!isLeft && !isBottom) { - rectList.push(this.generateLineDataByTwoPoints(point, [maxX, point[1]])) - rectList.push(this.generateLineDataByTwoPoints(point, [point[0], maxY])) - } - // 截取的左上角 - if (!isLeft && isBottom) { - rectList.push(this.generateLineDataByTwoPoints(point, [maxX, point[1]])) - rectList.push(this.generateLineDataByTwoPoints(point, [point[0], minY])) - } - } - // 全在里面 - else if (inchartPoints.length == 4) { - // 按顺序挨个连起来,并且尾部连到头部 - rect.forEach((point, index) => { - if (index == rect.length - 1) { - rectList.push(this.generateLineDataByTwoPoints(point, rect[0])) - } else { - rectList.push(this.generateLineDataByTwoPoints(point, rect[index + 1])) - } - }) - } - // 全不在里面 - else { - // 筛选出所有的在框选范围内的横坐标 - const xAxisList = rect.map(item => item[0]).filter(xAxis => xAxis > minX && xAxis < maxX) - const leftBottomPoint = rect[0] - const rightBottomPoint = rect[1] - const rightTopPoint = rect[3] - const minYAxis = rightBottomPoint[1] - const maYAxis = rightTopPoint[1] - // 需要显示左右两侧的框线 - if (xAxisList.length == 4 && minYAxis < minY && maYAxis > maxY) { - const minAxis = Math.min(...xAxisList) - const maxAxis = Math.max(...xAxisList) - rectList.push(this.generateLineDataByTwoPoints([minAxis, minY], [minAxis, maxY])) - rectList.push(this.generateLineDataByTwoPoints([maxAxis, minY], [maxAxis, maxY])) - } - // 需要显示左右其中一条框线 - else if (xAxisList.length == 2 && minYAxis < minY && maYAxis > maxY) { - const xAxis = xAxisList[0] - rectList.push(this.generateLineDataByTwoPoints([xAxis, minY], [xAxis, maxY])) - } - - // 筛选出所有的在框选范围内的横坐标 - const yAxisList = rect.map(item => item[1]).filter(xAxis => xAxis > minY && xAxis < maxY) - const minXAxis = leftBottomPoint[0] - const maxXAxis = rightBottomPoint[0] - // 需要显示上下两侧的框线 - if (yAxisList.length == 4 && minXAxis < minX && maxXAxis > maxX) { - const minAxis = Math.min(...yAxisList) - const maxAxis = Math.max(...yAxisList) - rectList.push(this.generateLineDataByTwoPoints([minX, minAxis], [maxX, minAxis])) - rectList.push(this.generateLineDataByTwoPoints([minX, maxAxis], [maxX, maxAxis])) - } - // 需要显示左右其中一条框线 - else if (yAxisList.length == 2 && minXAxis < minX && maxXAxis > maxX) { - const yAxis = yAxisList[0] - rectList.push(this.generateLineDataByTwoPoints([minX, yAxis], [maxX, yAxis])) - } - } - // 补齐颜色 - rectList.forEach(item => { - item[0].lineStyle = { + return { + data: rect, + symbol: 'none', + itemStyle: { color } - }) - return rectList - }, - - /** - * 获取在框选范围内的点列表 - * @param { Array> } rectInfo - */ - getInChartPoints(rectInfo) { - const { - xAxis: { min: minX, max: maxX }, - yAxis: { min: minY, max: maxY } - } = this.twoDOption - - return rectInfo.filter(point => { - const [xAxis, yAxis] = point - return xAxis >= minX && xAxis <= maxX && yAxis >= minY && yAxis <= maxY - }) - }, - - /** - * 根据俩点判断是横向还是纵向 - * x坐标相同,则是纵向,否则横向 - */ - isVerticleLine(point1, point2) { - return point1[0] == point2[0] ? true : false - }, - - /** - * 根据两个点生成一个markLine直线 - */ - generateLineDataByTwoPoints(point1, point2) { - return [ - { - xAxis: point1[0], - yAxis: point1[1] - }, - { - xAxis: point2[0], - yAxis: point2[1] - } - ] + } }, // 随机颜色算法 @@ -759,7 +580,7 @@ export default { boundary: { handler(newVal) { newVal.forEach((item, index) => { - item.color = rectColorList[index%5] + item.color = rectColorList[index % 5] }) this.boundaryData = newVal this.reDrawRect()