Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
98b76189
提交
98b76189
authored
4月 15, 2022
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 可选择调节矩阵密度
上级
3c8e1be4
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
52 行增加
和
9 行删除
+52
-9
index.vue
frontend/src/components/canvas/components/Editor/index.vue
+30
-5
utils.js
frontend/src/components/canvas/utils/utils.js
+2
-1
PanelAidedDesign.vue
...iews/panel/SubjectSetting/PanelStyle/PanelAidedDesign.vue
+8
-1
index.vue
frontend/src/views/panel/edit/index.vue
+11
-1
panel.js
frontend/src/views/panel/panel.js
+1
-1
没有找到文件。
frontend/src/components/canvas/components/Editor/index.vue
浏览文件 @
98b76189
...
...
@@ -219,6 +219,12 @@ import { buildFilterMap } from '@/utils/conditionUtil'
import
_
from
'lodash'
import
$
from
'jquery'
import
Background
from
'@/views/background/index'
import
{
ApplicationContext
}
from
'@/utils/ApplicationContext'
import
{
BASE_MOBILE_STYLE
,
COMMON_BACKGROUND_NONE
,
HYPERLINKS
}
from
'@/components/canvas/custom-component/component-list'
let
positionBox
=
[]
let
coordinates
=
[]
// 坐标点集合
...
...
@@ -943,7 +949,11 @@ export default {
},
computed
:
{
showGrid
()
{
return
this
.
canvasStyleData
.
aidedDesign
.
showGrid
if
(
this
.
canvasStyleData
&&
this
.
canvasStyleData
.
aidedDesign
)
{
return
this
.
canvasStyleData
.
aidedDesign
.
showGrid
}
else
{
return
false
}
},
editStyle
()
{
return
{
...
...
@@ -1002,6 +1012,12 @@ export default {
}
},
watch
:
{
matrixCount
:
{
handler
(
newVal
,
oldVal
)
{
const
pointScale
=
newVal
.
x
/
oldVal
.
x
this
.
changeScale
(
pointScale
)
}
},
customStyle
:
{
handler
(
newVal
)
{
// 获取当前宽高(宽高改变后重新渲染画布)
...
...
@@ -1223,10 +1239,19 @@ export default {
// 自适应画布区域 返回原值
return
value
*
scale
/
100
},
changeScale
()
{
if
(
this
.
canvasStyleData
.
matrixCount
)
{
this
.
matrixCount
=
this
.
canvasStyleData
.
matrixCount
}
// 修改矩阵点
changeComponentSizePoint
(
pointScale
)
{
this
.
componentData
.
forEach
((
item
,
index
)
=>
{
item
.
x
=
(
item
.
x
-
1
)
*
pointScale
+
1
item
.
y
=
(
item
.
y
-
1
)
*
pointScale
+
1
item
.
sizex
=
item
.
sizex
*
pointScale
item
.
sizey
=
item
.
sizey
*
pointScale
// this.componentData[index] = item
})
},
changeScale
(
pointScale
)
{
this
.
changeComponentSizePoint
(
pointScale
)
// 1.3 版本重新设计仪表板定位方式,基准画布宽高为 1600*900 宽度自适应当前画布获取缩放比例scaleWidth
// 高度缩放比例scaleHeight = scaleWidth 基础矩阵为128*72 矩阵原始宽度12.5*12.5 矩阵高度可以调整
...
...
frontend/src/components/canvas/utils/utils.js
浏览文件 @
98b76189
...
...
@@ -67,7 +67,7 @@ export function mobile2MainCanvas(mainSource, mobileSource) {
}
export
function
panelInit
(
componentData
,
componentStyle
)
{
componentData
.
forEach
(
item
=>
{
componentData
.
forEach
(
(
item
,
index
)
=>
{
if
(
item
.
component
&&
item
.
component
===
'de-date'
)
{
if
(
item
.
options
.
attrs
&&
(
!
item
.
options
.
attrs
.
default
||
(
item
.
serviceName
===
'timeYearWidget'
&&
item
.
options
.
attrs
.
default
.
dynamicInfill
!==
'year'
)
||
(
item
.
serviceName
===
'timeMonthWidget'
&&
item
.
options
.
attrs
.
default
.
dynamicInfill
!==
'month'
)))
{
...
...
@@ -95,6 +95,7 @@ export function panelInit(componentData, componentStyle) {
item
.
hyperlinks
=
(
item
.
hyperlinks
||
HYPERLINKS
)
}
item
.
commonBackground
=
item
.
commonBackground
||
deepCopy
(
COMMON_BACKGROUND_NONE
)
componentData
[
index
]
=
item
})
// style初始化
componentStyle
.
refreshTime
=
(
componentStyle
.
refreshTime
||
5
)
...
...
frontend/src/views/panel/SubjectSetting/PanelStyle/PanelAidedDesign.vue
浏览文件 @
98b76189
...
...
@@ -8,9 +8,16 @@
>
<el-col>
<el-form
ref=
"aidedForm"
label-width=
"110px"
size=
"mini"
>
<el-form-item
:label=
"'
显示
辅助网格'"
class=
"form-item form-item-slider"
>
<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-item
:label=
"'矩阵密度'"
class=
"form-item form-item-slider"
>
<el-radio-group
v-model=
"aidedDesign.matrixBase"
size=
"mini"
>
<el-radio-button
:label=
"1"
>
普通
</el-radio-button>
<el-radio-button
:label=
"2"
>
适中
</el-radio-button>
<el-radio-button
:label=
"3"
>
密集
</el-radio-button>
</el-radio-group>
</el-form-item>
</el-form>
</el-col>
<el-button
slot=
"reference"
size=
"mini"
class=
"shape-item"
>
辅助设计
<i
...
...
frontend/src/views/panel/edit/index.vue
浏览文件 @
98b76189
...
...
@@ -168,7 +168,7 @@
@
mouseup=
"deselectCurComponent"
@
scroll=
"canvasScroll"
>
<Editor
ref=
"canvasEditor"
:matrix-count=
"pcMatrixCount"
:out-style=
"outStyle"
:scroll-top=
"scrollTop"
/>
<Editor
ref=
"canvasEditor"
:matrix-count=
"pcMatrixCount
Base
"
:out-style=
"outStyle"
:scroll-top=
"scrollTop"
/>
</div>
<!--移动端画布区域 保持宽高比2.5-->
<el-row
v-if=
"mobileLayoutStatus"
class=
"mobile_canvas_main"
>
...
...
@@ -547,6 +547,16 @@ export default {
panelInfo
()
{
return
this
.
$store
.
state
.
panel
.
panelInfo
},
pcMatrixCountBase
()
{
if
(
this
.
canvasStyleData
.
aidedDesign
)
{
return
{
x
:
this
.
pcMatrixCount
.
x
*
this
.
canvasStyleData
.
aidedDesign
.
matrixBase
,
y
:
this
.
pcMatrixCount
.
y
*
this
.
canvasStyleData
.
aidedDesign
.
matrixBase
}
}
else
{
return
this
.
pcMatrixCount
}
},
...
mapState
([
'curComponent'
,
'curCanvasScale'
,
...
...
frontend/src/views/panel/panel.js
浏览文件 @
98b76189
// eslint-disable-next-line no-unused-vars
import
{
BASE_CHART
,
BASE_CHART
_STRING
}
from
'@/views/chart/chart/chart'
import
{
BASE_CHART_STRING
}
from
'@/views/chart/chart/chart'
import
{
deepCopy
}
from
'@/components/canvas/utils/utils'
export
const
DEFAULT_PANEL_STYLE
=
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论