Authored by 王涛

初始化最新的aj-report

Showing 100 changed files with 1522 additions and 0 deletions

Too many changes to show.

To preserve performance only 100 of 100+ files are displayed.

  1 +## Online experience
  2 +####   Computer online experience: [https://report.anji-plus.com/](https://report.anji-plus.com/ "链接")  account:guest password:guest
  3 +#### &emsp; Online documents: [https://report.anji-plus.com/report-doc/](https://report.anji-plus.com/report-doc/ "doc")<br>
  4 +#### &emsp; issues: [https://gitee.com/anji-plus/report/issues](https://gitee.com/anji-plus/report/issues "issue")
  5 +
  6 +## Function overview
  7 +#### &emsp; Component introduction
  8 +&emsp;&emsp; (AJ-Report)is a visual drag edit, intuitive, cool, with a sense of science and technology chart tool full open source project.
  9 +
  10 +The built-in basic functions include data source, data set, report management, and some screenshots of the project are shown below.。<br>
  11 +
  12 +
  13 +## Packaging directory
  14 +
  15 +```
  16 +├── bin
  17 +│ ├── logs
  18 +│ ├── cache
  19 +│ ├── startup.cmd
  20 +│ ├── shutdown.cmd
  21 +│ ├── startup.sh
  22 +│ └── shutdown.sh
  23 +├── config
  24 +├── lib
  25 +├── target
  26 +```
  27 +
  28 +## System directory
  29 +```
  30 +├── doc
  31 +│ ├── docs
  32 +│ ├── package.json
  33 +│ └── README.md
  34 +├── pom.xml
  35 +├── report-core
  36 +│ ├── pom.xml
  37 +│ └── README.md
  38 +├── report-ui
  39 +├── LICENSE
  40 +├── README.md
  41 +```
  42 +
  43 +
  44 +## Short term plan
  45 +#### &emsp; Enrich more chart components
  46 +
  47 +## technical support
  48 +If you have any questions, please submit to [Issue](https://gitee.com/anji-plus/report/issues)
  49 +
  50 +#### Open source is not easy, please, star ☺
  51 +
  52 +
  53 +
  1 +## 简介
  2 +
  3 +&emsp; &emsp; AJ-Report是全开源的一个BI平台,酷炫大屏展示,能随时随地掌控业务动态,让每个决策都有数据支撑。<br>
  4 +&emsp; &emsp; 多数据源支持,内置mysql、elasticsearch、kudu驱动,支持自定义数据集省去数据接口开发,目前已支持20种大屏组件/图表,不会开发,照着设计稿也可以制作大屏。<br>
  5 +&emsp; &emsp; 三步轻松完成大屏设计:配置数据源---->写SQL配置数据集---->拖拽配置大屏---->保存发布。欢迎体验。
  6 +
  7 +## 在线体验
  8 +
  9 +#### &emsp; [在线体验](https://report.anji-plus.com/index.html "链接"): https://report.anji-plus.com/index.html &emsp;体验账号:guest 密码:guest
  10 +
  11 +#### &emsp; [在线文档](https://report.anji-plus.com/report-doc/ "doc"): https://report.anji-plus.com/report-doc/ <br>
  12 +
  13 +#### &emsp; [在线提问](https://gitee.com/anji-plus/report/issues "issue"): https://gitee.com/anji-plus/report/issues <br>
  14 +
  15 +## 发行版本
  16 +
  17 +#### &emsp; [下载链接](https://gitee.com/anji-plus/report/releases "下载链接"): https://gitee.com/anji-plus/report/releases <br>
  18 +
  19 +## 功能概述
  20 +
  21 +#### &emsp; 组件介绍
  22 +
  23 +&emsp;&emsp; 大屏设计(AJ-Report)是一个可视化拖拽编辑的,直观,酷炫,具有科技感的图表工具全开源项目。 内置的基础功能包括数据源,数据集,报表管理,项目部分截图如下。<br>
  24 +
  25 +![操作](https://images.gitee.com/uploads/images/2021/0703/094742_c0243f70_1728982.gif "2021-07-03_09-43-50.gif")
  26 +
  27 +![视频](https://report.anji-plus.com/report-doc/static/Rhea.mp4) <br>
  28 +
  29 +**[更多社区大屏案例](https://report.anji-plus.com/report-doc/guide/bigScreenCase.html)** <br>
  30 +
  31 +## 数据流程图
  32 +
  33 +![An image](https://images.gitee.com/uploads/images/2021/0630/160451_31bb9052_1728982.png)
  34 +
  35 +## 打包目录build
  36 +
  37 +```
  38 +├── bin 启动命令脚本
  39 +│ ├── restart.sh
  40 +│ ├── start.bat
  41 +│ ├── start.sh
  42 +│ └── stop.sh
  43 +├── conf 配置文件目录
  44 +│ └── bootstrap.yml
  45 +├── logs 启动日志目录
  46 +├── cache 本地缓存目录
  47 +├── lib 自定义扩展包&report-core核心包
  48 +```
  49 +
  50 +## 系统目录
  51 +
  52 +```
  53 +├── doc 文档源码
  54 +│ ├── docs
  55 +│ ├── package.json
  56 +│ └── README.md
  57 +├── pom.xml 父pom,jar版本管理
  58 +├── report-core java源码
  59 +│ ├── pom.xml gaea父pom,jar版本管理
  60 +│ └── README.md
  61 +├── report-ui 前端vue源码
  62 +├── LICENSE
  63 +├── README.md
  64 +```
  65 +
  66 +## 核心技术
  67 +
  68 +### 依赖
  69 +
  70 +- [Mysql] 5.7
  71 +- [Jdk] 1.8
  72 +
  73 +### 后端
  74 +
  75 +- [Spring Boot2.3.5.RELEASE](https://spring.io/projects/spring-boot/): Spring Boot是一款开箱即用框架,让我们的Spring应用变的更轻量化、更快的入门。
  76 + 在主程序执行main函数就可以运行。你也可以打包你的应用为jar并通过使用java -jar来运行你的Web应用;
  77 +- [Mybatis-plus3.3.2](https://mp.baomidou.com/): MyBatis-plus(简称 MP)是一个 MyBatis (opens new window) 的增强工具。
  78 +- [flyway5.2.1](https://flywaydb.org/): 主要用于在你的应用版本不断升级的同时,升级你的数据库结构和里面的数据
  79 +
  80 +### 前端
  81 +
  82 +- [npm](https://www.npmjs.com/):node.js的包管理工具,用于统一管理我们前端项目中需要用到的包、插件、工具、命令等,便于开发和维护。
  83 +- [webpack](https://webpack.docschina.org/):用于现代 JavaScript 应用程序的静态模块打包工具。
  84 +- [ES6](https://es6.ruanyifeng.com/):JavaScript的新版本,ECMAScript6的简称。利用ES6我们可以简化我们的JS代码,同时利用其提供的强大功能来快速实现JS逻辑。
  85 +- [vue-cli](https://cli.vuejs.org/):Vue的脚手架工具,用于自动生成Vue项目的目录及文件。
  86 +- [vue-router](https://router.vuejs.org/): Vue提供的前端路由工具,利用其我们实现页面的路由控制,局部刷新及按需加载,构建单页应用,实现前后端分离。
  87 +- [element-ui](https://element.eleme.cn/#/zh-CN):基于MVVM框架Vue开源出来的一套前端ui组件。
  88 +- [avue](https://www.avuejs.com/): 用该组件包裹后可以变成拖拽组件,采用相对于父类绝对定位,用键盘的上下左右也可以控制移动。
  89 +- [vue-echarts](https://www.npmjs.com/package/vue-echarts/): vue-echarts是封装后的vue插件,基于 ECharts v4.0.1+ 开发。
  90 +- [vue-superslide](https://www.npmjs.com/package/vue-super-slider/): Vue-SuperSlide(Github) 是 SuperSlide 的 Vue 封装版本。
  91 +- [vuedraggable](https://github.com/SortableJS/Vue.Draggable/): 是一款基于Sortable.js实现的vue拖拽插件。
  92 +- [luckysheet](https://gitee.com/mengshukeji/Luckysheet): Luckysheet ,一款纯前端类似excel的在线表格,功能强大、配置简单、完全开源。
  93 +
  94 +## 编译打包
  95 +
  96 +在Linux上先准备好maven、node.js、jdk
  97 +
  98 +- [Apache Maven] 3.5 <br>
  99 +- [Node.js] v14.16.0 <br>
  100 +- [Jdk] 1.8
  101 +
  102 +```
  103 +git clone https://gitee.com/anji-plus/report.git
  104 +cd report
  105 +sh build.sh
  106 +编译完成放在build文件夹 aj-report-xxxx.zip
  107 +
  108 +unzip aj-report-xxxx.zip
  109 +cd aj-report-xxxx
  110 +vim conf/bootstrap.yml 修改数据库连接等信息
  111 +sh bin/start.sh Linux启动
  112 +bin/start.bat Windows修改第4行的JAVA_HOME后(去掉rem注释),双击启动
  113 +
  114 +启动后访问
  115 +http://serverip:9095
  116 +```
  117 +
  118 +**[运行环境参考文档](https://report.anji-plus.com/report-doc/guide/quicklyDevelop.html)** <br>
  119 +
  120 +**[源码编译部署参考文档](https://report.anji-plus.com/report-doc/guide/quicklySource.html)** <br>
  121 +
  122 +**[发行版部署参考文档](https://report.anji-plus.com/report-doc/guide/quicklyDistribution.html)** <br>
  123 +
  124 +**[前后端分离部署参考文档](https://report.anji-plus.com/report-doc/guide/quicklySeparate.html)** <br>
  125 +
  126 +## 操作手册
  127 +
  128 +新建数据源(重置mysql数据源) --> 新建数据集(编写sql) --> 新建大屏(设计大屏) <br>
  129 +
  130 +**[在线文档](https://report.anji-plus.com/report-doc/guide/datasource.html)**
  131 +
  132 +## SQL初始化
  133 +
  134 +sql文件的目录在:report-core --> src --> main --> resources -- > db.migration <br>
  135 +
  136 +系统初始化时flyway会自动的将该目录下的sql文件执行,不需要手动执行sql文件。 <br>
  137 +执行完将会创建 aj_report(存放系统基础数据) 和 aj_report_init(存放示例数据) 俩个库。 <br>
  138 +
  139 +## 谁在使用
  140 +
  141 +希望你们的logo出现在此,[请点此Issue进行登记](https://gitee.com/anji-plus/report/issues/I3ZXT4) ,我们将优先进行技术支持 <br>
  142 +
  143 +<a href='http://www.anji-plus.com/'> <img src="https://report.anji-plus.com/file/download/d287d4d3-d30b-4850-9bac-a6c991409251" width = "130" height = "50" align=left/> </a>
  144 +<a href='https://www.yunstech.cn/'><img src="https://www.yunstech.cn/images/logo.png" width = "130" height = "50" /> </a>
  145 +<a href='http://www.fgkb.net/'><img src="https://report.anji-plus.com/file/download/9ee5b709-5033-4cd5-a784-ebd2877fd373" width = "130" height = "50" /> </a>
  146 +<a href='http://www.turingoal.com/'><img src="https://report.anji-plus.com/file/download/cda7bf68-376b-45dc-9a55-c52b21e4a8c8" width = "130" height = "50" /> </a>
  147 +<a href='https://www.gykjweb.com/'><img src="https://report.anji-plus.com/file/download/d13b03f5-0c20-4878-9a79-f3c76b44bfd9" width = "130" height = "130" /> </a> <br>
  148 +<a href='http://www.plian.net/'><img src="https://report.anji-plus.com/file/download/7838f2c2-fdce-4ca7-8373-14d13dcda5cc" width = "130" height = "50" /> </a>
  149 +<a href='https://www.zjjcl.cn/'><img src="https://report.anji-plus.com/file/download/8df07663-60c9-4e32-a0f2-0ea7d5c46ff9" width = "130" height = "50" /> </a>
  150 +
  151 +
  152 +## 未来计划
  153 +
  154 +- 大屏宽高动态可视化
  155 +- nodeV16适配
  156 +- 增加省市区地图等图
  157 +- 增加基础边框样式
  158 +- Execl报表功能增加与bug修复
  159 +
  160 +## 已知问题
  161 +
  162 +- IE白屏(兼容性问题)
  163 +
  164 +## 版本问题
  165 +
  166 +已知以下版本存在兼容性问题
  167 +
  168 +- Node.js V16
  169 +- openJdk
  170 +- Jdk 11
  171 +- Mysql 8.0(8.0.23/26版本没有问题,8.0.21版本存在问题)
  172 +
  173 +**[常见问题](https://report.anji-plus.com/report-doc/guide/question.html)**
  174 +
  175 +## 商业授权
  176 +
  177 +AJ-Report使用[Apache2.0开源协议](http://www.apache.org/licenses/LICENSE-2.0.html) <br>
  178 +个人和企业,在直接使用、二次开发后商业使用,需要遵守:
  179 +
  180 +- 包含AJ-Report LICENSE文件(授权使用者免费使用AJ-Report专利和知识产权)
  181 +- 如果修改了代码,需要在被修改的文件中说明
  182 +- 在修改和有源代码衍生的代码中,需要带有原来代码中的协议,商标
  183 +- 在二次开发后商业发布的产品中,使用了多个开源软件,则必须包含一个Notice文件,在Notice文件中需要带有AJ-Report LICENSE。你可以在Notice中增加自己的许可,但不可以表现为对AJ-Report
  184 + LICENSE构成更改。
  185 +
  186 +如果您需要商业化增值服务,请加下面的微信沟通。
  187 +
  188 +## 技术支持
  189 +
  190 +**如有问题,请提交 [Issue](https://gitee.com/anji-plus/report/issues) <br>**
  191 +个人企业微信:<br>
  192 +<img src="https://images.gitee.com/uploads/images/2021/0729/130901_1672e6c5_7492051.jpeg" width = "200" height = "200" align=left/>
  193 +
  194 +#### 开源不易,劳烦各位star ☺
  195 +
  1 +#!/bin/bash
  2 +
  3 +#判断node.js mvn是否存在
  4 +command -v npm >/dev/null 2>&1 || { echo >&2 "I require node.js v14.16.0+ but it's not installed. Aborting."; sleep 5; exit 1; }
  5 +command -v mvn >/dev/null 2>&1 || { echo >&2 "I require maven 3.5 + but it's not installed. Aborting."; sleep 5; exit 1; }
  6 +
  7 +cd `dirname $0`
  8 +BuildDir=`pwd` #工程根目录
  9 +
  10 +echo "build web"
  11 +cd $BuildDir/report-ui
  12 +npm install >/dev/null 2>&1
  13 +npm run build:prod >/dev/null 2>&1
  14 +
  15 +echo "publish web to springboot src/main/resources/static"
  16 +
  17 +mkdir -p $BuildDir/report-core/src/main/resources/static
  18 +mv $BuildDir/report-ui/dist/* $BuildDir/report-core/src/main/resources/static/
  19 +
  20 +
  21 +echo "build springboot"
  22 +cd $BuildDir/report-core
  23 +mvn clean >/dev/null 2>&1
  24 +mvn package -Dmaven.test.skip=true >/dev/null 2>&1
  25 +
  26 +echo "zip finish in build dir"
  27 +if [ ! -d "$BuildDir/build" ]; then
  28 + mkdir $BuildDir/build
  29 +fi
  30 +mv $BuildDir/report-core/target/aj-report-*.zip $BuildDir/build/
  31 +rm -rf $BuildDir/report-core/src/main/resources/static/*
  32 +
  1 +.DS_Store
  2 +node_modules/
  3 +dist/
  4 +../.idea/
  5 +npm-debug.log*
  6 +yarn-debug.log*
  7 +yarn-error.log*
  8 +package-lock.json
  9 +yarn.lock
  10 +
  11 +# Editor directories and files
  12 +.idea
  13 +.vscode
  14 +*.suo
  15 +*.ntvs*
  16 +*.njsproj
  17 +*.sln
  1 +## 文档
  2 +文档基于vue-press实现,运行步骤:
  3 +
  4 +1. npm install
  5 +
  6 +2. npm run docs:dev
  7 +
  8 +3. http://localhost:8080
  1 +module.exports = {
  2 + base: '/report-doc/',
  3 + title: 'AJ-Report',
  4 + description: '使用拖拽快速生成动态大屏报表',
  5 + dest: 'dist',
  6 + lastUpdated: 'Last Updated',
  7 + theme: '',
  8 + themeConfig: {
  9 + logo: '/logo.png',
  10 + smoothScroll: true,
  11 + sidebarDepth: 2,
  12 + nav: [
  13 + {text: '首页', link: '/'},
  14 + {text: '指南', link: '/guide/'},
  15 + {text: 'GitHub', link: 'https://github.com/anji-plus/report'},
  16 + {text: 'Gitee', link: 'https://gitee.com/anji-plus/report'},
  17 + {text: '谁在使用', link: '/guide/briefUsing'},
  18 + {text: '更多案例', link: '/guide/bigScreenCase'},
  19 + ],
  20 + sidebar: {
  21 + '/guide/': [
  22 + {
  23 + title: '介绍',
  24 + collapsable: false,
  25 + children: [
  26 + {title: '简介', path: '/guide/'},
  27 + {title: '谁在使用', path: '/guide/briefUsing'},
  28 + {title: '技术支持', path: '/guide/briefSupport'},
  29 + {title: '更多案例', path: '/guide/bigScreenCase'},
  30 + ]
  31 + },
  32 + {
  33 + title: '快速入门',
  34 + collapsable: false,
  35 + children: [
  36 + {title: '开发环境', path: '/guide/quicklyDevelop'},
  37 + {title: '发行版部署', path: '/guide/quicklyDistribution'},
  38 + {title: '源码部署', path: '/guide/quicklySource'},
  39 + {title: '前后端分离', path: '/guide/quicklySeparate'},
  40 + ]
  41 + },
  42 + {
  43 + title: '用户权限',
  44 + collapsable: false,
  45 + children: [
  46 + {title: '权限管理', path: '/guide/authmanager'},
  47 + ]
  48 + },
  49 + {
  50 + title: '操作手册',
  51 + collapsable: false,
  52 + children: [
  53 + {title: '数据源', path: '/guide/datasource'},
  54 + {title: '数据集', path: '/guide/dataset'},
  55 + {title: '报表管理', path: '/guide/reportmanager'},
  56 + {title: '大屏报表', path: '/guide/dashboard'},
  57 + {title: '表格报表', path: '/guide/execl'},
  58 + {title: '导入导出', path: '/guide/importexport'},
  59 + {title: '图表组件', path: '/guide/charts'},
  60 + ]
  61 + },
  62 + {
  63 + title: '其他',
  64 + collapsable: false,
  65 + children: [
  66 + {title: '常见问题', path: '/guide/question'}
  67 + ]
  68 + },
  69 + {
  70 + title: '社区提供',
  71 + collapsable: false,
  72 + children: [
  73 + {title: '说明', path: '/guide/community/report'},
  74 + {title: '搭建AJ-Report开发环境', path: '/guide/community/AC1688/搭建aj-report开发环境'}
  75 + ]
  76 + }
  77 + ],
  78 + }
  79 + },
  80 + plugins: [
  81 + ['@vuepress/back-to-top', true],
  82 + ],
  83 + configureWebpack: {
  84 + resolve: {
  85 + alias: {
  86 + '@': '/.vuepress/public'
  87 + }
  88 + }
  89 + }
  90 +}
  1 +// placeholder for test, dont't remove it.
  2 +
  3 +//.content {
  4 +// font-size 30px;
  5 +//}
  6 +
  7 +pre.vue-container
  8 + border-left-width: .5rem;
  9 + border-left-style: solid;
  10 + border-color: #42b983;
  11 + border-radius: 0px;
  12 + & > code
  13 + font-size: 14px !important;
  14 + & > p
  15 + margin: -5px 0 -20px 0;
  16 + code
  17 + background-color: #42b983 !important;
  18 + padding: 3px 5px;
  19 + border-radius: 3px;
  20 + color #000
  21 + em
  22 + color #808080
  23 + font-weight light
  1 +---
  2 +home: true
  3 +heroImage: /logo.png
  4 +actionText: 快速开始 →
  5 +actionLink: /guide/
  6 +footer: Apache 2.0 Licensed | Copyright © 2021 Anji-Plus Report All Rights Reserved
  7 +---
  8 +
  9 +<div style="text-align: center">
  10 +</div>
  11 +
  12 +<div class="features">
  13 + <div class="feature">
  14 + <h2>技术先进</h2>
  15 + <p>使用最流行的技术SpringBoot、Vue、Element。</p>
  16 + </div>
  17 + <div class="feature">
  18 + <h2>丰富组件</h2>
  19 + <p>是一个包含前后端代码实现,同时支持动态扩展数据源.</p>
  20 + </div>
  21 + <div class="feature">
  22 + <h2>功能完善</h2>
  23 + <p>支持多数据源,多数据集,丰富的大屏组件实现拖拽生成大屏</p>
  24 + </div>
  25 +</div>
  1 +&emsp; &emsp; AJ-Report是一个完全开源的BI平台,酷炫大屏展示,能随时随地掌控业务动态,让每个决策都有数据支撑。<br>
  2 +&emsp; &emsp; 多数据源支持,内置mysql、elasticsearch、kudu等多种驱动,支持自定义数据集省去数据接口开发,目前已支持20种大屏组件/图表,不会开发,照着设计稿也可以制作大屏。<br>
  3 +&emsp; &emsp; 三步轻松完成大屏设计:配置数据源---->写SQL配置数据集---->拖拽配置大屏---->保存发布。欢迎体验。
  4 +
  5 +## 系统特性
  6 +
  7 +1. 最新最稳定的技术栈;
  8 +2. 支持多数据源配置
  9 +3. 丰富的大屏组件。拖拽配置实现动态大屏
  10 +
  11 +## 在线体验
  12 +
  13 +#### &emsp; [在线体验](https://report.anji-plus.com/index.html "链接"): https://report.anji-plus.com/index.html &emsp;体验账号:guest 密码:guest
  14 +
  15 +#### &emsp; [在线文档](https://report.anji-plus.com/report-doc/ "doc"): https://report.anji-plus.com/report-doc/ <br>
  16 +
  17 +#### &emsp; [在线提问](https://gitee.com/anji-plus/report/issues "issue"): https://gitee.com/anji-plus/report/issues <br>
  18 +
  19 +## 发行版本
  20 +
  21 +#### &emsp; [下载链接](https://gitee.com/anji-plus/report/releases "下载链接"): https://gitee.com/anji-plus/report/releases <br>
  22 +
  23 +## 功能概述
  24 +
  25 +#### &emsp; 组件介绍
  26 +
  27 +&emsp;&emsp; 大屏设计(AJ-Report)是一个可视化拖拽编辑的,直观,酷炫,具有科技感的图表工具全开源项目。 内置的基础功能包括数据源,数据集,报表管理,项目部分截图如下。<br>
  28 +
  29 +![操作](https://images.gitee.com/uploads/images/2021/0703/094742_c0243f70_1728982.gif "2021-07-03_09-43-50.gif")
  30 +
  31 +![视频](https://report.anji-plus.com/report-doc/static/Rhea.mp4) <br>
  32 +
  33 +**[更多社区大屏案例](https://report.anji-plus.com/report-doc/guide/bigScreenCase.html)** <br>
  34 +
  35 +## 数据流程图
  36 +
  37 +![An image](https://images.gitee.com/uploads/images/2021/0630/160451_31bb9052_1728982.png)
  38 +
  39 +## 打包目录
  40 +
  41 +```
  42 +├── bin 启动命令脚本
  43 +│ ├── restart.sh
  44 +│ ├── start.bat
  45 +│ ├── start.sh
  46 +│ └── stop.sh
  47 +├── conf 配置文件目录
  48 +│ └── bootstrap-dev.yml
  49 +├── logs 启动日志目录
  50 +├── cache 本地缓存目录
  51 +├── lib 自定义扩展包&report-core核心包
  52 +```
  53 +
  54 +## 系统目录
  55 +
  56 +```
  57 +├── doc 文档源码
  58 +│ ├── docs
  59 +│ ├── package.json
  60 +│ └── README.md
  61 +├── pom.xml 父pom,jar版本管理
  62 +├── report-core java源码
  63 +│ ├── pom.xml gaea父pom,jar版本管理
  64 +│ └── README.md
  65 +├── report-ui 前端vue源码
  66 +├── LICENSE
  67 +├── README.md
  68 +```
  69 +
  70 +
  71 +
  72 +
  1 +## 新增用户
  2 +
  3 +![img](../picture/authmanager/img.png) <br>
  4 +
  5 +![img](../picture/authmanager/img_1.png) <br>
  6 +
  7 +新增用户的默认密码是在bootstrap.yml文件中配置的 <br>
  8 +
  9 +![img](../picture/authmanager/img_2.png) <br>
  10 +
  11 +## 用户授权
  12 +
  13 +**注意**:新建用户完成后需要给用户授权,否则新用户登陆是啥也看不到。<br>
  14 +![img](../picture/authmanager/img_3.png) <br>
  15 +
  16 +![img](../picture/authmanager/img_4.png) <br>
  17 +**注**:这里没有给新用户赋予默认角色的原因是,在角色管理中角色是可以被删除和修改的,因此在新建用户时需要手动的去授权角色 <br>
  18 +
  19 +## 角色管理
  20 +
  21 +![img](../picture/authmanager/img_5.png) <br>
  22 +
  23 +## 权限分配
  24 +
  25 +为角色分配权限,可看已有角色示例 <br>
  26 +![img](../picture/authmanager/img_6.png) <br>
  27 +
  28 +## 导入导出权限
  29 +
  30 +**注**:现在guest用户的权限是底层写死只有访问权限,无实质操作权限。<br>
  31 +导入导出的权限是在 角色 --> 分配权限中控制。 <br>
  32 +
  33 +![img](../picture/authmanager/img_7.png) <br>
  34 +用户绑定了角色,角色则绑定了权限,是这样一层关系。 <br>
  35 +
  36 +
  37 +
  1 +## 案例一:
  2 +
  3 +由社区 **[~无痕~@tengzhouboy](https://gitee.com/tengzhouboy)** 提供 <br>
  4 +[AJ-Report分享链接](https://report.anji-plus.com/index.html#/aj/mtwbjPot) <br>
  5 +
  6 +![img.png](../picture/bigScreenCase/img.png) <br>
  7 +
  1 +**如有问题,请提交 [Issue](https://gitee.com/anji-plus/report/issues) <br>**
  2 +
  3 +**微信群: <br>**
  4 +![weixin.png](../picture/weixin.jpg)
  5 +
  6 +#### 开源不易,劳烦各位star ☺
  1 +希望你们的logo出现在此,[请点此Issue进行登记](https://gitee.com/anji-plus/report/issues/I3ZXT4) <br>
  2 +
  3 +<a href='http://www.anji-plus.com/'> <img src="https://report.anji-plus.com/file/download/d287d4d3-d30b-4850-9bac-a6c991409251" width = "130" height = "50" align=left/> </a>
  4 +<a href='https://www.yunstech.cn/'><img src="https://www.yunstech.cn/images/logo.png" width = "130" height = "50" /> </a>
  5 +<a href='http://www.fgkb.net/'><img src="https://report.anji-plus.com/file/download/9ee5b709-5033-4cd5-a784-ebd2877fd373" width = "130" height = "50" /> </a>
  6 +<a href='http://www.turingoal.com/'><img src="https://report.anji-plus.com/file/download/cda7bf68-376b-45dc-9a55-c52b21e4a8c8" width = "130" height = "50" /> </a>
  7 +<a href='http://www.plian.net/'><img src="https://report.anji-plus.com/file/download/7838f2c2-fdce-4ca7-8373-14d13dcda5cc" width = "130" height = "50" /> </a>
  8 +<a href='https://www.gykjweb.com/'><img src="https://report.anji-plus.com/file/download/d13b03f5-0c20-4878-9a79-f3c76b44bfd9" width = "130" height = "130" /> </a>
  1 +## 图表和数据集之间的关系
  2 +
  3 +图表和数据集是强关联关系,一个图表需要什么样的数据才能进行展示下面都有说明,以柱状图举例,只能用俩个字段的数据集进行数据展示,那使用数据集有2个以上字段那肯定图表无法正常展示,反之有个数据集是3个字段,那就找能展示3个字段的图表,千万别搞小聪明定了好多个字段的数据集,然后从里面挑几个字段进行展示,不要在么干。<br>
  4 +
  5 +## 文本框
  6 +
  7 +![img_3.png](../picture/dashboard/img_3.png) <br>
  8 +![img_4.png](../picture/dashboard/img_4.png) <br>
  9 +![img_5.png](../picture/dashboard/img_5.png) <br>
  10 +![img_6.png](../picture/dashboard/img_6.png) <br>
  11 +
  12 +### 数据格式
  13 +
  14 +![img1](../picture/charts/img.png) <br>
  15 +
  16 +## 滚动文本
  17 +
  18 +同上文本,操作无异 <br>
  19 +
  20 +## 超链接
  21 +
  22 +![img2](../picture/charts/img_1.png) <br>
  23 +**如有问题,请提交 [Issue](https://gitee.com/anji-plus/report/issues) <br>**
  24 +
  25 +## 当前时间
  26 +
  27 +已支持多种时间格式,其他格式请提Issue <br>
  28 +![img_1.png](../picture/dashboard/img_1.png) <br>
  29 +
  30 +## 图片
  31 +
  32 +![img_7.png](../picture/dashboard/img_7.png) <br>
  33 +**注:** 如果没有在bootstrap.yml配置文件中没有正确配置上传下载的路径,这里肯定是失败的 <br>
  34 +
  35 +## 视屏
  36 +
  37 +**暂不支持循环播放**<br>
  38 +**注意视频的地址应是直接可以访问的,不需要登录之类** <br>
  39 +
  40 +## 表格
  41 +
  42 +![img](../picture/dashboard/img_22.png) <br>
  43 +表格字段对应的数据只选择“文本数字”。<br>
  44 +![img14](../picture/dashboard/img_23.png) <br>
  45 +**注意:** 多个字段的时候,需要在“配置-新增”添加你选择数据集所对应的字段,类似于映射关系。 <br>
  46 +**如有问题,请提交 [Issue](https://gitee.com/anji-plus/report/issues) <br>**
  47 +
  48 +## 内联框架
  49 +
  50 +当超链接和视频链接无效的时候,请尝试使用内联框架<br>
  51 +
  52 +## 柱状图
  53 +
  54 +柱状图数据集对应字典值需要选择一个“X轴”、“柱状”,只需要2个字段 <br>
  55 +**如有问题,请提交 [Issue](https://gitee.com/anji-plus/report/issues) <br>**
  56 +
  57 +### 数据格式
  58 +
  59 +![img3](../picture/charts/img_2.png) <br>
  60 +
  61 +## 柱形图-渐变色
  62 +
  63 +同上柱形图,颜色调整为支持渐变色 <br>
  64 +
  65 +## 折线图
  66 +
  67 +折线图数据集对应字典值需要选择一个“X轴”、“折线”,只需要2个字段 <br>
  68 +![img_8.png](../picture/dashboard/img_8.png) <br>
  69 +**如有问题,请提交 [Issue](https://gitee.com/anji-plus/report/issues) <br>**
  70 +
  71 +### 数据格式
  72 +
  73 +同上柱形图数据格式 <br>
  74 +
  75 +## 柱线图
  76 +
  77 +柱线图数据集对应字典值需要选择一个“X轴”、“柱状”、“折线”,需要3个字段 <br>
  78 +![img9](../picture/dashboard/img_9.png) <br>
  79 +**如有问题,请提交 [Issue](https://gitee.com/anji-plus/report/issues) <br>**
  80 +
  81 +### 数据格式
  82 +
  83 +![img5](../picture/charts/img_4.png) <br>
  84 +
  85 +## 饼图
  86 +
  87 +饼图的数据集选择的时候,只能选择饼图对应的字典,即“Name”、“Value”,不明白可以参考静态数据 <br>
  88 +![img8](../picture/charts/img_8.png) <br>
  89 +![img9](../picture/charts/img_9.png) <br>
  90 +**如有问题,请提交 [Issue](https://gitee.com/anji-plus/report/issues) <br>**
  91 +
  92 +### 数据格式
  93 +
  94 +![img6](../picture/charts/img_5.png) <br>
  95 +
  96 +## 漏斗图
  97 +
  98 +![img13](../picture/dashboard/img_13.png) <br>
  99 +**如有问题,请提交 [Issue](https://gitee.com/anji-plus/report/issues) <br>**
  100 +
  101 +### 数据格式
  102 +
  103 +和饼图数据格式一致。<br>
  104 +
  105 +## 仪表盘
  106 +
  107 +![img21](../picture/dashboard/img_21.png) <br>
  108 +**如有问题,请提交 [Issue](https://gitee.com/anji-plus/report/issues) <br>**
  109 +
  110 +### 数据格式
  111 +
  112 +![img7](../picture/charts/img_6.png) <br>
  113 +
  114 +## 中国地图
  115 +
  116 +迁徙图暂不支持动态数据 <br>
  117 +
  118 +## 南丁格尔玫瑰图
  119 +
  120 +![img71](../picture/charts/img_7.png) <br>
  121 +![img10](../picture/charts/img_10.png) <br>
  122 +**如有问题,请提交 [Issue](https://gitee.com/anji-plus/report/issues) <br>**
  123 +
  124 +### 数据格式
  125 +
  126 +和饼图数据格式保持一致。 <br>
  127 +
  128 +## 百分百图
  129 +
  130 +![img16](../picture/dashboard/img_16.png) <br>
  131 +**如有问题,请提交 [Issue](https://gitee.com/anji-plus/report/issues) <br>**
  132 +
  133 +### 数据格式
  134 +
  135 +和仪表盘数据格式保持一致。<br>
  136 +
  137 +## 气泡地图
  138 +
  139 +气泡地图是中国地图气泡样式展示形式 <br>
  140 +气泡地图动态数据集,和饼图一样,对应字典值需要选择一个“Name”、“Value”,且name的字段值要和echarts图表里面的值能对应上,可参考静态数据 <br>
  141 +![img15](../picture/dashboard/img_15.png) <br>
  142 +
  143 +## 柱状堆叠图
  144 +
  145 +动态的数据集对应字典值需要选择一个“X轴”、“Y轴”、“柱状”,也就是说需要3个字段,不明白可以看看静态数据 <br>
  146 +![img.17](../picture/dashboard/img_17.png) <br>
  147 +**如有问题,请提交 [Issue](https://gitee.com/anji-plus/report/issues) <br>**
  148 +
  149 +## 数据格式
  150 +
  151 +![img4](../picture/charts/img_3.png) <br>
  152 +
  153 +## 折线堆叠图
  154 +
  155 +动态的数据集对应字典值需要选择一个“X轴”、“Y轴”、“折线”,也就是说需要3个字段,不明白可以看看静态数据 <br>
  156 +![img.17](../picture/dashboard/img_17.png) <br>
  157 +**如有问题,请提交 [Issue](https://gitee.com/anji-plus/report/issues) <br>**
  158 +
  159 +### 数据格式
  160 +
  161 +和柱状堆叠图数据格式保持一致。<br>
  162 +
  163 +## 柱状对比图
  164 +
  165 +数据集需要3个字段,其中一个作为对比的字段只能为2种值,只有2种值作为对比的字段要选择“y轴字段”字典。因为底层的解析用的是堆叠图的解析,这里的y轴字段并不是指的图表上面的y轴,还请注意,有强迫症可以自行修改源码的解析,剩下的2个字段对应字典看图<br>
  166 +![img18](../picture/dashboard/img_18.png) <br>
  167 +**如有问题,请提交 [Issue](https://gitee.com/anji-plus/report/issues) <br>**
  168 +
  169 +### 数据格式
  170 +
  171 +![img11](../picture/charts/img_11.png) <br>
  172 +
  173 +## 折线对比图
  174 +
  175 +数据集需要3个字段,其中一个作为对比的字段只能为2种值,只有2种值作为对比的字段要选择“y轴字段”字典,剩下的字典对应看图<br>
  176 +![img19](../picture/dashboard/img_19.png) <br>
  177 +**注**:如果提示语设置选择“十字形”,请注意需要选择 “X轴颜色、上Y轴颜色、下Y轴颜色”,不然预览图表鼠标选择是全白色,还请注意。<br>
  178 +![img20](../picture/dashboard/img_20.png)
  179 +**如有问题,请提交 [Issue](https://gitee.com/anji-plus/report/issues) <br>**
  180 +
  181 +### 数据格式
  182 +
  183 +和柱状对比图数据格式一致。<br>
  184 +
  185 +## 装饰饼图
  186 +
  187 +装饰用,可单独使用或者配合文本框等图表组件来使整个大屏立体、丰满。<br>
  188 +![img12](../picture/charts/img_12.png) <br>
  1 +**搭建aj-report开发环境**
  2 +
  3 +# 工具版本
  4 +
  5 +参考
  6 +
  7 +[Mysql] 5.7
  8 +
  9 +[Jdk] 1.8
  10 +
  11 +[Spring Boot] 2.3.5
  12 +
  13 +[Mybatis-plus] 3.3.2
  14 +
  15 +[flyway] 5.2.1
  16 +
  17 +[Apache Maven] 3.5
  18 +
  19 +[Node.js] 14.16.0
  20 +
  21 +[Windows 10]
  22 +
  23 +实际
  24 +
  25 +Mysql 5.7.34
  26 +
  27 +JDK 1.8u291
  28 +
  29 +IdeaJ 2020.2.1
  30 +
  31 +Spring Boot DTD
  32 +
  33 +Maven 3.5.4
  34 +
  35 +Windows7
  36 +
  37 +Git 2.33.0 x64
  38 +
  39 +Node 13.14.0-x64
  40 +
  41 +Vscode 1.59.0
  42 +
  43 +# 环境准备
  44 +
  45 +共分前端、公共、后端。
  46 +
  47 +## 后端
  48 +
  49 +### Mysql
  50 +
  51 +下载mysql数据库
  52 +
  53 +下载地址
  54 +
  55 +<https://dev.mysql.com/downloads/installer/>
  56 +
  57 +步骤,【选择安装类型】(即Choosing a Setup Type),选择【仅服务器】(即Server
  58 +only)
  59 +
  60 +步骤,【类型和网络】(即Type and Networking),选择【开发电脑】(即Development
  61 +Computer)
  62 +
  63 +步骤,【账户和角色】(即Account and Roles),root密码设置为root。
  64 +
  65 +步骤,【Windows服务】(即Windows
  66 +Service),勾选【配置MySQL服务作为一个Windows服务】(即Configure MySQL Server as
  67 +a Windows Service)。
  68 +
  69 +除以上外,都采用默认,一直下一步,直至安装完成。
  70 +
  71 +### JDK
  72 +
  73 +采用默认安装,一直下一步,直至完成。
  74 +
  75 +配置环境变量
  76 +
  77 +JAVA_HOME C:\\Program Files\\Java\\jdk1.8.0_291
  78 +
  79 +### IdeaJ
  80 +
  81 +采用默认安装,一直下一步,直至完成。
  82 +
  83 +### Maven
  84 +
  85 +下载地址
  86 +
  87 +https://dlcdn.apache.org/maven/maven-3/3.5.4/binaries/
  88 +
  89 +将压缩包解压到路径:C:\\Program Files\\
  90 +
  91 +添加环境变量M2_HOME C:\\Program Files\\apache-maven-3.5.4
  92 +
  93 +(旧版变量写法:MAVEN_HOME)
  94 +
  95 +调整Path环境变量,增加 ;%M2_HOME%C:\\bin
  96 +
  97 +### 插件
  98 +
  99 +IdeaJ安装spring boot开发插件
  100 +
  101 +已自带,不用再安装。
  102 +
  103 +安装lombok
  104 +
  105 +## 公共
  106 +
  107 +### Git
  108 +
  109 +#### 安装
  110 +
  111 +采用默认安装,一直下一步,直至完成。
  112 +
  113 +#### 拉代码
  114 +
  115 +为idea指定git路径
  116 +
  117 +默认情况下,IDEA是不自带git运行程序的,所以需要通过
  118 +菜单-\>settings-\>Version Control-\>Git-\>Path to Git executable:
  119 +设置为安装git中所安装的git.exe
  120 +
  121 +获取gitee上面的要拉取项目的url,即页面左上方【可隆/下载】,单击选择【复制】,即可获得url。
  122 +
  123 +在ideaj中,选择路径,file -\> new -\> Project from Version Control -\> Git,
  124 +
  125 +将url复制到URL后的方框,
  126 +
  127 +选择本地目录(即Directory)
  128 +
  129 +点击【Clone】,开始拉代码。
  130 +
  131 +## 前端
  132 +
  133 +### Node
  134 +
  135 +采用默认安装,一直下一步,直至完成。
  136 +
  137 +### Vscode
  138 +
  139 +步骤,【选择附件任务】,勾选【添加到PATH(重启后生效)】
  140 +
  141 +其余采用默认安装,一直下一步,直至完成。
  142 +
  143 +# 开发环境
  144 +
  145 +## 后端
  146 +
  147 +新建文件夹用于存放后端代码C:\\ijproj,将git下载的代码解压至该目录。
  148 +
  149 +### 下载源码
  150 +
  151 +具体步骤见Git2.2.1.2拉代码
  152 +
  153 +### 依赖插件
  154 +
  155 +下载依赖和插件。Git完代码后,会自动下载依赖和插件。如果pom中的依赖和插件爆红。可设置maven,File
  156 +——\> Settings。找到Maven,相关的三项设置,包括:Maven home directory、User
  157 +settings file、Local repository,可直接使用默认设置。
  158 +
  159 +遇到个别顽固爆红的依赖和插件,可以直接在本地资料库.m2\\repository中查找,确认是否已经下载。确认已经下载的话,则可以尝试在该依赖或者插件中增加版本号(与资料库中的一致,org.springframework.boot对应的路径
  160 +资料库路径\\org\\springframework\\boot,spring-boot-maven-plugin对应上述路径的子文件夹spring-boot-maven-plugin,此文件夹即spring-boot-maven-plugin的子文件夹是版本号2.3.5.RELEASE,打开2.3.5.RELEASE就是对应的jar包等内容)。
  161 +
  162 +### 设置Mysql
  163 +
  164 +设置好mysql,以便运行时,自动进行初始化。
  165 +
  166 +配置文件路径:/src/main/resources/bootstrap.yml,在此文件中找到datasource
  167 +mysql的配置信息,修改IP地址为mysql所在机器的IP,调整用户密码。本文中为本地即localhost或者用127.0.0.1,用户为root,密码为root。
  168 +
  169 +### 运行后端
  170 +
  171 +确认启动了Mysql服务
  172 +
  173 +然后运行后端程序
  174 +
  175 +## 前端
  176 +
  177 +### 下载源码
  178 +
  179 +新建文件夹C:\\vsproj用于存放前端项目源码
  180 +
  181 +下载源码,在vscode使用【ctrl】+【\`】或者【Terminal】-\>【New
  182 +Terminal】。用cd命令进入相应的文件夹。
  183 +
  184 +执行git clone https://gitee.com/anji-plus/report.git,拉代码。
  185 +
  186 +### 设置环境
  187 +
  188 +调整配置文件,配置文件路径REPORT-UI/config/dev.env.js,调整BASE_API后URL地址中的IP、端口。若都在同一台电脑,直接使用IP:127.0.0.1,端口使用默认9095。
  189 +
  190 +(连接后端的IP,改为后端API代码所在的IP、所使用的端口。)
  191 +
  192 +### 编译运行
  193 +
  194 +在vscode使用【ctrl】+【\`】或者【Terminal】-\>【New
  195 +Terminal】。用cd命令进入前端代码文件夹,执行如下命令:
  196 +
  197 +命令一:cd C:\\vsproj\\report\\report-ui
  198 +
  199 +命令二:npm init -y
  200 +
  201 +命令三:npm install
  202 +
  203 +命令四:npm run dev
  204 +
  205 +命令四执行后,启动了前端,在浏览器中输入http://localhost:9528/\#/login
  206 +
  207 +## 启动
  208 +
  209 +启动顺序:确保数据库启动、确保后端启动、最后启动前端
  210 +
  211 +1确保mysql已经启动
  212 +
  213 +2运行后端代码
  214 +
  215 +3运行前端代码
  216 +
  217 +4浏览器输入http://localhost:9528/\#/login
  218 +
  219 +用户:admin
  220 +
  221 +密码:123456
  222 +
  223 +# 错误
  224 +
  225 +## 问题一
  226 +
  227 +遇到Error creating bean with name 'flywayInitializer' defined in class path
  228 +resource解决办法
  229 +
  230 +将这个Resolved
  231 +locally后面的**版本号复制**下来,连着符号一起复制,然后找到你数据库中的**flyway_schema
  232 +\_history**这个表,在最下面那一行数据中把刚刚复制的版本号替换进去就可以了。
  233 +
  234 +## 问题二
  235 +
  236 +问题现象:报表设计界面中看不到图表,
  237 +
  238 +查看日志,Access denied for user 'ajreport'@'localhost' (using password: YES)
  239 +
  240 +在系统【数据源】中调整设置,将IP、用户、密码等调整为在用的。
  241 +
  242 +默认用户ajreport,密码ajreport
  243 +
  244 +改为初始化时的,用户root,密码root
  1 +# 社区用户提交文档PR的简易说明
  2 +
  3 +## 提交位置
  4 +doc -- > docs --> guide -- > community 目录 <br>
  5 +![img](../../guide/community/report/img.png) <br>
  6 +
  7 +## 具体操作
  8 +- 请在community目录下新建属于你自己的文件目录,命名方式可以使用自己在gitee的名字作为命名,注意中文命名可能会存在的一些问题。<br>
  9 +- 在你的个人目录下,你可以新建MD文件,需要用到图片可以直接放一个目录,如果md多,图片也多,建议再建下级目录存放。<br>
  10 +
  11 +最后别忘了在config.js中添加配置,如图示。<br>
  12 +![img](../../guide/community/report/img_1.png) <br>
  13 +
  14 +
  1 +## 设计大屏
  2 +
  3 +进入大屏设计方法1: <br>
  4 +从报表管理模块选择需要设计的大屏,按图示进入大屏设计界面 <br>
  5 +![img](../picture/dashboard/img22.png) <br>
  6 +
  7 +进入大屏设计方法2: <br>
  8 +从大屏报表模块选择需要设计的大屏,按图示进入大屏设计界面 <br>
  9 +![img](../picture/dashboard/img23.png) <br>
  10 +
  11 +## 大屏简介
  12 +
  13 +![img_2.png](../picture/dashboard/img_2.png) <br>
  14 +
  15 +## 工具栏
  16 +![img24](../picture/dashboard/img_24.png) <br>
  17 +
  18 +## 图层
  19 +![img25](../picture/dashboard/img_25.png) <br>
  1 +![img5](../picture/dateset/img_5.png)
  2 +
  3 +## SQL数据集
  4 +
  5 +### Mysql数据集
  6 +
  7 +在数据源处添加了mysql的数据源后,即可使用。<br>
  8 +![img_1.png](../picture/dateset/img_1.png) <br>
  9 +
  10 +### ES数据集
  11 +
  12 +**注**:es是通过调用xpack-sql,注意写法 <br>
  13 +![es.png](../picture/dateset/img.png) <br>
  14 +
  15 +### Kudu数据集
  16 +
  17 +![kudu.png](../picture/dateset/img_2.png) <br>
  18 +
  19 +## 功能栏
  20 +
  21 +**可以看在线环境,有示例参考** <br>
  22 +
  23 +### 查询参数
  24 +
  25 +![img3](../picture/dateset/img_3.png) <br>
  26 +注意参数名要和sql(请求体)中变量名保持一致,sql(请求体)中的变量用 ${} 表示 <br>
  27 +高级规则是用js进行数据装换。
  28 +
  29 +### 数据转换
  30 +
  31 +#### js脚本
  32 +
  33 +**注**:这里的JS是java的scriptengine执行的,很多es6的语法不支持 <br>
  34 +![img4](../picture/dateset/img_4.png) <br>
  35 +入参是data,返回值也必须是data,中间是JS的处理过程,注意入参返回都是List<JSONObject>,记得保存。 <br>
  36 +
  37 +#### 字典项
  38 +
  39 +场景有限,待补充。
  40 +
  41 +## HTTP数据集
  42 +
  43 +即原有http数据源的功能,原有http数据源不动
  1 +## 介绍
  2 +
  3 +- 支持多数据源,内置mysql、elasticsearch、kudu等多种驱动 <br>
  4 +- 可动态扩展
  5 + ![source.png](../picture/datasource/img_1.png)
  6 +
  7 +## 数据源类型
  8 +
  9 +查看已有的数据源类型 <br>
  10 +![img2](../picture/datasource/img_2.png) <br>
  11 +![img3](../picture/datasource/img_3.png) <br>
  12 +
  13 +```text
  14 +可以在此页面进行新增数据源配置,也可以去数据库中增加你需要的数据源类型。
  15 +表aj_report.gaea_dict_item,字段dict_code:SOURCE_TYPE
  16 +表aj_report.gaea_dict_item, item_extend字段是下拉选择后动态表单渲染的json数据
  17 +```
  18 +
  19 +## 操作
  20 +
  21 +- 只有测试通过的数据源才可以保存
  22 + ![An image](../picture/datasource/img.png)
  23 +
  24 +## 扩展
  25 +
  26 +- 以kudu impala 为例,在lib文件夹下加入kudu impala相关的JDBC连接相关的包,如图在数据库中新增数据源类型,参考数据源类型(上方)
  27 +
  28 +![An image](../picture/datasource/kudu-impala-lib.png)
  29 +
  30 +
  31 +
  32 +
  1 +# 介绍
  2 +
  3 +execl报表基于Luckysheet开发,[Luckysheet](https://gitee.com/mengshukeji/Luckysheet) 一款纯前端类似excel的在线表格,功能强大、配置简单、完全开源。
  4 +**注意:** execl报表目前只是简单集成,如果你遇到了一些问题请在此[Issue](https://gitee.com/anji-plus/report/issues/I4CEWV) 下面进行回复。<br>
  5 +
  6 +## 表格报表设计
  7 +
  8 +进入表格设计方法1: <br>
  9 +从报表管理模块选择需要设计的大屏,按图示进入大屏设计界面 <br>
  10 +![img](../picture/execl/img.png) <br>
  11 +
  12 +进入大屏设计方法2: <br>
  13 +从大屏报表模块选择需要设计的大屏,按图示进入大屏设计界面 <br>
  14 +![img2](../picture/execl/img_1.png) <br>
  15 +
  16 +## 简介
  17 +
  18 +![img3](../picture/execl/img_2.png) <br>
  19 +
  20 +## 使用
  21 +
  22 +**注**:不建议一列中同时存在俩个字段数据,同时一列值也建议不要存到超大数据量,肯定无法显示的<br>
  23 +![img4](../picture/execl/img_3.png) <br>
  24 +
  25 +## 预览/保存
  26 +
  27 +点击保存,则会将数据写入到库中。<br>
  28 +点击预览,则进入预览界面。<br>
  29 +![img](../picture/execl/img_4.png) <br>
  30 +
  31 +## 预览界面
  32 +
  33 +可以进行导出操作。<br>
  34 +![img](../picture/execl/img_5.png) <br>
  1 +**注:导入导出目前是初始版本,报错没有细化,如果导入导出过程中页面无反应,请F12**
  2 +**注:“导入成功/失败”的提示不一定对应当前真实导入导出情况,请根据实际导入导出的结果进行判断**
  3 +
  4 +## 导出
  5 +
  6 +![img](../picture/imexport/img.png) <br>
  7 +导出会生成zip文件,包含图表、样式、图片等,不会带有该大屏的名称和code。<br>
  8 +
  9 +### 导出数据集
  10 +
  11 +适用于同一系统内部使用
  12 +
  13 +### 导出不含有数据集
  14 +
  15 +导出的图表会使用默认的静态数据集,适用于跨系统,请注意,如果你的大屏图表有部分图表是在对方系统不存在的,那么目前整个大屏是不会显示出来的,后续会进行兼容,不存在的图表留空。<br>
  16 +
  17 +## 导入
  18 +
  19 +![img1](../picture/imexport/img_1.png) <br>
  20 +选择一个导出的zip文件导入即可。注意,导入会覆盖当前大屏,请新建一张空白的大屏进行导入。<br>
  21 +**注:如果你导入的大屏中含有你当前系统不存在的图表,整个大屏是不会显示的。** <br>
  22 +
  23 +## 导入导出权限
  24 +
  25 +请查看权限控制模块中关于导入导出权限的说明。 <br>
  1 +- 使用Maven Install打包时报错 <br>
  2 + ![img.png](../picture/qusetion/img.png) <br>
  3 + 请使用Maven Package进行打包 <br>
  4 +
  5 +### 版本问题:[开发环境参考](https://report.anji-plus.com/report-doc/guide/quicklyDevelop.html)
  6 +
  7 +- 底层数据库为Mysql8.0+时,flyway执行SQL报错<br>
  8 +- Node.js是V16版本时 npm install失败 <br>
  9 +- jdk使用1.7或者11及以上时,编译打包不过 <br>
  10 + ![img](../picture/qusetion/img_1.png) <br>
  11 +
  12 +- MssSqlServer 2014及其上下版本数据源测试不过。以2014版本为例。 <br>
  13 + ![img](../picture/qusetion/img_2.png) <br>
  14 + 将1.2.6改成1.2.0 <br>
  15 +
  16 +- 浏览器兼容性 当前未对部分浏览器做兼容性适配,推荐使用谷歌浏览器进行访问。<br>
  17 +
  18 +- 部署完进入系统,点击预览大屏,大屏提示:“执行sql失败“ <br>
  19 + ![img](../picture/qusetion/img_3.png) <br>
  20 + 请先重置mysql数据源,将mysql数据源的账号密码修改为你当前系统的账号密码。<br>
  21 +
  22 +- flyway执行报错1.0.10sql失败 <br>
  23 + 错误提示:Caused by: org.flywaydb.core.api.FlywayException: Validate failed: Detected failed <br>
  24 + migration to version 1.0.10 (create report share) <br>
  25 + 请参考此 [Issue](https://gitee.com/anji-plus/report/issues/I47JNE) 解决此问题 <br>
  26 +
  27 +- 禁用flyway及切换底层数据库方案 <br>
  28 + [链接](https://my.oschina.net/u/4517014/blog/5269319) <br>
  29 +
  30 +- 数据源数据集用法总结 <br>
  31 + [链接](https://my.oschina.net/u/4517014/blog/5270828) <br>
  32 +
  33 +### 执行源码编译脚本(build.sh)报错
  34 +
  35 +- 提示:“*** report-ui/dist/* *** No such file or directory” <br>
  36 + 前端编译失败。<br>
  37 + 99%的原因是Node.js版本过高(高于14),导致前端编译失败,Nodejs在编译执行初始化时会去下载一些依赖,如果依赖下载不来,也会导致失败。<br>
  38 + 剩下极少数情况可能是你编译的linux系统问题。<br>
  39 +
  40 +- 提示:“report-core/target/aj-report-*.zip *** No such file or directory” <br>
  41 + 后端编译失败。<br>
  42 + 可能原因有:Mvn版本过低/过高,导致后端编译失败 <br>
  43 +
  44 +- 使用eclipse进行源码编译时失败 <br>
  45 + 失败的提示有很多,这里建议换成IDEA <br>
  46 +
  47 +- 使用IDEA进行源码编译时提示:“*** openjdk-***<br>
  48 + 请使用jdk1.8
  49 +
  50 +### 启动服务报错
  51 +
  52 +- 提示“xxx The driver has not received any packets from the server” <br>
  53 + 连不上mysql。<br>
  54 + 1、确保软件打包正常 <br>
  55 + 2、mysql版本不兼容,详细看上面关于版本兼容性 <br>
  56 + 3、bootstrap.yml中配置的mysql地址ip不对 <br>
  57 +
  58 +
  59 +- 提示“404” <br>
  60 + 1、确保访问地址无误,根据部署方式的不同9095/9528 端口皆可以进入项目,如果一个不行试另一个端口 <br>
  61 + 2、确定前端是否启动 <br>
  62 + 3、确定后端是否启动 br>
  63 +
  64 +
  65 +
  66 +
  1 +## 核心技术
  2 +
  3 +### 底层依赖
  4 +
  5 +- [Mysql] 5.7
  6 +- [Jdk] 1.8
  7 +
  8 +### 后端
  9 +
  10 +- [Spring Boot](https://spring.io/projects/spring-boot/): Spring Boot是一款开箱即用框架,让我们的Spring应用变的更轻量化、更快的入门。
  11 + 在主程序执行main函数就可以运行。你也可以打包你的应用为jar并通过使用java -jar来运行你的Web应用;
  12 +- [Mybatis-plus](https://mp.baomidou.com/): MyBatis-plus(简称 MP)是一个 MyBatis (opens new window) 的增强工具。
  13 +- [flyway](https://flywaydb.org/): 主要用于在你的应用版本不断升级的同时,升级你的数据库结构和里面的数据
  14 +
  15 +### 前端
  16 +
  17 +- [npm](https://www.npmjs.com/):node.js的包管理工具,用于统一管理我们前端项目中需要用到的包、插件、工具、命令等,便于开发和维护。
  18 +- [webpack](https://webpack.docschina.org/):用于现代 JavaScript 应用程序的_静态模块打包工具
  19 +- [ES6](https://es6.ruanyifeng.com/):Javascript的新版本,ECMAScript6的简称。利用ES6我们可以简化我们的JS代码,同时利用其提供的强大功能来快速实现JS逻辑。
  20 +- [vue-cli](https://cli.vuejs.org/):Vue的脚手架工具,用于自动生成Vue项目的目录及文件。
  21 +- [vue-router](https://router.vuejs.org/): Vue提供的前端路由工具,利用其我们实现页面的路由控制,局部刷新及按需加载,构建单页应用,实现前后端分离。
  22 +- [vuex](https://vuex.vuejs.org/):Vue提供的状态管理工具,用于统一管理我们项目中各种数据的交互和重用,存储我们需要用到数据对象。
  23 +- [element-ui](https://element.eleme.cn/#/zh-CN):基于MVVM框架Vue开源出来的一套前端ui组件。
  24 +- [avue](https://www.avuejs.com/): 用该组件包裹后可以变成拖拽组件,采用相对于父类绝对定位;用键盘的上下左右也可以控制移
  25 +
  26 +## 开发环境
  27 +
  28 +这里提供我们的开发环境版本进行参考
  29 +
  30 +- [CentOs] 7.5
  31 +- [Mysql] 5.7
  32 +- [Jdk] 1.8
  33 +- [Spring Boot] 2.3.5
  34 +- [Mybatis-plus] 3.3.2
  35 +- [flyway] 5.2.1
  36 +- [Apache Maven] 3.5
  37 +- [Node.js] 14.16.0
  38 +- [Windows 10]
  39 +
  40 +已知 **Mysql8.0****Jdk11** (部分小版本)会出现兼容性问题,后续有解决方法将会在下方 **其他** 大类进行补充
  41 +
  42 +## SQL初始化
  43 +
  44 +sql文件的地址是:report-core --> src --> main --> resources -- > db.migration <br>
  45 +![sql](../picture/quickly/img_13.png)
  46 +
  47 +系统初始化时flyway会自动的将该目录下的sql文件执行,不需要手动执行sql文件。 <br>
  48 +执行完将会创建 aj_report(存放系统基础数据) 和 aj_report_init(存放示例数据) 俩个库。 <br>
  1 +```
  2 + 第一步,下载zip包,解压<br>
  3 + 第二步,conf->bootstrap.yml,修改mysql连接<br>
  4 + 第三步,启动bin目录下start.sh<br>
  5 + 第四步,访问 http://localhost:9095
  6 +```
  7 +
  8 +## 下载发行版
  9 +
  10 +[下载地址](https://gitee.com/anji-plus/report/releases) :https://gitee.com/anji-plus/report/releases <br>
  11 +![img.png](../picture/quickly/img_16.png) <br>
  12 +
  13 +## 修改mysql连接
  14 +
  15 +解压下载好的Zip包,找到bootstrap.yml <br>
  16 +![img_1.png](../picture/quickly/img_17.png) <br>
  17 +
  18 +将图中关于mysql的连接配置信息换成你使用的IP <br>
  19 +**注**:aj_report库是存放底层基础信息的库,flyway启动时会自动建立,如果你在这里修改了库,将会出错 <br>
  20 +
  21 +![bootstrap.png](../picture/quickly/img_2.png) <br>
  22 +**注**:请确认你的Mysql是否支持远程连接,登陆用户是否有DDL权限 <br>
  23 +
  24 +## 上传功能
  25 +
  26 +使用上传功能,必须修改此内容 <br>
  27 +![file.png](../picture/quickly/img_15.png) <br>
  28 +
  29 +## 启动
  30 +
  31 +linux启动:<br>
  32 +aj-report-XXX --> bin -->sh start.sh <br>
  33 +
  34 +windows启动:<br>
  35 +aj-report-XXX --> bin --> start.bat <br>
  36 +
  37 +![img18](../picture/quickly/img_18.png) <br>
  38 +
  39 +如果start.bat启动有问题的话,可以尝试以下方法解决。<br>
  40 +修改第4行的JAVA_HOME,改成你自己的JAVA_HOME,并去掉**rem**注释,双击启动<br>
  41 +![java.png](../picture/quickly/img_7.png) <br>
  42 +**注**:如果你JAVA_HOME目录存在空格,将bat文件最下面的JAVA_HOME添加""号
  43 +![img.png](../picture/quickly/img_8.png) <br>
  44 +
  45 +## 访问
  46 +
  47 +http://localhost:9095 <br>
  48 +默认密码:admin 123456 <br>
  49 +
  50 +## 重置mysql连接
  51 +
  52 +登陆进来后请修改mysql数据源 <br>
  53 +数据源 --> mysql数据源 --> 编辑 --> 修改用户名密码(改成你自己系统mysql的用户名密码) <br>
  54 +![img](../picture/quickly/img_14.png) <br>
  55 +![img_6.png](../picture/quickly/img_6.png) <br>
  56 +
  57 +
  1 +**前后端分离:请对自己有动手能力的小伙伴进行尝试**
  2 +**请根据自己的实际情况对下面的步骤和内容进行调整**
  3 +
  4 +```
  5 +linux:
  6 +git clone https://gitee.com/anji-plus/report.git
  7 +后端:report-code :
  8 +修改bootstrap.yml
  9 +maven package
  10 +java -jar
  11 +
  12 +前端:report-ui :
  13 +修改前端config连接
  14 +BASE_API: '"./"',改成自己后端的api
  15 +npm install
  16 +npm run build
  17 +```
  18 +
  19 +## linux部署后端
  20 +
  21 +### 编译环境
  22 +
  23 +- [Apache Maven] 3.5 <br>
  24 +- [Node.js] v14.16.0 <br>
  25 +- [Jdk] 1.8 <br>
  26 + 请在你的Windows上先准备好maven、node.js、jdk <br>
  27 + **注**:已知 **Jdk11** (部分小版本)存在兼容性问题,请不要使用openJdk,环境问题请看 **常见问题** 大类 <br>
  28 +
  29 +### 克隆源码
  30 +
  31 +git clone https://gitee.com/anji-plus/report.git <br>
  32 +![img9.png](../picture/quickly/img_9.png) <br>
  33 +**注**:不要下载发行版里面的 Source Code.zip <br>
  34 +
  35 +### 修改mysql连接
  36 +
  37 +report-core --> src --> main --> resources --> bootstrap.yml <br>
  38 +![bootstrap.png](../picture/quickly/img_2.png) <br>
  39 +将图中关于mysql的连接配置信息换成你使用的IP <br>
  40 +**注**:aj_report库是存放底层基础信息的库,flyway启动时会自动建立,如果你在这里修改了库,将会出错<br>
  41 +**注**:请确认你的Mysql是否支持远程连接,登陆用户是否有DDL权限 <br>
  42 +
  43 +### 上传功能
  44 +
  45 +使用上传功能,必须修改此内容 <br>
  46 +![file.png](../picture/quickly/img_15.png) <br>
  47 +
  48 +### maven打包
  49 +
  50 +使用 maven package <br>
  51 +**注**:不要使用maven install <br>
  52 +![img10](../picture/quickly/img_10.png) <br>
  53 +
  54 +### linux启动jar包
  55 +
  56 +将上步生成的jar包上传至linux,使用java -jar命令启动 <br>
  57 +**注**:请确保你的linux有jdk <br>
  58 +
  59 +## 本地启动前端
  60 +
  61 +### 前端编译
  62 +
  63 +进入前端目录:report-ui <br>
  64 +![img11](../picture/quickly/img_11.png) <br>
  65 +执行 npm install <br>
  66 +
  67 +### 修改config
  68 +
  69 +目录地址:report-ui --> config --> dev.env.js <br>
  70 +修改你的BASE_API地址 <br>
  71 +
  72 +### 启动前端
  73 +
  74 +report-ui目录: <br>
  75 +执行 npm run dev <br>
  76 +
  77 +## 前端build
  78 +
  79 +### 前端编译
  80 +
  81 +进入前端目录:report-ui <br>
  82 +![img11](../picture/quickly/img_11.png) <br>
  83 +执行 npm install <br>
  84 +
  85 +### 修改config
  86 +
  87 +目录地址:report-ui --> config --> prod.env.js <br>
  88 +修改你的BASE_API地址,改成自己后端的api <br>
  89 +
  90 +### build
  91 +
  92 +reoprt-ui目录: <br>
  93 +执行 npm run build <br>
  94 +
  95 +生成的前端dist目录文件在report-ui下面 <br>
  96 +![img12](../picture/quickly/img_12.png) <br>
  97 +
  98 +
  1 +```
  2 +git clone https://gitee.com/anji-plus/report.git
  3 +cd report
  4 +sh build.sh
  5 +编译完成放在build文件夹 aj-report-xxxx.zip
  6 +
  7 +unzip aj-report-xxxx.zip
  8 +cd aj-report-xxxx
  9 +vim conf/bootstrap.yml 修改数据库连接、上传文件的路径以及地址
  10 +sh bin/start.sh
  11 +
  12 +访问
  13 +http://serverip:9095
  14 +```
  15 +
  16 +## 编译环境
  17 +
  18 +请在Linux上先准备好maven、node.js、jdk
  19 +
  20 +- [Apache Maven] 3.5 <br>
  21 +- [Node.js] v14.16.0 <br>
  22 +- [Jdk] 1.8 <br>
  23 + **注**:已知**Jdk11**存在兼容性问题,请不要使用openJdk,环境问题请看 **常见问题** 大类 <br>
  24 +
  25 +## 克隆源码
  26 +
  27 +git clone https://gitee.com/anji-plus/report.git <br>
  28 +![img9.png](../picture/quickly/img_9.png) <br>
  29 +**注**:不要下载发行版里面的 Source Code.zip <br>
  30 +
  31 +## build
  32 +
  33 +进入report目录,启动build.sh <br>
  34 +![img_4.png](../picture/quickly/img_4.png) <br>
  35 +编译完成后是放在当前目录下的build文件夹中:aj-report-xxxx.zip <br>
  36 +
  37 +## 修改mysql连接
  38 +
  39 +解压aj-report-xxxx.zip,找到bootstrap.yml <br>
  40 +![img_1.png](../picture/quickly/img_17.png) <br>
  41 +
  42 +将图中关于mysql的连接配置信息换成你使用的IP <br>
  43 +**注**:aj_report库是存放底层基础信息的库,flyway启动时会自动建立,如果你在这里修改了库,将会出错 <br>
  44 +
  45 +![bootstrap.png](../picture/quickly/img_2.png) <br>
  46 +**注**:请确认你的Mysql是否支持远程连接,登陆用户是否有DDL权限 <br>
  47 +
  48 +## 上传功能
  49 +
  50 +使用上传功能,必须修改此内容 <br>
  51 +![file.png](../picture/quickly/img_15.png)
  52 +
  53 +## 启动
  54 +
  55 +linux启动: <br>
  56 +aj-report-XXX --> bin --> start.sh <br>
  57 +sh bin/start.sh <br>
  58 +
  59 +注意啊,如果你在linux打包,然后在win上执行,要转化start.bat文件的格式,反之也是一样。
  60 +
  61 +## 日志位置
  62 +
  63 +看到控制台提示“The AJ-Report started!”,说明report正在启动,可以看看日志以确定程序启动到哪里了。<br>
  64 +日志的位置是:report-xxx/logs/aj-report.log <br>
  65 +
  66 +## 访问
  67 +
  68 +http://serverip:9095 <br>
  69 +默认密码:admin 123456 <br>
  70 +
  71 +## 重置mysql连接
  72 +
  73 +登陆进来后请修改mysql数据源 <br>
  74 +数据源 --> mysql数据源 --> 编辑 --> 修改用户名密码(改成你自己系统mysql的用户名密码) <br>
  75 +![img](../picture/quickly/img_14.png) <br>
  76 +![img_6.png](../picture/quickly/img_6.png) <br>
  77 +
  1 +## 新增报表
  2 +
  3 +![img](../picture/reportmanager/img.png) <br>
  4 +状态默认为已启用。