forked from github/dataease
fix: 删除行政区划代码前端缓存
This commit is contained in:
parent
3ace9e6d88
commit
93b2dc8b78
@ -68,7 +68,7 @@ public class MapUtils {
|
||||
|
||||
AreaEntity china = root();
|
||||
|
||||
maps.parallelStream().forEach(map -> {
|
||||
maps.stream().forEach(map -> {
|
||||
// maps.stream().forEach(map -> {
|
||||
String province_code = map.get(Constants.PROVINCE_CODE).toString();
|
||||
String city_code = map.get(Constants.CITY_CODE).toString();
|
||||
|
@ -128,6 +128,9 @@ export default {
|
||||
console.log('trackMenuInfo' + JSON.stringify(trackMenuInfo))
|
||||
return trackMenuInfo
|
||||
},
|
||||
chartType() {
|
||||
return this.chart.type
|
||||
},
|
||||
...mapState([
|
||||
'canvasStyleData',
|
||||
'nowPanelTrackInfo'
|
||||
@ -174,6 +177,11 @@ export default {
|
||||
if (val1 > 0) {
|
||||
this.getData(this.element.propValue.viewId)
|
||||
}
|
||||
},
|
||||
'chartType': function(newVal, oldVal) {
|
||||
if (newVal === 'map' && newVal !== oldVal) {
|
||||
this.initAreas()
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -181,7 +189,7 @@ export default {
|
||||
this.refId = uuid.v1
|
||||
// this.filter.filter = this.$store.getters.conditions
|
||||
this.getData(this.element.propValue.viewId)
|
||||
this.initAreas()
|
||||
// this.initAreas()
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
@ -349,14 +357,14 @@ export default {
|
||||
}
|
||||
},
|
||||
initAreas() {
|
||||
let mapping
|
||||
if ((mapping = localStorage.getItem('areaMapping')) !== null) {
|
||||
this.places = JSON.parse(mapping)
|
||||
return
|
||||
}
|
||||
// let mapping
|
||||
// if ((mapping = localStorage.getItem('areaMapping')) !== null) {
|
||||
// this.places = JSON.parse(mapping)
|
||||
// return
|
||||
// }
|
||||
Object.keys(this.places).length === 0 && areaMapping().then(res => {
|
||||
this.places = res.data
|
||||
localStorage.setItem('areaMapping', JSON.stringify(res.data))
|
||||
// localStorage.setItem('areaMapping', JSON.stringify(res.data))
|
||||
})
|
||||
},
|
||||
doMapLink(linkFilters) {
|
||||
|
@ -711,7 +711,8 @@ export default {
|
||||
},
|
||||
moveId: -1,
|
||||
chart: {
|
||||
id: 'echart'
|
||||
id: 'echart',
|
||||
type: null
|
||||
},
|
||||
dimensionFilterEdit: false,
|
||||
dimensionItem: {},
|
||||
@ -754,6 +755,9 @@ export default {
|
||||
// this.getData(this.$store.state.chart.viewId)
|
||||
// return this.$store.state.chart.viewId
|
||||
// }
|
||||
chartType() {
|
||||
return this.chart.type
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'param': function() {
|
||||
@ -766,11 +770,16 @@ export default {
|
||||
},
|
||||
searchField(val) {
|
||||
this.fieldFilter(val)
|
||||
},
|
||||
'chartType': function(newVal, oldVal) {
|
||||
if (newVal === 'map' && newVal !== oldVal) {
|
||||
this.initAreas()
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// this.get(this.$store.state.chart.viewId);
|
||||
this.initAreas()
|
||||
// this.initAreas()
|
||||
},
|
||||
mounted() {
|
||||
// this.get(this.$store.state.chart.viewId);
|
||||
@ -1327,14 +1336,14 @@ export default {
|
||||
},
|
||||
|
||||
initAreas() {
|
||||
let mapping
|
||||
if ((mapping = localStorage.getItem('areaMapping')) !== null) {
|
||||
this.places = JSON.parse(mapping)
|
||||
return
|
||||
}
|
||||
// let mapping
|
||||
// if ((mapping = localStorage.getItem('areaMapping')) !== null) {
|
||||
// this.places = JSON.parse(mapping)
|
||||
// return
|
||||
// }
|
||||
Object.keys(this.places).length === 0 && areaMapping().then(res => {
|
||||
this.places = res.data
|
||||
localStorage.setItem('areaMapping', JSON.stringify(res.data))
|
||||
// localStorage.setItem('areaMapping', JSON.stringify(res.data))
|
||||
})
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user