Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
ea43644f
提交
ea43644f
authored
4月 17, 2022
作者:
taojinlong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 支持数据源插件
上级
8f9b355b
显示空白字符变更
内嵌
并排
正在显示
20 个修改的文件
包含
179 行增加
和
192 行删除
+179
-192
pom.xml
backend/pom.xml
+39
-39
DeFileUtils.java
.../src/main/java/io/dataease/commons/utils/DeFileUtils.java
+46
-0
ZipUtils.java
...end/src/main/java/io/dataease/commons/utils/ZipUtils.java
+1
-5
DatasourceDTO.java
backend/src/main/java/io/dataease/dto/DatasourceDTO.java
+2
-0
MyPluginDTO.java
backend/src/main/java/io/dataease/dto/MyPluginDTO.java
+9
-0
ProviderFactory.java
...d/src/main/java/io/dataease/provider/ProviderFactory.java
+12
-17
JdbcProvider.java
...in/java/io/dataease/provider/datasource/JdbcProvider.java
+1
-1
MaxCompute.java
...main/java/io/dataease/provider/datasource/MaxCompute.java
+0
-83
MaxcomputeConfig.java
...ava/io/dataease/provider/datasource/MaxcomputeConfig.java
+0
-14
DatasourceService.java
...ava/io/dataease/service/datasource/DatasourceService.java
+15
-5
PluginService.java
.../src/main/java/io/dataease/service/sys/PluginService.java
+19
-6
dataset.js
frontend/src/api/dataset/dataset.js
+0
-1
index.vue
frontend/src/components/AsyncComponent/index.vue
+1
-1
en.js
frontend/src/lang/en.js
+2
-2
tw.js
frontend/src/lang/tw.js
+1
-1
AddDB.vue
frontend/src/views/dataset/add/AddDB.vue
+3
-4
AddSQL.vue
frontend/src/views/dataset/add/AddSQL.vue
+2
-2
DsConfiguration.vue
frontend/src/views/system/datasource/DsConfiguration.vue
+2
-3
form.vue
frontend/src/views/system/datasource/form.vue
+23
-7
PluginCom.vue
frontend/src/views/system/plugin/PluginCom.vue
+1
-1
没有找到文件。
backend/pom.xml
浏览文件 @
ea43644f
...
@@ -486,45 +486,45 @@
...
@@ -486,45 +486,45 @@
<build>
<build>
<plugins>
<plugins>
<!-- <plugin>--
>
<plugin
>
<!-- <groupId>org.apache.maven.plugins</groupId>--
>
<groupId>
org.apache.maven.plugins
</groupId
>
<!-- <artifactId>maven-antrun-plugin</artifactId>--
>
<artifactId>
maven-antrun-plugin
</artifactId
>
<!-- <executions>--
>
<executions
>
<!-- <execution>--
>
<execution
>
<!-- <?m2e execute onConfiguration?>--
>
<?m2e execute onConfiguration?
>
<!-- <id>main-class-placement</id>--
>
<id>
main-class-placement
</id
>
<!-- <phase>generate-resources</phase>--
>
<phase>
generate-resources
</phase
>
<!-- <configuration>--
>
<configuration
>
<!-- <target>--
>
<target
>
<!-- <move todir="src/main/resources/static">--
>
<move
todir=
"src/main/resources/static"
>
<!-- <fileset dir="../frontend/dist">--
>
<fileset
dir=
"../frontend/dist"
>
<!-- <exclude name="*.html"/>--
>
<exclude
name=
"*.html"
/
>
<!-- </fileset>--
>
</fileset
>
<!-- </move>--
>
</move
>
<!-- <move todir="src/main/resources/templates">--
>
<move
todir=
"src/main/resources/templates"
>
<!-- <fileset dir="../frontend/dist">--
>
<fileset
dir=
"../frontend/dist"
>
<!-- <include name="*.html"/>--
>
<include
name=
"*.html"
/
>
<!-- </fileset>--
>
</fileset
>
<!-- </move>--
>
</move
>
<!-- <copy todir="src/main/resources/static/de-app">--
>
<copy
todir=
"src/main/resources/static/de-app"
>
<!-- <fileset dir="../mobile/dist">--
>
<fileset
dir=
"../mobile/dist"
>
<!-- <exclude name="*.html"/>--
>
<exclude
name=
"*.html"
/
>
<!-- </fileset>--
>
</fileset
>
<!-- </copy>--
>
</copy
>
<!-- <copy file="../mobile/dist/index.html" tofile="src/main/resources/templates/app.html" />--
>
<copy
file=
"../mobile/dist/index.html"
tofile=
"src/main/resources/templates/app.html"
/
>
<!-- </target>--
>
</target
>
<!-- </configuration>--
>
</configuration
>
<!-- <goals>--
>
<goals
>
<!-- <goal>run</goal>--
>
<goal>
run
</goal
>
<!-- </goals>--
>
</goals
>
<!-- </execution>--
>
</execution
>
<!-- </executions>--
>
</executions
>
<!-- </plugin>--
>
</plugin
>
</plugins>
</plugins>
</build>
</build>
</profile>
</profile>
...
...
backend/src/main/java/io/dataease/commons/utils/DeFileUtils.java
浏览文件 @
ea43644f
...
@@ -65,6 +65,52 @@ public class DeFileUtils {
...
@@ -65,6 +65,52 @@ public class DeFileUtils {
}
}
return
null
;
return
null
;
}
}
public
static
void
copyFolder
(
String
sourcePath
,
String
targetPath
)
throws
Exception
{
//源文件夹路径
File
sourceFile
=
new
File
(
sourcePath
);
//目标文件夹路径
File
targetFile
=
new
File
(
targetPath
);
if
(!
sourceFile
.
exists
()){
throw
new
Exception
(
"文件夹不存在"
);
}
if
(!
sourceFile
.
isDirectory
()){
throw
new
Exception
(
"源文件夹不是目录"
);
}
if
(!
targetFile
.
exists
()){
targetFile
.
mkdirs
();
}
if
(!
targetFile
.
isDirectory
()){
throw
new
Exception
(
"目标文件夹不是目录"
);
}
File
[]
files
=
sourceFile
.
listFiles
();
if
(
files
==
null
||
files
.
length
==
0
){
return
;
}
for
(
File
file
:
files
){
//文件要移动的路径
String
movePath
=
targetFile
+
File
.
separator
+
file
.
getName
();
if
(
file
.
isDirectory
()){
//如果是目录则递归调用
copyFolder
(
file
.
getAbsolutePath
(),
movePath
);
}
else
{
//如果是文件则复制文件
BufferedInputStream
in
=
new
BufferedInputStream
(
new
FileInputStream
(
file
));
BufferedOutputStream
out
=
new
BufferedOutputStream
(
new
FileOutputStream
(
movePath
));
byte
[]
b
=
new
byte
[
1024
];
int
temp
=
0
;
while
((
temp
=
in
.
read
(
b
))
!=
-
1
){
out
.
write
(
b
,
0
,
temp
);
}
out
.
close
();
in
.
close
();
}
}
}
public
static
String
copy
(
File
source
,
String
targetDir
)
throws
IOException
{
public
static
String
copy
(
File
source
,
String
targetDir
)
throws
IOException
{
String
name
=
source
.
getName
();
String
name
=
source
.
getName
();
...
...
backend/src/main/java/io/dataease/commons/utils/ZipUtils.java
浏览文件 @
ea43644f
...
@@ -56,12 +56,9 @@ public class ZipUtils {
...
@@ -56,12 +56,9 @@ public class ZipUtils {
}
}
public
static
void
unzip
(
File
source
,
String
out
)
throws
IOException
{
public
static
void
unzip
(
File
source
,
String
out
)
throws
IOException
{
try
(
ZipInputStream
zis
=
new
ZipInputStream
(
new
FileInputStream
(
source
)))
{
ZipInputStream
zis
=
new
ZipInputStream
(
new
FileInputStream
(
source
));
ZipEntry
entry
=
zis
.
getNextEntry
();
ZipEntry
entry
=
zis
.
getNextEntry
();
while
(
entry
!=
null
)
{
while
(
entry
!=
null
)
{
File
file
=
protectZipSlip
(
entry
.
getName
(),
out
);
File
file
=
protectZipSlip
(
entry
.
getName
(),
out
);
if
(
entry
.
isDirectory
())
{
if
(
entry
.
isDirectory
())
{
...
@@ -89,7 +86,6 @@ public class ZipUtils {
...
@@ -89,7 +86,6 @@ public class ZipUtils {
entry
=
zis
.
getNextEntry
();
entry
=
zis
.
getNextEntry
();
}
}
}
}
}
/**
/**
* 把所有文件都直接解压到指定目录(忽略子文件夹)
* 把所有文件都直接解压到指定目录(忽略子文件夹)
...
...
backend/src/main/java/io/dataease/dto/DatasourceDTO.java
浏览文件 @
ea43644f
...
@@ -2,6 +2,7 @@ package io.dataease.dto;
...
@@ -2,6 +2,7 @@ package io.dataease.dto;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
io.dataease.plugins.common.base.domain.Datasource
;
import
io.dataease.plugins.common.base.domain.Datasource
;
import
io.dataease.plugins.common.constants.DatasourceCalculationMode
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -17,4 +18,5 @@ public class DatasourceDTO extends Datasource {
...
@@ -17,4 +18,5 @@ public class DatasourceDTO extends Datasource {
private
String
privileges
;
private
String
privileges
;
private
JSONArray
apiConfiguration
;
private
JSONArray
apiConfiguration
;
private
String
typeDesc
;
private
String
typeDesc
;
private
DatasourceCalculationMode
calculationMode
;
}
}
backend/src/main/java/io/dataease/dto/MyPluginDTO.java
0 → 100644
浏览文件 @
ea43644f
package
io
.
dataease
.
dto
;
import
io.dataease.plugins.common.base.domain.MyPlugin
;
import
lombok.Data
;
@Data
public
class
MyPluginDTO
extends
MyPlugin
{
private
String
require
=
"1.9.0"
;
}
backend/src/main/java/io/dataease/provider/ProviderFactory.java
浏览文件 @
ea43644f
...
@@ -24,27 +24,17 @@ public class ProviderFactory implements ApplicationContextAware {
...
@@ -24,27 +24,17 @@ public class ProviderFactory implements ApplicationContextAware {
this
.
context
=
ctx
;
this
.
context
=
ctx
;
for
(
final
DatasourceTypes
d:
DatasourceTypes
.
values
())
{
for
(
final
DatasourceTypes
d:
DatasourceTypes
.
values
())
{
final
ConfigurableListableBeanFactory
beanFactory
=
((
ConfigurableApplicationContext
)
context
).
getBeanFactory
();
final
ConfigurableListableBeanFactory
beanFactory
=
((
ConfigurableApplicationContext
)
context
).
getBeanFactory
();
DataSourceType
dataSourceType
=
new
DataSourceType
();
if
(
d
.
isDatasource
()){
dataSourceType
.
setType
(
d
.
getType
());
DataSourceType
dataSourceType
=
new
DataSourceType
(
d
.
getType
(),
d
.
getName
(),
false
,
d
.
getExtraParams
(),
d
.
getCalculationMode
());
dataSourceType
.
setName
(
d
.
getName
());
dataSourceType
.
setAliasPrefix
(
d
.
getAliasPrefix
());
dataSourceType
.
setAliasSuffix
(
d
.
getAliasSuffix
());
dataSourceType
.
setKeywordPrefix
(
d
.
getKeywordPrefix
());
dataSourceType
.
setKeywordSuffix
(
d
.
getKeywordSuffix
());
dataSourceType
.
setPlugin
(
false
);
dataSourceType
.
setExtraParams
(
d
.
getExtraParams
());
System
.
out
.
println
(
new
Gson
().
toJson
(
dataSourceType
));
beanFactory
.
registerSingleton
(
d
.
getType
(),
dataSourceType
);
beanFactory
.
registerSingleton
(
d
.
getType
(),
dataSourceType
);
}
}
}
}
}
public
static
Provider
getProvider
(
String
type
)
{
public
static
Provider
getProvider
(
String
type
)
{
Map
<
String
,
DataSourceType
>
dataSourceTypeMap
=
SpringContextUtil
.
getApplicationContext
().
getBeansOfType
((
DataSourceType
.
class
));
Map
<
String
,
DataSourceType
>
dataSourceTypeMap
=
SpringContextUtil
.
getApplicationContext
().
getBeansOfType
((
DataSourceType
.
class
));
if
(
dataSourceTypeMap
.
get
(
type
).
isPlugin
()){
if
(
dataSourceTypeMap
.
keySet
().
contains
(
type
)){
return
context
.
getBean
(
type
,
Provider
.
class
);
}
DatasourceTypes
datasourceType
=
DatasourceTypes
.
valueOf
(
type
);
DatasourceTypes
datasourceType
=
DatasourceTypes
.
valueOf
(
type
);
switch
(
datasourceType
)
{
switch
(
datasourceType
)
{
case
es:
case
es:
...
@@ -56,11 +46,13 @@ public class ProviderFactory implements ApplicationContextAware {
...
@@ -56,11 +46,13 @@ public class ProviderFactory implements ApplicationContextAware {
}
}
}
}
return
SpringContextUtil
.
getApplicationContext
().
getBean
(
type
+
"DsProvider"
,
Provider
.
class
);
}
public
static
QueryProvider
getQueryProvider
(
String
type
)
{
public
static
QueryProvider
getQueryProvider
(
String
type
)
{
Map
<
String
,
DataSourceType
>
dataSourceTypeMap
=
SpringContextUtil
.
getApplicationContext
().
getBeansOfType
((
DataSourceType
.
class
));
Map
<
String
,
DataSourceType
>
dataSourceTypeMap
=
SpringContextUtil
.
getApplicationContext
().
getBeansOfType
((
DataSourceType
.
class
));
if
(
dataSourceTypeMap
.
get
(
type
).
isPlugin
()){
if
(
dataSourceTypeMap
.
keySet
().
contains
(
type
)){
return
context
.
getBean
(
type
,
QueryProvider
.
class
);
}
DatasourceTypes
datasourceType
=
DatasourceTypes
.
valueOf
(
type
);
DatasourceTypes
datasourceType
=
DatasourceTypes
.
valueOf
(
type
);
switch
(
datasourceType
)
{
switch
(
datasourceType
)
{
case
mysql:
case
mysql:
...
@@ -100,6 +92,9 @@ public class ProviderFactory implements ApplicationContextAware {
...
@@ -100,6 +92,9 @@ public class ProviderFactory implements ApplicationContextAware {
}
}
}
}
return
SpringContextUtil
.
getApplicationContext
().
getBean
(
type
+
"QueryProvider"
,
QueryProvider
.
class
);
}
public
static
DDLProvider
getDDLProvider
(
String
type
)
{
public
static
DDLProvider
getDDLProvider
(
String
type
)
{
DatasourceTypes
datasourceType
=
DatasourceTypes
.
valueOf
(
type
);
DatasourceTypes
datasourceType
=
DatasourceTypes
.
valueOf
(
type
);
switch
(
datasourceType
)
{
switch
(
datasourceType
)
{
...
...
backend/src/main/java/io/dataease/provider/datasource/JdbcProvider.java
浏览文件 @
ea43644f
...
@@ -34,7 +34,7 @@ public class JdbcProvider extends DefaultJdbcProvider {
...
@@ -34,7 +34,7 @@ public class JdbcProvider extends DefaultJdbcProvider {
return
false
;
return
false
;
}
}
@Override
@Override
public
String
get
Nam
e
(){
public
String
get
Typ
e
(){
return
"built-in"
;
return
"built-in"
;
}
}
/**
/**
...
...
backend/src/main/java/io/dataease/provider/datasource/MaxCompute.java
deleted
100644 → 0
浏览文件 @
8f9b355b
package
io
.
dataease
.
provider
.
datasource
;
import
com.alibaba.druid.pool.DruidDataSource
;
import
com.google.gson.Gson
;
import
io.dataease.plugins.common.constants.DatasourceTypes
;
import
io.dataease.plugins.common.dto.datasource.TableDesc
;
import
io.dataease.plugins.common.dto.datasource.TableField
;
import
io.dataease.plugins.common.exception.DataEaseException
;
import
io.dataease.plugins.common.request.datasource.DatasourceRequest
;
import
io.dataease.plugins.datasource.entity.JdbcConfiguration
;
import
io.dataease.plugins.datasource.provider.DefaultJdbcProvider
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.PostConstruct
;
import
java.io.File
;
import
java.io.IOException
;
import
java.net.URL
;
import
java.sql.*
;
import
java.util.*
;
@Component
(
"maxcompute"
)
public
class
MaxCompute
extends
DefaultJdbcProvider
{
@Override
public
String
getName
(){
return
"maxcompute"
;
}
@Override
public
boolean
isUseDatasourcePool
(){
return
false
;
}
@Override
public
Connection
getConnection
(
DatasourceRequest
datasourceRequest
)
throws
Exception
{
Properties
props
=
new
Properties
();
MaxcomputeConfig
maxcomputeConfig
=
new
Gson
().
fromJson
(
datasourceRequest
.
getDatasource
().
getConfiguration
(),
MaxcomputeConfig
.
class
);
String
username
=
maxcomputeConfig
.
getUsername
();
String
password
=
maxcomputeConfig
.
getPassword
();
String
driver
=
maxcomputeConfig
.
getDriver
();
String
url
=
maxcomputeConfig
.
getUrl
();
Driver
driverClass
=
(
Driver
)
extendedJdbcClassLoader
.
loadClass
(
driver
).
newInstance
();
if
(
StringUtils
.
isNotBlank
(
username
))
{
props
.
setProperty
(
"user"
,
username
);
if
(
StringUtils
.
isNotBlank
(
password
))
{
props
.
setProperty
(
"password"
,
password
);
}
}
Connection
conn
=
driverClass
.
connect
(
url
,
props
);
return
conn
;
}
@Override
public
List
<
TableDesc
>
getTables
(
DatasourceRequest
datasourceRequest
)
throws
Exception
{
List
<
TableDesc
>
tables
=
new
ArrayList
<>();
String
queryStr
=
getTablesSql
(
datasourceRequest
);
try
(
Connection
con
=
getConnectionFromPool
(
datasourceRequest
);
Statement
statement
=
con
.
createStatement
();
ResultSet
resultSet
=
statement
.
executeQuery
(
queryStr
))
{
while
(
resultSet
.
next
())
{
tables
.
add
(
getTableDesc
(
datasourceRequest
,
resultSet
));
}
}
catch
(
Exception
e
)
{
DataEaseException
.
throwException
(
e
);
}
return
tables
;
}
private
TableDesc
getTableDesc
(
DatasourceRequest
datasourceRequest
,
ResultSet
resultSet
)
throws
SQLException
{
TableDesc
tableDesc
=
new
TableDesc
();
tableDesc
.
setName
(
resultSet
.
getString
(
1
));
return
tableDesc
;
}
@Override
public
List
<
TableField
>
getTableFileds
(
DatasourceRequest
datasourceRequest
)
throws
Exception
{
datasourceRequest
.
setQuery
(
"select * from "
+
datasourceRequest
.
getTable
()
+
" limit 0"
);
return
fetchResultField
(
datasourceRequest
);
}
}
backend/src/main/java/io/dataease/provider/datasource/MaxcomputeConfig.java
deleted
100644 → 0
浏览文件 @
8f9b355b
package
io
.
dataease
.
provider
.
datasource
;
import
io.dataease.plugins.datasource.entity.JdbcConfiguration
;
import
lombok.Getter
;
import
lombok.Setter
;
import
org.apache.commons.lang3.StringUtils
;
@Getter
@Setter
public
class
MaxcomputeConfig
extends
JdbcConfiguration
{
private
String
driver
=
"com.aliyun.odps.jdbc.OdpsDriver"
;
private
String
url
;
}
backend/src/main/java/io/dataease/service/datasource/DatasourceService.java
浏览文件 @
ea43644f
...
@@ -45,6 +45,7 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -45,6 +45,7 @@ import org.springframework.transaction.annotation.Transactional;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Service
@Service
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
@@ -62,15 +63,19 @@ public class DatasourceService {
...
@@ -62,15 +63,19 @@ public class DatasourceService {
private
CommonThreadPool
commonThreadPool
;
private
CommonThreadPool
commonThreadPool
;
@Resource
@Resource
private
SysAuthService
sysAuthService
;
private
SysAuthService
sysAuthService
;
// private static List<String> dsTypes = Arrays.asList("TiDB", "StarRocks", "excel", "mysql", "hive", "impala", "mariadb", "ds_doris", "pg", "sqlServer", "oracle", "mongo", "ck", "db2", "es", "redshift", "api");
public
Collection
<
DataSourceType
>
types
(){
public
Collection
<
DataSourceType
>
types
(){
return
SpringContextUtil
.
getApplicationContext
().
getBeansOfType
((
DataSourceType
.
class
)).
values
();
Collection
<
DataSourceType
>
types
=
new
ArrayList
<>();
types
.
addAll
(
SpringContextUtil
.
getApplicationContext
().
getBeansOfType
(
DataSourceType
.
class
).
values
());
SpringContextUtil
.
getApplicationContext
().
getBeansOfType
(
io
.
dataease
.
plugins
.
datasource
.
service
.
DatasourceService
.
class
).
values
().
forEach
(
datasourceService
->
{
types
.
add
(
datasourceService
.
getDataSourceType
());
});
return
types
;
}
}
@DeCleaner
(
DePermissionType
.
DATASOURCE
)
@DeCleaner
(
DePermissionType
.
DATASOURCE
)
public
Datasource
addDatasource
(
Datasource
datasource
)
throws
Exception
{
public
Datasource
addDatasource
(
Datasource
datasource
)
throws
Exception
{
if
(!
SpringContextUtil
.
getApplicationContext
().
getBeansOfType
(
DataSourceType
.
class
).
keySet
(
).
contains
(
datasource
.
getType
())){
if
(!
types
().
stream
().
map
(
DataSourceType:
:
getType
).
collect
(
Collectors
.
toList
()
).
contains
(
datasource
.
getType
())){
throw
new
Exception
(
"Datasource type not supported."
);
throw
new
Exception
(
"Datasource type not supported."
);
}
}
checkName
(
datasource
.
getName
(),
datasource
.
getType
(),
datasource
.
getId
());
checkName
(
datasource
.
getName
(),
datasource
.
getType
(),
datasource
.
getId
());
...
@@ -104,7 +109,12 @@ public class DatasourceService {
...
@@ -104,7 +109,12 @@ public class DatasourceService {
request
.
setSort
(
"update_time desc"
);
request
.
setSort
(
"update_time desc"
);
List
<
DatasourceDTO
>
datasourceDTOS
=
extDataSourceMapper
.
queryUnion
(
request
);
List
<
DatasourceDTO
>
datasourceDTOS
=
extDataSourceMapper
.
queryUnion
(
request
);
datasourceDTOS
.
forEach
(
datasourceDTO
->
{
datasourceDTOS
.
forEach
(
datasourceDTO
->
{
datasourceDTO
.
setTypeDesc
(
SpringContextUtil
.
getApplicationContext
().
getBean
(
datasourceDTO
.
getType
(),
DataSourceType
.
class
).
getName
());
types
().
forEach
(
dataSourceType
->
{
if
(
dataSourceType
.
getType
().
equalsIgnoreCase
(
datasourceDTO
.
getType
())){
datasourceDTO
.
setTypeDesc
(
dataSourceType
.
getName
());
datasourceDTO
.
setCalculationMode
(
dataSourceType
.
getCalculationMode
());
}
});
if
(
datasourceDTO
.
getType
().
equalsIgnoreCase
(
DatasourceTypes
.
api
.
toString
())){
if
(
datasourceDTO
.
getType
().
equalsIgnoreCase
(
DatasourceTypes
.
api
.
toString
())){
JSONArray
apiDefinitionList
=
JSONObject
.
parseArray
(
datasourceDTO
.
getConfiguration
());
JSONArray
apiDefinitionList
=
JSONObject
.
parseArray
(
datasourceDTO
.
getConfiguration
());
JSONArray
apiDefinitionListWithStatus
=
new
JSONArray
();
JSONArray
apiDefinitionListWithStatus
=
new
JSONArray
();
...
@@ -165,7 +175,7 @@ public class DatasourceService {
...
@@ -165,7 +175,7 @@ public class DatasourceService {
}
}
public
void
updateDatasource
(
UpdataDsRequest
updataDsRequest
)
throws
Exception
{
public
void
updateDatasource
(
UpdataDsRequest
updataDsRequest
)
throws
Exception
{
if
(!
SpringContextUtil
.
getApplicationContext
().
getBeansOfType
(
DataSourceType
.
class
).
keySet
(
).
contains
(
updataDsRequest
.
getType
())){
if
(!
types
().
stream
().
map
(
DataSourceType:
:
getType
).
collect
(
Collectors
.
toList
()
).
contains
(
updataDsRequest
.
getType
())){
throw
new
Exception
(
"Datasource type not supported."
);
throw
new
Exception
(
"Datasource type not supported."
);
}
}
checkName
(
updataDsRequest
.
getName
(),
updataDsRequest
.
getType
(),
updataDsRequest
.
getId
());
checkName
(
updataDsRequest
.
getName
(),
updataDsRequest
.
getType
(),
updataDsRequest
.
getId
());
...
...
backend/src/main/java/io/dataease/service/sys/PluginService.java
浏览文件 @
ea43644f
...
@@ -2,6 +2,7 @@ package io.dataease.service.sys;
...
@@ -2,6 +2,7 @@ package io.dataease.service.sys;
import
cn.hutool.core.io.FileUtil
;
import
cn.hutool.core.io.FileUtil
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
io.dataease.dto.MyPluginDTO
;
import
io.dataease.ext.ExtSysPluginMapper
;
import
io.dataease.ext.ExtSysPluginMapper
;
import
io.dataease.ext.query.GridExample
;
import
io.dataease.ext.query.GridExample
;
import
io.dataease.commons.constants.AuthConstants
;
import
io.dataease.commons.constants.AuthConstants
;
...
@@ -65,13 +66,13 @@ public class PluginService {
...
@@ -65,13 +66,13 @@ public class PluginService {
* @param file
* @param file
* @return
* @return
*/
*/
public
Map
<
String
,
Object
>
localInstall
(
MultipartFile
file
)
{
public
Map
<
String
,
Object
>
localInstall
(
MultipartFile
file
)
throws
Exception
{
//1.上传文件到服务器pluginDir目录下
//1.上传文件到服务器pluginDir目录下
File
dest
=
DeFileUtils
.
upload
(
file
,
pluginDir
+
"temp/"
);
File
dest
=
DeFileUtils
.
upload
(
file
,
pluginDir
+
"temp/"
);
//2.解压目标文件dest 得到plugin.json和jar
//2.解压目标文件dest 得到plugin.json和jar
String
folder
=
pluginDir
+
"folder/"
;
String
folder
=
pluginDir
+
"folder/"
;
try
{
try
{
ZipUtils
.
u
pZipFile
(
dest
,
folder
);
ZipUtils
.
u
nzip
(
dest
,
folder
);
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
DeFileUtils
.
deleteFile
(
pluginDir
+
"temp/"
);
DeFileUtils
.
deleteFile
(
pluginDir
+
"temp/"
);
DeFileUtils
.
deleteFile
(
folder
);
DeFileUtils
.
deleteFile
(
folder
);
...
@@ -90,7 +91,7 @@ public class PluginService {
...
@@ -90,7 +91,7 @@ public class PluginService {
LogUtil
.
error
(
msg
);
LogUtil
.
error
(
msg
);
DEException
.
throwException
(
new
RuntimeException
(
msg
));
DEException
.
throwException
(
new
RuntimeException
(
msg
));
}
}
MyPlugin
myPlugin
=
formatJsonFile
(
jsonFiles
[
0
]);
MyPlugin
DTO
myPlugin
=
formatJsonFile
(
jsonFiles
[
0
]);
if
(!
versionMatch
(
myPlugin
.
getRequire
()))
{
if
(!
versionMatch
(
myPlugin
.
getRequire
()))
{
String
msg
=
"当前插件要求系统版本最低为:"
+
myPlugin
.
getRequire
();
String
msg
=
"当前插件要求系统版本最低为:"
+
myPlugin
.
getRequire
();
...
@@ -118,6 +119,9 @@ public class PluginService {
...
@@ -118,6 +119,9 @@ public class PluginService {
targetDir
=
makeTargetDir
(
myPlugin
);
targetDir
=
makeTargetDir
(
myPlugin
);
String
jarPath
;
String
jarPath
;
jarPath
=
DeFileUtils
.
copy
(
jarFile
,
targetDir
);
jarPath
=
DeFileUtils
.
copy
(
jarFile
,
targetDir
);
if
(
myPlugin
.
getCategory
().
equalsIgnoreCase
(
"datasource"
)){
DeFileUtils
.
copyFolder
(
folder
+
"/"
+
myPlugin
.
getDsType
()
+
"Driver"
,
targetDir
+
myPlugin
.
getDsType
()
+
"Driver"
);
}
loadJar
(
jarPath
,
myPlugin
);
loadJar
(
jarPath
,
myPlugin
);
myPluginMapper
.
insert
(
myPlugin
);
myPluginMapper
.
insert
(
myPlugin
);
...
@@ -192,6 +196,11 @@ public class PluginService {
...
@@ -192,6 +196,11 @@ public class PluginService {
String
path
=
pluginDir
+
plugin
.
getStore
()
+
"/"
+
fileName
;
String
path
=
pluginDir
+
plugin
.
getStore
()
+
"/"
+
fileName
;
File
jarFile
=
new
File
(
path
);
File
jarFile
=
new
File
(
path
);
FileUtil
.
del
(
jarFile
);
FileUtil
.
del
(
jarFile
);
if
(
plugin
.
getCategory
().
equalsIgnoreCase
(
"datasource"
)){
File
driverFile
=
new
File
(
pluginDir
+
plugin
.
getStore
()
+
"/"
+
plugin
.
getDsType
()
+
"Driver"
);
FileUtil
.
del
(
driverFile
);
}
}
}
/**
/**
...
@@ -224,13 +233,13 @@ public class PluginService {
...
@@ -224,13 +233,13 @@ public class PluginService {
*
*
* @return
* @return
*/
*/
private
MyPlugin
formatJsonFile
(
File
file
)
{
private
MyPlugin
DTO
formatJsonFile
(
File
file
)
{
String
str
=
DeFileUtils
.
readJson
(
file
);
String
str
=
DeFileUtils
.
readJson
(
file
);
Gson
gson
=
new
Gson
();
Gson
gson
=
new
Gson
();
Map
<
String
,
Object
>
myPlugin
=
gson
.
fromJson
(
str
,
Map
.
class
);
Map
<
String
,
Object
>
myPlugin
=
gson
.
fromJson
(
str
,
Map
.
class
);
myPlugin
.
put
(
"free"
,
(
Double
)
myPlugin
.
get
(
"free"
)
>
0.0
);
myPlugin
.
put
(
"free"
,
(
Double
)
myPlugin
.
get
(
"free"
)
>
0.0
);
myPlugin
.
put
(
"loadMybatis"
,
(
Double
)
myPlugin
.
get
(
"loadMybatis"
)
>
0.0
);
myPlugin
.
put
(
"loadMybatis"
,
myPlugin
.
get
(
"loadMybatis"
)
==
null
?
false
:
(
Double
)
myPlugin
.
get
(
"loadMybatis"
)
>
0.0
);
MyPlugin
result
=
new
MyPlugin
();
MyPlugin
DTO
result
=
new
MyPluginDTO
();
try
{
try
{
org
.
apache
.
commons
.
beanutils
.
BeanUtils
.
populate
(
result
,
myPlugin
);
org
.
apache
.
commons
.
beanutils
.
BeanUtils
.
populate
(
result
,
myPlugin
);
result
.
setInstallTime
(
System
.
currentTimeMillis
());
result
.
setInstallTime
(
System
.
currentTimeMillis
());
...
@@ -240,6 +249,10 @@ public class PluginService {
...
@@ -240,6 +249,10 @@ public class PluginService {
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
//BeanUtils.copyBean(result, myPlugin);
//BeanUtils.copyBean(result, myPlugin);
if
(
result
.
getCategory
().
equalsIgnoreCase
(
"datasource"
)){
result
.
setStore
(
"thirdpart"
);
}
return
result
;
return
result
;
}
}
...
...
frontend/src/api/dataset/dataset.js
浏览文件 @
ea43644f
...
@@ -213,5 +213,4 @@ export function checkCustomDs() {
...
@@ -213,5 +213,4 @@ export function checkCustomDs() {
loading
:
true
loading
:
true
})
})
}
}
export
const
disabledSyncDs
=
[
'es'
,
'ck'
,
'mongo'
,
'redshift'
,
'hive'
,
'impala'
]
export
default
{
loadTable
,
getScene
,
addGroup
,
delGroup
,
addTable
,
delTable
,
groupTree
,
checkCustomDs
}
export
default
{
loadTable
,
getScene
,
addGroup
,
delGroup
,
addTable
,
delTable
,
groupTree
,
checkCustomDs
}
frontend/src/components/AsyncComponent/index.vue
浏览文件 @
ea43644f
...
@@ -70,7 +70,7 @@ export default {
...
@@ -70,7 +70,7 @@ export default {
}, */
}, */
callPluginInner
(
param
)
{
callPluginInner
(
param
)
{
const
{
methodName
,
methodParam
}
=
param
const
{
methodName
,
methodParam
}
=
param
this
.
$refs
[
this
.
refId
]
&&
this
.
$refs
[
this
.
refId
][
methodName
]
&&
this
.
$refs
[
this
.
refId
][
methodName
](
methodParam
)
return
this
.
$refs
[
this
.
refId
]
&&
this
.
$refs
[
this
.
refId
][
methodName
]
&&
this
.
$refs
[
this
.
refId
][
methodName
](
methodParam
)
}
}
}
}
}
}
...
...
frontend/src/lang/en.js
浏览文件 @
ea43644f
...
@@ -2,7 +2,7 @@ export default {
...
@@ -2,7 +2,7 @@ export default {
fu
:
{
fu
:
{
search_bar
:
{
search_bar
:
{
search
:
'Search'
,
search
:
'Search'
,
adv_search
:
'Advanced search'
,
adv_search
:
'Adva
required
nced search'
,
ok
:
'Confirm'
,
ok
:
'Confirm'
,
cancel
:
'Cancel'
,
cancel
:
'Cancel'
,
please_select
:
'Please select'
,
please_select
:
'Please select'
,
...
@@ -278,7 +278,7 @@ export default {
...
@@ -278,7 +278,7 @@ export default {
id
:
'ID'
,
id
:
'ID'
,
millisecond
:
'Millisecond'
,
millisecond
:
'Millisecond'
,
cannot_be_null
:
'Cannot be null'
,
cannot_be_null
:
'Cannot be null'
,
required
:
'
{0} is r
equired'
,
required
:
'
R
equired'
,
already_exists
:
'Already Exists'
,
already_exists
:
'Already Exists'
,
modifier
:
'Modifier'
,
modifier
:
'Modifier'
,
validate
:
'Validate'
,
validate
:
'Validate'
,
...
...
frontend/src/lang/tw.js
浏览文件 @
ea43644f
...
@@ -278,7 +278,7 @@ export default {
...
@@ -278,7 +278,7 @@ export default {
id
:
'ID'
,
id
:
'ID'
,
millisecond
:
'毫秒'
,
millisecond
:
'毫秒'
,
cannot_be_null
:
'不能爲空'
,
cannot_be_null
:
'不能爲空'
,
required
:
'
{0}是必填的
'
,
required
:
'
必填
'
,
already_exists
:
'名稱不能重複'
,
already_exists
:
'名稱不能重複'
,
modifier
:
'修改人'
,
modifier
:
'修改人'
,
validate
:
'校驗'
,
validate
:
'校驗'
,
...
...
frontend/src/views/dataset/add/AddDB.vue
浏览文件 @
ea43644f
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
listDatasource
,
post
,
isKettleRunning
,
disabledSyncDs
}
from
'@/api/dataset/dataset'
import
{
listDatasource
,
post
,
isKettleRunning
}
from
'@/api/dataset/dataset'
import
{
engineMode
}
from
"@/api/system/engine"
;
import
{
engineMode
}
from
"@/api/system/engine"
;
export
default
{
export
default
{
...
@@ -93,8 +93,7 @@ export default {
...
@@ -93,8 +93,7 @@ export default {
kettleRunning
:
false
,
kettleRunning
:
false
,
selectedDatasource
:
{},
selectedDatasource
:
{},
engineMode
:
'local'
,
engineMode
:
'local'
,
disabledSync
:
true
,
disabledSync
:
true
disabledSyncDs
:
disabledSyncDs
}
}
},
},
watch
:
{
watch
:
{
...
@@ -108,7 +107,7 @@ export default {
...
@@ -108,7 +107,7 @@ export default {
if
(
this
.
options
[
i
].
id
===
val
)
{
if
(
this
.
options
[
i
].
id
===
val
)
{
this
.
selectedDatasource
=
this
.
options
[
i
]
this
.
selectedDatasource
=
this
.
options
[
i
]
this
.
mode
=
'0'
this
.
mode
=
'0'
if
(
this
.
engineMode
===
'simple'
||
(
!
this
.
kettleRunning
||
this
.
disabledSyncDs
.
indexOf
(
this
.
selectedDatasource
.
type
)
!==
-
1
))
{
if
(
this
.
engineMode
===
'simple'
||
(
!
this
.
kettleRunning
||
this
.
selectedDatasource
.
calculationMode
===
'DIRECT'
))
{
this
.
disabledSync
=
true
this
.
disabledSync
=
true
}
else
{
}
else
{
this
.
disabledSync
=
false
this
.
disabledSync
=
false
...
...
frontend/src/views/dataset/add/AddSQL.vue
浏览文件 @
ea43644f
...
@@ -99,7 +99,7 @@
...
@@ -99,7 +99,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
post
,
listDatasource
,
isKettleRunning
,
disabledSyncDs
}
from
'@/api/dataset/dataset'
import
{
post
,
listDatasource
,
isKettleRunning
}
from
'@/api/dataset/dataset'
import
{
codemirror
}
from
'vue-codemirror'
import
{
codemirror
}
from
'vue-codemirror'
import
{
getTable
}
from
'@/api/dataset/dataset'
import
{
getTable
}
from
'@/api/dataset/dataset'
// 核心样式
// 核心样式
...
@@ -206,7 +206,7 @@ export default {
...
@@ -206,7 +206,7 @@ export default {
if
(
this
.
options
[
i
].
id
===
this
.
dataSource
)
{
if
(
this
.
options
[
i
].
id
===
this
.
dataSource
)
{
this
.
selectedDatasource
=
this
.
options
[
i
]
this
.
selectedDatasource
=
this
.
options
[
i
]
this
.
mode
=
'0'
this
.
mode
=
'0'
if
(
this
.
engineMode
===
'simple'
||
(
!
this
.
kettleRunning
||
this
.
disabledSyncDs
.
indexOf
(
this
.
selectedDatasource
.
type
)
!==
-
1
))
{
if
(
this
.
engineMode
===
'simple'
||
(
!
this
.
kettleRunning
||
this
.
selectedDatasource
.
calculationMode
===
'DIRECT'
))
{
this
.
disabledSync
=
true
this
.
disabledSync
=
true
}
else
{
}
else
{
this
.
disabledSync
=
false
this
.
disabledSync
=
false
...
...
frontend/src/views/system/datasource/DsConfiguration.vue
浏览文件 @
ea43644f
...
@@ -2,9 +2,8 @@
...
@@ -2,9 +2,8 @@
<div>
<div>
<el-row>
<el-row>
<el-col>
<el-col>
<el-form
<el-form
ref=
"Ds
Form
"
ref=
"Ds
Config
"
:model=
"form"
:model=
"form"
:rules=
"rule"
:rules=
"rule"
size=
"small"
size=
"small"
...
@@ -214,7 +213,7 @@ export default {
...
@@ -214,7 +213,7 @@ export default {
disabled
:
{
disabled
:
{
type
:
Boolean
,
type
:
Boolean
,
default
()
{
default
()
{
return
tru
e
;
return
fals
e
;
}
}
},
},
method
:
String
,
method
:
String
,
...
...
frontend/src/views/system/datasource/form.vue
浏览文件 @
ea43644f
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
:model=
"form"
:model=
"form"
:rules=
"rule"
:rules=
"rule"
size=
"small"
size=
"small"
:disabled=
"
disabled
"
:disabled=
"
params && params.id && params.showModel && params.showModel === 'show' && !canEdit
"
label-width=
"180px"
label-width=
"180px"
label-position=
"right"
label-position=
"right"
>
>
...
@@ -41,7 +41,10 @@
...
@@ -41,7 +41,10 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<ds-configuration
:form=
"form"
:disabled=
"disabled"
:edit-api-item=
"edit_api_item"
></ds-configuration>
<ds-configuration
ref=
"dsConfig"
v-if=
"!datasourceType.isPlugin"
:form=
"form"
:disabled=
"params && params.id && params.showModel && params.showModel === 'show' && !canEdit"
:edit-api-item=
"edit_api_item"
></ds-configuration>
<plugin-com
ref=
"pluginDsConfig"
v-if=
"datasourceType.isPlugin"
:component-name=
"datasourceType.type"
:obj=
"{form, disabled }"
/>
</el-form>
</el-form>
...
@@ -72,13 +75,15 @@ import {$confirm} from '@/utils/message'
...
@@ -72,13 +75,15 @@ import {$confirm} from '@/utils/message'
import
i18n
from
'@/lang/index'
import
i18n
from
'@/lang/index'
import
ApiHttpRequestForm
from
'@/views/system/datasource/ApiHttpRequestForm'
import
ApiHttpRequestForm
from
'@/views/system/datasource/ApiHttpRequestForm'
import
DsConfiguration
from
"@/views/system/datasource/DsConfiguration"
;
import
DsConfiguration
from
"@/views/system/datasource/DsConfiguration"
;
import
PluginCom
from
'@/views/system/plugin/PluginCom'
export
default
{
export
default
{
name
:
'DsForm'
,
name
:
'DsForm'
,
components
:
{
components
:
{
DsConfiguration
,
DsConfiguration
,
LayoutContent
,
LayoutContent
,
ApiHttpRequestForm
ApiHttpRequestForm
,
PluginCom
},
},
props
:
{
props
:
{
params
:
{
params
:
{
...
@@ -96,7 +101,7 @@ export default {
...
@@ -96,7 +101,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
disabled
:
tru
e
,
disabled
:
fals
e
,
form
:
{
form
:
{
configuration
:
{
configuration
:
{
initialPoolSize
:
5
,
initialPoolSize
:
5
,
...
@@ -110,6 +115,7 @@ export default {
...
@@ -110,6 +115,7 @@ export default {
},
},
apiConfiguration
:
[]
apiConfiguration
:
[]
},
},
datasourceType
:
{},
rule
:
{
rule
:
{
name
:
[{
required
:
true
,
message
:
i18n
.
t
(
'datasource.input_name'
),
trigger
:
'blur'
},
name
:
[{
required
:
true
,
message
:
i18n
.
t
(
'datasource.input_name'
),
trigger
:
'blur'
},
{
min
:
2
,
max
:
25
,
message
:
i18n
.
t
(
'datasource.input_limit_2_25'
,
[
2
,
25
]),
trigger
:
'blur'
}],
{
min
:
2
,
max
:
25
,
message
:
i18n
.
t
(
'datasource.input_limit_2_25'
,
[
2
,
25
]),
trigger
:
'blur'
}],
...
@@ -229,10 +235,11 @@ export default {
...
@@ -229,10 +235,11 @@ export default {
if
(
this
.
params
&&
this
.
params
.
id
)
{
if
(
this
.
params
&&
this
.
params
.
id
)
{
const
row
=
this
.
params
const
row
=
this
.
params
this
.
edit
(
row
)
this
.
edit
(
row
)
this
.
changeType
()
}
else
{
}
else
{
this
.
create
()
this
.
create
()
if
(
this
.
params
&&
this
.
params
.
type
)
{
if
(
this
.
params
&&
this
.
params
.
type
)
{
this
.
set
Type
()
this
.
change
Type
()
}
}
}
}
this
.
disabled
=
this
.
params
&&
this
.
params
.
id
&&
this
.
params
.
showModel
&&
this
.
params
.
showModel
===
'show'
&&
!
this
.
canEdit
this
.
disabled
=
this
.
params
&&
this
.
params
.
id
&&
this
.
params
.
showModel
&&
this
.
params
.
showModel
===
'show'
&&
!
this
.
canEdit
...
@@ -252,13 +259,12 @@ export default {
...
@@ -252,13 +259,12 @@ export default {
idleConnectionTestPeriod
:
5
,
idleConnectionTestPeriod
:
5
,
connectTimeout
:
5
connectTimeout
:
5
}
}
this
.
changeType
()
},
},
changeEdit
()
{
changeEdit
()
{
this
.
canEdit
=
true
this
.
canEdit
=
true
this
.
formType
=
'modify'
this
.
formType
=
'modify'
this
.
disabled
=
this
.
params
&&
this
.
params
.
id
&&
this
.
params
.
showModel
&&
this
.
params
.
showModel
===
'show'
&&
!
this
.
canEdit
this
.
disabled
=
this
.
params
&&
this
.
params
.
id
&&
this
.
params
.
showModel
&&
this
.
params
.
showModel
===
'show'
&&
!
this
.
canEdit
console
.
log
(
this
.
disabled
)
},
},
create
()
{
create
()
{
this
.
formType
=
'add'
this
.
formType
=
'add'
...
@@ -413,6 +419,15 @@ export default {
...
@@ -413,6 +419,15 @@ export default {
this
.
$message
.
error
(
i18n
.
t
(
'datasource.port_no_less_then_0'
))
this
.
$message
.
error
(
i18n
.
t
(
'datasource.port_no_less_then_0'
))
return
return
}
}
let
status
=
null
;
if
(
this
.
datasourceType
.
isPlugin
){
status
=
this
.
$refs
[
'pluginDsConfig'
].
callPluginInner
({
methodName
:
'validate'
})
}
else
{
status
=
this
.
$refs
[
'dsConfig'
].
$refs
[
'DsConfig'
].
validate
}
if
(
!
status
){
return
;
}
this
.
$refs
.
dsForm
.
validate
(
valid
=>
{
this
.
$refs
.
dsForm
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
const
data
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
form
))
const
data
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
form
))
...
@@ -461,6 +476,7 @@ export default {
...
@@ -461,6 +476,7 @@ export default {
for
(
let
i
=
0
;
i
<
this
.
dsTypes
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
dsTypes
.
length
;
i
++
)
{
if
(
this
.
dsTypes
[
i
].
type
===
this
.
form
.
type
)
{
if
(
this
.
dsTypes
[
i
].
type
===
this
.
form
.
type
)
{
this
.
form
.
configuration
.
extraParams
=
this
.
dsTypes
[
i
].
extraParams
this
.
form
.
configuration
.
extraParams
=
this
.
dsTypes
[
i
].
extraParams
this
.
datasourceType
=
this
.
dsTypes
[
i
]
}
}
}
}
},
},
...
...
frontend/src/views/system/plugin/PluginCom.vue
浏览文件 @
ea43644f
...
@@ -83,7 +83,7 @@ export default {
...
@@ -83,7 +83,7 @@ export default {
this.$refs[this.refId] && this.$refs[this.refId].chartResize && this.$refs[this.refId].chartResize()
this.$refs[this.refId] && this.$refs[this.refId].chartResize && this.$refs[this.refId].chartResize()
}, */
}, */
callPluginInner
(
param
)
{
callPluginInner
(
param
)
{
this
.
$refs
[
this
.
refId
]
&&
this
.
$refs
[
this
.
refId
].
callPluginInner
&&
this
.
$refs
[
this
.
refId
].
callPluginInner
(
param
)
return
this
.
$refs
[
this
.
refId
]
&&
this
.
$refs
[
this
.
refId
].
callPluginInner
&&
this
.
$refs
[
this
.
refId
].
callPluginInner
(
param
)
}
}
}
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论