Compare commits

..

No commits in common. "2f4eadea15bddf47abbb0b2d7fb4b6a208456a08" and "3b0db245cc332f37480b665f17d3a2b40a1665aa" have entirely different histories.

2 changed files with 19 additions and 35 deletions

View File

@ -47,8 +47,7 @@ export default struct Index {
if (status == 'idle') {
if (val == 'kszj.wav') {
console.log('finsh')
this.initfackCheck(0)
// this.getCheckList(true)
this.getCheckList()
} else {
this.subFlag = false
this.getNextNode()
@ -284,24 +283,11 @@ export default struct Index {
}
}, parseInt(this.checkListCopy[0].time) * 1000)
}
initfackCheck(index){
const that=this
setTimeout(()=>{
console.log('indexindex',index)
if(index>=3){
this.getCheckList()
return
}
that.passArray[index]=true
that.warnFlag[index]='2'
that.passArray=JSON.parse(JSON.stringify(that.passArray))
that.warnFlag=JSON.parse(JSON.stringify(that.warnFlag))
index++
this.initfackCheck(index)
},1000)
}
async getCheckList() {
getCheckList() {
if (!this.breakFlag) {
return
}
this.index = this.checkListCopy[0].key
this.passArray[this.index] = true
this.passArray = JSON.parse(JSON.stringify(this.passArray))
@ -347,7 +333,7 @@ export default struct Index {
Image(this.passArray[0] ? (this.warnFlag[0] == '0' ? $r('app.media.cheliangmoxing') : (this.warnFlag[0] == '1' ? $r('app.media.cheliangmoxing_r') : $r('app.media.cheliangmoxing_g'))) : $r('app.media.cheliangmoxing'))
.width(138.5 * this.ratio)
.height(112.5 * this.ratio)
Image(this.passArray[0] ? (this.warnFlag[1] == '0' ? $r('app.media.weixingxinhao') : (this.warnFlag[1] == '1' ? $r('app.media.weixingxinhao_r') : $r('app.media.weixingxinhao_g'))) : $r('app.media.weixingxinhao'))
Image(this.passArray[1] ? (this.warnFlag[1] == '0' ? $r('app.media.weixingxinhao') : (this.warnFlag[1] == '1' ? $r('app.media.weixingxinhao_r') : $r('app.media.weixingxinhao_g'))) : $r('app.media.weixingxinhao'))
.width(138.5 * this.ratio)
.height(112.5 * this.ratio)
Image(this.passArray[2] ? (this.warnFlag[2] == '0' ? $r('app.media.shipinjiankong') : (this.warnFlag[2] == '1' ? $r('app.media.shipingjiankong_r') : $r('app.media.shipinjiankong_g'))) : $r('app.media.shipinjiankong'))

View File

@ -28,7 +28,6 @@ struct Index {
@State isSingle: boolean = false;
@State deviceId: string = '';
@State angle: number = 0
@State dialogRatio: number = 0.8
@State ratio: number = 1700 / 960
@State loading: boolean = true
@State fd: number = -1;
@ -42,11 +41,11 @@ struct Index {
@Styles
commStyle(){
.width(220 * this.ratio*this.dialogRatio)
.height(69 * this.ratio*this.dialogRatio)
.width(220 * this.ratio)
.height(69 * this.ratio)
.backgroundImage($r('app.media.button_nor'))
.backgroundImageSize({ width: '100%', height: '100%' })
.margin({ bottom: 12 * this.ratio})
.margin({ bottom: 12 * this.ratio })
}
build() {
@ -186,33 +185,32 @@ struct Index {
if (this.dialogVisiable) {
Flex({justifyContent:FlexAlign.Center}) {
Text('确认是否退出应用')
.fontSize(28 * this.ratio*this.dialogRatio)
.margin({top:100*this.ratio*this.dialogRatio})
.fontSize(28 * this.ratio)
.margin({top:100*this.ratio})
Row() {
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
Text(' 取 消 ').fontSize(24 * this.ratio*this.dialogRatio).fontColor('#fff').width(100 * this.ratio*this.dialogRatio)
Text(' 取 消 ').fontSize(24 * this.ratio).fontColor('#fff').width(100 * this.ratio)
}
.commStyle()
.onClick(() => {
this.dialogVisiable = false
}).margin({right:10*this.ratio})
})
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
Text(' 确 定 ').fontSize(24 * this.ratio*this.dialogRatio).fontColor('#fff').width(100 * this.ratio*this.dialogRatio)
Text(' 确 定 ').fontSize(24 * this.ratio).fontColor('#fff').width(100 * this.ratio)
}
.commStyle()
.onClick(() => {
router.back()
})
}.position({ y: 265 * this.ratio*this.dialogRatio, x: 115 * this.ratio*this.dialogRatio })
}.position({ y: 265 * this.ratio, x: 115 * this.ratio })
}
.width(660 * this.ratio*this.dialogRatio)
.height(360 * this.ratio*this.dialogRatio)
.position({ x: 220 * this.ratio, y: 98 * this.ratio-265/2*(1-this.ratio*this.dialogRatio) })
.width(660 * this.ratio)
.height(360 * this.ratio)
.position({ x: 150 * this.ratio, y: 98 * this.ratio })
.backgroundColor('#E6E3DF')
//
.borderRadius(19 * this.ratio*this.dialogRatio)
.borderRadius(19 * this.ratio)
}
if (this.loading) {
Column() {