Commit 171046b8 authored by WuFeiyang's avatar WuFeiyang

添加了定时刷新

parent 69b90c61
......@@ -7,7 +7,6 @@
</b-dropdown-item>
</b-dropdown>
<b-button @click="saveWidgetList" style="margin-left:2%" variant="primary">Save</b-button>
<b-button @click="UIGenerateAutomatic" style="margin-left:2%" variant="primary">test</b-button>
<b-form-file
id="file"
type="file"
......@@ -105,7 +104,7 @@ export default class App extends Vue {
})
}
UIGenerateAutomatic() {
mounted() {
// var fragment = window.location.hash;
var fragment = "#/dataserver/DataByTimeFuzzy";
if (fragment != "#") {
......@@ -184,7 +183,7 @@ export default class App extends Vue {
}
})
}
}
}
exportActiveWidgetList(): AllWidgetConfig {
for (var widget of this.widgetList) {
......
......@@ -53,6 +53,7 @@ export default class Method extends Widget {
pathId: string = "";
userInputData = new Map<string, string>();
pathwithVar:string ="";
timer?:number;
isShowPath: boolean = false;
isShowParams: boolean = false;
......@@ -68,6 +69,15 @@ export default class Method extends Widget {
// this.config.data.userInputData = this.userInputData;
this.config.data.userInputData = this.strMapObjChange.strMapToObj(this.userInputData);
}
mounted()
{
this.timer = setInterval(this.refresh,1000);
}
destroyed()
{
clearInterval(this.timer);
}
updateUI() {
this.isShowParams = true;
......
......@@ -53,6 +53,7 @@ export default class Status extends Widget {
pathId: string = "";
userInputData = new Map<string, string>();
pathwithVar:string ="";
timer?:number;
isShowPath: boolean = false;
isShowParams: boolean = false;
......@@ -69,6 +70,16 @@ export default class Status extends Widget {
this.config.data.userInputData = this.strMapObjChange.strMapToObj(this.userInputData);
}
mounted()
{
this.timer = setInterval(this.refresh,1000);
}
destroyed()
{
clearInterval(this.timer);
}
updateUI() {
this.isShowParams = true;
var url = this.config.data.url;
......
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