Commit 6a85ca07 authored by WuFeiyang's avatar WuFeiyang

修改autobroadcast

parent d53f5626
......@@ -276,6 +276,8 @@ export default class AutoBroadcast extends Widget {
PubSub.publish('VarBroadcast',autoUpdate);
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 {
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>();
autoUpdateData.set(this.config.data.autoUpdateName,this.StatusValue);
var autoUpdate:UpdatePayload = {
......@@ -301,9 +306,9 @@ export default class AutoBroadcast extends Widget {
variables: autoUpdateData,
target:['self']
}
this.preStatusValue = this.StatusValue;
setTimeout(() => {
PubSub.publish('VarBroadcast',autoUpdate);
this.preStatusValue = this.config.data.autoUpdateValue;
}, this.config.data.delayTime);
}
}
......
......@@ -48,8 +48,6 @@ export default class WidgetParams extends Vue{
getVariableValues(): Map<string, string> {
for(var key of this.userInputData.keys()) {
console.log("getVariableValues");
console.log(this.userInputData);
this.userInputData.set(key, this.tempUserInputData[key]);
}
return this.userInputData;
......@@ -60,8 +58,6 @@ export default class WidgetParams extends Vue{
variables: this.getVariableValues(),
target:['self']
}
console.log("update");
console.log(Args.variables);
this.$emit('updataVariables', Args)
}
}
......
......@@ -277,6 +277,7 @@ export default class SlideShow extends Widget {
if(shouldUpdate)
{
console.log("I have updated"+this.userInputData);
(this.$refs.WidgetParams as WidgetParams).setVariableInput(this.userInputData);
this.updateUI();
this.refresh();
......@@ -314,7 +315,8 @@ export default class SlideShow extends Widget {
})
.then(response => {
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;
}
......@@ -330,6 +332,7 @@ export default class SlideShow extends Widget {
this.userInputData,
this.config.data.url
);
console.log("按了get后此时的url"+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