Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
ba34aef5
提交
ba34aef5
authored
4月 08, 2021
作者:
taojinlong
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'main' of github.com:dataease/dataease into main
上级
00568398
8d61299f
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
29 个修改的文件
包含
740 行增加
和
346 行删除
+740
-346
ChartViewService.java
...main/java/io/dataease/service/chart/ChartViewService.java
+2
-3
package.json
frontend/package.json
+1
-0
index.vue
frontend/src/components/DragItem/index.vue
+93
-0
Preview.vue
frontend/src/components/canvas/components/Editor/Preview.vue
+86
-26
PreviewEject.vue
.../src/components/canvas/components/Editor/PreviewEject.vue
+17
-5
DeAsideContainer.vue
frontend/src/components/dataease/DeAsideContainer.vue
+5
-1
TimeYearServiceImpl.js
.../src/components/widget/serviceImpl/TimeYearServiceImpl.js
+6
-0
pie-rose.svg
frontend/src/icons/svg/pie-rose.svg
+1
-0
zh.js
frontend/src/lang/zh.js
+9
-2
index.scss
frontend/src/styles/index.scss
+28
-1
variables.scss
frontend/src/styles/variables.scss
+1
-1
chart.js
frontend/src/views/chart/chart/chart.js
+2
-0
pie.js
frontend/src/views/chart/chart/pie/pie.js
+15
-0
ChartComponent.vue
frontend/src/views/chart/components/ChartComponent.vue
+3
-1
SizeSelector.vue
...nd/src/views/chart/components/shape-attr/SizeSelector.vue
+12
-0
ChartEdit.vue
frontend/src/views/chart/view/ChartEdit.vue
+8
-1
AddCustom.vue
frontend/src/views/dataset/add/AddCustom.vue
+144
-0
AddExcel.vue
frontend/src/views/dataset/add/AddExcel.vue
+195
-0
Group.vue
frontend/src/views/dataset/group/Group.vue
+2
-2
index.vue
frontend/src/views/dataset/index.vue
+9
-1
index.vue
frontend/src/views/panel/edit/index.vue
+51
-13
filterDialog.vue
frontend/src/views/panel/filter/filterDialog.vue
+0
-0
index.vue
frontend/src/views/panel/filter/index.vue
+0
-19
index-back.vue
frontend/src/views/panel/index-back.vue
+0
-85
index.vue
frontend/src/views/panel/index.vue
+2
-2
ChartViewEdit.vue
frontend/src/views/panel/list/ChartViewEdit.vue
+0
-156
PanelList.vue
frontend/src/views/panel/list/PanelList.vue
+4
-2
PanelMain.vue
frontend/src/views/panel/list/PanelMain.vue
+2
-1
PanelViewShow.vue
frontend/src/views/panel/list/PanelViewShow.vue
+42
-24
没有找到文件。
backend/src/main/java/io/dataease/service/chart/ChartViewService.java
浏览文件 @
ba34aef5
...
...
@@ -123,7 +123,7 @@ public class ChartViewService {
}
else
if
(
table
.
getMode
()
==
1
)
{
// 抽取
DataTableInfoDTO
dataTableInfoDTO
=
new
Gson
().
fromJson
(
table
.
getInfo
(),
DataTableInfoDTO
.
class
);
String
tableName
=
dataTableInfoDTO
.
getTable
()
+
"-"
+
table
.
getDataSourceId
();
// todo hBase table name maybe change
data
=
sparkCalc
.
getData
(
tableName
,
xAxis
,
yAxis
,
view
.
getId
().
split
(
"-"
)[
0
]);
data
=
sparkCalc
.
getData
(
tableName
,
xAxis
,
yAxis
,
"tmp_"
+
view
.
getId
().
split
(
"-"
)[
0
]);
}
// 图表组件可再扩展
...
...
@@ -136,7 +136,6 @@ public class ChartViewService {
}
for
(
String
[]
d
:
data
)
{
StringBuilder
a
=
new
StringBuilder
();
BigDecimal
b
=
new
BigDecimal
(
"0"
);
for
(
int
i
=
0
;
i
<
xAxis
.
size
();
i
++)
{
if
(
i
==
xAxis
.
size
()
-
1
)
{
a
.
append
(
d
[
i
]);
...
...
@@ -147,7 +146,7 @@ public class ChartViewService {
x
.
add
(
a
.
toString
());
for
(
int
i
=
xAxis
.
size
();
i
<
xAxis
.
size
()
+
yAxis
.
size
();
i
++)
{
int
j
=
i
-
xAxis
.
size
();
series
.
get
(
j
).
getData
().
add
(
new
BigDecimal
(
d
[
i
]));
series
.
get
(
j
).
getData
().
add
(
new
BigDecimal
(
StringUtils
.
isEmpty
(
d
[
i
])
?
"0"
:
d
[
i
]));
}
}
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
...
...
frontend/package.json
浏览文件 @
ba34aef5
...
...
@@ -18,6 +18,7 @@
"@riophae/vue-treeselect"
:
"0.4.0"
,
"axios"
:
"^0.21.1"
,
"echarts"
:
"^5.0.2"
,
"element-resize-detector"
:
"^1.2.2"
,
"element-ui"
:
"2.13.0"
,
"fit2cloud-ui"
:
"^0.1.12"
,
"js-cookie"
:
"2.2.0"
,
...
...
frontend/src/components/DragItem/index.vue
0 → 100644
浏览文件 @
ba34aef5
<
template
>
<span>
<el-dropdown
trigger=
"click"
size=
"mini"
@
command=
"clickItem"
>
<span
class=
"el-dropdown-link"
>
<el-tag
size=
"small"
class=
"item-axis"
>
{{
item
.
name
}}
<i
class=
"el-icon-arrow-down el-icon--right"
/>
</el-tag>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
icon=
"el-icon-delete"
divided
:command=
"beforeClickItem('remove')"
>
<span>
{{
$t
(
'chart.delete'
)
}}
</span>
</el-dropdown-item>
<slot
/>
</el-dropdown-menu>
</span>
</el-dropdown>
</span>
</
template
>
<
script
>
export
default
{
name
:
'DragItem'
,
props
:
{
item
:
{
type
:
Object
,
required
:
true
},
index
:
{
type
:
Number
,
required
:
true
}
},
data
()
{
return
{
}
},
mounted
()
{
},
methods
:
{
clickItem
(
param
)
{
if
(
!
param
)
{
return
}
switch
(
param
.
type
)
{
case
'rename'
:
this
.
showRename
()
break
case
'remove'
:
this
.
removeItem
()
break
default
:
break
}
},
beforeClickItem
(
type
)
{
return
{
type
:
type
}
},
showRename
()
{
this
.
item
.
index
=
this
.
index
this
.
item
.
renameType
=
'dimension'
this
.
$emit
(
'onNameEdit'
,
this
.
item
)
},
removeItem
()
{
this
.
item
.
index
=
this
.
index
this
.
$emit
(
'closeItem'
,
this
.
item
)
}
}
}
</
script
>
<
style
scoped
>
.item-axis
{
padding
:
1px
6px
;
margin
:
0
3px
2px
3px
;
text-align
:
left
;
height
:
24px
;
line-height
:
22px
;
display
:
inline-block
;
border-radius
:
4px
;
box-sizing
:
border-box
;
white-space
:
nowrap
;
}
.item-axis
:hover
{
background-color
:
#fdfdfd
;
cursor
:
pointer
;
}
span
{
font-size
:
12px
;
}
</
style
>
frontend/src/components/canvas/components/Editor/Preview.vue
浏览文件 @
ba34aef5
<
template
>
<div
class=
"bg"
>
<div
id=
"preview-parent"
class=
"canvas-container"
>
<div
class=
"canvas"
:style=
"
{
width: changeStyleWithScale(canvasStyleData.width) + 'px',
height: changeStyleWithScale(canvasStyleData.height) + 'px',
}"
>
<ComponentWrapper
v-for=
"(item, index) in componentData"
:key=
"index"
:config=
"item"
/>
</div>
</div>
<div
id=
"canvasInfo"
class=
"bg"
>
<ComponentWrapper
v-for=
"(item, index) in componentDataInfo"
:key=
"index"
:config=
"item"
/>
</div>
</
template
>
...
...
@@ -23,6 +13,10 @@ import { getStyle } from '@/components/canvas/utils/style'
import
{
mapState
}
from
'vuex'
import
ComponentWrapper
from
'./ComponentWrapper'
import
{
changeStyleWithScale
}
from
'@/components/canvas/utils/translate'
import
{
uuid
}
from
'vue-uuid'
import
{
deepCopy
}
from
'@/components/canvas/utils/utils'
import
eventBus
from
'@/components/canvas/utils/eventBus'
import
elementResizeDetectorMaker
from
'element-resize-detector'
export
default
{
components
:
{
ComponentWrapper
},
...
...
@@ -36,20 +30,84 @@ export default {
default
:
false
}
},
computed
:
mapState
([
'componentData'
,
'canvasStyleData'
]),
data
()
{
return
{
isShowPreview
:
false
,
panelId
:
''
,
needToChangeHeight
:
[
'top'
,
'height'
,
'fontSize'
,
'borderWidth'
],
needToChangeWidth
:
[
'left'
,
'width'
],
scaleWidth
:
'100'
,
scaleHeight
:
'100'
,
timer
:
null
,
componentDataShow
:
[]
}
},
computed
:
{
// 此处单独计算componentData的值 不放入全局mapState中
componentDataInfo
()
{
return
this
.
componentDataShow
},
...
mapState
([
'componentData'
,
'canvasStyleData'
])
},
mounted
()
{
// 计算组件当前合适宽度
debugger
const
_this
=
this
const
erd
=
elementResizeDetectorMaker
()
// 监听div变动事件
erd
.
listenTo
(
document
.
getElementById
(
'canvasInfo'
),
element
=>
{
_this
.
$nextTick
(()
=>
{
_this
.
restore
()
})
})
// 监听数据变动事件
eventBus
.
$on
(
'componentDataChange'
,
()
=>
{
_this
.
restore
()
})
},
methods
:
{
changeStyleWithScale
,
getStyle
,
close
()
{
this
.
$emit
(
'change'
,
false
)
restore
()
{
const
canvasHeight
=
document
.
getElementById
(
'canvasInfo'
).
offsetHeight
const
canvasWidth
=
document
.
getElementById
(
'canvasInfo'
).
offsetWidth
this
.
scaleWidth
=
canvasWidth
*
100
/
parseInt
(
this
.
canvasStyleData
.
width
)
// 获取宽度比
this
.
scaleHeight
=
canvasHeight
*
100
/
parseInt
(
this
.
canvasStyleData
.
height
)
// 获取高度比
this
.
handleScaleChange
()
},
resetID
(
data
)
{
data
.
forEach
(
item
=>
{
item
.
id
=
uuid
.
v1
()
})
return
data
},
format
(
value
,
scale
)
{
return
value
*
parseInt
(
scale
)
/
100
},
handleScaleChange
()
{
const
componentData
=
deepCopy
(
this
.
componentData
)
componentData
.
forEach
(
component
=>
{
Object
.
keys
(
component
.
style
).
forEach
(
key
=>
{
if
(
this
.
needToChangeHeight
.
includes
(
key
))
{
component
.
style
[
key
]
=
this
.
format
(
component
.
style
[
key
],
this
.
scaleHeight
)
}
if
(
this
.
needToChangeWidth
.
includes
(
key
))
{
component
.
style
[
key
]
=
this
.
format
(
component
.
style
[
key
],
this
.
scaleWidth
)
}
})
})
this
.
componentDataShow
=
componentData
eventBus
.
$emit
(
'resizing'
,
''
)
}
}
}
...
...
@@ -57,12 +115,14 @@ export default {
<
style
lang=
"scss"
scoped
>
.bg
{
min-width
:
600px
;
min-height
:
300px
;
width
:
100%
;
height
:
100%
;
border
:
1px
solid
#E6E6E6
;
.canvas-container
{
width
:
100%
;
height
:
100%
;
overflow
:
auto
;
.canvas
{
position
:
relative
;
margin
:
auto
;
...
...
frontend/src/components/canvas/components/Editor/PreviewEject.vue
浏览文件 @
ba34aef5
<
template
>
<div
ref=
"element
"
class=
"bg"
>
<div
id=
"canvasInfo
"
class=
"bg"
>
<ComponentWrapper
v-for=
"(item, index) in componentDataInfo"
:key=
"index"
...
...
@@ -10,12 +10,12 @@
<
script
>
import
{
getStyle
}
from
'@/components/canvas/utils/style'
import
{
mapState
}
from
'vuex'
import
ComponentWrapper
from
'./ComponentWrapper'
import
{
changeStyleWithScale
}
from
'@/components/canvas/utils/translate'
import
{
uuid
}
from
'vue-uuid'
import
{
deepCopy
}
from
'@/components/canvas/utils/utils'
import
eventBus
from
'@/components/canvas/utils/eventBus'
import
elementResizeDetectorMaker
from
'element-resize-detector'
import
{
get
}
from
'@/api/panel/panel'
export
default
{
...
...
@@ -47,6 +47,7 @@ export default {
scaleWidth
:
'100'
,
scaleHeight
:
'100'
,
timer
:
null
,
componentDataSource
:
{},
componentData
:
{},
canvasStyleData
:
{}
...
...
@@ -58,8 +59,17 @@ export default {
}
},
mounted
()
{
const
_this
=
this
// 加载数据
this
.
restore
()
_this
.
restore
()
const
erd
=
elementResizeDetectorMaker
()
// 监听div变动事件
erd
.
listenTo
(
document
.
getElementById
(
'canvasInfo'
),
element
=>
{
_this
.
$nextTick
(()
=>
{
_this
.
resize
()
})
})
window
.
onresize
=
()
=>
{
debugger
this
.
resize
()
...
...
@@ -82,7 +92,7 @@ export default {
this
.
panelId
=
this
.
$route
.
path
.
split
(
'/'
)[
2
]
// 加载视图数据
get
(
'panel/group/findOne/'
+
this
.
panelId
).
then
(
response
=>
{
this
.
componentData
=
this
.
resetID
(
JSON
.
parse
(
response
.
data
.
panelData
))
this
.
componentData
Source
=
this
.
resetID
(
JSON
.
parse
(
response
.
data
.
panelData
))
this
.
canvasStyleData
=
JSON
.
parse
(
response
.
data
.
panelStyle
)
this
.
resize
()
})
...
...
@@ -98,7 +108,7 @@ export default {
return
value
*
parseInt
(
scale
)
/
100
},
handleScaleChange
()
{
const
componentData
=
deepCopy
(
this
.
componentData
)
const
componentData
=
deepCopy
(
this
.
componentData
Source
)
componentData
.
forEach
(
component
=>
{
Object
.
keys
(
component
.
style
).
forEach
(
key
=>
{
if
(
this
.
needToChangeHeight
.
includes
(
key
))
{
...
...
@@ -118,6 +128,8 @@ export default {
<
style
lang=
"scss"
scoped
>
.bg
{
min-width
:
800px
;
min-height
:
600px
;
width
:
100%
;
height
:
100%
;
overflow
:
auto
;
...
...
frontend/src/components/dataease/DeAsideContainer.vue
浏览文件 @
ba34aef5
...
...
@@ -9,7 +9,7 @@
<!--
<i
v-if=
"asideHidden"
class=
"el-icon-arrow-right"
/>
-->
<!--
</div>
-->
<slot
/>
<de-horizontal-drag-bar
/>
<de-horizontal-drag-bar
v-if=
"showDragBar"
/>
</el-aside>
</
template
>
...
...
@@ -26,6 +26,10 @@ export default {
enableAsideHidden
:
{
type
:
Boolean
,
default
:
true
},
showDragBar
:
{
type
:
Boolean
,
default
:
true
}
},
data
()
{
...
...
frontend/src/components/widget/serviceImpl/TimeYearServiceImpl.js
浏览文件 @
ba34aef5
...
...
@@ -42,6 +42,12 @@ class TimeYearServiceImpl extends WidgetService {
beforeToDraw
()
{
}
filterFieldMethod
(
fields
)
{
return
fields
.
filter
(
field
=>
{
return
field
[
'deType'
]
===
1
})
}
}
const
timeYearServiceImpl
=
new
TimeYearServiceImpl
({
name
:
'timeYearWidget'
})
export
default
timeYearServiceImpl
frontend/src/icons/svg/pie-rose.svg
0 → 100644
浏览文件 @
ba34aef5
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
t=
"1617857636853"
class=
"icon"
viewBox=
"0 0 1024 1024"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
p-id=
"859"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
width=
"200"
height=
"200"
><defs><style
type=
"text/css"
></style></defs><path
d=
"M172.860952 769.462857c55.832381 66.072381 132.291048 92.769524 208.725334 88.064l4.412952-251.562667c-10.288762-4.705524-24.990476-4.705524-35.279238-15.725714L172.860952 769.487238z m239.616-404.041143l-5.90019-169.813333c-55.832381 0-97.01181 15.725714-142.57981 59.733333l76.434286 136.801524c24.990476-15.725714 45.592381-26.721524 72.045714-26.721524z m122.002286 125.781334h357.229714c0-273.554286-199.92381-490.544762-449.828571-490.544762v371.053714c47.030857 4.705524 92.598857 59.733333 92.598857 119.466667z m-5.875809 22.016c-4.412952 26.721524-24.990476 55.02781-45.592381 77.043809l361.642666 386.755048C951.978667 862.232381 1024 698.733714 1024 517.924571H528.579048v-4.705523z m-111.713524 97.475047h-4.412953V997.424762c111.713524-4.705524 219.014095-55.02781 301.348572-125.781333L463.920762 604.40381c-16.164571 6.290286-30.866286 6.290286-47.055238 6.290285z m-224.914286-92.769524c0 55.02781 20.577524 92.769524 51.44381 130.486858l91.136-77.04381c-14.701714-15.701333-24.990476-33.01181-30.866286-59.733333l-111.713524 6.290285z m113.176381-33.011809c0-33.01181 14.701714-55.02781 30.866286-77.04381L172.860952 186.197333C90.526476 245.930667 39.082667 338.70019 24.380952 447.146667l280.771048 37.741714c0 6.290286 0 0 0 0z"
p-id=
"860"
></path></svg>
frontend/src/lang/zh.js
浏览文件 @
ba34aef5
...
...
@@ -693,7 +693,11 @@ export default {
filter_null
:
'为空'
,
filter_not_null
:
'不为空'
,
filter_include
:
'包含'
,
filter_not_include
:
'不包含'
filter_not_include
:
'不包含'
,
rose_type
:
'玫瑰图模式'
,
radius_mode
:
'半径'
,
area_mode
:
'面积'
,
rose_radius
:
'圆角'
},
dataset
:
{
datalist
:
'数据集'
,
...
...
@@ -770,7 +774,10 @@ export default {
current_update_time
:
'当前更新时间'
,
param
:
'参数'
,
edit_sql
:
'编辑SQL'
,
showRow
:
'显示行'
showRow
:
'显示行'
,
add_excel_table
:
'添加Excel数据集'
,
add_custom_table
:
'添加自助数据集'
,
upload_file
:
'上传文件'
},
datasource
:
{
create
:
'新建数据连接'
,
...
...
frontend/src/styles/index.scss
浏览文件 @
ba34aef5
...
...
@@ -88,7 +88,7 @@ div:focus {
.de-filter-dialog
{
min-width
:
500px
!
important
;
width
:
50%
!
important
;
.el-dialog__header
{
background-color
:
#f4f4f5
;
padding
:
10px
20px
!
important
;
...
...
@@ -144,3 +144,30 @@ div:focus {
border
:
none
!
important
;
}
}
.de-filter-data-table
{
.el-table__body-wrapper
>
table
>
{
tbody
{
.el-table__row
{
:hover
{
cursor
:
pointer
;
}
td
{
border
:
none
!
important
;
}
}
}
}
}
.
de-filter-data-table
:
:
before
{
height
:
0px
!
important
;
}
.custom-component-class
{
width
:
100%
;
div
{
width
:
100%
!
important
;
}
}
frontend/src/styles/variables.scss
浏览文件 @
ba34aef5
...
...
@@ -42,7 +42,7 @@ $subMenuHover:#1682e6;
$sideBarWidth
:
210px
;
$topBarHeight
:
56px
;
$contentHeight
:
calc
(
100vh
-
56px
)
;
$contentHeight
:
100vh
;
// the :export directive is the magic sauce for webpack
// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
...
...
frontend/src/views/chart/chart/chart.js
浏览文件 @
ba34aef5
...
...
@@ -15,6 +15,8 @@ export const DEFAULT_SIZE = {
lineArea
:
false
,
pieInnerRadius
:
0
,
pieOuterRadius
:
60
,
pieRoseType
:
'radius'
,
pieRoseRadius
:
5
,
funnelWidth
:
80
,
radarShape
:
'polygon'
}
...
...
frontend/src/views/chart/chart/pie/pie.js
浏览文件 @
ba34aef5
...
...
@@ -50,3 +50,18 @@ export function basePieOption(chart_option, chart) {
return
chart_option
}
export
function
rosePieOption
(
chart_option
,
chart
)
{
basePieOption
(
chart_option
,
chart
)
let
customAttr
=
{}
if
(
chart
.
customAttr
)
{
customAttr
=
JSON
.
parse
(
chart
.
customAttr
)
if
(
customAttr
.
size
)
{
chart_option
.
series
[
0
].
roseType
=
customAttr
.
size
.
pieRoseType
chart_option
.
series
[
0
].
itemStyle
=
{
borderRadius
:
customAttr
.
size
.
pieRoseRadius
}
}
}
return
chart_option
}
frontend/src/views/chart/components/ChartComponent.vue
浏览文件 @
ba34aef5
...
...
@@ -8,7 +8,7 @@
import
{
BASE_BAR
,
BASE_LINE
,
HORIZONTAL_BAR
,
BASE_PIE
,
BASE_FUNNEL
,
BASE_RADAR
}
from
'../chart/chart'
import
{
baseBarOption
,
stackBarOption
,
horizontalBarOption
,
horizontalStackBarOption
}
from
'../chart/bar/bar'
import
{
baseLineOption
,
stackLineOption
}
from
'../chart/line/line'
import
{
basePieOption
}
from
'../chart/pie/pie'
import
{
basePieOption
,
rosePieOption
}
from
'../chart/pie/pie'
import
{
baseFunnelOption
}
from
'../chart/funnel/funnel'
import
{
baseRadarOption
}
from
'../chart/radar/radar'
import
eventBus
from
'@/components/canvas/utils/eventBus'
...
...
@@ -73,6 +73,8 @@ export default {
chart_option
=
stackLineOption
(
JSON
.
parse
(
JSON
.
stringify
(
BASE_LINE
)),
chart
)
}
else
if
(
chart
.
type
===
'pie'
)
{
chart_option
=
basePieOption
(
JSON
.
parse
(
JSON
.
stringify
(
BASE_PIE
)),
chart
)
}
else
if
(
chart
.
type
===
'pie-rose'
)
{
chart_option
=
rosePieOption
(
JSON
.
parse
(
JSON
.
stringify
(
BASE_PIE
)),
chart
)
}
else
if
(
chart
.
type
===
'funnel'
)
{
chart_option
=
baseFunnelOption
(
JSON
.
parse
(
JSON
.
stringify
(
BASE_FUNNEL
)),
chart
)
}
else
if
(
chart
.
type
===
'radar'
)
{
...
...
frontend/src/views/chart/components/shape-attr/SizeSelector.vue
浏览文件 @
ba34aef5
...
...
@@ -57,6 +57,18 @@
<el-form-item
:label=
"$t('chart.pie_outer_radius')"
class=
"form-item form-item-slider"
>
<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')"
>
<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>
<el-radio-button
label=
"area"
>
{{
$t
(
'chart.area_mode'
)
}}
</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item
:label=
"$t('chart.rose_radius')"
class=
"form-item form-item-slider"
>
<el-slider
v-model=
"sizeForm.pieRoseRadius"
show-input
:show-input-controls=
"false"
input-size=
"mini"
:min=
"0"
:max=
"100"
@
change=
"changeBarSizeCase"
/>
</el-form-item>
</span>
</el-form>
<el-form
v-if=
"chart.type && chart.type.includes('funnel')"
ref=
"sizeFormPie"
:model=
"sizeForm"
label-width=
"80px"
size=
"mini"
>
...
...
frontend/src/views/chart/view/ChartEdit.vue
浏览文件 @
ba34aef5
...
...
@@ -90,8 +90,15 @@
<div
style=
"width: 100%;display: flex;display: -webkit-flex;justify-content: space-between;flex-direction: row;flex-wrap: wrap;"
>
<el-radio
value=
"line-stack"
label=
"line-stack"
><svg-icon
icon-class=
"line-stack"
class=
"chart-icon"
/></el-radio>
<el-radio
value=
"pie"
label=
"pie"
><svg-icon
icon-class=
"pie"
class=
"chart-icon"
/></el-radio>
<el-radio
value=
"pie-rose"
label=
"pie-rose"
><svg-icon
icon-class=
"pie-rose"
class=
"chart-icon"
/></el-radio>
<el-radio
value=
"funnel"
label=
"funnel"
><svg-icon
icon-class=
"funnel"
class=
"chart-icon"
/></el-radio>
<el-radio
value=
"radar"
label=
"radar"
><svg-icon
icon-class=
"radar"
class=
"chart-icon"
/></el-radio>
</div>
<div>
<el-radio
value=
""
label=
""
disabled
class=
"disabled-none-cursor"
><svg-icon
icon-class=
""
class=
"chart-icon"
/></el-radio>
<el-radio
value=
""
label=
""
disabled
class=
"disabled-none-cursor"
><svg-icon
icon-class=
""
class=
"chart-icon"
/></el-radio>
<el-radio
value=
""
label=
""
disabled
class=
"disabled-none-cursor"
><svg-icon
icon-class=
""
class=
"chart-icon"
/></el-radio>
<el-radio
value=
""
label=
""
disabled
class=
"disabled-none-cursor"
><svg-icon
icon-class=
""
class=
"chart-icon"
/></el-radio>
<el-radio
value=
""
label=
""
disabled
class=
"disabled-none-cursor"
><svg-icon
icon-class=
""
class=
"chart-icon"
/></el-radio>
</div>
</el-radio-group>
...
...
@@ -321,7 +328,7 @@ export default {
const
view
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
view
))
view
.
id
=
this
.
view
.
id
view
.
sceneId
=
this
.
view
.
sceneId
view
.
name
=
this
.
table
.
name
view
.
name
=
this
.
view
.
name
?
this
.
view
.
name
:
this
.
table
.
name
view
.
tableId
=
this
.
view
.
tableId
// view.xaxis.forEach(function(ele) {
// if (!ele.summary || ele.summary === '') {
...
...
frontend/src/views/dataset/add/AddCustom.vue
0 → 100644
浏览文件 @
ba34aef5
<
template
>
<el-col>
<el-row>
<el-row
style=
"height: 26px;"
>
<span
style=
"line-height: 26px;"
>
{{
$t
(
'dataset.add_custom_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>
<el-divider
/>
<el-row>
<el-col>
123
</el-col>
<el-col>
456
</el-col>
</el-row>
</el-row>
</el-col>
</
template
>
<
script
>
import
{
post
}
from
'@/api/dataset/dataset'
export
default
{
name
:
'AddCustom'
,
props
:
{
param
:
{
type
:
Object
,
default
:
null
}
},
data
()
{
return
{
searchTable
:
''
,
options
:
[],
dataSource
:
''
,
tables
:
[],
checkTableList
:
[],
mode
:
'0'
,
tableData
:
[]
}
},
watch
:
{
// dataSource(val) {
// if (val) {
// post('/datasource/getTables', { id: val }).then(response => {
// this.tables = response.data
// this.tableData = JSON.parse(JSON.stringify(this.tables))
// })
// }
// },
// searchTable(val) {
// if (val && val !== '') {
// this.tableData = JSON.parse(JSON.stringify(this.tables.filter(ele => { return ele.includes(val) })))
// } else {
// this.tableData = JSON.parse(JSON.stringify(this.tables))
// }
// }
},
mounted
()
{
// this.initDataSource()
},
activated
()
{
// this.initDataSource()
},
methods
:
{
// initDataSource() {
// listDatasource().then(response => {
// this.options = response.data
// })
// },
save
()
{
// console.log(this.checkTableList);
// console.log(this.scene);
const
sceneId
=
this
.
param
.
id
const
dataSourceId
=
this
.
dataSource
const
tables
=
[]
// const mode = this.mode
this
.
checkTableList
.
forEach
(
function
(
name
)
{
tables
.
push
({
name
:
name
,
sceneId
:
sceneId
,
dataSourceId
:
dataSourceId
,
type
:
'excel'
,
mode
:
1
})
})
post
(
'/dataset/table/batchAdd'
,
tables
).
then
(
response
=>
{
this
.
$store
.
dispatch
(
'dataset/setSceneData'
,
new
Date
().
getTime
())
this
.
cancel
()
})
},
cancel
()
{
this
.
dataReset
()
// this.$router.push('/dataset/home')
this
.
$emit
(
'switchComponent'
,
{
name
:
''
})
},
dataReset
()
{
this
.
searchTable
=
''
this
.
options
=
[]
this
.
dataSource
=
''
this
.
tables
=
[]
this
.
checkTableList
=
[]
}
}
}
</
script
>
<
style
scoped
>
.el-divider--horizontal
{
margin
:
12px
0
;
}
.form-item
{
margin-bottom
:
6px
;
}
.el-checkbox
{
margin-bottom
:
14px
;
margin-left
:
0
;
margin-right
:
14px
;
}
.el-checkbox.is-bordered
+
.el-checkbox.is-bordered
{
margin-left
:
0
;
}
span
{
font-size
:
14px
;
}
</
style
>
frontend/src/views/dataset/add/AddExcel.vue
0 → 100644
浏览文件 @
ba34aef5
<
template
>
<el-col>
<el-row>
<el-row
style=
"height: 26px;"
>
<span
style=
"line-height: 26px;"
>
{{
$t
(
'dataset.add_excel_table'
)
}}
</span>
<el-row
style=
"float: right"
>
<el-button
size=
"mini"
@
click=
"cancel"
>
{{
$t
(
'dataset.cancel'
)
}}
</el-button>
<el-button
size=
"mini"
type=
"primary"
@
click=
"save"
>
{{
$t
(
'dataset.confirm'
)
}}
</el-button>
</el-row>
</el-row>
<el-divider
/>
<el-row>
<el-row>
<el-col
style=
"width: 500px;"
>
<el-form
:model=
"form"
:inline=
"true"
size=
"mini"
class=
"row-style"
>
<el-form-item>
<el-input
v-model=
"form.name"
:placeholder=
"$t('commons.name')"
/>
</el-form-item>
<el-form-item>
<el-upload
action=
"https://jsonplaceholder.typicode.com/posts/"
:multiple=
"false"
:show-file-list=
"false"
accept=
".xls,.xlsx,.csv"
>
<el-button
size=
"mini"
type=
"primary"
>
{{
$t
(
'dataset.upload_file'
)
}}
</el-button>
</el-upload>
</el-form-item>
</el-form>
</el-col>
</el-row>
</el-row>
<el-row>
<el-card
class=
"box-card dataPreview"
shadow=
"never"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
{{
$t
(
'dataset.data_preview'
)
}}
</span>
</div>
<div
class=
"text item"
>
<ux-grid
ref=
"plxTable"
size=
"mini"
style=
"width: 100%;"
:height=
"height"
:checkbox-config=
"
{highlight: true}"
:width-resize="true"
>
<ux-table-column
v-for=
"field in fields"
:key=
"field.fieldName"
min-width=
"200px"
:field=
"field.fieldName"
:title=
"field.remarks"
:resizable=
"true"
/>
</ux-grid>
</div>
</el-card>
</el-row>
</el-row>
</el-col>
</
template
>
<
script
>
import
{
post
}
from
'@/api/dataset/dataset'
export
default
{
name
:
'AddExcel'
,
props
:
{
param
:
{
type
:
Object
,
default
:
null
}
},
data
()
{
return
{
form
:
{
name
:
''
},
fields
:
[],
mode
:
'1'
,
height
:
600
}
},
watch
:
{
// dataSource(val) {
// if (val) {
// post('/datasource/getTables', { id: val }).then(response => {
// this.tables = response.data
// this.tableData = JSON.parse(JSON.stringify(this.tables))
// })
// }
// },
// searchTable(val) {
// if (val && val !== '') {
// this.tableData = JSON.parse(JSON.stringify(this.tables.filter(ele => { return ele.includes(val) })))
// } else {
// this.tableData = JSON.parse(JSON.stringify(this.tables))
// }
// }
},
mounted
()
{
// this.initDataSource()
},
activated
()
{
// this.initDataSource()
},
methods
:
{
// initDataSource() {
// listDatasource().then(response => {
// this.options = response.data
// })
// },
save
()
{
// console.log(this.checkTableList);
// console.log(this.scene);
const
sceneId
=
this
.
param
.
id
const
dataSourceId
=
this
.
dataSource
const
tables
=
[]
const
mode
=
this
.
mode
this
.
checkTableList
.
forEach
(
function
(
name
)
{
tables
.
push
({
name
:
name
,
sceneId
:
sceneId
,
dataSourceId
:
dataSourceId
,
type
:
'excel'
,
mode
:
parseInt
(
mode
)
})
})
post
(
'/dataset/table/batchAdd'
,
tables
).
then
(
response
=>
{
this
.
$store
.
dispatch
(
'dataset/setSceneData'
,
new
Date
().
getTime
())
this
.
cancel
()
})
},
cancel
()
{
this
.
dataReset
()
// this.$router.push('/dataset/home')
this
.
$emit
(
'switchComponent'
,
{
name
:
''
})
},
dataReset
()
{
this
.
searchTable
=
''
this
.
options
=
[]
this
.
dataSource
=
''
this
.
tables
=
[]
this
.
checkTableList
=
[]
}
}
}
</
script
>
<
style
scoped
>
.el-divider--horizontal
{
margin
:
12px
0
;
}
.form-item
{
margin-bottom
:
6px
;
}
.el-checkbox
{
margin-bottom
:
14px
;
margin-left
:
0
;
margin-right
:
14px
;
}
.el-checkbox.is-bordered
+
.el-checkbox.is-bordered
{
margin-left
:
0
;
}
span
{
font-size
:
14px
;
}
.row-style
>>>
.el-form-item__label
{
font-size
:
12px
;
}
.dataPreview
>>>
.el-card__header
{
padding
:
6px
8px
;
}
.dataPreview
>>>
.el-card__body
{
padding
:
10px
;
}
</
style
>
frontend/src/views/dataset/group/Group.vue
浏览文件 @
ba34aef5
...
...
@@ -536,10 +536,10 @@ export default {
this
.
addData
(
'AddSQL'
)
break
case
'excel'
:
this
.
$message
(
param
.
type
)
this
.
addData
(
'AddExcel'
)
break
case
'custom'
:
this
.
$message
(
param
.
type
)
this
.
addData
(
'AddCustom'
)
break
}
},
...
...
frontend/src/views/dataset/index.vue
浏览文件 @
ba34aef5
...
...
@@ -22,10 +22,12 @@ import DataHome from './data/DataHome'
import
ViewTable
from
'./data/ViewTable'
import
AddDB
from
'./add/AddDB'
import
AddSQL
from
'./add/AddSQL'
import
AddExcel
from
'./add/AddExcel'
import
AddCustom
from
'./add/AddCustom'
export
default
{
name
:
'DataSet'
,
components
:
{
DeMainContainer
,
DeContainer
,
DeAsideContainer
,
Group
,
DataHome
,
ViewTable
,
AddDB
,
AddSQL
},
components
:
{
DeMainContainer
,
DeContainer
,
DeAsideContainer
,
Group
,
DataHome
,
ViewTable
,
AddDB
,
AddSQL
,
AddExcel
,
AddCustom
},
data
()
{
return
{
component
:
DataHome
,
...
...
@@ -46,6 +48,12 @@ export default {
case
'AddSQL'
:
this
.
component
=
AddSQL
break
case
'AddExcel'
:
this
.
component
=
AddExcel
break
case
'AddCustom'
:
this
.
component
=
AddCustom
break
default
:
this
.
component
=
DataHome
break
...
...
frontend/src/views/panel/edit/index.vue
浏览文件 @
ba34aef5
...
...
@@ -69,11 +69,31 @@
</de-container>
<el-dialog
v-if=
"filterVisible"
title=
"过滤组件"
:visible
.
sync=
"filterVisible"
custom-class=
"de-filter-dialog"
>
<filter-dialog
/>
<filter-dialog
v-if=
"filterVisible"
:widget-id=
"currentWidgetId"
>
<de-drawing-widget
v-if=
"filterVisible && currentComponent"
:id=
"'component' + currentComponent.id"
style=
"width: 100% !important;"
class=
"component"
:element=
"currentComponent"
:item=
"currentComponent"
/>
</filter-dialog>
<!--
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"text"
@
click=
"editPasswordVisible = false"
>
{{
$t
(
'commons.cancel'
)
}}
</el-button>
<el-button
type=
"primary"
@
click=
"editUserPassword('editPasswordForm')"
>
确认
</el-button>
</div>
-->
<div
style=
"text-align: end !important;margin: 0 15px !important;"
>
<span
slot=
"footer"
>
<el-button
@
click=
"cancelFilter"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"sureFilter"
>
确 定
</el-button>
</span>
</div>
</el-dialog>
</el-container>
...
...
@@ -123,7 +143,10 @@ export default {
showIndex
:
-
1
,
activeName
:
'attr'
,
reSelectAnimateIndex
:
undefined
,
filterVisible
:
false
filterVisible
:
false
,
currentWidgetId
:
null
,
currentWidget
:
null
,
currentComponent
:
null
}
},
...
...
@@ -224,11 +247,12 @@ export default {
// 画布
restore
()
{
// 用保存的数据恢复画布
if
(
localStorage
.
getItem
(
'canvasData'
))
{
this
.
$store
.
commit
(
'setComponentData'
,
this
.
resetID
(
JSON
.
parse
(
localStorage
.
getItem
(
'canvasData'
))))
let
canvasData
=
null
if
((
canvasData
=
localStorage
.
getItem
(
'canvasData'
))
!==
null
&&
canvasData
!==
'null'
)
{
this
.
$store
.
commit
(
'setComponentData'
,
this
.
resetID
(
JSON
.
parse
(
canvasData
)))
}
if
(
localStorage
.
getItem
(
'canvasStyle'
)
)
{
if
(
canvasData
&&
canvasData
!==
'null'
)
{
this
.
$store
.
commit
(
'setCanvasStyle'
,
JSON
.
parse
(
localStorage
.
getItem
(
'canvasStyle'
)))
}
},
...
...
@@ -260,13 +284,17 @@ export default {
}
})
}
else
{
const
wd
=
ApplicationContext
.
getService
(
componentInfo
.
id
)
if
(
wd
.
filterDialog
)
{
this
.
currentWidget
=
ApplicationContext
.
getService
(
componentInfo
.
id
)
if
(
this
.
currentWidget
.
filterDialog
)
{
this
.
show
=
false
this
.
openFilterDiolog
()
this
.
currentComponent
=
deepCopy
(
this
.
currentWidget
)
this
.
currentComponent
.
style
.
top
=
e
.
offsetY
this
.
currentComponent
.
style
.
left
=
e
.
offsetX
this
.
currentComponent
.
id
=
newComponentId
this
.
openFilterDiolog
(
componentInfo
.
id
)
return
}
component
=
deepCopy
(
wd
)
component
=
deepCopy
(
this
.
currentWidget
)
}
component
.
style
.
top
=
e
.
offsetY
...
...
@@ -277,7 +305,6 @@ export default {
},
handleDragOver
(
e
)
{
console
.
log
(
'handleDragOver123'
)
e
.
preventDefault
()
e
.
dataTransfer
.
dropEffect
=
'copy'
},
...
...
@@ -300,10 +327,22 @@ export default {
this
.
$store
.
commit
(
'hideContextMenu'
)
}
},
openFilterDiolog
()
{
openFilterDiolog
(
widgetId
)
{
this
.
currentWidgetId
=
widgetId
this
.
filterVisible
=
true
},
cancelFilter
()
{
this
.
filterVisible
=
false
this
.
currentWidgetId
=
null
this
.
currentWidget
=
null
this
.
currentComponent
=
null
},
sureFilter
()
{
const
component
=
deepCopy
(
this
.
currentComponent
)
this
.
$store
.
commit
(
'addComponent'
,
{
component
})
this
.
$store
.
commit
(
'recordSnapshot'
)
this
.
cancelFilter
()
}
}
}
</
script
>
...
...
@@ -371,7 +410,6 @@ export default {
.leftPanel
{
transform
:
translate
(
0
);
}
}
</
style
>
frontend/src/views/panel/filter/filterDialog.vue
浏览文件 @
ba34aef5
差异被折叠。
点击展开。
frontend/src/views/panel/filter/index.vue
浏览文件 @
ba34aef5
...
...
@@ -2,25 +2,6 @@
<div
class=
"filter-container"
@
dragstart=
"handleDragStart"
>
<!--
<el-card
class=
"filter-card-class"
>
<div
slot=
"header"
>
<span>
卡片名称
</span>
</div>
<div
style=
"position: relative;margin-left: 5px;"
@
dragstart=
"handleDragStart"
>
<div
v-for=
"(item, index) in componentList"
:key=
"index"
:data-id=
"item.id"
draggable
:data-index=
"index"
>
<span
class=
"iconfont"
:class=
"'icon-' + item.icon"
/>
<span>
{{
item
.
label
}}
</span>
</div>
</div>
</el-card>
-->
<div
v-for=
"(item, key) in widgetSubjects"
:key=
"key"
class=
"widget-subject"
>
<div
class=
"filter-header"
>
<div
class=
"filter-header-text"
>
{{
key
}}
</div>
...
...
frontend/src/views/panel/index-back.vue
deleted
100644 → 0
浏览文件 @
00568398
<
template
>
<de-container>
<de-aside-container>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-tab-pane
name=
"PanelList"
>
<span
slot=
"label"
><i
class=
"el-icon-document"
/>
列表
</span>
<panel-list
/>
</el-tab-pane>
<el-tab-pane
name=
"panels_star"
>
<span
slot=
"label"
><i
class=
"el-icon-star-off"
/>
收藏
</span>
开发中...
</el-tab-pane>
<el-tab-pane
name=
"panels_share"
:lazy=
"true"
>
<span
slot=
"label"
><i
class=
"el-icon-share"
/>
分享
</span>
<share-tree
v-if=
"showShare"
/>
</el-tab-pane>
</el-tabs>
</de-aside-container>
<de-main-container>
<component
:is=
"component"
:param=
"param"
/>
</de-main-container>
</de-container>
</
template
>
<
script
>
import
DeMainContainer
from
'@/components/dataease/DeMainContainer'
import
DeContainer
from
'@/components/dataease/DeContainer'
import
DeAsideContainer
from
'@/components/dataease/DeAsideContainer'
// import Group from './group/Group'
import
PanelList
from
'./list/PanelList'
import
PanelViewShow
from
'./list/PanelViewShow'
import
ShareTree
from
'./GrantAuth/shareTree'
export
default
{
name
:
'Panel'
,
components
:
{
DeMainContainer
,
DeContainer
,
DeAsideContainer
,
PanelList
,
PanelViewShow
,
ShareTree
},
data
()
{
return
{
component
:
PanelViewShow
,
param
:
{},
activeName
:
'PanelList'
,
showShare
:
false
}
},
methods
:
{
handleClick
(
tab
,
event
)
{
// 点击分析面板需要刷新分享内容
if
(
tab
.
name
===
'panels_share'
)
{
this
.
refreshShare
()
}
},
// switchComponent(c) {
// console.log(c)
// this.param = c.param
// switch (c.name) {
// case 'PanelViewShow':
// this.component = PanelViewShow
// break
// }
// },
refreshShare
()
{
this
.
showShare
=
false
this
.
$nextTick
(()
=>
(
this
.
showShare
=
true
))
}
}
}
</
script
>
<
style
scoped
>
.ms-aside-container
{
height
:
calc
(
100vh
-
56px
);
padding
:
15px
;
min-width
:
260px
;
max-width
:
460px
;
}
.ms-main-container
{
height
:
calc
(
100vh
-
56px
);
}
</
style
>
frontend/src/views/panel/index.vue
浏览文件 @
ba34aef5
<
template
>
<de-container
v-loading=
"$store.getters.loadingMap[$store.getters.currentPath]"
>
<de-container
v-loading=
"$store.getters.loadingMap[$store.getters.currentPath]"
style=
"background-color: #f7f8fa"
>
<de-main-container>
<component
:is=
"component"
:param=
"param"
/>
</de-main-container>
...
...
@@ -49,7 +49,7 @@ export default {
<
style
scoped
>
.ms-aside-container
{
height
:
calc
(
100vh
-
56px
);
padding
:
15
px
;
padding
:
0
px
;
min-width
:
260px
;
max-width
:
460px
;
}
...
...
frontend/src/views/panel/list/ChartViewEdit.vue
deleted
100644 → 0
浏览文件 @
00568398
<
template
>
<el-row
style=
"height: 100%;overflow-y: hidden;width: 100%;"
>
<el-row
style=
"display: flex;height: 100%"
>
<el-col
class=
"panel-design"
>
<!--TODO 仪表盘设计公共设置区域-->
<el-row
class=
"panel-design-head"
>
<span
style=
"float: left;line-height: 40px; color: gray"
>
<span>
名称:
{{
panelInfo
.
name
||
'测试仪表板'
}}
</span>
</span>
<span
style=
"float: right;line-height: 40px;"
>
<el-tooltip
content=
"预览"
>
<el-button
class=
"el-icon-view"
size=
"mini"
circle
/>
</el-tooltip>
</span>
</el-row>
<!--TODO 仪表盘预览区域-->
<section>
<Preview
/>
</section>
</el-col>
</el-row>
</el-row>
</
template
>
<
script
>
import
ChartEdit
from
'@/views/chart/view/ChartEdit'
export
default
{
name
:
'ChartViewEdit'
,
components
:
{
ChartEdit
},
data
()
{
return
{
}
},
computed
:
{
panelInfo
()
{
return
this
.
$store
.
state
.
panel
.
panelInfo
}
},
mounted
()
{
},
methods
:
{
}
}
</
script
>
<
style
scoped
>
.view-list
{
height
:
100%
;
width
:
20%
;
min-width
:
180px
;
max-width
:
220px
;
border
:
1px
solid
#E6E6E6
;
border-left
:
0
solid
;
overflow-y
:
auto
;
}
.view-list-thumbnails-outline
{
height
:
100%
;
overflow-y
:
auto
;
}
.view-list-thumbnails
{
width
:
100%
;
padding
:
0px
15px
15px
0px
;
}
.panel-design
{
height
:
100%
;
min-width
:
500px
;
border-top
:
1px
solid
#E6E6E6
;
}
.panel-design-head
{
height
:
40px
;
}
.panel-design-show
{
height
:
100%
;
width
:
100%
;
border-top
:
1px
solid
#E6E6E6
;
}
.padding-lr
{
padding
:
0
6px
;
}
.itxst
{
margin
:
10px
;
text-align
:
left
;
}
.col
{
width
:
40%
;
flex
:
1
;
padding
:
10px
;
border
:
solid
1px
#eee
;
border-radius
:
5px
;
float
:
left
;
}
.col
+
.col
{
margin-left
:
10px
;
}
.item
{
padding
:
2px
12px
;
margin
:
3px
3px
0
3px
;
border
:
solid
1px
#eee
;
background-color
:
#f1f1f1
;
text-align
:
left
;
display
:
block
;
}
.item
+
.item
{
border-top
:
none
;
margin-top
:
3px
;
}
.item
:hover
{
background-color
:
#fdfdfd
;
cursor
:
pointer
;
}
.item-axis
{
padding
:
2px
12px
;
margin
:
3px
3px
0
3px
;
border
:
solid
1px
#eee
;
background-color
:
#f1f1f1
;
text-align
:
left
;
}
.item-axis
:hover
{
background-color
:
#fdfdfd
;
cursor
:
pointer
;
}
.el-form-item
{
margin-bottom
:
0
;
}
.container
{
width
:
100%
;
height
:
600px
;
border
:
1px
solid
#000
;
position
:
relative
;
box-sizing
:
border-box
;
}
span
{
font-size
:
12px
;
}
</
style
>
frontend/src/views/panel/list/PanelList.vue
浏览文件 @
ba34aef5
...
...
@@ -145,6 +145,7 @@ import GrantAuth from '../GrantAuth'
import
LinkGenerate
from
'@/views/link/generate'
import
{
uuid
}
from
'vue-uuid'
import
bus
from
'@/utils/bus'
import
eventBus
from
'@/components/canvas/utils/eventBus'
import
{
loadTable
,
getScene
,
addGroup
,
delGroup
,
addTable
,
delTable
,
groupTree
,
defaultTree
,
get
}
from
'@/api/panel/panel'
export
default
{
...
...
@@ -417,8 +418,6 @@ export default {
nodeClick
(
data
,
node
)
{
if
(
data
.
nodeType
===
'panel'
)
{
this
.
$store
.
dispatch
(
'panel/setPanelInfo'
,
data
)
this
.
currGroup
=
data
// 加载视图数据
this
.
$nextTick
(()
=>
{
localStorage
.
setItem
(
'canvasData'
,
null
)
...
...
@@ -426,6 +425,9 @@ export default {
get
(
'panel/group/findOne/'
+
data
.
id
).
then
(
response
=>
{
this
.
$store
.
commit
(
'setComponentData'
,
this
.
resetID
(
JSON
.
parse
(
response
.
data
.
panelData
)))
this
.
$store
.
commit
(
'setCanvasStyle'
,
JSON
.
parse
(
response
.
data
.
panelStyle
))
this
.
$store
.
dispatch
(
'panel/setPanelInfo'
,
data
)
this
.
currGroup
=
data
eventBus
.
$emit
(
'componentDataChange'
,
''
)
})
})
}
...
...
frontend/src/views/panel/list/PanelMain.vue
浏览文件 @
ba34aef5
...
...
@@ -57,12 +57,13 @@ export default {
<
style
scoped
>
.ms-aside-container
{
height
:
calc
(
100vh
-
56px
);
padding
:
15
px
;
padding
:
0
px
;
min-width
:
260px
;
max-width
:
460px
;
}
.ms-main-container
{
height
:
calc
(
100vh
-
56px
);
padding
:
0px
;
}
</
style
>
frontend/src/views/panel/list/PanelViewShow.vue
浏览文件 @
ba34aef5
<
template
>
<el-row
style=
"height: 100%;
overflow-y: hidden;
width: 100%;"
>
<el-
row
style=
"display: flex;height: 100%
"
>
<el-col
class=
"panel-design"
>
<
!--TODO 仪表盘设计公共设置区域--
>
<
el-row
class=
"panel-design-head
"
>
<
span
style=
"float: left;line-height: 40px; color: gray
"
>
<
span>
名称:
{{
panelInfo
.
name
||
'测试仪表板'
}}
</span
>
</
span
>
<span
style=
"float: right;line-height: 40px;"
>
<el-tooltip
content=
"预览"
>
<el-button
class=
"el-icon-view"
size=
"mini"
circle
@
click=
"clickPreview"
/
>
</el-tooltip
>
</span
>
</el-row>
<!--TODO 仪表盘预览区域--
>
<section
>
<Preview
/
>
</section>
</el-
col
>
</el-
row
>
<el-row
style=
"height: 100%;width: 100%;"
>
<el-
col
v-if=
"panelInfo.name.length>0"
class=
"panel-design
"
>
<el-row
class=
"panel-design-head"
>
<!--TODO 仪表盘头部区域--
>
<
span>
{{
panelInfo
.
name
||
'测试仪表板'
}}
</span
>
<
span
style=
"float: right;
"
>
<
el-tooltip
content=
"预览
"
>
<
el-button
class=
"el-icon-view"
size=
"mini"
circle
@
click=
"clickPreview"
/
>
</
el-tooltip
>
</span
>
</el-row
>
<!--TODO 仪表盘预览区域--
>
<el-row
class=
"panel-design-preview"
>
<Preview
/
>
</el-row>
</el-col
>
<el-col
v-if=
"panelInfo.name.length===0"
style=
"height: 100%;"
>
<el-row
style=
"height: 100%;"
class=
"custom-position"
>
请从左侧选择仪表盘
</el-
row
>
</el-
col
>
</el-row>
</
template
>
<
script
>
...
...
@@ -59,7 +59,7 @@ export default {
}
</
script
>
<
style
scoped
>
<
style
>
.view-list
{
height
:
100%
;
width
:
20%
;
...
...
@@ -81,18 +81,26 @@ export default {
}
.panel-design
{
min-height
:
400px
;
height
:
100%
;
min-width
:
500px
;
overflow-y
:
auto
;
border-top
:
1px
solid
#E6E6E6
;
}
.panel-design-head
{
height
:
40px
;
background-color
:
white
;
padding
:
0
6px
;
line-height
:
40px
;
}
.panel-design-show
{
height
:
100%
;
.panel-design-preview
{
width
:
100%
;
height
:
calc
(
100%
-
40px
);
overflow-x
:
hidden
;
overflow-y
:
auto
;
padding
:
5px
;
border-top
:
1px
solid
#E6E6E6
;
}
...
...
@@ -165,4 +173,14 @@ export default {
span
{
font-size
:
12px
;
}
.custom-position
{
flex
:
1
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
font-size
:
14px
;
flex-flow
:
row
nowrap
;
color
:
#9ea6b2
;
}
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论