Commit 6a85ca07 authored by WuFeiyang's avatar WuFeiyang

修改autobroadcast

parent d53f5626
...@@ -276,6 +276,8 @@ export default class AutoBroadcast extends Widget { ...@@ -276,6 +276,8 @@ export default class AutoBroadcast extends Widget {
PubSub.publish('VarBroadcast',autoUpdate); PubSub.publish('VarBroadcast',autoUpdate);
this.preStatusValue = this.config.data.autoUpdateValue; this.preStatusValue = this.config.data.autoUpdateValue;
console.log("preStatusValue"+this.preStatusValue);
console.log("autoUpdateValue"+this.config.data.autoUpdateValue);
} }
} }
...@@ -294,6 +296,9 @@ export default class AutoBroadcast extends Widget { ...@@ -294,6 +296,9 @@ export default class AutoBroadcast extends Widget {
if(this.config.data.autoUpdateName != "" && this.preStatusValue != this.StatusValue) if(this.config.data.autoUpdateName != "" && this.preStatusValue != this.StatusValue)
{ {
console.log("before autobroadcast");
console.log("preStatusValue"+this.preStatusValue);
console.log("StatusValue"+this.StatusValue);
var autoUpdateData= new Map<string, string>(); var autoUpdateData= new Map<string, string>();
autoUpdateData.set(this.config.data.autoUpdateName,this.StatusValue); autoUpdateData.set(this.config.data.autoUpdateName,this.StatusValue);
var autoUpdate:UpdatePayload = { var autoUpdate:UpdatePayload = {
...@@ -301,9 +306,9 @@ export default class AutoBroadcast extends Widget { ...@@ -301,9 +306,9 @@ export default class AutoBroadcast extends Widget {
variables: autoUpdateData, variables: autoUpdateData,
target:['self'] target:['self']
} }
this.preStatusValue = this.StatusValue;
setTimeout(() => { setTimeout(() => {
PubSub.publish('VarBroadcast',autoUpdate); PubSub.publish('VarBroadcast',autoUpdate);
this.preStatusValue = this.config.data.autoUpdateValue;
}, this.config.data.delayTime); }, this.config.data.delayTime);
} }
} }
......
...@@ -48,8 +48,6 @@ export default class WidgetParams extends Vue{ ...@@ -48,8 +48,6 @@ export default class WidgetParams extends Vue{
getVariableValues(): Map<string, string> { getVariableValues(): Map<string, string> {
for(var key of this.userInputData.keys()) { for(var key of this.userInputData.keys()) {
console.log("getVariableValues");
console.log(this.userInputData);
this.userInputData.set(key, this.tempUserInputData[key]); this.userInputData.set(key, this.tempUserInputData[key]);
} }
return this.userInputData; return this.userInputData;
...@@ -60,8 +58,6 @@ export default class WidgetParams extends Vue{ ...@@ -60,8 +58,6 @@ export default class WidgetParams extends Vue{
variables: this.getVariableValues(), variables: this.getVariableValues(),
target:['self'] target:['self']
} }
console.log("update");
console.log(Args.variables);
this.$emit('updataVariables', Args) this.$emit('updataVariables', Args)
} }
} }
......
...@@ -277,6 +277,7 @@ export default class SlideShow extends Widget { ...@@ -277,6 +277,7 @@ export default class SlideShow extends Widget {
if(shouldUpdate) if(shouldUpdate)
{ {
console.log("I have updated"+this.userInputData);
(this.$refs.WidgetParams as WidgetParams).setVariableInput(this.userInputData); (this.$refs.WidgetParams as WidgetParams).setVariableInput(this.userInputData);
this.updateUI(); this.updateUI();
this.refresh(); this.refresh();
...@@ -314,7 +315,8 @@ export default class SlideShow extends Widget { ...@@ -314,7 +315,8 @@ export default class SlideShow extends Widget {
}) })
.then(response => { .then(response => {
this.img = response.data.CFET2CORE_SAMPLE_VAL; this.img = response.data.CFET2CORE_SAMPLE_VAL;
if(this.img.length>0) console.log("按了get后此时的值"+this.img)
if(this.img.length > 0)
{ {
this.currentImgIndex = 0; this.currentImgIndex = 0;
} }
...@@ -330,6 +332,7 @@ export default class SlideShow extends Widget { ...@@ -330,6 +332,7 @@ export default class SlideShow extends Widget {
this.userInputData, this.userInputData,
this.config.data.url this.config.data.url
); );
console.log("按了get后此时的url"+this.pathwithVar)
await this.getData(this.pathwithVar); await this.getData(this.pathwithVar);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment