diff --git a/README.md b/README.md index 20d03306..be06d30e 100644 --- a/README.md +++ b/README.md @@ -176,7 +176,7 @@ sql文件的目录在:report-core --> src --> main --> resources -- > db.migra - nodeV16适配 - 增加省市区地图等图 - 增加基础边框样式 -- Execl报表功能增加与bug修复 +- Excel报表功能增加与bug修复 ## 已知问题 diff --git a/doc/docs/.vuepress/config.js b/doc/docs/.vuepress/config.js index 1f90f7c8..798f4419 100644 --- a/doc/docs/.vuepress/config.js +++ b/doc/docs/.vuepress/config.js @@ -54,7 +54,7 @@ module.exports = { {title: '数据集', path: '/guide/dataset'}, {title: '报表管理', path: '/guide/reportmanager'}, {title: '大屏报表', path: '/guide/dashboard'}, - {title: '表格报表', path: '/guide/execl'}, + {title: '表格报表', path: '/guide/excel'}, {title: '导入导出', path: '/guide/importexport'}, {title: '图表组件', path: '/guide/charts'}, ] diff --git a/doc/docs/guide/datasource.md b/doc/docs/guide/datasource.md index e6aa2a46..2dc5e43b 100644 --- a/doc/docs/guide/datasource.md +++ b/doc/docs/guide/datasource.md @@ -36,6 +36,7 @@ - 第二种,在pom.xml中添加
使用build.sh脚本编译或者maven package编译都可以,前端页面选择jdbc数据源,填上对应驱动。
+**注意:** 底层只实现了mysql的解析,如果你的数据库和mysql差异较大,比如一些函数、关键字和mysql是不同的用法、含义,那就需要重写底层解析代码(datasource)

### 非JDBC驱动类数据源添加 diff --git a/doc/docs/guide/execl.md b/doc/docs/guide/excel.md similarity index 69% rename from doc/docs/guide/execl.md rename to doc/docs/guide/excel.md index 6bb8c891..ef68d86f 100644 --- a/doc/docs/guide/execl.md +++ b/doc/docs/guide/excel.md @@ -1,34 +1,34 @@ # 介绍 -execl报表基于Luckysheet开发,[Luckysheet](https://gitee.com/mengshukeji/Luckysheet) 一款纯前端类似excel的在线表格,功能强大、配置简单、完全开源。 -**注意:** execl报表目前只是简单集成,如果你遇到了一些问题请在此[Issue](https://gitee.com/anji-plus/report/issues/I4CEWV) 下面进行回复。
+Excel报表基于Luckysheet开发,[Luckysheet](https://gitee.com/mengshukeji/Luckysheet) 一款纯前端类似excel的在线表格,功能强大、配置简单、完全开源。 +**注意:** Excel报表目前只是简单集成,如果你遇到了一些问题请在此[Issue](https://gitee.com/anji-plus/report/issues/I4CEWV) 下面进行回复。
## 表格报表设计 进入表格设计方法1:
从报表管理模块选择需要设计的大屏,按图示进入大屏设计界面
-![img](../picture/execl/img.png)
+![img](../picture/excel/img.png)
进入大屏设计方法2:
从大屏报表模块选择需要设计的大屏,按图示进入大屏设计界面
-![img2](../picture/execl/img_1.png)
+![img2](../picture/excel/img_1.png)
## 简介 -![img3](../picture/execl/img_2.png)
+![img3](../picture/excel/img_2.png)
## 使用 **注**:不建议一列中同时存在俩个字段数据,同时一列值也建议不要存到超大数据量,肯定无法显示的
-![img4](../picture/execl/img_3.png)
+![img4](../picture/excel/img_3.png)
## 预览/保存 点击保存,则会将数据写入到库中。
点击预览,则进入预览界面。
-![img](../picture/execl/img_4.png)
+![img](../picture/excel/img_4.png)
## 预览界面 可以进行导出操作。
-![img](../picture/execl/img_5.png)
+![img](../picture/excel/img_5.png)
diff --git a/doc/docs/guide/question.md b/doc/docs/guide/question.md index 0eb8ba97..450ea3aa 100644 --- a/doc/docs/guide/question.md +++ b/doc/docs/guide/question.md @@ -37,9 +37,11 @@
- 页面提示“404”
- 1、确保访问地址无误,根据部署方式的不同9095/9528 端口皆可以进入项目,如果一个不行试另一个端口
+ 1、确保访问地址无误,根据部署方式的不同 9095/9528 端口皆可以进入项目,如果一个不行试另一个端口
2、确定前端是否启动
- 3、确定后端是否启动 br> + 3、确定后端是否启动
+ 4、如果你是前后端分离部署,看看你前端config配置文件中的BASE_API有没有改成你后端的IP端口
+ 5、使用nginx转发遇到问题也是同上

@@ -103,7 +105,7 @@
- 文本框颜色无法改变
- 使用文本框,改变颜色,无法改变。已知有概率性的出现无法修改文本框颜色的情况,因为无法重现,暂时不能排查到是哪里问题。解决方法有以下
+ 使用文本框,改变颜色,无法改变。已知有概率性的出现无法修改文本框颜色的情况。解决方法有以下
1、保存退出大屏,重新进入大屏修改文本框颜色
2、删掉文本框,重新拖动一个
diff --git a/doc/docs/guide/quicklyDistribution.md b/doc/docs/guide/quicklyDistribution.md index 89b3a61d..3ea87cbf 100644 --- a/doc/docs/guide/quicklyDistribution.md +++ b/doc/docs/guide/quicklyDistribution.md @@ -1,7 +1,7 @@ ``` - 第一步,下载zip包,解压
- 第二步,conf->bootstrap.yml,修改mysql连接
- 第三步,启动bin目录下start.sh
+ 第一步,下载zip包,解压 + 第二步,conf->bootstrap.yml,修改mysql连接 + 第三步,启动bin目录下start.sh 第四步,访问 http://localhost:9095 ``` diff --git a/doc/docs/picture/execl/img.png b/doc/docs/picture/excel/img.png similarity index 100% rename from doc/docs/picture/execl/img.png rename to doc/docs/picture/excel/img.png diff --git a/doc/docs/picture/execl/img_1.png b/doc/docs/picture/excel/img_1.png similarity index 100% rename from doc/docs/picture/execl/img_1.png rename to doc/docs/picture/excel/img_1.png diff --git a/doc/docs/picture/execl/img_2.png b/doc/docs/picture/excel/img_2.png similarity index 100% rename from doc/docs/picture/execl/img_2.png rename to doc/docs/picture/excel/img_2.png diff --git a/doc/docs/picture/execl/img_3.png b/doc/docs/picture/excel/img_3.png similarity index 100% rename from doc/docs/picture/execl/img_3.png rename to doc/docs/picture/excel/img_3.png diff --git a/doc/docs/picture/execl/img_4.png b/doc/docs/picture/excel/img_4.png similarity index 100% rename from doc/docs/picture/execl/img_4.png rename to doc/docs/picture/excel/img_4.png diff --git a/doc/docs/picture/execl/img_5.png b/doc/docs/picture/excel/img_5.png similarity index 100% rename from doc/docs/picture/execl/img_5.png rename to doc/docs/picture/excel/img_5.png diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/service/impl/ReportExcelServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/service/impl/ReportExcelServiceImpl.java index 865dd7dd..b25832d6 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/service/impl/ReportExcelServiceImpl.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/service/impl/ReportExcelServiceImpl.java @@ -333,6 +333,9 @@ public class ReportExcelServiceImpl implements ReportExcelService { JSONObject addCell = cellDynamicData.get(j); //字段 String fieldLabel = addCell.getString(dataSet.getFieldLabel()); + if (StringUtils.isBlank(fieldLabel)) { + fieldLabel = StringUtils.EMPTY; + } String replace = v.replace("#{".concat(dataSet.getSetCode()).concat(".").concat(dataSet.getFieldLabel()).concat("}"), fieldLabel); //转字符串,解决深拷贝问题 JSONObject addCellData = JSONObject.parseObject(cellStr); diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportshare/controller/ReportShareController.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportshare/controller/ReportShareController.java index 2d030428..75881119 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportshare/controller/ReportShareController.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportshare/controller/ReportShareController.java @@ -66,4 +66,11 @@ public class ReportShareController extends GaeaBaseController import('@/views/login'), hidden: true + { + path: '/login', + component: () => import('@/views/login'), hidden: true }, - { + { path: '/aj/**', - component: () => import('@/views/bigScreenReport/aj'), - hidden: true + component: () => import('@/views/bigScreenReport/aj'), + hidden: true + }, + { + path: '/el/**', + component: () => import('@/views/excelreport/el'), + hidden: true }, { - path: '/index', - component: Layout, - name: 'index', - meta: { - title: '首页', - icon: 'iconhome2' + path: '/index', + component: Layout, + name: 'index', + meta: { + title: '首页', + icon: 'iconhome2' }, children: [ - { - path: '', - component: () => import('@/views/home/index'), - meta: { - title: '首页', - icon: 'iconhome2', - keepAlive: true, - requireAuth: true - } + { + path: '', + component: () => import('@/views/home/index'), + meta: { + title: '首页', + icon: 'iconhome2', + keepAlive: true, + requireAuth: true + } }, ] }, { - path: '/access', - name: 'access', - component: Layout, - meta: { - title: '用户权限', - icon: 'icondfzq-', + path: '/access', + name: 'access', + component: Layout, + meta: { + title: '用户权限', + icon: 'icondfzq-', requireAuth: true, - permission: 'authorityManage|roleManage|userManage' + permission: 'authorityManage|roleManage|userManage' }, children: [ - { - path: 'authority', - name: 'authority', - component: () => import('@/views/accessAuthority/index'), - meta: { - title: '权限管理', - icon: 'iconquanxian', - keepAlive: true, - requireAuth: true, + { + path: 'authority', + name: 'authority', + component: () => import('@/views/accessAuthority/index'), + meta: { + title: '权限管理', + icon: 'iconquanxian', + keepAlive: true, + requireAuth: true, permission: 'authorityManage' - } + } }, - { - path: 'role', - name: 'role', - component: () => import('@/views/accessRole/index'), - meta: { - title: '角色管理', - icon: 'iconjiaose1', - keepAlive: true, - requireAuth: true, + { + path: 'role', + name: 'role', + component: () => import('@/views/accessRole/index'), + meta: { + title: '角色管理', + icon: 'iconjiaose1', + keepAlive: true, + requireAuth: true, permission: 'roleManage' - } + } }, - { - path: 'user', - name: 'user', - component: () => import('@/views/accessUser/index'), - meta: { - title: '用户管理', - icon: 'iconyonghu', - keepAlive: true, - requireAuth: true, + { + path: 'user', + name: 'user', + component: () => import('@/views/accessUser/index'), + meta: { + title: '用户管理', + icon: 'iconyonghu', + keepAlive: true, + requireAuth: true, permission: 'userManage' - } + } }, ] }, { - path: '/report', - name: 'report', - component: Layout, - meta: { - title: '报表设计', - icon: 'iconnavicon-ywcs', - requireAuth: true, - permission: 'datasourceManage|resultsetManage|reportManage|bigScreenManage' + path: '/report', + name: 'report', + component: Layout, + meta: { + title: '报表设计', + icon: 'iconnavicon-ywcs', + requireAuth: true, + permission: 'datasourceManage|resultsetManage|reportManage|bigScreenManage' }, children: [ - { - path: 'datasource', - name: 'datasource', - component: () => import('@/views/datasource/index'), - meta: { - title: '数据源', - icon: 'icondatabase', - keepAlive: true, - requireAuth: true, + { + path: 'datasource', + name: 'datasource', + component: () => import('@/views/datasource/index'), + meta: { + title: '数据源', + icon: 'icondatabase', + keepAlive: true, + requireAuth: true, permission: 'datasourceManage' - } + } }, - { - path: 'resultset', - name: 'resultset', + { + path: 'resultset', + name: 'resultset', component: () => import('@/views/resultset/index'), - meta: { - title: '数据集', - icon: 'iconAPIwangguan', - keepAlive: true, - requireAuth: true, + meta: { + title: '数据集', + icon: 'iconAPIwangguan', + keepAlive: true, + requireAuth: true, permission: 'resultsetManage' - } + } }, - { - path: 'report', - name: 'reportIndex', - component: () => import('@/views/reportManage/index'), - meta: { - title: '报表管理', - icon: 'iconnavicon-ywcs', - keepAlive: true, - requireAuth: true, + { + path: 'report', + name: 'reportIndex', + component: () => import('@/views/reportManage/index'), + meta: { + title: '报表管理', + icon: 'iconnavicon-ywcs', + keepAlive: true, + requireAuth: true, permission: 'reportManage' - } + } }, - { - path: 'bigscreen', - name: 'bigscreen', - component: () => import('@/views/bigScreenReport/index'), - meta: { - title: '大屏报表', - icon: 'iconchufaqipeizhi-hui', - keepAlive: true, - requireAuth: true, + { + path: 'bigscreen', + name: 'bigscreen', + component: () => import('@/views/bigScreenReport/index'), + meta: { + title: '大屏报表', + icon: 'iconchufaqipeizhi-hui', + keepAlive: true, + requireAuth: true, permission: 'bigScreenManage' - }, + }, }, - { - path: 'excelreport', - name: 'excelreport', - component: () => import('@/views/excelreport/index'), - meta: { - title: '表格报表', - icon: 'iconliebiao', - keepAlive: true, - requireAuth: true, + { + path: 'excelreport', + name: 'excelreport', + component: () => import('@/views/excelreport/index'), + meta: { + title: '表格报表', + icon: 'iconliebiao', + keepAlive: true, + requireAuth: true, permission: 'excelManage' - } + } + }, + { + path: 'reportshare', + name: 'reportshare', + component: () => import('@/views/reportShare/index'), + meta: { + title: '报表分享', + icon: 'iconfenxiang1', + keepAlive: true, + requireAuth: true, + permission: 'reportShareManage' + } }, ] }, { - path: '/system', - name: 'system', - component: Layout, - meta: { - title: '系统设置', - icon: 'iconshezhi', - requireAuth: true, - permission: 'fileManage|dictManage|dictItemManage' + path: '/system', + name: 'system', + component: Layout, + meta: { + title: '系统设置', + icon: 'iconshezhi', + requireAuth: true, + permission: 'fileManage|dictManage|dictItemManage' }, children: [ - { - path: 'file', - name: 'file', - component: () => import('@/views/fileManagement/index'), - meta: { - title: '文件管理', - icon: 'iconfill_folder', - keepAlive: true, - requireAuth: true, + { + path: 'file', + name: 'file', + component: () => import('@/views/fileManagement/index'), + meta: { + title: '文件管理', + icon: 'iconfill_folder', + keepAlive: true, + requireAuth: true, permission: 'fileManage' - } + } }, - { - path: 'dict', - name: 'dict', - component: () => import('@/views/dict/index'), - meta: { - title: '数据字典', - icon: 'iconzidian', - keepAlive: true, - requireAuth: true, + { + path: 'dict', + name: 'dict', + component: () => import('@/views/dict/index'), + meta: { + title: '数据字典', + icon: 'iconzidian', + keepAlive: true, + requireAuth: true, permission: 'dictManage' - } + } }, - { - path: 'dictItem', - name: 'dictItem', - component: () => import('@/views/dict/dict-item'), - hidden: true, - meta: { - title: '字典项', - icon: 'iconzidianxiang', - keepAlive: true, - requireAuth: true, + { + path: 'dictItem', + name: 'dictItem', + component: () => import('@/views/dict/dict-item'), + hidden: true, + meta: { + title: '字典项', + icon: 'iconzidianxiang', + keepAlive: true, + requireAuth: true, permission: 'dictItemManage' - } + } }, ] }, - { - path: '/bigscreen/viewer', - component: () => import('@/views/bigscreenDesigner/viewer'), - hidden: true, - meta: { - requireAuth: true + { + path: '/bigscreen/viewer', + component: () => import('@/views/bigscreenDesigner/viewer'), + hidden: true, + meta: { + requireAuth: true } }, - { - path: '/bigscreen/designer', - component: () => import('@/views/bigscreenDesigner/designer'), - hidden: true, - meta: { - requireAuth: true + { + path: '/bigscreen/designer', + component: () => import('@/views/bigscreenDesigner/designer'), + hidden: true, + meta: { + requireAuth: true } }, - { - path: '/excelreport/viewer', - component: () => import('@/views/excelreport/viewer'), - hidden: true, - meta: { - requireAuth: true + { + path: '/excelreport/viewer', + component: () => import('@/views/excelreport/viewer'), + hidden: true, + meta: { + requireAuth: true } }, - { - path: '/excelreport/designer', - component: () => import('@/views/excelreport/designer'), - hidden: true, - meta: { - requireAuth: true + { + path: '/excelreport/designer', + component: () => import('@/views/excelreport/designer'), + hidden: true, + meta: { + requireAuth: true } }, // 重写大屏 { - path: '/screenDesigner', + path: '/screenDesigner', component: () => import('@/views/screenDesigner/index'), - name: 'screenDesigner', + name: 'screenDesigner', }, { - path: '/screen/preview', - component: () => import('@/views/screenDesigner/preview'), - hidden: true, - meta: { - requireAuth: true + path: '/screen/preview', + component: () => import('@/views/screenDesigner/preview'), + hidden: true, + meta: { + requireAuth: true } }, - { - path: '/404', - component: () => import('@/views/404'), - hidden: true + { + path: '/404', + component: () => import('@/views/404'), + hidden: true }, - { - path: '*', - redirect: '/login', - hidden: true + { + path: '*', + redirect: '/login', + hidden: true }, ] diff --git a/report-ui/src/utils/china.js b/report-ui/src/utils/china.js index 467d8912..cfb394dc 100644 --- a/report-ui/src/utils/china.js +++ b/report-ui/src/utils/china.js @@ -356,7 +356,7 @@ export const conversionCity = { 甘孜藏族自治州: [101.9623, 30.0495], 阿坝藏族羌族自治州: [102.2245, 31.8994], 雅安市: [103.0415, 30.0099], - 天津城区: [117.1901, 39.1255], + 天津市: [117.2015, 39.0853], 赣州市: [114.9334, 25.8311], 景德镇市: [117.1848, 29.2744], 萍乡市: [113.8871, 27.6587], diff --git a/report-ui/src/views/bigScreenReport/components/share.vue b/report-ui/src/views/bigScreenReport/components/share.vue index 04bf6166..7245e818 100644 --- a/report-ui/src/views/bigScreenReport/components/share.vue +++ b/report-ui/src/views/bigScreenReport/components/share.vue @@ -114,6 +114,13 @@ export default { default: () => { return ""; } + }, + reportType: { + required : true, + type: String, + default: () =>{ + return ""; + } } }, data() { @@ -124,6 +131,7 @@ export default { dialogForm: { shareValidType: 0, reportCode: "", + reportType: "", shareUrl: "", shareCode: "", sharePassword: "", @@ -164,12 +172,11 @@ export default { this.dialogForm.sharePassword = ""; }, async createShare() { + this.dialogForm.reportType = this.reportType; this.dialogForm.reportCode = this.reportCode; this.dialogForm.shareUrl = window.location.href; - // console.log(this.dialogForm) const { code, data } = await reportShareAdd(this.dialogForm); if (code != "200") return; - // console.log(data) this.shareLinkFlag1 = false; this.$message({ message: "创建链接成功!", diff --git a/report-ui/src/views/bigScreenReport/index.vue b/report-ui/src/views/bigScreenReport/index.vue index e1db14e6..6f911441 100644 --- a/report-ui/src/views/bigScreenReport/index.vue +++ b/report-ui/src/views/bigScreenReport/index.vue @@ -101,6 +101,7 @@ :visib="visibleForShareDialog" :reportCode="reportCodeForShareDialog" :reportName="reportNameForShareDialog" + :reportType="reportTypeForShareDialog" @handleClose="visibleForShareDialog = false" /> @@ -130,7 +131,8 @@ export default { // 分享 visibleForShareDialog: false, reportCodeForShareDialog: "", - reportNameForShareDialog: "" + reportNameForShareDialog: "", + reportTypeForShareDialog: "", }; }, mounted() {}, @@ -176,10 +178,12 @@ export default { share(val) { this.reportCodeForShareDialog = val.reportCode; this.reportNameForShareDialog = val.reportName; + this.reportTypeForShareDialog = val.reportType; this.visibleForShareDialog = true; }, openDesign(val) { let routeUrl = this.$router.resolve({ + //path: "/screenDesigner", path: "/bigscreen/designer", query: { reportCode: val.reportCode diff --git a/report-ui/src/views/bigscreenDesigner/designer/tools/configure/widget-more-bar-line.js b/report-ui/src/views/bigscreenDesigner/designer/tools/configure/widget-more-bar-line.js index c85aa512..5f533812 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/tools/configure/widget-more-bar-line.js +++ b/report-ui/src/views/bigscreenDesigner/designer/tools/configure/widget-more-bar-line.js @@ -420,7 +420,7 @@ export const widgetMoreBarLine = { { type: 'el-input-number', label: '左坐标字号', - name: 'namefontSizeYLeft', + name: 'nameFontSizeYLeft', required: false, placeholder: '', value: 14, @@ -452,7 +452,7 @@ export const widgetMoreBarLine = { { type: 'el-input-number', label: '右坐标字号', - name: 'namefontSizeYRight', + name: 'nameFontSizeYRight', required: false, placeholder: '', value: 14, @@ -650,7 +650,6 @@ export const widgetMoreBarLine = { required: false, value: [ {color: '#4bdfff'}, - {color: '#5dc1fd'}, {color: '#55f49c'}, {color: '#ffa43a'}, ], @@ -697,14 +696,14 @@ export const widgetMoreBarLine = { relactiveDom: 'dataType', relactiveDomValue: 'staticData', value: [ - {"date": "2014", "unsales": 400, "manus": 300, "rework": 400, "sales": 4.2,}, - {"date": "2015", "unsales": 400, "manus": 500, "rework": 300, "sales": 3.6,}, - {"date": "2016", "unsales": 300, "manus": 500, "rework": 500, "sales": 5.8,}, - {"date": "2017", "unsales": 300, "manus": 500, "rework": 700, "sales": 3.4,}, - {"date": "2018", "unsales": 400, "manus": 400, "rework": 1000, "sales": 2.5,}, - {"date": "2019", "unsales": 400, "manus": 500, "rework": 500, "sales": 5.8,}, - {"date": "2020", "unsales": 300, "manus": 400, "rework": 600, "sales": 7.6,}, - {"date": "2021", "unsales": 300, "manus": 600, "rework": 400, "sales": 3.4,}, + {"date": "2014", "unsales": 400, "manus": 300, "sales": 4.2,}, + {"date": "2015", "unsales": 400, "manus": 500, "sales": 3.6,}, + {"date": "2016", "unsales": 300, "manus": 500, "sales": 5.8,}, + {"date": "2017", "unsales": 300, "manus": 500, "sales": 3.4,}, + {"date": "2018", "unsales": 400, "manus": 400, "sales": 2.5,}, + {"date": "2019", "unsales": 400, "manus": 500, "sales": 5.8,}, + {"date": "2020", "unsales": 300, "manus": 400, "sales": 7.6,}, + {"date": "2021", "unsales": 300, "manus": 600, "sales": 3.4,}, ] }, { diff --git a/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetMoreBarLineChart.vue b/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetMoreBarLineChart.vue index c2b8f485..18f74edc 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetMoreBarLineChart.vue +++ b/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetMoreBarLineChart.vue @@ -80,7 +80,6 @@ export default { nameTextStyle: { color: '#666666' }, - position: 'right', axisLine: { lineStyle: { color: '#cdd5e2' @@ -283,9 +282,9 @@ export default { type: 'value', show: optionsSetup.isShowYLeft, // 坐标轴是否显示 name: optionsSetup.textNameYLeft, // 坐标轴名称 - nameTextStyle: { // 别名 + nameTextStyle: { //颜色字号 color: optionsSetup.nameColorYLeft, - fontSize: optionsSetup.namefontSizeYLeft + fontSize: optionsSetup.nameFontSizeYLeft }, axisLabel: { show: true, @@ -295,7 +294,7 @@ export default { } }, axisLine: { - show: optionsSetup.isShowYLeft, + show: true, lineStyle: { color: optionsSetup.lineColorY } @@ -306,12 +305,11 @@ export default { }, { type: 'value', - position: 'right', show: optionsSetup.isShowYRight, // 坐标轴是否显示 name: optionsSetup.textNameYRight, // 坐标轴名称 - nameTextStyle: { // 别名 + nameTextStyle: { // 颜色字号 color: optionsSetup.nameColorYRight, - fontSize: optionsSetup.namefontSizeYRight + fontSize: optionsSetup.nameFontSizeYRight }, axisLabel: { show: true, @@ -321,7 +319,7 @@ export default { } }, axisLine: { - show: optionsSetup.isShowYRight, + show: true, lineStyle: { color: optionsSetup.lineColorY } @@ -423,13 +421,11 @@ export default { let axis = []; let bar1 = []; let bar2 = []; - let bar3 = []; let line = []; for (const i in val) { axis[i] = val[i].date; bar1[i] = val[i].unsales; bar2[i] = val[i].manus; - bar3[i] = val[i].rework; line[i] = val[i].sales; } // x轴 @@ -476,12 +472,10 @@ export default { } series[0].data = bar1; series[1].data = bar2; - series[2].data = bar3; series[3].data = line; const legendName = []; legendName.push('调解成功'); legendName.push('调解失败'); - legendName.push('调解终止'); legendName.push('调解成功率'); this.options.legend['data'] = legendName; this.setOptionsLegendName(legendName); diff --git a/report-ui/src/views/excelreport/components/share.vue b/report-ui/src/views/excelreport/components/share.vue index 2339f6aa..2fd596c6 100644 --- a/report-ui/src/views/excelreport/components/share.vue +++ b/report-ui/src/views/excelreport/components/share.vue @@ -54,7 +54,11 @@ - + @@ -110,6 +114,13 @@ export default { default: () => { return ""; } + }, + reportType: { + required : true, + type: String, + default: () =>{ + return ""; + } } }, data() { @@ -120,6 +131,7 @@ export default { dialogForm: { shareValidType: 0, reportCode: "", + reportType: "", shareUrl: "", shareCode: "", sharePassword: "", @@ -160,12 +172,12 @@ export default { this.dialogForm.sharePassword = ""; }, async createShare() { + this.dialogForm.reportType = this.reportType; this.dialogForm.reportCode = this.reportCode; this.dialogForm.shareUrl = window.location.href; - // console.log(this.dialogForm) + console.log(this.dialogForm) const { code, data } = await reportShareAdd(this.dialogForm); if (code != "200") return; - // console.log(data) this.shareLinkFlag1 = false; this.$message({ message: "创建链接成功!", diff --git a/report-ui/src/views/excelreport/el/index.vue b/report-ui/src/views/excelreport/el/index.vue new file mode 100644 index 00000000..457ac387 --- /dev/null +++ b/report-ui/src/views/excelreport/el/index.vue @@ -0,0 +1,85 @@ + + + diff --git a/report-ui/src/views/excelreport/index.vue b/report-ui/src/views/excelreport/index.vue index fe9a9a95..a8ff8aca 100644 --- a/report-ui/src/views/excelreport/index.vue +++ b/report-ui/src/views/excelreport/index.vue @@ -101,6 +101,7 @@ :visib="visibleForShareDialog" :reportCode="reportCodeForShareDialog" :reportName="reportNameForShareDialog" + :reportType="reportTypeForShareDialog" @handleClose="visibleForShareDialog = false" /> @@ -130,7 +131,8 @@ export default { // 分享 visibleForShareDialog: false, reportCodeForShareDialog: "", - reportNameForShareDialog: "" + reportNameForShareDialog: "", + reportTypeForShareDialog: "" }; }, mounted() {}, @@ -174,12 +176,9 @@ export default { }, // 分享 share(val) { - //excel暂不支持 - this.$message.warning("暂不支持excel报表分享"); - return; - this.reportCodeForShareDialog = val.reportCode; this.reportNameForShareDialog = val.reportName; + this.reportTypeForShareDialog = val.reportType; this.visibleForShareDialog = true; }, openDesign(val) { diff --git a/report-ui/src/views/layout/components/Navbar.vue b/report-ui/src/views/layout/components/Navbar.vue index e980f7eb..7fd42b9b 100644 --- a/report-ui/src/views/layout/components/Navbar.vue +++ b/report-ui/src/views/layout/components/Navbar.vue @@ -7,21 +7,36 @@ class="hamburger-container" /> - -
- - {{ operatorText }} - +
+
+
说明
+
+ 文档 +
+
+ 社区 +
- - - 修改密码 - - - 注销登录 - - - + + +
+ + {{ operatorText }} + +
+ + + 修改密码 + + + 注销登录 + + +
+
+ 确 定 + + + + +
+ 个人/商业使用须遵循Apache2.0开源协议。 + 禁止将AJ-Report产品用于违法违规业务。 +
+ + 确 定 + +
@@ -127,7 +166,10 @@ export default { confirmPassword: [ { required: true, validator: validatePass3, trigger: "blur" } ] - } + }, + + // 说明 + centerDialogVisible: false }; }, components: { @@ -204,6 +246,8 @@ export default { line-height: 50px; border-radius: 0px !important; background: #fff !important; + display: flex; + flex-direction: row; .hamburger-container { line-height: 57px; height: 49px; @@ -217,15 +261,25 @@ export default { top: 16px; color: red; } + .right-menu { + position: absolute; + right: 35px; + display: flex; + .item-men { + display: flex; + flex-direction: row; + .item { + margin-right: 60px; + cursor: pointer; + } + } + } .avatar-container { height: 50px; display: inline-block; - position: absolute; - right: 35px; .avatar-wrapper { line-height: 50px; cursor: pointer; - margin-top: 5px; position: relative; .user-avatar { width: 40px; diff --git a/report-ui/src/views/layout/components/Sidebar/index.vue b/report-ui/src/views/layout/components/Sidebar/index.vue index 8b1bc139..1aea2547 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.7.3 + V0.9.8
@@ -142,7 +182,8 @@ export default { loading: false, redirect: undefined, otherQuery: {}, - needCaptcha: false + needCaptcha: false, + centerDialogVisible: false }; }, watch: { @@ -314,10 +355,47 @@ export default { height: 60px; padding: 10px 60px; display: flex; + justify-content: space-between; align-items: center; - img { - width: 10%; - display: block; + .left { + display: flex; + flex-direction: row; + .box { + width: 40px; + height: 40px; + margin-top: 6px; + img { + width: 100%; + height: 100%; + } + } + .name { + font-size: 20px; + font-weight: bold; + padding-bottom: 5px; + margin-left: 10px; + border-left: 1px solid #ccc; + padding-top: 14px; + padding-left: 10px; + } + .box1 { + width: 100px; + margin-left: 40px; + cursor: pointer; + img { + width: 100%; + margin-top: 10px; + margin-left: 10px; + } + } + } + .right { + display: flex; + flex-direction: row; + .item { + margin-right: 60px; + cursor: pointer; + } } } .login_contant { diff --git a/report-ui/src/views/reportManage/components/share.vue b/report-ui/src/views/reportManage/components/share.vue index 04bf6166..e9825940 100644 --- a/report-ui/src/views/reportManage/components/share.vue +++ b/report-ui/src/views/reportManage/components/share.vue @@ -114,6 +114,13 @@ export default { default: () => { return ""; } + }, + reportType: { + required: true, + type: String, + default:() =>{ + return ""; + } } }, data() { @@ -124,6 +131,7 @@ export default { dialogForm: { shareValidType: 0, reportCode: "", + reportType: "", shareUrl: "", shareCode: "", sharePassword: "", @@ -164,12 +172,11 @@ export default { this.dialogForm.sharePassword = ""; }, async createShare() { + this.dialogForm.reportType = this.reportType; this.dialogForm.reportCode = this.reportCode; this.dialogForm.shareUrl = window.location.href; - // console.log(this.dialogForm) const { code, data } = await reportShareAdd(this.dialogForm); if (code != "200") return; - // console.log(data) this.shareLinkFlag1 = false; this.$message({ message: "创建链接成功!", diff --git a/report-ui/src/views/reportManage/index.vue b/report-ui/src/views/reportManage/index.vue index a07f047e..c9ca2033 100644 --- a/report-ui/src/views/reportManage/index.vue +++ b/report-ui/src/views/reportManage/index.vue @@ -13,6 +13,7 @@ :visib="visibleForShareDialog" :reportCode="reportCodeForShareDialog" :reportName="reportNameForShareDialog" + :reportType="reportTypeForShareDialog" @handleClose="visibleForShareDialog = false" /> @@ -45,6 +46,7 @@ export default { visibleForShareDialog: false, reportCodeForShareDialog: "", reportNameForShareDialog: "", + reportTypeForShareDialog: "", crudOption: { // 使用菜单做为页面标题 title: "报表管理", @@ -354,13 +356,9 @@ export default { }, //分享 shareReport(val) { - if (val.reportType == "report_excel") { - //excel暂不支持 - this.$message.warning("暂不支持excel报表分享"); - return; - } this.reportCodeForShareDialog = val.reportCode; this.reportNameForShareDialog = val.reportName; + this.reportTypeForShareDialog = val.reportType; this.visibleForShareDialog = true; }, //复制 diff --git a/report-ui/src/views/reportShare/index.vue b/report-ui/src/views/reportShare/index.vue new file mode 100644 index 00000000..da330391 --- /dev/null +++ b/report-ui/src/views/reportShare/index.vue @@ -0,0 +1,259 @@ + + diff --git a/report-ui/src/views/screenDesigner/components/contentMenu.vue b/report-ui/src/views/screenDesigner/components/contentMenu.vue index 15562b1c..67a9a8ad 100644 --- a/report-ui/src/views/screenDesigner/components/contentMenu.vue +++ b/report-ui/src/views/screenDesigner/components/contentMenu.vue @@ -24,7 +24,9 @@ export default { props: { styleObj: Object, - visible: Boolean + visible: Boolean, + widgets: Array, + rightClickIndex: Number }, data() { return {}; @@ -49,7 +51,8 @@ export default { type: "warning" }) .then(() => { - this.$emit("deletelayer"); + console.log(this.rightClickIndex); + this.widgets.splice(this.rightClickIndex, 1); this.$message({ type: "success", message: "删除成功!" @@ -63,19 +66,41 @@ export default { }); }, copyLayer() { - this.$emit("copylayer"); + const obj = this.deepClone(this.widgets[this.rightClickIndex]); + this.widgets.splice(this.widgets.length, 0, obj); }, istopLayer() { - this.$emit("istopLayer"); + if (this.rightClickIndex + 1 < this.widgets.length) { + const temp = this.widgets.splice(this.rightClickIndex, 1)[0]; + this.widgets.push(temp); + } }, setlowLayer() { - this.$emit("setlowLayer"); + if (this.rightClickIndex != 0) { + this.widgets.unshift(this.widgets.splice(this.rightClickIndex, 1)[0]); + } }, moveupLayer() { - this.$emit("moveupLayer"); + if (this.rightClickIndex != 0) { + this.widgets[this.rightClickIndex] = this.widgets.splice( + this.rightClickIndex - 1, + 1, + this.widgets[this.rightClickIndex] + )[0]; + } else { + this.widgets.push(this.widgets.shift()); + } }, movedownLayer() { - this.$emit("movedownLayer"); + if (this.rightClickIndex != this.widgets.length - 1) { + this.widgets[this.rightClickIndex] = this.widgets.splice( + this.rightClickIndex + 1, + 1, + this.widgets[this.rightClickIndex] + )[0]; + } else { + this.widgets.unshift(this.widgets.splice(this.rightClickIndex, 1)[0]); + } } } }; diff --git a/report-ui/src/views/screenDesigner/config/configs.js b/report-ui/src/views/screenDesigner/config/configs.js index 0fd70315..4d9e5c8e 100644 --- a/report-ui/src/views/screenDesigner/config/configs.js +++ b/report-ui/src/views/screenDesigner/config/configs.js @@ -12,6 +12,7 @@ * 词云图:{type: 'wordCloud',tabName: '词云图'} * **/ +import { screenConfig } from './texts/screenConfig' import {widgetHref} from "./texts/widget-href" import {widgetIframe} from "./texts/widget-iframe" import {widgetImage} from "./texts/widget-image" @@ -43,6 +44,7 @@ import {widgetHeatmap} from "./heatmap/widget-heatmap"; export const widgetTool = [ + screenConfig, widgetHref, widgetIframe, widgetImage, diff --git a/report-ui/src/views/screenDesigner/config/index.js b/report-ui/src/views/screenDesigner/config/index.js index 54f3eebf..fdd99ca4 100644 --- a/report-ui/src/views/screenDesigner/config/index.js +++ b/report-ui/src/views/screenDesigner/config/index.js @@ -1,3 +1,11 @@ +/* + * @Descripttion: + * @version: + * @Author: qianlishi + * @Date: 2022-03-14 14:05:15 + * @LastEditors: qianlishi + * @LastEditTime: 2022-06-17 17:24:33 + */ import {converArr} from '../util/common' import { widgetTool } from "./configs" diff --git a/report-ui/src/views/screenDesigner/index.vue b/report-ui/src/views/screenDesigner/index.vue index f4e4747d..ba283f0d 100644 --- a/report-ui/src/views/screenDesigner/index.vue +++ b/report-ui/src/views/screenDesigner/index.vue @@ -1,218 +1,48 @@ + diff --git a/report-ui/src/views/screenDesigner/layout/leftMenu.vue b/report-ui/src/views/screenDesigner/layout/leftMenu.vue new file mode 100644 index 00000000..3f1fbe46 --- /dev/null +++ b/report-ui/src/views/screenDesigner/layout/leftMenu.vue @@ -0,0 +1,144 @@ + + + + diff --git a/report-ui/src/views/screenDesigner/layout/middleScreen.vue b/report-ui/src/views/screenDesigner/layout/middleScreen.vue new file mode 100644 index 00000000..6ee0430a --- /dev/null +++ b/report-ui/src/views/screenDesigner/layout/middleScreen.vue @@ -0,0 +1,260 @@ + + + + diff --git a/report-ui/src/views/screenDesigner/layout/rightConfig.vue b/report-ui/src/views/screenDesigner/layout/rightConfig.vue new file mode 100644 index 00000000..29d2622b --- /dev/null +++ b/report-ui/src/views/screenDesigner/layout/rightConfig.vue @@ -0,0 +1,70 @@ + + + diff --git a/report-ui/src/views/screenDesigner/layout/topBar.vue b/report-ui/src/views/screenDesigner/layout/topBar.vue new file mode 100644 index 00000000..a9ebbd58 --- /dev/null +++ b/report-ui/src/views/screenDesigner/layout/topBar.vue @@ -0,0 +1,229 @@ + + + + diff --git a/report-ui/src/views/screenDesigner/node.md b/report-ui/src/views/screenDesigner/node.md index 2e20709c..141ddb24 100644 --- a/report-ui/src/views/screenDesigner/node.md +++ b/report-ui/src/views/screenDesigner/node.md @@ -13,6 +13,10 @@ │ │ ├── pieCharts(文件夹) (饼图) │ │ ├── texts(文件夹) (文本、滚动文本、超链接、当前时间、图片、视频、表格、内联框架) │ │ ├── wordcloudCharts(文件夹) (词云图) +│ ├── layout(文件夹) +│ │ ├── left.vue 大屏左侧工具栏 +│ │ ├── middle.vue 大屏中间配置 +│ │ ├── right.vue 大屏右侧配置 │ ├── util(文件夹) 公共 js │ ├── widget(文件夹) 图表组件 │ │ ├── barCharts(文件夹) (柱状图) diff --git a/report-ui/src/views/screenDesigner/util/revoke.js b/report-ui/src/views/screenDesigner/util/revoke.js new file mode 100644 index 00000000..8cb590c1 --- /dev/null +++ b/report-ui/src/views/screenDesigner/util/revoke.js @@ -0,0 +1,92 @@ +export class Revoke { + // 历史记录 + recordList = []; + + // 撤销记录,用于重做 + redoList = []; + + // 当前记录用currentRecord变量暂时存储,当用户修改时,再存放到recordList + currentRecord = null; + + // 上次插入数据时间 + time = 0; + + /** + * @description: 插入历史记录 + * @param {object}record + * @return {boolean} + */ + push(record) { + const nowTime = Date.now(); + // 防止添加重复的时间,当添加间隔小于100ms时,则替换当前记录并取消执行添加 + if (this.time + 100 > nowTime) { + this.currentRecord = JSON.stringify(record); + return false; + } + + this.time = nowTime; + // 判断之前是否已经存在currentRecord记录,有则存储到recordList + if (this.currentRecord) { + this.recordList.push(this.currentRecord); + //(清空记录)增加记录后则应该清空重做记录 + //splice() 方法向/从数组添加/删除项目,并返回删除的项目。 + this.redoList.splice(0, this.redoList.length); + } + // 将json转成字符串存储 + this.currentRecord = JSON.stringify(record); + + // 最多存储2000条记录,超过2000条记录则删除之前的记录 + if (this.length > 2000) { + //unshift() 方法将新项添加到数组的开头,并返回新的长度。 + this.recordList.unshift(); + } + + return true; + } + + /** + * @description: 撤销操作 + * @param {*} + * @return {object} + */ + undo() { + // 没有记录时,返回false + // 新建的recordList里面,不知为什么会存在一条记录,未找到原因,所以就判断长度为1时就不能撤销了。 + if (this.recordList.length === 1 ) { + return false; + } + //pop(): 方法用于删除并返回数组的最后一个元素。 + const record = this.recordList.pop(); + + // 将当前记录添加到重做记录里面 + if (this.currentRecord) { + this.redoList.push(this.currentRecord); + } + // 丢弃当前记录,防止重复添加 + this.currentRecord = null; + //返回撤销的记录 + return JSON.parse(record); + } + + /** + * @description: 重做操作 + * @param {*} + * @return {*} + */ + redo() { + // 没有重做记录时,返回false + if (this.redoList.length === 0) { + return false; + } + //pop(): 方法用于删除并返回数组的最后一个元素。 + const record = this.redoList.pop(); + // 添加到重做记录里面 + if (this.currentRecord) { + this.recordList.push(this.currentRecord); + } + // 丢弃当前记录,防止重复添加 + this.currentRecord = null; + + return JSON.parse(record); + } +} diff --git a/report-ui/src/views/screenDesigner/util/screen.js b/report-ui/src/views/screenDesigner/util/screen.js index 6a7622cc..01196cb1 100644 --- a/report-ui/src/views/screenDesigner/util/screen.js +++ b/report-ui/src/views/screenDesigner/util/screen.js @@ -15,6 +15,7 @@ export const handlerLayerWidget = (val, getToolByCode) => { } export const handleBigScreen = (data, getToolByCode, callBcak) => { + console.log('aa', getToolByCode("screen")) const optionScreen = getToolByCode("screen").options; const setup = optionScreen.setup; for (const key in data) {