-->
<#--
-->
@@ -452,7 +452,8 @@
// 下拉选项
{title: '数值类型', value: 'number'},
{title: '字符类型', value: 'string'},
- {title: '日期类型', value: 'date'}
+ {title: '日期类型', value: 'date'},
+ { title: '富文本', value: 'richText' }
];
return h('i-select', {
@@ -918,7 +919,9 @@
extJsonShow:false, //参数配置弹窗是否显示
tableIndex:-1, //当前table的下标
tableType:-1, //判断当前是字段还是参数 0字段 1参数
- daSourceDesc:"选择数据源" //数据源维护描述的内容
+ daSourceDesc:"选择数据源", //数据源维护描述的内容
+ //是否为测试数据
+ izTestData: false
}
},
mounted(){
@@ -1128,6 +1131,7 @@
this.loadTableData(val,this.sqlForm.dbDynSql);
},
loadTableData(page,sql){
+ this.izTestData = false;
if(page){
this.tab3.page.page = page;
}
@@ -1184,6 +1188,11 @@
fail:(res)=>{
this.tab3Loading=false;
this.spinShow=false;
+ //update-begin---author:wangshuai---date:2023-10-31---for:【QQYUN-6534】积木的数据预览,在无权限的时候,是不是生成一些测试数据---
+ if(res.code === 402 && this.tab1.data && this.tab1.data.length>0){
+ this.generateTestData();
+ }
+ //update-end---author:wangshuai---date:2023-10-31---for:【QQYUN-6534】积木的数据预览,在无权限的时候,是不是生成一些测试数据---
},
error:()=>{
this.tab3Loading=false;
@@ -1477,44 +1486,22 @@
}
}else{
let resultElement = result['fieldList'];
+ let that = this;
if(this.tab1.data && resultElement){
- let data = this.tab1.data;
- //update-begin--Author:wangshuai Date:20210430 for:sql动态报表配置明细如果字段存在就不替换,否则替换,要不然会引起数据清空--------------------
- data = data.concat(resultElement)
- //先去除没有的数据
- let newJson = [];
- //找到不重复的数据
- for (const datum of data) {
- //建立标记,判断数据是否重复,true为不重复
- let flag = true;
- for (const results of newJson) {
- //循环数据删除this.tab1.data已经存在的数据
- if(datum['fieldName'] == results['fieldName']){
- flag = false;
+ if(this.tab1.data.length>0){
+ this.$Modal.confirm({
+ title:'是否要重置字段?',
+ content: '已存在的字段不会修改,但是数据为空会删除所有字段!',
+ onOk: () => {
+ that.setTabFieldData(resultElement);
+ },
+ onCancel: () => {
+ console.info("不重置字段");
}
- }
- //判断是否重复
- if(flag == true){
- //不重复的放入新数组。 新数组的内容会继续进行上边的循环。
- newJson.push(datum);
- }
- }
- //去除没有的数据
- newJson = newJson.filter(item => resultElement.some(value => value.fieldName == item.fieldName))
- //循环给当前剔除的数组加上index和排序及查询框
- let newData=[];
- let i =0;
- for (const results of newJson) {
- results.tableIndex = i
- if(!results){
- results.searchFlag = 0
- }
- results.orderNum = i
- newData.push(results);
- i++;
+ });
+ }else{
+ that.setTabFieldData(resultElement);
}
- this.tab1.data = newData
- //update-end--Author:wangshuai Date:20210430 for:sql动态报表配置明细如果字段存在就不替换,否则替换,要不然会引起数据清空--------------------
}else{
this.tab1.data = resultElement;
this.tab1.data.forEach((item,index)=>{
@@ -1600,43 +1587,21 @@
Vue.prototype.$Message.warning("执行成功,但是数据为空,无法解析报表字段!!");
}
//update-end--Author:wangshuai--Date:20211109--for:api解析为空提示
- //update-begin--Author:wangshuai Date:20210430 for:api动态报表配置明细如果字段存在就不替换,否则替换,要不然会引起数据清空--------------------
- let data = this.tab1.data;
- data = data.concat(result)
- //先去除没有的数据
- let newJson = [];
- //找到不重复的数据
- for (const datum of data) {
- //建立标记,判断数据是否重复,true为不重复
- let flag = true;
- for (const results of newJson) {
- //循环数据删除this.tab1.data已经存在的数据
- if(datum['fieldName'] == results['fieldName']){
- flag = false;
- }
- }
- //判断是否重复
- if(flag == true){
- //不重复的放入新数组。 新数组的内容会继续进行上边的循环。
- newJson.push(datum);
- }
+ let that = this;
+ if(this.tab1.data.length>0){
+ this.$Modal.confirm({
+ title:'是否要重置字段?',
+ content: '已存在的字段不会修改,但是数据为空会删除所有字段!',
+ onOk: () => {
+ that.setTabFieldData(result);
+ },
+ onCancel: () => {
+ console.info("不重置字段");
+ }
+ });
+ }else{
+ that.setTabFieldData(result);
}
- //去除没有的数据
- newJson = newJson.filter(item => result.some(value => value.fieldName == item.fieldName))
- //循环给当前剔除的数组加上index和排序及查询框
- let newData=[];
- let i =0;
- for (const results of newJson) {
- results.tableIndex = i
- if(!results){
- results.searchFlag = 0
- }
- results.orderNum = i
- newData.push(results);
- i++;
- }
- this.tab1.data = newData;
- //update-end--Author:wangshuai Date:20210430 for:api动态报表配置明细如果字段存在就不替换,否则替换,要不然会引起数据清空--------------------
}
})
},
@@ -1715,7 +1680,8 @@
if(!reg.test(dbDynSql)){
return;
}
-
+ //替换“$“{DaoFormat. 为空,使SQL能正常解析
+ dbDynSql = dbDynSql.replaceAll('\$\{DaoFormat.','');
let dbDynSqlArr = dbDynSql.match(reg);
let paramsArr = [];
if(dbDynSqlArr && dbDynSqlArr.length>0){
@@ -2288,7 +2254,7 @@
})
}
}
- console.log("tabData:",tabData)
+ //console.log("tabData:",tabData)
this.tab2.data = tabData
//1需要报错提示
this.handleSQLAnalyze("1");
@@ -2346,7 +2312,7 @@
},
//放大确定事件
extJsonOk(){
- console.log(this.paramConfigData)
+ //console.log(this.paramConfigData)
if(this.tableType == 0){
this.tab1.data[this.tableIndex].extJson = this.paramConfigData
}else if(this.tableType == 1){
@@ -2355,26 +2321,70 @@
this.extJsonCancel();
},
/**
- * 是否需要更新字段
+ * 设置tabs 字段详细的数据
+ * @param result 请求接口返回的数据
*/
- handleAnalyze(value) {
- let that = this;
- this.$Modal.confirm({
- title:'是否要重置字段?',
- content: '已存在的字段不会修改,但是数据为空会删除所有字段!',
- onOk: () => {
- if(value == 'sql'){
- that.handleSQLAnalyze();
- }else if(value == 'api'){
- that.handleApiAnalyze();
- }else if(value == 'json'){
- that.handleJsonAnalyze();
+ setTabFieldData(result){
+ let data = this.tab1.data;
+ //update-begin--Author:wangshuai Date:20210430 for:sql动态报表配置明细如果字段存在就不替换,否则替换,要不然会引起数据清空--------------------
+ data = data.concat(result)
+ //先去除没有的数据
+ let newJson = [];
+ //找到不重复的数据
+ for (const datum of data) {
+ //建立标记,判断数据是否重复,true为不重复
+ let flag = true;
+ for (const results of newJson) {
+ //循环数据删除this.tab1.data已经存在的数据
+ if(datum['fieldName'] == results['fieldName']){
+ flag = false;
}
- },
- onCancel: () => {
- console.info("不重置字段")
}
- });
+ //判断是否重复
+ if(flag == true){
+ //不重复的放入新数组。 新数组的内容会继续进行上边的循环。
+ newJson.push(datum);
+ }
+ }
+ //去除没有的数据
+ newJson = newJson.filter(item => result.some(value => value.fieldName == item.fieldName))
+ //循环给当前剔除的数组加上index和排序及查询框
+ let newData=[];
+ let i =0;
+ for (const results of newJson) {
+ results.tableIndex = i
+ if(!results){
+ results.searchFlag = 0
+ }
+ results.orderNum = i
+ newData.push(results);
+ i++;
+ }
+ this.tab1.data = newData
+ //update-end--Author:wangshuai Date:20210430 for:sql动态报表配置明细如果字段存在就不替换,否则替换,要不然会引起数据清空--------------------
+ },
+ generateTestData() {
+ let fieldArray = [];
+ for (const item of this.tab1.data) {
+ fieldArray.push({
+ fieldName: item.fieldName,
+ widgetType: item.widgetType,
+ });
+ }
+ let fieldJson = "";
+ if (fieldArray.length > 0) {
+ fieldJson = JSON.stringify(fieldArray);
+ }
+ $http.post({
+ url: api.generateTestData,
+ contentType:"json",
+ data: fieldJson,
+ success: (result) => {
+ this.izTestData = true;
+ this.tab3.data = result;
+ this.tab3.page.total = 10;
+ }
+ })
}
}
})
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 7e76fd455..83f44c0d3 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
@@ -75,6 +75,8 @@
stripe
@on-select="selectField"
@on-select-all="selectFieldAll"
+ @on-select-all-cancel="cancelFieldAll"
+ @on-select-cancel="cancelField"
:columns="tab1.columns"
:data="tab1.data"
:height="tableHeight">
@@ -218,7 +220,8 @@
// 下拉选项
{title: '数值类型', value: 'number'},
{title: '字符类型', value: 'string'},
- {title: '日期类型', value: 'date'}
+ {title: '日期类型', value: 'date'},
+ { title: '富文本', value: 'richText' },
];
return h('i-select', {
@@ -686,23 +689,7 @@
return true
}
},
- /**
- * 解析之前提示是否重置字段
- */
handelAnalyze(){
- let that = this;
- this.$Modal.confirm({
- title:'是否要重置字段?',
- content: '已存在的字段不会修改,但是数据为空会删除所有字段!',
- onOk: () => {
- that.analyze();
- },
- onCancel: () => {
- console.info("不重置字段")
- }
- });
- },
- analyze(){
let { javaType, javaValue, isPage } = this.formData
let param = {}
this.tab2.data.map(item=>{
@@ -721,12 +708,20 @@
contentType: 'json',
data: dataStr,
success:(result)=>{
- this.tab1.data = result
- this.tab1.data.forEach((item,index)=>{
- item.tableIndex = index+1;
- item.searchFlag = 0
- item.extJson = ""
- })
+ if(this.tab1.data && this.tab1.data.length>0){
+ this.$Modal.confirm({
+ title:'是否要重置字段?',
+ content: '数据为空会删除所有字段!',
+ onOk: () => {
+ this.setTabFieldData(result);
+ },
+ onCancel: () => {
+ console.info("不重置字段")
+ }
+ });
+ }else{
+ this.setTabFieldData(result);
+ }
}
})
},
@@ -979,6 +974,18 @@
selectField(selection,row){
this.tab1.selectParamTables=[...this.tab1.selectParamTables,{"tableIndex":row.tableIndex,"id":row.id}];
},
+ /**
+ * 取消选中全部
+ */
+ cancelFieldAll(){
+ this.tab1.selectParamTables = [];
+ },
+ /**
+ * 取消选中的其中一个复选框
+ */
+ cancelField(selection,row){
+ this.tab1.selectParamTables = this.tab1.selectParamTables.filter(item=>item.tableIndex!=row.tableIndex);
+ },
removeFieldTable(){
this.deleteFieldModel = true;
},
@@ -986,6 +993,8 @@
let tableIndexArr = this.tab1.selectParamTables.map(item=>item.tableIndex);
let arr = this.tab1.data.filter(item=>!tableIndexArr.includes(item.tableIndex));
this.tab1.data = [...arr]
+ //删除之后清除复选框的key
+ this.tab1.selectParamTables = [];
},
selectParamAll(){
@@ -1138,6 +1147,47 @@
this.tab2.data[this.tableIndex].extJson = this.paramConfigData
}
this.extJsonCancel();
+ },
+ /**
+ * 设置tabs 字段详细的数据
+ * @param result 请求接口返回的数据
+ */
+ setTabFieldData(result){
+ let data = this.tab1.data;
+ data = data.concat(result)
+ //先去除没有的数据
+ let newJson = [];
+ //找到不重复的数据
+ for (const datum of data) {
+ //建立标记,判断数据是否重复,true为不重复
+ let flag = true;
+ for (const results of newJson) {
+ //循环数据删除this.tab1.data已经存在的数据
+ if(datum['fieldName'] == results['fieldName']){
+ flag = false;
+ }
+ }
+ //判断是否重复
+ if(flag == true){
+ //不重复的放入新数组。 新数组的内容会继续进行上边的循环。
+ newJson.push(datum);
+ }
+ }
+ //去除没有的数据
+ newJson = newJson.filter(item => result.some(value => value.fieldName == item.fieldName))
+ //循环给当前剔除的数组加上index和排序及查询框
+ let newData=[];
+ let i =0;
+ for (const results of newJson) {
+ results.tableIndex = i
+ if(!results){
+ results.searchFlag = 0
+ }
+ results.orderNum = i
+ newData.push(results);
+ i++;
+ }
+ this.tab1.data = newData
}
}
})
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 05d8ceafc..f765642ed 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
@@ -81,7 +81,7 @@
- 显示页码?:
+ 显示页码:
@@ -90,7 +90,7 @@
- 页码位置?:
+ 页码位置:
diff --git a/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/template/components/sql_function_replace.ftl b/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/template/components/sql_function_replace.ftl
index 0b1ffa179..e14e86045 100644
--- a/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/template/components/sql_function_replace.ftl
+++ b/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/template/components/sql_function_replace.ftl
@@ -83,7 +83,14 @@
},
//初始化参数解析
initDataSource(dbDynSql,dbKey,paramData){
- this.dbDynSql = dbDynSql
+ //update-begin---author:wangshuai---date:2023-10-10---for:【QQYUN-6755】参数替换 解析时,弹框参数不对---
+ //替换“$“{DaoFormat. 为空,使SQL能正常解析
+ //update-begin---author:wangshuai Date:20211221 for:[JMREP-2505]存储过程没有空格参数会连接到一起------------
+ if(dbDynSql){
+ dbDynSql = dbDynSql.replaceAll('\$\{DaoFormat.','');
+ }
+ this.dbDynSql = dbDynSql;
+ //update-end---author:wangshuai---date:2023-10-10---for:【QQYUN-6755】参数替换 解析时,弹框参数不对---
this.dbKey = dbKey
//update-begin---author:wangshuai Date:20211221 for:[JMREP-2505]存储过程没有空格参数会连接到一起------------
let reg=/\$\{[^}]*\}/g;
diff --git a/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/template/components/tree_select.ftl b/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/template/components/tree_select.ftl
index e6fa80ad7..45f1892ea 100644
--- a/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/template/components/tree_select.ftl
+++ b/pigx-visual/pigx-jimu-platform/src/main/resources/templates/jmreport/desreport/template/components/tree_select.ftl
@@ -156,7 +156,7 @@
$http.metaGet(this.url, params).then((res) => {
this.combineTreeData(res.data, callback, item)
}).catch(function (error){
- console.log('加载树错误', error)
+ console.error('加载树错误', error)
});
},
// 加载数据
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 ff22fb280..14a7b5f6b 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=1694491301.10">
+<#assign CACHE_VERSION = "v=1699715555.10">
<#assign config_id = "${id!''}">
<#assign shareView = "${shareView}">
diff --git a/pom.xml b/pom.xml
index 243f24b62..bb0d70a36 100644
--- a/pom.xml
+++ b/pom.xml
@@ -55,7 +55,7 @@
2.12.6
2.3.5
2.2.9
- 1.6.2-GA5
+ 1.6.5
1.11.543
2.4.0
6.8.0