Compare commits

..

2 Commits

Author SHA1 Message Date
7338d854b4 Merge pull request '信号显示修改' (#39) from lv_chengmai into main
Reviewed-on: #39
2024-07-31 14:01:53 +08:00
c844c19b60 信号显示修改 2024-07-31 13:19:41 +08:00
2 changed files with 51 additions and 13 deletions

View File

@ -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);
})
}

View File

@ -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 {