|
|
|
@ -302,3 +302,79 @@ select * from `excel_人口变化趋势_e1c9395feb`
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
更详细的见项目代码。
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
> **$Q$:我想在主页面显示云南省的地图,然后点击地图中某个城市,比如昆明市,进打开一个新的页面,里面是昆明市的地图,如果点击的是楚雄州,打开的新的页面就是楚雄州的地图,并且,要求不能开发16个市州的页面,那样太麻烦了,我只想开发一个市州的页面,让第一页省地图将参数传递到市州的页面,完成类似于钻取的工作,可以吗?**
|
|
|
|
|
|
|
|
|
|
$A$: 目前的$DataEase$ $V2$版本支持外部参数向仪表盘类组件传递参数,但对于地图是不支持的,地图是哪个地区,必然在页面上指定:
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
这样一来,上面的需求就无法满足了。
|
|
|
|
|
|
|
|
|
|
只好继续使用黑科技!
|
|
|
|
|
|
|
|
|
|
找到记录某个大屏使用了哪表记录上面的地区信息:
|
|
|
|
|
|
|
|
|
|
```sql
|
|
|
|
|
select * from data_visualization_info where name ='黄海测试的市州地图';
|
|
|
|
|
-- 1049327041104711680 黄海测试的市州地图
|
|
|
|
|
|
|
|
|
|
-- 配置值
|
|
|
|
|
select * from core_chart_view where scene_id=1049327041104711680 and type='map';
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
返回的字段$custom\_attr$中有是哪个地区的配置信息:
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
"map":{"level":"city","id":"156532300"}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
很明显
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
level:[province,city,district]
|
|
|
|
|
|
|
|
|
|
156530102:五华区
|
|
|
|
|
156530100:昆明市
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
上$baidu$查找了一下,$DataEase$中区划表执行的是:
|
|
|
|
|
|
|
|
|
|
**[2023年,省市县行政区划名称及编码对照表、最新省市区表](https://blog.csdn.net/isworking/article/details/128630487)**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
由于本次项目只是云南省的市/州就可以了,所以我们只需要找出下面的数据即可:
|
|
|
|
|
|
|
|
|
|
```sql
|
|
|
|
|
DROP TABLE IF EXISTS `t_city_code`;
|
|
|
|
|
CREATE TABLE `t_city_code` (
|
|
|
|
|
`area_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '地区行政区划码',
|
|
|
|
|
`area_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '地区名'
|
|
|
|
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
|
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- Records of t_city_code
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
INSERT INTO `t_city_code` VALUES ('156530100', '昆明市');
|
|
|
|
|
INSERT INTO `t_city_code` VALUES ('156530300', '曲靖市');
|
|
|
|
|
INSERT INTO `t_city_code` VALUES ('156530400', '玉溪市');
|
|
|
|
|
INSERT INTO `t_city_code` VALUES ('156530500', '保山市');
|
|
|
|
|
INSERT INTO `t_city_code` VALUES ('156530600', '昭通市');
|
|
|
|
|
INSERT INTO `t_city_code` VALUES ('156530700', '丽江市');
|
|
|
|
|
INSERT INTO `t_city_code` VALUES ('156530800', '普洱市');
|
|
|
|
|
INSERT INTO `t_city_code` VALUES ('156530900', '临沧市');
|
|
|
|
|
INSERT INTO `t_city_code` VALUES ('156532300', '楚雄彝族自治州');
|
|
|
|
|
INSERT INTO `t_city_code` VALUES ('156532500', '红河哈尼族彝族自治州');
|
|
|
|
|
INSERT INTO `t_city_code` VALUES ('156532600', '文山壮族苗族自治州');
|
|
|
|
|
INSERT INTO `t_city_code` VALUES ('156532800', '西双版纳傣族自治州');
|
|
|
|
|
INSERT INTO `t_city_code` VALUES ('156532900', '大理白族自治州');
|
|
|
|
|
INSERT INTO `t_city_code` VALUES ('156533100', '德宏傣族景颇族自治州');
|
|
|
|
|
INSERT INTO `t_city_code` VALUES ('156533300', '怒江傈僳族自治州');
|
|
|
|
|
INSERT INTO `t_city_code` VALUES ('156533400', '迪庆藏族自治州');
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|