Quellcode durchsuchen

导入导出、对比图相关

qianming vor 4 Jahren
Ursprung
Commit
5b6ffb7dfd

+ 1 - 0
doc/docs/.vuepress/config.js

@@ -51,6 +51,7 @@ module.exports = {
                         {title: '数据源', path: '/guide/datasource'},
                         {title: '数据集', path: '/guide/dataset'},
                         {title: '大屏设计', path: '/guide/dashboard'},
+                        {title: '导入导出', path: '/guide/importexport'},
                     ]
                 },
                 {

+ 4 - 2
doc/docs/guide/dashboard.md

@@ -88,7 +88,9 @@
 **如有问题,请提交 [Issue](https://gitee.com/anji-plus/report/issues) <br>**
 
 ### 散点图
-**开发中** <br>
+**规划中** <br>
 
 ### 对比图
-**开发中** <br>
+柱状对比图数据集需要3个字段,其中一个作为对比的字段只能为2种值,只有2种值作为对比的字段要选择“y轴字段”字典。因为底层的解析用的是堆叠图的解析,这里的y轴字段并不是指的图表上面的y轴,还请注意,有强迫症可以自行修改源码的解析,剩下的2个字段对应字典看图<br>
+![img18](../picture/dashboard/img_18.png)
+**如有问题,请提交 [Issue](https://gitee.com/anji-plus/report/issues) <br>**

+ 17 - 0
doc/docs/guide/importexport.md

@@ -0,0 +1,17 @@
+**注:导入导出目前是初始版本,报错没有细化,如果导入导出过程中页面无反应,请F12**
+**注:“导入成功/失败”的提示不一定对应当前真实导入导出情况,请根据实际导入导出的结果进行判断**
+
+## 导出
+![img](../picture/imexport/img.png) <br>
+导出会生成zip文件,包含图表、样式、图片等,不会带有该大屏的名称和code。<br>
+
+### 导出数据集
+适用于同一系统内部使用
+
+### 导出不含有数据集
+导出的图表会使用默认的静态数据集,适用于跨系统,请注意,如果你的大屏图表有部分图表是在对方系统不存在的,那么目前整个大屏是不会显示出来的,后续会进行兼容,不存在的图表留空。<br>
+
+## 导入
+![img1](../picture/imexport/img_1.png) <br>
+选择一个导出的zip文件导入即可。注意,导入会覆盖当前大屏,请新建一张空白的大屏进行导入。<br>
+**注:如果你导入的大屏中含有你当前系统不存在的图表,整个大屏是不会显示的。** <br>

BIN
doc/docs/picture/dashboard/img_18.png


BIN
doc/docs/picture/imexport/img.png


BIN
doc/docs/picture/imexport/img_1.png


+ 1 - 1
report-core/src/main/resources/db/migration/V1.0.10__create_report_share.sql

@@ -66,7 +66,7 @@ INSERT INTO `aj_report`.`gaea_report_data_set`(`set_code`, `set_name`, `set_desc
 
 use
 aj_report_init;
-CREATE TABLE `aj_report_barstack`
+CREATE TABLE if not exists `aj_report_barstack`
 (
     `id`   int(11) NOT NULL AUTO_INCREMENT,
     `time` date         DEFAULT NULL,

+ 21 - 0
report-core/src/main/resources/db/migration/V1.0.11_create_compare_table.sql

@@ -0,0 +1,21 @@
+use aj_report_init;
+CREATE TABLE if not exists `aj_report_comparestack` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `time` date DEFAULT NULL,
+  `type` varchar(255) DEFAULT NULL,
+  `nums` bigint(11) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
+
+INSERT INTO `aj_report_init`.`aj_report_comparestack`(`id`, `time`, `type`, `nums`) VALUES (1, '2021-08-23', '成功', 12);
+INSERT INTO `aj_report_init`.`aj_report_comparestack`(`id`, `time`, `type`, `nums`) VALUES (2, '2021-08-23', '失败', 1);
+INSERT INTO `aj_report_init`.`aj_report_comparestack`(`id`, `time`, `type`, `nums`) VALUES (3, '2021-08-24', '成功', 24);
+INSERT INTO `aj_report_init`.`aj_report_comparestack`(`id`, `time`, `type`, `nums`) VALUES (4, '2021-08-24', '失败', 5);
+INSERT INTO `aj_report_init`.`aj_report_comparestack`(`id`, `time`, `type`, `nums`) VALUES (5, '2021-08-25', '成功', 13);
+INSERT INTO `aj_report_init`.`aj_report_comparestack`(`id`, `time`, `type`, `nums`) VALUES (6, '2021-08-25', '失败', 8);
+INSERT INTO `aj_report_init`.`aj_report_comparestack`(`id`, `time`, `type`, `nums`) VALUES (7, '2021-08-26', '成功', 19);
+INSERT INTO `aj_report_init`.`aj_report_comparestack`(`id`, `time`, `type`, `nums`) VALUES (8, '2021-08-26', '失败', 3);
+INSERT INTO `aj_report_init`.`aj_report_comparestack`(`id`, `time`, `type`, `nums`) VALUES (9, '2021-08-27', '成功', 9);
+INSERT INTO `aj_report_init`.`aj_report_comparestack`(`id`, `time`, `type`, `nums`) VALUES (10, '2021-08-27', '失败', 15);
+
+INSERT INTO `aj_report`.`gaea_report_data_set`(`set_code`, `set_name`, `set_desc`, `source_code`, `dyn_sentence`, `case_result`, `enable_flag`, `delete_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `version`) VALUES ('compare_ajreport', '柱状对比图示例数据', '', 'mysql_ajreport', 'SELECT time,type,nums from aj_report_comparestack', '[{\"time\":\"2021-08-23\",\"type\":\"成功\",\"nums\":12},{\"time\":\"2021-08-23\",\"type\":\"失败\",\"nums\":1},{\"time\":\"2021-08-24\",\"type\":\"成功\",\"nums\":24},{\"time\":\"2021-08-24\",\"type\":\"失败\",\"nums\":5},{\"time\":\"2021-08-25\",\"type\":\"成功\",\"nums\":13},{\"time\":\"2021-08-25\",\"type\":\"失败\",\"nums\":8},{\"time\":\"2021-08-26\",\"type\":\"成功\",\"nums\":19},{\"time\":\"2021-08-26\",\"type\":\"失败\",\"nums\":3},{\"time\":\"2021-08-27\",\"type\":\"成功\",\"nums\":9},{\"time\":\"2021-08-27\",\"type\":\"失败\",\"nums\":15}]', 1, 0, 'admin', '2021-08-27 13:48:33', 'admin', '2021-08-27 13:48:33', 1);