Commit 004e2b08 authored by van.chen's avatar van.chen

更新最新

parent a28eac11
......@@ -81,10 +81,10 @@
<v-switch [value]="value[1]" [disabled]="nanLoading || value[0] || value[1]" (click)="toggle(1)" [loading]="beiLoading"></v-switch>
</ng-template>
<ng-template #s3>
<v-switch [value]="value[2]" [disabled]="true"></v-switch>
<v-switch [value]="value[2]" (click)="toggle(2)" [loading]="loading2"></v-switch>
</ng-template>
<ng-template #s4>
<v-switch [value]="value[3]" [disabled]="true"></v-switch>
<v-switch [value]="value[3]" (click)="toggle(3)" [loading]="loading3"></v-switch>
</ng-template>
<ng-template #s5>
<v-switch [value]="value[4]" [disabled]="true"></v-switch>
......
......@@ -18,6 +18,8 @@ export class EastPage implements OnInit {
beiClicked = false;
nanLoading = false;
beiLoading = false;
loading2 = false;
loading3 = false;
_inv;
constructor(private tf: Transfer, private api: Api, private load: Load) {
......@@ -48,6 +50,48 @@ export class EastPage implements OnInit {
} else if (index === 1) {
this.beiClicked = true;
this.beiLoading = true;
} else if (index === 2) {
this.loading2 = true;
const req = [{
data: {
d0: 1,
startTime: +new Date(),
ts: +new Date()
},
sn: '19041005',
type: 'WTDR66C'
}];
this.api.data.updateControl([req, (data) => {
if (data && data.code === 1) {
this.getData(1);
this.api.presentMsgToast(data.message);
} else {
this.api.presentMsgToast(data.message);
}
this.loading2 = false;
this.load.offLoad();
}]);
} else if (index === 3) {
this.loading3 = true;
const req = [{
data: {
d2: 1,
startTime: +new Date(),
ts: +new Date()
},
sn: '19041005',
type: 'WTDR66C'
}];
this.api.data.updateControl([req, (data) => {
if (data && data.code === 1) {
this.getData(1);
this.api.presentMsgToast(data.message);
} else {
this.api.presentMsgToast(data.message);
}
this.loading3 = false;
this.load.offLoad();
}]);
}
}
}
......@@ -77,7 +121,6 @@ export class EastPage implements OnInit {
req = [{
data: {
d0: 1,
duration: this.duration,
startTime: +new Date(),
ts: +new Date()
},
......@@ -96,6 +139,8 @@ export class EastPage implements OnInit {
}
this.nanLoading = false;
this.beiLoading = false;
this.loading2 = false;
this.loading3 = false;
this.load.offLoad();
}]);
}
......
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