diff --git a/doc/docs/.vuepress/config.js b/doc/docs/.vuepress/config.js index 8e2fdcd0..211130b0 100644 --- a/doc/docs/.vuepress/config.js +++ b/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'}, ] }, { diff --git a/doc/docs/guide/dashboard.md b/doc/docs/guide/dashboard.md index 802cb0a0..9a4a6c72 100644 --- a/doc/docs/guide/dashboard.md +++ b/doc/docs/guide/dashboard.md @@ -73,7 +73,7 @@ ### 仪表盘 数据集只能有一个字段,且字典选择“文本数字”
-![img14](../picture/dashboard/img_14.png)
+![img21](../picture/dashboard/img_21.png)
**如有问题,请提交 [Issue](https://gitee.com/anji-plus/report/issues)
** ### 中国地图 @@ -81,14 +81,20 @@ 气泡地图动态数据集,和饼图一样,对应字典值需要选择一个“Name”、“Value”,且name的字段值要和echarts图表里面的值能对应上,可参考静态数据
![img15](../picture/dashboard/img_15.png)
- ### 百分百图 数据集只能有一个字段,且字典选择“文本数字”
![img16](../picture/dashboard/img_16.png)
**如有问题,请提交 [Issue](https://gitee.com/anji-plus/report/issues)
** -### 散点图 -**开发中**
- ### 对比图 -**开发中**
+柱状对比图:
+数据集需要3个字段,其中一个作为对比的字段只能为2种值,只有2种值作为对比的字段要选择“y轴字段”字典。因为底层的解析用的是堆叠图的解析,这里的y轴字段并不是指的图表上面的y轴,还请注意,有强迫症可以自行修改源码的解析,剩下的2个字段对应字典看图
+![img18](../picture/dashboard/img_18.png)
+**如有问题,请提交 [Issue](https://gitee.com/anji-plus/report/issues)
** + +折线对比图:
+数据集需要3个字段,其中一个作为对比的字段只能为2种值,只有2种值作为对比的字段要选择“y轴字段”字典,剩下的字典对应看图
+![img19](../picture/dashboard/img_19.png)
+**注**:如果提示语设置选择“十字形”,请注意需要选择 “X轴颜色、上Y轴颜色、下Y轴颜色”,不然预览图表鼠标选择是全白色,还请注意。
+![img20](../picture/dashboard/img_20.png) +**如有问题,请提交 [Issue](https://gitee.com/anji-plus/report/issues)
** diff --git a/doc/docs/guide/importexport.md b/doc/docs/guide/importexport.md new file mode 100644 index 00000000..787dd62a --- /dev/null +++ b/doc/docs/guide/importexport.md @@ -0,0 +1,17 @@ +**注:导入导出目前是初始版本,报错没有细化,如果导入导出过程中页面无反应,请F12** +**注:“导入成功/失败”的提示不一定对应当前真实导入导出情况,请根据实际导入导出的结果进行判断** + +## 导出 +![img](../picture/imexport/img.png)
+导出会生成zip文件,包含图表、样式、图片等,不会带有该大屏的名称和code。
+ +### 导出数据集 +适用于同一系统内部使用 + +### 导出不含有数据集 +导出的图表会使用默认的静态数据集,适用于跨系统,请注意,如果你的大屏图表有部分图表是在对方系统不存在的,那么目前整个大屏是不会显示出来的,后续会进行兼容,不存在的图表留空。
+ +## 导入 +![img1](../picture/imexport/img_1.png)
+选择一个导出的zip文件导入即可。注意,导入会覆盖当前大屏,请新建一张空白的大屏进行导入。
+**注:如果你导入的大屏中含有你当前系统不存在的图表,整个大屏是不会显示的。**
diff --git a/doc/docs/picture/dashboard/img_14.png b/doc/docs/picture/dashboard/img_14.png deleted file mode 100644 index 3c193764..00000000 Binary files a/doc/docs/picture/dashboard/img_14.png and /dev/null differ diff --git a/doc/docs/picture/dashboard/img_18.png b/doc/docs/picture/dashboard/img_18.png new file mode 100644 index 00000000..1e2090a9 Binary files /dev/null and b/doc/docs/picture/dashboard/img_18.png differ diff --git a/doc/docs/picture/dashboard/img_19.png b/doc/docs/picture/dashboard/img_19.png new file mode 100644 index 00000000..e3881010 Binary files /dev/null and b/doc/docs/picture/dashboard/img_19.png differ diff --git a/doc/docs/picture/dashboard/img_20.png b/doc/docs/picture/dashboard/img_20.png new file mode 100644 index 00000000..698e5f6f Binary files /dev/null and b/doc/docs/picture/dashboard/img_20.png differ diff --git a/doc/docs/picture/dashboard/img_21.png b/doc/docs/picture/dashboard/img_21.png new file mode 100644 index 00000000..4848c7ec Binary files /dev/null and b/doc/docs/picture/dashboard/img_21.png differ diff --git a/doc/docs/picture/imexport/img.png b/doc/docs/picture/imexport/img.png new file mode 100644 index 00000000..b1f435f2 Binary files /dev/null and b/doc/docs/picture/imexport/img.png differ diff --git a/doc/docs/picture/imexport/img_1.png b/doc/docs/picture/imexport/img_1.png new file mode 100644 index 00000000..dff948d4 Binary files /dev/null and b/doc/docs/picture/imexport/img_1.png differ diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/ReportDashboardServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/ReportDashboardServiceImpl.java index 4f207d94..e4ba8dd8 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/ReportDashboardServiceImpl.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/ReportDashboardServiceImpl.java @@ -348,6 +348,9 @@ public class ReportDashboardServiceImpl implements ReportDashboardService, Initi private String replaceUrl(String imageAddress, Map fileMap) { + if (StringUtils.isBlank(imageAddress)) { + return ""; + } String fileId = imageAddress.substring(imageAddress.trim().length() - 36); String orDefault = fileMap.getOrDefault(fileId, null); if (StringUtils.isBlank(orDefault)) { diff --git a/report-core/src/main/resources/db/migration/V1.0.10__create_report_share.sql b/report-core/src/main/resources/db/migration/V1.0.10__create_report_share.sql index f848dbda..240adc95 100644 --- a/report-core/src/main/resources/db/migration/V1.0.10__create_report_share.sql +++ b/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, diff --git a/report-core/src/main/resources/db/migration/V1.0.11__create_compare_table.sql b/report-core/src/main/resources/db/migration/V1.0.11__create_compare_table.sql new file mode 100644 index 00000000..42393792 --- /dev/null +++ b/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); diff --git a/report-ui/src/assets/styles/index.scss b/report-ui/src/assets/styles/index.scss index 021f6ddd..0288bf15 100644 --- a/report-ui/src/assets/styles/index.scss +++ b/report-ui/src/assets/styles/index.scss @@ -13,6 +13,13 @@ body { font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif; } +ul, +li, +ol, +li { + margin: 0; + padding: 0; +} html { height: 100%; diff --git a/report-ui/src/mixins/queryform.js b/report-ui/src/mixins/queryform.js index 5e48fde5..4927502a 100644 --- a/report-ui/src/mixins/queryform.js +++ b/report-ui/src/mixins/queryform.js @@ -122,9 +122,7 @@ export default { chartType == "widget-funnel" ) { return this.piechartFn(params.chartProperties, data); - } else if (chartType == "widget-gauge") { - return this.gaugeFn(params.chartProperties, data); - } else if (chartType == "widget-text") { + } else if (chartType == "widget-text") { return this.widgettext(params.chartProperties, data) } else if (chartType == "widget-stackchart") { return this.stackChartFn(params.chartProperties, data) @@ -210,7 +208,7 @@ export default { } return ananysicData; }, - gaugeFn(chartProperties, data) { + /*gaugeFn(chartProperties, data) { const ananysicData = []; for (let i = 0; i < data.length; i++) { const obj = {}; @@ -228,7 +226,7 @@ export default { ananysicData.push(obj); } return ananysicData[0]; - }, + },*/ widgettext(chartProperties, data) { const ananysicData = []; for (let i = 0; i < data.length; i++) { diff --git a/report-ui/src/views/report/bigscreen/designer/form/dynamicAddTable.vue b/report-ui/src/views/report/bigscreen/designer/form/dynamicAddTable.vue index 0c1735b1..e63116c3 100644 --- a/report-ui/src/views/report/bigscreen/designer/form/dynamicAddTable.vue +++ b/report-ui/src/views/report/bigscreen/designer/form/dynamicAddTable.vue @@ -13,18 +13,20 @@ @@ -161,4 +163,7 @@ export default { /deep/.el-table::before { height: 0; } +.button-group .el-button { + padding: 0; +} diff --git a/report-ui/src/views/report/bigscreen/designer/index.vue b/report-ui/src/views/report/bigscreen/designer/index.vue index 600d473d..1ca306ae 100644 --- a/report-ui/src/views/report/bigscreen/designer/index.vue +++ b/report-ui/src/views/report/bigscreen/designer/index.vue @@ -59,7 +59,7 @@ :style="{ width: widthLeftForToolsHideButton + 'px' }" @click="toolIsShow = !toolIsShow" > - +
- - + - +