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