Przeglądaj źródła

修复 导出日期参数格式问题

liling 3 miesięcy temu
rodzic
commit
f29f9d646c

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

@@ -86,14 +86,14 @@
             }
 
             function impdata(){
-                if(startDate.value=='' || startDate.value==null || endDate.value=='' || endate.value==null ){
+                if(startDate.value=='' || startDate.value==null || endDate.value=='' || endDate.value==null ){
                     ElMessage({
                         message: "未选择正确的日期",
                         type: "error"
                     })
                     return;
                 }
-                window.open(ApiServer + "/api/export/production?start="+startDate.value+"&end="+endDate.value)
+                window.open(ApiServer + "/api/export/production?start="+startDate.value.Format('yyyy-MM-dd')+"&end="+endDate.value.Format('yyyy-MM-dd'))
             }
 
             onMounted(()=>{

+ 2 - 2
src/pages/imp/imp02.vue

@@ -70,8 +70,8 @@
                     })
                     return;
                 }
-                let s1 = startDate.value +" "+startH.value+":00:00";
-                let s2 = endDate.value +" "+endH.value+":00:00";
+                let s1 = startDate.value.Format('yyyy-MM-dd') +" "+startH.value+":00:00";
+                let s2 = endDate.value.Format('yyyy-MM-dd') +" "+endH.value+":00:00";
                 window.open(ApiServer + "/api/export/stops?start="+s1+"&end="+s2);
             }
 

+ 1 - 1
src/pages/imp/imp03.vue

@@ -55,7 +55,7 @@
                     })
                     return;
                 }
-                window.open(ApiServer + "/api/export/broken-yarn?date="+startDate.value)
+                window.open(ApiServer + "/api/export/broken-yarn?date="+startDate.value.Format('yyyy-MM-dd'))
             }
 
             onMounted(()=>{

+ 1 - 1
src/pages/imp/imp04.vue

@@ -72,7 +72,7 @@
                     })
                     return;
                 }
-                window.open(ApiServer + "/api/export/stops/type/7?start="+startDate.value+"&end="+endDate.value+"&st="+startH.value+"&et="+endH.value)
+                window.open(ApiServer + "/api/export/stops/type/7?start="+startDate.value.Format('yyyy-MM-dd')+"&end="+endDate.value.Format('yyyy-MM-dd')+"&st="+startH.value+"&et="+endH.value)
             }
 
             onMounted(()=>{

+ 1 - 1
src/pages/imp/imp05.vue

@@ -72,7 +72,7 @@
                     })
                     return;
                 }
-                window.open(ApiServer + "/api/export/stops/type/6?start="+startDate.value+"&end="+endDate.value+"&st="+startH.value+"&et="+endH.value)
+                window.open(ApiServer + "/api/export/stops/type/6?start="+startDate.value.Format('yyyy-MM-dd')+"&end="+endDate.value.Format('yyyy-MM-dd')+"&st="+startH.value+"&et="+endH.value)
             }
 
             onMounted(()=>{

+ 2 - 2
src/pages/imp/imp06.vue

@@ -70,8 +70,8 @@
                     })
                     return;
                 }
-                let s1 = startDate.value +" "+startH.value+":00:00";
-                let s2 = endDate.value +" "+endH.value+":00:00";
+                let s1 = startDate.value.Format('yyyy-MM-dd') +" "+startH.value+":00:00";
+                let s2 = endDate.value.Format('yyyy-MM-dd') +" "+endH.value+":00:00";
                 window.open(ApiServer + "/api/export/alarms?start="+s1+"&end="+s2);
             }
 

+ 1 - 1
src/pages/imp/imp10.vue

@@ -55,7 +55,7 @@
                     })
                     return;
                 }
-                window.open(ApiServer + "/api/export/productivity-day?date="+startDate.value);
+                window.open(ApiServer + "/api/export/productivity-day?date="+startDate.value.Format('yyyy-MM-dd'));
             }
 
             onMounted(()=>{

+ 1 - 1
src/pages/imp/imp11.vue

@@ -55,7 +55,7 @@
                     })
                     return;
                 }
-                window.open(ApiServer + "/api/export/productivity-month?date="+startDate.value);
+                window.open(ApiServer + "/api/export/productivity-month?date="+startDate.value.Format('yyyy-MM-dd'));
             }
 
             onMounted(()=>{

+ 1 - 1
src/pages/imp/imp12.vue

@@ -56,7 +56,7 @@
                     })
                     return;
                 }
-                window.open(ApiServer + "/api/export/energy-day?date="+startDate.value);
+                window.open(ApiServer + "/api/export/energy-day?date="+startDate.value.Format('yyyy-MM-dd'));
             }
 
             onMounted(()=>{

+ 1 - 1
src/pages/imp/imp13.vue

@@ -56,7 +56,7 @@
                     })
                     return;
                 }
-                window.open(ApiServer + "/api/export/energy-month?date="+startDate.value)
+                window.open(ApiServer + "/api/export/energy-month?date="+startDate.value.Format('yyyy-MM-dd'))
             }
 
             onMounted(()=>{

+ 2 - 2
src/pages/imp/imp14.vue

@@ -64,8 +64,8 @@
                     })
                     return;
                 }
-                let s1 = startDate.value ;// +" "+startH.value+":00:00";
-                let s2 = endDate.value;// +" "+endH.value+":00:00";
+                let s1 = startDate.value.Format('yyyy-MM-dd') ;// +" "+startH.value+":00:00";
+                let s2 = endDate.value.Format('yyyy-MM-dd');// +" "+endH.value+":00:00";
                 window.open(ApiServer + "/api/export/order?start="+s1+"&end="+s2)
             }
 

+ 1 - 1
src/pages/main/index.vue

@@ -127,7 +127,7 @@ export default {
                 userTimeout: 1000 * 60 * 5, // 用户操作超时设置,毫秒
                 exitTimeout: 1000 * 60 * 60 * 999999, // 用户超时后多久断开会话
                 maxTimeout: 1000, // 会话超时时间,允许掉线后引擎保存多久,在该时间内可重新连接到会话,否则会创建新的会话
-                debug: true // 是否启用调试,开启后调用Native接口时会使用console.log进行记录
+                debug: false // 是否启用调试,开启后调用Native接口时会使用console.log进行记录
             });
             //2.[可选]监听连接成功消息
             player.on("Connected", () => {