大屏设置 描写与标题问题

qianlishi 3 years ago
parent ffc5add008
commit 77e24f19fb

@ -344,6 +344,7 @@ export default {
} else { } else {
this.$set(this.formData, key, val); this.$set(this.formData, key, val);
} }
this.$emit("onChanged", this.formData); this.$emit("onChanged", this.formData);
// key // key
for (let i = 0; i < this.options.length; i++) { for (let i = 0; i < this.options.length; i++) {

@ -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: [
{ {
@ -667,12 +669,12 @@ export default {
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++) {

Loading…
Cancel
Save