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