Merge branch 'dev' of github.com:dataease/dataease into dev

This commit is contained in:
taojinlong 2021-08-16 12:47:35 +08:00
commit b8f4a819f9
3 changed files with 36 additions and 23 deletions

View File

@ -3182,24 +3182,24 @@ INSERT INTO `area_mapping` VALUES (3011, '台湾省', '710000', '台湾省', '71
INSERT INTO `area_mapping` VALUES (3012, '台湾省', '710000', '台湾省', '710000', '苗栗县', '717000');
INSERT INTO `area_mapping` VALUES (3013, '台湾省', '710000', '台湾省', '710000', '南投县', '718000');
INSERT INTO `area_mapping` VALUES (3014, '台湾省', '710000', '台湾省', '710000', '台北市', '719000');
INSERT INTO `area_mapping` VALUES (3015, '香港特别行政区', '810000', '香港特别行政区', '810100', '中西区', '810101');
INSERT INTO `area_mapping` VALUES (3016, '香港特别行政区', '810000', '香港特别行政区', '810100', '东区', '810102');
INSERT INTO `area_mapping` VALUES (3017, '香港特别行政区', '810000', '香港特别行政区', '810100', '九龙城区', '810103');
INSERT INTO `area_mapping` VALUES (3018, '香港特别行政区', '810000', '香港特别行政区', '810100', '观塘区', '810104');
INSERT INTO `area_mapping` VALUES (3019, '香港特别行政区', '810000', '香港特别行政区', '810100', '南区', '810105');
INSERT INTO `area_mapping` VALUES (3020, '香港特别行政区', '810000', '香港特别行政区', '810100', '深水埗区', '810106');
INSERT INTO `area_mapping` VALUES (3021, '香港特别行政区', '810000', '香港特别行政区', '810100', '湾仔区', '810107');
INSERT INTO `area_mapping` VALUES (3022, '香港特别行政区', '810000', '香港特别行政区', '810100', '黄大仙区', '810108');
INSERT INTO `area_mapping` VALUES (3023, '香港特别行政区', '810000', '香港特别行政区', '810100', '油尖旺区', '810109');
INSERT INTO `area_mapping` VALUES (3024, '香港特别行政区', '810000', '香港特别行政区', '810100', '离岛区', '810110');
INSERT INTO `area_mapping` VALUES (3025, '香港特别行政区', '810000', '香港特别行政区', '810100', '葵青区', '810111');
INSERT INTO `area_mapping` VALUES (3026, '香港特别行政区', '810000', '香港特别行政区', '810100', '北区', '810112');
INSERT INTO `area_mapping` VALUES (3027, '香港特别行政区', '810000', '香港特别行政区', '810100', '西贡区', '810113');
INSERT INTO `area_mapping` VALUES (3028, '香港特别行政区', '810000', '香港特别行政区', '810100', '沙田区', '810114');
INSERT INTO `area_mapping` VALUES (3029, '香港特别行政区', '810000', '香港特别行政区', '810100', '屯门区', '810115');
INSERT INTO `area_mapping` VALUES (3030, '香港特别行政区', '810000', '香港特别行政区', '810100', '大埔区', '810116');
INSERT INTO `area_mapping` VALUES (3031, '香港特别行政区', '810000', '香港特别行政区', '810100', '荃湾区', '810117');
INSERT INTO `area_mapping` VALUES (3032, '香港特别行政区', '810000', '香港特别行政区', '810100', '元朗区', '810118');
INSERT INTO `area_mapping` VALUES (3015, '香港特别行政区', '810000', '香港特别行政区', '810100', '中西区', '810001');
INSERT INTO `area_mapping` VALUES (3016, '香港特别行政区', '810000', '香港特别行政区', '810100', '湾仔区', '810002');
INSERT INTO `area_mapping` VALUES (3017, '香港特别行政区', '810000', '香港特别行政区', '810100', '东区', '810003');
INSERT INTO `area_mapping` VALUES (3018, '香港特别行政区', '810000', '香港特别行政区', '810100', '南区', '810004');
INSERT INTO `area_mapping` VALUES (3019, '香港特别行政区', '810000', '香港特别行政区', '810100', '油尖旺区', '810005');
INSERT INTO `area_mapping` VALUES (3020, '香港特别行政区', '810000', '香港特别行政区', '810100', '深水埗区', '810006');
INSERT INTO `area_mapping` VALUES (3021, '香港特别行政区', '810000', '香港特别行政区', '810100', '九龙城区', '810007');
INSERT INTO `area_mapping` VALUES (3022, '香港特别行政区', '810000', '香港特别行政区', '810100', '黄大仙区', '810008');
INSERT INTO `area_mapping` VALUES (3023, '香港特别行政区', '810000', '香港特别行政区', '810100', '观塘区', '810009');
INSERT INTO `area_mapping` VALUES (3024, '香港特别行政区', '810000', '香港特别行政区', '810100', '荃湾区', '810010');
INSERT INTO `area_mapping` VALUES (3025, '香港特别行政区', '810000', '香港特别行政区', '810100', '屯门区', '810011');
INSERT INTO `area_mapping` VALUES (3026, '香港特别行政区', '810000', '香港特别行政区', '810100', '元朗区', '810012');
INSERT INTO `area_mapping` VALUES (3027, '香港特别行政区', '810000', '香港特别行政区', '810100', '北区', '810013');
INSERT INTO `area_mapping` VALUES (3028, '香港特别行政区', '810000', '香港特别行政区', '810100', '大埔区', '810014');
INSERT INTO `area_mapping` VALUES (3029, '香港特别行政区', '810000', '香港特别行政区', '810100', '西贡区', '810015');
INSERT INTO `area_mapping` VALUES (3030, '香港特别行政区', '810000', '香港特别行政区', '810100', '沙田区', '810016');
INSERT INTO `area_mapping` VALUES (3031, '香港特别行政区', '810000', '香港特别行政区', '810100', '葵青区', '810017');
INSERT INTO `area_mapping` VALUES (3032, '香港特别行政区', '810000', '香港特别行政区', '810100', '离岛区', '810018');
INSERT INTO `area_mapping` VALUES (3033, '澳门特别行政区', '820000', '澳门特别行政区', '820000', '澳门特别行政区', '820000');
COMMIT;

View File

@ -166,24 +166,28 @@ export default {
this.myEcharts(chart_option)
},
registerDynamicMap(areaCode) {
this.downOrUp = true
if (this.$store.getters.geoMap[areaCode]) {
this.downOrUp = true
const json = this.$store.getters.geoMap[areaCode]
this.$echarts.registerMap('MAP', json)
console.log('开始切换地图:' + areaCode)
return
}
geoJson(areaCode).then(res => {
this.downOrUp = true
this.$echarts.registerMap('MAP', res)
console.log('开始切换地图:' + areaCode)
this.$store.dispatch('map/setGeo', {
key: areaCode,
value: res
})
}).catch(() => {
this.downOrUp = true
})
},
initMapChart(geoJson, chart) {
if (!this.$echarts.getMap('MAP') || !this.downOrUp) {
console.log('开始初始化地图:')
this.$echarts.registerMap('MAP', geoJson)
}
// this.$echarts.getMap('MAP') || this.$echarts.registerMap('MAP', geoJson)

View File

@ -1406,9 +1406,16 @@ export default {
chartClick(param) {
if (this.drillClickDimensionList.length < this.view.drillFields.length - 1) {
this.chart.type === 'map' && this.sendToChildren(param)
this.drillClickDimensionList.push({ dimensionList: param.data.dimensionList })
this.getData(this.param.id)
// const isSwitch = (this.chart.type === 'map' && this.sendToChildren(param))
if (this.chart.type === 'map') {
if (this.sendToChildren(param)) {
this.drillClickDimensionList.push({ dimensionList: param.data.dimensionList })
this.getData(this.param.id)
}
} else {
this.drillClickDimensionList.push({ dimensionList: param.data.dimensionList })
this.getData(this.param.id)
}
}
},
@ -1457,9 +1464,11 @@ export default {
const currentNode = this.findEntityByCode(aCode || this.view.customAttr.areaCode, this.places)
if (currentNode && currentNode.children && currentNode.children.length > 0) {
const nextNode = currentNode.children.find(item => item.name === name)
if (!nextNode || !nextNode.code) return null
// this.view.customAttr.areaCode = nextNode.code
this.currentAcreaNode = nextNode
this.$refs.dynamicChart && this.$refs.dynamicChart.registerDynamicMap && this.$refs.dynamicChart.registerDynamicMap(nextNode.code)
return nextNode
}
},
// areaCode