Browse Source

优化js编译过程

pull/7/head
imp 2 years ago
parent
commit
49fcf0d19b
  1. 3
      plugin-demo/build.gradle
  2. 3
      plugin-demo/readme.md
  3. 6
      plugin-demo/src/main/resources/com/finebi/plugin/web/js/chart.js
  4. 6
      readme.md
  5. BIN
      tip/version.png

3
plugin-demo/build.gradle

@ -21,6 +21,7 @@ ext {
pluginVersion = pluginInfo.version
outputPath = "$projectDir/../webroot/WEB-INF/plugins/plugin-" + pluginName + "-1.0/classes"
webPath = "$projectDir/../plugin-demo/src/main/resources/com/finebi/plugin/web"
}
group = 'com.fr.plugin'
@ -45,6 +46,8 @@ ant.references["compile.classpath"] = ant.path {
classes.dependsOn('clean')
task copyFiles(type: Copy,dependsOn: 'classes'){
(new File("$webPath/js/chart.js")).text = files("$webPath/scripts/bi.chart.provider.js", "$webPath/scripts/echarts.js").collect{it.getText()}.join("\n")
from outputPath
into "$projectDir/classes"
}

3
plugin-demo/readme.md

@ -10,3 +10,6 @@
![联动效果](./screenshots/link.png)
+ 前端代码结构
com/finebi/plugin/web/js/chart.js在插件打包过程中由com/finebi/plugin/web/js/scripts中的js拼接得到

6
plugin-demo/src/main/resources/com/finebi/plugin/web/js/chart.js

@ -1,6 +1,6 @@
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
factory();
factory();
}(function () { 'use strict';
var config = {
@ -646,8 +646,8 @@
// this.dimensionTrigger(dimensionPara);
this.chart.on("click", function(para) {
self.dimensionTrigger({
dId: para.seriesId,
value: [{dId: para.seriesId, text: para.name}]
dId: para.seriesId,
value: [{dId: para.seriesId, text: para.name}]
});
});

6
readme.md

@ -34,12 +34,14 @@
## 修改依赖的jar版本
只需要更改build.gradle中的fineVersion和finebiVersion变量即可。
官网BI下载,5.1.22和5.1.23有问题,可以从CRM上下载5.1.21或5.24之后的版本
版本查看:CRM-环境信息-报表&BI jar包下载
![对应版本](./tip/version.png)
Maven仓库确认[版本jar包](http://mvn.finedevelop.com/#browse/browse:fanruan-release)
fineVersion=10.0.2020.06.08
finebiVersion=5.1.2020.06.15
fineVersion=11.0.3.2022.03.02
finebiVersion=5.1.21.2022.03.01
## 新增插件项目

BIN
tip/version.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 526 KiB

After

Width:  |  Height:  |  Size: 102 KiB

Loading…
Cancel
Save