carchekc和dialog
This commit is contained in:
parent
0c2ec74f30
commit
75058b49bb
@ -47,7 +47,8 @@ export default struct Index {
|
|||||||
if (status == 'idle') {
|
if (status == 'idle') {
|
||||||
if (val == 'kszj.wav') {
|
if (val == 'kszj.wav') {
|
||||||
console.log('finsh')
|
console.log('finsh')
|
||||||
this.getCheckList()
|
this.initfackCheck(0)
|
||||||
|
// this.getCheckList(true)
|
||||||
} else {
|
} else {
|
||||||
this.subFlag = false
|
this.subFlag = false
|
||||||
this.getNextNode()
|
this.getNextNode()
|
||||||
@ -283,11 +284,24 @@ export default struct Index {
|
|||||||
}
|
}
|
||||||
}, parseInt(this.checkListCopy[0].time) * 1000)
|
}, parseInt(this.checkListCopy[0].time) * 1000)
|
||||||
}
|
}
|
||||||
|
initfackCheck(index){
|
||||||
getCheckList() {
|
const that=this
|
||||||
if (!this.breakFlag) {
|
setTimeout(()=>{
|
||||||
|
console.log('indexindex',index)
|
||||||
|
if(index>=3){
|
||||||
|
this.getCheckList()
|
||||||
return
|
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() {
|
||||||
this.index = this.checkListCopy[0].key
|
this.index = this.checkListCopy[0].key
|
||||||
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))
|
||||||
@ -333,7 +347,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'))
|
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)
|
.width(138.5 * this.ratio)
|
||||||
.height(112.5 * this.ratio)
|
.height(112.5 * this.ratio)
|
||||||
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'))
|
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'))
|
||||||
.width(138.5 * this.ratio)
|
.width(138.5 * this.ratio)
|
||||||
.height(112.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'))
|
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'))
|
||||||
|
|||||||
@ -28,6 +28,7 @@ struct Index {
|
|||||||
@State isSingle: boolean = false;
|
@State isSingle: boolean = false;
|
||||||
@State deviceId: string = '';
|
@State deviceId: string = '';
|
||||||
@State angle: number = 0
|
@State angle: number = 0
|
||||||
|
@State dialogRatio: number = 0.8
|
||||||
@State ratio: number = 1700 / 960
|
@State ratio: number = 1700 / 960
|
||||||
@State loading: boolean = true
|
@State loading: boolean = true
|
||||||
@State fd: number = -1;
|
@State fd: number = -1;
|
||||||
@ -41,8 +42,8 @@ struct Index {
|
|||||||
|
|
||||||
@Styles
|
@Styles
|
||||||
commStyle(){
|
commStyle(){
|
||||||
.width(220 * this.ratio)
|
.width(220 * this.ratio*this.dialogRatio)
|
||||||
.height(69 * this.ratio)
|
.height(69 * this.ratio*this.dialogRatio)
|
||||||
.backgroundImage($r('app.media.button_nor'))
|
.backgroundImage($r('app.media.button_nor'))
|
||||||
.backgroundImageSize({ width: '100%', height: '100%' })
|
.backgroundImageSize({ width: '100%', height: '100%' })
|
||||||
.margin({ bottom: 12 * this.ratio})
|
.margin({ bottom: 12 * this.ratio})
|
||||||
@ -185,32 +186,33 @@ struct Index {
|
|||||||
if (this.dialogVisiable) {
|
if (this.dialogVisiable) {
|
||||||
Flex({justifyContent:FlexAlign.Center}) {
|
Flex({justifyContent:FlexAlign.Center}) {
|
||||||
Text('确认是否退出应用')
|
Text('确认是否退出应用')
|
||||||
.fontSize(28 * this.ratio)
|
.fontSize(28 * this.ratio*this.dialogRatio)
|
||||||
.margin({top:100*this.ratio})
|
.margin({top:100*this.ratio*this.dialogRatio})
|
||||||
Row() {
|
Row() {
|
||||||
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
|
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
|
||||||
Text(' 取 消 ').fontSize(24 * this.ratio).fontColor('#fff').width(100 * this.ratio)
|
Text(' 取 消 ').fontSize(24 * this.ratio*this.dialogRatio).fontColor('#fff').width(100 * this.ratio*this.dialogRatio)
|
||||||
}
|
}
|
||||||
.commStyle()
|
.commStyle()
|
||||||
.onClick(() => {
|
.onClick(() => {
|
||||||
this.dialogVisiable = false
|
this.dialogVisiable = false
|
||||||
})
|
}).margin({right:10*this.ratio})
|
||||||
|
|
||||||
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
|
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
|
||||||
Text(' 确 定 ').fontSize(24 * this.ratio).fontColor('#fff').width(100 * this.ratio)
|
Text(' 确 定 ').fontSize(24 * this.ratio*this.dialogRatio).fontColor('#fff').width(100 * this.ratio*this.dialogRatio)
|
||||||
}
|
}
|
||||||
.commStyle()
|
.commStyle()
|
||||||
.onClick(() => {
|
.onClick(() => {
|
||||||
router.back()
|
router.back()
|
||||||
})
|
})
|
||||||
}.position({ y: 265 * this.ratio, x: 115 * this.ratio })
|
}.position({ y: 265 * this.ratio*this.dialogRatio, x: 115 * this.ratio*this.dialogRatio })
|
||||||
|
|
||||||
}
|
}
|
||||||
.width(660 * this.ratio)
|
.width(660 * this.ratio*this.dialogRatio)
|
||||||
.height(360 * this.ratio)
|
.height(360 * this.ratio*this.dialogRatio)
|
||||||
.position({ x: 150 * this.ratio, y: 98 * this.ratio })
|
.position({ x: 220 * this.ratio, y: 98 * this.ratio-265/2*(1-this.ratio*this.dialogRatio) })
|
||||||
.backgroundColor('#E6E3DF')
|
.backgroundColor('#E6E3DF')
|
||||||
.borderRadius(19 * this.ratio)
|
//
|
||||||
|
.borderRadius(19 * this.ratio*this.dialogRatio)
|
||||||
}
|
}
|
||||||
if (this.loading) {
|
if (this.loading) {
|
||||||
Column() {
|
Column() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user