|
@@ -46,15 +46,29 @@ export class fireControl {
|
|
//获取第几步标量数据
|
|
//获取第几步标量数据
|
|
async getScalrsByStep(step) {
|
|
async getScalrsByStep(step) {
|
|
this.step = step;
|
|
this.step = step;
|
|
- // console.log(this.scalars.get(step));
|
|
|
|
|
|
+
|
|
if (this.scalars.get(step)) {
|
|
if (this.scalars.get(step)) {
|
|
this.scalar = this.scalars.get(step);
|
|
this.scalar = this.scalars.get(step);
|
|
} else {
|
|
} else {
|
|
const url = this._url + this.aid + "&transCode=D00009&step=" + this.step;
|
|
const url = this._url + this.aid + "&transCode=D00009&step=" + this.step;
|
|
await this.reader.setUrl(url).then(() => {
|
|
await this.reader.setUrl(url).then(() => {
|
|
const scalarMap = this.reader.getOutputData(1);
|
|
const scalarMap = this.reader.getOutputData(1);
|
|
|
|
+ scalarMap.forEach(function(scalarVarry, skey) {
|
|
|
|
+ const replacedNumbers = scalarVarry.map(
|
|
|
|
+ value => {
|
|
|
|
+ if(isNaN(value)){
|
|
|
|
+ return 0;
|
|
|
|
+ }else{
|
|
|
|
+ return value
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ );
|
|
|
|
+ scalarMap.set(skey,replacedNumbers);
|
|
|
|
+
|
|
|
|
+ });
|
|
this.scalar = scalarMap;
|
|
this.scalar = scalarMap;
|
|
this.scalars.set(step, scalarMap);
|
|
this.scalars.set(step, scalarMap);
|
|
|
|
+ // console.log("获取"+ this.scalar);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|