Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
f9a0ec3d
提交
f9a0ec3d
authored
9月 15, 2021
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:仪表板可以自动进行无限下拉,取消仪表板尺寸设置,统一为自适应
上级
0f91ee66
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
32 行增加
和
31 行删除
+32
-31
index.vue
frontend/src/components/DeDrag/index.vue
+1
-1
Preview.vue
frontend/src/components/canvas/components/Editor/Preview.vue
+17
-10
index.vue
frontend/src/components/canvas/components/Editor/index.vue
+8
-4
Toolbar.vue
frontend/src/components/canvas/components/Toolbar.vue
+1
-13
index.js
frontend/src/store/index.js
+3
-0
index.vue
frontend/src/views/panel/edit/index.vue
+1
-2
PanelViewShow.vue
frontend/src/views/panel/list/PanelViewShow.vue
+1
-1
没有找到文件。
frontend/src/components/DeDrag/index.vue
浏览文件 @
f9a0ec3d
...
@@ -610,7 +610,7 @@ export default {
...
@@ -610,7 +610,7 @@ export default {
const
rect
=
this
.
$el
.
parentNode
.
getBoundingClientRect
()
const
rect
=
this
.
$el
.
parentNode
.
getBoundingClientRect
()
this
.
parentX
=
rect
.
x
this
.
parentX
=
rect
.
x
this
.
parentY
=
rect
.
y
this
.
parentY
=
rect
.
y
return
[
Math
.
round
(
parseFloat
(
style
.
getPropertyValue
(
'width'
),
10
)),
Math
.
round
(
parseFloat
(
style
.
getPropertyValue
(
'height'
),
10
))
]
return
[
Math
.
round
(
parseFloat
(
style
.
getPropertyValue
(
'width'
),
10
)),
100000
]
}
}
if
(
typeof
this
.
parent
===
'string'
)
{
if
(
typeof
this
.
parent
===
'string'
)
{
const
parentNode
=
document
.
querySelector
(
this
.
parent
)
const
parentNode
=
document
.
querySelector
(
this
.
parent
)
...
...
frontend/src/components/canvas/components/Editor/Preview.vue
浏览文件 @
f9a0ec3d
...
@@ -110,12 +110,16 @@ export default {
...
@@ -110,12 +110,16 @@ export default {
}
}
}
}
}
}
if
(
this
.
canvasStyleData
.
selfAdaption
)
{
// if (this.canvasStyleData.selfAdaption) {
style
=
{
// style = {
overflow
:
'hidden'
,
// overflow: 'hidden',
...
style
// ...style
}
// }
}
// }
// style = {
// overflow-x :'hidden',
// ...style
// }
return
style
return
style
},
},
// 此处单独计算componentData的值 不放入全局mapState中
// 此处单独计算componentData的值 不放入全局mapState中
...
@@ -168,10 +172,13 @@ export default {
...
@@ -168,10 +172,13 @@ export default {
const
canvasWidth
=
document
.
getElementById
(
'canvasInfoTemp'
).
offsetWidth
const
canvasWidth
=
document
.
getElementById
(
'canvasInfoTemp'
).
offsetWidth
this
.
scaleWidth
=
canvasWidth
*
100
/
parseInt
(
this
.
canvasStyleData
.
width
)
// 获取宽度比
this
.
scaleWidth
=
canvasWidth
*
100
/
parseInt
(
this
.
canvasStyleData
.
width
)
// 获取宽度比
this
.
scaleHeight
=
canvasHeight
*
100
/
parseInt
(
this
.
canvasStyleData
.
height
)
// 获取高度比
this
.
scaleHeight
=
canvasHeight
*
100
/
parseInt
(
this
.
canvasStyleData
.
height
)
// 获取高度比
if
(
this
.
showType
===
'width'
)
{
this
.
scaleHeight
=
this
.
scaleWidth
this
.
scaleHeight
=
this
.
scaleWidth
this
.
mainHeight
=
this
.
canvasStyleData
.
height
*
this
.
scaleHeight
/
100
+
'px'
// this.mainHeight = this.canvasStyleData.height * this.scaleHeight / 100 + 'px'
}
// if (this.showType === 'width') {
// this.scaleHeight = this.scaleWidth
// this.mainHeight = this.canvasStyleData.height * this.scaleHeight / 100 + 'px'
// }
this
.
handleScaleChange
()
this
.
handleScaleChange
()
},
},
resetID
(
data
)
{
resetID
(
data
)
{
...
...
frontend/src/components/canvas/components/Editor/index.vue
浏览文件 @
f9a0ec3d
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
@mousedown="handleMouseDown"
@mousedown="handleMouseDown"
>
>
<!-- 网格线 -->
<!-- 网格线 -->
<Grid
v-if=
"canvasStyleData.auxiliaryMatrix&&!linkageSettingStatus"
:matrix-style=
"matrixStyle"
/
>
<!--
<Grid
v-if=
"canvasStyleData.auxiliaryMatrix&&!linkageSettingStatus"
:matrix-style=
"matrixStyle"
/>
--
>
<!-- 仪表板联动清除按钮-->
<!-- 仪表板联动清除按钮-->
<canvas-opt-bar
/>
<canvas-opt-bar
/>
...
@@ -216,10 +216,10 @@ export default {
...
@@ -216,10 +216,10 @@ export default {
width
:
80
,
width
:
80
,
height
:
20
height
:
20
},
},
// 矩阵数量 默认 12
* 24
// 矩阵数量 默认 12
8 * 72
matrixCount
:
{
matrixCount
:
{
x
:
24
,
x
:
80
,
y
:
72
y
:
45
},
},
customStyleHistory
:
null
,
customStyleHistory
:
null
,
showDrag
:
true
,
showDrag
:
true
,
...
@@ -555,6 +555,9 @@ export default {
...
@@ -555,6 +555,9 @@ export default {
if
(
this
.
canvasStyleData
.
matrixCount
)
{
if
(
this
.
canvasStyleData
.
matrixCount
)
{
this
.
matrixCount
=
this
.
canvasStyleData
.
matrixCount
this
.
matrixCount
=
this
.
canvasStyleData
.
matrixCount
}
}
// 1.3 版本重新设计仪表板定位方式,基准画布宽高为 1600*900 宽度自适应当前画布获取缩放比例scaleWidth
// 高度缩放比例scaleHeight = scaleWidth 基础矩阵为128*72 矩阵原始宽度12.5*12.5 矩阵高度可以调整
if
(
this
.
outStyle
.
width
&&
this
.
outStyle
.
height
)
{
if
(
this
.
outStyle
.
width
&&
this
.
outStyle
.
height
)
{
// 矩阵计算
// 矩阵计算
if
(
!
this
.
canvasStyleData
.
selfAdaption
)
{
if
(
!
this
.
canvasStyleData
.
selfAdaption
)
{
...
@@ -642,6 +645,7 @@ export default {
...
@@ -642,6 +645,7 @@ export default {
position
:
relative
;
position
:
relative
;
/*background: #fff;*/
/*background: #fff;*/
margin
:
auto
;
margin
:
auto
;
overflow-x
:
hidden
;
background-size
:
100%
100%
!
important
;
background-size
:
100%
100%
!
important
;
/*transform-style:preserve-3d;*/
/*transform-style:preserve-3d;*/
.lock
{
.lock
{
...
...
frontend/src/components/canvas/components/Toolbar.vue
浏览文件 @
f9a0ec3d
...
@@ -17,18 +17,6 @@
...
@@ -17,18 +17,6 @@
<el-switch
v-model=
"canvasStyleData.auxiliaryMatrix"
:width=
"35"
name=
"auxiliaryMatrix"
/>
<el-switch
v-model=
"canvasStyleData.auxiliaryMatrix"
:width=
"35"
name=
"auxiliaryMatrix"
/>
<span>
{{
$t
(
'panel.matrix_design'
)
}}
</span>
<span>
{{
$t
(
'panel.matrix_design'
)
}}
</span>
</div>
</div>
<div
class=
"canvas-config"
style=
"margin-right: 10px"
>
<el-switch
v-model=
"canvasStyleData.selfAdaption"
:width=
"35"
name=
"selfAdaption"
/>
<span>
{{
$t
(
'panel.canvas_self_adaption'
)
}}
</span>
</div>
<div
class=
"canvas-config"
style=
"margin-right: 55px"
>
<span>
{{
$t
(
'panel.canvas_size'
)
}}
</span>
<input
v-model=
"canvasStyleData.width"
:disabled=
"canvasStyleData.selfAdaption"
>
<span>
*
</span>
<input
v-model=
"canvasStyleData.height"
:disabled=
"canvasStyleData.selfAdaption"
>
</div>
<!--
<div
class=
"canvas-config"
style=
"margin-right: 10px"
>
-->
<!--
<div
class=
"canvas-config"
style=
"margin-right: 10px"
>
-->
<!--
<span>
{{
$t
(
'panel.canvas_scale'
)
}}
</span>
-->
<!--
<span>
{{
$t
(
'panel.canvas_scale'
)
}}
</span>
-->
<!--
<input
v-model=
"scale"
@
input=
"handleScaleChange"
>
%-->
<!--
<input
v-model=
"scale"
@
input=
"handleScaleChange"
>
%-->
...
@@ -383,7 +371,7 @@ export default {
...
@@ -383,7 +371,7 @@ export default {
float
:
right
;
float
:
right
;
height
:
35px
;
height
:
35px
;
line-height
:
35px
;
line-height
:
35px
;
min-width
:
9
00px
;
min-width
:
5
00px
;
/*background: #fff;*/
/*background: #fff;*/
/*border-bottom: 1px solid #ddd;*/
/*border-bottom: 1px solid #ddd;*/
...
...
frontend/src/store/index.js
浏览文件 @
f9a0ec3d
...
@@ -79,6 +79,9 @@ const data = {
...
@@ -79,6 +79,9 @@ const data = {
},
},
setCanvasStyle
(
state
,
style
)
{
setCanvasStyle
(
state
,
style
)
{
if
(
style
)
{
style
[
'selfAdaption'
]
=
true
}
state
.
canvasStyleData
=
style
state
.
canvasStyleData
=
style
},
},
...
...
frontend/src/views/panel/edit/index.vue
浏览文件 @
f9a0ec3d
...
@@ -96,7 +96,6 @@
...
@@ -96,7 +96,6 @@
<div
<div
id=
"canvasInfo"
id=
"canvasInfo"
:class=
"
{'style-hidden':canvasStyleData.selfAdaption}"
class=
"content this_canvas"
class=
"content this_canvas"
@
drop=
"handleDrop"
@
drop=
"handleDrop"
@
dragover=
"handleDragOver"
@
dragover=
"handleDragOver"
...
@@ -839,7 +838,7 @@ export default {
...
@@ -839,7 +838,7 @@ export default {
}
}
}
}
.style-hidden
{
.style-hidden
{
overflow
:
hidden
;
overflow
-x
:
hidden
;
}
}
</
style
>
</
style
>
frontend/src/views/panel/list/PanelViewShow.vue
浏览文件 @
f9a0ec3d
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
<el-row
class=
"panel-design-preview"
>
<el-row
class=
"panel-design-preview"
>
<div
id=
"imageWrapper"
ref=
"imageWrapper"
style=
"width: 100%;height: 100%"
>
<div
id=
"imageWrapper"
ref=
"imageWrapper"
style=
"width: 100%;height: 100%"
>
<fullscreen
style=
"height: 100%;background: #f7f8fa;overflow-y: auto"
:fullscreen
.
sync=
"fullscreen"
>
<fullscreen
style=
"height: 100%;background: #f7f8fa;overflow-y: auto"
:fullscreen
.
sync=
"fullscreen"
>
<Preview
v-if=
"showMain"
:in-screen=
"!fullscreen"
:show-type=
"
canvasStyleData.selfAdaption?'full':
'width'"
/>
<Preview
v-if=
"showMain"
:in-screen=
"!fullscreen"
:show-type=
"'width'"
/>
</fullscreen>
</fullscreen>
</div>
</div>
</el-row>
</el-row>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论