diff --git a/src/views/photographicDevice/components/parameterSetDialog.vue b/src/views/photographicDevice/components/parameterSetDialog.vue index 7bd6955..2d3a984 100644 --- a/src/views/photographicDevice/components/parameterSetDialog.vue +++ b/src/views/photographicDevice/components/parameterSetDialog.vue @@ -30,7 +30,7 @@ > {}); }, handleFocus() { - this.deviceTimeForm.newzztime = new Date(); + if ( + this.devicenewtime == "" || + this.devicenewtime == undefined || + this.devicenewtime == null + ) { + this.devicenewtime = new Date(); + console.log(this.devicenewtime); + } }, //装置时间查询 searchTime() { @@ -931,8 +940,12 @@ export default { //设置装置时间: .\bin\xympadmn.exe --server=127.0.0.1 --port=6891 --act=time --cmdid=XY-SIMULATOR-0015 --flag=1 --time=20230101122322 setTime() { if (this.rowData.isonline || this.rowData.onlinestatus === 1) { - console.log(this.deviceTimeForm.newzztime); - if (this.deviceTimeForm.newzztime !== "") { + console.log(this.devicenewtime); + if ( + this.devicenewtime !== "" && + this.devicenewtime !== undefined && + this.devicenewtime !== null + ) { this.timesetLoading = true; let params = [ { @@ -945,7 +958,7 @@ export default { }, { name: "time", - value: this.deviceTimeForm.newzztime, + value: this.devicenewtime / 1000, }, ]; this.setTermFn(params); @@ -1563,12 +1576,10 @@ export default { console.log(JSON.parse(res.data.data)); //时间 console.log(this.tabName); - this.deviceTimeForm = JSON.parse(res.data.data); + //this.devicenewtime = JSON.parse(res.data.data).timestamp * 1000; if (this.tabName == "装置时间") { - this.showLookTime = true; - this.deviceTimeForm.zztime = this.deviceTimeForm.timestamp * 1000; - console.log(this.deviceTimeForm.zztime); - return; + this.devicetime = JSON.parse(res.data.data).timestamp * 1000; + console.log(this.devicetime); } //采集参数 this.samplingForm = JSON.parse(res.data.data); @@ -1705,8 +1716,8 @@ export default { this.isShow = false; this.activeName = "1"; this.tabsActive = "first"; - this.deviceTimeForm = {}; this.samplingForm = {}; + this.upperComputer = {}; this.idParameter = {}; this.gpsForm = {};