wp1.0
fanluyan 1 year ago
parent e3b3e08682
commit 5c3ce1f285

@ -30,7 +30,7 @@
> >
<el-form-item label="装置时间"> <el-form-item label="装置时间">
<el-date-picker <el-date-picker
v-model="deviceTimeForm.zztime" v-model="devicetime"
type="datetime" type="datetime"
placeholder="查询日期时间" placeholder="查询日期时间"
value-format="timestamp" value-format="timestamp"
@ -45,7 +45,7 @@
<el-form-item label="新装置时间"> <el-form-item label="新装置时间">
<!-- <el-input v-model="deviceTimeForm.newzztime"></el-input> --> <!-- <el-input v-model="deviceTimeForm.newzztime"></el-input> -->
<el-date-picker <el-date-picker
v-model="deviceTimeForm.newzztime" v-model="devicenewtime"
type="datetime" type="datetime"
placeholder="选择日期时间" placeholder="选择日期时间"
value-format="timestamp" value-format="timestamp"
@ -761,6 +761,8 @@ export default {
activeName: "1", activeName: "1",
timeLoading: false, timeLoading: false,
timesetLoading: false, timesetLoading: false,
devicenewtime: "",
devicetime: "",
deviceTimeForm: { deviceTimeForm: {
zztime: "", // zztime: "", //
newzztime: "", // newzztime: "", //
@ -900,7 +902,14 @@ export default {
.catch((err) => {}); .catch((err) => {});
}, },
handleFocus() { handleFocus() {
this.deviceTimeForm.newzztime = new Date(); if (
this.devicenewtime == "" ||
this.devicenewtime == undefined ||
this.devicenewtime == null
) {
this.devicenewtime = new Date();
console.log(this.devicenewtime);
}
}, },
// //
searchTime() { 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 // .\bin\xympadmn.exe --server=127.0.0.1 --port=6891 --act=time --cmdid=XY-SIMULATOR-0015 --flag=1 --time=20230101122322
setTime() { setTime() {
if (this.rowData.isonline || this.rowData.onlinestatus === 1) { if (this.rowData.isonline || this.rowData.onlinestatus === 1) {
console.log(this.deviceTimeForm.newzztime); console.log(this.devicenewtime);
if (this.deviceTimeForm.newzztime !== "") { if (
this.devicenewtime !== "" &&
this.devicenewtime !== undefined &&
this.devicenewtime !== null
) {
this.timesetLoading = true; this.timesetLoading = true;
let params = [ let params = [
{ {
@ -945,7 +958,7 @@ export default {
}, },
{ {
name: "time", name: "time",
value: this.deviceTimeForm.newzztime, value: this.devicenewtime / 1000,
}, },
]; ];
this.setTermFn(params); this.setTermFn(params);
@ -1563,12 +1576,10 @@ export default {
console.log(JSON.parse(res.data.data)); console.log(JSON.parse(res.data.data));
// //
console.log(this.tabName); console.log(this.tabName);
this.deviceTimeForm = JSON.parse(res.data.data); //this.devicenewtime = JSON.parse(res.data.data).timestamp * 1000;
if (this.tabName == "装置时间") { if (this.tabName == "装置时间") {
this.showLookTime = true; this.devicetime = JSON.parse(res.data.data).timestamp * 1000;
this.deviceTimeForm.zztime = this.deviceTimeForm.timestamp * 1000; console.log(this.devicetime);
console.log(this.deviceTimeForm.zztime);
return;
} }
// //
this.samplingForm = JSON.parse(res.data.data); this.samplingForm = JSON.parse(res.data.data);
@ -1705,8 +1716,8 @@ export default {
this.isShow = false; this.isShow = false;
this.activeName = "1"; this.activeName = "1";
this.tabsActive = "first"; this.tabsActive = "first";
this.deviceTimeForm = {};
this.samplingForm = {}; this.samplingForm = {};
this.upperComputer = {}; this.upperComputer = {};
this.idParameter = {}; this.idParameter = {};
this.gpsForm = {}; this.gpsForm = {};

Loading…
Cancel
Save