Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
dcf8fe75
提交
dcf8fe75
authored
5月 18, 2021
作者:
taojinlong
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'main' of github.com:dataease/dataease into main
上级
21e38a0f
a9201c79
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
30 个修改的文件
包含
257 行增加
和
84 行删除
+257
-84
CommonConfig.java
backend/src/main/java/io/dataease/config/CommonConfig.java
+1
-1
DatasourceTypes.java
...ava/io/dataease/datasource/constants/DatasourceTypes.java
+1
-1
JdbcProvider.java
...in/java/io/dataease/datasource/provider/JdbcProvider.java
+53
-32
ProviderFactory.java
...java/io/dataease/datasource/provider/ProviderFactory.java
+32
-3
DDLProvider.java
backend/src/main/java/io/dataease/provider/DDLProvider.java
+11
-0
QueryProvider.java
...end/src/main/java/io/dataease/provider/QueryProvider.java
+33
-0
DorisDDLProvider.java
...ain/java/io/dataease/provider/doris/DorisDDLProvider.java
+21
-0
DorisQueryProvider.java
...n/java/io/dataease/provider/doris/DorisQueryProvider.java
+0
-0
MysqlDDLProvider.java
...ain/java/io/dataease/provider/mysql/MysqlDDLProvider.java
+21
-0
MysqlQueryProvider.java
...n/java/io/dataease/provider/mysql/MysqlQueryProvider.java
+0
-0
ChartViewService.java
...main/java/io/dataease/service/chart/ChartViewService.java
+0
-0
DataSetTableService.java
...java/io/dataease/service/dataset/DataSetTableService.java
+0
-0
ExtractDataService.java
.../java/io/dataease/service/dataset/ExtractDataService.java
+0
-0
DirectFieldService.java
...aease/service/dataset/impl/direct/DirectFieldService.java
+3
-1
index.vue
frontend/src/components/LangSelect/index.vue
+1
-1
PreviewFullScreen.vue
...components/canvas/components/Editor/PreviewFullScreen.vue
+1
-1
Toolbar.vue
frontend/src/components/canvas/components/Toolbar.vue
+3
-3
UserView.vue
frontend/src/components/canvas/custom-component/UserView.vue
+1
-1
en.js
frontend/src/lang/en.js
+25
-11
tw.js
frontend/src/lang/tw.js
+16
-2
zh.js
frontend/src/lang/zh.js
+3
-2
Topbar.vue
frontend/src/layout/components/Topbar.vue
+10
-10
index.scss
frontend/src/styles/index.scss
+2
-2
topbar.scss
frontend/src/styles/topbar.scss
+5
-1
variables.scss
frontend/src/styles/variables.scss
+1
-1
Group.vue
frontend/src/views/chart/group/Group.vue
+2
-2
ChartEdit.vue
frontend/src/views/chart/view/ChartEdit.vue
+6
-4
Group.vue
frontend/src/views/dataset/group/Group.vue
+2
-2
index.vue
frontend/src/views/login/index.vue
+2
-2
index.vue
frontend/src/views/panel/edit/index.vue
+1
-1
没有找到文件。
backend/src/main/java/io/dataease/config/CommonConfig.java
浏览文件 @
dcf8fe75
...
...
@@ -39,7 +39,7 @@ public class CommonConfig {
datasource
.
setId
(
"doris"
);
datasource
.
setName
(
"doris"
);
datasource
.
setDesc
(
"doris"
);
datasource
.
setType
(
"
mysql
"
);
datasource
.
setType
(
"
doris
"
);
datasource
.
setConfiguration
(
jsonObject
.
toJSONString
());
return
datasource
;
}
...
...
backend/src/main/java/io/dataease/datasource/constants/DatasourceTypes.java
浏览文件 @
dcf8fe75
package
io
.
dataease
.
datasource
.
constants
;
public
enum
DatasourceTypes
{
mysql
,
sqlServer
,
excel
mysql
,
sqlServer
,
excel
,
doris
}
backend/src/main/java/io/dataease/datasource/provider/JdbcProvider.java
浏览文件 @
dcf8fe75
...
...
@@ -20,6 +20,7 @@ public class JdbcProvider extends DatasourceProvider {
private
static
Map
<
String
,
ComboPooledDataSource
>
jdbcConnection
=
new
HashMap
<>();
private
static
int
initPoolSize
=
5
;
private
static
int
maxConnections
=
200
;
@Override
public
List
<
String
[]>
getData
(
DatasourceRequest
datasourceRequest
)
throws
Exception
{
List
<
String
[]>
list
=
new
LinkedList
<>();
...
...
@@ -33,7 +34,7 @@ public class JdbcProvider extends DatasourceProvider {
throw
new
Exception
(
"ERROR:"
+
e
.
getMessage
(),
e
);
}
catch
(
Exception
e
)
{
throw
new
Exception
(
"ERROR:"
+
e
.
getMessage
(),
e
);
}
finally
{
}
finally
{
connection
.
close
();
}
return
list
;
...
...
@@ -50,7 +51,7 @@ public class JdbcProvider extends DatasourceProvider {
throw
new
Exception
(
"ERROR:"
+
e
.
getMessage
(),
e
);
}
catch
(
Exception
e
)
{
throw
new
Exception
(
"ERROR:"
+
e
.
getMessage
(),
e
);
}
finally
{
}
finally
{
connection
.
close
();
}
}
...
...
@@ -68,7 +69,7 @@ public class JdbcProvider extends DatasourceProvider {
throw
new
Exception
(
"ERROR:"
+
e
.
getMessage
(),
e
);
}
catch
(
Exception
e
)
{
throw
new
Exception
(
"ERROR:"
+
e
.
getMessage
(),
e
);
}
finally
{
}
finally
{
connection
.
close
();
}
}
...
...
@@ -108,7 +109,7 @@ public class JdbcProvider extends DatasourceProvider {
throw
new
Exception
(
"ERROR:"
+
e
.
getMessage
(),
e
);
}
catch
(
Exception
e
)
{
throw
new
Exception
(
"ERROR:"
+
e
.
getMessage
(),
e
);
}
finally
{
}
finally
{
connection
.
close
();
}
}
...
...
@@ -133,7 +134,7 @@ public class JdbcProvider extends DatasourceProvider {
throw
new
Exception
(
"ERROR:"
+
e
.
getMessage
(),
e
);
}
catch
(
Exception
e
)
{
throw
new
Exception
(
"ERROR:"
+
e
.
getMessage
(),
e
);
}
finally
{
}
finally
{
connection
.
close
();
}
}
...
...
@@ -173,7 +174,7 @@ public class JdbcProvider extends DatasourceProvider {
return
tables
;
}
catch
(
Exception
e
)
{
throw
new
Exception
(
"ERROR: "
+
e
.
getMessage
(),
e
);
}
finally
{
}
finally
{
con
.
close
();
}
}
...
...
@@ -209,7 +210,7 @@ public class JdbcProvider extends DatasourceProvider {
throw
new
Exception
(
"ERROR:"
+
e
.
getMessage
(),
e
);
}
catch
(
Exception
e
)
{
throw
new
Exception
(
"ERROR:"
+
e
.
getMessage
(),
e
);
}
finally
{
}
finally
{
connection
.
close
();
}
return
list
;
...
...
@@ -227,7 +228,7 @@ public class JdbcProvider extends DatasourceProvider {
ps
.
close
();
}
catch
(
Exception
e
)
{
throw
new
Exception
(
"ERROR: "
+
e
.
getMessage
(),
e
);
}
finally
{
}
finally
{
con
.
close
();
}
}
...
...
@@ -236,20 +237,21 @@ public class JdbcProvider extends DatasourceProvider {
public
Long
count
(
DatasourceRequest
datasourceRequest
)
throws
Exception
{
Connection
con
=
null
;
try
{
con
=
getConnectionFromPool
(
datasourceRequest
);
Statement
ps
=
con
.
createStatement
();
con
=
getConnectionFromPool
(
datasourceRequest
);
Statement
ps
=
con
.
createStatement
();
ResultSet
resultSet
=
ps
.
executeQuery
(
datasourceRequest
.
getQuery
());
while
(
resultSet
.
next
())
{
return
resultSet
.
getLong
(
1
);
}
}
catch
(
Exception
e
)
{
throw
new
Exception
(
"ERROR: "
+
e
.
getMessage
(),
e
);
}
finally
{
}
finally
{
con
.
close
();
}
return
0L
;
}
private
Connection
getConnectionFromPool
(
DatasourceRequest
datasourceRequest
)
throws
Exception
{
private
Connection
getConnectionFromPool
(
DatasourceRequest
datasourceRequest
)
throws
Exception
{
ComboPooledDataSource
dataSource
=
jdbcConnection
.
get
(
datasourceRequest
.
getDatasource
().
getId
());
if
(
dataSource
==
null
)
{
initDataSource
(
datasourceRequest
);
...
...
@@ -260,7 +262,7 @@ public class JdbcProvider extends DatasourceProvider {
}
@Override
public
void
initDataSource
(
DatasourceRequest
datasourceRequest
)
throws
Exception
{
public
void
initDataSource
(
DatasourceRequest
datasourceRequest
)
throws
Exception
{
ComboPooledDataSource
dataSource
=
jdbcConnection
.
get
(
datasourceRequest
.
getDatasource
().
getId
());
if
(
dataSource
==
null
)
{
dataSource
=
new
ComboPooledDataSource
();
...
...
@@ -298,6 +300,13 @@ public class JdbcProvider extends DatasourceProvider {
driver
=
mysqlConfigration
.
getDriver
();
jdbcurl
=
mysqlConfigration
.
getJdbc
();
break
;
case
doris:
MysqlConfigration
dorisConfigration
=
new
Gson
().
fromJson
(
datasourceRequest
.
getDatasource
().
getConfiguration
(),
MysqlConfigration
.
class
);
username
=
dorisConfigration
.
getUsername
();
password
=
dorisConfigration
.
getPassword
();
driver
=
dorisConfigration
.
getDriver
();
jdbcurl
=
dorisConfigration
.
getJdbc
();
break
;
case
sqlServer:
SqlServerConfigration
sqlServerConfigration
=
new
Gson
().
fromJson
(
datasourceRequest
.
getDatasource
().
getConfiguration
(),
SqlServerConfigration
.
class
);
username
=
sqlServerConfigration
.
getUsername
();
...
...
@@ -319,26 +328,33 @@ public class JdbcProvider extends DatasourceProvider {
}
private
void
setCredential
(
DatasourceRequest
datasourceRequest
,
ComboPooledDataSource
dataSource
)
throws
PropertyVetoException
{
DatasourceTypes
datasourceType
=
DatasourceTypes
.
valueOf
(
datasourceRequest
.
getDatasource
().
getType
());
switch
(
datasourceType
)
{
case
mysql:
MysqlConfigration
mysqlConfigration
=
new
Gson
().
fromJson
(
datasourceRequest
.
getDatasource
().
getConfiguration
(),
MysqlConfigration
.
class
);
dataSource
.
setUser
(
mysqlConfigration
.
getUsername
());
dataSource
.
setDriverClass
(
mysqlConfigration
.
getDriver
());
dataSource
.
setPassword
(
mysqlConfigration
.
getPassword
());
dataSource
.
setJdbcUrl
(
mysqlConfigration
.
getJdbc
());
break
;
case
sqlServer:
SqlServerConfigration
sqlServerConfigration
=
new
Gson
().
fromJson
(
datasourceRequest
.
getDatasource
().
getConfiguration
(),
SqlServerConfigration
.
class
);
dataSource
.
setUser
(
sqlServerConfigration
.
getUsername
());
dataSource
.
setDriverClass
(
sqlServerConfigration
.
getDriver
());
dataSource
.
setPassword
(
sqlServerConfigration
.
getPassword
());
dataSource
.
setJdbcUrl
(
sqlServerConfigration
.
getJdbc
());
break
;
default
:
break
;
}
private
void
setCredential
(
DatasourceRequest
datasourceRequest
,
ComboPooledDataSource
dataSource
)
throws
PropertyVetoException
{
DatasourceTypes
datasourceType
=
DatasourceTypes
.
valueOf
(
datasourceRequest
.
getDatasource
().
getType
());
switch
(
datasourceType
)
{
case
mysql:
MysqlConfigration
mysqlConfigration
=
new
Gson
().
fromJson
(
datasourceRequest
.
getDatasource
().
getConfiguration
(),
MysqlConfigration
.
class
);
dataSource
.
setUser
(
mysqlConfigration
.
getUsername
());
dataSource
.
setDriverClass
(
mysqlConfigration
.
getDriver
());
dataSource
.
setPassword
(
mysqlConfigration
.
getPassword
());
dataSource
.
setJdbcUrl
(
mysqlConfigration
.
getJdbc
());
break
;
case
doris:
MysqlConfigration
dorisConfigration
=
new
Gson
().
fromJson
(
datasourceRequest
.
getDatasource
().
getConfiguration
(),
MysqlConfigration
.
class
);
dataSource
.
setUser
(
dorisConfigration
.
getUsername
());
dataSource
.
setDriverClass
(
dorisConfigration
.
getDriver
());
dataSource
.
setPassword
(
dorisConfigration
.
getPassword
());
dataSource
.
setJdbcUrl
(
dorisConfigration
.
getJdbc
());
break
;
case
sqlServer:
SqlServerConfigration
sqlServerConfigration
=
new
Gson
().
fromJson
(
datasourceRequest
.
getDatasource
().
getConfiguration
(),
SqlServerConfigration
.
class
);
dataSource
.
setUser
(
sqlServerConfigration
.
getUsername
());
dataSource
.
setDriverClass
(
sqlServerConfigration
.
getDriver
());
dataSource
.
setPassword
(
sqlServerConfigration
.
getPassword
());
dataSource
.
setJdbcUrl
(
sqlServerConfigration
.
getJdbc
());
break
;
default
:
break
;
}
}
private
String
getDatabase
(
DatasourceRequest
datasourceRequest
)
{
...
...
@@ -347,6 +363,9 @@ public class JdbcProvider extends DatasourceProvider {
case
mysql:
MysqlConfigration
mysqlConfigration
=
new
Gson
().
fromJson
(
datasourceRequest
.
getDatasource
().
getConfiguration
(),
MysqlConfigration
.
class
);
return
mysqlConfigration
.
getDataBase
();
case
doris:
MysqlConfigration
dorisConfigration
=
new
Gson
().
fromJson
(
datasourceRequest
.
getDatasource
().
getConfiguration
(),
MysqlConfigration
.
class
);
return
dorisConfigration
.
getDataBase
();
case
sqlServer:
SqlServerConfigration
sqlServerConfigration
=
new
Gson
().
fromJson
(
datasourceRequest
.
getDatasource
().
getConfiguration
(),
SqlServerConfigration
.
class
);
return
sqlServerConfigration
.
getDataBase
();
...
...
@@ -360,6 +379,8 @@ public class JdbcProvider extends DatasourceProvider {
switch
(
datasourceType
)
{
case
mysql:
return
"show tables;"
;
case
doris:
return
"show tables;"
;
case
sqlServer:
return
"SELECT TABLE_NAME FROM fit2cloud2.INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE';"
;
default
:
...
...
backend/src/main/java/io/dataease/datasource/provider/ProviderFactory.java
浏览文件 @
dcf8fe75
package
io
.
dataease
.
datasource
.
provider
;
import
io.dataease.datasource.constants.DatasourceTypes
;
import
io.dataease.provider.DDLProvider
;
import
io.dataease.provider.QueryProvider
;
import
org.springframework.beans.BeansException
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationContextAware
;
import
org.springframework.stereotype.Component
;
@Component
public
class
ProviderFactory
implements
ApplicationContextAware
{
...
...
@@ -18,18 +19,46 @@ public class ProviderFactory implements ApplicationContextAware {
this
.
context
=
applicationContext
;
}
public
static
DatasourceProvider
getProvider
(
String
type
){
public
static
DatasourceProvider
getProvider
(
String
type
)
{
DatasourceTypes
datasourceType
=
DatasourceTypes
.
valueOf
(
type
);
switch
(
datasourceType
){
switch
(
datasourceType
)
{
case
mysql:
return
context
.
getBean
(
"jdbc"
,
DatasourceProvider
.
class
);
case
doris:
return
context
.
getBean
(
"jdbc"
,
DatasourceProvider
.
class
);
case
sqlServer:
return
context
.
getBean
(
"jdbc"
,
DatasourceProvider
.
class
);
default
:
return
context
.
getBean
(
"jdbc"
,
DatasourceProvider
.
class
);
}
}
public
static
QueryProvider
getQueryProvider
(
String
type
)
{
DatasourceTypes
datasourceType
=
DatasourceTypes
.
valueOf
(
type
);
switch
(
datasourceType
)
{
case
mysql:
return
context
.
getBean
(
"mysqlQuery"
,
QueryProvider
.
class
);
case
doris:
return
context
.
getBean
(
"dorisQuery"
,
QueryProvider
.
class
);
case
sqlServer:
return
context
.
getBean
(
"mysqlQuery"
,
QueryProvider
.
class
);
default
:
return
context
.
getBean
(
"mysqlQuery"
,
QueryProvider
.
class
);
}
}
public
static
DDLProvider
getDDLProvider
(
String
type
)
{
DatasourceTypes
datasourceType
=
DatasourceTypes
.
valueOf
(
type
);
switch
(
datasourceType
)
{
case
mysql:
return
context
.
getBean
(
"mysqlDDL"
,
DDLProvider
.
class
);
case
doris:
return
context
.
getBean
(
"dorisDDL"
,
DDLProvider
.
class
);
case
sqlServer:
return
context
.
getBean
(
"mysqlDDL"
,
DDLProvider
.
class
);
default
:
return
context
.
getBean
(
"mysqlDDL"
,
DDLProvider
.
class
);
}
}
}
backend/src/main/java/io/dataease/provider/DDLProvider.java
0 → 100644
浏览文件 @
dcf8fe75
package
io
.
dataease
.
provider
;
/**
* @Author gin
* @Date 2021/5/17 4:19 下午
*/
public
abstract
class
DDLProvider
{
public
abstract
String
createView
(
String
name
,
String
viewSQL
);
public
abstract
String
dropTableOrView
(
String
name
);
}
backend/src/main/java/io/dataease/provider/QueryProvider.java
0 → 100644
浏览文件 @
dcf8fe75
package
io
.
dataease
.
provider
;
import
io.dataease.base.domain.DatasetTableField
;
import
io.dataease.controller.request.chart.ChartExtFilterRequest
;
import
io.dataease.dto.chart.ChartViewFieldDTO
;
import
java.util.List
;
/**
* @Author gin
* @Date 2021/5/17 2:42 下午
*/
public
abstract
class
QueryProvider
{
public
abstract
Integer
transFieldType
(
String
field
);
public
abstract
String
createQueryCountSQL
(
String
table
);
public
abstract
String
createQueryCountSQLAsTmp
(
String
sql
);
public
abstract
String
createSQLPreview
(
String
sql
,
String
orderBy
);
public
abstract
String
createQuerySQL
(
String
table
,
List
<
DatasetTableField
>
fields
);
public
abstract
String
createQuerySQLAsTmp
(
String
sql
,
List
<
DatasetTableField
>
fields
);
public
abstract
String
createQuerySQLWithPage
(
String
table
,
List
<
DatasetTableField
>
fields
,
Integer
page
,
Integer
pageSize
,
Integer
realSize
);
public
abstract
String
createQuerySQLAsTmpWithPage
(
String
sql
,
List
<
DatasetTableField
>
fields
,
Integer
page
,
Integer
pageSize
,
Integer
realSize
);
public
abstract
String
getSQL
(
String
table
,
List
<
ChartViewFieldDTO
>
xAxis
,
List
<
ChartViewFieldDTO
>
yAxis
,
List
<
ChartExtFilterRequest
>
extFilterRequestList
);
public
abstract
String
getSQLAsTmp
(
String
table
,
List
<
ChartViewFieldDTO
>
xAxis
,
List
<
ChartViewFieldDTO
>
yAxis
,
List
<
ChartExtFilterRequest
>
extFilterRequestList
);
}
backend/src/main/java/io/dataease/provider/doris/DorisDDLProvider.java
0 → 100644
浏览文件 @
dcf8fe75
package
io
.
dataease
.
provider
.
doris
;
import
io.dataease.provider.DDLProvider
;
import
org.springframework.stereotype.Service
;
/**
* @Author gin
* @Date 2021/5/17 4:27 下午
*/
@Service
(
"dorisDDL"
)
public
class
DorisDDLProvider
extends
DDLProvider
{
@Override
public
String
createView
(
String
name
,
String
viewSQL
)
{
return
"CREATE VIEW IF NOT EXISTS "
+
name
+
" AS ("
+
viewSQL
+
")"
;
}
@Override
public
String
dropTableOrView
(
String
name
)
{
return
"DROP TABLE IF EXISTS "
+
name
;
}
}
backend/src/main/java/io/dataease/provider/doris/DorisQueryProvider.java
0 → 100644
浏览文件 @
dcf8fe75
差异被折叠。
点击展开。
backend/src/main/java/io/dataease/provider/mysql/MysqlDDLProvider.java
0 → 100644
浏览文件 @
dcf8fe75
package
io
.
dataease
.
provider
.
mysql
;
import
io.dataease.provider.DDLProvider
;
import
org.springframework.stereotype.Service
;
/**
* @Author gin
* @Date 2021/5/17 4:27 下午
*/
@Service
(
"mysqlDDL"
)
public
class
MysqlDDLProvider
extends
DDLProvider
{
@Override
public
String
createView
(
String
name
,
String
viewSQL
)
{
return
"CREATE VIEW IF NOT EXISTS "
+
name
+
" AS ("
+
viewSQL
+
")"
;
}
@Override
public
String
dropTableOrView
(
String
name
)
{
return
"DROP TABLE IF EXISTS "
+
name
;
}
}
backend/src/main/java/io/dataease/provider/mysql/MysqlQueryProvider.java
0 → 100644
浏览文件 @
dcf8fe75
差异被折叠。
点击展开。
backend/src/main/java/io/dataease/service/chart/ChartViewService.java
浏览文件 @
dcf8fe75
差异被折叠。
点击展开。
backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java
浏览文件 @
dcf8fe75
差异被折叠。
点击展开。
backend/src/main/java/io/dataease/service/dataset/ExtractDataService.java
浏览文件 @
dcf8fe75
差异被折叠。
点击展开。
backend/src/main/java/io/dataease/service/dataset/impl/direct/DirectFieldService.java
浏览文件 @
dcf8fe75
...
...
@@ -7,6 +7,7 @@ import io.dataease.datasource.provider.DatasourceProvider;
import
io.dataease.datasource.provider.ProviderFactory
;
import
io.dataease.datasource.request.DatasourceRequest
;
import
io.dataease.datasource.service.DatasourceService
;
import
io.dataease.provider.QueryProvider
;
import
io.dataease.service.dataset.DataSetFieldService
;
import
io.dataease.service.dataset.DataSetTableFieldsService
;
import
io.dataease.service.dataset.DataSetTableService
;
...
...
@@ -58,7 +59,8 @@ public class DirectFieldService implements DataSetFieldService {
DatasourceProvider
datasourceProvider
=
ProviderFactory
.
getProvider
(
ds
.
getType
());
DatasourceRequest
datasourceRequest
=
new
DatasourceRequest
();
datasourceRequest
.
setDatasource
(
ds
);
String
querySQL
=
dataSetTableService
.
createQuerySQL
(
ds
.
getType
(),
tableName
,
Collections
.
singletonList
(
field
));
QueryProvider
qp
=
ProviderFactory
.
getQueryProvider
(
ds
.
getType
());
String
querySQL
=
qp
.
createQuerySQL
(
tableName
,
Collections
.
singletonList
(
field
));
datasourceRequest
.
setQuery
(
querySQL
);
try
{
List
<
String
[]>
rows
=
datasourceProvider
.
getData
(
datasourceRequest
);
...
...
frontend/src/components/LangSelect/index.vue
浏览文件 @
dcf8fe75
<
template
>
<el-dropdown
trigger=
"click"
class=
"international"
@
command=
"handleSetLanguage"
>
<el-dropdown
style=
"display: flex;align-items: center;"
trigger=
"click"
class=
"international"
@
command=
"handleSetLanguage"
>
<div>
<svg-icon
class-name=
"international-icon"
icon-class=
"language"
/>
</div>
...
...
frontend/src/components/canvas/components/Editor/PreviewFullScreen.vue
浏览文件 @
dcf8fe75
<
template
>
<div
style=
"width: 100%;height: 100
%
;"
>
<div
style=
"width: 100%;height: 100
vh
;"
>
<span
style=
"line-height: 35px; position: absolute; top:10px;right: 20px;z-index:100000"
>
<el-button
size=
"mini"
@
click=
"toDir"
>
关闭
...
...
frontend/src/components/canvas/components/Toolbar.vue
浏览文件 @
dcf8fe75
...
...
@@ -3,13 +3,13 @@
<div
class=
"toolbar"
>
<div
class=
"canvas-config"
>
<span>
{{
$t
(
panel
.
canvas_size
)
}}
</span>
<span>
{{
$t
(
'panel.canvas_size'
)
}}
</span>
<input
v-model=
"canvasStyleData.width"
>
<span>
*
</span>
<input
v-model=
"canvasStyleData.height"
>
</div>
<div
class=
"canvas-config"
style=
"margin-right: 10px"
>
<span>
{{
$t
(
panel
.
canvas_scale
)
}}
</span>
<span>
{{
$t
(
'panel.canvas_scale'
)
}}
</span>
<input
v-model=
"scale"
@
input=
"handleScaleChange"
>
%
</div>
...
...
@@ -38,7 +38,7 @@
<span
style=
"float: right;margin-left: 10px"
>
<el-button
size=
"mini"
@
click=
"closePanelEdit"
>
{{
$t
(
commons
.
close
)
}}
{{
$t
(
'commons.close'
)
}}
</el-button>
</span>
</div>
...
...
frontend/src/components/canvas/custom-component/UserView.vue
浏览文件 @
dcf8fe75
...
...
@@ -2,7 +2,7 @@
<div
v-loading=
"requestStatus==='waiting'"
class=
"rect-shape"
>
<div
v-if=
"requestStatus==='error'"
style=
";width: 100%;height: 100%;background-color: #ece7e7; text-align: center"
>
<div
style=
"font-size: 12px; color: #9ea6b2;"
>
{{
$t
(
panel
.
error_data
)
}}
<br>
{{
$t
(
'panel.error_data'
)
}}
<br>
{{
message
}}
</div>
</div>
...
...
frontend/src/lang/en.js
浏览文件 @
dcf8fe75
...
...
@@ -73,8 +73,8 @@ export default {
size
:
'Global Size'
},
login
:
{
title
:
'Login
Form
'
,
welcome
:
'
w
elcome To '
,
title
:
'Login'
,
welcome
:
'
W
elcome To '
,
logIn
:
'Login'
,
username
:
'Username'
,
password
:
'Password'
,
...
...
@@ -525,8 +525,8 @@ export default {
title
:
'Title'
,
show
:
'Show'
,
chart_type
:
'Chart Type'
,
shape_attr
:
'
Chart properties
'
,
module_style
:
'
Component
Style'
,
shape_attr
:
'
Attribute
'
,
module_style
:
'Style'
,
result_filter
:
'Results Filter'
,
x_axis
:
'Horizontal axis'
,
y_axis
:
'Longitudinal axis'
,
...
...
@@ -645,7 +645,20 @@ export default {
table_header_bg
:
'Header Background'
,
table_item_bg
:
'Table Background'
,
table_item_font_color
:
'Font Color'
,
stripe
:
'Zebra pattern'
stripe
:
'Zebra pattern'
,
start_angle
:
'Start Angle'
,
end_angle
:
'End Angle'
,
style_priority
:
'Style Priority'
,
dashboard
:
'Dashboard'
,
dimension_color
:
'Dimension Color'
,
quota_color
:
'Quota Color'
,
dimension_font_size
:
'Dimension FontSize'
,
quota_font_size
:
'Quota FontSize'
,
space_split
:
'Dimension/Quota Space'
,
only_one_quota
:
'Only support 1 quota'
,
only_one_result
:
'Only show first result'
,
dimension_show
:
'Dimension Show'
,
quota_show
:
'Quota Show'
},
dataset
:
{
datalist
:
'Data Set'
,
...
...
@@ -734,11 +747,11 @@ export default {
create_by
:
'Creator'
,
create_time
:
'Create_time'
,
preview_show
:
'Display'
,
preview_item
:
'
条数据
'
,
preview_total
:
'
共
'
,
pls_input_less_9
:
'
请输入9位以内的正整数
'
,
field_edit
:
'
编辑字段
'
,
table_already_add_to
:
'
该表已添加至
'
,
preview_item
:
'
items data
'
,
preview_total
:
'
Total
'
,
pls_input_less_9
:
'
Please input integer less 9
'
,
field_edit
:
'
Edit Field
'
,
table_already_add_to
:
'
This table is already add to
'
,
uploading
:
'Uploading...'
,
add_union
:
'Add Associations'
,
union_setting
:
'Association Settings'
,
...
...
@@ -755,7 +768,8 @@ export default {
can_not_union_self
:
'The associated table cannot be the same as the associated table'
,
float
:
'Decimal'
,
edit_custom_table
:
'Edit self help dataset'
,
edit_field
:
'Edit field'
edit_field
:
'Edit Field'
,
preview_100_data
:
'Show 100 lines data'
},
datasource
:
{
datasource
:
'Data Source'
,
...
...
frontend/src/lang/tw.js
浏览文件 @
dcf8fe75
...
...
@@ -645,7 +645,20 @@ export default {
table_header_bg
:
'表頭背景'
,
table_item_bg
:
'表格背景'
,
table_item_font_color
:
'字體顏色'
,
stripe
:
'斑馬紋'
stripe
:
'斑馬紋'
,
start_angle
:
'起始角度'
,
end_angle
:
'結束角度'
,
style_priority
:
'樣式優先級'
,
dashboard
:
'儀表盤'
,
dimension_color
:
'維度顏色'
,
quota_color
:
'指標顏色'
,
dimension_font_size
:
'維度字體大小'
,
quota_font_size
:
'指標字體大小'
,
space_split
:
'維度/指標間隔'
,
only_one_quota
:
'僅支持1個指標'
,
only_one_result
:
'僅顯示第1個計算結果'
,
dimension_show
:
'維度顯示'
,
quota_show
:
'指標顯示'
},
dataset
:
{
datalist
:
'數據集'
,
...
...
@@ -755,7 +768,8 @@ export default {
can_not_union_self
:
'被關聯表不能與關聯表相同'
,
float
:
'小數'
,
edit_custom_table
:
'編輯自助數據集'
,
edit_field
:
'編輯自斷'
edit_field
:
'編輯自斷'
,
preview_100_data
:
'顯示前100行數據'
},
datasource
:
{
datasource
:
'數據源'
,
...
...
frontend/src/lang/zh.js
浏览文件 @
dcf8fe75
...
...
@@ -768,7 +768,8 @@ export default {
can_not_union_self
:
'被关联表不能与关联表相同'
,
float
:
'小数'
,
edit_custom_table
:
'编辑自助数据集'
,
edit_field
:
'编辑字段'
edit_field
:
'编辑字段'
,
preview_100_data
:
'显示前100行数据'
},
datasource
:
{
datasource
:
'数据源'
,
...
...
@@ -851,7 +852,7 @@ export default {
field
:
'字段'
,
unshared_people
:
'未分享人员'
,
shared_people
:
'已分享人员'
,
error_data
:
'获取数据出错
请联系管理员 Error getting data, please contact administrator
'
,
error_data
:
'获取数据出错
,请联系管理员
'
,
canvas_size
:
'画布大小'
,
canvas_scale
:
'画布比例'
,
style
:
'样式'
,
...
...
frontend/src/layout/components/Topbar.vue
浏览文件 @
dcf8fe75
...
...
@@ -23,13 +23,13 @@
<div
class=
"right-menu"
>
<template>
<!--
<el-tooltip
content=
"项目文档"
effect=
"dark"
placement=
"bottom"
>
-->
<!--
<doc
class=
"right-menu-item hover-effect"
/>
-->
<!--
</el-tooltip>
-->
<!--
<el-tooltip
content=
"项目文档"
effect=
"dark"
placement=
"bottom"
>
-->
<!--
<doc
class=
"right-menu-item hover-effect"
/>
-->
<!--
</el-tooltip>
-->
<!--
<el-tooltip
content=
"全屏缩放"
effect=
"dark"
placement=
"bottom"
>
-->
<!--
<screenfull
id=
"screenfull"
class=
"right-menu-item hover-effect"
/>
-->
<!--
</el-tooltip>
-->
<!--
<el-tooltip
content=
"全屏缩放"
effect=
"dark"
placement=
"bottom"
>
-->
<!--
<screenfull
id=
"screenfull"
class=
"right-menu-item hover-effect"
/>
-->
<!--
</el-tooltip>
-->
<!--
<el-tooltip
:content=
"$t('navbar.size')"
effect=
"dark"
placement=
"bottom"
>
<size-select
id=
"size-select"
class=
"right-menu-item hover-effect"
/>
...
...
@@ -38,8 +38,8 @@
<lang-select
class=
"right-menu-item hover-effect"
/>
</
template
>
<el-dropdown
class=
"top-dropdown"
>
<span
class=
"el-dropdown-link"
>
<el-dropdown
class=
"top-dropdown"
style=
"display: flex;align-items: center;"
>
<span
class=
"el-dropdown-link"
style=
"font-size: 14px;"
>
{{ name }}
<i
class=
"el-icon-arrow-down el-icon--right"
/>
</span>
<el-dropdown-menu
slot=
"dropdown"
>
...
...
@@ -108,7 +108,7 @@ export default {
AppLink
,
// Screenfull,
// SizeSelect,
LangSelect
,
LangSelect
// Doc
},
data
()
{
...
...
@@ -270,6 +270,6 @@ export default {
font-size
:
16px
;
color
:
rgba
(
255
,
255
,
255
,.
87
);
vertical-align
:
text-bottom
;
margin-right
:
3
0px
;
margin-right
:
1
0px
;
}
</
style
>
frontend/src/styles/index.scss
浏览文件 @
dcf8fe75
...
...
@@ -13,7 +13,7 @@
body
{
height
:
$contentHeight
;
//
height: $contentHeight;
-moz-osx-font-smoothing
:
grayscale
;
-webkit-font-smoothing
:
antialiased
;
text-rendering
:
optimizeLegibility
;
...
...
@@ -30,7 +30,7 @@ html {
}
#app
{
height
:
$contentHeight
;
//
height: $contentHeight;
}
*,
...
...
frontend/src/styles/topbar.scss
浏览文件 @
dcf8fe75
...
...
@@ -49,7 +49,11 @@
.right-menu
{
float
:
right
;
height
:
100%
;
height
:
56px
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
center
;
&
:focus
{
outline
:
none
;
...
...
frontend/src/styles/variables.scss
浏览文件 @
dcf8fe75
...
...
@@ -42,7 +42,7 @@ $subMenuHover:#f18126;
$sideBarWidth
:
210px
;
$topBarHeight
:
56px
;
$contentHeight
:
100vh
;
$contentHeight
:
calc
(
100vh
-
56px
)
;
// the :export directive is the magic sauce for webpack
// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
...
...
frontend/src/views/chart/group/Group.vue
浏览文件 @
dcf8fe75
...
...
@@ -10,10 +10,10 @@
<el-divider
/>
<el-row>
<el-button
icon=
"el-icon-circle-plus"
type=
"primary"
size=
"mini"
@
click=
"add('group')"
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"add('group')"
>
{{
$t
(
'chart.add_group'
)
}}
</el-button>
<el-button
icon=
"el-icon-folder-add"
type=
"primary"
size=
"mini"
@
click=
"add('scene')"
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"add('scene')"
>
{{
$t
(
'chart.add_scene'
)
}}
</el-button>
</el-row>
...
...
frontend/src/views/chart/view/ChartEdit.vue
浏览文件 @
dcf8fe75
...
...
@@ -141,10 +141,12 @@
<div
style=
"height: 40%;overflow:hidden;border-top: 1px solid #e6e6e6"
>
<el-row
class=
"padding-lr"
>
<span>
{{
$t
(
'chart.style_priority'
)
}}
</span>
<el-radio-group
v-model=
"view.stylePriority"
size=
"mini"
@
change=
"save"
>
<el-radio
style=
"margin-left: 20px"
label=
"view"
><span>
{{
$t
(
'chart.chart'
)
}}
</span></el-radio>
<el-radio
label=
"panel"
><span>
{{
$t
(
'chart.dashboard'
)
}}
</span></el-radio>
</el-radio-group>
<el-row>
<el-radio-group
v-model=
"view.stylePriority"
size=
"mini"
@
change=
"save"
>
<el-radio
label=
"view"
><span>
{{
$t
(
'chart.chart'
)
}}
</span></el-radio>
<el-radio
label=
"panel"
><span>
{{
$t
(
'chart.dashboard'
)
}}
</span></el-radio>
</el-radio-group>
</el-row>
</el-row>
<el-tabs
type=
"card"
:stretch=
"true"
class=
"tab-header"
>
<el-tab-pane
:label=
"$t('chart.shape_attr')"
class=
"padding-lr"
>
...
...
frontend/src/views/dataset/group/Group.vue
浏览文件 @
dcf8fe75
...
...
@@ -10,10 +10,10 @@
<el-divider
/>
<el-row>
<el-button
icon=
"el-icon-circle-plus"
type=
"primary"
size=
"mini"
@
click=
"add('group')"
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"add('group')"
>
{{
$t
(
'dataset.add_group'
)
}}
</el-button>
<el-button
icon=
"el-icon-folder-add"
type=
"primary"
size=
"mini"
@
click=
"add('scene')"
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"add('scene')"
>
{{
$t
(
'dataset.add_scene'
)
}}
</el-button>
</el-row>
...
...
frontend/src/views/login/index.vue
浏览文件 @
dcf8fe75
...
...
@@ -33,7 +33,7 @@
</div>
<div
class=
"login-btn"
>
<el-button
type=
"primary"
class=
"submit"
size=
"default"
@
click
.
native
.
prevent=
"handleLogin"
>
{{
$t
(
'commons.
button.
login'
)
}}
{{
$t
(
'commons.login'
)
}}
</el-button>
</div>
<div
class=
"login-msg"
>
...
...
@@ -163,7 +163,7 @@ export default {
.login-background
{
background-color
:
$--background-color-base
;
height
:
100
%
;
height
:
100
vh
;
@include
login-center
;
}
...
...
frontend/src/views/panel/edit/index.vue
浏览文件 @
dcf8fe75
...
...
@@ -115,7 +115,7 @@ import { get } from '@/api/panel/panel'
// 引入样式
import
'@/components/canvas/assets/iconfont/iconfont.css'
import
'@/components/canvas/styles/animate.css'
import
'@/components/canvas/styles/reset.css'
//
import '@/components/canvas/styles/reset.css'
import
{
ApplicationContext
}
from
'@/utils/ApplicationContext'
import
FilterDialog
from
'../filter/filterDialog'
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论