fix: 增加切换到台站地图页面刷新台站列表功能,修改小车路径请求的日期参数
This commit is contained in:
parent
89a06fab30
commit
fa9ad25892
|
@ -169,18 +169,16 @@
|
|||
<div class="route-form-item">
|
||||
<div class="label">Start Date</div>
|
||||
<custom-date-picker
|
||||
show-time
|
||||
format="YYYY/MM/DD HH:mm:ss"
|
||||
valueFormat="YYYY/MM/DD HH:mm:ss"
|
||||
format="YYYY-MM-DD"
|
||||
valueFormat="YYYY-MM-DD"
|
||||
v-model="routeParams.startDate"
|
||||
></custom-date-picker>
|
||||
</div>
|
||||
<div class="route-form-item">
|
||||
<div class="label">End Date</div>
|
||||
<custom-date-picker
|
||||
show-time
|
||||
format="YYYY/MM/DD HH:mm:ss"
|
||||
valueFormat="YYYY/MM/DD HH:mm:ss"
|
||||
format="YYYY-MM-DD"
|
||||
valueFormat="YYYY-MM-DD"
|
||||
v-model="routeParams.endDate"
|
||||
></custom-date-picker>
|
||||
</div>
|
||||
|
|
|
@ -183,19 +183,6 @@ export default {
|
|||
ScrollContainer,
|
||||
DataListItem,
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
handler: function (val, oldVal) {
|
||||
console.log('fasdfasde12312', val)
|
||||
console.log('8765432', oldVal)
|
||||
if (val.name === 'station-operation') {
|
||||
this.getDataProvisionEfficiency(this.markerList_clone)
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
// immediate: true,
|
||||
},
|
||||
},
|
||||
deactivated() {
|
||||
//等同于 销毁的生命周期
|
||||
console.log('切换出发了3')
|
||||
|
@ -205,6 +192,8 @@ export default {
|
|||
},
|
||||
activated() {
|
||||
this.getFollowedStationList()
|
||||
this.getStationList()
|
||||
this.getStationTree()
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -246,9 +235,7 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
this.getStationList()
|
||||
this.getStationTypeList()
|
||||
this.getStationTree()
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer)
|
||||
|
@ -270,7 +257,7 @@ export default {
|
|||
this.markerList = cloneDeep(res).filter((stationInfo) => stationInfo.stationType !== MarkerType.NuclearFacility) // 去除核设施
|
||||
|
||||
this.markerList_clone = cloneDeep(res)
|
||||
this.getDataProvisionEfficiency(this.markerList_clone, 'one')
|
||||
this.getDataProvisionEfficiency(this.markerList_clone)
|
||||
// this.timer = setInterval(() => {
|
||||
// setTimeout(() => {
|
||||
// this.getDataProvisionEfficiency(this.markerList_clone)
|
||||
|
@ -287,17 +274,18 @@ export default {
|
|||
},
|
||||
|
||||
// 查询台站数据提供率及有效率
|
||||
async getDataProvisionEfficiency(arr, str) {
|
||||
async getDataProvisionEfficiency(arr) {
|
||||
this.httpNum++
|
||||
if (str && this.$route.path == '/station-operation') {
|
||||
if (!this.loaded && 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) {
|
||||
this.$message.destroy()
|
||||
if (str && this.$route.path == '/station-operation') {
|
||||
if (!this.loaded && this.$route.path == '/station-operation') {
|
||||
this.$message.success({ content: 'Loaded!', key, duration: 2 })
|
||||
this.loaded = true
|
||||
}
|
||||
res.result.forEach((item) => {
|
||||
if (Object.prototype.toString.call(item) == '[object Object]') {
|
||||
|
|
Loading…
Reference in New Issue
Block a user