diff --git a/README.en.md b/README.en.md index 27ef5db860b1c7b7ed220298460308756e46b004..1e4b7f408ea8df84e202e2ce092e8096679aecc1 100644 --- a/README.en.md +++ b/README.en.md @@ -1,14 +1,20 @@ ## Online experience -####   Computer online experience: [https://report.anji-plus.com/](https://report.anji-plus.com/ "链接")  account:guest password:guest -####   Online documents: [https://report.anji-plus.com/report-doc/](https://report.anji-plus.com/report-doc/ "doc")
-####   issues: [https://gitee.com/anji-plus/report/issues](https://gitee.com/anji-plus/report/issues "issue") + +####   Computer online experience: [https://ajreport.beliefteam.cn/](https://ajreport.beliefteam.cn/ "链接")  account:guest password:guest + +####   Online documents: [https://ajreport.beliefteam.cn/report-doc/](https://ajreport.beliefteam.cn/report-doc/ "doc")
+ +####   issues: [https://gitee.com/anji-plus/report/issues](https://gitee.com/anji-plus/report/issues "issue") ## Function overview -####   Component introduction -   (AJ-Report)is a visual drag edit, intuitive, cool, with a sense of science and technology chart tool full open source project. -The built-in basic functions include data source, data set, report management, and some screenshots of the project are shown below.。
+####   Component introduction + +   (AJ-Report)is a visual drag edit, intuitive, cool, with a sense of science and technology chart tool full +open source project. +The built-in basic functions include data source, data set, report management, and some screenshots of the project are +shown below.。
## Packaging directory @@ -26,6 +32,7 @@ The built-in basic functions include data source, data set, report management, a ``` ## System directory + ``` ├── doc │ ├── docs @@ -40,11 +47,12 @@ The built-in basic functions include data source, data set, report management, a ├── README.md ``` - ## Short term plan -####   Enrich more chart components + +####   Enrich more chart components ## technical support + If you have any questions, please submit to [Issue](https://gitee.com/anji-plus/report/issues) #### Open source is not easy, please, star ☺ diff --git a/README.md b/README.md index 4e3ffc8a1b8d8ddb8ad53f7582647bbb74d6bf4b..173f5170750bbdb7057ad743d3877b2ab4c7683d 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,9 @@ ## 在线体验 -####   [在线体验](https://report.anji-plus.com/index.html "链接"): https://report.anji-plus.com/index.html  体验账号:guest 密码:guest +####   [在线体验](https://ajreport.beliefteam.cn/index.html "链接"): https://ajreport.beliefteam.cn/index.html  体验账号:guest 密码:guest -####   [在线文档](https://report.anji-plus.com/report-doc/ "doc"): https://report.anji-plus.com/report-doc/
+####   [在线文档](https://ajreport.beliefteam.cn/report-doc/ "doc"): https://ajreport.beliefteam.cn/report-doc/
####   [在线提问](https://gitee.com/anji-plus/report/issues "issue"): https://gitee.com/anji-plus/report/issues
@@ -23,10 +23,8 @@    大屏设计(AJ-Report)是一个可视化拖拽编辑的,直观,酷炫,具有科技感的图表工具全开源项目。 内置的基础功能包括数据源,数据集,报表管理,项目部分截图如下。
![操作](https://images.gitee.com/uploads/images/2021/0703/094742_c0243f70_1728982.gif "2021-07-03_09-43-50.gif") - -![视频](https://report.anji-plus.com/report-doc/static/Rhea.mp4)
- -**[更多社区大屏案例](https://report.anji-plus.com/report-doc/guide/bigScreenCase.html)**
+![视频](https://ajreport.beliefteam.cn/report-doc/static/Rhea.mp4)
+**[更多社区大屏案例](https://ajreport.beliefteam.cn/report-doc/guide/bigScreenCase.html)**
## 数据流程图 @@ -91,7 +89,28 @@ - [vuedraggable](https://github.com/SortableJS/Vue.Draggable/): 是一款基于Sortable.js实现的vue拖拽插件。 - [luckysheet](https://gitee.com/mengshukeji/Luckysheet): Luckysheet ,一款纯前端类似excel的在线表格,功能强大、配置简单、完全开源。 -## 编译打包 +## 部署方式 + +**注意版本兼容性**
+源码 doc -> docs -> guide 目录下即所有文档
+ +### 发行版部署 + +``` +下载最新发行版,解压 +cd aj-report-xxxx +vim conf/bootstrap.yml 修改数据库连接等信息 +sh bin/start.sh Linux启动 +bin/start.bat Windows修改第4行的JAVA_HOME后(去掉rem注释),双击启动 + +启动后访问 +http://serverip:9095 +用户名密码:admin/123456 + +登陆后修改"数据源->mysql数据源"用户名密码 +``` + +### 源码编译部署 在Linux上先准备好maven、node.js、jdk @@ -113,21 +132,23 @@ bin/start.bat Windows修改第4行的JAVA_HOME后(去掉rem注释),双击启 启动后访问 http://serverip:9095 +用户名密码:admin/123456 + +登陆后修改"数据源->mysql数据源"用户名密码 ``` -**[运行环境参考文档](https://report.anji-plus.com/report-doc/guide/quicklyDevelop.html)**
+**[运行环境参考文档](https://ajreport.beliefteam.cn/report-doc/guide/quicklyDevelop.html)**
-**[源码编译部署参考文档](https://report.anji-plus.com/report-doc/guide/quicklySource.html)**
+**[源码编译部署参考文档](https://ajreport.beliefteam.cn/report-doc/guide/quicklySource.html)**
-**[发行版部署参考文档](https://report.anji-plus.com/report-doc/guide/quicklyDistribution.html)**
+**[发行版部署参考文档](https://ajreport.beliefteam.cn/report-doc/guide/quicklyDistribution.html)**
-**[前后端分离部署参考文档](https://report.anji-plus.com/report-doc/guide/quicklySeparate.html)**
+**[前后端分离部署参考文档](https://ajreport.beliefteam.cn/report-doc/guide/quicklySeparate.html)**
## 操作手册 新建数据源(重置mysql数据源) --> 新建数据集(编写sql) --> 新建大屏(设计大屏)
- -**[在线文档](https://report.anji-plus.com/report-doc/guide/datasource.html)** +**[在线文档](https://ajreport.beliefteam.cn/report-doc/guide/datasource.html)** ## SQL初始化 @@ -140,14 +161,13 @@ sql文件的目录在:report-core --> src --> main --> resources -- > db.migra 希望你们的logo出现在此,[请点此Issue进行登记](https://gitee.com/anji-plus/report/issues/I3ZXT4) ,我们将优先进行技术支持
- + - - -
- - - + + +
+ + ## 未来计划 @@ -169,8 +189,7 @@ sql文件的目录在:report-core --> src --> main --> resources -- > db.migra - openJdk - Jdk 11 - Mysql 8.0(8.0.23/26版本没有问题,8.0.21版本存在问题) - -**[常见问题](https://report.anji-plus.com/report-doc/guide/question.html)** + **[常见问题](https://ajreport.beliefteam.cn/report-doc/guide/question.html)** ## 商业授权 @@ -183,12 +202,13 @@ AJ-Report使用[Apache2.0开源协议](http://www.apache.org/licenses/LICENSE-2. - 在二次开发后商业发布的产品中,使用了多个开源软件,则必须包含一个Notice文件,在Notice文件中需要带有AJ-Report LICENSE。你可以在Notice中增加自己的许可,但不可以表现为对AJ-Report LICENSE构成更改。 -如果您需要商业化增值服务,请加下面的微信沟通。 +如果您需要商业化增值服务,请加下面的微信沟通,并直接说明来意。 ## 技术支持 **如有问题,请提交 [Issue](https://gitee.com/anji-plus/report/issues)
** -个人企业微信:
+个人企业微信:加微信进群备注 AJ-Report 或者 Report
+如果不是为了进群,请直接说明来意,每天加群的都很多,企微也是我们自己的工作企微,会有很多消息会被刷下去,如果半天没有回复你,请发送多次
#### 开源不易,劳烦各位star ☺ diff --git a/doc/docs/guide/README.md b/doc/docs/guide/README.md index 6af10628a8224b30774eeae023a811a3cc45cd4c..ef54e6f99c9784f12d03d63d52cced68996fba82 100644 --- a/doc/docs/guide/README.md +++ b/doc/docs/guide/README.md @@ -10,7 +10,7 @@ ## 在线体验 -####   [在线体验](https://report.anji-plus.com/index.html "链接"): https://report.anji-plus.com/index.html  体验账号:guest 密码:guest +####   [在线体验](https://ajreport.beliefteam.cn/index.html "链接"): https://ajreport.beliefteam.cn/index.html  体验账号:guest 密码:guest ####   [在线提问](https://gitee.com/anji-plus/report/issues "issue"): https://gitee.com/anji-plus/report/issues
diff --git a/doc/docs/guide/bigScreenCase.md b/doc/docs/guide/bigScreenCase.md index e9accfd9a8fac275dc7b2a47d16f81fa9ef7cb90..88e92c1bd2b9894787564c7bcdab13ed1214b273 100644 --- a/doc/docs/guide/bigScreenCase.md +++ b/doc/docs/guide/bigScreenCase.md @@ -1,22 +1,22 @@ ## 案例一 由社区 **[~无痕~@tengzhouboy](https://gitee.com/tengzhouboy)** 提供
-[AJ-Report分享链接](https://report.anji-plus.com/index.html#/aj/mtwbjPot)
+[AJ-Report分享链接](https://ajreport.beliefteam.cn/index.html#/aj/mtwbjPot)
![img.png](../picture/bigScreenCase/img.png)
## 案例二 由社区 **[心瘾丶 @yi_shan_liu](https://gitee.com/yi_shan_liu)** 提供
-[AJ-Report分享链接](https://report.anji-plus.com/index.html#/aj/hkBJgLW0)
+[AJ-Report分享链接](https://ajreport.beliefteam.cn/index.html#/aj/hkBJgLW0)
![img1](../picture/bigScreenCase/img1.png)
-[AJ-Report分享链接](https://report.anji-plus.com/index.html#/aj/Hgfi4pj5)
+[AJ-Report分享链接](https://ajreport.beliefteam.cn/index.html#/aj/Hgfi4pj5)
![img2](../picture/bigScreenCase/img2.png)
-[AJ-Report分享链接](https://report.anji-plus.com/index.html#/aj/zJa5Wwey)
+[AJ-Report分享链接](https://ajreport.beliefteam.cn/index.html#/aj/zJa5Wwey)
![img3](../picture/bigScreenCase/img3.png)
-[AJ-Report分享链接](https://report.anji-plus.com/index.html#/aj/D0cpO4re)
+[AJ-Report分享链接](https://ajreport.beliefteam.cn/index.html#/aj/D0cpO4re)
![img4](../picture/bigScreenCase/img4.png)
\ No newline at end of file diff --git a/doc/docs/guide/briefUsing.md b/doc/docs/guide/briefUsing.md index 089a9210db880d5f5274d1f85653b6a3a7fbd418..c5a1d33fee1b7b68e46b47f484d49fc89fc2ac54 100644 --- a/doc/docs/guide/briefUsing.md +++ b/doc/docs/guide/briefUsing.md @@ -1,9 +1,9 @@ 希望你们的logo出现在此,[请点此Issue进行登记](https://gitee.com/anji-plus/report/issues/I3ZXT4)
- + - - - -
- \ No newline at end of file + + + +
+ \ No newline at end of file diff --git a/doc/docs/guide/question.md b/doc/docs/guide/question.md index 3721505d9defcc8334e1595030ed0907284087e0..0eb8ba976c4bb6d00f2611dd0222236287b08098 100644 --- a/doc/docs/guide/question.md +++ b/doc/docs/guide/question.md @@ -12,7 +12,7 @@
-## 版本问题:[开发环境参考](https://report.anji-plus.com/report-doc/guide/quicklyDevelop.html) +## 版本问题:[开发环境参考](https://ajreport.beliefteam.cn/report-doc/guide/quicklyDevelop.html) - 底层数据库为Mysql8.0+时,flyway执行SQL报错
- Node.js是V16版本时 npm install失败
diff --git a/report-core/pom.xml b/report-core/pom.xml index 423b3b0529dc192a118e43e61af4a812554bf537..4c89c99fc8d1687ae235fb2628218650bdd086cd 100644 --- a/report-core/pom.xml +++ b/report-core/pom.xml @@ -151,6 +151,12 @@ poi-ooxml-schemas 4.1.2 + + + com.sap.cloud.db.jdbc + ngdbc + 2.3.62 + diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/datasource/service/impl/DataSourceServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/datasource/service/impl/DataSourceServiceImpl.java index 0485a2945f8039f61fe895b05adb5cf1a415d254..3633681f6da6dfa7bf200349f8d5b8fb00be985d 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/datasource/service/impl/DataSourceServiceImpl.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/datasource/service/impl/DataSourceServiceImpl.java @@ -1,6 +1,7 @@ package com.anjiplus.template.gaea.business.modules.datasource.service.impl; +import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.anji.plus.gaea.constant.BaseOperationEnum; @@ -23,6 +24,7 @@ import com.anjiplus.template.gaea.business.util.JdbcConstants; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; @@ -144,6 +146,13 @@ public class DataSourceServiceImpl implements DataSourceService { public long total(DataSourceDto sourceDto, DataSetDto dto) { //区分数据类型 String sourceType = sourceDto.getSourceType(); + + String driverName = JSON.parseObject(sourceDto.getSourceConfig()).getString("driverName"); + if (StringUtils.equalsIgnoreCase(driverName, "com.sap.db.jdbc.Driver")) { + return sapHanaTotal(sourceDto, dto); + } + + switch (sourceType) { case JdbcConstants.ELASTIC_SEARCH_SQL: return 0; @@ -155,6 +164,30 @@ public class DataSourceServiceImpl implements DataSourceService { } + + /** + * 获取Sap Hana count 和添加limit分页信息 + * + * @param sourceDto + * @param dto + * @return + */ + public long sapHanaTotal(DataSourceDto sourceDto, DataSetDto dto) { + String dynSentence = sourceDto.getDynSentence(); + String sql = "select count(1) as count from (" + dynSentence + ") as gaeaExecute"; + sourceDto.setDynSentence(sql); + List result = execute(sourceDto); + + //sql 拼接 limit 分页信息 + int pageNumber = Integer.parseInt(dto.getContextData().getOrDefault("pageNumber", "1").toString()); + int pageSize = Integer.parseInt(dto.getContextData().getOrDefault("pageSize", "10").toString()); + String sqlLimit = " limit " + pageSize + " offset " + (pageNumber - 1) * pageSize; + sourceDto.setDynSentence(dynSentence.concat(sqlLimit)); + log.info("当前total:{}, 添加分页参数,sql语句:{}", JSONObject.toJSONString(result), sourceDto.getDynSentence()); + return result.get(0).getLongValue("count"); + } + + /** * 获取mysql count 和添加limit分页信息 * @param sourceDto diff --git a/report-ui/src/views/bigscreenDesigner/designer/index.vue b/report-ui/src/views/bigscreenDesigner/designer/index.vue index 53365880c09fda3f4ad4c4df921aec0b6af01883..a72a81c9bb80ac1314690d08e814069dc542d2f4 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/index.vue +++ b/report-ui/src/views/bigscreenDesigner/designer/index.vue @@ -140,36 +140,6 @@ -
{ - if(el.name == 'width'){ - el.value = this.bigscreenWidth - }else if(el.name == 'height'){ - el.value = this.bigscreenHeight + if (el.name == "width") { + el.value = this.bigscreenWidth; + } else if (el.name == "height") { + el.value = this.bigscreenHeight; } - newSetup.push(el) + newSetup.push(el); }); - this.widgetOptions.setup = newSetup + this.widgetOptions.setup = newSetup; } else { for (let i = 0; i < this.widgets.length; i++) { if (this.widgetIndex == i) { @@ -964,7 +934,7 @@ export default { border: 1px solid #3a4659; background: #282a30; } - .tools-item-text{ + .tools-item-text { } } } diff --git a/report-ui/src/views/bigscreenDesigner/designer/tools/configure/widget-iframe.js b/report-ui/src/views/bigscreenDesigner/designer/tools/configure/widget-iframe.js index a38ba9832fe8e97167fbb676a421575f83fde500..8aa78f08b85cbc57c17d02ab0d7804b292f47562 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/tools/configure/widget-iframe.js +++ b/report-ui/src/views/bigscreenDesigner/designer/tools/configure/widget-iframe.js @@ -1,6 +1,6 @@ /* * @Descripttion: iframe json - * @version: + * @version: * @Author: qianlishi * @Date: 2021-08-29 07:17:55 * @LastEditors: qianlishi @@ -28,7 +28,7 @@ export const widgetIframe = { name: 'iframeAdress', required: false, placeholder: '', - value: 'https://report.anji-plus.com/index.html', + value: 'https://ajreport.beliefteam.cn/index.html', }, ], // 数据 diff --git a/report-ui/src/views/bigscreenDesigner/designer/tools/index.js b/report-ui/src/views/bigscreenDesigner/designer/tools/index.js index 805318696bc3ee81df00d7a6c383dc14dff80e93..40c3974dd502bd6ed4eb7b206ece6f6db113be39 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/tools/index.js +++ b/report-ui/src/views/bigscreenDesigner/designer/tools/index.js @@ -1,6 +1,6 @@ /* * @Descripttion: 主文件 - * @version: + * @version: * @Author: qianlishi * @Date: 2021-08-29 06:43:07 * @LastEditors: qianlishi @@ -59,7 +59,7 @@ const screenConfig = { name: 'backgroundImage', required: false, placeholder: '', - value: 'https://report.anji-plus.com/file/download/bf566e48-ccad-40e1-8ee9-228427e5466b', + value: 'https://ajreport.beliefteam.cn/file/download/bf566e48-ccad-40e1-8ee9-228427e5466b', }, ], data: [], diff --git a/report-ui/src/views/bigscreenDesigner/designer/widget/line/widgetLineCompareChart.vue b/report-ui/src/views/bigscreenDesigner/designer/widget/line/widgetLineCompareChart.vue index b7c057e61ca9d5bb2ae51774935d1a523e221968..e71d3b6cc35fbad93054d2c83182ddceb99f7621 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/widget/line/widgetLineCompareChart.vue +++ b/report-ui/src/views/bigscreenDesigner/designer/widget/line/widgetLineCompareChart.vue @@ -533,9 +533,9 @@ export default { const legend = this.options.legend; legend.show = optionsSetup.isShowLegend; legend.left = optionsSetup.lateralPosition; - legend.top = optionsSetup.longitudinalPosition == "top" ? 0 : "auto"; + legend.top = optionsSetup.longitudinalPosition; legend.bottom = - optionsSetup.longitudinalPosition == "bottom" ? 0 : "auto"; + optionsSetup.longitudinalPosition; legend.orient = optionsSetup.layoutFront; legend.textStyle = { color: optionsSetup.lengedColor, @@ -543,6 +543,25 @@ export default { }; legend.itemWidth = optionsSetup.lengedWidth; }, + // 图例名称设置 + setOptionsLegendName(name){ + const optionsSetup = this.optionsSetup; + const series = this.options.series; + const legendName = optionsSetup.legendName; + // 图例没有手动写则显示原值,写了则显示新值 + if (null == legendName || legendName == '') { + for (let i = 0; i < name.length; i++) { + series[i].name = name[i]; + } + this.options.legend['data'] = name; + }else { + const arr = legendName.split('|'); + for (let i = 0; i < arr.length; i++) { + series[i].name = arr[i]; + } + this.options.legend['data'] = arr + } + }, // 颜色修改、宽度修改 setOptionsColor() { const optionsSetup = this.optionsSetup; @@ -591,19 +610,20 @@ export default { let xAxisList = []; let yAxisList = []; let arrayList = []; + const legendName = []; for (const i in val) { - xAxisList[i] = val[i].axis - yAxisList[i] = val[i].name + xAxisList[i] = val[i].axis; + yAxisList[i] = val[i].name; } - xAxisList = this.setUnique(xAxisList) - yAxisList = this.setUnique(yAxisList) + xAxisList = this.setUnique(xAxisList); + yAxisList = this.setUnique(yAxisList); for (const i in yAxisList) { - const data = new Array(yAxisList.length).fill(0) + const data = new Array(yAxisList.length).fill(0); for (const j in xAxisList) { for (const k in val) { if (val[k].name == yAxisList[i]) { if (val[k].axis == xAxisList[j]) { - data[j] = val[k].data + data[j] = val[k].data; } } } @@ -612,13 +632,16 @@ export default { name: yAxisList[i], data: data }) + legendName.push(yAxisList[i]); } - this.options.series[0]['name'] = arrayList[0].name - this.options.series[0]['data'] = arrayList[0].data - this.options.series[1]['name'] = arrayList[1].name - this.options.series[1]['data'] = arrayList[1].data - this.options.xAxis[0]['data'] = xAxisList - this.options.xAxis[1]['data'] = xAxisList + this.options.series[0]['name'] = arrayList[0].name; + this.options.series[0]['data'] = arrayList[0].data; + this.options.series[1]['name'] = arrayList[1].name; + this.options.series[1]['data'] = arrayList[1].data; + this.options.xAxis[0]['data'] = xAxisList; + this.options.xAxis[1]['data'] = xAxisList; + this.options.legend['data'] = legendName; + this.setOptionsLegendName(legendName); }, // 动态数据 dynamicDataFn(val, refreshTime, optionsSetup) { @@ -639,14 +662,19 @@ export default { }); }, renderingFn(optionsSetup, val) { - this.options.xAxis[0]['data'] = val.xAxis - this.options.xAxis[1]['data'] = val.xAxis + const legendName = []; + this.options.xAxis[0]['data'] = val.xAxis; + this.options.xAxis[1]['data'] = val.xAxis; if (val.series[0].type == "line") { - this.options.series[0]['name'] = val.series[0].name - this.options.series[0]['data'] = val.series[0].data - this.options.series[1]['name'] = val.series[1].name - this.options.series[1]['data'] = val.series[1].data + this.options.series[0]['name'] = val.series[0].name; + this.options.series[0]['data'] = val.series[0].data; + this.options.series[1]['name'] = val.series[1].name; + this.options.series[1]['data'] = val.series[1].data; + legendName.push(val.series[0].name); + legendName.push(val.series[1].name); } + this.options.legend['data'] = legendName; + this.setOptionsLegendName(legendName); } } }; diff --git a/report-ui/src/views/layout/components/Sidebar/index.vue b/report-ui/src/views/layout/components/Sidebar/index.vue index 9e3111205792883e34fd0ac3d60c5c0b2f8722a8..44442209a20e657f2045d23dc2c5293c0e1f19db 100644 --- a/report-ui/src/views/layout/components/Sidebar/index.vue +++ b/report-ui/src/views/layout/components/Sidebar/index.vue @@ -3,7 +3,7 @@
- V0.9.6 + V0.9.6.1