蒋科 hai 2 meses
pai
achega
01515733df

+ 5 - 0
src/views/manage-log/battery-charger.vue

@@ -271,6 +271,11 @@ export default {
     //获取充电机日志列表
     getchargerList() {
       this.loading = true;
+      if(!this.dateTime){
+        this.queryParams.startTime = this.$moment().format("YYYY-MM-DD 00:00:00");
+        this.queryParams.endTime = this.$moment().format("YYYY-MM-DD 23:59:59");
+        this.dateTime=[this.queryParams.startTime,this.queryParams.endTime]
+      }
       chargerList(this.queryParams).then((res) => {
         this.datalist = res.data.list;
         this.total = res.data.total;

+ 6 - 3
src/views/manage-log/bms.vue

@@ -182,7 +182,7 @@ export default {
   data() {
     return {
       // 查询时间数组
-      dateTime: "",
+      dateTime: null,
       // 充电机ID下拉列表
       chargerArr: null,
       // 数据列表
@@ -225,7 +225,6 @@ export default {
     };
   },
   mounted() {
-    console.log(this,'this')
     this.onLoadHeight();
     this.changeWindow();
     this.getLogModel();
@@ -278,6 +277,11 @@ export default {
     //获取BMS日志列表
     getrobotList() {
       this.loading = true;
+      if(!this.dateTime){
+        this.queryParams.startTime = this.$moment().format("YYYY-MM-DD 00:00:00");
+        this.queryParams.endTime = this.$moment().format("YYYY-MM-DD 23:59:59");
+        this.dateTime=[this.queryParams.startTime,this.queryParams.endTime]
+      }
       bmsList(this.queryParams).then((res) => {
         this.datalist = res.data.list;
         this.total = res.data.total;
@@ -315,7 +319,6 @@ export default {
     },
     // 搜索
     handleQuery() {
-      console.log(this.queryParams.sn);
       if (this.dateTime || this.robotValue.length > 0 || this.queryParams.sn || this.queryParams.deviceNo != undefined) {
         if (this.dateTime) {
           this.queryParams.startTime = this.$moment(this.dateTime[0]).format(

+ 5 - 0
src/views/manage-log/order-charger.vue

@@ -271,6 +271,11 @@ export default {
     //获取充电机日志列表
     getchargerList() {
       this.loading = true;
+      if(!this.dateTime){
+        this.queryParams.startTime = this.$moment().format("YYYY-MM-DD 00:00:00");
+        this.queryParams.endTime = this.$moment().format("YYYY-MM-DD 23:59:59");
+        this.dateTime=[this.queryParams.startTime,this.queryParams.endTime]
+      }
       orderChargerList(this.queryParams).then((res) => {
         this.datalist = res.data.list;
         this.total = res.data.total;

+ 5 - 1
src/views/manage-log/robot.vue

@@ -233,7 +233,11 @@ export default {
     //获取机器人日志列表
     getrobotList() {
       this.loading = true;
-      console.log(this.queryParams, "queryparams");
+      if(!this.dateTime){
+        this.queryParams.startTime = this.$moment().format("YYYY-MM-DD 00:00:00");
+        this.queryParams.endTime = this.$moment().format("YYYY-MM-DD 23:59:59");
+        this.dateTime=[this.queryParams.startTime,this.queryParams.endTime]
+      }
       robotList(this.queryParams).then((res) => {
         this.datalist = res.data.list;
         this.total = res.data.total;