Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
bde937f9
提交
bde937f9
authored
4月 29, 2021
作者:
taojinlong
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'main' of github.com:dataease/dataease into main
上级
9c3ca099
098436fa
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
37 个修改的文件
包含
747 行增加
和
197 行删除
+747
-197
DynamicMenuDto.java
...rc/main/java/io/dataease/auth/api/dto/DynamicMenuDto.java
+2
-0
F2CRealm.java
backend/src/main/java/io/dataease/auth/config/F2CRealm.java
+3
-0
AuthServer.java
...end/src/main/java/io/dataease/auth/server/AuthServer.java
+5
-1
DynamicMenuServiceImpl.java
...io/dataease/auth/service/impl/DynamicMenuServiceImpl.java
+1
-0
JWTUtils.java
backend/src/main/java/io/dataease/auth/util/JWTUtils.java
+11
-1
DataSetTableController.java
...o/dataease/controller/dataset/DataSetTableController.java
+3
-3
DataSetPreviewPage.java
...main/java/io/dataease/dto/dataset/DataSetPreviewPage.java
+17
-0
DataSetTableService.java
...java/io/dataease/service/dataset/DataSetTableService.java
+39
-4
SysUserService.java
...src/main/java/io/dataease/service/sys/SysUserService.java
+6
-2
application.properties
backend/src/main/resources/application.properties
+4
-0
package.json
frontend/package.json
+1
-1
index.vue
frontend/src/components/back-button/index.vue
+46
-0
LayoutContent.vue
frontend/src/components/business/LayoutContent.vue
+40
-2
index.vue
frontend/src/components/business/complex-table/index.vue
+18
-13
index.vue
frontend/src/components/business/tree-table/index.vue
+19
-5
zh.js
frontend/src/lang/zh.js
+5
-1
AppMain.vue
frontend/src/layout/components/AppMain.vue
+3
-3
mixins.scss
frontend/src/styles/common/mixins.scss
+14
-6
mixin.scss
frontend/src/styles/mixin.scss
+6
-0
chart.js
frontend/src/views/chart/chart/chart.js
+18
-0
TitleSelector.vue
.../views/chart/components/component-style/TitleSelector.vue
+1
-1
ColorSelector.vue
...d/src/views/chart/components/shape-attr/ColorSelector.vue
+5
-5
SizeSelector.vue
...nd/src/views/chart/components/shape-attr/SizeSelector.vue
+7
-7
TableNormal.vue
frontend/src/views/chart/components/table/TableNormal.vue
+18
-13
ChartEdit.vue
frontend/src/views/chart/view/ChartEdit.vue
+5
-5
AddDB.vue
frontend/src/views/dataset/add/AddDB.vue
+51
-53
DatasetTableData.vue
frontend/src/views/dataset/common/DatasetTableData.vue
+1
-1
TabDataPreview.vue
frontend/src/views/dataset/data/TabDataPreview.vue
+88
-13
UpdateInfo.vue
frontend/src/views/dataset/data/UpdateInfo.vue
+2
-0
ViewTable.vue
frontend/src/views/dataset/data/ViewTable.vue
+0
-0
Group.vue
frontend/src/views/dataset/group/Group.vue
+2
-15
index.vue
frontend/src/views/system/datasource/index.vue
+5
-5
index.vue
frontend/src/views/system/dept/index.vue
+8
-5
index.vue
frontend/src/views/system/menu/index.vue
+4
-5
index.vue
frontend/src/views/system/role/index.vue
+5
-5
form.vue
frontend/src/views/system/user/form.vue
+262
-0
index.vue
frontend/src/views/system/user/index.vue
+22
-22
没有找到文件。
backend/src/main/java/io/dataease/auth/api/dto/DynamicMenuDto.java
浏览文件 @
bde937f9
...
...
@@ -25,6 +25,8 @@ public class DynamicMenuDto implements Serializable {
private
String
permission
;
private
Boolean
hidden
;
private
List
<
DynamicMenuDto
>
children
;
}
backend/src/main/java/io/dataease/auth/config/F2CRealm.java
浏览文件 @
bde937f9
...
...
@@ -68,6 +68,9 @@ public class F2CRealm extends AuthorizingRealm {
if
(
user
==
null
)
{
throw
new
AuthenticationException
(
"User didn't existed!"
);
}
if
(
user
.
getEnabled
()==
0
)
{
throw
new
AuthenticationException
(
"User is valid!"
);
}
String
pass
=
null
;
try
{
pass
=
user
.
getPassword
();
...
...
backend/src/main/java/io/dataease/auth/server/AuthServer.java
浏览文件 @
bde937f9
...
...
@@ -35,10 +35,14 @@ public class AuthServer implements AuthApi {
String
username
=
loginDto
.
getUsername
();
String
password
=
loginDto
.
getPassword
();
SysUserEntity
user
=
authUserService
.
getUserByName
(
username
);
String
realPwd
=
user
.
getPassword
();
if
(
ObjectUtils
.
isEmpty
(
user
)){
throw
new
RuntimeException
(
"没有该用户!"
);
}
if
(
user
.
getEnabled
()==
0
){
throw
new
RuntimeException
(
"用户已经失效!"
);
}
String
realPwd
=
user
.
getPassword
();
//私钥解密
String
pwd
=
RsaUtil
.
decryptByPrivateKey
(
RsaProperties
.
privateKey
,
password
);
//md5加密
...
...
backend/src/main/java/io/dataease/auth/service/impl/DynamicMenuServiceImpl.java
浏览文件 @
bde937f9
...
...
@@ -42,6 +42,7 @@ public class DynamicMenuServiceImpl implements DynamicMenuService {
menuMeta
.
setIcon
(
sysMenu
.
getIcon
());
dynamicMenuDto
.
setMeta
(
menuMeta
);
dynamicMenuDto
.
setPermission
(
sysMenu
.
getPermission
());
dynamicMenuDto
.
setHidden
(
sysMenu
.
getHidden
());
return
dynamicMenuDto
;
}
...
...
backend/src/main/java/io/dataease/auth/util/JWTUtils.java
浏览文件 @
bde937f9
...
...
@@ -13,6 +13,8 @@ import org.apache.commons.lang3.StringUtils;
import
org.apache.shiro.authc.AuthenticationException
;
import
org.springframework.cache.Cache
;
import
org.springframework.cache.CacheManager
;
import
org.springframework.core.env.Environment
;
import
java.util.Date
;
...
...
@@ -22,7 +24,9 @@ public class JWTUtils {
// token过期时间1min (过期会自动刷新续命 目的是避免一直都是同一个token )
private
static
final
long
EXPIRE_TIME
=
1
*
60
*
1000
;
// 登录间隔时间10min 超过这个时间强制重新登录
private
static
final
long
Login_Interval
=
10
*
60
*
1000
;
private
static
long
Login_Interval
;
/**
...
...
@@ -79,6 +83,11 @@ public class JWTUtils {
* @return
*/
public
static
boolean
loginExpire
(
String
token
){
if
(
Login_Interval
==
0
)
{
String
property
=
CommonBeanFactory
.
getBean
(
Environment
.
class
).
getProperty
(
"dataease.login_timeout"
);
int
seconds
=
StringUtils
.
isNotEmpty
(
property
)
?
Integer
.
parseInt
(
property
):
(
10
*
60
);
Login_Interval
=
seconds
*
1000
;
}
Long
now
=
System
.
currentTimeMillis
();
Long
lastOperateTime
=
tokenLastOperateTime
(
token
);
boolean
isExpire
=
false
;
...
...
@@ -169,4 +178,5 @@ public class JWTUtils {
long
now
=
System
.
currentTimeMillis
();
tokens_expire
.
put
(
token
,
now
);
}
}
backend/src/main/java/io/dataease/controller/dataset/DataSetTableController.java
浏览文件 @
bde937f9
...
...
@@ -63,9 +63,9 @@ public class DataSetTableController {
return
dataSetTableService
.
getData
(
dataSetTableRequest
);
}
@PostMapping
(
"getPreviewData"
)
public
Map
<
String
,
Object
>
getPreviewData
(
@RequestBody
DataSetTableRequest
dataSetTableRequest
)
throws
Exception
{
return
dataSetTableService
.
getPreviewData
(
dataSetTableRequest
);
@PostMapping
(
"getPreviewData
/{page}/{pageSize}
"
)
public
Map
<
String
,
Object
>
getPreviewData
(
@RequestBody
DataSetTableRequest
dataSetTableRequest
,
@PathVariable
Integer
page
,
@PathVariable
Integer
pageSize
)
throws
Exception
{
return
dataSetTableService
.
getPreviewData
(
dataSetTableRequest
,
page
,
pageSize
);
}
@PostMapping
(
"sqlPreview"
)
...
...
backend/src/main/java/io/dataease/dto/dataset/DataSetPreviewPage.java
0 → 100644
浏览文件 @
bde937f9
package
io
.
dataease
.
dto
.
dataset
;
import
lombok.Getter
;
import
lombok.Setter
;
/**
* @Author gin
* @Date 2021/4/28 11:13 上午
*/
@Getter
@Setter
public
class
DataSetPreviewPage
{
private
Integer
total
=
0
;
private
Integer
show
=
0
;
private
Integer
page
=
1
;
private
Integer
pageSize
=
100
;
}
backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java
浏览文件 @
bde937f9
...
...
@@ -14,6 +14,7 @@ import io.dataease.datasource.dto.TableFiled;
import
io.dataease.datasource.provider.DatasourceProvider
;
import
io.dataease.datasource.provider.ProviderFactory
;
import
io.dataease.datasource.request.DatasourceRequest
;
import
io.dataease.dto.dataset.DataSetPreviewPage
;
import
io.dataease.dto.dataset.DataTableInfoDTO
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
...
...
@@ -34,7 +35,6 @@ import javax.annotation.Resource;
import
java.io.*
;
import
java.math.BigDecimal
;
import
java.nio.charset.StandardCharsets
;
import
java.sql.ResultSet
;
import
java.text.MessageFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -172,7 +172,7 @@ public class DataSetTableService {
return
datasourceProvider
.
getData
(
datasourceRequest
);
}
public
Map
<
String
,
Object
>
getPreviewData
(
DataSetTableRequest
dataSetTableRequest
)
throws
Exception
{
public
Map
<
String
,
Object
>
getPreviewData
(
DataSetTableRequest
dataSetTableRequest
,
Integer
page
,
Integer
pageSize
)
throws
Exception
{
DatasetTableField
datasetTableField
=
DatasetTableField
.
builder
().
build
();
datasetTableField
.
setTableId
(
dataSetTableRequest
.
getId
());
datasetTableField
.
setChecked
(
Boolean
.
TRUE
);
...
...
@@ -183,6 +183,14 @@ public class DataSetTableService {
DatasetTable
datasetTable
=
datasetTableMapper
.
selectByPrimaryKey
(
dataSetTableRequest
.
getId
());
List
<
String
[]>
data
=
new
ArrayList
<>();
DataSetPreviewPage
dataSetPreviewPage
=
new
DataSetPreviewPage
();
dataSetPreviewPage
.
setShow
(
Integer
.
valueOf
(
dataSetTableRequest
.
getRow
()));
dataSetPreviewPage
.
setPage
(
page
);
dataSetPreviewPage
.
setPageSize
(
pageSize
);
int
realSize
=
Integer
.
parseInt
(
dataSetTableRequest
.
getRow
())
<
pageSize
?
Integer
.
parseInt
(
dataSetTableRequest
.
getRow
())
:
pageSize
;
if
(
page
==
Integer
.
parseInt
(
dataSetTableRequest
.
getRow
())
/
pageSize
+
1
)
{
realSize
=
Integer
.
parseInt
(
dataSetTableRequest
.
getRow
())
%
pageSize
;
}
if
(
StringUtils
.
equalsIgnoreCase
(
datasetTable
.
getType
(),
"db"
))
{
Datasource
ds
=
datasourceMapper
.
selectByPrimaryKey
(
dataSetTableRequest
.
getDataSourceId
());
DatasourceProvider
datasourceProvider
=
ProviderFactory
.
getProvider
(
ds
.
getType
());
...
...
@@ -190,11 +198,18 @@ public class DataSetTableService {
datasourceRequest
.
setDatasource
(
ds
);
String
table
=
dataTableInfoDTO
.
getTable
();
datasourceRequest
.
setQuery
(
createQuerySQL
(
ds
.
getType
(),
table
,
fieldArray
)
+
" LIMIT
0,"
+
dataSetTableRequest
.
getRow
()
);
datasourceRequest
.
setQuery
(
createQuerySQL
(
ds
.
getType
(),
table
,
fieldArray
)
+
" LIMIT
"
+
(
page
-
1
)
*
realSize
+
","
+
realSize
);
try
{
data
.
addAll
(
datasourceProvider
.
getData
(
datasourceRequest
));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
try
{
datasourceRequest
.
setQuery
(
createQueryCountSQL
(
ds
.
getType
(),
table
));
dataSetPreviewPage
.
setTotal
(
Integer
.
valueOf
(
datasourceProvider
.
getData
(
datasourceRequest
).
get
(
0
)[
0
]));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
datasetTable
.
getType
(),
"sql"
))
{
Datasource
ds
=
datasourceMapper
.
selectByPrimaryKey
(
dataSetTableRequest
.
getDataSourceId
());
...
...
@@ -203,11 +218,18 @@ public class DataSetTableService {
datasourceRequest
.
setDatasource
(
ds
);
String
sql
=
dataTableInfoDTO
.
getSql
();
datasourceRequest
.
setQuery
(
createQuerySQL
(
ds
.
getType
(),
" ("
+
sql
+
") AS tmp "
,
fieldArray
)
+
" LIMIT
0,"
+
dataSetTableRequest
.
getRow
()
);
datasourceRequest
.
setQuery
(
createQuerySQL
(
ds
.
getType
(),
" ("
+
sql
+
") AS tmp "
,
fieldArray
)
+
" LIMIT
"
+
(
page
-
1
)
*
realSize
+
","
+
realSize
);
try
{
data
.
addAll
(
datasourceProvider
.
getData
(
datasourceRequest
));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
try
{
datasourceRequest
.
setQuery
(
createQueryCountSQL
(
ds
.
getType
(),
" ("
+
sql
+
") AS tmp "
));
dataSetPreviewPage
.
setTotal
(
Integer
.
valueOf
(
datasourceProvider
.
getData
(
datasourceRequest
).
get
(
0
)[
0
]));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
datasetTable
.
getType
(),
"excel"
))
{
...
...
@@ -229,6 +251,7 @@ public class DataSetTableService {
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"fields"
,
fields
);
map
.
put
(
"data"
,
jsonArray
);
map
.
put
(
"page"
,
dataSetPreviewPage
);
return
map
;
}
...
...
@@ -314,6 +337,18 @@ public class DataSetTableService {
}
}
public
String
createQueryCountSQL
(
String
type
,
String
table
)
{
DatasourceTypes
datasourceType
=
DatasourceTypes
.
valueOf
(
type
);
switch
(
datasourceType
)
{
case
mysql:
return
MessageFormat
.
format
(
"SELECT count(*) FROM {0}"
,
table
);
case
sqlServer:
return
MessageFormat
.
format
(
"SELECT count(*) FROM {0}"
,
table
);
default
:
return
MessageFormat
.
format
(
"SELECT count(*) FROM {0}"
,
table
);
}
}
public
String
createQuerySQL
(
String
type
,
String
table
,
String
[]
fields
)
{
DatasourceTypes
datasourceType
=
DatasourceTypes
.
valueOf
(
type
);
switch
(
datasourceType
)
{
...
...
backend/src/main/java/io/dataease/service/sys/SysUserService.java
浏览文件 @
bde937f9
...
...
@@ -15,12 +15,12 @@ import io.dataease.controller.sys.base.BaseGridRequest;
import
io.dataease.controller.sys.request.SysUserCreateRequest
;
import
io.dataease.controller.sys.request.SysUserPwdRequest
;
import
io.dataease.controller.sys.request.SysUserStateRequest
;
import
io.dataease.controller.sys.request.UserGridRequest
;
import
io.dataease.controller.sys.response.SysUserGridResponse
;
import
io.dataease.controller.sys.response.SysUserRole
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.cache.annotation.CacheEvict
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -31,7 +31,10 @@ import java.util.stream.Collectors;
@Service
public
class
SysUserService
{
private
final
static
String
DEFAULT_PWD
=
"DataEase123.."
;
//private final static String DEFAULT_PWD = "DataEase123..";
@Value
(
"${dataease.init_password:DataEase123..}"
)
private
String
DEFAULT_PWD
;
@Resource
private
SysUserMapper
sysUserMapper
;
...
...
@@ -89,6 +92,7 @@ public class SysUserService {
}
@CacheEvict
(
value
=
AuthConstants
.
USER_CACHE_NAME
,
key
=
"'user' + #request.userId"
)
public
int
updateStatus
(
SysUserStateRequest
request
){
SysUser
sysUser
=
new
SysUser
();
sysUser
.
setUserId
(
request
.
getUserId
());
...
...
backend/src/main/resources/application.properties
浏览文件 @
bde937f9
...
...
@@ -62,6 +62,10 @@ spring.mvc.log-request-details=true
pagehelper.PageRowBounds
=
true
#excel等用户上传文件路径
upload.file.path
=
/opt/dataease/data/upload/
#用户初始密码,如果不设置默认是DataEase123..
dataease.init_password
=
DataEase123456
#登录超时时间单位s 设置默认30分钟 如果雨不设置 默认10分钟也就是10*60
dataease.login_timeout
=
1800
...
...
frontend/package.json
浏览文件 @
bde937f9
...
...
@@ -22,7 +22,7 @@
"element-resize-detector"
:
"^1.2.2"
,
"element-ui"
:
"2.13.0"
,
"file-saver"
:
"^2.0.5"
,
"fit2cloud-ui"
:
"^
0.1.12
"
,
"fit2cloud-ui"
:
"^
1.1.1
"
,
"html2canvas"
:
"^1.0.0-rc.7"
,
"js-cookie"
:
"2.2.0"
,
"jsencrypt"
:
"^3.0.0-rc.1"
,
...
...
frontend/src/components/back-button/index.vue
0 → 100644
浏览文件 @
bde937f9
<
template
>
<el-icon
name=
"back"
class=
"back-button"
@
click
.
native=
"jump"
/>
</
template
>
<
script
>
export
default
{
name
:
'BackButton'
,
props
:
{
// eslint-disable-next-line vue/require-default-prop
path
:
String
,
// eslint-disable-next-line vue/require-default-prop
name
:
String
,
// eslint-disable-next-line vue/require-default-prop
to
:
Object
},
methods
:
{
jump
()
{
const
{
path
,
name
,
to
}
=
this
if
(
path
)
{
this
.
$router
.
push
(
path
)
}
if
(
name
)
{
this
.
$router
.
push
({
name
:
this
.
name
})
}
if
(
to
)
{
this
.
$router
.
push
(
to
)
}
}
}
}
</
script
>
<
style
lang=
"scss"
>
@import
"~@/styles/mixin.scss"
;
@import
"~@/styles/variables.scss"
;
.back-button
{
cursor
:
pointer
;
margin-right
:
10px
;
font-weight
:
600
;
&
:active
{
transform
:
scale
(
0
.85
);
}
}
</
style
>
frontend/src/components/business/LayoutContent.vue
浏览文件 @
bde937f9
<
template
>
<div
class=
"content-container"
>
<div
v-if=
"$slots.header || header"
class=
"content-container__header"
>
<slot
name=
"header"
>
<back-button
v-if=
"showBack"
:path=
"backPath"
:name=
"backName"
:to=
"backTo"
/>
{{
header
}}
</slot>
</div>
<div
v-if=
"$slots.toolbar"
class=
"content-container__toolbar"
>
<slot
name=
"toolbar"
/>
</div>
<slot
/>
</div>
</
template
>
<
script
>
import
BackButton
from
'@/components/back-button'
export
default
{
name
:
'LayoutContent'
name
:
'LayoutContent'
,
components
:
{
BackButton
},
props
:
{
// eslint-disable-next-line vue/require-default-prop
header
:
String
,
// eslint-disable-next-line vue/require-default-prop
backPath
:
String
,
// eslint-disable-next-line vue/require-default-prop
backName
:
String
,
// eslint-disable-next-line vue/require-default-prop
backTo
:
Object
},
computed
:
{
showBack
({
backPath
,
backName
,
backTo
})
{
return
backPath
||
backName
||
backTo
}
}
}
</
script
>
<
style
lang=
"scss"
>
@import
"~@/styles/variables"
;
@import
"~@/styles/mixin.scss"
;
@import
"~@/styles/variables.scss"
;
.content-container
{
transition
:
0
.3s
;
...
...
@@ -23,5 +51,15 @@ export default {
border-radius
:
4px
;
box-shadow
:
0
1px
4px
0
rgba
(
0
,
0
,
0
,
14%
);
box-sizing
:
border-box
;
.content-container__header
{
line-height
:
60px
;
font-size
:
18px
;
}
.content-container__toolbar
{
@include
flex-row
(
space-between
,
center
);
margin-bottom
:
10px
;
}
}
</
style
>
frontend/src/components/business/complex-table/index.vue
浏览文件 @
bde937f9
<
template
>
<div
class=
"complex-table"
>
<div
v-if=
"$slots.header || header"
class=
"complex-table__header"
>
...
...
@@ -5,12 +6,16 @@
</div>
<div
v-if=
"$slots.toolbar || searchConfig"
class=
"complex-table__toolbar"
>
<slot
name=
"toolbar"
>
<fu-search-bar
v-bind=
"searchConfig"
@
exec=
"search"
>
<slot
name=
"buttons"
/>
<fu-table-column-select
:columns=
"columns"
/>
</fu-search-bar>
</slot>
<div>
<slot
name=
"toolbar"
/>
</div>
<fu-search-bar
v-bind=
"searchConfig"
@
exec=
"search"
>
<template
#
complex
>
<slot
name=
"complex"
/>
</
template
>
<slot
name=
"buttons"
/>
<fu-table-column-select
:columns=
"columns"
/>
</fu-search-bar>
</div>
<div
class=
"complex-table__body"
>
...
...
@@ -41,13 +46,9 @@ export default {
type
:
Array
,
default
:
()
=>
[]
},
// eslint-disable-next-line vue/require-default-prop
localKey
:
String
,
// 如果需要记住选择的列,则这里添加一个唯一的Key
// eslint-disable-next-line vue/require-default-prop
header
:
String
,
// eslint-disable-next-line vue/require-default-prop
searchConfig
:
Object
,
// eslint-disable-next-line vue/require-default-prop
paginationConfig
:
Object
},
data
()
{
...
...
@@ -72,12 +73,16 @@ export default {
.complex-table
{
.complex-table__header
{
@include
flex-row
(
flex-start
,
center
);
height
:
60px
;
font-size
:
20
px
;
line-
height
:
60px
;
font-size
:
18
px
;
}
.complex-table__toolbar
{
@include
flex-row
(
flex-end
,
center
);
@include
flex-row
(
space-between
,
center
);
.fu-search-bar
{
width
:
auto
;
}
}
.complex-table__pagination
{
...
...
frontend/src/components/business/tree-table/index.vue
浏览文件 @
bde937f9
...
...
@@ -5,12 +5,22 @@
</div>
<div
v-if=
"$slots.toolbar || searchConfig"
class=
"complex-table__toolbar"
>
<slot
name=
"toolbar"
>
<
!--
<
slot
name=
"toolbar"
>
<fu-search-bar
v-bind=
"searchConfig"
@
exec=
"search"
>
<slot
name=
"buttons"
/>
<fu-table-column-select
:columns=
"columns"
/>
</fu-search-bar>
</slot>
</slot>
-->
<div>
<slot
name=
"toolbar"
/>
</div>
<fu-search-bar
v-bind=
"searchConfig"
@
exec=
"search"
>
<template
#
complex
>
<slot
name=
"complex"
/>
</
template
>
<slot
name=
"buttons"
/>
<fu-table-column-select
:columns=
"columns"
/>
</fu-search-bar>
</div>
<div
class=
"complex-table__body"
>
...
...
@@ -73,12 +83,16 @@ export default {
.complex-table
{
.complex-table__header
{
@include
flex-row
(
flex-start
,
center
);
height
:
60px
;
font-size
:
20
px
;
line-
height
:
60px
;
font-size
:
18
px
;
}
.complex-table__toolbar
{
@include
flex-row
(
flex-end
,
center
);
@include
flex-row
(
space-between
,
center
);
.fu-search-bar
{
width
:
auto
;
}
}
.complex-table__pagination
{
...
...
frontend/src/lang/zh.js
浏览文件 @
bde937f9
...
...
@@ -791,7 +791,11 @@ export default {
type
:
'类型'
,
create_by
:
'创建者'
,
create_time
:
'创建时间'
,
preview_100_data
:
'预览前100行数据'
preview_100_data
:
'预览前100行数据'
,
preview_show
:
'显示'
,
preview_item
:
'条数据'
,
preview_total
:
'共'
,
pls_input_less_9
:
'请输入9位以内的正整数'
},
datasource
:
{
datasource
:
'数据源'
,
...
...
frontend/src/layout/components/AppMain.vue
浏览文件 @
bde937f9
...
...
@@ -2,9 +2,9 @@
<section
class=
"app-main"
>
<transition
name=
"fade-transform"
mode=
"out-in"
>
<el-main
class=
"ms-main-container"
>
<
keep-alive
>
<router-view
:key=
"key"
/>
<
/keep-alive
>
<
!--
<keep-alive>
--
>
<router-view
:key=
"key"
/>
<
!--
</keep-alive>
--
>
</el-main>
</transition>
</section>
...
...
frontend/src/styles/common/mixins.scss
浏览文件 @
bde937f9
@mixin
flex-row
(
$justify
:
flex-start
,
$align
:
stretch
)
{
display
:
flex
;
@if
$justify
!=
flex-start
{
justify-content
:
$justify
;
display
:
flex
;
@if
$justify
!=
flex-start
{
justify-content
:
$justify
;
}
@if
$align
!=
stretch
{
align-items
:
$align
;
}
}
@if
$align
!=
stretch
{
align-items
:
$align
;
@mixin
variant
(
$color
,
$background-color
,
$border-color
)
{
color
:
$color
;
background-color
:
$background-color
;
border-color
:
$border-color
;
}
}
\ No newline at end of file
frontend/src/styles/mixin.scss
浏览文件 @
bde937f9
...
...
@@ -36,4 +36,10 @@
align-items
:
$align
;
}
}
@mixin
variant
(
$color
,
$background-color
,
$border-color
)
{
color
:
$color
;
background-color
:
$background-color
;
border-color
:
$border-color
;
}
frontend/src/views/chart/chart/chart.js
浏览文件 @
bde937f9
...
...
@@ -88,6 +88,9 @@ export const BASE_BAR = {
title
:
{
text
:
''
},
grid
:
{
containLabel
:
true
},
tooltip
:
{},
legend
:
{
show
:
true
,
...
...
@@ -114,6 +117,9 @@ export const HORIZONTAL_BAR = {
title
:
{
text
:
''
},
grid
:
{
containLabel
:
true
},
tooltip
:
{},
legend
:
{
show
:
true
,
...
...
@@ -141,6 +147,9 @@ export const BASE_LINE = {
title
:
{
text
:
''
},
grid
:
{
containLabel
:
true
},
tooltip
:
{},
legend
:
{
show
:
true
,
...
...
@@ -169,6 +178,9 @@ export const BASE_PIE = {
title
:
{
text
:
''
},
grid
:
{
containLabel
:
true
},
tooltip
:
{},
legend
:
{
show
:
true
,
...
...
@@ -199,6 +211,9 @@ export const BASE_FUNNEL = {
title
:
{
text
:
''
},
grid
:
{
containLabel
:
true
},
tooltip
:
{
trigger
:
'item'
},
...
...
@@ -252,6 +267,9 @@ export const BASE_RADAR = {
title
:
{
text
:
''
},
grid
:
{
containLabel
:
true
},
tooltip
:
{},
legend
:
{
show
:
true
,
...
...
frontend/src/views/chart/components/component-style/TitleSelector.vue
浏览文件 @
bde937f9
...
...
@@ -26,7 +26,7 @@
<el-radio-button
label=
"right"
>
{{
$t
(
'chart.text_pos_right'
)
}}
</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item
v-
if
=
"chart.type && !chart.type.includes('table')"
:label=
"$t('chart.text_v_position')"
class=
"form-item"
>
<el-form-item
v-
show
=
"chart.type && !chart.type.includes('table')"
:label=
"$t('chart.text_v_position')"
class=
"form-item"
>
<el-radio-group
v-model=
"titleForm.vPosition"
size=
"mini"
@
change=
"changeTitleStyle"
>
<el-radio-button
label=
"top"
>
{{
$t
(
'chart.text_pos_top'
)
}}
</el-radio-button>
<el-radio-button
label=
"center"
>
{{
$t
(
'chart.text_pos_center'
)
}}
</el-radio-button>
...
...
frontend/src/views/chart/components/shape-attr/ColorSelector.vue
浏览文件 @
bde937f9
...
...
@@ -8,7 +8,7 @@
>
<el-col>
<el-form
ref=
"colorForm"
:model=
"colorForm"
label-width=
"80px"
size=
"mini"
>
<el-form-item
v-
if
=
"chart.type && !chart.type.includes('table')"
:label=
"$t('chart.color_case')"
class=
"form-item"
>
<el-form-item
v-
show
=
"chart.type && !chart.type.includes('table')"
:label=
"$t('chart.color_case')"
class=
"form-item"
>
<el-select
v-model=
"colorForm.value"
:placeholder=
"$t('chart.pls_slc_color_case')"
size=
"mini"
@
change=
"changeColorCase"
>
<el-option
v-for=
"option in colorCases"
:key=
"option.value"
:label=
"option.name"
:value=
"option.value"
style=
"display: flex;align-items: center;"
>
<div
style=
"float: left"
>
...
...
@@ -19,16 +19,16 @@
</el-select>
</el-form-item>
<el-form-item
v-
if
=
"chart.type && chart.type.includes('table')"
:label=
"$t('chart.table_header_bg')"
class=
"form-item"
>
<el-form-item
v-
show
=
"chart.type && chart.type.includes('table')"
:label=
"$t('chart.table_header_bg')"
class=
"form-item"
>
<colorPicker
v-model=
"colorForm.tableHeaderBgColor"
style=
"margin-top: 6px;cursor: pointer;z-index: 1004;border: solid 1px black"
@
change=
"changeColorCase"
/>
</el-form-item>
<el-form-item
v-
if
=
"chart.type && chart.type.includes('table')"
:label=
"$t('chart.table_item_bg')"
class=
"form-item"
>
<el-form-item
v-
show
=
"chart.type && chart.type.includes('table')"
:label=
"$t('chart.table_item_bg')"
class=
"form-item"
>
<colorPicker
v-model=
"colorForm.tableItemBgColor"
style=
"margin-top: 6px;cursor: pointer;z-index: 1003;border: solid 1px black"
@
change=
"changeColorCase"
/>
</el-form-item>
<el-form-item
v-
if
=
"chart.type && chart.type.includes('table')"
:label=
"$t('chart.table_item_font_color')"
class=
"form-item"
>
<el-form-item
v-
show
=
"chart.type && chart.type.includes('table')"
:label=
"$t('chart.table_item_font_color')"
class=
"form-item"
>
<colorPicker
v-model=
"colorForm.tableFontColor"
style=
"margin-top: 6px;cursor: pointer;z-index: 1002;border: solid 1px black"
@
change=
"changeColorCase"
/>
</el-form-item>
<el-form-item
v-
if
=
"chart.type && chart.type.includes('table')"
:label=
"$t('chart.stripe')"
class=
"form-item"
>
<el-form-item
v-
show
=
"chart.type && chart.type.includes('table')"
:label=
"$t('chart.stripe')"
class=
"form-item"
>
<el-checkbox
v-model=
"colorForm.tableStripe"
@
change=
"changeColorCase"
>
{{
$t
(
'chart.stripe'
)
}}
</el-checkbox>
</el-form-item>
...
...
frontend/src/views/chart/components/shape-attr/SizeSelector.vue
浏览文件 @
bde937f9
...
...
@@ -7,7 +7,7 @@
trigger=
"click"
>
<el-col>
<el-form
v-
if
=
"chart.type && chart.type.includes('bar')"
ref=
"sizeFormBar"
:model=
"sizeForm"
label-width=
"80px"
size=
"mini"
>
<el-form
v-
show
=
"chart.type && chart.type.includes('bar')"
ref=
"sizeFormBar"
:model=
"sizeForm"
label-width=
"80px"
size=
"mini"
>
<el-form-item
:label=
"$t('chart.adapt')"
class=
"form-item"
>
<el-checkbox
v-model=
"sizeForm.barDefault"
@
change=
"changeBarSizeCase"
>
{{
$t
(
'chart.adapt'
)
}}
</el-checkbox>
</el-form-item>
...
...
@@ -19,7 +19,7 @@
</el-form-item>
</el-form>
<el-form
v-
if
=
"chart.type && chart.type.includes('line')"
ref=
"sizeFormLine"
:model=
"sizeForm"
label-width=
"80px"
size=
"mini"
>
<el-form
v-
show
=
"chart.type && chart.type.includes('line')"
ref=
"sizeFormLine"
:model=
"sizeForm"
label-width=
"80px"
size=
"mini"
>
<el-form-item
:label=
"$t('chart.line_width')"
class=
"form-item form-item-slider"
>
<el-slider
v-model=
"sizeForm.lineWidth"
show-input
:show-input-controls=
"false"
input-size=
"mini"
:min=
"0"
:max=
"10"
@
change=
"changeBarSizeCase"
/>
</el-form-item>
...
...
@@ -50,7 +50,7 @@
</el-form-item>
</el-form>
<el-form
v-
if
=
"chart.type && chart.type.includes('pie')"
ref=
"sizeFormPie"
:model=
"sizeForm"
label-width=
"80px"
size=
"mini"
>
<el-form
v-
show
=
"chart.type && chart.type.includes('pie')"
ref=
"sizeFormPie"
:model=
"sizeForm"
label-width=
"80px"
size=
"mini"
>
<el-form-item
:label=
"$t('chart.pie_inner_radius')"
class=
"form-item form-item-slider"
>
<el-slider
v-model=
"sizeForm.pieInnerRadius"
show-input
:show-input-controls=
"false"
input-size=
"mini"
:min=
"0"
:max=
"100"
@
change=
"changeBarSizeCase"
/>
</el-form-item>
...
...
@@ -58,7 +58,7 @@
<el-slider
v-model=
"sizeForm.pieOuterRadius"
show-input
:show-input-controls=
"false"
input-size=
"mini"
:min=
"0"
:max=
"100"
@
change=
"changeBarSizeCase"
/>
</el-form-item>
<span
v-
if
=
"chart.type && chart.type.includes('pie-rose')"
>
<span
v-
show
=
"chart.type && chart.type.includes('pie-rose')"
>
<el-form-item
:label=
"$t('chart.rose_type')"
class=
"form-item"
>
<el-radio-group
v-model=
"sizeForm.pieRoseType"
size=
"mini"
@
change=
"changeBarSizeCase"
>
<el-radio-button
label=
"radius"
>
{{
$t
(
'chart.radius_mode'
)
}}
</el-radio-button>
...
...
@@ -71,13 +71,13 @@
</span>
</el-form>
<el-form
v-
if
=
"chart.type && chart.type.includes('funnel')"
ref=
"sizeFormPie"
:model=
"sizeForm"
label-width=
"80px"
size=
"mini"
>
<el-form
v-
show
=
"chart.type && chart.type.includes('funnel')"
ref=
"sizeFormPie"
:model=
"sizeForm"
label-width=
"80px"
size=
"mini"
>
<el-form-item
:label=
"$t('chart.funnel_width')"
class=
"form-item form-item-slider"
>
<el-slider
v-model=
"sizeForm.funnelWidth"
show-input
:show-input-controls=
"false"
input-size=
"mini"
:min=
"0"
:max=
"100"
@
change=
"changeBarSizeCase"
/>
</el-form-item>
</el-form>
<el-form
v-
if
=
"chart.type && chart.type.includes('radar')"
ref=
"sizeFormPie"
:model=
"sizeForm"
label-width=
"80px"
size=
"mini"
>
<el-form
v-
show
=
"chart.type && chart.type.includes('radar')"
ref=
"sizeFormPie"
:model=
"sizeForm"
label-width=
"80px"
size=
"mini"
>
<el-form-item
:label=
"$t('chart.shape')"
class=
"form-item"
>
<el-radio-group
v-model=
"sizeForm.radarShape"
size=
"mini"
@
change=
"changeBarSizeCase"
>
<el-radio-button
label=
"polygon"
>
{{
$t
(
'chart.polygon'
)
}}
</el-radio-button>
...
...
@@ -86,7 +86,7 @@
</el-form-item>
</el-form>
<el-form
v-
if
=
"chart.type && chart.type.includes('table')"
ref=
"sizeFormPie"
:model=
"sizeForm"
label-width=
"100px"
size=
"mini"
>
<el-form
v-
show
=
"chart.type && chart.type.includes('table')"
ref=
"sizeFormPie"
:model=
"sizeForm"
label-width=
"100px"
size=
"mini"
>
<el-form-item
:label=
"$t('chart.table_title_fontsize')"
class=
"form-item"
>
<el-select
v-model=
"sizeForm.tableTitleFontSize"
:placeholder=
"$t('chart.table_title_fontsize')"
@
change=
"changeBarSizeCase"
>
<el-option
v-for=
"option in fontSize"
:key=
"option.value"
:label=
"option.name"
:value=
"option.value"
/>
...
...
frontend/src/views/chart/components/table/TableNormal.vue
浏览文件 @
bde937f9
...
...
@@ -164,7 +164,7 @@ export default {
// console.log(s_table)
let
s
=
''
for
(
const
i
in
this
.
table_header_class
)
{
s
+=
i
+
':'
+
this
.
table_header_class
[
i
]
+
';'
s
+=
(
i
===
'fontSize'
?
'font-size'
:
i
)
+
':'
+
this
.
table_header_class
[
i
]
+
';'
}
s_table
.
setAttribute
(
'style'
,
s
)
},
...
...
@@ -176,23 +176,28 @@ export default {
}
},
summaryMethod
({
columns
,
data
})
{
const
that
=
this
const
means
=
[]
// 合计
columns
.
forEach
((
column
,
columnIndex
)
=>
{
if
(
columnIndex
===
0
)
{
means
.
push
(
'合计'
)
}
else
{
const
values
=
data
.
map
(
item
=>
Number
((
item
[
column
.
property
]
+
''
).
trim
()
===
''
?
'a'
:
item
[
column
.
property
]))
// 合计
if
(
!
values
.
every
(
value
=>
isNaN
(
value
)))
{
means
[
columnIndex
]
=
values
.
reduce
((
prev
,
curr
)
=>
{
const
value
=
Number
(
curr
)
if
(
!
isNaN
(
value
))
{
return
prev
+
curr
}
else
{
return
prev
}
},
0
)
means
[
columnIndex
]
=
(
means
[
columnIndex
]
+
''
).
includes
(
'.'
)
?
means
[
columnIndex
].
toFixed
(
2
)
:
means
[
columnIndex
]
if
(
columnIndex
>=
that
.
chart
.
data
.
fields
.
length
-
that
.
chart
.
data
.
series
.
length
)
{
const
values
=
data
.
map
(
item
=>
Number
(
item
[
column
.
property
]))
// 合计
if
(
!
values
.
every
(
value
=>
isNaN
(
value
)))
{
means
[
columnIndex
]
=
values
.
reduce
((
prev
,
curr
)
=>
{
const
value
=
Number
(
curr
)
if
(
!
isNaN
(
value
))
{
return
prev
+
curr
}
else
{
return
prev
}
},
0
)
means
[
columnIndex
]
=
(
means
[
columnIndex
]
+
''
).
includes
(
'.'
)
?
means
[
columnIndex
].
toFixed
(
2
)
:
means
[
columnIndex
]
}
else
{
means
[
columnIndex
]
=
''
}
}
else
{
means
[
columnIndex
]
=
''
}
...
...
frontend/src/views/chart/view/ChartEdit.vue
浏览文件 @
bde937f9
...
...
@@ -129,14 +129,14 @@
<el-tab-pane
:label=
"$t('chart.shape_attr')"
class=
"padding-lr"
>
<color-selector
class=
"attr-selector"
:chart=
"chart"
@
onColorChange=
"onColorChange"
/>
<size-selector
class=
"attr-selector"
:chart=
"chart"
@
onSizeChange=
"onSizeChange"
/>
<label-selector
v-
if
=
"!view.type.includes('table')"
class=
"attr-selector"
:chart=
"chart"
@
onLabelChange=
"onLabelChange"
/>
<tooltip-selector
v-
if
=
"!view.type.includes('table')"
class=
"attr-selector"
:chart=
"chart"
@
onTooltipChange=
"onTooltipChange"
/>
<label-selector
v-
show
=
"!view.type.includes('table')"
class=
"attr-selector"
:chart=
"chart"
@
onLabelChange=
"onLabelChange"
/>
<tooltip-selector
v-
show
=
"!view.type.includes('table')"
class=
"attr-selector"
:chart=
"chart"
@
onTooltipChange=
"onTooltipChange"
/>
</el-tab-pane>
<el-tab-pane
:label=
"$t('chart.module_style')"
class=
"padding-lr"
>
<title-selector
class=
"attr-selector"
:chart=
"chart"
@
onTextChange=
"onTextChange"
/>
<legend-selector
v-
if
=
"!view.type.includes('table')"
class=
"attr-selector"
:chart=
"chart"
@
onLegendChange=
"onLegendChange"
/>
<x-axis-selector
v-
if
=
"view.type.includes('bar') || view.type.includes('line')"
class=
"attr-selector"
:chart=
"chart"
@
onChangeXAxisForm=
"onChangeXAxisForm"
/>
<y-axis-selector
v-
if
=
"view.type.includes('bar') || view.type.includes('line')"
class=
"attr-selector"
:chart=
"chart"
@
onChangeYAxisForm=
"onChangeYAxisForm"
/>
<legend-selector
v-
show
=
"!view.type.includes('table')"
class=
"attr-selector"
:chart=
"chart"
@
onLegendChange=
"onLegendChange"
/>
<x-axis-selector
v-
show
=
"view.type.includes('bar') || view.type.includes('line')"
class=
"attr-selector"
:chart=
"chart"
@
onChangeXAxisForm=
"onChangeXAxisForm"
/>
<y-axis-selector
v-
show
=
"view.type.includes('bar') || view.type.includes('line')"
class=
"attr-selector"
:chart=
"chart"
@
onChangeYAxisForm=
"onChangeYAxisForm"
/>
<background-color-selector
class=
"attr-selector"
:chart=
"chart"
@
onChangeBackgroundForm=
"onChangeBackgroundForm"
/>
</el-tab-pane>
</el-tabs>
...
...
frontend/src/views/dataset/add/AddDB.vue
浏览文件 @
bde937f9
<
template
>
<el-col>
<el-row>
<el-row
style=
"height: 26px;"
>
<span
style=
"line-height: 26px;"
>
{{
$t
(
'dataset.add_db_table'
)
}}
</span>
<el-row
style=
"float: right"
>
<el-button
size=
"mini"
@
click=
"cancel"
>
{{
$t
(
'dataset.cancel'
)
}}
</el-button>
<el-button
size=
"mini"
type=
"primary"
:disabled=
"checkTableList.length
<
1
"
@
click=
"save"
>
{{
$t
(
'dataset.confirm'
)
}}
</el-button>
</el-row>
<el-row
style=
"display: flex;flex-direction: column;height: 100%"
>
<el-row
style=
"height: 26px;"
>
<span
style=
"line-height: 26px;"
>
{{
$t
(
'dataset.add_db_table'
)
}}
</span>
<el-row
style=
"float: right"
>
<el-button
size=
"mini"
@
click=
"cancel"
>
{{
$t
(
'dataset.cancel'
)
}}
</el-button>
<el-button
size=
"mini"
type=
"primary"
:disabled=
"checkTableList.length
<
1
"
@
click=
"save"
>
{{
$t
(
'dataset.confirm'
)
}}
</el-button>
</el-row>
<el-divider
/>
<el-row>
<el-form
:inline=
"true"
>
<el-form-item
class=
"form-item"
>
<el-select
v-model=
"dataSource"
filterable
:placeholder=
"$t('dataset.pls_slc_data_source')"
size=
"mini"
>
<el-option
v-for=
"item in options"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
/>
</el-select>
</el-form-item>
<el-form-item
class=
"form-item"
>
<el-select
v-model=
"mode"
filterable
:placeholder=
"$t('dataset.connect_mode')"
size=
"mini"
>
<el-option
:label=
"$t('dataset.direct_connect')"
value=
"0"
/>
<el-option
:label=
"$t('dataset.sync_data')"
value=
"1"
/>
</el-select>
</el-form-item>
<el-form-item
class=
"form-item"
style=
"float: right;"
>
<el-input
v-model=
"searchTable"
size=
"mini"
:placeholder=
"$t('dataset.search')"
prefix-icon=
"el-icon-search"
clearable
</el-row>
<el-divider
/>
<el-row>
<el-form
:inline=
"true"
>
<el-form-item
class=
"form-item"
>
<el-select
v-model=
"dataSource"
filterable
:placeholder=
"$t('dataset.pls_slc_data_source')"
size=
"mini"
>
<el-option
v-for=
"item in options"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
/>
</el-form-item>
</el-form>
</el-row>
<el-row
style=
"overflow: auto;height: 60vh;"
>
<el-checkbox-group
v-model=
"checkTableList"
size=
"small"
>
<el-checkbox
v-for=
"t in tableData"
:key=
"t"
border
:label=
"t"
</el-select>
</el-form-item>
<el-form-item
class=
"form-item"
>
<el-select
v-model=
"mode"
filterable
:placeholder=
"$t('dataset.connect_mode')"
size=
"mini"
>
<el-option
:label=
"$t('dataset.direct_connect')"
value=
"0"
/>
<el-option
:label=
"$t('dataset.sync_data')"
value=
"1"
/>
</el-select>
</el-form-item>
<el-form-item
class=
"form-item"
style=
"float: right;"
>
<el-input
v-model=
"searchTable"
size=
"mini"
:placeholder=
"$t('dataset.search')"
prefix-icon=
"el-icon-search"
clearable
/>
</el-
checkbox-group
>
</el-
row
>
</el-
form-item
>
</el-
form
>
</el-row>
</el-col>
<el-col
style=
"overflow-y: auto;"
>
<el-checkbox-group
v-model=
"checkTableList"
size=
"small"
>
<el-checkbox
v-for=
"t in tableData"
:key=
"t"
border
:label=
"t"
/>
</el-checkbox-group>
</el-col>
</el-row>
</
template
>
<
script
>
...
...
frontend/src/views/dataset/common/DatasetTableData.vue
浏览文件 @
bde937f9
...
...
@@ -58,7 +58,7 @@ export default {
this
.
resetData
()
if
(
this
.
table
.
id
)
{
this
.
table
.
row
=
10
post
(
'/dataset/table/getPreviewData'
,
this
.
table
).
then
(
response
=>
{
post
(
'/dataset/table/getPreviewData
/1/10
'
,
this
.
table
).
then
(
response
=>
{
this
.
fields
=
response
.
data
.
fields
this
.
data
=
response
.
data
.
data
const
datas
=
this
.
data
...
...
frontend/src/views/dataset/data/TabDataPreview.vue
浏览文件 @
bde937f9
...
...
@@ -34,6 +34,32 @@
</
template
>
</ux-table-column>
</ux-grid>
<el-row
style=
"margin-top: 4px;"
>
<span
class=
"table-count"
>
<span
v-if=
"page.total <= currentPage.show"
>
{{ $t('dataset.preview_total') }}
<span
class=
"span-number"
>
{{ page.total }}
</span>
{{ $t('dataset.preview_item') }}
</span>
<span
v-if=
"page.total > currentPage.show"
>
{{ $t('dataset.preview_show') }}
<span
class=
"span-number"
>
{{ currentPage.show }}
</span>
{{ $t('dataset.preview_item') }}
,{{ $t('dataset.preview_total') }}
<span
class=
"span-number"
>
{{ page.total }}
</span>
{{ $t('dataset.preview_item') }}
</span>
</span>
<el-pagination
:current-page=
"currentPage.page"
:page-sizes=
"[100]"
:page-size=
"currentPage.pageSize"
:pager-count=
"5"
layout=
"sizes, prev, pager, next"
:total=
"currentPage.show"
@
current-change=
"pageChange"
/>
</el-row>
</el-col>
</template>
...
...
@@ -56,11 +82,20 @@ export default {
form
:
{
type
:
Object
,
required
:
true
},
page
:
{
type
:
Object
,
required
:
false
}
},
data
()
{
return
{
height
:
500
height
:
500
,
currentPage
:
{
page
:
1
,
pageSize
:
100
,
show
:
parseInt
(
this
.
form
.
row
)
}
}
},
computed
:
{
...
...
@@ -69,28 +104,68 @@ export default {
data
()
{
const
datas
=
this
.
data
this
.
$refs
.
plxTable
.
reloadData
(
datas
)
},
page
()
{
if
(
this
.
page
.
total
<
parseInt
(
this
.
form
.
row
))
{
this
.
currentPage
.
show
=
this
.
page
.
total
}
else
{
this
.
currentPage
.
show
=
parseInt
(
this
.
form
.
row
)
}
}
},
mounted
()
{
window
.
onresize
=
()
=>
{
return
(()
=>
{
this
.
height
=
window
.
innerHeight
/
2
})()
}
this
.
height
=
window
.
innerHeight
/
2
},
activated
()
{
this
.
init
()
},
methods
:
{
init
()
{
this
.
calHeight
()
},
calHeight
()
{
const
that
=
this
setTimeout
(
function
()
{
const
currentHeight
=
document
.
documentElement
.
clientHeight
that
.
height
=
currentHeight
-
56
-
30
-
26
-
25
-
55
-
38
-
28
-
10
},
10
)
},
reSearch
()
{
this
.
$emit
(
'reSearch'
,
this
.
form
)
if
(
!
this
.
form
.
row
||
this
.
form
.
row
===
''
||
this
.
form
.
row
.
length
>
8
||
isNaN
(
Number
(
this
.
form
.
row
))
||
String
(
this
.
form
.
row
).
includes
(
'.'
))
{
this
.
$message
({
message
:
this
.
$t
(
'dataset.pls_input_less_9'
),
type
:
'error'
,
showClose
:
true
})
return
}
this
.
currentPage
.
show
=
parseInt
(
this
.
form
.
row
)
this
.
currentPage
.
page
=
1
this
.
$emit
(
'reSearch'
,
{
form
:
this
.
form
,
page
:
this
.
currentPage
})
},
pageChange
(
val
)
{
this
.
currentPage
.
page
=
val
// console.log(this.currentPage)
this
.
$emit
(
'reSearch'
,
{
form
:
this
.
form
,
page
:
this
.
currentPage
})
}
}
}
</
script
>
<
style
scoped
>
.row-style
>>>
.el-form-item__label
{
font-size
:
12px
;
}
.row-style
>>>
.el-form-item__label
{
font-size
:
12px
;
}
.row-style
>>>
.el-form-item--mini.el-form-item
{
margin-bottom
:
10px
;
}
.el-pagination
{
float
:
right
;
}
span
{
font-size
:
14px
;
}
.span-number
{
color
:
#f18126
;
}
.table-count
{
color
:
#606266
;
}
</
style
>
frontend/src/views/dataset/data/UpdateInfo.vue
浏览文件 @
bde937f9
...
...
@@ -464,9 +464,11 @@ export default {
})
},
handleSizeChange
(
val
)
{
this
.
page
.
pageSize
=
val
this
.
listTaskLog
()
},
handleCurrentChange
(
val
)
{
this
.
page
.
currentPage
=
val
this
.
listTaskLog
()
},
resetTaskForm
()
{
...
...
frontend/src/views/dataset/data/ViewTable.vue
浏览文件 @
bde937f9
差异被折叠。
点击展开。
frontend/src/views/dataset/group/Group.vue
浏览文件 @
bde937f9
...
...
@@ -204,7 +204,7 @@
</span>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
icon=
"el-icon-edit-outline"
:command=
"beforeClickMore('editTable',data,node)"
>
{{
$t
(
'dataset.
edit
'
)
}}
{{
$t
(
'dataset.
rename
'
)
}}
</el-dropdown-item>
<!--
<el-dropdown-item
icon=
"el-icon-right"
:command=
"beforeClickMore('move',data,node)"
>
-->
<!--
{{
$t
(
'dataset.move_to'
)
}}
-->
...
...
@@ -523,10 +523,6 @@ export default {
back
()
{
this
.
sceneMode
=
false
// const route = this.$store.state.permission.currentRoutes
// console.log(route)
// this.$router.push('/dataset/index')
this
.
$store
.
dispatch
(
'dataset/setSceneData'
,
null
)
this
.
$emit
(
'switchComponent'
,
{
name
:
''
})
},
...
...
@@ -559,16 +555,7 @@ export default {
},
sceneClick
(
data
,
node
)
{
// console.log(data);
this
.
$store
.
dispatch
(
'dataset/setTable'
,
null
)
this
.
$store
.
dispatch
(
'dataset/setTable'
,
data
.
id
)
// this.$router.push({
// name: 'table',
// params: {
// table: data
// }
// })
this
.
$emit
(
'switchComponent'
,
{
name
:
'ViewTable'
})
this
.
$emit
(
'switchComponent'
,
{
name
:
'ViewTable'
,
param
:
data
.
id
})
},
refresh
()
{
...
...
frontend/src/views/system/datasource/index.vue
浏览文件 @
bde937f9
...
...
@@ -3,14 +3,14 @@
<complex-table
:data=
"data"
:columns=
"columns"
:buttons=
"buttons"
:header=
"header"
:search-config=
"searchConfig"
:pagination-config=
"paginationConfig"
@
select=
"select"
@
search=
"search"
>
<template
#
buttons
>
<template
#
toolbar
>
<fu-table-button
v-permission=
"['datasource:add']"
icon=
"el-icon-circle-plus-outline"
:label=
"$t('datasource.create')"
@
click=
"create"
/>
</
template
>
...
...
@@ -154,7 +154,7 @@ export default {
}
}
},
activa
ted
()
{
moun
ted
()
{
this
.
search
()
},
methods
:
{
...
...
@@ -199,7 +199,7 @@ export default {
this
.
$success
(
this
.
$t
(
'commons.save_success'
))
this
.
search
()
this
.
dialogVisible
=
false
})
;
})
}
else
{
return
false
}
...
...
frontend/src/views/system/dept/index.vue
浏览文件 @
bde937f9
...
...
@@ -18,12 +18,11 @@
> -->
<tree-table
:columns=
"columns"
:buttons=
"buttons"
:header=
"header"
:search-config=
"searchConfig"
@
search=
"search"
>
<template
#
buttons
>
<template
#
toolbar
>
<fu-table-button
v-permission=
"['dept:add']"
icon=
"el-icon-circle-plus-outline"
:label=
"$t('organization.create')"
@
click=
"create"
/>
</
template
>
<el-table
...
...
@@ -86,7 +85,7 @@
</el-form-item>
<el-form-item
label=
"顶级组织"
prop=
"top"
>
<el-radio-group
v-model=
"form.top"
style=
"width: 140px"
>
<el-radio-group
v-model=
"form.top"
style=
"width: 140px"
@
change=
"topChange"
>
<el-radio
:label=
"true"
>
是
</el-radio>
<el-radio
:label=
"false"
>
否
</el-radio>
</el-radio-group>
...
...
@@ -199,7 +198,7 @@ export default {
isLazy
:
true
}
},
activa
ted
()
{
moun
ted
()
{
this
.
form
=
Object
.
assign
({},
this
.
defaultForm
)
this
.
search
()
},
...
...
@@ -507,6 +506,10 @@ export default {
}
})
return
roots
},
topChange
(
value
)
{
// console.log(value)
!
value
&&
(
this
.
depts
=
null
)
}
}
...
...
frontend/src/views/system/menu/index.vue
浏览文件 @
bde937f9
...
...
@@ -2,12 +2,11 @@
<layout-content
v-loading=
"$store.getters.loadingMap[$store.getters.currentPath]"
>
<tree-table
:columns=
"columns"
:buttons=
"buttons"
:header=
"header"
:search-config=
"searchConfig"
@
search=
"initTableData"
>
<template
v-permission=
"['menu:add']"
#
buttons
>
<template
#
toolbar
>
<fu-table-button
v-permission=
"['menu:add']"
icon=
"el-icon-circle-plus-outline"
:label=
"$t('menu.create')"
@
click=
"create"
/>
</
template
>
...
...
@@ -173,7 +172,7 @@ export default {
}
],
searchConfig
:
{
useQuickSearch
:
fals
e
,
useQuickSearch
:
tru
e
,
useComplexSearch
:
false
,
quickPlaceholder
:
'按姓名搜索'
,
components
:
[
...
...
@@ -195,7 +194,7 @@ export default {
}
},
activa
ted
()
{
moun
ted
()
{
this
.
form
=
Object
.
assign
({},
this
.
defaultForm
)
this
.
initTableData
()
},
...
...
frontend/src/views/system/role/index.vue
浏览文件 @
bde937f9
...
...
@@ -7,14 +7,13 @@
highlight-current-row
:data=
"tableData"
:columns=
"columns"
:buttons=
"buttons"
:header=
"header"
:search-config=
"searchConfig"
:pagination-config=
"paginationConfig"
@
search=
"search"
@
row-click=
"rowClick"
>
<template
#
buttons
>
<template
#
toolbar
>
<fu-table-button
icon=
"el-icon-circle-plus-outline"
:label=
"$t('role.add')"
@
click=
"create"
/>
</
template
>
...
...
@@ -107,7 +106,8 @@ export default {
rule
:
{
name
:
[
{
required
:
true
,
message
:
'请输入名称'
,
trigger
:
'blur'
}
]
],
code
:
[{
required
:
true
,
message
:
'请输入代码'
,
trigger
:
'blur'
}]
},
currentRow
:
null
,
permission
:
{
...
...
@@ -145,7 +145,7 @@ export default {
watch
:
{
currentRow
:
'currentRowChange'
},
activa
ted
()
{
moun
ted
()
{
this
.
search
()
},
methods
:
{
...
...
frontend/src/views/system/user/form.vue
0 → 100644
浏览文件 @
bde937f9
<
template
>
<layout-content
:header=
"formType=='add' ? $t('user.create') : $t('user.modify')"
back-name=
"用户管理"
>
<el-form
ref=
"createUserForm"
:model=
"form"
:rules=
"rule"
size=
"small"
label-width=
"auto"
label-position=
"right"
>
<el-form-item
label=
"用户名"
prop=
"username"
>
<el-input
v-model=
"form.username"
/>
</el-form-item>
<el-form-item
label=
"电话"
prop=
"phone"
>
<el-input
v-model=
"form.phone"
/>
</el-form-item>
<el-form-item
label=
"昵称"
prop=
"nickName"
>
<el-input
v-model=
"form.nickName"
/>
</el-form-item>
<el-form-item
label=
"邮箱"
prop=
"email"
>
<el-input
v-model=
"form.email"
/>
</el-form-item>
<el-form-item
label=
"性别"
>
<el-radio-group
v-model=
"form.gender"
style=
"width: 178px"
>
<el-radio
label=
"男"
>
男
</el-radio>
<el-radio
label=
"女"
>
女
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"状态"
>
<el-radio-group
v-model=
"form.enabled"
style=
"width: 140px"
>
<el-radio
:label=
"1"
>
启用
</el-radio>
<el-radio
:label=
"0"
>
停用
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"部门"
prop=
"dept"
>
<treeselect
v-model=
"form.deptId"
:options=
"depts"
:load-options=
"loadDepts"
placeholder=
"选择部门"
/>
</el-form-item>
<el-form-item
label=
"角色"
prop=
"roleIds"
>
<el-select
v-model=
"form.roleIds"
style=
"width: 100%"
multiple
placeholder=
"请选择"
@
remove-tag=
"deleteTag"
@
change=
"changeRole"
>
<el-option
v-for=
"item in roles"
:key=
"item.name"
:label=
"item.name"
:value=
"item.id"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"save"
>
保存
</el-button>
<el-button
@
click=
"reset"
>
重置
</el-button>
</el-form-item>
</el-form>
</layout-content>
</
template
>
<
script
>
import
LayoutContent
from
'@/components/business/LayoutContent'
import
Treeselect
from
'@riophae/vue-treeselect'
import
'@riophae/vue-treeselect/dist/vue-treeselect.css'
import
{
PHONE_REGEX
}
from
'@/utils/validate'
import
{
LOAD_CHILDREN_OPTIONS
,
LOAD_ROOT_OPTIONS
}
from
'@riophae/vue-treeselect'
import
{
getDeptTree
,
treeByDeptId
}
from
'@/api/system/dept'
import
{
allRoles
}
from
'@/api/system/role'
import
{
addUser
,
editUser
}
from
'@/api/system/user'
export
default
{
components
:
{
LayoutContent
,
Treeselect
},
data
()
{
return
{
form
:
{
roles
:
[{
id
:
''
}]
},
rule
:
{
username
:
[
{
required
:
true
,
message
:
this
.
$t
(
'user.input_id'
),
trigger
:
'blur'
},
{
min
:
1
,
max
:
50
,
message
:
this
.
$t
(
'commons.input_limit'
,
[
1
,
50
]),
trigger
:
'blur'
},
{
required
:
true
,
pattern
:
'^[^
\
u4e00-
\
u9fa5]+$'
,
message
:
this
.
$t
(
'user.special_characters_are_not_supported'
),
trigger
:
'blur'
}
],
nickName
:
[
{
required
:
true
,
message
:
this
.
$t
(
'user.input_name'
),
trigger
:
'blur'
},
{
min
:
2
,
max
:
50
,
message
:
this
.
$t
(
'commons.input_limit'
,
[
2
,
50
]),
trigger
:
'blur'
},
{
required
:
true
,
message
:
this
.
$t
(
'user.special_characters_are_not_supported'
),
trigger
:
'blur'
}
],
phone
:
[
{
pattern
:
PHONE_REGEX
,
message
:
this
.
$t
(
'user.mobile_number_format_is_incorrect'
),
trigger
:
'blur'
}
],
email
:
[
{
required
:
true
,
message
:
this
.
$t
(
'user.input_email'
),
trigger
:
'blur'
},
{
required
:
true
,
pattern
:
/^
[
a-zA-Z0-9_._-
]
+@
[
a-zA-Z0-9_-
]
+
(\.[
a-zA-Z0-9_-
]
+
)
+$/
,
message
:
this
.
$t
(
'user.email_format_is_incorrect'
),
trigger
:
'blur'
}
],
password
:
[
{
required
:
true
,
message
:
this
.
$t
(
'user.input_password'
),
trigger
:
'blur'
},
{
required
:
true
,
pattern
:
/^
(?=
.*
[
a-z
])(?=
.*
[
A-Z
])(?=
.*
\d)[^]{8,30}
$/
,
message
:
this
.
$t
(
'member.password_format_is_incorrect'
),
trigger
:
'blur'
}
],
newPassword
:
[
{
required
:
true
,
message
:
this
.
$t
(
'user.input_password'
),
trigger
:
'blur'
},
{
required
:
true
,
pattern
:
/^
(?=
.*
[
a-z
])(?=
.*
[
A-Z
])(?=
.*
\d)[^]{8,30}
$/
,
message
:
this
.
$t
(
'member.password_format_is_incorrect'
),
trigger
:
'blur'
}
],
roleIds
:
[{
required
:
true
,
message
:
this
.
$t
(
'user.input_roles'
),
trigger
:
'change'
}]
},
defaultForm
:
{
id
:
null
,
username
:
null
,
nickName
:
null
,
gender
:
'男'
,
email
:
null
,
enabled
:
1
,
deptId
:
null
,
phone
:
null
,
roleIds
:
[]
},
depts
:
null
,
roles
:
[],
roleDatas
:
[],
userRoles
:
[],
formType
:
'add'
}
},
created
()
{
if
(
this
.
$router
.
currentRoute
.
params
&&
this
.
$router
.
currentRoute
.
params
.
id
)
{
const
row
=
this
.
$router
.
currentRoute
.
params
this
.
edit
(
row
)
}
else
{
this
.
create
()
}
this
.
initRoles
()
},
methods
:
{
create
()
{
this
.
depts
=
null
this
.
formType
=
'add'
this
.
form
=
Object
.
assign
({},
this
.
defaultForm
)
console
.
log
(
this
.
form
)
},
edit
(
row
)
{
this
.
depts
=
null
this
.
formType
=
'modify'
this
.
dialogVisible
=
true
this
.
form
=
Object
.
assign
({},
row
)
if
(
this
.
form
.
deptId
===
0
)
{
this
.
form
.
deptId
=
null
}
this
.
initDeptTree
()
},
initRoles
()
{
allRoles
().
then
(
res
=>
{
this
.
roles
=
res
.
data
})
},
initDeptTree
()
{
treeByDeptId
(
this
.
form
.
deptId
||
0
).
then
(
res
=>
{
const
results
=
res
.
data
.
map
(
node
=>
{
if
(
node
.
hasChildren
&&
!
node
.
children
)
{
node
.
children
=
null
}
return
node
})
this
.
depts
=
results
})
},
// 获取弹窗内部门数据
loadDepts
({
action
,
parentNode
,
callback
})
{
if
(
action
===
LOAD_ROOT_OPTIONS
&&
!
this
.
form
.
deptId
)
{
const
_self
=
this
treeByDeptId
(
0
).
then
(
res
=>
{
const
results
=
res
.
data
.
map
(
node
=>
{
if
(
node
.
hasChildren
&&
!
node
.
children
)
{
node
.
children
=
null
}
return
node
})
_self
.
depts
=
results
callback
()
})
}
if
(
action
===
LOAD_CHILDREN_OPTIONS
)
{
const
_self
=
this
getDeptTree
(
parentNode
.
id
).
then
(
res
=>
{
parentNode
.
children
=
res
.
data
.
map
(
function
(
obj
)
{
return
_self
.
normalizer
(
obj
)
})
callback
()
})
}
},
normalizer
(
node
)
{
if
(
node
.
hasChildren
)
{
node
.
children
=
null
}
return
{
id
:
node
.
deptId
,
label
:
node
.
name
,
children
:
node
.
children
}
},
deleteTag
(
value
)
{
this
.
userRoles
.
forEach
(
function
(
data
,
index
)
{
if
(
data
.
id
===
value
)
{
this
.
userRoles
.
splice
(
index
,
value
)
}
}.
bind
(
this
))
},
changeRole
(
value
)
{
this
.
userRoles
=
[]
value
.
forEach
(
function
(
data
,
index
)
{
const
role
=
{
id
:
data
}
this
.
userRoles
.
push
(
role
)
}.
bind
(
this
))
},
reset
()
{
this
.
$refs
.
createUserForm
.
resetFields
()
},
save
()
{
this
.
$refs
.
createUserForm
.
validate
(
valid
=>
{
if
(
valid
)
{
const
method
=
this
.
formType
===
'add'
?
addUser
:
editUser
method
(
this
.
form
).
then
(
res
=>
{
this
.
$success
(
this
.
$t
(
'commons.save_success'
))
this
.
backToList
()
})
}
else
{
return
false
}
})
},
backToList
()
{
this
.
$router
.
push
({
name
:
'用户管理'
})
}
}
}
</
script
>
frontend/src/views/system/user/index.vue
浏览文件 @
bde937f9
...
...
@@ -3,18 +3,16 @@
<complex-table
:data=
"data"
:columns=
"columns"
:buttons=
"buttons"
:header=
"header"
:search-config=
"searchConfig"
:pagination-config=
"paginationConfig"
@
select=
"select"
@
search=
"search"
>
<template
#
buttons
>
<template
#
toolbar
>
<fu-table-button
v-permission=
"['user:add']"
icon=
"el-icon-circle-plus-outline"
:label=
"$t('user.create')"
@
click=
"create"
/>
</
template
>
<!-- <el-table-column type="selection" fix /> -->
<el-table-column
prop=
"username"
label=
"ID"
width=
"80"
/>
<el-table-column
prop=
"nickName"
:label=
"$t('commons.name')"
width=
"140"
/>
<el-table-column
prop=
"gender"
label=
"性别"
width=
"50"
/>
...
...
@@ -109,7 +107,6 @@
</div>
</el-dialog>
<!--Changing user password in system settings-->
<el-dialog
:close-on-click-modal=
"false"
:title=
"$t('member.edit_password')"
...
...
@@ -145,9 +142,7 @@
<
script
>
import
LayoutContent
from
'@/components/business/LayoutContent'
import
ComplexTable
from
'@/components/business/complex-table'
// import conditionTable from '@/components/business/condition-table'
// import CustomCondition from './CustomCondtion'
// import { GridButton } from '@/components/GridButton'
import
{
checkPermission
}
from
'@/utils/permission'
import
{
formatCondition
}
from
'@/utils/index'
import
{
PHONE_REGEX
}
from
'@/utils/validate'
...
...
@@ -285,7 +280,7 @@ export default {
}
}
},
activa
ted
()
{
moun
ted
()
{
// this.form = Object.assign({}, this.defaultForm);
this
.
allRoles
()
this
.
search
()
...
...
@@ -306,23 +301,28 @@ export default {
this
.
paginationConfig
.
total
=
response
.
data
.
itemCount
})
},
create
()
{
this
.
depts
=
null
this
.
formType
=
'add'
this
.
form
=
Object
.
assign
({},
this
.
defaultForm
)
this
.
dialogVisible
=
true
this
.
$router
.
push
({
name
:
'用户表单'
})
},
// create() {
// this.depts = null
// this.formType = 'add'
// this.form = Object.assign({}, this.defaultForm)
// this.dialogVisible = true
// },
edit
(
row
)
{
this
.
depts
=
null
this
.
formType
=
'modify'
this
.
dialogVisible
=
true
this
.
form
=
Object
.
assign
({},
row
)
if
(
this
.
form
.
deptId
===
0
)
{
this
.
form
.
deptId
=
null
}
this
.
initDeptTree
()
this
.
$router
.
push
({
name
:
'用户表单'
,
params
:
row
})
},
// edit(row) {
// this.depts = null
// this.formType = 'modify'
// this.dialogVisible = true
// this.form = Object.assign({}, row)
// if (this.form.deptId === 0) {
// this.form.deptId = null
// }
// this.initDeptTree()
// },
editPassword
(
row
)
{
this
.
editPasswordVisible
=
true
const
tempForm
=
Object
.
assign
({},
row
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论