Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
8a88c0bc
提交
8a88c0bc
authored
5月 18, 2021
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/main' into main
上级
1c48fc88
f0a39b18
隐藏空白字符变更
内嵌
并排
正在显示
26 个修改的文件
包含
147 行增加
和
77 行删除
+147
-77
ExtDataSetTableMapper.xml
...ava/io/dataease/base/mapper/ext/ExtDataSetTableMapper.xml
+1
-1
DefaultLicenseService.java
...va/io/dataease/commons/license/DefaultLicenseService.java
+1
-1
StoreApi.java
.../main/java/io/dataease/controller/panel/api/StoreApi.java
+1
-1
StoreServer.java
...java/io/dataease/controller/panel/server/StoreServer.java
+8
-3
JdbcProvider.java
...in/java/io/dataease/datasource/provider/JdbcProvider.java
+4
-2
AboutService.java
backend/src/main/java/io/dataease/service/AboutService.java
+2
-2
DataSetTableService.java
...java/io/dataease/service/dataset/DataSetTableService.java
+13
-6
ExtractDataService.java
.../java/io/dataease/service/dataset/ExtractDataService.java
+7
-1
StoreService.java
...src/main/java/io/dataease/service/panel/StoreService.java
+14
-5
V2__dataease_ddl.sql
backend/src/main/resources/db/migration/V2__dataease_ddl.sql
+1
-0
V3__init_data.sql
backend/src/main/resources/db/migration/V3__init_data.sql
+2
-2
index.vue
frontend/src/components/LangSelect/index.vue
+3
-3
UserView.vue
frontend/src/components/canvas/custom-component/UserView.vue
+5
-3
index.js
frontend/src/lang/index.js
+6
-16
zh.js
frontend/src/lang/zh.js
+1
-0
main.js
frontend/src/main.js
+0
-1
user.js
frontend/src/store/modules/user.js
+5
-0
request.js
frontend/src/utils/request.js
+4
-0
LabelNormal.vue
frontend/src/views/chart/components/normal/LabelNormal.vue
+17
-8
TableNormal.vue
frontend/src/views/chart/components/table/TableNormal.vue
+26
-16
index.vue
frontend/src/views/link/generate/index.vue
+2
-2
index.vue
frontend/src/views/panel/GrantAuth/index.vue
+2
-2
index.vue
frontend/src/views/panel/edit/index.vue
+4
-0
PanelList.vue
frontend/src/views/panel/list/PanelList.vue
+6
-1
form.vue
frontend/src/views/system/user/form.vue
+11
-0
index.vue
frontend/src/views/system/user/index.vue
+1
-1
没有找到文件。
backend/src/main/java/io/dataease/base/mapper/ext/ExtDataSetTableMapper.xml
浏览文件 @
8a88c0bc
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<select
id=
"search"
resultMap=
"BaseResultMapDTO"
>
<select
id=
"search"
resultMap=
"BaseResultMapDTO"
>
select
select
id, `name`, scene_id, data_source_id, `type`, `mode`, create_by, create_time,
id, `name`, scene_id, data_source_id, `type`, `mode`,
`info`,
create_by, create_time,
get_auths(id,'dataset',#{userId}) as `privileges`
get_auths(id,'dataset',#{userId}) as `privileges`
from dataset_table
from dataset_table
<where>
<where>
...
...
backend/src/main/java/io/dataease/commons/license/DefaultLicenseService.java
浏览文件 @
8a88c0bc
...
@@ -21,7 +21,7 @@ public class DefaultLicenseService {
...
@@ -21,7 +21,7 @@ public class DefaultLicenseService {
private
static
final
String
LICENSE_ID
=
"fit2cloud_license"
;
private
static
final
String
LICENSE_ID
=
"fit2cloud_license"
;
private
static
final
String
validatorUtil
=
"/usr/bin/validator"
;
private
static
final
String
validatorUtil
=
"/usr/bin/validator"
;
private
static
final
String
product
=
"
datae
ase"
;
private
static
final
String
product
=
"
DataE
ase"
;
/*private static final String[] NO_PLU_LIMIT_MODULES = new String[]{"dashboard", "gateway"};*/
/*private static final String[] NO_PLU_LIMIT_MODULES = new String[]{"dashboard", "gateway"};*/
public
F2CLicenseResponse
validateLicense
(
String
product
,
String
licenseKey
){
public
F2CLicenseResponse
validateLicense
(
String
product
,
String
licenseKey
){
...
...
backend/src/main/java/io/dataease/controller/panel/api/StoreApi.java
浏览文件 @
8a88c0bc
...
@@ -31,6 +31,6 @@ public interface StoreApi {
...
@@ -31,6 +31,6 @@ public interface StoreApi {
@ApiOperation
(
"移除收藏"
)
@ApiOperation
(
"移除收藏"
)
@PostMapping
(
"/remove/{storeId}"
)
@PostMapping
(
"/remove/{storeId}"
)
void
remove
(
@PathVariable
(
"storeId"
)
Lo
ng
storeId
);
void
remove
(
@PathVariable
(
"storeId"
)
Stri
ng
storeId
);
}
}
backend/src/main/java/io/dataease/controller/panel/server/StoreServer.java
浏览文件 @
8a88c0bc
...
@@ -16,7 +16,7 @@ public class StoreServer implements StoreApi {
...
@@ -16,7 +16,7 @@ public class StoreServer implements StoreApi {
private
StoreService
storeService
;
private
StoreService
storeService
;
@Override
@Override
public
void
store
(
String
id
)
{
public
void
store
(
String
id
)
{
storeService
.
save
(
id
);
storeService
.
save
(
id
);
}
}
...
@@ -26,7 +26,12 @@ public class StoreServer implements StoreApi {
...
@@ -26,7 +26,12 @@ public class StoreServer implements StoreApi {
}
}
@Override
@Override
public
void
remove
(
Long
storeId
)
{
public
void
remove
(
String
storeId
)
{
storeService
.
remove
(
storeId
);
try
{
Long
id
=
Long
.
parseLong
(
storeId
);
storeService
.
remove
(
id
);
}
catch
(
Exception
e
)
{
storeService
.
removeByPanelId
(
storeId
);
}
}
}
}
}
backend/src/main/java/io/dataease/datasource/provider/JdbcProvider.java
浏览文件 @
8a88c0bc
...
@@ -382,9 +382,10 @@ public class JdbcProvider extends DatasourceProvider {
...
@@ -382,9 +382,10 @@ public class JdbcProvider extends DatasourceProvider {
case
doris:
case
doris:
return
"show tables;"
;
return
"show tables;"
;
case
sqlServer:
case
sqlServer:
return
"SELECT TABLE_NAME FROM fit2cloud2.INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE';"
;
SqlServerConfigration
sqlServerConfigration
=
new
Gson
().
fromJson
(
datasourceRequest
.
getDatasource
().
getConfiguration
(),
SqlServerConfigration
.
class
);
return
"SELECT TABLE_NAME FROM DATABASE.INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE';"
.
replace
(
"DATABASE"
,
sqlServerConfigration
.
getDataBase
());
default
:
default
:
return
"show tables;"
;
return
"show tables;"
;
}
}
}
}
}
}
\ No newline at end of file
backend/src/main/java/io/dataease/service/AboutService.java
浏览文件 @
8a88c0bc
...
@@ -15,8 +15,8 @@ import java.util.Optional;
...
@@ -15,8 +15,8 @@ import java.util.Optional;
@Service
@Service
public
class
AboutService
{
public
class
AboutService
{
private
static
final
String
BUILD_VERSION
=
"/opt/
fit2cloud
/conf/version"
;
private
static
final
String
BUILD_VERSION
=
"/opt/
dataease
/conf/version"
;
private
static
final
String
product
=
"
datae
ase"
;
private
static
final
String
product
=
"
DataE
ase"
;
@Resource
@Resource
private
DefaultLicenseService
defaultLicenseService
;
private
DefaultLicenseService
defaultLicenseService
;
...
...
backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java
浏览文件 @
8a88c0bc
...
@@ -661,12 +661,15 @@ public class DataSetTableService {
...
@@ -661,12 +661,15 @@ public class DataSetTableService {
for
(
int
j
=
0
;
j
<
row
.
getPhysicalNumberOfCells
();
j
++)
{
for
(
int
j
=
0
;
j
<
row
.
getPhysicalNumberOfCells
();
j
++)
{
if
(
i
==
0
)
{
if
(
i
==
0
)
{
TableFiled
tableFiled
=
new
TableFiled
();
TableFiled
tableFiled
=
new
TableFiled
();
tableFiled
.
setFieldName
(
readCell
(
row
.
getCell
(
j
)));
tableFiled
.
setRemarks
(
readCell
(
row
.
getCell
(
j
)));
tableFiled
.
setFieldType
(
"TEXT"
);
tableFiled
.
setFieldType
(
"TEXT"
);
if
(
StringUtils
.
isEmpty
(
tableFiled
.
getFieldName
())){
tableFiled
.
setFieldSize
(
1024
);
continue
;
String
columnName
=
readCell
(
row
.
getCell
(
j
));
if
(
StringUtils
.
isEmpty
(
columnName
)){
columnName
=
"NONE_"
+
String
.
valueOf
(
j
);
}
}
tableFiled
.
setFieldName
(
columnName
);
tableFiled
.
setRemarks
(
columnName
);
fields
.
add
(
tableFiled
);
fields
.
add
(
tableFiled
);
}
else
{
}
else
{
r
[
j
]
=
readCell
(
row
.
getCell
(
j
));
r
[
j
]
=
readCell
(
row
.
getCell
(
j
));
...
@@ -694,10 +697,14 @@ public class DataSetTableService {
...
@@ -694,10 +697,14 @@ public class DataSetTableService {
for
(
int
j
=
0
;
j
<
row
.
getPhysicalNumberOfCells
();
j
++)
{
for
(
int
j
=
0
;
j
<
row
.
getPhysicalNumberOfCells
();
j
++)
{
if
(
i
==
0
)
{
if
(
i
==
0
)
{
TableFiled
tableFiled
=
new
TableFiled
();
TableFiled
tableFiled
=
new
TableFiled
();
tableFiled
.
setFieldName
(
readCell
(
row
.
getCell
(
j
)));
tableFiled
.
setRemarks
(
readCell
(
row
.
getCell
(
j
)));
tableFiled
.
setFieldType
(
"TEXT"
);
tableFiled
.
setFieldType
(
"TEXT"
);
tableFiled
.
setFieldSize
(
1024
);
tableFiled
.
setFieldSize
(
1024
);
String
columnName
=
readCell
(
row
.
getCell
(
j
));
if
(
StringUtils
.
isEmpty
(
columnName
)){
columnName
=
"NONE_"
+
String
.
valueOf
(
j
);
}
tableFiled
.
setFieldName
(
columnName
);
tableFiled
.
setRemarks
(
columnName
);
fields
.
add
(
tableFiled
);
fields
.
add
(
tableFiled
);
}
else
{
}
else
{
r
[
j
]
=
readCell
(
row
.
getCell
(
j
));
r
[
j
]
=
readCell
(
row
.
getCell
(
j
));
...
...
backend/src/main/java/io/dataease/service/dataset/ExtractDataService.java
浏览文件 @
8a88c0bc
...
@@ -497,8 +497,14 @@ public class ExtractDataService {
...
@@ -497,8 +497,14 @@ public class ExtractDataService {
}
}
private
StepMeta
excelInputStep
(
String
filePath
,
List
<
DatasetTableField
>
datasetTableFields
)
{
private
StepMeta
excelInputStep
(
String
filePath
,
List
<
DatasetTableField
>
datasetTableFields
)
{
String
suffix
=
filePath
.
substring
(
filePath
.
lastIndexOf
(
"."
)
+
1
);
ExcelInputMeta
excelInputMeta
=
new
ExcelInputMeta
();
ExcelInputMeta
excelInputMeta
=
new
ExcelInputMeta
();
excelInputMeta
.
setSpreadSheetType
(
SpreadSheetType
.
SAX_POI
);
if
(
StringUtils
.
equalsIgnoreCase
(
suffix
,
"xlsx"
))
{
excelInputMeta
.
setSpreadSheetType
(
SpreadSheetType
.
SAX_POI
);
}
if
(
StringUtils
.
equalsIgnoreCase
(
suffix
,
"xls"
))
{
excelInputMeta
.
setSpreadSheetType
(
SpreadSheetType
.
JXL
);
}
excelInputMeta
.
setPassword
(
"Encrypted"
);
excelInputMeta
.
setPassword
(
"Encrypted"
);
excelInputMeta
.
setFileName
(
new
String
[]{
filePath
});
excelInputMeta
.
setFileName
(
new
String
[]{
filePath
});
excelInputMeta
.
setStartsWithHeader
(
true
);
excelInputMeta
.
setStartsWithHeader
(
true
);
...
...
backend/src/main/java/io/dataease/service/panel/StoreService.java
浏览文件 @
8a88c0bc
package
io
.
dataease
.
service
.
panel
;
package
io
.
dataease
.
service
.
panel
;
import
io.dataease.base.domain.PanelStore
;
import
io.dataease.base.domain.PanelStore
;
import
io.dataease.base.domain.PanelStoreExample
;
import
io.dataease.base.mapper.PanelStoreMapper
;
import
io.dataease.base.mapper.PanelStoreMapper
;
import
io.dataease.base.mapper.ext.ExtPanelStoreMapper
;
import
io.dataease.base.mapper.ext.ExtPanelStoreMapper
;
import
io.dataease.base.mapper.ext.query.GridExample
;
import
io.dataease.base.mapper.ext.query.GridExample
;
...
@@ -9,6 +10,7 @@ import io.dataease.controller.sys.base.BaseGridRequest;
...
@@ -9,6 +10,7 @@ import io.dataease.controller.sys.base.BaseGridRequest;
import
io.dataease.controller.sys.base.ConditionEntity
;
import
io.dataease.controller.sys.base.ConditionEntity
;
import
io.dataease.dto.panel.PanelStoreDto
;
import
io.dataease.dto.panel.PanelStoreDto
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
...
@@ -22,7 +24,7 @@ public class StoreService {
...
@@ -22,7 +24,7 @@ public class StoreService {
@Resource
@Resource
private
ExtPanelStoreMapper
extPanelStoreMapper
;
private
ExtPanelStoreMapper
extPanelStoreMapper
;
public
void
save
(
String
panelGroupId
){
public
void
save
(
String
panelGroupId
)
{
Long
userId
=
AuthUtils
.
getUser
().
getUserId
();
Long
userId
=
AuthUtils
.
getUser
().
getUserId
();
PanelStore
panelStore
=
new
PanelStore
();
PanelStore
panelStore
=
new
PanelStore
();
panelStore
.
setCreateTime
(
System
.
currentTimeMillis
());
panelStore
.
setCreateTime
(
System
.
currentTimeMillis
());
...
@@ -31,24 +33,31 @@ public class StoreService {
...
@@ -31,24 +33,31 @@ public class StoreService {
panelStoreMapper
.
insert
(
panelStore
);
panelStoreMapper
.
insert
(
panelStore
);
}
}
public
void
removeByPanelId
(
String
panelId
)
{
PanelStoreExample
panelStoreExample
=
new
PanelStoreExample
();
panelStoreExample
.
createCriteria
().
andPanelGroupIdEqualTo
(
panelId
);
panelStoreMapper
.
deleteByExample
(
panelStoreExample
);
}
public
void
remove
(
Long
storeId
)
{
public
void
remove
(
Long
storeId
){
panelStoreMapper
.
deleteByPrimaryKey
(
storeId
);
panelStoreMapper
.
deleteByPrimaryKey
(
storeId
);
}
}
/**
/**
* 按照当前用户ID查询收藏仪表板
* 按照当前用户ID查询收藏仪表板
*
* @param request
* @param request
* @return
* @return
*/
*/
public
List
<
PanelStoreDto
>
query
(
BaseGridRequest
request
){
public
List
<
PanelStoreDto
>
query
(
BaseGridRequest
request
)
{
Long
userId
=
AuthUtils
.
getUser
().
getUserId
();
Long
userId
=
AuthUtils
.
getUser
().
getUserId
();
ConditionEntity
condition
=
new
ConditionEntity
();
ConditionEntity
condition
=
new
ConditionEntity
();
condition
.
setField
(
"s.user_id"
);
condition
.
setField
(
"s.user_id"
);
condition
.
setOperator
(
"eq"
);
condition
.
setOperator
(
"eq"
);
condition
.
setValue
(
userId
);
condition
.
setValue
(
userId
);
request
.
setConditions
(
new
ArrayList
<
ConditionEntity
>(){{
add
(
condition
);}});
request
.
setConditions
(
new
ArrayList
<
ConditionEntity
>()
{{
add
(
condition
);
}});
GridExample
example
=
request
.
convertExample
();
GridExample
example
=
request
.
convertExample
();
List
<
PanelStoreDto
>
stores
=
extPanelStoreMapper
.
query
(
example
);
List
<
PanelStoreDto
>
stores
=
extPanelStoreMapper
.
query
(
example
);
return
stores
;
return
stores
;
...
...
backend/src/main/resources/db/migration/V2__dataease_ddl.sql
浏览文件 @
8a88c0bc
...
@@ -44,6 +44,7 @@ CREATE TABLE `datasource` (
...
@@ -44,6 +44,7 @@ CREATE TABLE `datasource` (
`configuration`
longtext
NOT
NULL
COMMENT
'详细信息'
,
`configuration`
longtext
NOT
NULL
COMMENT
'详细信息'
,
`create_time`
bigint
(
13
)
NOT
NULL
COMMENT
'Create timestamp'
,
`create_time`
bigint
(
13
)
NOT
NULL
COMMENT
'Create timestamp'
,
`update_time`
bigint
(
13
)
NOT
NULL
COMMENT
'Update timestamp'
,
`update_time`
bigint
(
13
)
NOT
NULL
COMMENT
'Update timestamp'
,
`create_by`
varchar
(
50
)
COMMENT
'创建人ID'
,
PRIMARY
KEY
(
`id`
)
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
;
DEFAULT
CHARSET
=
utf8mb4
;
...
...
backend/src/main/resources/db/migration/V3__init_data.sql
浏览文件 @
8a88c0bc
...
@@ -50,8 +50,8 @@ INSERT INTO `sys_menu` VALUES (52, 1, 0, 1, '关于', '关于', 'system/about/in
...
@@ -50,8 +50,8 @@ INSERT INTO `sys_menu` VALUES (52, 1, 0, 1, '关于', '关于', 'system/about/in
COMMIT
;
COMMIT
;
BEGIN
;
BEGIN
;
INSERT
INTO
`sys_user`
VALUES
(
4
,
0
,
'admin'
,
'管理员'
,
'男'
,
NULL
,
'admin@fit2cloud.com'
,
'
e10adc3949ba59abbe56e057f20f883e
'
,
b
'1'
,
1
,
NULL
,
NULL
,
NULL
,
NULL
,
1615184951534
,
NULL
);
INSERT
INTO
`sys_user`
VALUES
(
4
,
0
,
'admin'
,
'管理员'
,
'男'
,
NULL
,
'admin@fit2cloud.com'
,
'
40b8893ea9ebc2d631c4bb42bb1e8996
'
,
b
'1'
,
1
,
NULL
,
NULL
,
NULL
,
NULL
,
1615184951534
,
NULL
);
INSERT
INTO
`sys_user`
VALUES
(
19
,
25
,
'demo'
,
'demo'
,
'男'
,
NULL
,
'demo@fit2cloud.com'
,
'
e10adc3949ba59abbe56e057f20f883e
'
,
b
'0'
,
0
,
NULL
,
NULL
,
NULL
,
1619086036234
,
1619086036234
,
NULL
);
INSERT
INTO
`sys_user`
VALUES
(
19
,
25
,
'demo'
,
'demo'
,
'男'
,
NULL
,
'demo@fit2cloud.com'
,
'
40b8893ea9ebc2d631c4bb42bb1e8996
'
,
b
'0'
,
0
,
NULL
,
NULL
,
NULL
,
1619086036234
,
1619086036234
,
NULL
);
COMMIT
;
COMMIT
;
...
...
frontend/src/components/LangSelect/index.vue
浏览文件 @
8a88c0bc
...
@@ -4,13 +4,13 @@
...
@@ -4,13 +4,13 @@
<svg-icon
class-name=
"international-icon"
icon-class=
"language"
/>
<svg-icon
class-name=
"international-icon"
icon-class=
"language"
/>
</div>
</div>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
:disabled=
"language==='zh
'"
command=
"zh
"
>
<el-dropdown-item
:disabled=
"language==='zh
_CN'"
command=
"zh_CN
"
>
简体
简体
</el-dropdown-item>
</el-dropdown-item>
<el-dropdown-item
:disabled=
"language==='
tw'"
command=
"tw
"
>
<el-dropdown-item
:disabled=
"language==='
zh_TW'"
command=
"zh_TW
"
>
繁体
繁体
</el-dropdown-item>
</el-dropdown-item>
<el-dropdown-item
:disabled=
"language==='en
'"
command=
"en
"
>
<el-dropdown-item
:disabled=
"language==='en
_US'"
command=
"en_US
"
>
English
English
</el-dropdown-item>
</el-dropdown-item>
<!--
<el-dropdown-item
:disabled=
"language==='es'"
command=
"es"
>
<!--
<el-dropdown-item
:disabled=
"language==='es'"
command=
"es"
>
...
...
frontend/src/components/canvas/custom-component/UserView.vue
浏览文件 @
8a88c0bc
...
@@ -6,8 +6,9 @@
...
@@ -6,8 +6,9 @@
{{
message
}}
{{
message
}}
</div>
</div>
</div>
</div>
<chart-component
v-if=
"requestStatus==='success'&&chart.type && !chart.type.includes('table')"
:ref=
"element.propValue.id"
class=
"chart-class"
:chart=
"chart"
/>
<chart-component
v-if=
"requestStatus==='success'&&chart.type && !chart.type.includes('table') && !chart.type.includes('text')"
:ref=
"element.propValue.id"
class=
"chart-class"
:chart=
"chart"
/>
<table-normal
v-if=
"requestStatus==='success'&&chart.type && chart.type.includes('table')"
:chart=
"chart"
class=
"table-class"
/>
<table-normal
v-if=
"requestStatus==='success'&&chart.type && chart.type.includes('table')"
:ref=
"element.propValue.id"
:chart=
"chart"
class=
"table-class"
/>
<label-normal
v-if=
"requestStatus==='success'&&chart.type && chart.type.includes('text')"
:ref=
"element.propValue.id"
:chart=
"chart"
class=
"table-class"
/>
</div>
</div>
</
template
>
</
template
>
...
@@ -16,6 +17,7 @@
...
@@ -16,6 +17,7 @@
import
{
viewData
}
from
'@/api/panel/panel'
import
{
viewData
}
from
'@/api/panel/panel'
import
ChartComponent
from
'@/views/chart/components/ChartComponent.vue'
import
ChartComponent
from
'@/views/chart/components/ChartComponent.vue'
import
TableNormal
from
'@/views/chart/components/table/TableNormal'
import
TableNormal
from
'@/views/chart/components/table/TableNormal'
import
LabelNormal
from
'../../../views/chart/components/normal/LabelNormal'
import
{
mapState
}
from
'vuex'
import
{
mapState
}
from
'vuex'
...
@@ -33,7 +35,7 @@ import {
...
@@ -33,7 +35,7 @@ import {
export
default
{
export
default
{
name
:
'UserView'
,
name
:
'UserView'
,
components
:
{
ChartComponent
,
TableNormal
},
components
:
{
ChartComponent
,
TableNormal
,
LabelNormal
},
props
:
{
props
:
{
element
:
{
element
:
{
type
:
Object
type
:
Object
...
...
frontend/src/lang/index.js
浏览文件 @
8a88c0bc
...
@@ -4,13 +4,11 @@ import Cookies from 'js-cookie'
...
@@ -4,13 +4,11 @@ import Cookies from 'js-cookie'
import
elementEnLocale
from
'element-ui/lib/locale/lang/en'
// element-ui lang
import
elementEnLocale
from
'element-ui/lib/locale/lang/en'
// element-ui lang
import
elementZhLocale
from
'element-ui/lib/locale/lang/zh-CN'
// element-ui lang
import
elementZhLocale
from
'element-ui/lib/locale/lang/zh-CN'
// element-ui lang
import
elementTWLocale
from
'element-ui/lib/locale/lang/zh-TW'
// element-ui lang
import
elementTWLocale
from
'element-ui/lib/locale/lang/zh-TW'
// element-ui lang
import
elementEsLocale
from
'element-ui/lib/locale/lang/es'
// element-ui lang
import
elementJaLocale
from
'element-ui/lib/locale/lang/ja'
// element-ui lang
import
enLocale
from
'./en'
import
enLocale
from
'./en'
import
zhLocale
from
'./zh'
import
zhLocale
from
'./zh'
import
twLocale
from
'./tw'
import
twLocale
from
'./tw'
import
esLocale
from
'./es'
import
jaLocale
from
'./ja'
import
fuZh
from
'fit2cloud-ui/src/locale/lang/zh-CN'
// 加载fit2cloud的内容
import
fuZh
from
'fit2cloud-ui/src/locale/lang/zh-CN'
// 加载fit2cloud的内容
import
fuEn
from
'fit2cloud-ui/src/locale/lang/en_US'
// 加载fit2cloud的内容
import
fuEn
from
'fit2cloud-ui/src/locale/lang/en_US'
// 加载fit2cloud的内容
...
@@ -18,27 +16,19 @@ import fuEn from 'fit2cloud-ui/src/locale/lang/en_US' // 加载fit2cloud的内
...
@@ -18,27 +16,19 @@ import fuEn from 'fit2cloud-ui/src/locale/lang/en_US' // 加载fit2cloud的内
Vue
.
use
(
VueI18n
)
Vue
.
use
(
VueI18n
)
const
messages
=
{
const
messages
=
{
en
:
{
en
_US
:
{
...
enLocale
,
...
enLocale
,
...
elementEnLocale
,
...
elementEnLocale
,
...
fuEn
...
fuEn
},
},
zh
:
{
zh
_CN
:
{
...
zhLocale
,
...
zhLocale
,
...
elementZhLocale
,
...
elementZhLocale
,
...
fuZh
...
fuZh
},
},
tw
:
{
zh_TW
:
{
...
twLocale
,
...
twLocale
,
...
elementTWLocale
...
elementTWLocale
},
es
:
{
...
esLocale
,
...
elementEsLocale
},
ja
:
{
...
jaLocale
,
...
elementJaLocale
}
}
}
}
export
function
getLanguage
()
{
export
function
getLanguage
()
{
...
@@ -53,7 +43,7 @@ export function getLanguage() {
...
@@ -53,7 +43,7 @@ export function getLanguage() {
return
locale
return
locale
}
}
}
}
return
'zh'
return
'zh
_CN
'
}
}
const
i18n
=
new
VueI18n
({
const
i18n
=
new
VueI18n
({
// set locale
// set locale
...
...
frontend/src/lang/zh.js
浏览文件 @
8a88c0bc
...
@@ -87,6 +87,7 @@ export default {
...
@@ -87,6 +87,7 @@ export default {
password_error
:
'密码不小于6位'
password_error
:
'密码不小于6位'
},
},
commons
:
{
commons
:
{
close
:
'关闭'
,
icon
:
'图标'
,
icon
:
'图标'
,
all
:
'全部'
,
all
:
'全部'
,
enable
:
'启用'
,
enable
:
'启用'
,
...
...
frontend/src/main.js
浏览文件 @
8a88c0bc
...
@@ -67,7 +67,6 @@ Vue.use(message)
...
@@ -67,7 +67,6 @@ Vue.use(message)
Vue
.
config
.
productionTip
=
false
Vue
.
config
.
productionTip
=
false
Vue
.
prototype
.
hasDataPermission
=
function
(
pTarget
,
pSource
)
{
Vue
.
prototype
.
hasDataPermission
=
function
(
pTarget
,
pSource
)
{
debugger
if
(
pSource
&&
pTarget
)
{
if
(
pSource
&&
pTarget
)
{
return
pSource
.
indexOf
(
pTarget
)
>
-
1
return
pSource
.
indexOf
(
pTarget
)
>
-
1
}
}
...
...
frontend/src/store/modules/user.js
浏览文件 @
8a88c0bc
...
@@ -4,6 +4,7 @@ import { resetRouter } from '@/router'
...
@@ -4,6 +4,7 @@ import { resetRouter } from '@/router'
import
{
format
}
from
'@/utils/formatUi'
import
{
format
}
from
'@/utils/formatUi'
import
{
getLanguage
}
from
'@/lang/index'
import
{
getLanguage
}
from
'@/lang/index'
import
Cookies
from
'js-cookie'
import
Cookies
from
'js-cookie'
import
router
from
'@/router'
const
getDefaultState
=
()
=>
{
const
getDefaultState
=
()
=>
{
return
{
return
{
token
:
getToken
(),
token
:
getToken
(),
...
@@ -101,6 +102,9 @@ const actions = {
...
@@ -101,6 +102,9 @@ const actions = {
commit
(
'SET_PERMISSIONS'
,
permissions
)
commit
(
'SET_PERMISSIONS'
,
permissions
)
commit
(
'SET_LANGUAGE'
,
language
)
commit
(
'SET_LANGUAGE'
,
language
)
// axios.defaults.headers.common['Accept-Language'] = language || 'zh_CN'
// document.querySelector('html').setAttribute('lang', language || 'zh_CN')
resolve
(
data
)
resolve
(
data
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
reject
(
error
)
reject
(
error
)
...
@@ -155,6 +159,7 @@ const actions = {
...
@@ -155,6 +159,7 @@ const actions = {
setLanguage
({
commit
},
language
)
{
setLanguage
({
commit
},
language
)
{
languageApi
(
language
).
then
(()
=>
{
languageApi
(
language
).
then
(()
=>
{
commit
(
'SET_LANGUAGE'
,
language
)
commit
(
'SET_LANGUAGE'
,
language
)
router
.
go
(
0
)
})
})
}
}
}
}
...
...
frontend/src/utils/request.js
浏览文件 @
8a88c0bc
...
@@ -34,6 +34,10 @@ service.interceptors.request.use(
...
@@ -34,6 +34,10 @@ service.interceptors.request.use(
if
((
linkToken
=
getLinkToken
())
!==
null
)
{
if
((
linkToken
=
getLinkToken
())
!==
null
)
{
config
.
headers
[
LinkTokenKey
]
=
linkToken
config
.
headers
[
LinkTokenKey
]
=
linkToken
}
}
if
(
i18n
.
locale
)
{
config
.
headers
[
'Accept-Language'
]
=
i18n
.
locale
}
// 增加loading
// 增加loading
config
.
loading
&&
tryShowLoading
(
store
.
getters
.
currentPath
)
config
.
loading
&&
tryShowLoading
(
store
.
getters
.
currentPath
)
...
...
frontend/src/views/chart/components/normal/LabelNormal.vue
浏览文件 @
8a88c0bc
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
<
script
>
<
script
>
import
{
hexColorToRGBA
}
from
'../../chart/util'
import
{
hexColorToRGBA
}
from
'../../chart/util'
import
eventBus
from
'@/components/canvas/utils/eventBus'
export
default
{
export
default
{
name
:
'LabelNormal'
,
name
:
'LabelNormal'
,
...
@@ -83,6 +84,10 @@ export default {
...
@@ -83,6 +84,10 @@ export default {
mounted
()
{
mounted
()
{
this
.
init
()
this
.
init
()
this
.
calcHeight
()
this
.
calcHeight
()
// 监听元素变动事件
eventBus
.
$on
(
'resizing'
,
(
componentId
)
=>
{
this
.
chartResize
()
})
},
},
methods
:
{
methods
:
{
init
()
{
init
()
{
...
@@ -94,14 +99,14 @@ export default {
...
@@ -94,14 +99,14 @@ export default {
},
},
calcHeight
()
{
calcHeight
()
{
const
that
=
this
const
that
=
this
setTimeout
(
function
()
{
this
.
$nextTick
(
function
()
{
// const currentHeight = document.documentElement.clientHeight
if
(
that
.
$refs
.
tableContainer
)
{
// const tableMaxHeight = currentHeight - 56 - 40 - 84 - that.$refs.title.offsetHeight - 20
const
currentHeight
=
that
.
$refs
.
tableContainer
.
offsetHeight
const
currentHeight
=
that
.
$refs
.
tableContainer
.
offsetHeight
const
contentHeight
=
currentHeight
-
that
.
$refs
.
title
.
offsetHeight
const
contentHeight
=
currentHeight
-
that
.
$refs
.
title
.
offsetHeight
that
.
height
=
contentHeight
+
'px'
that
.
height
=
contentHeight
+
'px'
that
.
content_class
.
height
=
that
.
height
that
.
content_class
.
height
=
that
.
height
}
}
,
10
)
})
},
},
initStyle
()
{
initStyle
()
{
if
(
this
.
chart
.
customAttr
)
{
if
(
this
.
chart
.
customAttr
)
{
...
@@ -135,6 +140,10 @@ export default {
...
@@ -135,6 +140,10 @@ export default {
this
.
bg_class
.
background
=
hexColorToRGBA
(
customStyle
.
background
.
color
,
customStyle
.
background
.
alpha
)
this
.
bg_class
.
background
=
hexColorToRGBA
(
customStyle
.
background
.
color
,
customStyle
.
background
.
alpha
)
}
}
}
}
},
chartResize
()
{
// 指定图表的配置项和数据
this
.
calcHeight
()
}
}
}
}
}
}
...
...
frontend/src/views/chart/components/table/TableNormal.vue
浏览文件 @
8a88c0bc
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
<
script
>
<
script
>
import
{
hexColorToRGBA
}
from
'../../chart/util'
import
{
hexColorToRGBA
}
from
'../../chart/util'
import
eventBus
from
'@/components/canvas/utils/eventBus'
export
default
{
export
default
{
name
:
'TableNormal'
,
name
:
'TableNormal'
,
...
@@ -91,6 +92,10 @@ export default {
...
@@ -91,6 +92,10 @@ export default {
mounted
()
{
mounted
()
{
this
.
init
()
this
.
init
()
this
.
calcHeight
()
this
.
calcHeight
()
// 监听元素变动事件
eventBus
.
$on
(
'resizing'
,
(
componentId
)
=>
{
this
.
chartResize
()
})
},
},
methods
:
{
methods
:
{
init
()
{
init
()
{
...
@@ -111,23 +116,23 @@ export default {
...
@@ -111,23 +116,23 @@ export default {
},
},
calcHeight
()
{
calcHeight
()
{
const
that
=
this
const
that
=
this
setTimeout
(
function
()
{
this
.
$nextTick
(
function
()
{
// const currentHeight = document.documentElement.clientHeight
if
(
that
.
$refs
.
tableContainer
)
{
// const tableMaxHeight = currentHeight - 56 - 40 - 84 - that.$refs.title.offsetHeight - 20
const
currentHeight
=
that
.
$refs
.
tableContainer
.
offsetHeight
const
currentHeight
=
that
.
$refs
.
tableContainer
.
offsetHeight
const
tableMaxHeight
=
currentHeight
-
that
.
$refs
.
title
.
offsetHeight
const
tableMaxHeight
=
currentHeight
-
that
.
$refs
.
title
.
offset
Height
let
table
Height
let
tableHeight
if
(
that
.
chart
.
data
)
{
if
(
that
.
chart
.
data
)
{
tableHeight
=
(
that
.
chart
.
data
.
tableRow
.
length
+
2
)
*
36
tableHeight
=
(
that
.
chart
.
data
.
tableRow
.
length
+
2
)
*
36
}
else
{
}
else
{
tableHeight
=
0
tableHeight
=
0
}
}
if
(
tableHeight
>
tableMaxHeight
)
{
if
(
tableHeight
>
tableMaxHeight
)
{
that
.
height
=
tableMaxHeight
+
'px'
that
.
height
=
tableMaxHeight
+
'px'
}
else
{
}
else
{
that
.
height
=
'auto'
that
.
height
=
'auto'
}
}
}
}
,
10
)
})
},
},
initStyle
()
{
initStyle
()
{
if
(
this
.
chart
.
customAttr
)
{
if
(
this
.
chart
.
customAttr
)
{
...
@@ -207,6 +212,11 @@ export default {
...
@@ -207,6 +212,11 @@ export default {
})
})
// 返回一个二维数组的表尾合计(不要平均值,就不要在数组中添加)
// 返回一个二维数组的表尾合计(不要平均值,就不要在数组中添加)
return
[
means
]
return
[
means
]
},
chartResize
()
{
// 指定图表的配置项和数据
this
.
calcHeight
()
}
}
}
}
}
}
...
...
frontend/src/views/link/generate/index.vue
浏览文件 @
8a88c0bc
...
@@ -32,8 +32,8 @@
...
@@ -32,8 +32,8 @@
<div
v-if=
"valid"
class=
"auth-root-class"
>
<div
v-if=
"valid"
class=
"auth-root-class"
>
<span
slot=
"footer"
>
<span
slot=
"footer"
>
<el-button
v-if=
"!form.enablePwd"
v-clipboard:copy=
"form.uri"
v-clipboard:success=
"onCopy"
v-clipboard:error=
"onError"
type=
"primary"
>
复制链接
</el-button>
<el-button
v-if=
"!form.enablePwd"
v-clipboard:copy=
"form.uri"
v-clipboard:success=
"onCopy"
v-clipboard:error=
"onError"
size=
"mini"
type=
"primary"
>
复制链接
</el-button>
<el-button
v-if=
"form.enablePwd"
v-clipboard:copy=
"form.uri + ' 密码: '+ form.pwd"
v-clipboard:success=
"onCopy"
v-clipboard:error=
"onError"
type=
"primary"
>
复制链接及密码
</el-button>
<el-button
v-if=
"form.enablePwd"
v-clipboard:copy=
"form.uri + ' 密码: '+ form.pwd"
v-clipboard:success=
"onCopy"
v-clipboard:error=
"onError"
size=
"mini"
type=
"primary"
>
复制链接及密码
</el-button>
</span>
</span>
</div>
</div>
...
...
frontend/src/views/panel/GrantAuth/index.vue
浏览文件 @
8a88c0bc
...
@@ -14,8 +14,8 @@
...
@@ -14,8 +14,8 @@
</el-tabs>
</el-tabs>
<div
class=
"auth-root-class"
>
<div
class=
"auth-root-class"
>
<span
slot=
"footer"
>
<span
slot=
"footer"
>
<el-button
@
click=
"cancel"
>
{{
$t
(
'commons.cancel'
)
}}
</el-button>
<el-button
size=
"mini"
@
click=
"cancel"
>
{{
$t
(
'commons.cancel'
)
}}
</el-button>
<el-button
type=
"primary"
@
click=
"save"
>
{{
$t
(
'commons.confirm'
)
}}
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"save"
>
{{
$t
(
'commons.confirm'
)
}}
</el-button>
</span>
</span>
</div>
</div>
</div>
</div>
...
...
frontend/src/views/panel/edit/index.vue
浏览文件 @
8a88c0bc
...
@@ -362,6 +362,10 @@ export default {
...
@@ -362,6 +362,10 @@ export default {
border
:
none
;
border
:
none
;
}
}
.ms-main-container
{
height
:
calc
(
100vh
-
91px
);
}
.de-header
{
.de-header
{
height
:
35px
!important
;
height
:
35px
!important
;
border-bottom
:
1px
solid
#E6E6E6
;
border-bottom
:
1px
solid
#E6E6E6
;
...
...
frontend/src/views/panel/list/PanelList.vue
浏览文件 @
8a88c0bc
...
@@ -30,7 +30,10 @@
...
@@ -30,7 +30,10 @@
<el-row>
<el-row>
<span
class=
"header-title"
>
<span
class=
"header-title"
>
{{
$t
(
'panel.panel'
)
}}
{{
$t
(
'panel.panel'
)
}}
<el-button
style=
"float: right;padding-right: 7px;"
type=
"text"
icon=
"el-icon-circle-plus"
@
click=
"showEditPanel(newFolder)"
/>
<!--
<el-button
style=
"float: right;padding-right: 7px;"
type=
"text"
@
click=
"showEditPanel(newFolder)"
/>
-->
<el-button
style=
"float: right;"
type=
"primary"
size=
"mini"
@
click=
"showEditPanel(newFolder)"
>
{{
$t
(
'panel.groupAdd'
)
}}
</el-button>
</span>
</span>
</el-row>
</el-row>
<el-col
class=
"custom-tree-container"
>
<el-col
class=
"custom-tree-container"
>
...
@@ -331,12 +334,14 @@ export default {
...
@@ -331,12 +334,14 @@ export default {
this
.
editPanel
.
panelInfo
.
name
=
this
.
$t
(
'panel.panelAdd'
)
this
.
editPanel
.
panelInfo
.
name
=
this
.
$t
(
'panel.panelAdd'
)
this
.
editPanel
.
panelInfo
.
pid
=
param
.
data
.
id
this
.
editPanel
.
panelInfo
.
pid
=
param
.
data
.
id
this
.
editPanel
.
panelInfo
.
level
=
param
.
data
.
level
+
1
this
.
editPanel
.
panelInfo
.
level
=
param
.
data
.
level
+
1
this
.
editPanel
.
panelInfo
.
panelType
=
'self'
break
break
case
'newFirstFolder'
:
case
'newFirstFolder'
:
this
.
editPanel
.
titlePre
=
this
.
$t
(
'commons.create'
)
this
.
editPanel
.
titlePre
=
this
.
$t
(
'commons.create'
)
this
.
editPanel
.
panelInfo
.
name
=
''
this
.
editPanel
.
panelInfo
.
name
=
''
this
.
editPanel
.
panelInfo
.
pid
=
null
this
.
editPanel
.
panelInfo
.
pid
=
null
this
.
editPanel
.
panelInfo
.
level
=
0
this
.
editPanel
.
panelInfo
.
level
=
0
this
.
editPanel
.
panelInfo
.
panelType
=
'self'
break
break
case
'edit'
:
case
'edit'
:
case
'rename'
:
case
'rename'
:
...
...
frontend/src/views/system/user/form.vue
浏览文件 @
8a88c0bc
...
@@ -28,11 +28,13 @@
...
@@ -28,11 +28,13 @@
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('commons.organization')"
prop=
"dept"
>
<el-form-item
:label=
"$t('commons.organization')"
prop=
"dept"
>
<treeselect
<treeselect
ref=
"deptTreeSelect"
v-model=
"form.deptId"
v-model=
"form.deptId"
:options=
"depts"
:options=
"depts"
:load-options=
"loadDepts"
:load-options=
"loadDepts"
:auto-load-root-options=
"false"
:auto-load-root-options=
"false"
:placeholder=
"$t('user.choose_org')"
:placeholder=
"$t('user.choose_org')"
@
open=
"filterData"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('commons.role')"
prop=
"roleIds"
>
<el-form-item
:label=
"$t('commons.role')"
prop=
"roleIds"
>
...
@@ -257,6 +259,15 @@ export default {
...
@@ -257,6 +259,15 @@ export default {
},
},
backToList
()
{
backToList
()
{
this
.
$router
.
push
({
name
:
'用户管理'
})
this
.
$router
.
push
({
name
:
'用户管理'
})
},
filterData
(
instanceId
)
{
const
results
=
this
.
depts
.
map
(
node
=>
{
if
(
node
.
hasChildren
)
{
node
.
children
=
null
}
return
node
})
this
.
depts
=
results
}
}
}
}
}
}
...
...
frontend/src/views/system/user/index.vue
浏览文件 @
8a88c0bc
...
@@ -175,7 +175,7 @@ export default {
...
@@ -175,7 +175,7 @@ export default {
}
}
],
],
searchConfig
:
{
searchConfig
:
{
useQuickSearch
:
fals
e
,
useQuickSearch
:
tru
e
,
quickPlaceholder
:
'按姓名搜索'
,
quickPlaceholder
:
'按姓名搜索'
,
components
:
[
components
:
[
{
field
:
'nick_name'
,
label
:
'姓名'
,
component
:
'FuComplexInput'
},
{
field
:
'nick_name'
,
label
:
'姓名'
,
component
:
'FuComplexInput'
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论