Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
46c45315
提交
46c45315
authored
12月 27, 2021
作者:
taojinlong
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' of github.com:dataease/dataease into dev
上级
4786d23d
9fd8b7f1
隐藏空白字符变更
内嵌
并排
正在显示
28 个修改的文件
包含
443 行增加
和
289 行删除
+443
-289
DataSetTableFieldController.java
...aease/controller/dataset/DataSetTableFieldController.java
+16
-4
DorisQueryProvider.java
.../io/dataease/provider/query/doris/DorisQueryProvider.java
+8
-4
ChartViewService.java
...main/java/io/dataease/service/chart/ChartViewService.java
+74
-44
MobileCheckBar.vue
...rc/components/canvas/components/Editor/MobileCheckBar.vue
+1
-0
Preview.vue
frontend/src/components/canvas/components/Editor/Preview.vue
+1
-2
PreviewEject.vue
.../src/components/canvas/components/Editor/PreviewEject.vue
+4
-1
Toolbar.vue
frontend/src/components/canvas/components/Toolbar.vue
+7
-1
UserView.vue
frontend/src/components/canvas/custom-component/UserView.vue
+1
-1
VText.vue
frontend/src/components/canvas/custom-component/VText.vue
+20
-3
PreviewMobile.vue
frontend/src/components/canvas/mobile/PreviewMobile.vue
+0
-93
utils.js
frontend/src/components/canvas/utils/utils.js
+14
-1
DeOutWidget.vue
frontend/src/components/dataease/DeOutWidget.vue
+74
-28
DeDate.vue
frontend/src/components/widget/DeWidget/DeDate.vue
+12
-6
DeSelectGrid.vue
frontend/src/components/widget/DeWidget/DeSelectGrid.vue
+49
-32
DeTabs.vue
frontend/src/components/widget/DeWidget/DeTabs.vue
+6
-2
TimeDateServiceImpl.js
.../src/components/widget/serviceImpl/TimeDateServiceImpl.js
+3
-2
index.js
frontend/src/store/index.js
+1
-0
map.js
frontend/src/views/chart/chart/map/map.js
+2
-2
ChartComponent.vue
frontend/src/views/chart/components/ChartComponent.vue
+121
-37
QuotaFilterEditor.vue
...d/src/views/chart/components/filter/QuotaFilterEditor.vue
+1
-0
index.vue
frontend/src/views/panel/AssistComponent/index.vue
+2
-1
ComponentWait.vue
frontend/src/views/panel/edit/ComponentWait.vue
+1
-0
ComponentWaitItem.vue
frontend/src/views/panel/edit/ComponentWaitItem.vue
+1
-1
index.vue
frontend/src/views/panel/edit/index.vue
+16
-20
DeDateDefault.vue
...end/src/views/panel/filter/defaultValue/DeDateDefault.vue
+4
-0
index.vue
frontend/src/views/panel/filter/index.vue
+2
-1
PanelList.vue
frontend/src/views/panel/list/PanelList.vue
+2
-0
PanelViewShow.vue
frontend/src/views/panel/list/PanelViewShow.vue
+0
-3
没有找到文件。
backend/src/main/java/io/dataease/controller/dataset/DataSetTableFieldController.java
浏览文件 @
46c45315
...
...
@@ -7,12 +7,15 @@ import io.dataease.service.dataset.DataSetFieldService;
import
io.dataease.service.dataset.DataSetTableFieldsService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.util.TreeSet
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -74,18 +77,27 @@ public class DataSetTableFieldController {
@ApiOperation
(
"值枚举"
)
@PostMapping
(
"fieldValues/{fieldId}"
)
public
List
<
Object
>
fieldValues
(
@PathVariable
String
fieldId
)
throws
Exception
{
public
List
<
Object
>
fieldValues
(
@PathVariable
String
fieldId
)
throws
Exception
{
return
dataSetFieldService
.
fieldValues
(
fieldId
);
}
@ApiOperation
(
"多字段值枚举"
)
@PostMapping
(
"multFieldValues"
)
public
List
<
Object
>
multFieldValues
(
@RequestBody
List
<
String
>
fieldIds
)
throws
Exception
{
public
List
<
Object
>
multFieldValues
(
@RequestBody
List
<
String
>
fieldIds
)
throws
Exception
{
List
<
Object
>
results
=
new
ArrayList
<>();
for
(
String
fieldId
:
fieldIds
)
{
results
.
addAll
(
dataSetFieldService
.
fieldValues
(
fieldId
));
}
results
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
return
results
;
ArrayList
<
Object
>
list
=
results
.
stream
().
collect
(
Collectors
.
collectingAndThen
(
Collectors
.
toCollection
(
()
->
new
TreeSet
<>(
Comparator
.
comparing
(
t
->
{
if
(
ObjectUtils
.
isEmpty
(
t
))
return
""
;
return
t
.
toString
();
}))
),
ArrayList:
:
new
)
);
return
list
;
}
}
backend/src/main/java/io/dataease/provider/query/doris/DorisQueryProvider.java
浏览文件 @
46c45315
...
...
@@ -805,11 +805,13 @@ public class DorisQueryProvider extends QueryProvider {
}
else
if
(
StringUtils
.
containsIgnoreCase
(
filterItemDTO
.
getTerm
(),
"like"
))
{
whereValue
=
"'%"
+
value
+
"%'"
;
}
else
{
if
(
field
.
getDeExtractType
()
==
2
||
field
.
getDeExtractType
()
==
3
||
field
.
getDeExtractType
()
==
4
)
{
// Doris field type test
/*if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) {
whereValue = String.format(DorisConstants.WHERE_NUMBER_VALUE, value);
} else {
whereValue = String.format(DorisConstants.WHERE_VALUE_VALUE, value);
}
}*/
whereValue
=
String
.
format
(
DorisConstants
.
WHERE_VALUE_VALUE
,
value
);
}
list
.
add
(
SQLObj
.
builder
()
.
whereField
(
whereName
)
...
...
@@ -881,11 +883,13 @@ public class DorisQueryProvider extends QueryProvider {
whereValue
=
String
.
format
(
DorisConstants
.
WHERE_BETWEEN
,
value
.
get
(
0
),
value
.
get
(
1
));
}
}
else
{
if
(
field
.
getDeExtractType
()
==
2
||
field
.
getDeExtractType
()
==
3
||
field
.
getDeExtractType
()
==
4
)
{
// doris field type test
/*if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) {
whereValue = String.format(DorisConstants.WHERE_NUMBER_VALUE, value.get(0));
} else {
whereValue = String.format(DorisConstants.WHERE_VALUE_VALUE, value.get(0));
}
}*/
whereValue
=
String
.
format
(
DorisConstants
.
WHERE_VALUE_VALUE
,
value
.
get
(
0
));
}
list
.
add
(
SQLObj
.
builder
()
.
whereField
(
whereName
)
...
...
backend/src/main/java/io/dataease/service/chart/ChartViewService.java
浏览文件 @
46c45315
...
...
@@ -498,7 +498,7 @@ public class ChartViewService {
String
cValue
=
item
[
dataIndex
];
// 获取计算后的时间,并且与所有维度拼接
String
lastTime
=
calcLastTime
(
cTime
,
compareCalc
.
getType
(),
timeField
.
getDateStyle
());
String
lastTime
=
calcLastTime
(
cTime
,
compareCalc
.
getType
(),
timeField
.
getDateStyle
()
,
timeField
.
getDatePattern
()
);
String
[]
dimension
=
Arrays
.
copyOfRange
(
item
,
0
,
checkedField
.
size
());
dimension
[
timeIndex
]
=
lastTime
;
...
...
@@ -599,51 +599,81 @@ public class ChartViewService {
return
false
;
}
private
String
calcLastTime
(
String
cTime
,
String
type
,
String
dateStyle
)
throws
Exception
{
String
lastTime
=
null
;
Calendar
calendar
=
Calendar
.
getInstance
();
if
(
StringUtils
.
equalsIgnoreCase
(
type
,
ChartConstants
.
YEAR_MOM
))
{
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy"
);
Date
date
=
simpleDateFormat
.
parse
(
cTime
);
calendar
.
setTime
(
date
);
calendar
.
add
(
Calendar
.
YEAR
,
-
1
);
lastTime
=
simpleDateFormat
.
format
(
calendar
.
getTime
());
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
type
,
ChartConstants
.
MONTH_MOM
))
{
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM"
);
Date
date
=
simpleDateFormat
.
parse
(
cTime
);
calendar
.
setTime
(
date
);
calendar
.
add
(
Calendar
.
MONTH
,
-
1
);
lastTime
=
simpleDateFormat
.
format
(
calendar
.
getTime
());
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
type
,
ChartConstants
.
YEAR_YOY
))
{
SimpleDateFormat
simpleDateFormat
=
null
;
if
(
StringUtils
.
equalsIgnoreCase
(
dateStyle
,
"y_M"
))
{
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM"
);
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
dateStyle
,
"y_M_d"
))
{
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
}
Date
date
=
simpleDateFormat
.
parse
(
cTime
);
calendar
.
setTime
(
date
);
calendar
.
add
(
Calendar
.
YEAR
,
-
1
);
lastTime
=
simpleDateFormat
.
format
(
calendar
.
getTime
());
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
type
,
ChartConstants
.
DAY_MOM
))
{
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Date
date
=
simpleDateFormat
.
parse
(
cTime
);
calendar
.
setTime
(
date
);
calendar
.
add
(
Calendar
.
DAY_OF_MONTH
,
-
1
);
lastTime
=
simpleDateFormat
.
format
(
calendar
.
getTime
());
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
type
,
ChartConstants
.
MONTH_YOY
))
{
SimpleDateFormat
simpleDateFormat
=
null
;
if
(
StringUtils
.
equalsIgnoreCase
(
dateStyle
,
"y_M"
))
{
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM"
);
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
dateStyle
,
"y_M_d"
))
{
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
private
String
calcLastTime
(
String
cTime
,
String
type
,
String
dateStyle
,
String
datePattern
)
{
try
{
String
lastTime
=
null
;
Calendar
calendar
=
Calendar
.
getInstance
();
if
(
StringUtils
.
equalsIgnoreCase
(
type
,
ChartConstants
.
YEAR_MOM
))
{
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy"
);
Date
date
=
simpleDateFormat
.
parse
(
cTime
);
calendar
.
setTime
(
date
);
calendar
.
add
(
Calendar
.
YEAR
,
-
1
);
lastTime
=
simpleDateFormat
.
format
(
calendar
.
getTime
());
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
type
,
ChartConstants
.
MONTH_MOM
))
{
SimpleDateFormat
simpleDateFormat
=
null
;
if
(
StringUtils
.
equalsIgnoreCase
(
datePattern
,
"date_split"
))
{
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy/MM"
);
}
else
{
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM"
);
}
Date
date
=
simpleDateFormat
.
parse
(
cTime
);
calendar
.
setTime
(
date
);
calendar
.
add
(
Calendar
.
MONTH
,
-
1
);
lastTime
=
simpleDateFormat
.
format
(
calendar
.
getTime
());
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
type
,
ChartConstants
.
YEAR_YOY
))
{
SimpleDateFormat
simpleDateFormat
=
null
;
if
(
StringUtils
.
equalsIgnoreCase
(
dateStyle
,
"y_M"
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
datePattern
,
"date_split"
))
{
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy/MM"
);
}
else
{
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM"
);
}
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
dateStyle
,
"y_M_d"
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
datePattern
,
"date_split"
))
{
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy/MM/dd"
);
}
else
{
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
}
}
Date
date
=
simpleDateFormat
.
parse
(
cTime
);
calendar
.
setTime
(
date
);
calendar
.
add
(
Calendar
.
YEAR
,
-
1
);
lastTime
=
simpleDateFormat
.
format
(
calendar
.
getTime
());
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
type
,
ChartConstants
.
DAY_MOM
))
{
SimpleDateFormat
simpleDateFormat
=
null
;
if
(
StringUtils
.
equalsIgnoreCase
(
datePattern
,
"date_split"
))
{
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy/MM/dd"
);
}
else
{
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
}
Date
date
=
simpleDateFormat
.
parse
(
cTime
);
calendar
.
setTime
(
date
);
calendar
.
add
(
Calendar
.
DAY_OF_MONTH
,
-
1
);
lastTime
=
simpleDateFormat
.
format
(
calendar
.
getTime
());
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
type
,
ChartConstants
.
MONTH_YOY
))
{
SimpleDateFormat
simpleDateFormat
=
null
;
if
(
StringUtils
.
equalsIgnoreCase
(
dateStyle
,
"y_M"
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
datePattern
,
"date_split"
))
{
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy/MM"
);
}
else
{
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM"
);
}
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
dateStyle
,
"y_M_d"
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
datePattern
,
"date_split"
))
{
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy/MM/dd"
);
}
else
{
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
}
}
Date
date
=
simpleDateFormat
.
parse
(
cTime
);
calendar
.
setTime
(
date
);
calendar
.
add
(
Calendar
.
MONTH
,
-
1
);
lastTime
=
simpleDateFormat
.
format
(
calendar
.
getTime
());
}
Date
date
=
simpleDateFormat
.
parse
(
cTime
);
calendar
.
setTime
(
date
);
calendar
.
add
(
Calendar
.
MONTH
,
-
1
);
lastTime
=
simpleDateFormat
.
format
(
calendar
.
getTime
());
return
lastTime
;
}
catch
(
Exception
e
)
{
return
cTime
;
}
return
lastTime
;
}
private
boolean
checkDrillExist
(
List
<
ChartViewFieldDTO
>
xAxis
,
List
<
ChartViewFieldDTO
>
extStack
,
ChartViewFieldDTO
dto
,
ChartViewWithBLOBs
view
)
{
...
...
frontend/src/components/canvas/components/Editor/MobileCheckBar.vue
浏览文件 @
46c45315
...
...
@@ -75,6 +75,7 @@ export default {
padding-left
:
1px
;
padding-right
:
1px
;
cursor
:pointer
!
important
;
text-align
:
center
;
background-color
:
#0a7be0
;
}
.bar-main
i
{
...
...
frontend/src/components/canvas/components/Editor/Preview.vue
浏览文件 @
46c45315
...
...
@@ -229,7 +229,6 @@ export default {
},
methods
:
{
_isMobile
()
{
console
.
log
(
'navigator.userAgent:'
+
navigator
.
userAgent
)
const
flag
=
navigator
.
userAgent
.
match
(
/
(
phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone
)
/i
)
this
.
terminal
=
flag
?
'mobile'
:
'pc'
// this.terminal = 'mobile'
...
...
@@ -311,7 +310,7 @@ export default {
}
},
handleMouseDown
()
{
this
.
$store
.
commit
(
'setClickComponentStatus'
,
fals
)
this
.
$store
.
commit
(
'setClickComponentStatus'
,
fals
e
)
},
initMobileCanvas
()
{
this
.
$store
.
commit
(
'openMobileLayout'
)
...
...
frontend/src/components/canvas/components/Editor/PreviewEject.vue
浏览文件 @
46c45315
...
...
@@ -9,6 +9,7 @@ import { uuid } from 'vue-uuid'
import
{
findOne
}
from
'@/api/panel/panel'
import
{
getPanelAllLinkageInfo
}
from
'@/api/panel/linkage'
import
{
queryPanelJumpInfo
,
queryTargetPanelJumpInfo
}
from
'@/api/panel/linkJump'
import
{
panelInit
}
from
'@/components/canvas/utils/utils'
export
default
{
components
:
{
Preview
},
...
...
@@ -43,8 +44,10 @@ export default {
}
// 加载视图数据
findOne
(
this
.
panelId
).
then
(
response
=>
{
const
componentDatas
=
JSON
.
parse
(
response
.
data
.
panelData
)
panelInit
(
componentDatas
)
this
.
dataLoading
=
false
this
.
$store
.
commit
(
'setComponentData'
,
this
.
resetID
(
JSON
.
parse
(
response
.
data
.
panelData
)
))
this
.
$store
.
commit
(
'setComponentData'
,
this
.
resetID
(
componentDatas
))
this
.
$store
.
commit
(
'setCanvasStyle'
,
JSON
.
parse
(
response
.
data
.
panelStyle
))
const
data
=
{
id
:
response
.
data
.
id
,
...
...
frontend/src/components/canvas/components/Toolbar.vue
浏览文件 @
46c45315
...
...
@@ -75,7 +75,6 @@ import { deepCopy, mobile2MainCanvas } from '@/components/canvas/utils/utils'
import
{
panelSave
}
from
'@/api/panel/panel'
import
{
saveLinkage
,
getPanelAllLinkageInfo
}
from
'@/api/panel/linkage'
import
bus
from
'@/utils/bus'
import
{
DEFAULT_COMMON_CANVAS_STYLE_STRING
}
from
'@/views/panel/panel'
...
...
@@ -266,6 +265,12 @@ export default {
panelStyle
:
JSON
.
stringify
(
this
.
canvasStyleData
),
panelData
:
JSON
.
stringify
(
this
.
componentData
)
}
const
components
=
deepCopy
(
this
.
componentData
)
components
.
forEach
(
view
=>
{
if
(
view
.
filters
&&
view
.
filters
.
length
>
0
)
{
view
.
filters
=
[]
}
})
// 无需保存条件
requestInfo
.
panelData
=
JSON
.
stringify
(
components
)
panelSave
(
requestInfo
).
then
(
response
=>
{
this
.
$store
.
commit
(
'refreshSaveStatus'
)
this
.
$message
({
...
...
@@ -376,6 +381,7 @@ export default {
mobileDataObj
[
item
.
id
]
=
item
})
const
sourceComponentData
=
JSON
.
parse
(
this
.
componentDataCache
)
this
.
$store
.
commit
(
'setComponentDataCache'
,
null
)
sourceComponentData
.
forEach
(
item
=>
{
if
(
mobileDataObj
[
item
.
id
])
{
mobile2MainCanvas
(
item
,
mobileDataObj
[
item
.
id
])
...
...
frontend/src/components/canvas/custom-component/UserView.vue
浏览文件 @
46c45315
...
...
@@ -156,7 +156,7 @@ export default {
}
},
editBarViewShowFlag
()
{
return
this
.
active
&&
this
.
inTab
return
this
.
active
&&
this
.
inTab
&&
!
this
.
mobileLayoutStatus
},
charViewShowFlag
()
{
return
this
.
httpRequest
.
status
&&
this
.
chart
.
type
&&
!
this
.
chart
.
type
.
includes
(
'table'
)
&&
!
this
.
chart
.
type
.
includes
(
'text'
)
&&
this
.
renderComponent
()
===
'echarts'
...
...
frontend/src/components/canvas/custom-component/VText.vue
浏览文件 @
46c45315
<
template
>
<div
v-if=
"edit
Mode == 'edit'
"
class=
"v-text"
@
keydown=
"handleKeydown"
@
keyup=
"handleKeyup"
>
<div
v-if=
"edit
Status
"
class=
"v-text"
@
keydown=
"handleKeydown"
@
keyup=
"handleKeyup"
>
<!-- tabindex >= 0 使得双击时聚集该元素 -->
<div
v-if=
"canEdit"
...
...
@@ -15,7 +15,16 @@
@input="handleInput"
v-html="element.propValue"
/>
<div
v-if=
"!canEdit"
:style=
"
{ verticalAlign: element.style.verticalAlign }" @dblclick="setEdit" v-html="element.propValue" />
<div
v-if=
"!canEdit"
:style=
"
{ verticalAlign: element.style.verticalAlign }"
@dblclick="setEdit"
@paste="clearStyle"
@mousedown="handleMousedown"
@blur="handleBlur"
@input="handleInput"
v-html="element.propValue"
/>
</div>
<div
v-else
class=
"v-text"
>
<div
:style=
"
{ verticalAlign: element.style.verticalAlign }" v-html="textInfo" />
...
...
@@ -24,6 +33,7 @@
<
script
>
import
{
keycodes
}
from
'@/components/canvas/utils/shortcutKey.js'
import
{
mapState
}
from
'vuex'
export
default
{
props
:
{
...
...
@@ -56,13 +66,19 @@ export default {
}
},
computed
:
{
editStatus
()
{
return
this
.
editMode
===
'edit'
&&
!
this
.
mobileLayoutStatus
},
textInfo
()
{
if
(
this
.
element
&&
this
.
element
.
hyperlinks
&&
this
.
element
.
hyperlinks
.
enable
)
{
return
"<a title='"
+
this
.
element
.
hyperlinks
.
content
+
"' target='"
+
this
.
element
.
hyperlinks
.
openMode
+
"' href='"
+
this
.
element
.
hyperlinks
.
content
+
"'>"
+
this
.
element
.
propValue
+
'</a>'
}
else
{
return
this
.
element
.
propValue
}
}
},
...
mapState
([
'mobileLayoutStatus'
])
},
watch
:
{
...
...
@@ -75,6 +91,7 @@ export default {
},
methods
:
{
handleInput
(
e
)
{
this
.
$store
.
state
.
styleChangeTimes
++
this
.
$emit
(
'input'
,
this
.
element
,
e
.
target
.
innerHTML
)
this
.
$store
.
commit
(
'recordStyleChange'
)
},
...
...
frontend/src/components/canvas/mobile/PreviewMobile.vue
deleted
100644 → 0
浏览文件 @
4786d23d
<
template
>
<div
v-loading=
"dataLoading"
class=
"bg"
>
<Preview
v-if=
"!dataLoading"
/>
</div>
</
template
>
<
script
>
import
Preview
from
'./Preview'
import
{
uuid
}
from
'vue-uuid'
import
{
findOne
}
from
'@/api/panel/panel'
import
{
getPanelAllLinkageInfo
}
from
'@/api/panel/linkage'
import
{
queryPanelJumpInfo
,
queryTargetPanelJumpInfo
}
from
'@/api/panel/linkJump'
export
default
{
components
:
{
Preview
},
props
:
{
panelId
:
{
type
:
String
,
require
:
true
}
},
data
()
{
return
{
dataLoading
:
false
}
},
mounted
()
{
this
.
restore
()
},
methods
:
{
restore
()
{
this
.
dataLoading
=
true
// 加载视图数据
findOne
(
this
.
panelId
).
then
(
response
=>
{
this
.
dataLoading
=
false
this
.
$store
.
commit
(
'setComponentData'
,
this
.
resetID
(
JSON
.
parse
(
response
.
data
.
panelData
)))
this
.
$store
.
commit
(
'setCanvasStyle'
,
JSON
.
parse
(
response
.
data
.
panelStyle
))
const
data
=
{
id
:
response
.
data
.
id
,
name
:
response
.
data
.
name
}
// 刷新联动信息
getPanelAllLinkageInfo
(
this
.
panelId
).
then
(
rsp
=>
{
this
.
$store
.
commit
(
'setNowPanelTrackInfo'
,
rsp
.
data
)
})
// 刷新跳转信息
queryPanelJumpInfo
(
this
.
panelId
).
then
(
rsp
=>
{
this
.
$store
.
commit
(
'setNowPanelJumpInfo'
,
rsp
.
data
)
})
// 如果含有跳转参数 进行触发
const
tempParam
=
localStorage
.
getItem
(
'jumpInfoParam'
)
if
(
tempParam
)
{
localStorage
.
removeItem
(
'jumpInfoParam'
)
const
jumpParam
=
JSON
.
parse
(
tempParam
)
const
jumpRequestParam
=
{
sourcePanelId
:
jumpParam
.
sourcePanelId
,
sourceViewId
:
jumpParam
.
sourceViewId
,
sourceFieldId
:
jumpParam
.
sourceFieldId
,
targetPanelId
:
this
.
panelId
}
this
.
dataLoading
=
true
// 刷新跳转目标仪表板联动信息
queryTargetPanelJumpInfo
(
jumpRequestParam
).
then
(
rsp
=>
{
this
.
dataLoading
=
false
this
.
$store
.
commit
(
'setNowTargetPanelJumpInfo'
,
rsp
.
data
)
this
.
$store
.
commit
(
'addViewTrackFilter'
,
jumpParam
)
})
}
this
.
$store
.
dispatch
(
'panel/setPanelInfo'
,
data
)
})
},
resetID
(
data
)
{
if
(
data
)
{
data
.
forEach
(
item
=>
{
item
.
type
!==
'custom'
&&
(
item
.
id
=
uuid
.
v1
())
})
}
return
data
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.bg
{
width
:
100%
;
height
:
100vh
!
important
;
min-width
:
800px
;
min-height
:
600px
;
background-color
:
#f7f8fa
;
}
</
style
>
frontend/src/components/canvas/utils/utils.js
浏览文件 @
46c45315
...
...
@@ -60,7 +60,20 @@ export function mobile2MainCanvas(mainSource, mobileSource) {
export
function
panelInit
(
componentDatas
)
{
componentDatas
.
forEach
(
item
=>
{
item
.
filters
=
(
item
.
filters
||
[])
if
(
item
.
component
&&
item
.
component
===
'de-date'
)
{
if
(
item
.
options
.
attrs
&&
!
item
.
options
.
attrs
.
default
)
{
item
.
options
.
attrs
.
default
=
{
isDynamic
:
false
,
dkey
:
0
,
dynamicPrefix
:
1
,
dynamicInfill
:
'day'
,
dynamicSuffix
:
'before'
}
}
}
if
(
item
.
filters
&&
item
.
filters
.
length
>
0
)
{
item
.
filters
=
[]
}
item
.
linkageFilters
=
(
item
.
linkageFilters
||
[])
item
.
auxiliaryMatrix
=
(
item
.
auxiliaryMatrix
||
false
)
item
.
x
=
(
item
.
x
||
1
)
...
...
frontend/src/components/dataease/DeOutWidget.vue
浏览文件 @
46c45315
...
...
@@ -10,10 +10,18 @@
</div>
</div>
</div>
<div
ref=
"deContentContainer"
class=
"condition-content"
:class=
"element.options.attrs.title ? '' : 'condition-content-default'"
>
<div
ref=
"deContentContainer"
class=
"condition-content"
:class=
"element.options.attrs.title ? '' : 'condition-content-default'"
>
<div
class=
"condition-content-container"
>
<div
class=
"first-element"
>
<div
:class=
"element.component === 'de-select-grid' ? 'first-element-grid-contaner': ''"
class=
"first-element-contaner"
>
<div
:class=
"element.component === 'de-select-grid' ? 'first-element-grid-contaner': ''"
class=
"first-element-contaner"
>
<component
:is=
"element.component"
v-if=
"element.type==='custom'"
...
...
@@ -27,6 +35,7 @@
/>
</div>
</div>
</div>
</div>
</div>
...
...
@@ -71,6 +80,7 @@ export default {
sizeInfo
()
{
let
size
if
(
this
.
h
>
this
.
inputMaxSize
)
{
return
size
}
else
if
(
this
.
h
>
this
.
inputLargeSize
)
{
size
=
'medium'
}
else
if
(
this
.
h
>
this
.
inputSmallSize
)
{
...
...
@@ -99,42 +109,61 @@ export default {
const
titleWidth
=
this
.
$refs
.
deTitle
.
offsetWidth
const
deContentContainer
=
this
.
$refs
.
deContentContainer
this
.
$nextTick
(()
=>
{
let
min
=
75
let
min
=
this
.
element
.
style
.
fontSize
*
2
+
50
if
(
this
.
element
.
component
===
'de-number-range'
)
{
min
=
105
min
=
this
.
element
.
style
.
fontSize
*
2
+
80
}
if
(
height
<
min
)
{
// console.log(titleWidth)
this
.
mainClass
=
'condition-main-line'
deContentContainer
&&
(
deContentContainer
.
style
.
inset
=
'0 0 0 '
+
(
titleWidth
+
15
)
+
'px'
)
if
(
deContentContainer
)
{
deContentContainer
.
style
.
top
=
'0px'
deContentContainer
.
style
.
marginLeft
=
(
titleWidth
+
15
)
+
'px'
}
}
else
{
this
.
mainClass
=
''
deContentContainer
&&
(
deContentContainer
.
style
.
inset
=
'33px 0px 0px'
)
if
(
deContentContainer
)
{
deContentContainer
.
style
.
top
=
'2em'
deContentContainer
.
style
.
marginLeft
=
'0px'
}
}
})
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.my-container
{
position
:
absolute
;
overflow
:
auto
;
inset
:
0px
;
top
:
0px
;
right
:
0px
;
bottom
:
0px
;
left
:
0px
;
}
.ccondition-main
{
position
:
absolute
;
overflow
:
auto
;
inset
:
0px
;
top
:
0px
;
right
:
0px
;
bottom
:
0px
;
left
:
0px
;
}
.condition-title
{
inset
:
0
;
top
:
0px
;
right
:
0px
;
bottom
:
0px
;
left
:
0px
;
position
:
absolute
;
height
:
35px
;
height
:
2em
;
cursor
:
-
webkit-grab
;
}
.first-title
{
width
:
100%
;
overflow
:
hidden
;
...
...
@@ -145,10 +174,13 @@ export default {
}
.condition-title-absolute
{
inset
:
0px
0px
;
right
:
0px
;
bottom
:
0px
;
position
:
absolute
;
top
:
15
px
;
top
:
0
px
;
left
:
4px
;
display
:
flex
;
align-items
:
flex-end
;
}
.span-container
{
...
...
@@ -159,10 +191,14 @@ export default {
.condition-content
{
overflow
:
auto
hidden
;
inset
:
33px
0px
0px
;
top
:
2em
;
left
:
0px
;
right
:
0px
;
bottom
:
0px
;
position
:
absolute
;
letter-spacing
:
0px
!
important
;
letter-spacing
:
0px
!
important
;
}
.condition-content-container
{
position
:
relative
;
display
:
table
;
...
...
@@ -170,6 +206,7 @@ export default {
height
:
100%
;
white-space
:
nowrap
;
}
.first-element
{
position
:
relative
;
display
:
table-cell
;
...
...
@@ -178,25 +215,34 @@ export default {
padding
:
0px
;
height
:
100%
;
}
.first-element-contaner
{
width
:
calc
(
100%
-
10px
);
background
:
initial
;
position
:absolute
;
bottom
:
5px
;
margin
:
0
4px
;
div
{
width
:
100%
;
}
width
:
calc
(
100%
-
10px
);
background
:
initial
;
position
:
absolute
;
bottom
:
5px
;
margin
:
0
4px
;
div
{
width
:
100%
;
}
display
:
flex
;
align-items
:
flex-end
;
}
.first-element-grid-contaner
{
background
:
#fff
;
border
:
1px
solid
#d7dae2
;
top
:
5px
;
background
:
#fff
;
border
:
1px
solid
#d7dae2
;
top
:
5px
;
}
.condition-main-line
{
height
:
40px
!
important
;
height
:
40px
!
important
;
}
.condition-content-default
{
inset
:
0px
0px
0px
!
important
;
inset
:
0px
0px
0px
!
important
;
}
</
style
>
frontend/src/components/widget/DeWidget/DeDate.vue
浏览文件 @
46c45315
...
...
@@ -19,9 +19,13 @@
</
template
>
<
script
>
import
{
ApplicationContext
}
from
'@/utils/ApplicationContext'
import
{
timeSection
}
from
'@/utils'
import
bus
from
"@/utils/bus"
;
import
{
ApplicationContext
}
from
'@/utils/ApplicationContext'
import
{
timeSection
}
from
'@/utils'
import
bus
from
'@/utils/bus'
export
default
{
props
:
{
...
...
@@ -92,7 +96,8 @@ export default {
}
},
created
()
{
if
(
this
.
element
.
serviceName
===
'timeDateWidget'
&&
this
.
element
.
options
.
attrs
.
default
&&
this
.
element
.
options
.
attrs
.
default
.
isDynamic
)
{
if
(
this
.
element
.
serviceName
===
'timeDateWidget'
&&
this
.
element
.
options
.
attrs
.
default
&&
this
.
element
.
options
.
attrs
.
default
.
isDynamic
)
{
if
(
this
.
element
.
options
.
attrs
.
default
)
{
const
widget
=
ApplicationContext
.
getService
(
this
.
element
.
serviceName
)
this
.
values
=
widget
.
dynamicDateFormNow
(
this
.
element
)
...
...
@@ -172,15 +177,16 @@ export default {
fillValueDerfault
()
{
const
defaultV
=
this
.
element
.
options
.
value
===
null
?
''
:
this
.
element
.
options
.
value
.
toString
()
if
(
this
.
element
.
options
.
attrs
.
type
===
'daterange'
)
{
if
(
defaultV
===
null
||
typeof
defaultV
===
'undefined'
||
defaultV
===
''
||
defaultV
===
'[object Object]'
)
return
[]
if
(
defaultV
===
null
||
typeof
defaultV
===
'undefined'
||
defaultV
===
''
||
defaultV
===
'[object Object]'
)
{
return
[]
}
return
defaultV
.
split
(
','
).
map
(
item
=>
parseFloat
(
item
))
}
else
{
if
(
defaultV
===
null
||
typeof
defaultV
===
'undefined'
||
defaultV
===
''
||
defaultV
===
'[object Object]'
)
return
null
if
(
defaultV
===
null
||
typeof
defaultV
===
'undefined'
||
defaultV
===
''
||
defaultV
===
'[object Object]'
)
{
return
null
}
return
parseFloat
(
defaultV
.
split
(
','
)[
0
])
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
frontend/src/components/widget/DeWidget/DeSelectGrid.vue
浏览文件 @
46c45315
...
...
@@ -2,12 +2,19 @@
<div
v-if=
"element.options!== null && element.options.attrs!==null && show"
class=
"de-select-grid-class"
>
<div
class=
"de-select-grid-search"
>
<el-input
v-model=
"keyWord"
:placeholder=
"$t('deinputsearch.placeholder')"
:size=
"size"
prefix-icon=
"el-icon-search"
clearable
/>
<el-input
v-model=
"keyWord"
:placeholder=
"$t('deinputsearch.placeholder')"
:size=
"size"
prefix-icon=
"el-icon-search"
clearable
/>
</div>
<div
class=
"list"
>
<div
v-if=
"element.options.attrs.multiple"
class=
"checkbox-group-container"
>
<el-checkbox
v-model=
"checkAll"
:indeterminate=
"isIndeterminate"
@
change=
"handleCheckAllChange"
>
{{
$t
(
'commons.all'
)
}}
</el-checkbox>
<el-checkbox
v-model=
"checkAll"
:indeterminate=
"isIndeterminate"
@
change=
"handleCheckAllChange"
>
{{
$t
(
'commons.all'
)
}}
</el-checkbox>
<el-checkbox-group
v-model=
"value"
@
change=
"handleCheckedChange"
>
<el-checkbox
v-for=
"item in datas"
:key=
"item.id"
:label=
"item.id"
>
{{
item
.
id
}}
</el-checkbox>
...
...
@@ -27,7 +34,9 @@
</
template
>
<
script
>
import
{
multFieldValues
}
from
'@/api/dataset/dataset'
import
{
multFieldValues
}
from
'@/api/dataset/dataset'
export
default
{
props
:
{
...
...
@@ -100,10 +109,10 @@ export default {
if
(
typeof
value
===
'undefined'
||
value
===
old
)
return
this
.
datas
=
[]
this
.
element
.
options
.
attrs
.
fieldId
&&
this
.
element
.
options
.
attrs
.
fieldId
.
length
>
0
&&
multFieldValues
(
this
.
element
.
options
.
attrs
.
fieldId
.
split
(
','
)).
then
(
res
=>
{
this
.
datas
=
this
.
optionDatas
(
res
.
data
)
})
||
(
this
.
element
.
options
.
value
=
''
)
this
.
element
.
options
.
attrs
.
fieldId
.
length
>
0
&&
multFieldValues
(
this
.
element
.
options
.
attrs
.
fieldId
.
split
(
','
)).
then
(
res
=>
{
this
.
datas
=
this
.
optionDatas
(
res
.
data
)
})
||
(
this
.
element
.
options
.
value
=
''
)
},
'element.options.attrs.multiple'
:
function
(
value
,
old
)
{
if
(
typeof
old
===
'undefined'
||
value
===
old
)
return
...
...
@@ -167,10 +176,10 @@ export default {
fillValueDerfault
()
{
const
defaultV
=
this
.
element
.
options
.
value
===
null
?
''
:
this
.
element
.
options
.
value
.
toString
()
if
(
this
.
element
.
options
.
attrs
.
multiple
)
{
if
(
defaultV
===
null
||
typeof
defaultV
===
'undefined'
||
defaultV
===
''
||
defaultV
===
'[object Object]'
)
return
[]
if
(
defaultV
===
null
||
typeof
defaultV
===
'undefined'
||
defaultV
===
''
||
defaultV
===
'[object Object]'
)
{
return
[]
}
return
defaultV
.
split
(
','
)
}
else
{
if
(
defaultV
===
null
||
typeof
defaultV
===
'undefined'
||
defaultV
===
''
||
defaultV
===
'[object Object]'
)
return
null
if
(
defaultV
===
null
||
typeof
defaultV
===
'undefined'
||
defaultV
===
''
||
defaultV
===
'[object Object]'
)
{
return
null
}
return
defaultV
.
split
(
','
)[
0
]
}
},
...
...
@@ -204,41 +213,49 @@ export default {
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.de-select-grid-search
{
>>>
input
{
border-radius
:
0px
;
.de-select-grid-search
{
>>>
input
{
border-radius
:
0px
;
}
}
.de-select-grid-class
{
.list
{
overflow-y
:
auto
;
width
:
100%
;
position
:
absolute
;
top
:
30px
;
bottom
:
0
;
}
.el-input
{
display
:
block
!
important
;
}
}
}
.radio-group-container
>
.el-radio-group
>
label
{
display
:
block
!
important
;
margin
:
10px
!
important
;
}
.de-select-grid-class
{
height
:
100%
;
.checkbox-group-container
{
label
.el-checkbox
{
display
:
block
!
important
;
margin
:
10px
!
important
;
.list
{
overflow-y
:
auto
;
width
:
100%
;
position
:
relative
;
bottom
:
0
;
height
:
calc
(
100%
-
40px
);
}
}
.
el-checkbox-group
>
label
{
.
radio-group-container
>
.el-radio-group
>
label
{
display
:
block
!
important
;
margin
:
10px
!
important
;
}
}
.checkbox-group-container
{
label
.el-checkbox
{
display
:
block
!
important
;
margin
:
10px
!
important
;
}
.el-checkbox-group
>
label
{
display
:
block
!
important
;
margin
:
10px
!
important
;
}
}
</
style
>
frontend/src/components/widget/DeWidget/DeTabs.vue
浏览文件 @
46c45315
...
...
@@ -10,7 +10,7 @@
<span
slot=
"label"
>
<span>
{{
item
.
title
}}
</span>
<el-dropdown
v-if=
"
isEdit
"
slot=
"label"
class=
"de-tab-drop"
trigger=
"click"
@
command=
"handleCommand"
>
<el-dropdown
v-if=
"
dropdownShow
"
slot=
"label"
class=
"de-tab-drop"
trigger=
"click"
@
command=
"handleCommand"
>
<span
class=
"el-dropdown-link"
>
<!--
<span>
{{
item
.
title
}}
</span>
-->
...
...
@@ -135,8 +135,12 @@ export default {
}
},
computed
:
{
dropdownShow
()
{
return
this
.
isEdit
&&
!
this
.
mobileLayoutStatus
},
...
mapState
([
'curComponent'
'curComponent'
,
'mobileLayoutStatus'
])
},
watch
:
{
...
...
frontend/src/components/widget/serviceImpl/TimeDateServiceImpl.js
浏览文件 @
46c45315
...
...
@@ -91,7 +91,7 @@ class TimeDateServiceImpl extends WidgetService {
}
if
(
element
.
options
.
attrs
.
default
.
dkey
===
3
)
{
const
dynamicPrefix
=
element
.
options
.
attrs
.
default
.
dynamicPrefix
const
dynamicPrefix
=
parseInt
(
element
.
options
.
attrs
.
default
.
dynamicPrefix
)
const
dynamicInfill
=
element
.
options
.
attrs
.
default
.
dynamicInfill
const
dynamicSuffix
=
element
.
options
.
attrs
.
default
.
dynamicSuffix
...
...
@@ -130,7 +130,8 @@ class TimeDateServiceImpl extends WidgetService {
const
nowMonth
=
now
.
getMonth
()
const
nowYear
=
now
.
getFullYear
()
const
nowDate
=
now
.
getDate
()
return
new
Date
(
nowYear
-
1
,
nowMonth
,
nowDate
).
getTime
()
return
new
Date
(
dynamicSuffix
===
'before'
?
(
nowYear
-
dynamicPrefix
)
:
(
nowYear
+
dynamicPrefix
),
nowMonth
,
nowDate
).
getTime
()
}
}
}
...
...
frontend/src/store/index.js
浏览文件 @
46c45315
...
...
@@ -348,6 +348,7 @@ const data = {
},
// 启用移动端布局
openMobileLayout
(
state
)
{
state
.
componentDataCache
=
null
state
.
componentDataCache
=
JSON
.
stringify
(
state
.
componentData
)
state
.
pcComponentData
=
state
.
componentData
const
mainComponentData
=
[]
...
...
frontend/src/views/chart/chart/map/map.js
浏览文件 @
46c45315
...
...
@@ -18,7 +18,7 @@ export function baseMapOption(chart_option, chart) {
const
a
=
params
.
seriesName
const
b
=
params
.
name
const
c
=
params
.
value
?
params
.
value
:
''
return
text
.
replace
All
(
'{a}'
,
a
).
replaceAll
(
'{b}'
,
b
).
replaceAll
(
'{c}'
,
c
)
return
text
.
replace
(
new
RegExp
(
'{a}'
,
'g'
),
a
).
replace
(
new
RegExp
(
'{b}'
,
'g'
),
b
).
replace
(
new
RegExp
(
'{c}'
,
'g'
)
,
c
)
}
chart_option
.
tooltip
=
tooltip
}
...
...
@@ -36,7 +36,7 @@ export function baseMapOption(chart_option, chart) {
const
a
=
params
.
seriesName
const
b
=
params
.
name
const
c
=
params
.
value
?
params
.
value
:
''
return
text
.
replace
All
(
'{a}'
,
a
).
replaceAll
(
'{b}'
,
b
).
replaceAll
(
'{c}'
,
c
)
return
text
.
replace
(
new
RegExp
(
'{a}'
,
'g'
),
a
).
replace
(
new
RegExp
(
'{b}'
,
'g'
),
b
).
replace
(
new
RegExp
(
'{c}'
,
'g'
)
,
c
)
}
chart_option
.
series
[
0
].
labelLine
=
customAttr
.
label
.
labelLine
}
...
...
frontend/src/views/chart/components/ChartComponent.vue
浏览文件 @
46c45315
<
template
>
<div
style=
"display: flex;"
>
<view-track-bar
ref=
"viewTrack"
:track-menu=
"trackMenu"
class=
"track-bar"
:style=
"trackBarStyleTime"
@
trackClick=
"trackClick"
/>
<div
style=
"display: flex;position:relative"
>
<view-track-bar
ref=
"viewTrack"
:track-menu=
"trackMenu"
class=
"track-bar"
:style=
"trackBarStyleTime"
@
trackClick=
"trackClick"
/>
<div
:id=
"chartId"
style=
"width: 100%;height: 100%;overflow: hidden;"
:style=
"
{ borderRadius: borderRadius}" />
<div
v-if=
"chart.type === 'map'"
class=
"map-zoom-box"
>
<div
style=
"margin-bottom: 0.5em;"
>
<el-button
size=
"mini"
icon=
"el-icon-plus"
circle
@
click=
"roamMap(true)"
/>
</div>
<div
style=
"margin-bottom: 0.5em;"
>
<el-button
size=
"mini"
icon=
"el-icon-refresh"
circle
@
click=
"resetZoom()"
/>
</div>
<div>
<el-button
size=
"mini"
icon=
"el-icon-minus"
circle
@
click=
"roamMap(false)"
/>
</div>
</div>
</div>
</
template
>
...
...
@@ -19,24 +39,55 @@ import {
BASE_TREEMAP
,
BASE_MIX
}
from
'../chart/chart'
import
{
baseBarOption
,
stackBarOption
,
horizontalBarOption
,
horizontalStackBarOption
}
from
'../chart/bar/bar'
import
{
baseLineOption
,
stackLineOption
}
from
'../chart/line/line'
import
{
basePieOption
,
rosePieOption
}
from
'../chart/pie/pie'
import
{
baseMapOption
}
from
'../chart/map/map'
import
{
baseFunnelOption
}
from
'../chart/funnel/funnel'
import
{
baseRadarOption
}
from
'../chart/radar/radar'
import
{
baseGaugeOption
}
from
'../chart/gauge/gauge'
import
{
baseScatterOption
}
from
'../chart/scatter/scatter'
import
{
baseTreemapOption
}
from
'../chart/treemap/treemap'
import
{
baseMixOption
}
from
'@/views/chart/chart/mix/mix'
// import eventBus from '@/components/canvas/utils/eventBus'
import
{
uuid
}
from
'vue-uuid'
import
{
geoJson
}
from
'@/api/map/map'
import
{
baseBarOption
,
stackBarOption
,
horizontalBarOption
,
horizontalStackBarOption
}
from
'../chart/bar/bar'
import
{
baseLineOption
,
stackLineOption
}
from
'../chart/line/line'
import
{
basePieOption
,
rosePieOption
}
from
'../chart/pie/pie'
import
{
baseMapOption
}
from
'../chart/map/map'
import
{
baseFunnelOption
}
from
'../chart/funnel/funnel'
import
{
baseRadarOption
}
from
'../chart/radar/radar'
import
{
baseGaugeOption
}
from
'../chart/gauge/gauge'
import
{
baseScatterOption
}
from
'../chart/scatter/scatter'
import
{
baseTreemapOption
}
from
'../chart/treemap/treemap'
import
{
baseMixOption
}
from
'@/views/chart/chart/mix/mix'
// import eventBus from '@/components/canvas/utils/eventBus'
import
{
uuid
}
from
'vue-uuid'
import
{
geoJson
}
from
'@/api/map/map'
import
ViewTrackBar
from
'@/components/canvas/components/Editor/ViewTrackBar'
export
default
{
name
:
'ChartComponent'
,
components
:
{
ViewTrackBar
},
components
:
{
ViewTrackBar
},
props
:
{
chart
:
{
type
:
Object
,
...
...
@@ -110,7 +161,9 @@ export default {
// 基于准备好的dom,初始化echarts实例
// 渲染echart等待dom加载完毕,渲染之前先尝试销毁具有相同id的echart 放置多次切换仪表板有重复id情况
const
that
=
this
new
Promise
((
resolve
)
=>
{
resolve
()
}).
then
(()
=>
{
new
Promise
((
resolve
)
=>
{
resolve
()
}).
then
(()
=>
{
// 此dom为echarts图标展示dom
this
.
myChart
=
this
.
$echarts
.
getInstanceByDom
(
document
.
getElementById
(
this
.
chartId
))
if
(
!
this
.
myChart
)
{
...
...
@@ -171,7 +224,10 @@ export default {
if
(
chart
.
type
===
'map'
)
{
const
customAttr
=
JSON
.
parse
(
chart
.
customAttr
)
if
(
!
customAttr
.
areaCode
)
return
if
(
!
customAttr
.
areaCode
)
{
this
.
myChart
.
clear
()
return
}
const
cCode
=
this
.
dynamicAreaCode
||
customAttr
.
areaCode
if
(
this
.
$store
.
getters
.
geoMap
[
cCode
])
{
const
json
=
this
.
$store
.
getters
.
geoMap
[
cCode
]
...
...
@@ -193,25 +249,25 @@ export default {
},
registerDynamicMap
(
areaCode
)
{
this
.
dynamicAreaCode
=
areaCode
// if (this.$store.getters.geoMap[areaCode]) {
// const json = this.$store.getters.geoMap[areaCode]
// this.myChart.dispose()
// this.myChart = this.$echarts.getInstanceByDom(document.getElementById(this.chartId))
// this.$echarts.registerMap('MAP', json)
// return
// }
// geoJson(areaCode).then(res => {
// this.$store.dispatch('map/setGeo', {
// key: areaCode,
// value: res
// }).then(() => {
// this.myChart.dispose()
// this.myChart = this.$echarts.getInstanceByDom(document.getElementById(this.chartId))
// this.$echarts.registerMap('MAP', res)
// })
// }).catch(() => {
// this.downOrUp = true
// })
// if (this.$store.getters.geoMap[areaCode]) {
// const json = this.$store.getters.geoMap[areaCode]
// this.myChart.dispose()
// this.myChart = this.$echarts.getInstanceByDom(document.getElementById(this.chartId))
// this.$echarts.registerMap('MAP', json)
// return
// }
// geoJson(areaCode).then(res => {
// this.$store.dispatch('map/setGeo', {
// key: areaCode,
// value: res
// }).then(() => {
// this.myChart.dispose()
// this.myChart = this.$echarts.getInstanceByDom(document.getElementById(this.chartId))
// this.$echarts.registerMap('MAP', res)
// })
// }).catch(() => {
// this.downOrUp = true
// })
},
initMapChart
(
geoJson
,
chart
)
{
...
...
@@ -284,11 +340,39 @@ export default {
default
:
break
}
},
roamMap
(
flag
)
{
let
targetZoom
=
1
const
zoom
=
this
.
myChart
.
getOption
().
series
[
0
].
zoom
if
(
flag
)
{
targetZoom
=
zoom
*
1.2
}
else
{
targetZoom
=
zoom
/
1.2
}
const
options
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
myChart
.
getOption
()))
options
.
series
[
0
].
zoom
=
targetZoom
this
.
myChart
.
setOption
(
options
)
},
resetZoom
()
{
const
options
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
myChart
.
getOption
()))
options
.
series
[
0
].
zoom
=
1
this
.
myChart
.
setOption
(
options
)
}
}
}
</
script
>
<
style
scoped
>
.map-zoom-box
{
position
:
absolute
;
z-index
:
999
;
left
:
2%
;
bottom
:
30px
;
box-shadow
:
0
2px
12px
0
rgba
(
0
,
0
,
0
,
0.1
);
text-align
:
center
;
padding
:
2px
;
border-radius
:
5px
}
</
style
>
frontend/src/views/chart/components/filter/QuotaFilterEditor.vue
浏览文件 @
46c45315
...
...
@@ -3,6 +3,7 @@
<div
style=
"display: inline-block;"
>
<el-button
icon=
"el-icon-plus"
circle
size=
"mini"
style=
"margin-bottom: 10px;"
@
click=
"addFilter"
/>
<el-radio-group
v-show=
"item.filter && item.filter.length > 1"
v-model=
"logic"
size=
"mini"
style=
"margin-left: 10px;"
...
...
frontend/src/views/panel/AssistComponent/index.vue
浏览文件 @
46c45315
...
...
@@ -339,7 +339,8 @@ export default {
white-space
:
pre
;
text-overflow
:
ellipsis
;
position
:
absolute
;
inset
:
0px
0px
0px
40px
;
/* inset: 0px 0px 0px 40px; */
margin-left
:
40px
;
box-sizing
:
border-box
;
overflow
:
hidden
;
overflow-x
:
hidden
;
...
...
frontend/src/views/panel/edit/ComponentWait.vue
浏览文件 @
46c45315
...
...
@@ -81,6 +81,7 @@ export default {
.component-wait-main
{
width
:
100%
;
height
:
calc
(
100%
-
30px
);
text-align
:
left
;
overflow-y
:
auto
;
}
.component-custom
{
...
...
frontend/src/views/panel/edit/ComponentWaitItem.vue
浏览文件 @
46c45315
...
...
@@ -70,7 +70,7 @@ export default {
componentItemStyle
()
{
return
{
padding
:
'5px'
,
display
:
'inline-block
'
,
float
:
'left
'
,
width
:
'33%'
}
},
...
...
frontend/src/views/panel/edit/index.vue
浏览文件 @
46c45315
...
...
@@ -37,35 +37,31 @@
</div>
<!-- 视图图表 end -->
<!-- 过滤组件 start -->
<div
tabindex=
"-1"
style=
"position: relative; margin: 16px auto"
>
<div
style=
"height: 60px; position: relative"
>
<div
class=
"button-div-class"
style=
" text-align: center;line-height: 1;position: absolute;inset: 0px 0px 45px; "
>
<el-button
circle
:class=
"show&&showIndex===1? 'button-show':'button-closed'"
class=
"el-icon-s-tools"
size=
"mini"
@
click=
"showPanel(1)"
/>
</div>
<div
class=
"button-text"
style=
" position: absolute;left: 0px;right: 0px;bottom: 10px; height: 16px;"
>
<div
style=
" max-width: 100%;text-align: center;white-space: nowrap;text-overflow: ellipsis;position: relative;flex-shrink: 0;"
>
{{
$t
(
'panel.module'
)
}}
</div>
</div>
<div
class=
"button-div-class"
style=
" width: 24px;height: 24px;text-align: center;line-height: 1;position: relative;margin: 16px auto 0px; "
>
<el-button
circle
:class=
"show&&showIndex===1? 'button-show':'button-closed'"
class=
"el-icon-s-tools"
size=
"mini"
@
click=
"showPanel(1)"
/>
</div>
<div
class=
"button-text"
style=
" position: relative; margin: 18px auto 16px;"
>
<div
style=
" max-width: 100%;text-align: center;white-space: nowrap;text-overflow: ellipsis;position: relative;flex-shrink: 0;"
>
{{
$t
(
'panel.module'
)
}}
</div>
</div>
<div
style=
"height: 1px; position: relative; margin: 0px auto;background-color:#E6E6E6;"
>
<div
style=
"width: 60px;height: 1px;line-height: 1px;text-align: center;white-space: pre;text-overflow: ellipsis;position: relative;flex-shrink: 0;"
/>
</div>
<!-- 过滤组件 end -->
<!-- 其他组件 start -->
<div
tabindex=
"-1"
style=
"position: relative; margin: 16px auto"
>
<div
style=
"height: 60px; position: relative"
>
<div
class=
"button-div-class"
style=
" text-align: center;line-height: 1;position: absolute;inset: 0px 0px 45px; "
>
<el-button
circle
:class=
"show&&showIndex===3? 'button-show':'button-closed'"
class=
"el-icon-brush"
size=
"mini"
@
click=
"showPanel(3)"
/>
</div>
<div
class=
"button-text"
style=
" position: absolute;left: 0px;right: 0px;bottom: 10px; height: 16px;"
>
<div
style=
" max-width: 100%;text-align: center;white-space: nowrap;text-overflow: ellipsis;position: relative;flex-shrink: 0;"
>
{{
$t
(
'panel.other_module'
)
}}
</div>
</div>
<div
class=
"button-div-class"
style=
" width: 24px;height: 24px;text-align: center;line-height: 1;position: relative;margin: 16px auto 0px; "
>
<el-button
circle
:class=
"show&&showIndex===3? 'button-show':'button-closed'"
class=
"el-icon-brush"
size=
"mini"
@
click=
"showPanel(3)"
/>
</div>
<div
class=
"button-text"
style=
" position: relative; margin: 18px auto 16px;"
>
<div
style=
" max-width: 100%;text-align: center;white-space: nowrap;text-overflow: ellipsis;position: relative;flex-shrink: 0;"
>
{{
$t
(
'panel.other_module'
)
}}
</div>
</div>
<div
style=
"height: 1px; position: relative; margin: 0px auto;background-color:#E6E6E6;"
>
<div
style=
"width: 60px;height: 1px;line-height: 1px;text-align: center;white-space: pre;text-overflow: ellipsis;position: relative;flex-shrink: 0;"
/>
</div>
...
...
frontend/src/views/panel/filter/defaultValue/DeDateDefault.vue
浏览文件 @
46c45315
...
...
@@ -98,6 +98,10 @@ export default {
},
dynamicPrefixChange
(
value
)
{
if
(
value
<
1
)
{
value
=
1
this
.
element
.
options
.
attrs
.
default
.
dynamicPrefix
=
1
}
this
.
setDval
()
},
dynamicInfillChange
(
value
)
{
...
...
frontend/src/views/panel/filter/index.vue
浏览文件 @
46c45315
...
...
@@ -272,7 +272,8 @@ export default {
white-space
:
pre
;
text-overflow
:
ellipsis
;
position
:
absolute
;
inset
:
0px
0px
0px
40px
;
/* inset: 0px 0px 0px 40px; */
margin-left
:
40px
;
box-sizing
:
border-box
;
overflow
:
hidden
;
overflow-x
:
hidden
;
...
...
frontend/src/views/panel/list/PanelList.vue
浏览文件 @
46c45315
...
...
@@ -645,6 +645,8 @@ export default {
this
.
lastActiveNodeData
=
data
this
.
activeTree
=
data
.
panelType
if
(
data
.
nodeType
===
'panel'
)
{
// 清理pc布局缓存
this
.
$store
.
commit
(
'setComponentDataCache'
,
null
)
// 加载视图数据
findOne
(
data
.
id
).
then
(
response
=>
{
const
componentDatas
=
JSON
.
parse
(
response
.
data
.
panelData
)
...
...
frontend/src/views/panel/list/PanelViewShow.vue
浏览文件 @
46c45315
...
...
@@ -130,13 +130,11 @@ import { starStatus, saveEnshrine, deleteEnshrine } from '@/api/panel/enshrine'
import
bus
from
'@/utils/bus'
import
{
queryAll
}
from
'@/api/panel/pdfTemplate'
import
ShareHead
from
'@/views/panel/GrantAuth/ShareHead'
import
JsPDF
from
'jspdf'
export
default
{
name
:
'PanelViewShow'
,
components
:
{
Preview
,
SaveToTemplate
,
PDFPreExport
,
ShareHead
},
props
:
{
// eslint-disable-next-line vue/require-default-prop
activeTab
:
{
type
:
String
,
required
:
false
...
...
@@ -208,7 +206,6 @@ export default {
bus
.
$on
(
'set-panel-show-type'
,
type
=>
{
this
.
showType
=
type
||
0
})
this
.
initPdfTemplate
()
},
methods
:
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论