查询台站数据提供率及有效率 无数据返回是,关闭定时器,等接口有数据是在执行
台站详情弹窗中字段调整
This commit is contained in:
parent
9dd1e3969a
commit
a62efa494f
|
@ -7,6 +7,10 @@ export default {
|
|||
label: 'FACILITY_NAME',
|
||||
key: 'facilityName'
|
||||
},
|
||||
{
|
||||
label: 'FACILITY ID',
|
||||
key: 'facilityId'
|
||||
},
|
||||
{
|
||||
label: 'ACTIVITY DAY',
|
||||
key: 'activityDay'
|
||||
|
@ -35,10 +39,6 @@ export default {
|
|||
label: 'CRITICALITYDATE',
|
||||
key: 'criticalityDate'
|
||||
},
|
||||
{
|
||||
label: 'FACILITY ID',
|
||||
key: 'facilityId'
|
||||
},
|
||||
{
|
||||
label: 'GRIDCONEETIONDATE',
|
||||
key: 'gridconeetionDate'
|
||||
|
@ -83,6 +83,9 @@ export default {
|
|||
[MarkerType.ImsRnStationP]: [{
|
||||
label: 'STATIONCODE',
|
||||
key: 'stationCode'
|
||||
}, {
|
||||
label: 'STATIONID',
|
||||
key: 'stationId'
|
||||
}, {
|
||||
label: 'COUNTRYCODE',
|
||||
key: 'countryCode'
|
||||
|
@ -107,9 +110,6 @@ export default {
|
|||
}, {
|
||||
label: 'MODDATE',
|
||||
key: 'moddate'
|
||||
}, {
|
||||
label: 'STATIONID',
|
||||
key: 'stationId'
|
||||
}, {
|
||||
label: 'STATUS',
|
||||
key: 'status'
|
||||
|
@ -138,6 +138,9 @@ export default {
|
|||
[MarkerType.ImsRnStationG]: [{
|
||||
label: 'STATIONCODE',
|
||||
key: 'stationCode'
|
||||
}, {
|
||||
label: 'STATIONID',
|
||||
key: 'stationId'
|
||||
}, {
|
||||
label: 'COUNTRYCODE',
|
||||
key: 'countryCode'
|
||||
|
@ -162,9 +165,6 @@ export default {
|
|||
}, {
|
||||
label: 'MODDATE',
|
||||
key: 'moddate'
|
||||
}, {
|
||||
label: 'STATIONID',
|
||||
key: 'stationId'
|
||||
}, {
|
||||
label: 'STATUS',
|
||||
key: 'status'
|
||||
|
@ -193,6 +193,9 @@ export default {
|
|||
[MarkerType.NRL]: [{
|
||||
label: 'STATIONCODE',
|
||||
key: 'stationCode'
|
||||
}, {
|
||||
label: 'STATIONID',
|
||||
key: 'stationId'
|
||||
}, {
|
||||
label: 'COUNTRYCODE',
|
||||
key: 'countryCode'
|
||||
|
@ -217,9 +220,6 @@ export default {
|
|||
}, {
|
||||
label: 'MODDATE',
|
||||
key: 'moddate'
|
||||
}, {
|
||||
label: 'STATIONID',
|
||||
key: 'stationId'
|
||||
}, {
|
||||
label: 'STATUS',
|
||||
key: 'status'
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
:scrollContainer="getScrollContainer"
|
||||
class="data-list has-search"
|
||||
:class="{
|
||||
'show-search': searchPlacementVisible
|
||||
'show-search': searchPlacementVisible,
|
||||
}"
|
||||
>
|
||||
<div class="search-filter-placement">
|
||||
|
@ -171,27 +171,27 @@ import DataListItem from './components/DataListItem.vue'
|
|||
import ScrollContainer from '@/components/ScrollContainer/index.vue'
|
||||
import { getAction } from '../../api/manage'
|
||||
import { cloneDeep } from 'lodash'
|
||||
const key= "updateList"
|
||||
const key = 'updateList'
|
||||
export default {
|
||||
components: {
|
||||
Map,
|
||||
MapMarker,
|
||||
MapPane,
|
||||
ScrollContainer,
|
||||
DataListItem
|
||||
DataListItem,
|
||||
},
|
||||
watch: {
|
||||
"$route": {
|
||||
handler:function(val,oldVal) {
|
||||
if (val.name!=="station-operation") {
|
||||
$route: {
|
||||
handler: function (val, oldVal) {
|
||||
if (val.name !== 'station-operation') {
|
||||
this.$message.destroy()
|
||||
clearInterval(this.timer);
|
||||
clearInterval(this.timer)
|
||||
this.timer = null
|
||||
}
|
||||
},
|
||||
deep:true,
|
||||
immediate:true
|
||||
}
|
||||
deep: true,
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -216,7 +216,7 @@ export default {
|
|||
filter: {
|
||||
searchText: undefined,
|
||||
status: undefined,
|
||||
type: undefined
|
||||
type: undefined,
|
||||
},
|
||||
|
||||
filterVisible: false, // 筛选组件是否显示
|
||||
|
@ -226,7 +226,7 @@ export default {
|
|||
|
||||
treeData: [], // 台站树列表
|
||||
timer: null,
|
||||
updataFilterType: []
|
||||
updataFilterType: [],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -235,8 +235,8 @@ export default {
|
|||
this.getStationTypeList()
|
||||
this.getStationTree()
|
||||
},
|
||||
beforeDestroy () {
|
||||
clearInterval(this.timer);
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer)
|
||||
this.timer = null
|
||||
},
|
||||
methods: {
|
||||
|
@ -249,12 +249,12 @@ export default {
|
|||
this.dataList = cloneDeep(res)
|
||||
this.markerList = cloneDeep(res)
|
||||
this.markerList_clone = cloneDeep(res)
|
||||
this.getDataProvisionEfficiency(this.markerList_clone,"one")
|
||||
this.timer = setInterval(() => {
|
||||
setTimeout(() => {
|
||||
this.getDataProvisionEfficiency(this.markerList_clone)
|
||||
}, 0);
|
||||
}, 15000);
|
||||
this.getDataProvisionEfficiency(this.markerList_clone, 'one')
|
||||
// this.timer = setInterval(() => {
|
||||
// setTimeout(() => {
|
||||
// this.getDataProvisionEfficiency(this.markerList_clone)
|
||||
// }, 0);
|
||||
// }, 15000);
|
||||
this.$nextTick(() => {
|
||||
this.$refs.scrollContainerRef.checkScrollEnd()
|
||||
})
|
||||
|
@ -267,51 +267,62 @@ export default {
|
|||
|
||||
// 查询台站数据提供率及有效率
|
||||
async getDataProvisionEfficiency(arr, str) {
|
||||
if (str && this.$route.path=="/station-operation") {
|
||||
this.$message.loading({ content: 'Loading station data, please wait...', key, duration: 0 })
|
||||
if (str && this.$route.path == '/station-operation') {
|
||||
this.$message.loading({ content: 'Loading station data, please wait...', key, duration: 0 })
|
||||
}
|
||||
getAction('/stationOperation/getDataProvisionEfficiency').then(res => {
|
||||
if (res.success) {
|
||||
getAction('/stationOperation/getDataProvisionEfficiency')
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.destroy()
|
||||
if (str && this.$route.path == '/station-operation') {
|
||||
this.$message.success({ content: 'Loaded!', key, duration: 2 })
|
||||
}
|
||||
res.result.forEach((item) => {
|
||||
arr.forEach((el) => {
|
||||
if (
|
||||
parseInt(item.id) == el.stationId &&
|
||||
el.stationType != 'Nuclear Facility' &&
|
||||
el.stationType != 'NRL'
|
||||
) {
|
||||
item.stationType = el.stationType
|
||||
item.stationId = el.stationId
|
||||
}
|
||||
})
|
||||
})
|
||||
this.orgStationList = res.result
|
||||
if (this.updataFilterType.length > 0) {
|
||||
this.upDateStationList = this.orgStationList.filter((item) =>
|
||||
this.updataFilterType.includes(item.stationType)
|
||||
)
|
||||
} else {
|
||||
this.upDateStationList = res.result
|
||||
}
|
||||
if (this.markerList.length > 0) {
|
||||
let curList = []
|
||||
this.markerList.forEach((item) => {
|
||||
if (item.stationType != 'Nuclear Facility' && item.stationType != 'NRL') {
|
||||
this.orgStationList.forEach((el) => {
|
||||
if (parseInt(el.id) == item.stationId) {
|
||||
curList.push(el)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
this.upDateStationList = curList
|
||||
} else {
|
||||
this.upDateStationList = []
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.getDataProvisionEfficiency(this.markerList_clone)
|
||||
}, 10000)
|
||||
} else {
|
||||
this.$message.warning('This operation fails. Contact your system administrator')
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message.destroy()
|
||||
if (str && this.$route.path == "/station-operation") {
|
||||
this.$message.success({ content: 'Loaded!', key, duration: 2 })
|
||||
}
|
||||
res.result.forEach(item => {
|
||||
arr.forEach(el => {
|
||||
if (parseInt(item.id) == el.stationId&&el.stationType!="Nuclear Facility"&&el.stationType!="NRL") {
|
||||
item.stationType = el.stationType
|
||||
item.stationId = el.stationId
|
||||
}
|
||||
})
|
||||
})
|
||||
this.orgStationList = res.result
|
||||
if (this.updataFilterType.length>0) {
|
||||
this.upDateStationList = this.orgStationList.filter(item => this.updataFilterType.includes(item.stationType))
|
||||
} else {
|
||||
this.upDateStationList = res.result
|
||||
}
|
||||
if (this.markerList.length > 0) {
|
||||
let curList = []
|
||||
this.markerList.forEach(item => {
|
||||
if (item.stationType!="Nuclear Facility" && item.stationType!="NRL") {
|
||||
this.orgStationList.forEach(el => {
|
||||
if (parseInt(el.id) == item.stationId) {
|
||||
curList.push(el)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
this.upDateStationList=curList
|
||||
} else {
|
||||
this.upDateStationList=[]
|
||||
}
|
||||
} else {
|
||||
this.$message.warning("This operation fails. Contact your system administrator")
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$message.destroy()
|
||||
console.error(error)
|
||||
})
|
||||
console.error(error)
|
||||
})
|
||||
},
|
||||
|
||||
// 获取已关注站点列表
|
||||
|
@ -338,7 +349,7 @@ export default {
|
|||
async getStationTypeList() {
|
||||
try {
|
||||
const res = await getAction('/jeecg-station-operation/stationOperation/findStationType')
|
||||
this.stationTypeList = res.filter(item => item).map(item => ({ label: item, value: item }))
|
||||
this.stationTypeList = res.filter((item) => item).map((item) => ({ label: item, value: item }))
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
|
@ -349,10 +360,10 @@ export default {
|
|||
try {
|
||||
const { success, result, message } = await getAction('/stationOperation/findTree')
|
||||
if (success) {
|
||||
result.forEach(item => {
|
||||
result.forEach((item) => {
|
||||
item.stationCode = item.code
|
||||
item.stationId = `root_${item.stationId}`
|
||||
item.children.forEach(child => {
|
||||
item.children.forEach((child) => {
|
||||
child.stationCode = child.code
|
||||
child.stationId = `${item.stationId}_parent_${child.stationId}`
|
||||
})
|
||||
|
@ -398,7 +409,7 @@ export default {
|
|||
|
||||
// 左侧 All Data 筛选
|
||||
onFilterChange() {
|
||||
this.dataList = this.originalDataList.filter(dataItem => {
|
||||
this.dataList = this.originalDataList.filter((dataItem) => {
|
||||
const filterSearchText =
|
||||
!this.filter.searchText ||
|
||||
-1 !== dataItem.stationName.toLowerCase().indexOf(this.filter.searchText.toLowerCase())
|
||||
|
@ -415,7 +426,8 @@ export default {
|
|||
// 定位台站
|
||||
locateFacility(stationItem) {
|
||||
const find = this.markerList.find(
|
||||
markerItem => markerItem.stationId == stationItem.stationId && markerItem.stationType == stationItem.stationType
|
||||
(markerItem) =>
|
||||
markerItem.stationId == stationItem.stationId && markerItem.stationType == stationItem.stationType
|
||||
)
|
||||
if (!find) {
|
||||
// 如果未显示,则不定位
|
||||
|
@ -427,7 +439,7 @@ export default {
|
|||
setTimeout(() => {
|
||||
// 在panTo结束后执行动画
|
||||
const overlays = this.$refs.mapRef.map.getOverlays()
|
||||
const currOverlay = overlays.getArray().find(item => item.id == `marker_${stationType}_${stationId}`)
|
||||
const currOverlay = overlays.getArray().find((item) => item.id == `marker_${stationType}_${stationId}`)
|
||||
const innerEle = currOverlay.getElement()
|
||||
innerEle.classList.add('ani-bounding')
|
||||
|
||||
|
@ -445,10 +457,10 @@ export default {
|
|||
onChangeMarker(markerList) {
|
||||
this.markerList = markerList
|
||||
let curList = []
|
||||
if (markerList.length>0) {
|
||||
markerList.forEach(item => {
|
||||
if (item.stationType!="Nuclear Facility" && item.stationType!="NRL") {
|
||||
this.orgStationList.forEach(el => {
|
||||
if (markerList.length > 0) {
|
||||
markerList.forEach((item) => {
|
||||
if (item.stationType != 'Nuclear Facility' && item.stationType != 'NRL') {
|
||||
this.orgStationList.forEach((el) => {
|
||||
if (parseInt(el.id) == item.stationId) {
|
||||
el.stationType = item.stationType
|
||||
el.stationId = item.stationId
|
||||
|
@ -457,9 +469,9 @@ export default {
|
|||
})
|
||||
}
|
||||
})
|
||||
this.upDateStationList=curList
|
||||
this.upDateStationList = curList
|
||||
} else {
|
||||
this.upDateStationList=[]
|
||||
this.upDateStationList = []
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -480,8 +492,8 @@ export default {
|
|||
filterType,
|
||||
filterDataQuality
|
||||
)
|
||||
this.markerList = this.originalDataList.filter(item => filterType.includes(item.stationType))
|
||||
this.upDateStationList = this.orgStationList.filter(item => filterType.includes(item.stationType))
|
||||
this.markerList = this.originalDataList.filter((item) => filterType.includes(item.stationType))
|
||||
this.upDateStationList = this.orgStationList.filter((item) => filterType.includes(item.stationType))
|
||||
},
|
||||
|
||||
// 地图图标点击
|
||||
|
@ -495,8 +507,8 @@ export default {
|
|||
|
||||
getDictSelectTagContainer() {
|
||||
return document.body
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
|
|
Loading…
Reference in New Issue
Block a user