浏览代码

修复生产数据导出时默认日期值丢失的BUG

wukai 4 月之前
父节点
当前提交
a7f0c08a99
共有 2 个文件被更改,包括 8 次插入8 次删除
  1. 2 2
      public/conf.js
  2. 6 6
      src/pages/imp/imp01.vue

+ 2 - 2
public/conf.js

@@ -1,6 +1,6 @@
 AutoPlayer = false; //开启自动漫游
 ApiServer = "http://192.168.66.133:8080" //http://192.168.66.133:8080"; //服务接口地址
-PLAYER3D_URL = "ws://192.168.1.101:8082" // "ws://192.168.66.133:8082"; //
+PLAYER3D_URL = "ws://192.168.66.133:8082" // "ws://192.168.66.133:8082"; //
 DEV_ALAR_COLOR = "ff6c00"; //全局设备告警颜色
 DEV_HINT_COLOR = "d69d85"; //设备盘头剩余20-50之间的提示颜色
 DEV_OFFLINE_COLOR = "666666"; //设备未接入的颜色
@@ -56,4 +56,4 @@ Date.prototype.Format = function(fmt) { //author: meizz
     for (var k in o)
         if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
     return fmt;
-}
+}

+ 6 - 6
src/pages/imp/imp01.vue

@@ -7,7 +7,7 @@
                 <el-date-picker :value-format="'YYYY-MM-DD'" v-model="endDate" type="date" placeholder="选择日期"></el-date-picker>
                 <el-button style="margin-left:10px;display:none;" @click="impquery">查询</el-button>
                 <el-button style="margin-left:10px" @click="impdata">导出</el-button>
-            </span>                
+            </span>
         </div>
         <div style="height: 650px;width: 100%;background-color: rgb(237 237 237 / 23%);margin-top: 10px;display:none;">
             <table class="titletable" cellspacing="0" cellpadding="0">
@@ -61,7 +61,7 @@
     .el-input__wrapper input{
         border:0px !important;
         color:#fff;
-        
+
     }
 </style>
 <script>
@@ -76,7 +76,7 @@
                 type:Object
             }
         },
-        setup(props,{emit}){      
+        setup(props,{emit}){
             const width=ref(500);
             let startDate=ref('');
             let endDate = ref('');
@@ -104,8 +104,8 @@
                     day=day.setDate(day.getDate()-1);
                 }
                 var day1 = new Date().setDate(new Date(day).getDate()-7);
-                startDate.value = new Date(day1);
-                endDate.value  =new Date(day);
+                startDate.value = new Date(day1).Format('yyyy-MM-dd');
+                endDate.value  =new Date(day).Format('yyyy-MM-dd');
             })
 
             return{
@@ -118,4 +118,4 @@
             }
         }
     }
-</script>
+</script>