fix: 优化 warnFlagTip 的访问方式,提升代码一致性
This commit is contained in:
parent
87b313fafd
commit
01c4a27dd3
@ -180,7 +180,7 @@ struct Index {
|
|||||||
|
|
||||||
getPLCInfo() {
|
getPLCInfo() {
|
||||||
const that = this
|
const that = this
|
||||||
ObtainSignalData.getData((msg)=>{
|
ObtainSignalData.getData((msg) => {
|
||||||
if (!this.breakFlag) {
|
if (!this.breakFlag) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -220,7 +220,7 @@ struct Index {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.warnFlagTip[that.index].length > 1) {
|
if (this.warnFlagTip.get(that.index).length > 1) {
|
||||||
if (that.stachValue[that.index] != that.signArr[that.realNum[that.index]]) {
|
if (that.stachValue[that.index] != that.signArr[that.realNum[that.index]]) {
|
||||||
that.warnFlag[that.index] = '2'
|
that.warnFlag[that.index] = '2'
|
||||||
}
|
}
|
||||||
@ -344,15 +344,15 @@ struct Index {
|
|||||||
this.passArray[this.index] = true
|
this.passArray[this.index] = true
|
||||||
this.passArray = JSON.parse(JSON.stringify(this.passArray))
|
this.passArray = JSON.parse(JSON.stringify(this.passArray))
|
||||||
this.subFlag = true
|
this.subFlag = true
|
||||||
let name: string = this.warnFlagTip[this.index][0]
|
let name: string = this.warnFlagTip.get(this.index)[0]
|
||||||
if (this.warnFlagTip[this.index].length == 1) {
|
if (this.warnFlagTip.get(this.index).length == 1) {
|
||||||
this.vocObj.playAudio({
|
this.vocObj.playAudio({
|
||||||
type: 1,
|
type: 1,
|
||||||
name,
|
name,
|
||||||
})
|
})
|
||||||
} else if (this.warnFlagTip[this.index].length == 2) {
|
} else if (this.warnFlagTip.get(this.index).length == 2) {
|
||||||
if (this.signArr[this.realNum[this.index]] && this.signArr[this.realNum[this.index]] != '0') {
|
if (this.signArr[this.realNum[this.index]] && this.signArr[this.realNum[this.index]] != '0') {
|
||||||
name = this.warnFlagTip[this.index][1]
|
name = this.warnFlagTip.get(this.index)[1]
|
||||||
this.vocObj.playAudio({
|
this.vocObj.playAudio({
|
||||||
type: 1,
|
type: 1,
|
||||||
name,
|
name,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user