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