Commit 171046b8 authored by WuFeiyang's avatar WuFeiyang

添加了定时刷新

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