forked from fanruan/design
Browse Source
* commit '04a5cfe32fde95f6415dee744be28bd56dadc229': REPORT-414 同步到dev上演示 测试 显示依赖jar 1 REPORT-364 修改 异步请求图片 REPORT-415 填报提交提供多sheet配置 REPORT-364 之前的process加一下 REPORT-364 格式修改 REPORT-585 添加formletName变量说明 update update update 切换bug REPORT-364 最初的接口 忘了删了 REPORT-364 和自适应用的同一个接口处理 REPORT-364 报表块刷新接口处理master
xiaoxia
8 years ago
14 changed files with 383 additions and 96 deletions
@ -0,0 +1,38 @@
|
||||
package com.fr.design.fun; |
||||
|
||||
import com.fr.form.ui.ElementCaseEditor; |
||||
import com.fr.stable.fun.ReportFitAttrProvider; |
||||
import com.fr.form.main.Form; |
||||
import com.fr.stable.fun.mark.Mutable; |
||||
|
||||
import java.beans.PropertyDescriptor; |
||||
|
||||
/** |
||||
* Created by zhouping on 2015/9/10. |
||||
*/ |
||||
public interface FormElementCaseEditorProvider extends Mutable { |
||||
|
||||
String MARK_STRING = "PropertyEditor"; |
||||
|
||||
int CURRENT_LEVEL = 1; |
||||
|
||||
|
||||
//加个provider返回tab的接口
|
||||
//design_base依赖了form
|
||||
PropertyDescriptor[] createPropertyDescriptor (Class<?> temp, Form form, ElementCaseEditor editor); |
||||
|
||||
/** |
||||
* 生成属性表 |
||||
* @param temp 传入当前操作的class |
||||
* @param reportFitAttr 传入的自适应属性 |
||||
* @return 返回属性表 |
||||
*/ |
||||
PropertyDescriptor[] createPropertyDescriptor(Class<?> temp, ReportFitAttrProvider reportFitAttr); |
||||
|
||||
/** |
||||
* 返回pc自适应属性值 |
||||
* @param fitAttrProvider 传入的自适应属性 |
||||
* @return 返回pc自适应属性值 |
||||
*/ |
||||
int getFitStateInPC(ReportFitAttrProvider fitAttrProvider); |
||||
} |
@ -0,0 +1,51 @@
|
||||
package com.fr.design.fun.impl; |
||||
|
||||
import com.fr.design.fun.FormElementCaseEditorProvider; |
||||
import com.fr.form.main.Form; |
||||
import com.fr.form.ui.ElementCaseEditor; |
||||
import com.fr.stable.fun.ReportFitAttrProvider; |
||||
import com.fr.stable.fun.mark.API; |
||||
|
||||
import java.beans.PropertyDescriptor; |
||||
|
||||
/** |
||||
* Created by zhouping on 2015/9/10. |
||||
*/ |
||||
@API(level = FormElementCaseEditorProvider.CURRENT_LEVEL) |
||||
public abstract class AbstractFormElementCaseEditorProvider implements FormElementCaseEditorProvider { |
||||
|
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
|
||||
@Override |
||||
public String mark4Provider() { |
||||
return this.getClass().getName(); |
||||
} |
||||
|
||||
@Override |
||||
public PropertyDescriptor[] createPropertyDescriptor(Class<?> temp, Form reportAttr, ElementCaseEditor editor) { |
||||
return new PropertyDescriptor[0]; |
||||
} |
||||
|
||||
/** |
||||
* 生成属性表 |
||||
* @param temp 传入当前操作的class |
||||
* @param reportFitAttr 传入的自适应属性 |
||||
* @return 返回属性表 |
||||
*/ |
||||
@Override |
||||
public PropertyDescriptor[] createPropertyDescriptor(Class<?> temp, ReportFitAttrProvider reportFitAttr) { |
||||
return new PropertyDescriptor[0]; |
||||
} |
||||
|
||||
/** |
||||
* 返回pc自适应属性值 |
||||
* @param fitAttrProvider 传入的自适应属性 |
||||
* @return 返回pc自适应属性值 |
||||
*/ |
||||
@Override |
||||
public int getFitStateInPC(ReportFitAttrProvider fitAttrProvider) { |
||||
return 0; |
||||
} |
||||
} |
@ -0,0 +1,3 @@
|
||||
表单名字 |
||||
假如访问:http://localhost:8080/WebReport/ReportServer?formlet=Form1.frm, |
||||
formName就是Form1.frm |
@ -0,0 +1,3 @@
|
||||
form name |
||||
http://localhost:8080/WebReport/ReportServer?formlet=Form1.frm£¬ |
||||
formName is Form1.frm |
@ -0,0 +1,89 @@
|
||||
|
||||
apply plugin: 'java' |
||||
tasks.withType(JavaCompile){ |
||||
options.encoding = 'UTF-8' |
||||
} |
||||
//指定构建的jdk版本 |
||||
sourceCompatibility=1.8 |
||||
//指定生成的jar包版本 |
||||
version='8.0' |
||||
|
||||
def srcDir="." |
||||
|
||||
|
||||
//指明生成jar包的名字 |
||||
jar{ |
||||
baseName='fr-designer-report' |
||||
} |
||||
//源码所在位置 |
||||
sourceSets{ |
||||
main{ |
||||
java{ |
||||
srcDirs=["${srcDir}/src", |
||||
"${srcDir}/../designer/src"] |
||||
} |
||||
} |
||||
} |
||||
|
||||
//获取什么分支名 |
||||
FileTree files =fileTree(dir:'./',include:'build.*.gradle') |
||||
def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) |
||||
buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) |
||||
def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) |
||||
|
||||
//显示依赖jar包 |
||||
FileTree f=fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") |
||||
f.each{File file-> |
||||
println "----${f.path}" |
||||
} |
||||
|
||||
//声明外部依赖 |
||||
dependencies{ |
||||
compile fileTree(dir:"../../../finereport-lib-stable/${branchName}",include:'**/*.jar') |
||||
compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") |
||||
testCompile 'junit:junit:4.12' |
||||
} |
||||
|
||||
//指明无法编译文件所在路径 |
||||
def dataContent ={def dir -> |
||||
copySpec{ |
||||
from ("${dir}"){ |
||||
exclude '**/.setting/**','.classpath','.project','**/*.java','**/*.db','**/*.g','**/package.html' |
||||
} |
||||
} |
||||
} |
||||
|
||||
//将非.java文件复制到classes文件夹下 参与打包 |
||||
task copyFile(type:Copy,dependsOn:compileJava){ |
||||
copy{ |
||||
with dataContent.call("${srcDir}/src") |
||||
with dataContent.call("${srcDir}/../designer/src") |
||||
into ('build/classes/main') |
||||
} |
||||
|
||||
} |
||||
|
||||
|
||||
//压缩项目中的js文件 |
||||
task compressJS{ |
||||
ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ |
||||
classpath { |
||||
|
||||
fileset(dir:'../../../finereport-lib4build-stable',includes:'**/*.jar') |
||||
} |
||||
} |
||||
ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false", charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ |
||||
fileset (dir:"${srcDir}/src"){ |
||||
include (name:'**/*.js') |
||||
include (name:'**/*.css') |
||||
|
||||
} |
||||
fileset (dir:"${srcDir}/../designer/src"){ |
||||
include (name:'**/*.js') |
||||
include (name:'**/*.css') |
||||
} |
||||
|
||||
} |
||||
} |
||||
jar.dependsOn compressJS |
||||
|
Loading…
Reference in new issue