日期显示修改
This commit is contained in:
parent
2d562dd3f7
commit
8732b4f9cc
@ -20,6 +20,8 @@ export default struct SignDisplayCom {
|
|||||||
@State interval: number = 0
|
@State interval: number = 0
|
||||||
@State @Watch('outClick') outFlag: boolean = false;
|
@State @Watch('outClick') outFlag: boolean = false;
|
||||||
@State url: string = ''
|
@State url: string = ''
|
||||||
|
@State date: string = ''
|
||||||
|
@State time: string = ''
|
||||||
private timer = null
|
private timer = null
|
||||||
private udpClient: UdpClient = null
|
private udpClient: UdpClient = null
|
||||||
private FileLog: FileLog
|
private FileLog: FileLog
|
||||||
@ -215,8 +217,8 @@ export default struct SignDisplayCom {
|
|||||||
.fontColor('#FFB433')
|
.fontColor('#FFB433')
|
||||||
.fontSize(14 * this.ratio)
|
.fontSize(14 * this.ratio)
|
||||||
.height(18 * this.ratio)
|
.height(18 * this.ratio)
|
||||||
Text('年月日:' + this.signArr[93]).fontColor('#FFB433').fontSize(14 * this.ratio).height(18 * this.ratio)
|
Text('年月日:' + this.date).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.time]).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('速度:' + this.signArr[97]).fontColor('#FFB433').fontSize(14 * this.ratio).height(18 * this.ratio)
|
Text('速度:' + this.signArr[97]).fontColor('#FFB433').fontSize(14 * this.ratio).height(18 * this.ratio)
|
||||||
@ -414,6 +416,16 @@ export default struct SignDisplayCom {
|
|||||||
this.sjxhColum = JSON.parse(JSON.stringify((this.sjxhColum)))
|
this.sjxhColum = JSON.parse(JSON.stringify((this.sjxhColum)))
|
||||||
that.signArr = JSON.parse(JSON.stringify((this.signArr)))
|
that.signArr = JSON.parse(JSON.stringify((this.signArr)))
|
||||||
that.GPSColum = JSON.parse(JSON.stringify((this.GPSColum)))
|
that.GPSColum = JSON.parse(JSON.stringify((this.GPSColum)))
|
||||||
|
if(this.signArr.length){
|
||||||
|
this.date=this.signArr[93].substr(4,2)+this.signArr[93].substr(2,2)+this.signArr[93].substr(0,2)
|
||||||
|
const hours=(Number(this.signArr[94].substr(0,2))+8).toString()
|
||||||
|
if(hours.length<2){
|
||||||
|
this.time='0'+hours+this.signArr[93].substr(2,this.signArr[93].length)
|
||||||
|
}else{
|
||||||
|
this.time=hours+this.signArr[93].substr(2,this.signArr[93].length)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
outClick() {
|
outClick() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user