Compare commits

..

No commits in common. "ef2e07d1ac3f0dcc5b18b70184818afcb7ba9e98" and "16853a2cc5b083866fc697990456b47912192be6" have entirely different histories.

3 changed files with 25 additions and 29 deletions

View File

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

View File

@ -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
@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,7 +231,6 @@ 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')
@ -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)
@ -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)
@ -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(',')

View File

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