From c844c19b6021244a0f449f5ada9ae4f05eeef039 Mon Sep 17 00:00:00 2001 From: lvyuankang <1344032923@qq.com> Date: Wed, 31 Jul 2024 13:19:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=A1=E5=8F=B7=E6=98=BE=E7=A4=BA=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/ets/common/service/indexService.ts | 31 +++++++++++++---- .../ets/pages/compontents/SignDisplayCom.ets | 33 +++++++++++++++---- 2 files changed, 51 insertions(+), 13 deletions(-) diff --git a/entry/src/main/ets/common/service/indexService.ts b/entry/src/main/ets/common/service/indexService.ts index dbb41914..4e80c2f5 100644 --- a/entry/src/main/ets/common/service/indexService.ts +++ b/entry/src/main/ets/common/service/indexService.ts @@ -1,10 +1,7 @@ // @ts-nocheck import promptAction from '@ohos.promptAction' -import router from '@ohos.router' import { dateFormat } from '../utils/tools' import FileUtil from '../../common/utils/File' -import AccountTable from '../../common/database/tables/AccountTable' -import MA_SYSSET from '../../common/constants/MA_SYSSET' import { takePhoto } from '../../common/service/videoService' import { @@ -105,8 +102,28 @@ export async function getDoubleCeneterTable(param) { 'MA_ITEMINFO': false, 'MA_T_CARPARMSET': false } + const name = { + 'MA_MARKRULE': 'MA_MARKRULE', + 'MA_SYSTEMPARM': 'MA_SYSTEMPARM', + 'MA_MAP_COLLECT': 'MA_MAP_COLLECT', + 'MA_MAP_COLLECT_SHAPE': 'MA_MAP_COLLECT_SHAPE', + 'MA_MAP_ITEMCLASS': 'MA_MAP_ITEMCLASS', + 'MA_MAP_POINT': 'MA_MAP_POINT', + 'MA_MAP_POINT_ITEM': 'MA_MAP_POINT_ITEM', + 'MA_MAP_ROAD': 'MA_MAP_ROAD', + 'MA_MAP_ROAD_LANE': 'MA_MAP_ROAD_LANE', + 'MA_MAP_SUBITEM': 'MAP_SUBITEM', + 'ES_CARINFO': 'ES_CARINFO', + 'ES_EXAMPOINTDETAIL': 'ES_EXAMPOINTDETAIL', + 'MA_MARKRULESET': 'MA_MARKRULESET', + 'ES_CAR_VIDEO_PARAMETER': 'ES_CAR_VIDEO_PARAMETER', + 'MA_CDSBINFO': 'MA_CDSBINFO', + 'MA_ITEMINFO': 'MA_ITEMINFO', + 'MA_T_CARPARMSET': 'MA_T_CARPARMSET' + } + for (let key in typeObj) { - typeObj[key] = await upDateTable({ tableName: key }, param) + typeObj[key] = await upDateTable({ tableName: name[key] }, param) if (!typeObj[key]) { promptAction.showToast({ message: `未能查询到${key}表数据, 请先检查网络是否连接正常`, @@ -117,9 +134,9 @@ export async function getDoubleCeneterTable(param) { } } reslove(true) - router.pushUrl({ - url: 'pages/ExaminerLogin', - }, router.RouterMode.Single); + // router.pushUrl({ + // url: 'pages/ExaminerLogin', + // }, router.RouterMode.Single); }) } diff --git a/entry/src/main/ets/pages/compontents/SignDisplayCom.ets b/entry/src/main/ets/pages/compontents/SignDisplayCom.ets index 614af9ad..2bb75ade 100644 --- a/entry/src/main/ets/pages/compontents/SignDisplayCom.ets +++ b/entry/src/main/ets/pages/compontents/SignDisplayCom.ets @@ -172,7 +172,7 @@ export default struct SignDisplayCom { Text("改正数次数/改正数大小:" + this.signArr[58] || '0') .fontColor('#FFF5E5') .fontSize(14 * this.ratio) - .width('30%') + .width('25%') .textAlign(TextAlign.Start) }.justifyContent(FlexAlign.Start).padding({ left: 10 * this.ratio }).margin({ top: 8 * this.ratio }) } @@ -220,10 +220,11 @@ export default struct SignDisplayCom { Text('纬度:' + this.signArr[96]).fontColor('#FFB433').fontSize(14 * this.ratio).height(18 * this.ratio) Text('速度:' + this.signArr[97]).fontColor('#FFB433').fontSize(14 * this.ratio).height(18 * this.ratio) } + // .backgroundColor('red') .backgroundColor('#1A1A1A') - .width(138 * this.ratio) + // .width(180 * this.ratio) .height(300 * this.ratio) - .position({ y: 0 * this.ratio, x: 750 * this.ratio }) + .position({ y: 0 * this.ratio, x: 700 * this.ratio }) }.backgroundColor('#282828').width(this.ratio * 890).height(308 * this.ratio).margin({ top: 3 * this.ratio }) } .width(936 * this.ratio) @@ -234,6 +235,26 @@ export default struct SignDisplayCom { .backgroundImageSize({ width: '100%', height: '100%' }) .visibility(this.active == 0 ? Visibility.Visible : Visibility.None) + Column() { + Column() { + Text(this.msg) + .fontColor('#FFF5E5') + .fontSize(14 * this.ratio) + } + .backgroundColor('#282828') + .width(this.ratio * 890) + .height(436 * this.ratio) + .margin({ left: 0 * this.ratio, top: 15 * this.ratio }) + + } + .width(936 * this.ratio) + .height(480 * this.ratio) + .margin({ left: 10 * this.ratio }) + .padding({ left: 10 * this.ratio, right: 10 * this.ratio }) + .backgroundImage($r('app.media.km_open')) + .backgroundImageSize({ width: '100%', height: '100%' }) + .visibility(this.active == 2 ? Visibility.Visible : Visibility.None) + Row() { Flex({ direction: FlexDirection.Column }) { Row() { @@ -308,8 +329,8 @@ export default struct SignDisplayCom { if (showBack) { - this.ratio=1.4 - globalThis.udpClient.onMessage_1((msg) => { + this.ratio = 1.4 + globalThis.udpClient.onMessage_1 && globalThis.udpClient.onMessage_1((msg) => { console.log('msgmsg', msg) if (msg) { getSignal(msg) @@ -334,7 +355,7 @@ export default struct SignDisplayCom { const that = this const showBack = this.showBack; if (showBack) { - globalThis.udpClient.onMessage_1((msg) => { + globalThis.udpClient.onMessage_1 && globalThis.udpClient.onMessage_1((msg) => { getSignal(msg) }) } else {