From d6ef68963bcfad1c0003c605eeaea5fe17cd389b Mon Sep 17 00:00:00 2001 From: Xu Zhimeng Date: Mon, 19 Feb 2024 14:09:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=201=E3=80=81focus=20data=E4=B8=AD=E5=A6=82?= =?UTF-8?q?=E6=9E=9C=E6=9C=89=E6=8E=92=E7=8F=AD=E4=BB=BB=E5=8A=A1=EF=BC=8C?= =?UTF-8?q?=E5=88=99=E9=AB=98=E4=BA=AE=E6=98=BE=E7=A4=BA=EF=BC=9B2?= =?UTF-8?q?=E3=80=81Data=20Receive=20status=20Monitoring=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=B8=85=E7=90=86=E7=BC=93=E5=AD=98=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../station-operation/data-item-bg-active.png | Bin 0 -> 1525 bytes .../components/DataListItem.vue | 12 +++-- .../stationOperation/components/MapPane.vue | 50 +++++++++++------- 3 files changed, 39 insertions(+), 23 deletions(-) create mode 100644 src/assets/images/station-operation/data-item-bg-active.png 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 0000000000000000000000000000000000000000..15652ead3d1fe09f27f0cd405aef1b09726a3427 GIT binary patch literal 1525 zcmeAS@N?(olHy`uVBq!ia0y~yU~~eq{W;ixl zO)W`OsL0L9E4HezRRWu91!RMS^_3LBN=mYAl^~9a@C{IK&M!(;Fw-;8O*SwvQZTpF zGc+?XF*DFnFfuSQ&^IvEH#E{UG_x`=u`)DQfC43;ZAB?*RzWUqP`iLUTcwPWk^(Dz z{qpj1y>er{{GxPyLrY6beFGzXBO_g)3fZE`@j@w*YQzUNJP7fB~jokyxN_sAmB35=^15FMg%Dxp39RB|)hO_hL1; zIHa;5RX-@TIKQ+g85nVC${?!>telHd6HD@oLh|!-V4)b0kzbNuoRMFkU}UIgq@WR= znU|7ZUaSe$;OlGUnO9trn3tUD>0+w{G(s;kGsViy($dMv(7@5z)y2fn(ACw#$k@fr z)xgo%!pYRd+0+cC*Cju>G&eP`1g19yq1OqgUQk-dEdbi=l3J8mmYU*Ll%J~r_On$c zZns$AG!Lpb1-Dx)aq86vIz}H9vq&)w69Oh55EGtmfgE_sPt5}+_ab1rKH6iuhk=19 z!_&nvq~g|_>$V`AfdRlH_(X}lIe)~#@#Wg^{ zoa-X&9+X60YAzpod5Xcm9VmBYHb%xwES`&+eodyc5i?tC~a z_ZhR4W8%I|B~R~tdE5GQ>Q)Ip4n>8w*&Pc7m@Xa<;Ani2tkL4|#Zbg)!NTN<%A8-< z+`w#6@2O9Flb})xza+R61!{R(1v<>ymQH-rAi$I)0g}98$Rp1V6t!ymC&kR62owhs zP8m!N9E>djgoy%QyXls}aZ#GH*gK3`6r0?&uHITI&7bamhS^2@kifw+S!?ZTia(vc z5%ckRQ)R;nCkdq+q5hNH`Qt>?;%hZ(O?d@EIhs+6w?)~|3CucFk#&E8Rygoo4^$9)y85}Sb4q9e0JZQA$p8QV literal 0 HcmV?d00001 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) }