Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
63acd927
提交
63acd927
authored
2月 21, 2022
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/dev' into dev
上级
fe63b85f
cada5707
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
91 行增加
和
170 行删除
+91
-170
Dockerfile
Dockerfile
+7
-7
pom.xml
backend/pom.xml
+2
-2
ExcelXlsxReader.java
.../main/java/io/dataease/commons/utils/ExcelXlsxReader.java
+3
-0
ServiceUtils.java
...src/main/java/io/dataease/commons/utils/ServiceUtils.java
+0
-51
I18nController.java
.../main/java/io/dataease/controller/sys/I18nController.java
+0
-58
DataSetTableService.java
...java/io/dataease/service/dataset/DataSetTableService.java
+0
-23
V32__1.8.sql
backend/src/main/resources/db/migration/V32__1.8.sql
+4
-0
UserView.vue
frontend/src/components/canvas/custom-component/UserView.vue
+14
-6
DeTabs.vue
frontend/src/components/widget/DeWidget/DeTabs.vue
+11
-10
buddle-map.svg
frontend/src/icons/svg/buddle-map.svg
+0
-0
index.js
frontend/src/store/index.js
+21
-6
table-info.js
frontend/src/views/chart/chart/table/table-info.js
+6
-1
QuotaExtItem.vue
...end/src/views/chart/components/drag-item/QuotaExtItem.vue
+2
-2
QuotaItem.vue
frontend/src/views/chart/components/drag-item/QuotaItem.vue
+2
-2
filterDialog.vue
frontend/src/views/panel/filter/filterDialog.vue
+19
-2
没有找到文件。
Dockerfile
浏览文件 @
63acd927
FROM
registry.cn-qingdao.aliyuncs.com/dataease/fabric8-java-alpine-openjdk8-jre:edge
RUN
echo
-e
'https://dl-cdn.alpinelinux.org/alpine/edge/main/\nhttps://dl-cdn.alpinelinux.org/alpine/edge/community/'
>
/etc/apk/repositories
#
RUN echo -e 'https://dl-cdn.alpinelinux.org/alpine/edge/main/\nhttps://dl-cdn.alpinelinux.org/alpine/edge/community/' > /etc/apk/repositories
RUN
apk add chromium chromium-chromedriver fontconfig
--no-cache
--allow-untrusted
#
RUN apk add chromium chromium-chromedriver fontconfig --no-cache --allow-untrusted
ADD
simsun.ttc /usr/share/fonts/
#
ADD simsun.ttc /usr/share/fonts/
RUN
cd
/usr/share/fonts/
\
&&
mkfontscale
\
&&
mkfontdir
\
&&
fc-cache
-fv
#
RUN cd /usr/share/fonts/ \
#
&& mkfontscale \
#
&& mkfontdir \
#
&& fc-cache -fv
ARG
IMAGE_TAG
...
...
backend/pom.xml
浏览文件 @
63acd927
...
...
@@ -31,7 +31,7 @@
<dependency>
<groupId>
com.google.guava
</groupId>
<artifactId>
guava
</artifactId>
<version>
3
0.1
.1-jre
</version>
<version>
3
1.0
.1-jre
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
...
...
@@ -143,7 +143,7 @@
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
fastjson
</artifactId>
<version>
1.2.7
2
</version>
<version>
1.2.7
9
</version>
</dependency>
<dependency>
<groupId>
com.auth0
</groupId>
...
...
backend/src/main/java/io/dataease/commons/utils/ExcelXlsxReader.java
浏览文件 @
63acd927
...
...
@@ -142,6 +142,9 @@ public class ExcelXlsxReader extends DefaultHandler {
stylesTable
=
xssfReader
.
getStylesTable
();
SharedStringsTable
sst
=
xssfReader
.
getSharedStringsTable
();
XMLReader
parser
=
XMLReaderFactory
.
createXMLReader
(
"org.apache.xerces.parsers.SAXParser"
);
parser
.
setFeature
(
"http://apache.org/xml/features/disallow-doctype-decl"
,
true
);
parser
.
setFeature
(
"http://xml.org/sax/features/external-general-entities"
,
false
);
parser
.
setFeature
(
"http://xml.org/sax/features/external-parameter-entities"
,
false
);
this
.
sst
=
sst
;
parser
.
setContentHandler
(
this
);
XSSFReader
.
SheetIterator
sheets
=
(
XSSFReader
.
SheetIterator
)
xssfReader
.
getSheetsData
();
...
...
backend/src/main/java/io/dataease/commons/utils/ServiceUtils.java
deleted
100644 → 0
浏览文件 @
fe63b85f
package
io
.
dataease
.
commons
.
utils
;
import
io.dataease.commons.exception.DEException
;
import
io.dataease.controller.request.BaseQueryRequest
;
import
io.dataease.controller.request.OrderRequest
;
import
java.lang.reflect.Method
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
public
class
ServiceUtils
{
public
static
List
<
OrderRequest
>
getDefaultOrder
(
List
<
OrderRequest
>
orders
)
{
if
(
orders
==
null
||
orders
.
size
()
<
1
)
{
OrderRequest
orderRequest
=
new
OrderRequest
();
orderRequest
.
setName
(
"update_time"
);
orderRequest
.
setType
(
"desc"
);
orders
=
new
ArrayList
<>();
orders
.
add
(
orderRequest
);
return
orders
;
}
return
orders
;
}
/**
* 获取前端全选的id列表
* @param queryRequest 查询条件
* @param func 查询id列表的数据库查询
* @return
*/
public
static
<
T
>
void
getSelectAllIds
(
T
batchRequest
,
BaseQueryRequest
queryRequest
,
Function
<
BaseQueryRequest
,
List
<
String
>>
func
)
{
if
(
queryRequest
.
isSelectAll
())
{
List
<
String
>
ids
=
func
.
apply
(
queryRequest
);
if
(!
ids
.
isEmpty
())
{
ids
=
ids
.
stream
()
.
filter
(
id
->
!
queryRequest
.
getUnSelectIds
().
contains
(
id
))
.
collect
(
Collectors
.
toList
());
}
queryRequest
.
setIds
(
ids
);
try
{
Method
setIds
=
batchRequest
.
getClass
().
getDeclaredMethod
(
"setIds"
,
List
.
class
);
setIds
.
invoke
(
batchRequest
,
ids
);
}
catch
(
Exception
e
)
{
LogUtil
.
error
(
e
.
getMessage
(),
e
);
DEException
.
throwException
(
"请求没有setIds方法"
);
}
}
}
}
backend/src/main/java/io/dataease/controller/sys/I18nController.java
deleted
100644 → 0
浏览文件 @
fe63b85f
package
io
.
dataease
.
controller
.
sys
;
import
io.dataease.commons.constants.I18nConstants
;
import
io.dataease.commons.exception.DEException
;
import
io.dataease.commons.utils.LogUtil
;
import
io.dataease.i18n.Lang
;
import
io.dataease.i18n.Translator
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RestController
;
import
springfox.documentation.annotations.ApiIgnore
;
import
javax.servlet.http.Cookie
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
/**
* Created by liqiang on 2019/4/1.
*/
@ApiIgnore
@RestController
public
class
I18nController
{
private
static
final
int
FOR_EVER
=
3600
*
24
*
30
*
12
*
10
;
//10 years in second
@Value
(
"${run.mode:release}"
)
private
String
runMode
;
@GetMapping
(
"lang/change/{lang}"
)
public
void
changeLang
(
@PathVariable
String
lang
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
Lang
targetLang
=
Lang
.
getLangWithoutDefault
(
lang
);
if
(
targetLang
==
null
)
{
response
.
setStatus
(
HttpServletResponse
.
SC_NOT_ACCEPTABLE
);
LogUtil
.
error
(
"Invalid parameter: "
+
lang
);
DEException
.
throwException
(
Translator
.
get
(
"error_lang_invalid"
));
}
Cookie
cookie
=
new
Cookie
(
I18nConstants
.
LANG_COOKIE_NAME
,
targetLang
.
getDesc
());
cookie
.
setPath
(
"/"
);
cookie
.
setMaxAge
(
FOR_EVER
);
response
.
addCookie
(
cookie
);
//重新登录
if
(
"release"
.
equals
(
runMode
))
{
Cookie
f2cCookie
=
new
Cookie
(
"DE_SESSION_ID"
,
"deleteMe"
);
f2cCookie
.
setPath
(
"/"
);
f2cCookie
.
setMaxAge
(
0
);
response
.
addCookie
(
f2cCookie
);
}
//本地测试用
if
(
"local"
.
equals
(
runMode
))
{
if
(
request
!=
null
)
{
request
.
getSession
(
true
).
setAttribute
(
I18nConstants
.
LANG_COOKIE_NAME
,
lang
);
}
}
}
}
backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java
浏览文件 @
63acd927
...
...
@@ -2000,30 +2000,7 @@ public class DataSetTableService {
data
.
add
(
r
);
}
}
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
suffix
,
"csv"
))
{
BufferedReader
reader
=
new
BufferedReader
(
new
InputStreamReader
(
inputStream
,
StandardCharsets
.
UTF_8
));
String
s
=
reader
.
readLine
();
// first line
String
[]
split
=
s
.
split
(
","
);
for
(
String
s1
:
split
)
{
TableField
tableField
=
new
TableField
();
tableField
.
setFieldName
(
s1
);
tableField
.
setRemarks
(
s1
);
tableField
.
setFieldType
(
"TEXT"
);
fields
.
add
(
tableField
);
}
int
num
=
1
;
String
line
;
while
((
line
=
reader
.
readLine
())
!=
null
)
{
if
(
isPreview
)
{
if
(
num
>
100
)
{
break
;
}
}
data
.
add
(
line
.
split
(
","
));
num
++;
}
}
String
[]
fieldArray
=
fields
.
stream
().
map
(
TableField:
:
getFieldName
).
toArray
(
String
[]::
new
);
// 校验excel字段是否重名
...
...
backend/src/main/resources/db/migration/V32__1.8.sql
浏览文件 @
63acd927
...
...
@@ -313,3 +313,7 @@ ADD COLUMN `uuid` varchar(8) NULL COMMENT 'uuid' AFTER `user_id`;
ALTER
TABLE
`chart_view`
ADD
COLUMN
`is_plugin`
bit
(
1
)
NULL
COMMENT
'是否插件'
AFTER
`chart_type`
;
INSERT
INTO
`my_plugin`
VALUES
(
2
,
'视图默认插件'
,
'default'
,
0
,
20000
,
'view'
,
'默认视图插件'
,
'1.0-SNAPSHOT'
,
NULL
,
'fit2cloud-chenyw'
,
0
,
NULL
,
NULL
,
'deplugin-view-backend'
,
NULL
);
frontend/src/components/canvas/custom-component/UserView.vue
浏览文件 @
63acd927
...
...
@@ -167,9 +167,7 @@ export default {
sourceCustomStyleStr
:
null
}
},
mounted
()
{
this
.
bindPluginEvent
()
},
computed
:
{
// 视图
componentBackGround
()
{
...
...
@@ -379,6 +377,9 @@ export default {
deep
:
true
}
},
mounted
()
{
this
.
bindPluginEvent
()
},
created
()
{
this
.
refId
=
uuid
.
v1
...
...
@@ -390,10 +391,17 @@ export default {
},
methods
:
{
bindPluginEvent
()
{
bus
.
$on
(
'plugin-chart-click'
,
this
.
chartClick
)
bus
.
$on
(
'plugin-jump-click'
,
this
.
jumpClick
)
bus
.
$on
(
'plugin-add-view-track-filter'
,
this
.
addViewTrackFilter
)
bus
.
$on
(
'plugin-chart-click'
,
param
=>
{
param
.
viewId
&&
param
.
viewId
===
this
.
element
.
propValue
.
viewId
&&
this
.
chartClick
(
param
)
})
bus
.
$on
(
'plugin-jump-click'
,
param
=>
{
param
.
viewId
&&
param
.
viewId
===
this
.
element
.
propValue
.
viewId
&&
this
.
jumpClick
(
param
)
})
bus
.
$on
(
'plugin-add-view-track-filter'
,
param
=>
{
param
.
viewId
&&
param
.
viewId
===
this
.
element
.
propValue
.
viewId
&&
this
.
addViewTrackFilter
(
param
)
})
},
addViewTrackFilter
(
linkageParam
)
{
this
.
$store
.
commit
(
'addViewTrackFilter'
,
linkageParam
)
},
...
...
frontend/src/components/widget/DeWidget/DeTabs.vue
浏览文件 @
63acd927
...
...
@@ -2,7 +2,7 @@
<div
class=
"de-tabs-div"
>
<el-tabs
v-model=
"activeTabName"
type=
"card"
class=
"de-tabs"
>
<el-tab-pane
v-for=
"(item, index) in tabList"
v-for=
"(item, index) in
element.options.
tabList"
:key=
"item.name+index"
:lazy=
"true"
:name=
"item.name"
...
...
@@ -26,7 +26,7 @@
{{
$t
(
'detabs.selectview'
)
}}
</el-dropdown-item>
<el-dropdown-item
v-if=
"tabList.length > 1"
:command=
"beforeHandleCommond('deleteCur', item)"
>
<el-dropdown-item
v-if=
"
element.options.
tabList.length > 1"
:command=
"beforeHandleCommond('deleteCur', item)"
>
{{
$t
(
'table.delete'
)
}}
</el-dropdown-item>
...
...
@@ -35,7 +35,7 @@
</span>
<div
v-if=
"activeTabName === item.name"
class=
"de-tab-content"
>
<user-view
v-if=
"item.content && item.content.propValue && item.content.propValue.viewId"
:ref=
"item.name"
:in-tab=
"true"
:is-edit=
"isEdit"
:active=
"active"
:element=
"item.content"
:out-style=
"outStyle"
/>
<user-view
v-if=
"item.content && item.content.propValue && item.content.propValue.viewId"
:ref=
"item.name"
:in-tab=
"true"
:is-edit=
"isEdit"
:active=
"active"
:element=
"item.content"
:
filters=
"item.content.filters"
:
out-style=
"outStyle"
/>
</div>
</el-tab-pane>
...
...
@@ -130,14 +130,15 @@ export default {
dialogVisible
:
false
,
textarea
:
''
,
curItem
:
null
,
viewDialogVisible
:
false
,
tabList
:
[]
viewDialogVisible
:
false
}
},
computed
:
{
dropdownShow
()
{
return
this
.
isEdit
&&
!
this
.
mobileLayoutStatus
},
...
mapState
([
'curComponent'
,
'mobileLayoutStatus'
...
...
@@ -152,8 +153,7 @@ export default {
},
created
()
{
bus
.
$on
(
'add-new-tab'
,
this
.
addNewTab
)
this
.
tabList
=
this
.
element
.
options
&&
this
.
element
.
options
.
tabList
this
.
activeTabName
=
this
.
tabList
[
0
].
name
this
.
activeTabName
=
this
.
element
.
options
.
tabList
[
0
].
name
},
methods
:
{
beforeHandleCommond
(
item
,
param
)
{
...
...
@@ -192,7 +192,8 @@ export default {
const
newComponentId
=
uuid
.
v1
()
const
componentInfo
=
{
type
:
'view'
,
id
:
node
.
id
/* id: node.id */
id
:
node
.
innerId
}
componentList
.
forEach
(
componentTemp
=>
{
...
...
@@ -239,7 +240,7 @@ export default {
while
(
len
--
)
{
if
(
this
.
element
.
options
.
tabList
[
len
].
name
===
param
.
name
)
{
this
.
element
.
options
.
tabList
.
splice
(
len
,
1
)
this
.
tabList
=
this
.
element
.
options
.
tabList
const
activIndex
=
(
len
-
1
+
this
.
element
.
options
.
tabList
.
length
)
%
this
.
element
.
options
.
tabList
.
length
this
.
activeTabName
=
this
.
element
.
options
.
tabList
[
activIndex
].
name
}
...
...
@@ -256,7 +257,7 @@ export default {
content
:
null
}
this
.
element
.
options
.
tabList
.
push
(
tab
)
this
.
tabList
=
this
.
element
.
options
.
tabList
this
.
styleChange
()
},
styleChange
()
{
...
...
frontend/src/icons/svg/buddle-map.svg
浏览文件 @
63acd927
差异被折叠。
点击展开。
frontend/src/store/index.js
浏览文件 @
63acd927
...
...
@@ -203,20 +203,35 @@ const data = {
for
(
let
index
=
0
;
index
<
state
.
componentData
.
length
;
index
++
)
{
const
element
=
state
.
componentData
[
index
]
if
(
element
.
type
&&
element
.
type
===
'de-tabs'
)
{
for
(
let
idx
=
0
;
idx
<
element
.
options
.
tabList
.
length
;
idx
++
)
{
const
ele
=
element
.
options
.
tabList
[
idx
].
content
if
(
!
ele
.
type
||
ele
.
type
!==
'view'
)
continue
const
currentFilters
=
ele
.
filters
||
[]
const
vidMatch
=
viewIdMatch
(
condition
.
viewIds
,
ele
.
propValue
.
viewId
)
let
jdx
=
currentFilters
.
length
while
(
jdx
--
)
{
const
filter
=
currentFilters
[
jdx
]
if
(
filter
.
componentId
===
filterComponentId
)
{
currentFilters
.
splice
(
jdx
,
1
)
}
}
// 不存在该条件 且 条件有效 直接保存该条件
// !filterExist && vValid && currentFilters.push(condition)
vidMatch
&&
vValid
&&
currentFilters
.
push
(
condition
)
ele
.
filters
=
currentFilters
}
state
.
componentData
[
index
]
=
element
}
if
(
!
element
.
type
||
element
.
type
!==
'view'
)
continue
const
currentFilters
=
element
.
filters
||
[]
const
vidMatch
=
viewIdMatch
(
condition
.
viewIds
,
element
.
propValue
.
viewId
)
let
j
=
currentFilters
.
length
// let filterExist = false
while
(
j
--
)
{
const
filter
=
currentFilters
[
j
]
if
(
filter
.
componentId
===
filterComponentId
)
{
// filterExist = true
// 已存在该条件 且 条件值有效 直接替换原体检
// vidMatch && vValid && (currentFilters[j] = condition)
// 已存在该条件 且 条件值无效 直接删除原条件
// vidMatch && !vValid && (currentFilters.splice(j, 1))
currentFilters
.
splice
(
j
,
1
)
}
}
...
...
frontend/src/views/chart/chart/table/table-info.js
浏览文件 @
63acd927
...
...
@@ -116,7 +116,12 @@ export function baseTableNormal(s2, container, chart, action, tableData) {
// add drill list
if
(
chart
.
drill
)
{
const
drillFields
=
JSON
.
parse
(
chart
.
drillFields
)
let
drillFields
=
[]
try
{
drillFields
=
JSON
.
parse
(
chart
.
drillFields
)
}
catch
(
err
)
{
drillFields
=
JSON
.
parse
(
JSON
.
stringify
(
chart
.
drillFields
))
}
const
drillField
=
drillFields
[
chart
.
drillFilters
.
length
]
const
drillFilters
=
JSON
.
parse
(
JSON
.
stringify
(
chart
.
drillFilters
))
...
...
frontend/src/views/chart/components/drag-item/QuotaExtItem.vue
浏览文件 @
63acd927
...
...
@@ -180,8 +180,8 @@ export default {
const
t1
=
xAxis
.
filter
(
ele
=>
{
return
ele
.
deType
===
1
})
// 暂时只支持类别轴/维度的时间类型字段
,且视图中有且只有一个时间字段
if
(
t1
.
length
===
1
&&
this
.
chart
.
type
!==
'text'
&&
this
.
chart
.
type
!==
'gauge'
&&
this
.
chart
.
type
!==
'liquid'
)
{
// 暂时只支持类别轴/维度的时间类型字段
if
(
t1
.
length
>
0
&&
this
.
chart
.
type
!==
'text'
&&
this
.
chart
.
type
!==
'gauge'
&&
this
.
chart
.
type
!==
'liquid'
)
{
this
.
disableEditCompare
=
false
}
else
{
this
.
disableEditCompare
=
true
...
...
frontend/src/views/chart/components/drag-item/QuotaItem.vue
浏览文件 @
63acd927
...
...
@@ -177,8 +177,8 @@ export default {
const
t1
=
xAxis
.
filter
(
ele
=>
{
return
ele
.
deType
===
1
})
// 暂时只支持类别轴/维度的时间类型字段
,且视图中有且只有一个时间字段
if
(
t1
.
length
===
1
&&
this
.
chart
.
type
!==
'text'
&&
this
.
chart
.
type
!==
'gauge'
&&
this
.
chart
.
type
!==
'liquid'
)
{
// 暂时只支持类别轴/维度的时间类型字段
if
(
t1
.
length
>
0
&&
this
.
chart
.
type
!==
'text'
&&
this
.
chart
.
type
!==
'gauge'
&&
this
.
chart
.
type
!==
'liquid'
)
{
this
.
disableEditCompare
=
false
}
else
{
this
.
disableEditCompare
=
true
...
...
frontend/src/views/panel/filter/filterDialog.vue
浏览文件 @
63acd927
...
...
@@ -387,11 +387,28 @@ export default {
return
roots
},
loadViews
()
{
const
viewIds
=
this
.
componentData
/*
const viewIds = this.componentData
.filter(item => item.type === 'view' && item.propValue && item.propValue.viewId)
.
map
(
item
=>
item
.
propValue
.
viewId
)
.map(item => item.propValue.viewId) */
let
viewIds
=
[];
let
tabViewIds
=
[]
for
(
let
index
=
0
;
index
<
this
.
componentData
.
length
;
index
++
)
{
const
element
=
this
.
componentData
[
index
]
if
(
element
.
type
&&
element
.
propValue
&&
element
.
propValue
.
viewId
&&
element
.
type
===
'view'
)
{
viewIds
.
push
(
element
.
propValue
.
viewId
)
}
if
(
element
.
type
&&
element
.
type
===
'de-tabs'
)
{
tabViewIds
=
element
.
options
.
tabList
.
filter
(
item
=>
item
.
content
&&
item
.
content
.
type
===
'view'
&&
item
.
content
.
propValue
&&
item
.
content
.
propValue
.
viewId
).
map
(
item
=>
item
.
content
.
propValue
.
viewId
)
}
viewIds
=
[...
viewIds
,
...
tabViewIds
]
}
viewIds
&&
viewIds
.
length
>
0
&&
viewsWithIds
(
viewIds
).
then
(
res
=>
{
const
datas
=
res
.
data
/* datas.forEach(item => {
if (tabViewIds.includes(item.id)) {
item.name = 'tabs(' + item.name + ')'
}
}) */
this
.
viewInfos
=
datas
this
.
childViews
.
viewInfos
=
datas
})
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论