fix: 1、focus data中如果有排班任务,则高亮显示;2、Data Receive status Monitoring增加清理缓存功能
This commit is contained in:
parent
80c1f47996
commit
d6ef68963b
BIN
src/assets/images/station-operation/data-item-bg-active.png
Normal file
BIN
src/assets/images/station-operation/data-item-bg-active.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
|
@ -4,7 +4,7 @@
|
|||
{{ item.stationName || item.stationCode }}
|
||||
</h4>
|
||||
<div class="data-list-item-container">
|
||||
<div class="data-list-item-content">
|
||||
<div class="data-list-item-content" :class="[item.scheduling ? 'active' : '']">
|
||||
<div class="data-list-item-children">
|
||||
<div class="data-list-item-child">
|
||||
<label>Station Type:</label>
|
||||
|
@ -42,9 +42,9 @@
|
|||
export default {
|
||||
props: {
|
||||
item: {
|
||||
type: Object
|
||||
}
|
||||
}
|
||||
type: Object,
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -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;
|
||||
|
|
|
@ -189,7 +189,7 @@
|
|||
<div class="content">
|
||||
<a-form-model class="attribute-form" layout="vertical">
|
||||
<a-form-model-item label="Cache time">
|
||||
<a-input-number type="number" v-model="dataRecieveStatusModel.cacheTime" :min="0"></a-input-number>
|
||||
<a-input-number type="number" v-model="dataRecieveStatusModel.cacheTime" :min="1"></a-input-number>
|
||||
<span>day</span>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item label="Scale interval">
|
||||
|
@ -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
|
||||
}
|
||||
} else {
|
||||
clearInterval(this.timer)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user