diff --git a/src/assets/images/station-operation/data-item-bg-active.png b/src/assets/images/station-operation/data-item-bg-active.png new file mode 100644 index 0000000..15652ea Binary files /dev/null and b/src/assets/images/station-operation/data-item-bg-active.png differ diff --git a/src/components/tools/UserMenu.vue b/src/components/tools/UserMenu.vue index 7e68251..b5e779a 100644 --- a/src/components/tools/UserMenu.vue +++ b/src/components/tools/UserMenu.vue @@ -22,6 +22,11 @@ 系统设置 --> + + + {{ this.userInfo().username }} + + Change Password diff --git a/src/views/abnormalAlarm/analysisMonitor/avgNuclide/index.vue b/src/views/abnormalAlarm/analysisMonitor/avgNuclide/index.vue index 1c28989..d3c2cfe 100644 --- a/src/views/abnormalAlarm/analysisMonitor/avgNuclide/index.vue +++ b/src/views/abnormalAlarm/analysisMonitor/avgNuclide/index.vue @@ -5,13 +5,43 @@ Config - + Cacl date + + Station + + + + + + Source Type + + + +
@@ -89,6 +119,11 @@ import moment from 'moment' import TableList from '../../components/tableList.vue' import { getAction, postAction, httpAction, deleteAction } from '@/api/manage' const columns = [ + { + title: 'STATION', + align: 'center', + dataIndex: 'stationCode', + }, { title: 'NUCLIDE', align: 'center', @@ -125,6 +160,8 @@ export default { dataSource: [], loading: false, queryParams: { + stationId: undefined, + sourceType: undefined, startDate: dateFormat(new Date(), 'yyyy-MM-dd'), endDate: dateFormat(new Date(), 'yyyy-MM-dd'), }, @@ -148,6 +185,17 @@ export default { index: '', }, currId: '', + stationOptions: [], + sourceOptions: [ + { + label: 'ARMDARR', + value: '1', + }, + { + label: 'ARMDRRR', + value: '2', + }, + ], } }, created() { @@ -157,6 +205,30 @@ export default { this.getNuclideAvgList() }, methods: { + onSourceChange(val) { + console.log(val) + }, + getStationList() { + 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') + } + }) + }, + filterOption(input, option) { + return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, // 获取n天前的日期 getBeforeDate(n) { var n = n @@ -183,8 +255,7 @@ export default { getNuclideAvgList() { this.loading = true let params = { - startDate: this.queryParams.startDate, - endDate: this.queryParams.endDate, + ...this.queryParams, pageNo: this.ipagination.current, pageSize: this.ipagination.pageSize, } @@ -198,6 +269,14 @@ export default { } }) }, + onStationChange(val) { + this.queryParams.stationId = val + this.getNuclideAvgList() + }, + onSourceChange(val) { + this.queryParams.sourceType = val + this.getNuclideAvgList() + }, onRangeDateChange(date, dateString) { this.queryParams.startDate = dateString[0] this.queryParams.endDate = dateString[1] diff --git a/src/views/spectrumAnalysis/components/Modals/SpectrumModal.vue b/src/views/spectrumAnalysis/components/Modals/SpectrumModal.vue index 166a2a4..329e0df 100644 --- a/src/views/spectrumAnalysis/components/Modals/SpectrumModal.vue +++ b/src/views/spectrumAnalysis/components/Modals/SpectrumModal.vue @@ -1,9 +1,14 @@ @@ -16,8 +21,9 @@ export default { mixins: [ModalMixin, SampleDataMixin], data() { return { - content: '', - isLoading: true + spectrum: '', + phdSpectrum: '', + isLoading: true, } }, methods: { @@ -27,10 +33,12 @@ export default { const { sampleId, inputFileName: fileName } = this.sampleData const { success, result, message } = await getAction('/gamma/Spectrum', { sampleId, - fileName + fileName, }) if (success) { - this.content = result + const { Spectrum, phdSpectrum } = result + this.spectrum = Spectrum + this.phdSpectrum = (phdSpectrum || []).join('\r\n') } else { this.$message.error(message) } @@ -43,8 +51,8 @@ export default { beforeModalOpen() { this.getContent() - } - } + }, + }, } diff --git a/src/views/stationOperation/components/DataListItem.vue b/src/views/stationOperation/components/DataListItem.vue index b065b2d..6c54acc 100644 --- a/src/views/stationOperation/components/DataListItem.vue +++ b/src/views/stationOperation/components/DataListItem.vue @@ -4,7 +4,7 @@ {{ item.stationName || item.stationCode }}
-
+
@@ -42,9 +42,9 @@ export default { props: { item: { - type: Object - } - } + type: Object, + }, + }, } @@ -85,6 +85,10 @@ export default { flex-direction: column; justify-content: space-between; + &.active { + background-image: url(~@/assets/images/station-operation/data-item-bg-active.png); + } + .data-list-item-children { display: flex; justify-content: space-between; diff --git a/src/views/stationOperation/components/MapPane.vue b/src/views/stationOperation/components/MapPane.vue index 584b094..3085a9d 100644 --- a/src/views/stationOperation/components/MapPane.vue +++ b/src/views/stationOperation/components/MapPane.vue @@ -189,7 +189,7 @@
- + day @@ -268,15 +268,11 @@ import CustomModal from '@/components/CustomModal/index.vue' import CustomTree from '@/components/CustomTree/index.vue' import RealTimeDataChart from './RealTimeDataChart.vue' -import { getAction, postAction } from '../../../api/manage' +import { deleteAction, getAction, postAction } from '../../../api/manage' import { MarkerType, FilterIcon } from './markerEnum' import { Vector as VectorLayer } from 'ol/layer' import VectorSource from 'ol/source/Vector' -import { Circle } from 'ol/geom' -import { fromLonLat } from 'ol/proj' -import Feature from 'ol/Feature' -import { Fill, Stroke, Style } from 'ol/style' import { cloneDeep } from 'lodash' // Filter中的筛选列表 @@ -455,8 +451,6 @@ export default { this.initParentMapProps() document.addEventListener('fullscreenchange', this.onFullScreenChange) this.stationList = [] - - this.getDataRecieveSettings() }, destroyed() { document.removeEventListener('fullscreenchange', this.onFullScreenChange) @@ -739,7 +733,16 @@ export default { userId: this.$store.getters.userInfo.id, }) if (success) { + const { cacheTime, scaleInterval, timelineLength, updateIntervalTime, sysUserFocusStations } = result this.initialDataRecieveSettings = result + + this.dataRecieveStatusModel = { + cacheTime, + scaleInterval, + timelineLength, + updateIntervalTime, + } + this.dataStatusCheckedKeys = sysUserFocusStations.map((item) => parseInt(item.stationId)) } else { this.$message.error(message) } @@ -771,6 +774,7 @@ export default { const { success, result, message } = await getAction('/stationOperation/getDataReceivingStatus', { userId: this.$store.getters.userInfo.id, oneStationId: (this.stationInfo && this.stationInfo.stationId) || '', + cacheTime: this.initialDataRecieveSettings.cacheTime, }) this.maskVisi = false this.spinLoading = false @@ -804,24 +808,32 @@ export default { } }, + // 清理接收状态配置缓存 + async clearDataRecieveSetting() { + const { success, message } = await deleteAction('/sysUserFocusStation/deleteUserCache', { + userId: this.$store.getters.userInfo.id, + }) + if (!success) { + throw new Error(message) + } + }, + handleResize() { this.$refs.realtimeChartRef.resize() }, }, watch: { - dataStatusModalVisible(val) { + async dataStatusModalVisible(val) { if (val) { - this.dataStatusCheckedKeys = this.initialDataRecieveSettings.sysUserFocusStations.map((item) => - parseInt(item.stationId) - ) - this.dataRecieveStatusModel = { - cacheTime: this.initialDataRecieveSettings.cacheTime, - scaleInterval: this.initialDataRecieveSettings.scaleInterval, - timelineLength: this.initialDataRecieveSettings.timelineLength, - updateIntervalTime: this.initialDataRecieveSettings.updateIntervalTime, + try { + this.spinLoading = true + await this.clearDataRecieveSetting() + await this.getDataRecieveSettings() + this.startGetDataReceiveStatusList() + } catch (error) { + this.$message.error(error) + this.spinLoading = false } - - this.startGetDataReceiveStatusList() } else { clearInterval(this.timer) } diff --git a/src/views/stationOperation/components/RealTimeDataChart.vue b/src/views/stationOperation/components/RealTimeDataChart.vue index 075af92..37afcc8 100644 --- a/src/views/stationOperation/components/RealTimeDataChart.vue +++ b/src/views/stationOperation/components/RealTimeDataChart.vue @@ -73,7 +73,7 @@ const initialOption = { formatter: (params) => { return `
${params.marker}${params.name}
-
START:${dayjs(new Date(params.value[1])).format('YYYY-MM-DD HH:mm:ss')}
+
START:${dayjs(new Date(params.value[4])).format('YYYY-MM-DD HH:mm:ss')}
END:${dayjs(new Date(params.value[2])).format('YYYY-MM-DD HH:mm:ss')}
` }, @@ -249,6 +249,7 @@ export default { item.dataList.forEach((item) => { this.convertStatus(item) + let originalTime = new Date(item.beginTime * 1000).getTime() let startTime = new Date(item.beginTime * 1000).getTime() if (item.type == 'PHD') { startTime = item.endTime * 1000 - 60 * 1000 * 30 @@ -261,7 +262,7 @@ export default { if (find.isShow) { data.push({ name: item.status, - value: [index, startTime, endTime, duration], + value: [index, startTime, endTime, duration, originalTime], itemStyle: { normal: { color: find.color, diff --git a/src/views/stationOperation/index.vue b/src/views/stationOperation/index.vue index 1767edb..8d50ac1 100644 --- a/src/views/stationOperation/index.vue +++ b/src/views/stationOperation/index.vue @@ -521,12 +521,6 @@ export default { */ onFilterMarker({ filterType, filterDataQuality }) { this.updataFilterType = filterType - console.log( - '%c [ filterType, filterDataQuality ]-343', - 'font-size:13px; background:pink; color:#bf2c9f;', - filterType, - filterDataQuality - ) this.updataFilterDataQuality = [] filterDataQuality.forEach((item) => { if (item === 'Excellent data quality') { @@ -548,7 +542,13 @@ export default { // 地图图标点击 onMarkerClick(stationInfo) { - const { stationType, status } = stationInfo + const { stationType, stationName } = stationInfo + const find = this.orgStationList.find(item => item.stationCode == stationName) + if(!find) { + return + } + + const status = find.status if (stationType !== 'NRL' && stationType !== 'Nuclear Facility' && status !== 'Unoperating') { this.$refs.mapPane.handleOpenAnalyzeModal(stationInfo) } diff --git a/src/views/system/stationList.vue b/src/views/system/stationList.vue index 2a0ecfa..55e4d1b 100644 --- a/src/views/system/stationList.vue +++ b/src/views/system/stationList.vue @@ -188,7 +188,10 @@ export default { } const validateCountryCode = (_, value, callback) => { - if (value && value.length > 2) { + if(!value) { + callback(new Error('Please Enter Country Code')) + } + else if (value.length > 2) { callback(new Error('Country Code Limit 2 Char')) } else { callback() @@ -199,7 +202,7 @@ export default { rules: { stationId: [{ required: true, message: 'Please Enter Station Id' }], stationCode: [{ required: true, validator: validateStationCode }], - countryCode: [{ validator: validateCountryCode }] + countryCode: [{ required: true, validator: validateCountryCode }] }, url: { list: '/gardsStations/findPage',