|
|
@ -6,21 +6,23 @@
|
|
|
|
!-->
|
|
|
|
!-->
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="layout">
|
|
|
|
<div class="layout">
|
|
|
|
<div v-if="toolIsShow"
|
|
|
|
<div
|
|
|
|
|
|
|
|
v-if="toolIsShow"
|
|
|
|
class="layout-left"
|
|
|
|
class="layout-left"
|
|
|
|
:style="{ width: widthLeftForTools + 'px' }">
|
|
|
|
:style="{ width: widthLeftForTools + 'px' }"
|
|
|
|
<el-tabs type="border-card"
|
|
|
|
>
|
|
|
|
:stretch="true">
|
|
|
|
<el-tabs type="border-card" :stretch="true">
|
|
|
|
<!-- 左侧组件栏-->
|
|
|
|
<!-- 左侧组件栏-->
|
|
|
|
<el-tab-pane label="工具栏">
|
|
|
|
<el-tab-pane label="工具栏">
|
|
|
|
<!-- <el-divider content-position="center">html</el-divider>-->
|
|
|
|
<!-- <el-divider content-position="center">html</el-divider>-->
|
|
|
|
<draggable v-for="widget in widgetTools"
|
|
|
|
<draggable
|
|
|
|
|
|
|
|
v-for="widget in widgetTools"
|
|
|
|
:key="widget.code"
|
|
|
|
:key="widget.code"
|
|
|
|
@end="evt => widgetOnDragged(evt, widget.code)">
|
|
|
|
@end="evt => widgetOnDragged(evt, widget.code)"
|
|
|
|
|
|
|
|
>
|
|
|
|
<div class="tools-item">
|
|
|
|
<div class="tools-item">
|
|
|
|
<span class="tools-item-icon">
|
|
|
|
<span class="tools-item-icon">
|
|
|
|
<i class="iconfont"
|
|
|
|
<i class="iconfont" :class="widget.icon"></i>
|
|
|
|
:class="widget.icon"></i>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<span class="tools-item-text">{{ widget.label }}</span>
|
|
|
|
<span class="tools-item-text">{{ widget.label }}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -28,14 +30,15 @@
|
|
|
|
</el-tab-pane>
|
|
|
|
</el-tab-pane>
|
|
|
|
<!-- 左侧图层-->
|
|
|
|
<!-- 左侧图层-->
|
|
|
|
<el-tab-pane label="图层">
|
|
|
|
<el-tab-pane label="图层">
|
|
|
|
<div v-for="(item, index) in layerWidget"
|
|
|
|
<div
|
|
|
|
|
|
|
|
v-for="(item, index) in layerWidget"
|
|
|
|
:key="index"
|
|
|
|
:key="index"
|
|
|
|
class="tools-item"
|
|
|
|
class="tools-item"
|
|
|
|
:class="widgetIndex == index ? 'is-active' : ''"
|
|
|
|
:class="widgetIndex == index ? 'is-active' : ''"
|
|
|
|
@click="layerClick(index)">
|
|
|
|
@click="layerClick(index)"
|
|
|
|
|
|
|
|
>
|
|
|
|
<span class="tools-item-icon">
|
|
|
|
<span class="tools-item-icon">
|
|
|
|
<i class="iconfont"
|
|
|
|
<i class="iconfont" :class="item.icon"></i>
|
|
|
|
:class="item.icon"></i>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<span class="tools-item-text">{{ item.label }}</span>
|
|
|
|
<span class="tools-item-text">{{ item.label }}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -43,40 +46,49 @@
|
|
|
|
</el-tabs>
|
|
|
|
</el-tabs>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="layout-left-fold"
|
|
|
|
<div
|
|
|
|
|
|
|
|
class="layout-left-fold"
|
|
|
|
:style="{ width: widthLeftForToolsHideButton + 'px' }"
|
|
|
|
:style="{ width: widthLeftForToolsHideButton + 'px' }"
|
|
|
|
@click="toolIsShow = !toolIsShow">
|
|
|
|
@click="toolIsShow = !toolIsShow"
|
|
|
|
|
|
|
|
>
|
|
|
|
<i class="el-icon-arrow-right" />
|
|
|
|
<i class="el-icon-arrow-right" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="layout-middle"
|
|
|
|
<div
|
|
|
|
:style="{ width: middleWidth + 'px', height: middleHeight + 'px' }">
|
|
|
|
class="layout-middle"
|
|
|
|
|
|
|
|
:style="{ width: middleWidth + 'px', height: middleHeight + 'px' }"
|
|
|
|
|
|
|
|
>
|
|
|
|
<div class="top-button">
|
|
|
|
<div class="top-button">
|
|
|
|
|
|
|
|
|
|
|
|
<span class="btn">
|
|
|
|
<span class="btn">
|
|
|
|
<el-tooltip class="item"
|
|
|
|
<el-tooltip
|
|
|
|
|
|
|
|
class="item"
|
|
|
|
effect="dark"
|
|
|
|
effect="dark"
|
|
|
|
content="保存"
|
|
|
|
content="保存"
|
|
|
|
placement="bottom">
|
|
|
|
placement="bottom"
|
|
|
|
<i class="iconfont iconsave"
|
|
|
|
>
|
|
|
|
@click="saveData"></i>
|
|
|
|
<i class="iconfont iconsave" @click="saveData"></i>
|
|
|
|
</el-tooltip>
|
|
|
|
</el-tooltip>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<span class="btn">
|
|
|
|
<span class="btn">
|
|
|
|
<el-tooltip class="item"
|
|
|
|
<el-tooltip
|
|
|
|
|
|
|
|
class="item"
|
|
|
|
effect="dark"
|
|
|
|
effect="dark"
|
|
|
|
content="预览"
|
|
|
|
content="预览"
|
|
|
|
placement="bottom">
|
|
|
|
placement="bottom"
|
|
|
|
<i class="iconfont iconyulan"
|
|
|
|
>
|
|
|
|
@click="viewScreen"></i>
|
|
|
|
<i class="iconfont iconyulan" @click="viewScreen"></i>
|
|
|
|
</el-tooltip>
|
|
|
|
</el-tooltip>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<span class="btn border-left">
|
|
|
|
<span class="btn border-left">
|
|
|
|
<ul class="nav">
|
|
|
|
<ul class="nav">
|
|
|
|
<li><i class="el-icon-brush"></i><i class="el-icon-arrow-down"></i>
|
|
|
|
<li>
|
|
|
|
|
|
|
|
<i class="el-icon-brush"></i><i class="el-icon-arrow-down"></i>
|
|
|
|
<ul>
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
<li>
|
|
|
|
<div><i class="el-icon-full-screen mr10"></i>边框 <i class="el-icon-arrow-right ml20"></i></div>
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<i class="el-icon-full-screen mr10"></i>边框
|
|
|
|
|
|
|
|
<i class="el-icon-arrow-right ml20"></i>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<ul class="three-level">
|
|
|
|
<ul class="three-level">
|
|
|
|
<li><a href="#">边框1</a></li>
|
|
|
|
<li><a href="#">边框1</a></li>
|
|
|
|
<li><a href="#">边框2</a></li>
|
|
|
|
<li><a href="#">边框2</a></li>
|
|
|
@ -84,7 +96,11 @@
|
|
|
|
</ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<li>
|
|
|
|
<div><i class="el-icon-magic-stick mr10"></i>装饰<i class="el-icon-arrow-right ml20"></i></div>
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<i class="el-icon-magic-stick mr10"></i>装饰<i
|
|
|
|
|
|
|
|
class="el-icon-arrow-right ml20"
|
|
|
|
|
|
|
|
></i>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<ul class="three-level">
|
|
|
|
<ul class="three-level">
|
|
|
|
<li><a href="#">装饰1</a></li>
|
|
|
|
<li><a href="#">装饰1</a></li>
|
|
|
|
</ul>
|
|
|
|
</ul>
|
|
|
@ -94,20 +110,25 @@
|
|
|
|
</ul>
|
|
|
|
</ul>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="workbench-container"
|
|
|
|
<div
|
|
|
|
|
|
|
|
class="workbench-container"
|
|
|
|
:style="{
|
|
|
|
:style="{
|
|
|
|
width: bigscreenWidthInWorkbench + 'px',
|
|
|
|
width: bigscreenWidthInWorkbench + 'px',
|
|
|
|
height: bigscreenHeightInWorkbench + 'px'
|
|
|
|
height: bigscreenHeightInWorkbench + 'px'
|
|
|
|
}"
|
|
|
|
}"
|
|
|
|
@mousedown="handleMouseDown">
|
|
|
|
@mousedown="handleMouseDown"
|
|
|
|
<vue-ruler-tool v-model="dashboard.presetLine"
|
|
|
|
>
|
|
|
|
|
|
|
|
<vue-ruler-tool
|
|
|
|
|
|
|
|
v-model="dashboard.presetLine"
|
|
|
|
class="vueRuler"
|
|
|
|
class="vueRuler"
|
|
|
|
:step-length="50"
|
|
|
|
:step-length="50"
|
|
|
|
:parent="true"
|
|
|
|
:parent="true"
|
|
|
|
:position="'relative'"
|
|
|
|
:position="'relative'"
|
|
|
|
:is-scale-revise="true"
|
|
|
|
:is-scale-revise="true"
|
|
|
|
:visible.sync="dashboard.presetLineVisible">
|
|
|
|
:visible.sync="dashboard.presetLineVisible"
|
|
|
|
<div id="workbench"
|
|
|
|
>
|
|
|
|
|
|
|
|
<div
|
|
|
|
|
|
|
|
id="workbench"
|
|
|
|
class="workbench"
|
|
|
|
class="workbench"
|
|
|
|
:style="{
|
|
|
|
:style="{
|
|
|
|
transform: workbenchTransform,
|
|
|
|
transform: workbenchTransform,
|
|
|
@ -122,8 +143,10 @@
|
|
|
|
'background-origin': 'initial',
|
|
|
|
'background-origin': 'initial',
|
|
|
|
'background-clip': 'initial'
|
|
|
|
'background-clip': 'initial'
|
|
|
|
}"
|
|
|
|
}"
|
|
|
|
@click.self="setOptionsOnClickScreen">
|
|
|
|
@click.self="setOptionsOnClickScreen"
|
|
|
|
<widget ref="widgets"
|
|
|
|
>
|
|
|
|
|
|
|
|
<widget
|
|
|
|
|
|
|
|
ref="widgets"
|
|
|
|
v-for="(widget, index) in widgets"
|
|
|
|
v-for="(widget, index) in widgets"
|
|
|
|
:key="index"
|
|
|
|
:key="index"
|
|
|
|
v-model="widget.value"
|
|
|
|
v-model="widget.value"
|
|
|
@ -132,46 +155,58 @@
|
|
|
|
:bigscreen="{ bigscreenWidth, bigscreenHeight }"
|
|
|
|
:bigscreen="{ bigscreenWidth, bigscreenHeight }"
|
|
|
|
@onActivated="setOptionsOnClickWidget"
|
|
|
|
@onActivated="setOptionsOnClickWidget"
|
|
|
|
@contextmenu.prevent.native="rightClick($event, index)"
|
|
|
|
@contextmenu.prevent.native="rightClick($event, index)"
|
|
|
|
@mousedown.prevent.native="widgetsClick(index)" />
|
|
|
|
@mousedown.prevent.native="widgetsClick(index)"
|
|
|
|
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</vue-ruler-tool>
|
|
|
|
</vue-ruler-tool>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="layout-right"
|
|
|
|
<div class="layout-right" :style="{ width: widthLeftForOptions + 'px' }">
|
|
|
|
:style="{ width: widthLeftForOptions + 'px' }">
|
|
|
|
<el-tabs v-model="activeName" type="border-card" :stretch="true">
|
|
|
|
<el-tabs v-model="activeName"
|
|
|
|
<el-tab-pane
|
|
|
|
type="border-card"
|
|
|
|
v-if="
|
|
|
|
:stretch="true">
|
|
|
|
|
|
|
|
<el-tab-pane v-if="
|
|
|
|
|
|
|
|
isNotNull(widgetOptions.setup) || isNotNull(widgetOptions.collapse)
|
|
|
|
isNotNull(widgetOptions.setup) || isNotNull(widgetOptions.collapse)
|
|
|
|
"
|
|
|
|
"
|
|
|
|
name="first"
|
|
|
|
name="first"
|
|
|
|
label="配置">
|
|
|
|
label="配置"
|
|
|
|
<dynamicForm ref="formData"
|
|
|
|
>
|
|
|
|
|
|
|
|
<dynamicForm
|
|
|
|
|
|
|
|
ref="formData"
|
|
|
|
:options="widgetOptions.setup"
|
|
|
|
:options="widgetOptions.setup"
|
|
|
|
@onChanged="val => widgetValueChanged('setup', val)" />
|
|
|
|
@onChanged="val => widgetValueChanged('setup', val)"
|
|
|
|
|
|
|
|
/>
|
|
|
|
</el-tab-pane>
|
|
|
|
</el-tab-pane>
|
|
|
|
<el-tab-pane v-if="isNotNull(widgetOptions.data)"
|
|
|
|
<el-tab-pane
|
|
|
|
|
|
|
|
v-if="isNotNull(widgetOptions.data)"
|
|
|
|
name="second"
|
|
|
|
name="second"
|
|
|
|
label="数据">
|
|
|
|
label="数据"
|
|
|
|
<dynamicForm ref="formData"
|
|
|
|
>
|
|
|
|
|
|
|
|
<dynamicForm
|
|
|
|
|
|
|
|
ref="formData"
|
|
|
|
:options="widgetOptions.data"
|
|
|
|
:options="widgetOptions.data"
|
|
|
|
@onChanged="val => widgetValueChanged('data', val)" />
|
|
|
|
@onChanged="val => widgetValueChanged('data', val)"
|
|
|
|
|
|
|
|
/>
|
|
|
|
</el-tab-pane>
|
|
|
|
</el-tab-pane>
|
|
|
|
<el-tab-pane v-if="isNotNull(widgetOptions.position)"
|
|
|
|
<el-tab-pane
|
|
|
|
|
|
|
|
v-if="isNotNull(widgetOptions.position)"
|
|
|
|
name="third"
|
|
|
|
name="third"
|
|
|
|
label="坐标">
|
|
|
|
label="坐标"
|
|
|
|
<dynamicForm ref="formData"
|
|
|
|
>
|
|
|
|
|
|
|
|
<dynamicForm
|
|
|
|
|
|
|
|
ref="formData"
|
|
|
|
:options="widgetOptions.position"
|
|
|
|
:options="widgetOptions.position"
|
|
|
|
@onChanged="val => widgetValueChanged('position', val)" />
|
|
|
|
@onChanged="val => widgetValueChanged('position', val)"
|
|
|
|
|
|
|
|
/>
|
|
|
|
</el-tab-pane>
|
|
|
|
</el-tab-pane>
|
|
|
|
</el-tabs>
|
|
|
|
</el-tabs>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<content-menu :visible.sync="visibleContentMenu"
|
|
|
|
<content-menu
|
|
|
|
|
|
|
|
:visible.sync="visibleContentMenu"
|
|
|
|
:style-obj="styleObj"
|
|
|
|
:style-obj="styleObj"
|
|
|
|
@deletelayer="deletelayer" />
|
|
|
|
@deletelayer="deletelayer"
|
|
|
|
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
@ -280,7 +315,8 @@ export default {
|
|
|
|
return Math.min(widthScale, heightScale);
|
|
|
|
return Math.min(widthScale, heightScale);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
workbenchTransform() {
|
|
|
|
workbenchTransform() {
|
|
|
|
return `scale(${this.bigscreenScaleInWorkbench}, ${this.bigscreenScaleInWorkbench
|
|
|
|
return `scale(${this.bigscreenScaleInWorkbench}, ${
|
|
|
|
|
|
|
|
this.bigscreenScaleInWorkbench
|
|
|
|
})`;
|
|
|
|
})`;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 大屏在设计模式的大小
|
|
|
|
// 大屏在设计模式的大小
|
|
|
|