Compare commits
No commits in common. "ef2e07d1ac3f0dcc5b18b70184818afcb7ba9e98" and "16853a2cc5b083866fc697990456b47912192be6" have entirely different histories.
ef2e07d1ac
...
16853a2cc5
@ -101,6 +101,7 @@ struct Index {
|
||||
gateway: this.inputTextList1[5], //value.gateway网关
|
||||
netMask: this.inputTextList1[4], //value.netMask网络掩码
|
||||
dnsServers: this.inputTextList1[6],
|
||||
domain: ""
|
||||
}, (error: BusinessError) => {
|
||||
if (error) {
|
||||
Prompt.showToast({
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
import router from '@ohos.router';
|
||||
import FileLog from '../judgeSDK/utils/fileLog';
|
||||
import RealTime from '../compontents/judge/RealTime';
|
||||
import { GPSData, SignalData } from '../../mock';
|
||||
import { SignalDataType } from '../../model';
|
||||
|
||||
@Component
|
||||
export default struct SignDisplayCom {
|
||||
@State showBack: boolean = false
|
||||
@Prop showTrajectory: boolean = false
|
||||
@Prop showTrajectory:boolean = false
|
||||
@State scaleNum: number = 1
|
||||
@State msg: string = ''
|
||||
@State signArr: Array<string> = []
|
||||
@State signArr: Array<any> = []
|
||||
@State sjxhColum: Array<SignalDataType> = SignalData
|
||||
@State GPSColum: Array<SignalDataType> = GPSData
|
||||
@State udplocalIp: string = ''
|
||||
@ -181,7 +181,7 @@ export default struct SignDisplayCom {
|
||||
|
||||
Row() {
|
||||
Flex({ direction: FlexDirection.Column, wrap: FlexWrap.Wrap }) {
|
||||
ForEach(this.sjxhColum, (item: SignalDataType) => {
|
||||
ForEach(this.sjxhColum, (item) => {
|
||||
Column() {
|
||||
Text(`${item.key}:${item.value}`)
|
||||
.fontSize(14 * this.ratio)
|
||||
@ -216,10 +216,7 @@ export default struct SignDisplayCom {
|
||||
Text('时分秒:' + this.signArr[94]).fontColor('#FFB433').fontSize(14 * this.ratio).height(18 * this.ratio)
|
||||
Text('经度:' + this.signArr[95]).fontColor('#FFB433').fontSize(14 * this.ratio).height(18 * this.ratio)
|
||||
Text('纬度:' + this.signArr[96]).fontColor('#FFB433').fontSize(14 * this.ratio).height(18 * this.ratio)
|
||||
Text('速度:' + ((Number((this.signArr[97] || 0)) * 1.852).toFixed(2)).toString())
|
||||
.fontColor('#FFB433')
|
||||
.fontSize(14 * this.ratio)
|
||||
.height(18 * this.ratio)
|
||||
Text('速度:' +((Number((this.signArr[97]||0))*1.852).toFixed(2)).toString()).fontColor('#FFB433').fontSize(14 * this.ratio).height(18 * this.ratio)
|
||||
}
|
||||
.backgroundColor('#1A1A1A')
|
||||
.width(170 * this.ratio)
|
||||
@ -234,10 +231,9 @@ export default struct SignDisplayCom {
|
||||
.backgroundImage($r('app.media.km_open'))
|
||||
.backgroundImageSize({ width: '100%', height: '100%' })
|
||||
.visibility(this.active == 0 ? Visibility.Visible : Visibility.None)
|
||||
|
||||
Column() {
|
||||
Column() {
|
||||
Text(this.msg || '0')
|
||||
Text( this.msg || '0')
|
||||
.fontColor('#FFF5E5')
|
||||
.fontSize(14 * this.ratio)
|
||||
.width('100%')
|
||||
@ -257,7 +253,6 @@ export default struct SignDisplayCom {
|
||||
.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() {
|
||||
@ -276,7 +271,7 @@ export default struct SignDisplayCom {
|
||||
}.margin({ top: 10 * this.ratio })
|
||||
|
||||
Flex({ direction: FlexDirection.Column }) {
|
||||
ForEach(this.GPSColum, (item: SignalDataType) => {
|
||||
ForEach(this.GPSColum, (item) => {
|
||||
Column() {
|
||||
Text(`${item.key}:${item.value}`)
|
||||
.fontSize(12 * this.ratio)
|
||||
@ -300,7 +295,7 @@ export default struct SignDisplayCom {
|
||||
.width(550 * this.ratio)
|
||||
.height(380 * this.ratio)
|
||||
.backgroundColor('#1A1A1A')
|
||||
.margin({ top: 6 * this.ratio, })
|
||||
.margin({ top: 6 * this.ratio,})
|
||||
|
||||
}
|
||||
.width(936 * this.ratio)
|
||||
@ -327,12 +322,12 @@ export default struct SignDisplayCom {
|
||||
// this.udplocalIp=JSON.parse(data)?.udplocalIp||'192.168.7.170'
|
||||
this.ratio = this.ratio * (this.scaleNum || 1);
|
||||
const that = this
|
||||
const { showBack, getSignal } = this
|
||||
const {showBack,getSignal} = this
|
||||
|
||||
|
||||
if (showBack) {
|
||||
this.ratio = 1.4
|
||||
globalThis.udpClient.onMessage_1 && globalThis.udpClient.onMessage_1((msg) => {
|
||||
globalThis.udpClient.onMessage_1&&globalThis.udpClient.onMessage_1((msg) => {
|
||||
console.log('getUDPonMessage_1bysignDisplay0', msg)
|
||||
if (msg) {
|
||||
getSignal(msg)
|
||||
@ -341,7 +336,7 @@ export default struct SignDisplayCom {
|
||||
} else {
|
||||
clearInterval(this.signalTimer)
|
||||
this.signalTimer = setInterval(() => {
|
||||
const msgStr = AppStorage.get<string>('msgStr')
|
||||
const msgStr = AppStorage.get('msgStr')
|
||||
if (msgStr) {
|
||||
getSignal(msgStr)
|
||||
|
||||
@ -357,7 +352,7 @@ export default struct SignDisplayCom {
|
||||
const that = this
|
||||
const showBack = this.showBack;
|
||||
if (showBack) {
|
||||
globalThis.udpClient.onMessage_1 && globalThis.udpClient.onMessage_1((msg) => {
|
||||
globalThis.udpClient.onMessage_1&&globalThis.udpClient.onMessage_1((msg) => {
|
||||
console.log('getUDPonMessage_1bysignDisplay2', msg)
|
||||
|
||||
getSignal(msg)
|
||||
@ -366,14 +361,14 @@ export default struct SignDisplayCom {
|
||||
clearInterval(this.signalTimer)
|
||||
this.signalTimer = setInterval(() => {
|
||||
//TODO 临时方案
|
||||
const msgStr = AppStorage.get<string>('msgStr')
|
||||
const msgStr = AppStorage.get('msgStr')
|
||||
getSignal(msgStr)
|
||||
}, 200)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
getSignal = (msg: string) => {
|
||||
getSignal = (msg) => {
|
||||
const that = this;
|
||||
that.msg = msg
|
||||
const strachArr = msg.split(',')
|
||||
@ -415,11 +410,11 @@ export default struct SignDisplayCom {
|
||||
this.GPSColum[t].value = this.signArr[i]
|
||||
t++
|
||||
}
|
||||
this.GPSColum[14].value = ((Number((this.signArr[97] || 0)) * 1.852).toFixed(2)).toString()
|
||||
const str0 = this.signArr[93].substr(0, 2)
|
||||
const str1 = this.signArr[93].substr(2, 2)
|
||||
const str2 = this.signArr[93].substr(4.2)
|
||||
this.signArr[93] = str2 + str1 + str0
|
||||
this.GPSColum[14].value = ((Number((this.signArr[97]||0))*1.852).toFixed(2)).toString()
|
||||
const str0=this.signArr[93].substr(0,2)
|
||||
const str1=this.signArr[93].substr(2,2)
|
||||
const str2=this.signArr[93].substr(4.2)
|
||||
this.signArr[93]=str2+str1+str0
|
||||
this.GPSColum[10].value = this.signArr[93]
|
||||
|
||||
// this.signArr[53]=192.168.7.170'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import libJudgeSdk from 'libjudgesdk.so';
|
||||
import { JudgeBeginObj, JudgeInitObj, Plc } from '../../../model';
|
||||
import { JudgeInitObj } from '../../../model';
|
||||
|
||||
// import libJudgeSdk from '@ohos.judgesdk'
|
||||
/**
|
||||
@ -44,7 +44,7 @@ export async function examJudgeInit(data: JudgeInitObj) {
|
||||
*
|
||||
* @desc 执行实时考试过程 实时传递传感信息
|
||||
*/
|
||||
export async function examJudgeRealExam(data: Plc) {
|
||||
export async function examJudgeRealExam(data) {
|
||||
const str = JSON.stringify(data);
|
||||
const temp: number = libJudgeSdk.examJudgeRealExam(str, str.length);
|
||||
return await handle(temp, 'examJudgeRealExam')
|
||||
@ -115,7 +115,7 @@ export async function examJudgeMapSetDrawing(bool: boolean) {
|
||||
*
|
||||
* @desc开始考试
|
||||
*/
|
||||
export async function examJudgeBeginExam(data: JudgeBeginObj) {
|
||||
export async function examJudgeBeginExam(data) {
|
||||
const str = JSON.stringify(data);
|
||||
const temp: number = libJudgeSdk.examJudgeBeginExam(str, str.length);
|
||||
return await handle(temp, 'examJudgeBeginExam')
|
||||
@ -169,7 +169,7 @@ export async function examJudgeMapSetScaling(scaling?: number) {
|
||||
*@desc设置考试过程数据回调
|
||||
*
|
||||
*/
|
||||
export async function examJudgeSetPerformCallback(fn: Function) {
|
||||
export async function examJudgeSetPerformCallback(fn) {
|
||||
const temp: number = libJudgeSdk.examJudgeSetPerformCallback(fn);
|
||||
return await handle(temp, 'examJudgeSetPerformCallback')
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user