Przeglądaj źródła

fix:环境原始记录监控时间查询

zhangjingyuan 3 lat temu
rodzic
commit
7c1c88d678

+ 9 - 1
src/views/huanjingjiankong/shiyanshiyuanshijilu.vue

@@ -261,7 +261,15 @@ export default {
     filter() {
       let quyu =this.quyu;
       if(this.riqi){
-        var riqi =  this.riqi.getFullYear() + "-" + (this.riqi.getMonth() + 1) + "-" + this.riqi.getDate();
+        let month = (this.riqi.getMonth() + 1);
+        if(month < 9){
+          month = "0"+month;
+        }
+        let day = this.riqi.getDate();
+        if(day <9){
+          day = '0'+day
+        }
+        var riqi =  this.riqi.getFullYear() + "-" + month + "-" + day;
       }
       let sql = "";
       if (quyu && riqi) {