彈框修改
This commit is contained in:
parent
4e4d357f7a
commit
5fba22c2ed
@ -324,33 +324,33 @@ export default class UdpClientByCenter {
|
||||
// getUDP(globalThis.context,true)
|
||||
globalThis.title='差分状态异常'
|
||||
globalThis.type='3'
|
||||
AppStorage.SetOrCreate('errorMsg', 1);
|
||||
if(this.errorStep!=1){
|
||||
this.errorStep=1
|
||||
this.avPlayer.playAudio(['voice/差分状态异常.wav'])
|
||||
getSyncData('MA_SYSSET').then(syssetParams => {
|
||||
// @ts-ignore
|
||||
syssetParams.forEach(sys => {
|
||||
// 差分长时间是SINGLE状态报考车故障,停止考试(0-否 1-是)
|
||||
if (sys.v_no === '424'&&sys.v_value==1){
|
||||
//plc差分丢失
|
||||
console.log('sys.v_valuesys.v_valuesys.v_value',sys.v_value)
|
||||
AppStorage.SetOrCreate('errorCode', 0);
|
||||
AppStorage.SetOrCreate('errorCodeFlage', true);
|
||||
|
||||
}
|
||||
})
|
||||
// const errorParam = syssetParams.filter(sys => sys.v_no === '424') //
|
||||
// that.studentRefreshStatue = studentRefreshParam?.[0]?.v_value || '0'
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
// AppStorage.SetOrCreate('errorCode', 1);
|
||||
// if(this.errorStep!=1){
|
||||
// this.errorStep=1
|
||||
// this.avPlayer.playAudio(['voice/差分状态异常.wav'])
|
||||
// getSyncData('MA_SYSSET').then(syssetParams => {
|
||||
// // @ts-ignore
|
||||
// syssetParams.forEach(sys => {
|
||||
// // 差分长时间是SINGLE状态报考车故障,停止考试(0-否 1-是)
|
||||
// if (sys.v_no === '424'&&sys.v_value==1){
|
||||
// //plc差分丢失
|
||||
// console.log('sys.v_valuesys.v_valuesys.v_value',sys.v_value)
|
||||
// AppStorage.SetOrCreate('errorCode', 0);
|
||||
// AppStorage.SetOrCreate('errorCodeFlage', true);
|
||||
//
|
||||
// }
|
||||
// })
|
||||
// // const errorParam = syssetParams.filter(sys => sys.v_no === '424') //
|
||||
// // that.studentRefreshStatue = studentRefreshParam?.[0]?.v_value || '0'
|
||||
//
|
||||
//
|
||||
// });
|
||||
// }
|
||||
}
|
||||
}else{
|
||||
AppStorage.SetOrCreate('errorCode', -1);
|
||||
AppStorage.SetOrCreate('errorCodeFlage', false);
|
||||
this.errorStep=0
|
||||
// AppStorage.SetOrCreate('errorCode', -1);
|
||||
// AppStorage.SetOrCreate('errorCodeFlage', false);
|
||||
// this.errorStep=0
|
||||
globalThis.dialogOpen=false
|
||||
}
|
||||
this.chafenFlag=0
|
||||
@ -401,30 +401,30 @@ export default class UdpClientByCenter {
|
||||
globalThis.title='plc udp信号丢失'
|
||||
globalThis.type='3'
|
||||
if(!globalThis.dialogOpen){
|
||||
AppStorage.SetOrCreate('errorMsg', 1);
|
||||
if(this.errorStep!=1){
|
||||
console.log('sys.v_valuesys.v_valuesys.v_value11221')
|
||||
|
||||
this.errorStep=1
|
||||
this.avPlayer.playAudio(['voice/差分状态异常.wav'])
|
||||
getSyncData('MA_SYSSET').then(syssetParams => {
|
||||
console.log('sys.v_valuesys.v_valuesys.v_value11221',JSON.stringify(syssetParams))
|
||||
// @ts-ignore
|
||||
syssetParams.forEach(sys => {
|
||||
// 差分长时间是SINGLE状态报考车故障,停止考试(0-否 1-是)
|
||||
if (sys.v_no === '424'&&sys.v_value==1){
|
||||
//plc差分丢失
|
||||
AppStorage.SetOrCreate('errorCode', 0);
|
||||
AppStorage.SetOrCreate('errorCodeFlage', true);
|
||||
|
||||
}
|
||||
})
|
||||
// const errorParam = syssetParams.filter(sys => sys.v_no === '424') //
|
||||
// that.studentRefreshStatue = studentRefreshParam?.[0]?.v_value || '0'
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
// AppStorage.SetOrCreate('errorCode', 1);
|
||||
// if(this.errorStep!=1){
|
||||
// console.log('sys.v_valuesys.v_valuesys.v_value11221')
|
||||
//
|
||||
// this.errorStep=1
|
||||
// this.avPlayer.playAudio(['voice/差分状态异常.wav'])
|
||||
// getSyncData('MA_SYSSET').then(syssetParams => {
|
||||
// console.log('sys.v_valuesys.v_valuesys.v_value11221',JSON.stringify(syssetParams))
|
||||
// // @ts-ignore
|
||||
// syssetParams.forEach(sys => {
|
||||
// // 差分长时间是SINGLE状态报考车故障,停止考试(0-否 1-是)
|
||||
// if (sys.v_no === '424'&&sys.v_value==1){
|
||||
// //plc差分丢失
|
||||
// AppStorage.SetOrCreate('errorCode', 0);
|
||||
// AppStorage.SetOrCreate('errorCodeFlage', true);
|
||||
//
|
||||
// }
|
||||
// })
|
||||
// // const errorParam = syssetParams.filter(sys => sys.v_no === '424') //
|
||||
// // that.studentRefreshStatue = studentRefreshParam?.[0]?.v_value || '0'
|
||||
//
|
||||
//
|
||||
// });
|
||||
// }
|
||||
}
|
||||
num = 0
|
||||
}
|
||||
|
||||
@ -72,8 +72,9 @@ export default async function request(req: any) {
|
||||
}else{
|
||||
globalThis.type='1'
|
||||
const resultMessage = res?.body?.resultMessage || res?.head?.resultMessage
|
||||
AppStorage.SetOrCreate('errorMsg', 1);
|
||||
// AppStorage.SetOrCreate('errorMsg', 1);
|
||||
globalThis.title=decodeURIComponent(resultMessage)
|
||||
globalThis.errorDialog.open()
|
||||
prompt.showToast({
|
||||
message: decodeURIComponent(resultMessage),
|
||||
duration: 3000
|
||||
@ -90,8 +91,10 @@ export default async function request(req: any) {
|
||||
}else {
|
||||
globalThis.type='1'
|
||||
if(!host){
|
||||
AppStorage.SetOrCreate('errorMsg', 1);
|
||||
// AppStorage.SetOrCreate('errorMsg', 1);
|
||||
globalThis.title=decodeURIComponent(resObj.resultMessage)
|
||||
globalThis.errorDialog.open()
|
||||
|
||||
}
|
||||
|
||||
prompt.showToast({
|
||||
@ -159,6 +162,8 @@ function handleCenterCode(msgXml,isNewCenter){
|
||||
const {code,message,keystr} = result
|
||||
if(code != '1'){
|
||||
const rMessage = decodeURIComponent(message as string)
|
||||
globalThis.title=rMessage
|
||||
globalThis.errorDialog.open()
|
||||
prompt.showToast({
|
||||
message:rMessage,
|
||||
duration: 3000
|
||||
@ -181,6 +186,8 @@ function handleCenterCode(msgXml,isNewCenter){
|
||||
message: decodeURIComponent(message as string),
|
||||
duration: 3000
|
||||
});
|
||||
globalThis.title=decodeURIComponent(message as string)
|
||||
globalThis.errorDialog.open()
|
||||
return {code,message:decodeURIComponent(message)}
|
||||
}else{
|
||||
return { code }
|
||||
|
||||
@ -101,21 +101,14 @@ struct Index {
|
||||
if (this.loading) {
|
||||
return
|
||||
}
|
||||
const data=AppStorage.Get('errorCode'); // returns 47
|
||||
if(data==0){
|
||||
globalThis.title='差分状态异常'
|
||||
globalThis.type='3'
|
||||
AppStorage.SetOrCreate('errorMsg', 1);
|
||||
return
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.angle = 360
|
||||
}, 1000)
|
||||
this.angle = 0
|
||||
if (!globalThis.timeInfo) {
|
||||
globalThis.type='1'
|
||||
AppStorage.SetOrCreate('errorMsg', 1);
|
||||
globalThis.title='时间同步接口连接失败'
|
||||
this.errorDialog.open()
|
||||
promptAction.showToast({
|
||||
message: `时间同步接口连接失败`,
|
||||
duration: 3000
|
||||
@ -129,8 +122,8 @@ struct Index {
|
||||
duration: 3000
|
||||
});
|
||||
globalThis.type='1'
|
||||
AppStorage.SetOrCreate('errorMsg', 1);
|
||||
globalThis.title='车辆信息接口获取失败'
|
||||
this.errorDialog.open()
|
||||
this.loading = false
|
||||
return
|
||||
}
|
||||
@ -296,7 +289,7 @@ struct Index {
|
||||
this.angle = 0
|
||||
this.loading = false
|
||||
globalThis.lsh = '1111111111111'
|
||||
|
||||
globalThis.errorDialog=this.errorDialog
|
||||
const distanceClass = new GetDistance(globalThis.context)
|
||||
await distanceClass.initFolder()
|
||||
globalThis.distanceClass = distanceClass
|
||||
@ -363,7 +356,6 @@ struct Index {
|
||||
async onPageShow() {
|
||||
console.log('ttttt', 1111)
|
||||
this.userAuth();
|
||||
console.log('ttttt2222', 1111)
|
||||
|
||||
this.vocObj = new voiceService(async (status, val, next) => {
|
||||
});
|
||||
@ -442,16 +434,16 @@ struct Index {
|
||||
if (this.num >= 3) {
|
||||
this.heartMsg()
|
||||
}
|
||||
const data=AppStorage.Get('errorMsg');
|
||||
console.log('1123',data,globalThis.type,globalThis.dialogOpen)
|
||||
if(data==1){
|
||||
if(globalThis.type=='3'&&!globalThis.dialogOpen){
|
||||
globalThis.dialogOpen=true
|
||||
this.errorDialog.open()
|
||||
}else if(globalThis.type=='1'){
|
||||
this.errorDialog.open()
|
||||
}
|
||||
}
|
||||
// const data=AppStorage.Get('errorMsg');
|
||||
// console.log('1123',data,globalThis.type,globalThis.dialogOpen)
|
||||
// if(data==1){
|
||||
// if(globalThis.type=='3'&&!globalThis.dialogOpen){
|
||||
// globalThis.dialogOpen=true
|
||||
// this.errorDialog.open()
|
||||
// }else if(globalThis.type=='1'){
|
||||
// this.errorDialog.open()
|
||||
// }
|
||||
// }
|
||||
}, 1000)
|
||||
//下载模型
|
||||
// await this.getModel()
|
||||
|
||||
@ -54,9 +54,9 @@ export default struct errorMsgDialog {
|
||||
.onClick(() => {
|
||||
if (this.controller != undefined) {
|
||||
const errorCode=AppStorage.Get('errorMsg');
|
||||
const errorCodeFlage=AppStorage.Get('errorCodeFlage');
|
||||
console.log('errorCode',errorCode,errorCodeFlage)
|
||||
if(errorCode==0&&errorCodeFlage){
|
||||
// const errorCodeFlage=AppStorage.Get('errorCodeFlage');
|
||||
// console.log('errorCode',errorCode,errorCodeFlage)
|
||||
if(errorCode==0){
|
||||
router.replaceUrl({
|
||||
url: 'pages/Index',
|
||||
}, router.RouterMode.Single);
|
||||
@ -76,7 +76,7 @@ export default struct errorMsgDialog {
|
||||
}
|
||||
.commStyle()
|
||||
.onClick(() => {
|
||||
const errorCode=AppStorage.Get('errorMsg');
|
||||
const errorCode=AppStorage.Get('errorCode');
|
||||
const errorCodeFlage=AppStorage.Get('errorCodeFlage');
|
||||
console.log('errorCode',errorCode,errorCodeFlage)
|
||||
if(errorCode==0&&errorCodeFlage){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user