Browse Source

提交demo代码

10.0
hugh 4 years ago
parent
commit
9932e78f89
  1. 6
      README.md
  2. 124
      build.gradle
  3. 13
      encrypt.xml
  4. 32
      plugin.xml
  5. 31
      src/main/java/com/tptj/demo/hg/web/resource/CommonDemo.java
  6. 24
      src/main/java/com/tptj/demo/hg/web/resource/ConnectionDemo.java
  7. 25
      src/main/java/com/tptj/demo/hg/web/resource/DataSetDemo.java
  8. 24
      src/main/java/com/tptj/demo/hg/web/resource/DecisionDemo.java
  9. 86
      src/main/java/com/tptj/demo/hg/web/resource/Demo.java
  10. 23
      src/main/java/com/tptj/demo/hg/web/resource/DeployDemo.java
  11. 24
      src/main/java/com/tptj/demo/hg/web/resource/DirectoryDemo.java
  12. 24
      src/main/java/com/tptj/demo/hg/web/resource/EncryptionDemo.java
  13. 23
      src/main/java/com/tptj/demo/hg/web/resource/FormDemo.java
  14. 24
      src/main/java/com/tptj/demo/hg/web/resource/InitializationDemo.java
  15. 28
      src/main/java/com/tptj/demo/hg/web/resource/JsClassDemo.java
  16. 25
      src/main/java/com/tptj/demo/hg/web/resource/JsClassSimpleDemo.java
  17. 21
      src/main/java/com/tptj/demo/hg/web/resource/JsConfigClass.java
  18. 24
      src/main/java/com/tptj/demo/hg/web/resource/LoginDemo.java
  19. 24
      src/main/java/com/tptj/demo/hg/web/resource/MapEditDemo.java
  20. 25
      src/main/java/com/tptj/demo/hg/web/resource/MigrationDemo.java
  21. 24
      src/main/java/com/tptj/demo/hg/web/resource/PrivilegeDemo.java
  22. 24
      src/main/java/com/tptj/demo/hg/web/resource/ReportDemo.java
  23. 24
      src/main/java/com/tptj/demo/hg/web/resource/ScheduleDemo.java
  24. 23
      src/main/java/com/tptj/demo/hg/web/resource/UserDemo.java
  25. 24
      src/main/java/com/tptj/demo/hg/web/resource/WorkflowDemo.java
  26. 8
      src/main/resources/com/tptj/demo/hg/web/resource/common.js
  27. 8
      src/main/resources/com/tptj/demo/hg/web/resource/connection.js
  28. 8
      src/main/resources/com/tptj/demo/hg/web/resource/dataset.js
  29. 8
      src/main/resources/com/tptj/demo/hg/web/resource/decision.js
  30. 0
      src/main/resources/com/tptj/demo/hg/web/resource/demo.css
  31. BIN
      src/main/resources/com/tptj/demo/hg/web/resource/demo.png
  32. 8
      src/main/resources/com/tptj/demo/hg/web/resource/deploy.js
  33. 8
      src/main/resources/com/tptj/demo/hg/web/resource/directory.js
  34. 3
      src/main/resources/com/tptj/demo/hg/web/resource/dynamic.css
  35. 8
      src/main/resources/com/tptj/demo/hg/web/resource/dynamic.js
  36. 8
      src/main/resources/com/tptj/demo/hg/web/resource/encryption.js
  37. 8
      src/main/resources/com/tptj/demo/hg/web/resource/form.js
  38. 8
      src/main/resources/com/tptj/demo/hg/web/resource/initialization.js
  39. 8
      src/main/resources/com/tptj/demo/hg/web/resource/login.js
  40. 8
      src/main/resources/com/tptj/demo/hg/web/resource/map.edit.js
  41. 8
      src/main/resources/com/tptj/demo/hg/web/resource/migration.js
  42. 8
      src/main/resources/com/tptj/demo/hg/web/resource/privilege.js
  43. 10
      src/main/resources/com/tptj/demo/hg/web/resource/report.js
  44. 8
      src/main/resources/com/tptj/demo/hg/web/resource/schedule.js
  45. 8
      src/main/resources/com/tptj/demo/hg/web/resource/user.js
  46. 8
      src/main/resources/com/tptj/demo/hg/web/resource/workflow.js

6
README.md

@ -1,5 +1,5 @@
# demo-web-resource # demo-web-resource
10.0中标准的前端开发入口的插件接口demo。 10.0中标准的前端开发入口的插件接口demo。
1、包含所有可扩展组件的demo; ####1、包含所有可扩展组件的demo;
2、包含所有文件类型、解析类型的demo; ####2、包含所有文件类型、解析类型的demo;

124
build.gradle

@ -0,0 +1,124 @@
apply plugin: 'java'
[compileJava,compileTestJava]*.options*.encoding = 'UTF-8'
ext {
/**
* jar的路径
* 1.jar需要打包到zip中,lib根目录下
* 2.jar仅仅是编译时需要lib下子目录下即可
*/
libPath = "$projectDir/../webroot/WEB-INF/lib"
/**
* class进行加密保护
*/
guard = false
def pluginInfo = getPluginInfo()
pluginPre = "fine-plugin"
pluginName = pluginInfo.id
pluginVersion = pluginInfo.version
outputPath = "$projectDir/../webroot/WEB-INF/plugins/plugin-" + pluginName + "-1.0/classes"
}
group = 'com.fr.plugin'
version = '10.0'
sourceCompatibility = '8'
sourceSets {
main {
java.outputDir = file(outputPath)
output.resourcesDir = file(outputPath)
}
}
ant.importBuild("encrypt.xml")
//ant变量
ant.projectDir = projectDir
ant.references["compile.classpath"] = ant.path {
fileset(dir: libPath, includes: '**/*.jar')
fileset(dir: ".",includes:"**/*.jar" )
}
classes.dependsOn('clean')
task copyFiles(type: Copy,dependsOn: 'classes'){
from outputPath
into "$projectDir/classes"
}
task preJar(type:Copy,dependsOn: guard ? 'compile_encrypt_javas' : 'compile_plain_javas'){
from "$projectDir/classes"
into "$projectDir/transform-classes"
include "**/*.*"
}
jar.dependsOn("preJar")
task makeJar(type: Jar,dependsOn: preJar){
from fileTree(dir: "$projectDir/transform-classes")
baseName pluginPre
appendix pluginName
version pluginVersion
destinationDir = file("$buildDir/libs")
doLast(){
delete file("$projectDir/classes")
delete file("$projectDir/transform-classes")
}
}
task copyFile(type: Copy,dependsOn: ["makeJar"]){
from "$buildDir/libs"
from("$projectDir/lib") {
include "*.jar"
}
from "$projectDir/plugin.xml"
into file("$buildDir/temp/plugin")
}
task zip(type:Zip,dependsOn:["copyFile"]){
from "$buildDir/temp/plugin"
destinationDir file("$buildDir/install")
baseName pluginPre
appendix pluginName
version pluginVersion
}
//build时包含哪些文件,
processResources {
// exclude everything
// *.css没效果
// exclude '**/*.css'
// except this file
// include 'xx.xml'
}
/*读取plugin.xml中的version*/
def getPluginInfo(){
def xmlFile = file("plugin.xml")
if (!xmlFile.exists()) {
return ["id":"none", "version":"1.0.0"]
}
def plugin = new XmlParser().parse(xmlFile)
def version = plugin.version[0].text()
def id = plugin.id[0].text()
return ["id":id,"version":version]
}
repositories {
mavenLocal()
maven {
url = uri('http://mvn.finedevelop.com/repository/maven-public/')
}
}
dependencies {
//使jar
implementation fileTree(dir: 'lib', include: ['**/*.jar'])
implementation fileTree(dir: libPath, include: ['**/*.jar'])
}

13
encrypt.xml

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project>
<target name="compile_encrypt_javas" depends="copyFiles">
<echo message="加密文件"/>
<echo message="${projectDir}"/>
<taskdef name="pretreatment" classname="com.fr.plugin.pack.PluginPretreatmentTask">
<classpath refid="compile.classpath"/>
</taskdef>
<pretreatment baseDir="${projectDir}"/>
</target>
<target name="compile_plain_javas" depends="copyFiles">
</target>
</project>

32
plugin.xml

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><plugin>
<id>com.tptj.demo.hg.web.resource.v10</id>
<name><![CDATA[ WEB组件资源 ]]></name>
<active>yes</active>
<version>1.0</version>
<env-version>10.0</env-version>
<vendor>tptj</vendor>
<jartime>2019-07-18</jartime>
<description><![CDATA[ ]]></description>
<change-notes><![CDATA[]]></change-notes>
<main-package>com.tptj.demo.hg.web.resource</main-package>
<function-recorder class="com.tptj.demo.hg.web.resource.Demo"/>
<extra-decision>
<WebResourceProvider class="com.tptj.demo.hg.web.resource.CommonDemo"/>
<WebResourceProvider class="com.tptj.demo.hg.web.resource.ConnectionDemo"/>
<WebResourceProvider class="com.tptj.demo.hg.web.resource.DataSetDemo"/>
<WebResourceProvider class="com.tptj.demo.hg.web.resource.DecisionDemo"/>
<WebResourceProvider class="com.tptj.demo.hg.web.resource.DeployDemo"/>
<WebResourceProvider class="com.tptj.demo.hg.web.resource.DirectoryDemo"/>
<WebResourceProvider class="com.tptj.demo.hg.web.resource.EncryptionDemo"/>
<WebResourceProvider class="com.tptj.demo.hg.web.resource.FormDemo"/>
<WebResourceProvider class="com.tptj.demo.hg.web.resource.InitializationDemo"/>
<WebResourceProvider class="com.tptj.demo.hg.web.resource.LoginDemo"/>
<WebResourceProvider class="com.tptj.demo.hg.web.resource.MapEditDemo"/>
<WebResourceProvider class="com.tptj.demo.hg.web.resource.MigrationDemo"/>
<WebResourceProvider class="com.tptj.demo.hg.web.resource.PrivilegeDemo"/>
<WebResourceProvider class="com.tptj.demo.hg.web.resource.ReportDemo"/>
<WebResourceProvider class="com.tptj.demo.hg.web.resource.ScheduleDemo"/>
<WebResourceProvider class="com.tptj.demo.hg.web.resource.UserDemo"/>
<WebResourceProvider class="com.tptj.demo.hg.web.resource.WorkflowDemo"/>
</extra-decision>
</plugin>

31
src/main/java/com/tptj/demo/hg/web/resource/CommonDemo.java

@ -0,0 +1,31 @@
package com.tptj.demo.hg.web.resource;
import com.fr.decision.web.CommonComponent;
import com.fr.web.struct.Atom;
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
* 1.登录页访问时在login.js加载之前会加载即在 Material.KEY 之后
* 2.进入平台主页面时加载在平台自身主体JS加载之前即在 Material.KEY 之后
* 3.进入平台地图配置时加载在地图编辑自身主体JS加载之前即在 Material.KEY 之后
* 4.http://localhost:8075/webroot/decision/directory
* 5.http://localhost:8075/webroot/decision/user
* 6.http://localhost:8075/webroot/decision/privilege
* 7.http://localhost:8075/webroot/decision/timer
* 8.http://localhost:8075/webroot/decision/workflow/authority
* 9.http://localhost:8075/webroot/decision/v10/migration/page
**/
public class CommonDemo extends Demo {
@Override
public Atom attach() {
return CommonComponent.KEY;
}
@Override
public Atom[] clients() {
return demo("common");
}
}

24
src/main/java/com/tptj/demo/hg/web/resource/ConnectionDemo.java

@ -0,0 +1,24 @@
package com.tptj.demo.hg.web.resource;
import com.fr.decision.web.ConnectionComponent;
import com.fr.web.struct.Atom;
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
* 数据源连接web组件扩展
* 1.进入平台主页面时加载在平台自身主体JS加载之后即在 CommonComponent.KEY 之后
**/
public class ConnectionDemo extends Demo {
@Override
public Atom attach() {
return ConnectionComponent.KEY;
}
@Override
public Atom[] clients() {
return demo("connection");
}
}

25
src/main/java/com/tptj/demo/hg/web/resource/DataSetDemo.java

@ -0,0 +1,25 @@
package com.tptj.demo.hg.web.resource;
import com.fr.decision.web.DataSetComponent;
import com.fr.web.struct.Atom;
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
* 服务器数据集web组件扩展
* 1.进入平台主页面时加载在平台自身主体JS加载之后即在 CommonComponent.KEY 之后
**/
public class DataSetDemo extends Demo {
@Override
public Atom attach() {
return DataSetComponent.KEY;
}
@Override
public Atom[] clients() {
return demo("dataset");
}
}

24
src/main/java/com/tptj/demo/hg/web/resource/DecisionDemo.java

@ -0,0 +1,24 @@
package com.tptj.demo.hg.web.resource;
import com.fr.decision.web.MainComponent;
import com.fr.stable.ArrayUtils;
import com.fr.web.struct.Atom;
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
* 1.进入平台主页面时加载在平台自身主体JS加载之后即在 CommonComponent.KEY 之后
**/
public class DecisionDemo extends Demo {
@Override
public Atom attach() {
return MainComponent.KEY;
}
@Override
public Atom[] clients() {
return ArrayUtils.addAll(demo("decision"),demoDynamic());
}
}

86
src/main/java/com/tptj/demo/hg/web/resource/Demo.java

@ -0,0 +1,86 @@
package com.tptj.demo.hg.web.resource;
import com.fr.decision.fun.impl.AbstractWebResourceProvider;
import com.fr.intelli.record.Focus;
import com.fr.record.analyzer.EnableMetrics;
import com.fr.web.struct.Atom;
import com.fr.web.struct.Component;
import com.fr.web.struct.browser.RequestClient;
import com.fr.web.struct.category.FileType;
import com.fr.web.struct.category.ParserType;
import com.fr.web.struct.category.ScriptPath;
import com.fr.web.struct.category.StylePath;
import java.util.ArrayList;
import java.util.List;
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
**/
@EnableMetrics
public abstract class Demo extends AbstractWebResourceProvider {
//Atom client() 接口已废弃,通过clients()兼容,以后的插件中全部都以clients实现
@Focus(id = "com.tptj.demo.hg.web.resource.v10",text = "WEB组件资源")
protected Atom[] demo(String ... names ){
List<Atom> rt = new ArrayList<Atom>(names.length);
for( String name : names ){
rt.add(new Component() {
@Override
public ScriptPath script(RequestClient client) {
return ScriptPath.build("com/tptj/demo/hg/web/resource/"+name+".js");
}
@Override
public StylePath style(RequestClient client) {
return StylePath.build("com/tptj/demo/hg/web/resource/demo.css");
}
});
}
return rt.toArray(new Atom[names.length]);
}
/**
* 组件中包含${}表达式的解析示例
* @return
*/
protected Atom demoDynamic(){
return new Component() {
@Override
public ScriptPath script(RequestClient client) {
return ScriptPath.build( "com/tptj/demo/hg/web/resource/dynamic.js", ParserType.DYNAMIC );
}
@Override
public StylePath style(RequestClient client) {
return StylePath.build("com/tptj/demo/hg/web/resource/dynamic.css",ParserType.DYNAMIC);
}
};
}
/**
* 通过class把一个java类转换成js脚本的示例
* @return
*/
protected Atom demoClass(){
return new Component() {
@Override
public ScriptPath script(RequestClient client) {
return ScriptPath.build( JsClassDemo.class.getName(), FileType.CLASS );
}
};
}
/**
* 通过class生成js脚本的简单示例
* @return
*/
protected Atom demoSimpleClass(){
return new Component() {
@Override
public ScriptPath script(RequestClient client) {
return ScriptPath.build( JsClassSimpleDemo.class.getName(), FileType.CLASS );
}
};
}
}

23
src/main/java/com/tptj/demo/hg/web/resource/DeployDemo.java

@ -0,0 +1,23 @@
package com.tptj.demo.hg.web.resource;
import com.fr.decision.web.DeployComponent;
import com.fr.web.struct.Atom;
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
* 服务器启动失效部署失败时才有用的界面没有什么插件场景会覆盖到
**/
public class DeployDemo extends Demo {
@Override
public Atom attach() {
return DeployComponent.KEY;
}
@Override
public Atom[] clients() {
return demo("deploy");
}
}

24
src/main/java/com/tptj/demo/hg/web/resource/DirectoryDemo.java

@ -0,0 +1,24 @@
package com.tptj.demo.hg.web.resource;
import com.fr.decision.web.DirectoryComponent;
import com.fr.web.struct.Atom;
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
* http://localhost:8075/webroot/decision/directory
**/
public class DirectoryDemo extends Demo {
@Override
public Atom attach() {
return DirectoryComponent.KEY;
}
@Override
public Atom[] clients() {
return demo("directory");
}
}

24
src/main/java/com/tptj/demo/hg/web/resource/EncryptionDemo.java

@ -0,0 +1,24 @@
package com.tptj.demo.hg.web.resource;
import com.fr.decision.web.EncryptionComponent;
import com.fr.web.struct.Atom;
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
* 平台切换国密的时候才可能会用到主要用于提示异常绝大部分情况下应该是没啥用处的
* 1.http://localhost:8075/webroot/decision/v10/encryption/page
**/
public class EncryptionDemo extends Demo {
@Override
public Atom attach() {
return EncryptionComponent.KEY;
}
@Override
public Atom[] clients() {
return demo("encryption");
}
}

23
src/main/java/com/tptj/demo/hg/web/resource/FormDemo.java

@ -0,0 +1,23 @@
package com.tptj.demo.hg.web.resource;
import com.fr.form.web.FormMainComponent;
import com.fr.stable.ArrayUtils;
import com.fr.web.struct.Atom;
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
* 决策报表访问时生效
**/
public class FormDemo extends Demo {
@Override
public Atom attach() {
return FormMainComponent.KEY;
}
@Override
public Atom[] clients() {
return ArrayUtils.addAll(demo("form"),demoDynamic());
}
}

24
src/main/java/com/tptj/demo/hg/web/resource/InitializationDemo.java

@ -0,0 +1,24 @@
package com.tptj.demo.hg.web.resource;
import com.fr.decision.web.InitializationComponent;
import com.fr.web.struct.Atom;
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
* 如果系统没有初始化的情况下才会执行
* http://localhost:8075/webroot/decision/login/initialization
**/
public class InitializationDemo extends Demo {
@Override
public Atom attach() {
return InitializationComponent.KEY;
}
@Override
public Atom[] clients() {
return demo("initialization");
}
}

28
src/main/java/com/tptj/demo/hg/web/resource/JsClassDemo.java

@ -0,0 +1,28 @@
package com.tptj.demo.hg.web.resource;
import com.fr.decision.web.util.JavaScriptWriter;
import com.fr.gen.TextGenerator;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-10
**/
public class JsClassDemo implements TextGenerator {
@Override
public String text(HttpServletRequest request, HttpServletResponse response) throws Exception {
//可以将一个class里面的静态变量转换成JS配置的代码
StringBuilder sb = JavaScriptWriter.write(new Class[]{JsConfigClass.class},
"DemoCfg",
"Demo=window.Demo||{};Demo.Config=DemoCfg={};");
return sb.toString();
}
@Override
public String mimeType() {
return "text/javascript";
}
}

25
src/main/java/com/tptj/demo/hg/web/resource/JsClassSimpleDemo.java

@ -0,0 +1,25 @@
package com.tptj.demo.hg.web.resource;
import com.fr.gen.TextGenerator;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-10
**/
public class JsClassSimpleDemo implements TextGenerator {
@Override
public String text(HttpServletRequest request, HttpServletResponse response) throws Exception {
return "!(function () {\n" +
" console.info(\"JsClassSimpleDemo JS Running!\");\n" +
"})();";
}
@Override
public String mimeType() {
return "text/javascript";
}
}

21
src/main/java/com/tptj/demo/hg/web/resource/JsConfigClass.java

@ -0,0 +1,21 @@
package com.tptj.demo.hg.web.resource;
import java.util.Date;
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-10
**/
public class JsConfigClass {
public static String key1 = "asd";
public static boolean key2 = false;
public static int key3 = 100;
public static class key4{
public static String key1 = "asd";
public static boolean key2 = false;
public static int key3 = 100;
//日期类的需要转换成文本或者数字存储!
public static long date = System.currentTimeMillis();
}
}

24
src/main/java/com/tptj/demo/hg/web/resource/LoginDemo.java

@ -0,0 +1,24 @@
package com.tptj.demo.hg.web.resource;
import com.fr.decision.web.LoginComponent;
import com.fr.stable.ArrayUtils;
import com.fr.web.struct.Atom;
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
* 1.登录页访问时在login.js加载之后会加载即在 CommonComponent.KEY 之后
**/
public class LoginDemo extends Demo {
@Override
public Atom attach() {
return LoginComponent.KEY;
}
@Override
public Atom[] clients() {
return ArrayUtils.addAll(demo("login"),demoDynamic(),demoClass(),demoSimpleClass());
}
}

24
src/main/java/com/tptj/demo/hg/web/resource/MapEditDemo.java

@ -0,0 +1,24 @@
package com.tptj.demo.hg.web.resource;
import com.fr.decision.web.MapEditComponent;
import com.fr.web.struct.Atom;
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
* 地图编辑web组件扩展
* 1.地图编辑打开时在CommonComponent.KEY 之后执行MapEditComponent.KEY 再执行MapEditDemo
**/
public class MapEditDemo extends Demo {
@Override
public Atom attach() {
return MapEditComponent.KEY;
}
@Override
public Atom[] clients() {
return demo("map.edit");
}
}

25
src/main/java/com/tptj/demo/hg/web/resource/MigrationDemo.java

@ -0,0 +1,25 @@
package com.tptj.demo.hg.web.resource;
import com.fr.decision.web.MigrationComponent;
import com.fr.web.struct.Atom;
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
* 数据库迁移组件web资源扩展
* http://localhost:8075/webroot/decision/v10/migration/page
* 迁移过程中的效果页面可以修改
**/
public class MigrationDemo extends Demo {
@Override
public Atom attach() {
return MigrationComponent.KEY;
}
@Override
public Atom[] clients() {
return demo("migration");
}
}

24
src/main/java/com/tptj/demo/hg/web/resource/PrivilegeDemo.java

@ -0,0 +1,24 @@
package com.tptj.demo.hg.web.resource;
import com.fr.decision.web.PrivilegeComponent;
import com.fr.web.struct.Atom;
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
* 权限管理web组件扩展
* 1.http://localhost:8075/webroot/decision/privilege
**/
public class PrivilegeDemo extends Demo {
@Override
public Atom attach() {
return PrivilegeComponent.KEY;
}
@Override
public Atom[] clients() {
return demo("privilege");
}
}

24
src/main/java/com/tptj/demo/hg/web/resource/ReportDemo.java

@ -0,0 +1,24 @@
package com.tptj.demo.hg.web.resource;
import com.fr.report.web.ReportMainComponent;
import com.fr.stable.ArrayUtils;
import com.fr.web.struct.Atom;
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
* cpt报表访问时引入JS
**/
public class ReportDemo extends Demo {
@Override
public Atom attach() {
return ReportMainComponent.KEY;
}
@Override
public Atom[] clients() {
return ArrayUtils.addAll(demo("report"),demoDynamic());
}
}

24
src/main/java/com/tptj/demo/hg/web/resource/ScheduleDemo.java

@ -0,0 +1,24 @@
package com.tptj.demo.hg.web.resource;
import com.fr.schedule.feature.ScheduleComponent;
import com.fr.web.struct.Atom;
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
* 定时调度WEB组件扩展单独集成
* http://localhost:8075/webroot/decision/timer
**/
public class ScheduleDemo extends Demo {
@Override
public Atom attach() {
return ScheduleComponent.KEY;
}
@Override
public Atom[] clients() {
return demo("schedule");
}
}

23
src/main/java/com/tptj/demo/hg/web/resource/UserDemo.java

@ -0,0 +1,23 @@
package com.tptj.demo.hg.web.resource;
import com.fr.decision.web.UserComponent;
import com.fr.web.struct.Atom;
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
* 1.http://localhost:8075/webroot/decision/user
**/
public class UserDemo extends Demo {
@Override
public Atom attach() {
return UserComponent.KEY;
}
@Override
public Atom[] clients() {
return demo("user");
}
}

24
src/main/java/com/tptj/demo/hg/web/resource/WorkflowDemo.java

@ -0,0 +1,24 @@
package com.tptj.demo.hg.web.resource;
import com.fr.decision.web.WorkflowComponent;
import com.fr.web.struct.Atom;
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
* 多级上报权限控制单独集成时有效
* http://localhost:8075/webroot/decision/workflow/authority
**/
public class WorkflowDemo extends Demo {
@Override
public Atom attach() {
return WorkflowComponent.KEY;
}
@Override
public Atom[] clients() {
return demo("workflow");
}
}

8
src/main/resources/com/tptj/demo/hg/web/resource/common.js

@ -0,0 +1,8 @@
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
**/
!(function () {
console.info("Common JS Running!");
})();

8
src/main/resources/com/tptj/demo/hg/web/resource/connection.js

@ -0,0 +1,8 @@
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
**/
!(function () {
console.info("Connection JS Running!");
})();

8
src/main/resources/com/tptj/demo/hg/web/resource/dataset.js

@ -0,0 +1,8 @@
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
**/
!(function () {
console.info("DataSet JS Is Running!");
})();

8
src/main/resources/com/tptj/demo/hg/web/resource/decision.js

@ -0,0 +1,8 @@
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
**/
!(function () {
console.info("Decision JS Running!");
})();

0
src/main/resources/com/tptj/demo/hg/web/resource/demo.css

BIN
src/main/resources/com/tptj/demo/hg/web/resource/demo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

8
src/main/resources/com/tptj/demo/hg/web/resource/deploy.js

@ -0,0 +1,8 @@
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
**/
!(function () {
console.info("Deploy JS Running!");
})();

8
src/main/resources/com/tptj/demo/hg/web/resource/directory.js

@ -0,0 +1,8 @@
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
**/
!(function () {
console.info("Directory JS Is Running!");
})();

3
src/main/resources/com/tptj/demo/hg/web/resource/dynamic.css

@ -0,0 +1,3 @@
body{
background: url('${fineServletURL}/view/report?op=resource&resource=/com/tptj/demo/hg/web/resource/demo.png')
}

8
src/main/resources/com/tptj/demo/hg/web/resource/dynamic.js

@ -0,0 +1,8 @@
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-16
**/
!(function () {
console.info("${fineServletURL}");
})();

8
src/main/resources/com/tptj/demo/hg/web/resource/encryption.js

@ -0,0 +1,8 @@
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
**/
!(function () {
console.info("Encryption JS Is Running!");
})();

8
src/main/resources/com/tptj/demo/hg/web/resource/form.js

@ -0,0 +1,8 @@
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
**/
!(function () {
console.info("Form JS Running!");
})();

8
src/main/resources/com/tptj/demo/hg/web/resource/initialization.js

@ -0,0 +1,8 @@
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
**/
!(function () {
console.info("Initialization JS Running!");
})();

8
src/main/resources/com/tptj/demo/hg/web/resource/login.js

@ -0,0 +1,8 @@
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
**/
!(function () {
console.info("Login JS Running!");
})();

8
src/main/resources/com/tptj/demo/hg/web/resource/map.edit.js

@ -0,0 +1,8 @@
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
**/
!(function () {
console.info("Map.Edit JS Is Running!");
})();

8
src/main/resources/com/tptj/demo/hg/web/resource/migration.js

@ -0,0 +1,8 @@
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
**/
!(function () {
console.info("Migration JS Running!");
})();

8
src/main/resources/com/tptj/demo/hg/web/resource/privilege.js

@ -0,0 +1,8 @@
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
**/
!(function () {
console.info("Privilege JS Running!");
})();

10
src/main/resources/com/tptj/demo/hg/web/resource/report.js

@ -0,0 +1,10 @@
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-08
**/
!(function () {
FR.test = function(){
};
console.info("Report JS Running!");
})();

8
src/main/resources/com/tptj/demo/hg/web/resource/schedule.js

@ -0,0 +1,8 @@
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
**/
!(function () {
console.info("Schedule JS Is Running!");
})();

8
src/main/resources/com/tptj/demo/hg/web/resource/user.js

@ -0,0 +1,8 @@
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
**/
!(function () {
console.info("User JS Is Running!");
})();

8
src/main/resources/com/tptj/demo/hg/web/resource/workflow.js

@ -0,0 +1,8 @@
/**
* @author 秃破天际
* @version 10.0
* Created by 秃破天际 on 2021-03-09
**/
!(function () {
console.info("Workflow JS Is Running!");
})();
Loading…
Cancel
Save