Merge pull request '表更新' (#47) from lv_chengmai into main
Reviewed-on: #47
This commit is contained in:
commit
ca57859bee
@ -17,12 +17,7 @@ export async function getTCP() {
|
|||||||
await globalThis.TcpClient.sendMsg('1002') //1002
|
await globalThis.TcpClient.sendMsg('1002') //1002
|
||||||
globalThis.TcpClient.onError((val) => {
|
globalThis.TcpClient.onError((val) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
globalThis.TcpClient.sendMsg('1002') //1002
|
getTCP()
|
||||||
if (val) {
|
|
||||||
// const msg=val.substring(5,val.length-1)
|
|
||||||
console.log('socketTag[PLC.UdpClient] status:', globalThis.udpClient.getStatus())
|
|
||||||
globalThis.udpClient?.sendMsg(val)
|
|
||||||
}
|
|
||||||
}, 1000)
|
}, 1000)
|
||||||
})
|
})
|
||||||
await globalThis.TcpClient.onMessage((val) => {
|
await globalThis.TcpClient.onMessage((val) => {
|
||||||
@ -46,12 +41,8 @@ export async function getTCP() {
|
|||||||
await globalThis.TcpClient.connectTcp()
|
await globalThis.TcpClient.connectTcp()
|
||||||
await globalThis.TcpClient.sendMsg('1002') //1002
|
await globalThis.TcpClient.sendMsg('1002') //1002
|
||||||
globalThis.TcpClient.onError((val) => {
|
globalThis.TcpClient.onError((val) => {
|
||||||
hilog.info(0x0000, 'testTag', "valvalval2" + JSON.stringify(val));
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
globalThis.TcpClient.sendMsg('1002') //1002
|
getTCP()
|
||||||
if (val && globalThis.udpClient?.sendMsg) {
|
|
||||||
globalThis.udpClient?.sendMsg(val)
|
|
||||||
}
|
|
||||||
}, 1000)
|
}, 1000)
|
||||||
})
|
})
|
||||||
await globalThis.TcpClient.onMessage((val) => {
|
await globalThis.TcpClient.onMessage((val) => {
|
||||||
|
|||||||
@ -7,7 +7,7 @@ export async function sendMsg(val) {
|
|||||||
// globalThis.udpClient1&&globalThis.udpClient1.sendMsg(val)
|
// globalThis.udpClient1&&globalThis.udpClient1.sendMsg(val)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getUDP() {
|
export async function getUDP(errorFlag?) {
|
||||||
return new Promise((reslove,reject)=>{
|
return new Promise((reslove,reject)=>{
|
||||||
getSyncData('IpConfigTable').then((result: Array<any>) => {
|
getSyncData('IpConfigTable').then((result: Array<any>) => {
|
||||||
if (result.length) {
|
if (result.length) {
|
||||||
@ -19,10 +19,19 @@ export async function getUDP() {
|
|||||||
globalThis.udpClient.rebindUdp(result[0].udplocalIp, result[0].udplocalIpPort, result[0].udpOppositeIp, result[0].udpOppositeIpPort)
|
globalThis.udpClient.rebindUdp(result[0].udplocalIp, result[0].udplocalIpPort, result[0].udpOppositeIp, result[0].udpOppositeIpPort)
|
||||||
globalThis.udpClient.sendMsg('111', null)
|
globalThis.udpClient.sendMsg('111', null)
|
||||||
globalThis.host = `http://${result[0].centerIp}:${result[0].centerPort}`
|
globalThis.host = `http://${result[0].centerIp}:${result[0].centerPort}`
|
||||||
|
globalThis.udpClient.onError_Callback(()=>{
|
||||||
|
console.log('getUDPgetUDPgetUDP')
|
||||||
|
getUDP(true)
|
||||||
|
if(errorFlag&&globalThis.udpClient&&globalThis.udpClient.onMessage_1){
|
||||||
|
globalThis.udpClient.onMessage_1=globalThis.udpClient.onMessage_1
|
||||||
|
}
|
||||||
|
})
|
||||||
reslove(`http://${result[0].centerIp}:${result[0].centerPort}`)
|
reslove(`http://${result[0].centerIp}:${result[0].centerPort}`)
|
||||||
|
|
||||||
// globalThis.udpClient.onError_resend(globalThis.udpClient.onMessage_1?globalThis.udpClient.onMessage_1:()=>{})
|
// globalThis.udpClient.onError_resend(globalThis.udpClient.onMessage_1?globalThis.udpClient.onMessage_1:()=>{})
|
||||||
}, 1000)
|
}, 1000)
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// 未绑定
|
// 未绑定
|
||||||
@ -31,11 +40,22 @@ export async function getUDP() {
|
|||||||
udpClient.bindUdp()
|
udpClient.bindUdp()
|
||||||
udpClient.sendMsg('111')
|
udpClient.sendMsg('111')
|
||||||
globalThis.host = `http://${result[0].centerIp}:${result[0].centerPort}`
|
globalThis.host = `http://${result[0].centerIp}:${result[0].centerPort}`
|
||||||
// udpClient.onError_resend(globalThis.udpClient.onMessage_1?globalThis.udpClient.onMessage_1:()=>{})
|
|
||||||
globalThis.udpClient = udpClient
|
globalThis.udpClient = udpClient
|
||||||
|
|
||||||
|
globalThis.udpClient.onMessage_1(()=>{
|
||||||
|
|
||||||
|
})
|
||||||
|
globalThis.udpClient.onError_Callback(()=>{
|
||||||
|
getUDP(true)
|
||||||
|
if(errorFlag&&globalThis.udpClient&&globalThis.udpClient.onMessage_1){
|
||||||
|
globalThis.udpClient.onMessage_1=globalThis.udpClient.onMessage_1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// udpClient.onError_resend(globalThis.udpClient.onMessage_1?globalThis.udpClient.onMessage_1:()=>{})
|
||||||
getChuankouFn()
|
getChuankouFn()
|
||||||
reslove(`http://${result[0].centerIp}:${result[0].centerPort}`)
|
reslove(`http://${result[0].centerIp}:${result[0].centerPort}`)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -56,7 +76,7 @@ export async function getUDP() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getUDP2() {
|
export async function getUDP2(errorFlag?) {
|
||||||
console.log(` getUDP2 enter`);
|
console.log(` getUDP2 enter`);
|
||||||
getSyncData('IpConfigTable').then(async (result: Array<any>) => {
|
getSyncData('IpConfigTable').then(async (result: Array<any>) => {
|
||||||
if (result.length) {
|
if (result.length) {
|
||||||
@ -66,6 +86,12 @@ export async function getUDP2() {
|
|||||||
globalThis.udpClient2.closeUdp(async () => {
|
globalThis.udpClient2.closeUdp(async () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
globalThis.udpClient2.rebindUdp(result[0].udplocalIp, '8800', globalThis.carInfo?.udpAddress, globalThis.carInfo?.messagePort)
|
globalThis.udpClient2.rebindUdp(result[0].udplocalIp, '8800', globalThis.carInfo?.udpAddress, globalThis.carInfo?.messagePort)
|
||||||
|
globalThis.udpClient2.onError_Callback(()=>{
|
||||||
|
getUDP2(true);
|
||||||
|
if(errorFlag&&globalThis.udpClient2&&globalThis.udpClient2.onMessage_2){
|
||||||
|
globalThis.udpClient2.onMessage_2=globalThis.udpClient2.onMessage_2
|
||||||
|
}
|
||||||
|
})
|
||||||
}, 1000)
|
}, 1000)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -74,7 +100,13 @@ export async function getUDP2() {
|
|||||||
console.log(` getUDP2 has no udclent and bind `);
|
console.log(` getUDP2 has no udclent and bind `);
|
||||||
const udpClient2: UdpClientByCenter = new UdpClientByCenter(result[0].udplocalIp, '8800', globalThis.carInfo?.udpAddress, globalThis.carInfo?.messagePort)
|
const udpClient2: UdpClientByCenter = new UdpClientByCenter(result[0].udplocalIp, '8800', globalThis.carInfo?.udpAddress, globalThis.carInfo?.messagePort)
|
||||||
await udpClient2.bindUdp()
|
await udpClient2.bindUdp()
|
||||||
await udpClient2.onError_Callback()
|
await udpClient2.onError_Callback(()=>{
|
||||||
|
getUDP2(true);
|
||||||
|
if(errorFlag&&globalThis.udpClient2&&globalThis.udpClient2.onMessage_2){
|
||||||
|
globalThis.udpClient2.onMessage_2=globalThis.udpClient2.onMessage_2
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if(!errorFlag){
|
||||||
await udpClient2.onMessage_2((val) => {
|
await udpClient2.onMessage_2((val) => {
|
||||||
if (val.id == '32') {
|
if (val.id == '32') {
|
||||||
globalThis.signNum = val.body[1]
|
globalThis.signNum = val.body[1]
|
||||||
@ -94,7 +126,9 @@ export async function getUDP2() {
|
|||||||
globalThis.udpClient2.send(param)
|
globalThis.udpClient2.send(param)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
globalThis.udpClient2 = udpClient2
|
globalThis.udpClient2 = udpClient2
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
globalThis.udpClient2 = {}
|
globalThis.udpClient2 = {}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import socket from '@ohos.net.socket';
|
import socket from '@ohos.net.socket';
|
||||||
import hilog from '@ohos.hilog';
|
import hilog from '@ohos.hilog';
|
||||||
|
import { getTCP } from './GlobalTcp';
|
||||||
|
|
||||||
const TAG = 'socketTag[TcpDemo.TcpClient]'
|
const TAG = 'socketTag[TcpDemo.TcpClient]'
|
||||||
|
|
||||||
@ -24,9 +25,7 @@ export default class TcpClient {
|
|||||||
this.tcp.on('error', err => {
|
this.tcp.on('error', err => {
|
||||||
console.log(TAG, 'tcpOnerror', JSON.stringify(err))
|
console.log(TAG, 'tcpOnerror', JSON.stringify(err))
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
await this.bindTcp()
|
getTCP()
|
||||||
await this.connectTcp()
|
|
||||||
this.onMessage(callback)
|
|
||||||
}, 2000)
|
}, 2000)
|
||||||
// this.closeUdp(()=>{
|
// this.closeUdp(()=>{
|
||||||
// this.bindUdp()
|
// this.bindUdp()
|
||||||
|
|||||||
@ -18,8 +18,8 @@ struct Index {
|
|||||||
// '',]
|
// '',]
|
||||||
// @State inputTextList2: string[] = ['192.168.7.124','20022']
|
// @State inputTextList2: string[] = ['192.168.7.124','20022']
|
||||||
|
|
||||||
@State inputTextList1: string[] = ['172.37.55.191','18782','172.37.55.191','8082','255.255.255.0','172.37.55.1','114.114.114.114','192.168.7.124','20022','172.37.55.59','20122']
|
// @State inputTextList1: string[] = ['172.37.55.191','18782','192.168.7.1','8082','255.255.255.0','192.168.7.170','114.114.114.114','192.168.7.124','20022','172.37.55.59','20122']
|
||||||
// @State inputTextList1: string[] = ['172.37.55.191','18782','172.37.55.191','8082','255.255.255.0','192.168.7.1','114.114.114.114','192.168.7.124','20022','192.168.7.170','20122']
|
@State inputTextList1: string[] = ['172.37.55.191','18782','172.37.55.191','8082','255.255.255.0','192.168.7.1','114.114.114.114','192.168.7.124','20022','192.168.7.170','20122']
|
||||||
// @State inputTextList2: string[] = []
|
// @State inputTextList2: string[] = []
|
||||||
// 112.80.35.83 11052
|
// 112.80.35.83 11052
|
||||||
// @State inputTextList1: string[] = ['192.168.36.2','8084','192.168.36.200','20122','255.255.255.0','192.168.36.1','','','114.114.114.114','192.168.36.139','8000']
|
// @State inputTextList1: string[] = ['192.168.36.2','8084','192.168.36.200','20122','255.255.255.0','192.168.36.1','','','114.114.114.114','192.168.36.139','8000']
|
||||||
|
|||||||
@ -17,18 +17,14 @@ import promptAction from '@ohos.promptAction';
|
|||||||
import FilePhoto from './judgeSDK/utils/filePhoto';
|
import FilePhoto from './judgeSDK/utils/filePhoto';
|
||||||
import { getSyncData, upDateTableByArray } from '../common/service/initable';
|
import { getSyncData, upDateTableByArray } from '../common/service/initable';
|
||||||
import { CandidateData, EmptyCandidateObject } from '../mock/CandidateData';
|
import { CandidateData, EmptyCandidateObject } from '../mock/CandidateData';
|
||||||
import BoardPrePareSetPopup from './compontents/judge/BoardPrePareSetPopup'
|
import BoardPrePareSetPopup from './compontents/judge/BoardPrePareSetPopup';
|
||||||
import LoadingPopup from './compontents/judge/LoadingPopup';
|
import LoadingPopup from './compontents/judge/LoadingPopup';
|
||||||
import VoiceAnnounce from './judgeSDK/utils/voiceAnnouncements';
|
import VoiceAnnounce from './judgeSDK/utils/voiceAnnouncements';
|
||||||
import { JudgeConfig } from '../config/judge';
|
|
||||||
import { judgeConfig } from './judgeSDK/utils/judgeConfig';
|
import { judgeConfig } from './judgeSDK/utils/judgeConfig';
|
||||||
|
|
||||||
@Entry
|
@Entry
|
||||||
@Component
|
@Component
|
||||||
struct UserInfo {
|
struct UserInfo {
|
||||||
private filePhoto: FilePhoto
|
|
||||||
private avPlayer
|
|
||||||
|
|
||||||
@State pageIndex: number = 0
|
@State pageIndex: number = 0
|
||||||
@State ratio: number = 1700 / 960
|
@State ratio: number = 1700 / 960
|
||||||
@State index: number = 0
|
@State index: number = 0
|
||||||
@ -47,9 +43,12 @@ struct UserInfo {
|
|||||||
@State isBoardPrePareSetPopupOpen: boolean = false
|
@State isBoardPrePareSetPopupOpen: boolean = false
|
||||||
@State isFirstBoardPrePareSetPopupBtnShow: boolean = false
|
@State isFirstBoardPrePareSetPopupBtnShow: boolean = false
|
||||||
@State isBoardPrePareSetPopupShow: boolean = false
|
@State isBoardPrePareSetPopupShow: boolean = false
|
||||||
@State isLoadingPopupVisible:boolean = false;
|
@State isLoadingPopupVisible: boolean = false;
|
||||||
@State loadingText:string = '正在认证监管信息,请稍后...'
|
@State loadingText: string = '正在认证监管信息,请稍后...'
|
||||||
@State sczbkf:{xmdm:number,kfdm:string}[] = []
|
@State sczbkf: {
|
||||||
|
xmdm: number,
|
||||||
|
kfdm: string
|
||||||
|
}[] = []
|
||||||
@State currentUser: User = EmptyCandidateObject
|
@State currentUser: User = EmptyCandidateObject
|
||||||
@State dataList: Array<User> = []
|
@State dataList: Array<User> = []
|
||||||
@State list: Array<User> = []
|
@State list: Array<User> = []
|
||||||
@ -62,7 +61,7 @@ struct UserInfo {
|
|||||||
@State idCard: string = '';
|
@State idCard: string = '';
|
||||||
@State grantDept: string = '';
|
@State grantDept: string = '';
|
||||||
//是否已经开始考试
|
//是否已经开始考试
|
||||||
@State isExamStart:boolean = false;
|
@State isExamStart: boolean = false;
|
||||||
@State effectDate: string = '';
|
@State effectDate: string = '';
|
||||||
@State interval: any = null;
|
@State interval: any = null;
|
||||||
@State studentRefreshStatue: string = '0';
|
@State studentRefreshStatue: string = '0';
|
||||||
@ -70,6 +69,7 @@ struct UserInfo {
|
|||||||
@State numCount: number = 0;
|
@State numCount: number = 0;
|
||||||
@State signNum: number = 0;
|
@State signNum: number = 0;
|
||||||
@State isCanClick: boolean = true;
|
@State isCanClick: boolean = true;
|
||||||
|
@State updateTimeLimit: boolean = true
|
||||||
@State faceFlag: string = '0';
|
@State faceFlag: string = '0';
|
||||||
@State FaceOpenStatue: string = '0'; //是否开启人脸识别
|
@State FaceOpenStatue: string = '0'; //是否开启人脸识别
|
||||||
subscriber;
|
subscriber;
|
||||||
@ -86,7 +86,10 @@ struct UserInfo {
|
|||||||
return photoBase64
|
return photoBase64
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private AccountTable = new AccountTable(() => {}, USER);
|
private filePhoto: FilePhoto
|
||||||
|
private avPlayer
|
||||||
|
private AccountTable = new AccountTable(() => {
|
||||||
|
}, USER);
|
||||||
private context = getContext(this) as common.UIAbilityContext;
|
private context = getContext(this) as common.UIAbilityContext;
|
||||||
private labelBlocks = [
|
private labelBlocks = [
|
||||||
{ label: '考生姓名', key: 'xm' },
|
{ label: '考生姓名', key: 'xm' },
|
||||||
@ -383,11 +386,15 @@ struct UserInfo {
|
|||||||
|
|
||||||
//获取下载考生
|
//获取下载考生
|
||||||
getExaminationStudentInfoFn() {
|
getExaminationStudentInfoFn() {
|
||||||
if (globalThis.singlePlay) {
|
if (globalThis.singlePlay && this.updateTimeLimit) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const param = `<getExaminationStudentInfoReq><head><checkCode>${Md5.Instance.get_md5(globalThis.carInfo.carId + globalThis.carInfo.examinationRoomId + globalThis.username)}</checkCode></head><body><carId>${globalThis.carInfo.carId}</carId><examinationRoomId>${globalThis.carInfo.examinationRoomId}</examinationRoomId><examinerName>${globalThis.username}</examinerName></body></getExaminationStudentInfoReq>`
|
const param = `<getExaminationStudentInfoReq><head><checkCode>${Md5.Instance.get_md5(globalThis.carInfo.carId + globalThis.carInfo.examinationRoomId + globalThis.username)}</checkCode></head><body><carId>${globalThis.carInfo.carId}</carId><examinationRoomId>${globalThis.carInfo.examinationRoomId}</examinationRoomId><examinerName>${globalThis.username}</examinerName></body></getExaminationStudentInfoReq>`
|
||||||
getExaminationStudentInfo(param).then(res => {
|
getExaminationStudentInfo(param).then(res => {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.updateTimeLimit = true
|
||||||
|
}, 30000)
|
||||||
|
this.updateTimeLimit = false
|
||||||
if (!res) {
|
if (!res) {
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
this.currentUser = EmptyCandidateObject
|
this.currentUser = EmptyCandidateObject
|
||||||
@ -513,12 +520,12 @@ struct UserInfo {
|
|||||||
this.currentUser.id = '1'
|
this.currentUser.id = '1'
|
||||||
const avPlayer = this.avPlayer;
|
const avPlayer = this.avPlayer;
|
||||||
this.isLoadingPopupVisible = true
|
this.isLoadingPopupVisible = true
|
||||||
avPlayer.playAudio([`voice/监管通信中.mp3`],false,async ()=>{
|
avPlayer.playAudio([`voice/监管通信中.mp3`], false, async () => {
|
||||||
const code = await this.beginExam();
|
const code = await this.beginExam();
|
||||||
if (code != 1) {
|
if (code != 1) {
|
||||||
promptAction.showToast({
|
promptAction.showToast({
|
||||||
message:'开始考试接口调用失败!',
|
message: '开始考试接口调用失败!',
|
||||||
duration:4000
|
duration: 4000
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -542,30 +549,30 @@ struct UserInfo {
|
|||||||
// 检测车门、熄火信号
|
// 检测车门、熄火信号
|
||||||
async checkSignal(): Promise<boolean> {
|
async checkSignal(): Promise<boolean> {
|
||||||
const {isCheckFireOpen} = judgeConfig
|
const {isCheckFireOpen} = judgeConfig
|
||||||
return new Promise((resolve,reject)=>{
|
return new Promise((resolve, reject) => {
|
||||||
if(isCheckFireOpen){
|
if (isCheckFireOpen) {
|
||||||
resolve(true)
|
resolve(true)
|
||||||
// return
|
// return
|
||||||
}
|
}
|
||||||
console.info('socketTag[PLC.UdpClient]', '注册udp回调')
|
console.info('socketTag[PLC.UdpClient]', '注册udp回调')
|
||||||
let plcValue = globalThis.udpClient.getCurrentMessage();
|
let plcValue = globalThis.udpClient.getCurrentMessage();
|
||||||
console.info('surenjun',plcValue)
|
console.info('surenjun', plcValue)
|
||||||
const msgArr = plcValue.split(',') || ''
|
const msgArr = plcValue.split(',') || ''
|
||||||
const mkg = msgArr[14];
|
const mkg = msgArr[14];
|
||||||
const fdjzs = msgArr[25];
|
const fdjzs = msgArr[25];
|
||||||
if(mkg == 1){
|
if (mkg == 1) {
|
||||||
this.avPlayer.playAudio(['voice/关门.mp3'])
|
this.avPlayer.playAudio(['voice/关门.mp3'])
|
||||||
promptAction.showToast({
|
promptAction.showToast({
|
||||||
message:'请关闭车门',
|
message: '请关闭车门',
|
||||||
duration:4000
|
duration: 4000
|
||||||
})
|
})
|
||||||
reject(false)
|
reject(false)
|
||||||
}
|
}
|
||||||
if(fdjzs*1 > 0){
|
if (fdjzs * 1 > 0) {
|
||||||
this.avPlayer.playAudio(['voice/熄火.mp3'])
|
this.avPlayer.playAudio(['voice/熄火.mp3'])
|
||||||
promptAction.showToast({
|
promptAction.showToast({
|
||||||
message:'请熄火',
|
message: '请熄火',
|
||||||
duration:4000
|
duration: 4000
|
||||||
})
|
})
|
||||||
reject(false)
|
reject(false)
|
||||||
}
|
}
|
||||||
@ -755,13 +762,7 @@ struct UserInfo {
|
|||||||
if (!this.currentUser.xm) {
|
if (!this.currentUser.xm) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// if(globalThis.spzdFlag){
|
|
||||||
// promptAction.showToast({
|
|
||||||
// message: '摄像头被遮挡',
|
|
||||||
// duration: 2000
|
|
||||||
// });
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
console.info('surenjun currentUser', JSON.stringify(this.currentUser))
|
console.info('surenjun currentUser', JSON.stringify(this.currentUser))
|
||||||
if (globalThis.singlePlay) {
|
if (globalThis.singlePlay) {
|
||||||
const {examSubject} = globalThis.carInfo;
|
const {examSubject} = globalThis.carInfo;
|
||||||
@ -846,7 +847,7 @@ struct UserInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// loading
|
// loading
|
||||||
if(this.isLoadingPopupVisible){
|
if (this.isLoadingPopupVisible) {
|
||||||
LoadingPopup({
|
LoadingPopup({
|
||||||
title: this.loadingText,
|
title: this.loadingText,
|
||||||
})
|
})
|
||||||
@ -886,7 +887,7 @@ struct CommText {
|
|||||||
|
|
||||||
build() {
|
build() {
|
||||||
Text(this.text)
|
Text(this.text)
|
||||||
.fontSize(16 * this.ratio)
|
.fontSize(19.5 * this.ratio)
|
||||||
.lineHeight(30 * this.ratio)
|
.lineHeight(30 * this.ratio)
|
||||||
.fontWeight(500)
|
.fontWeight(500)
|
||||||
.fontColor(this.color)
|
.fontColor(this.color)
|
||||||
@ -912,9 +913,13 @@ struct LabelBlock {
|
|||||||
|
|
||||||
build() {
|
build() {
|
||||||
Row() {
|
Row() {
|
||||||
Text(this.label).fontSize(16 * this.ratio).fontColor('#99948A')
|
Text(this.label).fontSize(18 * this.ratio).fontColor('#99948A')
|
||||||
Row() {
|
Row() {
|
||||||
Text(decodeURIComponent(this.value)).fontColor('#fff').textAlign(TextAlign.Center).width('100%')
|
Text(decodeURIComponent(this.value))
|
||||||
|
.fontColor('#fff')
|
||||||
|
.textAlign(TextAlign.Center)
|
||||||
|
.width('100%')
|
||||||
|
.fontSize(20 * this.ratio)
|
||||||
}
|
}
|
||||||
.commLabelStyle()
|
.commLabelStyle()
|
||||||
}.margin({ bottom: 10 * this.ratio })
|
}.margin({ bottom: 10 * this.ratio })
|
||||||
|
|||||||
@ -235,7 +235,28 @@ 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() {
|
||||||
|
Text( this.msg || '0')
|
||||||
|
.fontColor('#FFF5E5')
|
||||||
|
.fontSize(14 * this.ratio)
|
||||||
|
.width('100%')
|
||||||
|
.textAlign(TextAlign.Start)
|
||||||
|
|
||||||
|
}
|
||||||
|
.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() {
|
Row() {
|
||||||
Flex({ direction: FlexDirection.Column }) {
|
Flex({ direction: FlexDirection.Column }) {
|
||||||
Row() {
|
Row() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user