Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
c19a7294
Unverified
提交
c19a7294
authored
4月 15, 2022
作者:
王嘉豪
提交者:
GitHub
4月 15, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2121 from dataease/pr@dev@feat_panel-aided-design
feat: 增加辅助设计网格
上级
05ea4148
3c8e1be4
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
119 行增加
和
10 行删除
+119
-10
Grid.vue
frontend/src/components/canvas/components/Editor/Grid.vue
+18
-9
index.vue
frontend/src/components/canvas/components/Editor/index.vue
+0
-0
utils.js
frontend/src/components/canvas/utils/utils.js
+2
-0
PanelAidedDesign.vue
...iews/panel/SubjectSetting/PanelStyle/PanelAidedDesign.vue
+89
-0
index.vue
frontend/src/views/panel/SubjectSetting/index.vue
+3
-0
panel.js
frontend/src/views/panel/panel.js
+7
-1
没有找到文件。
frontend/src/components/canvas/components/Editor/Grid.vue
浏览文件 @
c19a7294
<
template
>
<
template
>
<svg
class=
"grid"
width=
"100%"
height=
"100%"
xmlns=
"http://www.w3.org/2000/svg"
>
<svg
class=
"grid"
width=
"100%"
height=
"100%"
xmlns=
"http://www.w3.org/2000/svg"
>
<defs>
<defs>
<
!--
<pattern
id=
"smallGrid"
width=
"5"
height=
"5"
patternUnits=
"userSpaceOnUse"
>
--
>
<
pattern
id=
"smallGrid"
:width=
"smallGridW"
:height=
"smallGridH"
patternUnits=
"userSpaceOnUse"
>
<!--
<path-->
<path
<!-- d="M 5 0 L 0 0 0 5"-->
:d=
"smallGridPathD"
<!-- fill="none"-->
fill=
"none"
<!-- stroke="rgba(207, 207, 207, 0.3)"-->
stroke=
"rgba(207, 207, 207, 0.6)"
<!-- stroke-width="1"-->
stroke-width=
"1"
<!-- />--
>
/
>
<
!--
</pattern>
--
>
<
/pattern
>
<pattern
id=
"grid"
:width=
"matrixStyle.width"
:height=
"matrixStyle.height"
patternUnits=
"userSpaceOnUse"
>
<pattern
id=
"grid"
:width=
"matrixStyle.width"
:height=
"matrixStyle.height"
patternUnits=
"userSpaceOnUse"
>
<rect
:width=
"matrixStyle.width"
:height=
"matrixStyle.height"
fill=
"url(#smallGrid)"
/>
<rect
:width=
"matrixStyle.width"
:height=
"matrixStyle.height"
fill=
"url(#smallGrid)"
/>
<path
<path
:d=
"pathD"
:d=
"pathD"
fill=
"none"
fill=
"none"
stroke=
"rgba(
186, 186, 186, 0.5
)"
stroke=
"rgba(
64,158,255,0.8
)"
stroke-width=
"1"
stroke-width=
"1"
/>
/>
</pattern>
</pattern>
...
@@ -41,6 +41,15 @@ export default {
...
@@ -41,6 +41,15 @@ export default {
computed
:
{
computed
:
{
pathD
:
function
()
{
pathD
:
function
()
{
return
'M '
+
this
.
matrixStyle
.
width
+
' 0 L 0 0 0 '
+
this
.
matrixStyle
.
height
return
'M '
+
this
.
matrixStyle
.
width
+
' 0 L 0 0 0 '
+
this
.
matrixStyle
.
height
},
smallGridPathD
:
function
()
{
return
'M '
+
this
.
smallGridW
+
' 0 L 0 0 0 '
+
this
.
smallGridH
},
smallGridW
:
function
()
{
return
this
.
matrixStyle
.
width
/
3
},
smallGridH
:
function
()
{
return
this
.
matrixStyle
.
height
/
3
}
}
}
}
}
}
...
...
frontend/src/components/canvas/components/Editor/index.vue
浏览文件 @
c19a7294
差异被折叠。
点击展开。
frontend/src/components/canvas/utils/utils.js
浏览文件 @
c19a7294
...
@@ -8,6 +8,7 @@ import {
...
@@ -8,6 +8,7 @@ import {
}
from
'@/utils/ApplicationContext'
}
from
'@/utils/ApplicationContext'
import
{
uuid
}
from
'vue-uuid'
import
{
uuid
}
from
'vue-uuid'
import
store
from
'@/store'
import
store
from
'@/store'
import
{
AIDED_DESIGN
}
from
'@/views/panel/panel'
export
function
deepCopy
(
target
)
{
export
function
deepCopy
(
target
)
{
if
(
typeof
target
===
'object'
)
{
if
(
typeof
target
===
'object'
)
{
...
@@ -99,6 +100,7 @@ export function panelInit(componentData, componentStyle) {
...
@@ -99,6 +100,7 @@ export function panelInit(componentData, componentStyle) {
componentStyle
.
refreshTime
=
(
componentStyle
.
refreshTime
||
5
)
componentStyle
.
refreshTime
=
(
componentStyle
.
refreshTime
||
5
)
componentStyle
.
refreshViewLoading
=
(
componentStyle
.
refreshViewLoading
||
false
)
componentStyle
.
refreshViewLoading
=
(
componentStyle
.
refreshViewLoading
||
false
)
componentStyle
.
refreshUnit
=
(
componentStyle
.
refreshUnit
||
'minute'
)
componentStyle
.
refreshUnit
=
(
componentStyle
.
refreshUnit
||
'minute'
)
componentStyle
.
aidedDesign
=
(
componentStyle
.
aidedDesign
||
deepCopy
(
AIDED_DESIGN
))
// 将data 和 style 数据设置到全局store中
// 将data 和 style 数据设置到全局store中
store
.
commit
(
'setComponentData'
,
resetID
(
componentData
))
store
.
commit
(
'setComponentData'
,
resetID
(
componentData
))
...
...
frontend/src/views/panel/SubjectSetting/PanelStyle/PanelAidedDesign.vue
0 → 100644
浏览文件 @
c19a7294
<
template
>
<div>
<div
style=
"width: 100%;"
>
<el-popover
placement=
"right"
width=
"400"
trigger=
"click"
>
<el-col>
<el-form
ref=
"aidedForm"
label-width=
"110px"
size=
"mini"
>
<el-form-item
:label=
"'显示辅助网格'"
class=
"form-item form-item-slider"
>
<el-checkbox
v-model=
"aidedDesign.showGrid"
size=
"mini"
@
change=
"onChangePanelStyle"
/>
</el-form-item>
</el-form>
</el-col>
<el-button
slot=
"reference"
size=
"mini"
class=
"shape-item"
>
辅助设计
<i
class=
"el-icon-setting el-icon--right"
/></el-button>
</el-popover>
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
'PanelAidedDesign'
,
props
:
{},
computed
:
{
aidedDesign
()
{
return
this
.
$store
.
state
.
canvasStyleData
.
aidedDesign
}
},
created
()
{
},
methods
:
{
onChangePanelStyle
()
{
this
.
$store
.
state
.
styleChangeTimes
++
}
}
}
</
script
>
<
style
scoped
>
.avatar-uploader
>>>
.el-upload
{
width
:
100px
;
height
:
60px
;
line-height
:
70px
;
}
.avatar-uploader
>>>
.el-upload-list
li
{
width
:
100px
!important
;
height
:
60px
!important
;
}
.disabled
>>>
.el-upload--picture-card
{
display
:
none
;
}
.shape-item
{
padding
:
6px
;
border
:
none
;
width
:
100%
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
/*.form-item-slider >>> .el-form-item__label {*/
/* font-size: 12px;*/
/* line-height: 38px;*/
/*}*/
.form-item
>>>
.el-form-item__label
{
font-size
:
12px
;
}
.el-select-dropdown__item
{
padding
:
0
20px
;
}
span
{
font-size
:
12px
}
.el-form-item
{
margin-bottom
:
6px
;
}
</
style
>
frontend/src/views/panel/SubjectSetting/index.vue
浏览文件 @
c19a7294
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
<el-collapse-item
:title=
"$t('panel.panel')"
name=
"panel"
>
<el-collapse-item
:title=
"$t('panel.panel')"
name=
"panel"
>
<el-row
class=
"selector-div"
>
<el-row
class=
"selector-div"
>
<background-selector
class=
"attr-selector"
/>
<background-selector
class=
"attr-selector"
/>
<panel-aided-design
class=
"attr-selector"
/>
<component-gap
class=
"attr-selector"
/>
<component-gap
class=
"attr-selector"
/>
<panel-refresh-time
class=
"attr-selector"
/>
<panel-refresh-time
class=
"attr-selector"
/>
<panel-view-result
class=
"attr-selector"
/>
<panel-view-result
class=
"attr-selector"
/>
...
@@ -70,9 +71,11 @@ import { mapState } from 'vuex'
...
@@ -70,9 +71,11 @@ import { mapState } from 'vuex'
import
{
deepCopy
}
from
'@/components/canvas/utils/utils'
import
{
deepCopy
}
from
'@/components/canvas/utils/utils'
import
bus
from
'@/utils/bus'
import
bus
from
'@/utils/bus'
import
PanelViewResult
from
'@/views/panel/SubjectSetting/PanelStyle/PanelViewResult'
import
PanelViewResult
from
'@/views/panel/SubjectSetting/PanelStyle/PanelViewResult'
import
PanelAidedDesign
from
'@/views/panel/SubjectSetting/PanelStyle/PanelAidedDesign'
export
default
{
export
default
{
components
:
{
components
:
{
PanelAidedDesign
,
PanelViewResult
,
PanelViewResult
,
slider
,
slider
,
BackgroundSelector
,
BackgroundSelector
,
...
...
frontend/src/views/panel/panel.js
浏览文件 @
c19a7294
...
@@ -23,7 +23,13 @@ export const CANVAS_STYLE = {
...
@@ -23,7 +23,13 @@ export const CANVAS_STYLE = {
panel
:
DEFAULT_PANEL_STYLE
,
panel
:
DEFAULT_PANEL_STYLE
,
refreshViewLoading
:
true
,
// 仪表板视图loading提示
refreshViewLoading
:
true
,
// 仪表板视图loading提示
refreshUnit
:
'minute'
,
// 仪表板刷新时间带外 默认 分钟
refreshUnit
:
'minute'
,
// 仪表板刷新时间带外 默认 分钟
refreshTime
:
5
// 仪表板刷新时间 默认5分钟
refreshTime
:
5
,
// 仪表板刷新时间 默认5分钟
aidedDesign
:
AIDED_DESIGN
// 辅助设计
}
export
const
AIDED_DESIGN
=
{
showGrid
:
false
,
matrixBase
:
1
// 当前matrix的基数 (是pcMatrixCount的几倍)
}
}
export
const
DEFAULT_COMMON_CANVAS_STYLE_STRING
=
{
export
const
DEFAULT_COMMON_CANVAS_STYLE_STRING
=
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论