getUserInfo(String token) {
diff --git a/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/authority.ftl b/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/authority.ftl
index 3108af6a4..93bd4dd71 100644
--- a/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/authority.ftl
+++ b/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/authority.ftl
@@ -1,4 +1,4 @@
-<#assign CACHE_VERSION = "v=1693888295.10">
+<#assign CACHE_VERSION = "v=1694491301.10">
diff --git a/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/index.ftl b/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/index.ftl
index 835a9c5a5..b97d48bbd 100644
--- a/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/index.ftl
+++ b/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/index.ftl
@@ -1,4 +1,4 @@
-<#assign CACHE_VERSION = "v=1693888295.10">
+<#assign CACHE_VERSION = "v=1694491301.10">
<#assign config_id = "${id!''}">
@@ -582,9 +582,22 @@
图片
条形码
二维码
+ 富文本?
<#--图表-->
+
+ 尺寸?
+
+ 完全覆盖(cover)
+ 适应内容(contain)
+ width100%--center
+ height100%--center
+ 居中显示
+ 拉伸(100% 100%)
+
+
+
值
@@ -1036,6 +1049,7 @@
var excel_config_id = "${config_id}";
var excel_req_token = '';
+ var excel_req_tenantId = '';
var xs = null;
var vm = null;
let autoSaveFun;
@@ -1054,6 +1068,11 @@
token = getRequestUrl().token;
}
excel_req_token = token
+ let tenantId = window.localStorage.getItem('JmReport-Tenant-Id');
+ if (tenantId == "" || tenantId == null){
+ tenantId = getRequestUrl().tenantId;
+ }
+ excel_req_tenantId = tenantId;
//console.log("index_load--------------",token);
let reportConfig = getReportConfigJson();
let colLength = 50,rowLength = 100, viewPageSize = [10,20,30], printPaper = []
@@ -1264,33 +1283,45 @@
if(excel_req_token && excel_req_token!="null"){
xs.data.settings.viewUrl = xs.data.settings.viewUrl +'?token='+excel_req_token
}
+ if(excel_req_tenantId && excel_req_tenantId!=="null"){
+ if(xs.data.settings.viewUrl.indexOf("?") !== -1){
+ xs.data.settings.viewUrl = xs.data.settings.viewUrl +'&tenantId='+excel_req_tenantId
+ }else{
+ xs.data.settings.viewUrl = xs.data.settings.viewUrl +'?tenantId='+excel_req_tenantId
+ }
+ }
//update-end---author:wangshuai ---date:20220215 for:[issues/I4SOSH]做完的积木报表,预览生成的访问地址,默认都加了token=null------------
var str = res.jsonStr;
if(!str) return;
//页面加载时设置报表宽度
- const jsonStr = JSON.parse(str);
- //console.log('jsonstr', jsonStr)
- // 设置增强
- vm.setEnhanceConfig(res.cssStr, res.jsStr)
- if(jsonStr.chartList)
- {
- jsonStr.chartList.forEach(function(item){
- let config = JSON.parse(item.config);
- if (config.geo){
- if (loadMap){
- loadMap && loadMap(item)
+ try{
+ const jsonStr = JSON.parse(str);
+ //console.log('jsonstr', jsonStr)
+ // 设置增强
+ vm.setEnhanceConfig(res.cssStr, res.jsStr)
+ if(jsonStr.chartList)
+ {
+ jsonStr.chartList.forEach(function(item){
+ let config = JSON.parse(item.config);
+ if (config.geo){
+ if (loadMap){
+ loadMap && loadMap(item)
+ }
}
- }
- })
- }
- xs.data.settings.printElWidth = jsonStr.printElWidth || 0;
- xs.data.printElHeight = jsonStr.printElHeight || 1047; //默认a4纸大小
- // xs.sheet.toolbar.toolPrintHeightInputEl.input.el.value = xs.data.printElHeight;
- xs.loadData(jsonStr);
- if(jsonStr.settings){
- if(jsonStr.settings.showGrid == false){
- vm.gridLine = "false"
+ })
}
+ xs.data.settings.printElWidth = jsonStr.printElWidth || 0;
+ xs.data.printElHeight = jsonStr.printElHeight || 1047; //默认a4纸大小
+ // xs.sheet.toolbar.toolPrintHeightInputEl.input.el.value = xs.data.printElHeight;
+ xs.loadData(jsonStr);
+ if(jsonStr.settings){
+ if(jsonStr.settings.showGrid == false){
+ vm.gridLine = "false"
+ }
+ }
+ }catch(error){
+ console.error('jsonStr数据解析报错:', error)
+ vm.$Message.warning('配置有误,请检查数据JSON配置项!');
}
setTimeout(function(){
if (xs.data.chartList && xs.data.chartList.length > 0){
diff --git a/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/list.ftl b/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/list.ftl
index fee31c356..c0ad99bd6 100644
--- a/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/list.ftl
+++ b/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/list.ftl
@@ -1,4 +1,4 @@
-<#assign CACHE_VERSION = "v=1693888295.10">
+<#assign CACHE_VERSION = "v=1694491301.10">
@@ -143,6 +143,10 @@
数据报表
+
+
+ 图形报表
+
打印设计
@@ -425,6 +429,7 @@
data: {
isCollapsed: false,
token:'',//token
+ tenantId:'',//租户id
name:'',
designerObj:{},
loading:true,
@@ -501,7 +506,8 @@
},
mounted:function(){
this.token = token;
- //console.log("list_mount--------------",this.token);
+ this.tenantId = tenantId;
+ //console.log("list_mount--------------",this.token);
this.uploadHeader = {"X-Access-Token":this.token};
this.actionUrl=BASE_URL+"/jmreport/putFile";
this.$nextTick(()=>{
@@ -617,14 +623,27 @@
*/
splicingToken(url){
if(this.token && "null" != this.token){
- if(url.indexOf("?")!=-1){
- url =url + "&token="+this.token;
- }else{
- url =url + "?token="+this.token;
- }
+ url = this.splicingUrl("token",this.token,url);
+ }
+ if(this.tenantId && "null" !== this.tenantId){
+ url = this.splicingUrl("tenantId",this.tenantId,url);
}
return url;
},
+ /**
+ * 拼接路径
+ * @param name
+ * @param value
+ * @param url
+ */
+ splicingUrl(name, value, url) {
+ if (url.indexOf("?") !== -1) {
+ url = url + "&" + name + "=" + value;
+ } else {
+ url = url + "?" + name + "=" + value;
+ }
+ return url;
+ },
//删除报表
handleDelete:function(item){
$http.confirm({
diff --git a/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/template/components/data_source_setting.ftl b/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/template/components/data_source_setting.ftl
index 19a30d2e6..702f3ca81 100644
--- a/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/template/components/data_source_setting.ftl
+++ b/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/template/components/data_source_setting.ftl
@@ -856,10 +856,6 @@
}
}
},
- {
- title: '用户名',
- key: 'dbUsername'
- },
{
title: '操作',
key: 'action',
@@ -1472,8 +1468,10 @@
//Vue.prototype.$Message.error(message);
//弹窗sql解析报错字段
if(dbDynSql.indexOf("$")!=-1){
- this.$refs.sqlFunctionReplace.sqlFunctionShow = true
- this.$refs.sqlFunctionReplace.initDataSource(this.sqlForm.dbDynSql, this.sqlForm.dbSource, this.tab2.data)
+ if(this.tab2.data.length>0){
+ this.$refs.sqlFunctionReplace.sqlFunctionShow = true
+ this.$refs.sqlFunctionReplace.initDataSource(this.sqlForm.dbDynSql, this.sqlForm.dbSource, this.tab2.data)
+ }
}else{
Vue.prototype.$Message.error(message);
}
@@ -1529,9 +1527,11 @@
fail:(res)=>{
//1001注入异常
if(res.code!=1001 && type!=1){
- //弹窗sql解析报错字段
- this.$refs.sqlFunctionReplace.sqlFunctionShow = true
- this.$refs.sqlFunctionReplace.initDataSource(this.sqlForm.dbDynSql,this.sqlForm.dbSource,this.tab2.data)
+ if(this.tab2.data.length>0){
+ //弹窗sql解析报错字段
+ this.$refs.sqlFunctionReplace.sqlFunctionShow = true
+ this.$refs.sqlFunctionReplace.initDataSource(this.sqlForm.dbDynSql,this.sqlForm.dbSource,this.tab2.data)
+ }
}
}
})
@@ -2126,12 +2126,14 @@
},
on: {
click: () => {
- this.sourceTab.data.forEach((item)=>{
- if (item.id === params.row.id){
- this.dataSource = item;
+ $http.get({
+ url: api.getDataSourceById,
+ data:{'id': params.row.id},
+ success:(result)=>{
+ this.visibleData = true;
+ this.dataSource = result;
}
})
- this.visibleData = true;
}
}
},'编辑'),
diff --git a/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/template/components/javabean_setting.ftl b/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/template/components/javabean_setting.ftl
index e51f17787..7e76fd455 100644
--- a/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/template/components/javabean_setting.ftl
+++ b/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/template/components/javabean_setting.ftl
@@ -1066,7 +1066,6 @@
this.$Notice.success({
title: '删除成功'
});
- this.initDataSource();
}
});
}
diff --git a/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/template/components/print_setting.ftl b/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/template/components/print_setting.ftl
index 8fe918bee..05d8ceafc 100644
--- a/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/template/components/print_setting.ftl
+++ b/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/template/components/print_setting.ftl
@@ -78,7 +78,35 @@
-
+
+
+
+ 显示页码?:
+
+
+
+
+
+
+
+
+ 页码位置?:
+
+
+
+
+ 左
+
+
+ 中
+
+
+ 右
+
+
+
+
+
@@ -128,7 +156,8 @@
marginX: 10,
marginY: 10,
layout: 'portrait',
- printCallBackUrl: ''
+ paginationShow: true,
+ paginationLocation: 'middle',
}
},
created(){
@@ -169,7 +198,9 @@
marginX: this.marginX || 0,
marginY: this.marginY || 0,
layout: this.layout,
- printCallBackUrl: this.printCallBackUrl
+ printCallBackUrl: this.printCallBackUrl,
+ paginationShow: this.paginationShow,
+ paginationLocation: this.paginationLocation,
}
},
// 纸张大小改变事件
@@ -247,6 +278,10 @@
this.isBackend = param.isBackend
}
this.printCallBackUrl = param.printCallBackUrl || ''
+ this.paginationShow = param.paginationShow || false
+ if(param.paginationLocation){
+ this.paginationLocation = param.paginationLocation
+ }
}
},
// 重置宽高px的值
diff --git a/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/view.ftl b/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/view.ftl
index ec2b8fb6c..ff22fb280 100644
--- a/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/view.ftl
+++ b/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/view.ftl
@@ -1,4 +1,4 @@
-<#assign CACHE_VERSION = "v=1693888295.10">
+<#assign CACHE_VERSION = "v=1694491301.10">
<#assign config_id = "${id!''}">
<#assign shareView = "${shareView}">
@@ -220,14 +220,14 @@ function getLocalRequestUrl() {
-
+
~
-
+
-
+
@@ -287,7 +287,7 @@ function getLocalRequestUrl() {
确定
-
+
diff --git a/pom.xml b/pom.xml
index 15154dfc4..e4ba946d7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -55,7 +55,7 @@
3.0.5
2.12.6
2.3.5
- 1.6.2-beta
+ 1.6.2-GA5
1.11.543
2.4.0
5.22.0