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