|
|
@ -199,7 +199,9 @@
|
|
|
|
'background-origin': 'initial',
|
|
|
|
'background-origin': 'initial',
|
|
|
|
'background-clip': 'initial'
|
|
|
|
'background-clip': 'initial'
|
|
|
|
}"
|
|
|
|
}"
|
|
|
|
@click.self="setOptionsOnClickScreen" @drop="widgetOnDragged($event)" @dragover="dragOver($event)"
|
|
|
|
@click.self="setOptionsOnClickScreen"
|
|
|
|
|
|
|
|
@drop="widgetOnDragged($event)"
|
|
|
|
|
|
|
|
@dragover="dragOver($event)"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<div v-if="grade" class="bg-grid"></div>
|
|
|
|
<div v-if="grade" class="bg-grid"></div>
|
|
|
|
<widget
|
|
|
|
<widget
|
|
|
@ -332,7 +334,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 大屏的标记
|
|
|
|
// 大屏的标记
|
|
|
|
screenCode: "",
|
|
|
|
screenCode: "",
|
|
|
|
dragWidgetCode:'', //从工具栏拖拽的组件code
|
|
|
|
dragWidgetCode: "", //从工具栏拖拽的组件code
|
|
|
|
// 大屏画布中的组件
|
|
|
|
// 大屏画布中的组件
|
|
|
|
widgets: [
|
|
|
|
widgets: [
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -663,16 +665,16 @@ export default {
|
|
|
|
getPXUnderScale(px) {
|
|
|
|
getPXUnderScale(px) {
|
|
|
|
return this.bigscreenScaleInWorkbench * px;
|
|
|
|
return this.bigscreenScaleInWorkbench * px;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
dragStart( widgetCode) {
|
|
|
|
dragStart(widgetCode) {
|
|
|
|
this.dragWidgetCode =widgetCode;
|
|
|
|
this.dragWidgetCode = widgetCode;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
dragEnd() {
|
|
|
|
dragEnd() {
|
|
|
|
this.dragWidgetCode=''
|
|
|
|
this.dragWidgetCode = "";
|
|
|
|
},
|
|
|
|
},
|
|
|
|
dragOver(evt){
|
|
|
|
dragOver(evt) {
|
|
|
|
evt.preventDefault()
|
|
|
|
evt.preventDefault();
|
|
|
|
evt.stopPropagation()
|
|
|
|
evt.stopPropagation();
|
|
|
|
evt.dataTransfer.dropEffect = 'copy'
|
|
|
|
evt.dataTransfer.dropEffect = "copy";
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 拖动一个组件放到工作区中去,在拖动结束时,放到工作区对应的坐标点上去
|
|
|
|
// 拖动一个组件放到工作区中去,在拖动结束时,放到工作区对应的坐标点上去
|
|
|
|
widgetOnDragged(evt) {
|
|
|
|
widgetOnDragged(evt) {
|
|
|
@ -819,9 +821,14 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 将当前选中的组件,右侧属性值更新
|
|
|
|
// 将当前选中的组件,右侧属性值更新
|
|
|
|
widgetValueChanged(key, val) {
|
|
|
|
widgetValueChanged(key, val) {
|
|
|
|
|
|
|
|
console.log("key", key);
|
|
|
|
|
|
|
|
console.log("val", val);
|
|
|
|
|
|
|
|
console.log(this.widgetOptions);
|
|
|
|
if (this.screenCode == "screen") {
|
|
|
|
if (this.screenCode == "screen") {
|
|
|
|
let newSetup = new Array();
|
|
|
|
let newSetup = new Array();
|
|
|
|
this.dashboard = this.deepClone(val);
|
|
|
|
this.dashboard = this.deepClone(val);
|
|
|
|
|
|
|
|
console.log("asd", this.dashboard);
|
|
|
|
|
|
|
|
console.log(this.widgetOptions);
|
|
|
|
if (this.bigscreenWidth != this.dashboard.width) {
|
|
|
|
if (this.bigscreenWidth != this.dashboard.width) {
|
|
|
|
this.bigscreenWidth = this.dashboard.width;
|
|
|
|
this.bigscreenWidth = this.dashboard.width;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -833,9 +840,12 @@ export default {
|
|
|
|
el.value = this.bigscreenWidth;
|
|
|
|
el.value = this.bigscreenWidth;
|
|
|
|
} else if (el.name == "height") {
|
|
|
|
} else if (el.name == "height") {
|
|
|
|
el.value = this.bigscreenHeight;
|
|
|
|
el.value = this.bigscreenHeight;
|
|
|
|
|
|
|
|
} else if (this.dashboard.hasOwn(el.name)) {
|
|
|
|
|
|
|
|
el["value"] = this.dashboard[el.name];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
newSetup.push(el);
|
|
|
|
newSetup.push(el);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
console.log(newSetup);
|
|
|
|
this.widgetOptions.setup = newSetup;
|
|
|
|
this.widgetOptions.setup = newSetup;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
for (let i = 0; i < this.widgets.length; i++) {
|
|
|
|
for (let i = 0; i < this.widgets.length; i++) {
|
|
|
|