diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/report/service/impl/ReportServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/report/service/impl/ReportServiceImpl.java
index b0d871b0..f0cfd30a 100644
--- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/report/service/impl/ReportServiceImpl.java
+++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/report/service/impl/ReportServiceImpl.java
@@ -11,7 +11,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
- * TODO
*
* @author chenkening
* @date 2021/3/26 10:35
@@ -31,11 +30,12 @@ public class ReportServiceImpl implements ReportService {
@Override
public void delReport(ReportDto reportDto) {
deleteById(reportDto.getId());
+ //删除gaea_report_excel、gaea_report_dashboard、gaea_report_dashboard_widget
+ //...
}
@Override
public void processBeforeOperation(Report entity, BaseOperationEnum operationEnum) throws BusinessException {
- //目前只有大屏一种类型
- entity.setReportType("report_screen");
+
}
}
diff --git a/report-ui/static/expendPlugins/chart/chartmix.css b/report-ui/expendPlugins/chart/chartmix.css
similarity index 100%
rename from report-ui/static/expendPlugins/chart/chartmix.css
rename to report-ui/expendPlugins/chart/chartmix.css
diff --git a/report-ui/static/expendPlugins/chart/chartmix.umd.min.js b/report-ui/expendPlugins/chart/chartmix.umd.min.js
similarity index 100%
rename from report-ui/static/expendPlugins/chart/chartmix.umd.min.js
rename to report-ui/expendPlugins/chart/chartmix.umd.min.js
diff --git a/report-ui/index.html b/report-ui/index.html
index 7c5f6cab..db0e570e 100644
--- a/report-ui/index.html
+++ b/report-ui/index.html
@@ -5,12 +5,14 @@
AJ-Report
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/report-ui/package.json b/report-ui/package.json
index 7075db02..fcb3473e 100644
--- a/report-ui/package.json
+++ b/report-ui/package.json
@@ -23,7 +23,6 @@
"element-ui": "^2.9.2",
"js-cookie": "2.2.0",
"jsbarcode": "^3.11.4",
- "luckysheet": "^2.1.13",
"miment": "^0.0.9",
"moment": "^2.29.1",
"monaco-editor": "^0.20.0",
diff --git a/report-ui/src/views/report/bigscreen/index.vue b/report-ui/src/views/report/bigscreen/index.vue
index 27e30bd3..3bef1030 100644
--- a/report-ui/src/views/report/bigscreen/index.vue
+++ b/report-ui/src/views/report/bigscreen/index.vue
@@ -182,8 +182,6 @@ export default {
path: "/bigscreen/designer",
query: {
reportCode: val.reportCode,
- reportId: val.id,
- accessKey: val.accessKey
}
});
window.open(routeUrl.href, "_blank");
diff --git a/report-ui/src/views/report/excelreport/designer/index.vue b/report-ui/src/views/report/excelreport/designer/index.vue
index a17977f2..3a7a0f3e 100644
--- a/report-ui/src/views/report/excelreport/designer/index.vue
+++ b/report-ui/src/views/report/excelreport/designer/index.vue
@@ -71,7 +71,7 @@
+ style="margin:0px;padding:0px;position:absolute;width:100%;height:95vh;left: 0px;top: 30px;bottom:0px;" />
@@ -152,7 +152,7 @@
@@ -230,13 +230,11 @@ import { addReportExcel, editReportExcel } from '@/api/report'
import ColorPicker from '../../bigscreen/designer/form/colorPicker.vue'
// import QRCode from 'qrcodejs2'
// import JsBarcode from 'jsbarcode'
-import LuckySheet from 'luckysheet'
export default {
name: 'Excels',
components: {
draggable,
ColorPicker,
- LuckySheet
},
data () {
return {
@@ -329,82 +327,141 @@ export default {
}
},
mounted () {
+ $(function () {
- this.options = [
- { text: 'Money Manager.xlsx', value: 'https://minio.cnbabylon.com/public/luckysheet/money-manager-2.xlsx' },
- { text: 'Activity costs tracker.xlsx', value: 'https://minio.cnbabylon.com/public/luckysheet/Activity%20costs%20tracker.xlsx' },
- { text: 'House cleaning checklist.xlsx', value: 'https://minio.cnbabylon.com/public/luckysheet/House%20cleaning%20checklist.xlsx' },
- { text: 'Student assignment planner.xlsx', value: 'https://minio.cnbabylon.com/public/luckysheet/Student%20assignment%20planner.xlsx' },
- { text: 'Credit card tracker.xlsx', value: 'https://minio.cnbabylon.com/public/luckysheet/Credit%20card%20tracker.xlsx' },
- { text: 'Blue timesheet.xlsx', value: 'https://minio.cnbabylon.com/public/luckysheet/Blue%20timesheet.xlsx' },
- { text: 'Student calendar (Mon).xlsx', value: 'https://minio.cnbabylon.com/public/luckysheet/Student%20calendar%20%28Mon%29.xlsx' },
- { text: 'Blue mileage and expense report.xlsx', value: 'https://minio.cnbabylon.com/public/luckysheet/Blue%20mileage%20and%20expense%20report.xlsx' },
- ]
- LuckySheet.create({
- container: 'luckysheet', // 设定DOM容器的id
- title: 'Luckysheet Demo', // 设定表格名称
- lang: 'zh', // 设定表格语言
- plugins: ['chart'],
- data: [{
- 'name': 'Cell', // 工作表名称
- 'color': '', // 工作表颜色
- 'index': 0, // 工作表索引
- 'status': 1, // 激活状态
- 'order': 0, // 工作表的下标
- 'hide': 0, // 是否隐藏
- 'row': 36, // 行数
- 'column': 18, // 列数
- 'defaultRowHeight': 19, // 自定义行高
- 'defaultColWidth': 73, // 自定义列宽
- 'celldata': [], // 初始化使用的单元格数据
- 'config': {
- 'merge': {}, // 合并单元格
- 'rowlen': {}, // 表格行高
- 'columnlen': {}, // 表格列宽
- 'rowhidden': {}, // 隐藏行
- 'colhidden': {}, // 隐藏列
- 'borderInfo': {}, // 边框
- 'authority': {}, // 工作表保护
+ luckysheet.create({
+ container: 'luckysheet', // 设定DOM容器的id
+ title: 'Luckysheet Demo', // 设定表格名称
+ lang: 'zh', // 设定表格语言
+ plugins:['chart'],
+ hook:{
+ cellDragStop: function (cell, postion, sheetFile, ctx, event) {
+ // console.info(cell, postion, sheetFile, ctx, event);
+ },
+ rowTitleCellRenderBefore:function(rowNum,postion,ctx){
+ // console.log(rowNum);
+ },
+ rowTitleCellRenderAfter:function(rowNum,postion,ctx){
+ // console.log(ctx);
+ },
+ columnTitleCellRenderBefore:function(columnAbc,postion,ctx){
+ // console.log(columnAbc);
+ },
+ columnTitleCellRenderAfter:function(columnAbc,postion,ctx){
+ // console.log(postion);
+ },
+ cellRenderBefore:function(cell,postion,sheetFile,ctx){
+ // console.log(cell,postion,sheetFile,ctx);
+ },
+ cellRenderAfter:function(cell,postion,sheetFile,ctx){
+ // console.log(postion);
+ },
+ cellMousedownBefore:function(cell,postion,sheetFile,ctx){
+ // console.log("cellMousedownBefore", postion);
+ },
+ cellMousedown:function(cell,postion,sheetFile,ctx){
+ // console.log("cellMousedown",sheetFile);
+ },
+ sheetMousemove:function(cell,postion,sheetFile,moveState,ctx){
+ // console.log("sheetMousemove",cell,postion,sheetFile,moveState,ctx);
+ },
+ sheetMouseup:function(cell,postion,sheetFile,moveState,ctx){
+ console.log("sheetMouseup",cell,postion,sheetFile,moveState,ctx);
+ },
+ cellAllRenderBefore:function(data,sheetFile,ctx){
+ // console.info(data,sheetFile,ctx)
+ },
+ updated:function(operate){
+ // console.info(operate)
+ },
+ cellUpdateBefore:function(r,c,value,isRefresh){
+ // console.info('cellUpdateBefore',r,c,value,isRefresh)
+ },
+ cellUpdated:function(r,c,oldValue, newValue, isRefresh){
+ // console.info('cellUpdated',r,c,oldValue, newValue, isRefresh)
+ },
+ sheetActivate:function(index, isPivotInitial, isNewSheet){
+ // console.info(index, isPivotInitial, isNewSheet)
+ },
+ rangeSelect:function(index, sheet){
+ // console.info(index, sheet)
+ },
+ commentInsertBefore:function(r, c){
+ // console.info(r, c)
+ },
+ commentInsertAfter:function(r, c, cell){
+ // console.info(r, c, cell)
+ },
+ commentDeleteBefore:function(r, c, cell){
+ // console.info(r, c, cell)
+ },
+ commentDeleteAfter:function(r, c, cell){
+ // console.info(r, c, cell)
+ },
+ commentUpdateBefore:function(r, c, value){
+ // console.info(r, c, value)
+ },
+ commentUpdateAfter:function(r, c, oldCell, newCell ){
+ // console.info(r, c, oldCell, newCell)
+ },
+ cellEditBefore:function(range ){
+ // console.info(range)
+ },
+ workbookCreateAfter:function(json){
+ // console.info(json)
+ },
+ rangePasteBefore:function(range,data){
+ // console.info('rangePasteBefore',range,data)
+ // return false; //Can intercept paste
+ },
},
- 'scrollLeft': 0, // 左右滚动条位置
- 'scrollTop': 315, // 上下滚动条位置
- 'luckysheet_select_save': [], // 选中的区域
- 'calcChain': [], // 公式链
- 'isPivotTable': false, // 是否数据透视表
- 'pivotTable': {}, // 数据透视表设置
- 'filter_select': {}, // 筛选范围
- 'filter': null, // 筛选配置
- 'luckysheet_alternateformat_save': [], // 交替颜色
- 'luckysheet_alternateformat_save_modelCustom': [], // 自定义交替颜色
- 'luckysheet_conditionformat_save': {}, // 条件格式
- 'frozen': {}, // 冻结行列配置
- 'chart': [], // 图表配置
- 'zoomRatio': 1, // 缩放比例
- 'image': [], // 图片
- 'showGridLines': 1, // 是否显示网格线
- 'dataVerification': {} // 数据验证配置
- },
- {
- 'name': 'Sheet2',
- 'color': '',
- 'index': 1,
- 'status': 0,
- 'order': 1,
- 'celldata': [],
- 'config': {}
- },
- {
- 'name': 'Sheet3',
- 'color': '',
- 'index': 2,
- 'status': 0,
- 'order': 2,
- 'celldata': [],
- 'config': {},
- }
- ]
- })
+ data:[
+ {
+ "name": "report", //工作表名称
+ "color": "", //工作表颜色
+ "index": 0, //工作表索引
+ "status": 1, //激活状态
+ "order": 0, //工作表的下标
+ "hide": 0,//是否隐藏
+ "row": 36, //行数
+ "column": 18, //列数
+ "defaultRowHeight": 19, //自定义行高
+ "defaultColWidth": 73, //自定义列宽
+ "celldata": [], //初始化使用的单元格数据
+ "config": {
+ "merge":{}, //合并单元格
+ "rowlen":{}, //表格行高
+ "columnlen":{}, //表格列宽
+ "rowhidden":{}, //隐藏行
+ "colhidden":{}, //隐藏列
+ "borderInfo":{}, //边框
+ "authority":{}, //工作表保护
+
+ },
+ "scrollLeft": 0, //左右滚动条位置
+ "scrollTop": 315, //上下滚动条位置
+ "luckysheet_select_save": [], //选中的区域
+ "calcChain": [],//公式链
+ "isPivotTable":false,//是否数据透视表
+ "pivotTable":{},//数据透视表设置
+ "filter_select": {},//筛选范围
+ "filter": null,//筛选配置
+ "luckysheet_alternateformat_save": [], //交替颜色
+ "luckysheet_alternateformat_save_modelCustom": [], //自定义交替颜色
+ "luckysheet_conditionformat_save": {},//条件格式
+ "frozen": {}, //冻结行列配置
+ "chart": [], //图表配置
+ "zoomRatio":1, // 缩放比例
+ "image":[], //图片
+ "showGridLines": 1, //是否显示网格线
+ "dataVerification":{} //数据验证配置
+ }
+ ]
+ });
+ });
+
+
// this.load()
},
@@ -524,6 +581,7 @@ export default {
},
onStart (setCode) {
this.setCode = setCode
+ console.log(setCode)
},
onEnd (evt) {
// 获取结束坐标和列名
@@ -532,11 +590,24 @@ export default {
var fieldLabel = evt.item.innerText // 列名称
var excelToolbarHeight = 40 // excel工具栏
var leftLayout = document.getElementsByClassName('layout-left')[0].clientWidth // 左侧宽度
+ console.log(luckysheet)
+ console.log("x:",x)
+ console.log("y:",y)
+ console.log("leftLayout左侧宽度:",leftLayout)
+ // const aaa = luckysheet.sheetMouseup()
+ luckysheet.setCellValue(0,0,"哈哈哈")
+
+ // const a = luckysheet.getCellValue(0,0)
+ // debugger
+ console.log("滚动","aaa");
+ // console.log(a);
+
+
// 计算行列
- const { ri, ci } = this.sheet.datas[0].getCellRectByXY(x - leftLayout, y - excelToolbarHeight)
- this.sheet.cellText(ri, ci, '#{' + this.setCode + '.' + fieldLabel + '}', 0)
+ // const { ri, ci } = this.sheet.datas[0].getCellRectByXY(x - leftLayout, y - excelToolbarHeight)
+ // this.sheet.cellText(ri, ci, '#{' + this.setCode + '.' + fieldLabel + '}', 0)
// 设定值
- this.sheet.reRender()
+ // this.sheet.reRender()
},
del (val) {
for (let i = 0; i < this.dataSet.length; i++) {
diff --git a/report-ui/src/views/report/report/index.vue b/report-ui/src/views/report/report/index.vue
index b5636902..0ed50f28 100644
--- a/report-ui/src/views/report/report/index.vue
+++ b/report-ui/src/views/report/report/index.vue
@@ -74,7 +74,15 @@ export default {
inputType: "input",
label: "报表编码",
field: "reportCode"
- }
+ },
+ {
+ inputType: 'anji-select', //form表单类型 input|input-number|anji-select(传递url或者dictCode)|anji-tree(左侧树)|date|datetime|datetimerange
+ anjiSelectOption: {
+ dictCode: "REPORT_TYPE"
+ },
+ label: '报表类型',
+ field: 'reportType'
+ },
],
// 操作按钮
buttons: {
@@ -120,6 +128,7 @@ export default {
editField: "reportName",
inputType: "input",
rules: [
+ { required: true, message: '请输入报表名称', trigger: 'blur' },
{ min: 1, max: 100, message: "不超过100个字符", trigger: "blur" }
],
disabled: false
@@ -131,6 +140,7 @@ export default {
editField: "reportCode",
inputType: "input",
rules: [
+ { required: true, message: '请输入报表编码', trigger: 'blur' },
{ min: 1, max: 100, message: "不超过100个字符", trigger: "blur" }
],
disabled: "disableOnEdit"
@@ -144,6 +154,7 @@ export default {
editField: "reportGroup",
inputType: "input",
rules: [
+ // { required: true, message: '请输入分组', trigger: 'blur' },
{ min: 1, max: 100, message: "不超过100个字符", trigger: "blur" }
],
disabled: false,
@@ -154,17 +165,18 @@ export default {
placeholder: "",
field: "reportType",
editField: "reportType",
- tableHide: true,
- editHide: true,
inputType: "anji-select",
+ fieldTableRowRenderer: row => {
+ return this.getDictLabelByCode("REPORT_TYPE", row["reportType"]);
+ },
anjiSelectOption: {
dictCode: "REPORT_TYPE"
},
rules: [
+ { required: true, message: '请输入报表类型', trigger: 'blur' },
{ min: 1, max: 20, message: "不超过20个字符", trigger: "blur" }
],
- disabled: true,
- defaultValue: "report_screen"
+ disabled: "disableOnEdit",
},
{
label: "描述", //报表描述
@@ -237,23 +249,36 @@ export default {
},
// 预览
preview(val) {
+ let routePath = "";
+ if (val.reportType === 'report_excel') {
+ routePath = "/excelreport/viewer";
+
+ } else {
+ routePath = "/bigscreen/viewer";
+ }
var routeUrl = this.$router.resolve({
- path: "/bigscreen/viewer",
+ path: routePath,
query: { reportCode: val.reportCode }
});
window.open(routeUrl.href, "_blank");
},
// 设计
design(val) {
+ let routePath = "";
+ if (val.reportType === 'report_excel') {
+ routePath = "/excelreport/designer";
+
+ } else {
+ routePath = "/bigscreen/designer";
+ }
var routeUrl = this.$router.resolve({
- path: "/bigscreen/designer",
+ path: routePath,
query: {
reportCode: val.reportCode,
- reportId: val.id,
- accessKey: val.accessKey
}
});
window.open(routeUrl.href, "_blank");
+
},
//分享
shareReport(val){
diff --git a/report-ui/static/home.mp4 b/report-ui/static/home.mp4
deleted file mode 100644
index 91a32e2d..00000000
Binary files a/report-ui/static/home.mp4 and /dev/null differ