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 }}
|
{{ item.stationName || item.stationCode }}
|
||||||
</h4>
|
</h4>
|
||||||
<div class="data-list-item-container">
|
<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-children">
|
||||||
<div class="data-list-item-child">
|
<div class="data-list-item-child">
|
||||||
<label>Station Type:</label>
|
<label>Station Type:</label>
|
||||||
|
@ -42,9 +42,9 @@
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
item: {
|
item: {
|
||||||
type: Object
|
type: Object,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -85,6 +85,10 @@ export default {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
background-image: url(~@/assets/images/station-operation/data-item-bg-active.png);
|
||||||
|
}
|
||||||
|
|
||||||
.data-list-item-children {
|
.data-list-item-children {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
|
@ -189,7 +189,7 @@
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<a-form-model class="attribute-form" layout="vertical">
|
<a-form-model class="attribute-form" layout="vertical">
|
||||||
<a-form-model-item label="Cache time">
|
<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>
|
<span>day</span>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="Scale interval">
|
<a-form-model-item label="Scale interval">
|
||||||
|
@ -268,15 +268,11 @@
|
||||||
import CustomModal from '@/components/CustomModal/index.vue'
|
import CustomModal from '@/components/CustomModal/index.vue'
|
||||||
import CustomTree from '@/components/CustomTree/index.vue'
|
import CustomTree from '@/components/CustomTree/index.vue'
|
||||||
import RealTimeDataChart from './RealTimeDataChart.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 { MarkerType, FilterIcon } from './markerEnum'
|
||||||
|
|
||||||
import { Vector as VectorLayer } from 'ol/layer'
|
import { Vector as VectorLayer } from 'ol/layer'
|
||||||
import VectorSource from 'ol/source/Vector'
|
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'
|
import { cloneDeep } from 'lodash'
|
||||||
|
|
||||||
// Filter中的筛选列表
|
// Filter中的筛选列表
|
||||||
|
@ -455,8 +451,6 @@ export default {
|
||||||
this.initParentMapProps()
|
this.initParentMapProps()
|
||||||
document.addEventListener('fullscreenchange', this.onFullScreenChange)
|
document.addEventListener('fullscreenchange', this.onFullScreenChange)
|
||||||
this.stationList = []
|
this.stationList = []
|
||||||
|
|
||||||
this.getDataRecieveSettings()
|
|
||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
document.removeEventListener('fullscreenchange', this.onFullScreenChange)
|
document.removeEventListener('fullscreenchange', this.onFullScreenChange)
|
||||||
|
@ -739,7 +733,16 @@ export default {
|
||||||
userId: this.$store.getters.userInfo.id,
|
userId: this.$store.getters.userInfo.id,
|
||||||
})
|
})
|
||||||
if (success) {
|
if (success) {
|
||||||
|
const { cacheTime, scaleInterval, timelineLength, updateIntervalTime, sysUserFocusStations } = result
|
||||||
this.initialDataRecieveSettings = result
|
this.initialDataRecieveSettings = result
|
||||||
|
|
||||||
|
this.dataRecieveStatusModel = {
|
||||||
|
cacheTime,
|
||||||
|
scaleInterval,
|
||||||
|
timelineLength,
|
||||||
|
updateIntervalTime,
|
||||||
|
}
|
||||||
|
this.dataStatusCheckedKeys = sysUserFocusStations.map((item) => parseInt(item.stationId))
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(message)
|
this.$message.error(message)
|
||||||
}
|
}
|
||||||
|
@ -771,6 +774,7 @@ export default {
|
||||||
const { success, result, message } = await getAction('/stationOperation/getDataReceivingStatus', {
|
const { success, result, message } = await getAction('/stationOperation/getDataReceivingStatus', {
|
||||||
userId: this.$store.getters.userInfo.id,
|
userId: this.$store.getters.userInfo.id,
|
||||||
oneStationId: (this.stationInfo && this.stationInfo.stationId) || '',
|
oneStationId: (this.stationInfo && this.stationInfo.stationId) || '',
|
||||||
|
cacheTime: this.initialDataRecieveSettings.cacheTime,
|
||||||
})
|
})
|
||||||
this.maskVisi = false
|
this.maskVisi = false
|
||||||
this.spinLoading = 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() {
|
handleResize() {
|
||||||
this.$refs.realtimeChartRef.resize()
|
this.$refs.realtimeChartRef.resize()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
dataStatusModalVisible(val) {
|
async dataStatusModalVisible(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
this.dataStatusCheckedKeys = this.initialDataRecieveSettings.sysUserFocusStations.map((item) =>
|
try {
|
||||||
parseInt(item.stationId)
|
this.spinLoading = true
|
||||||
)
|
await this.clearDataRecieveSetting()
|
||||||
this.dataRecieveStatusModel = {
|
await this.getDataRecieveSettings()
|
||||||
cacheTime: this.initialDataRecieveSettings.cacheTime,
|
this.startGetDataReceiveStatusList()
|
||||||
scaleInterval: this.initialDataRecieveSettings.scaleInterval,
|
} catch (error) {
|
||||||
timelineLength: this.initialDataRecieveSettings.timelineLength,
|
this.$message.error(error)
|
||||||
updateIntervalTime: this.initialDataRecieveSettings.updateIntervalTime,
|
this.spinLoading = false
|
||||||
}
|
}
|
||||||
|
|
||||||
this.startGetDataReceiveStatusList()
|
|
||||||
} else {
|
} else {
|
||||||
clearInterval(this.timer)
|
clearInterval(this.timer)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user