From 102c7d7dc9f5af873f19c86a0d17d5d6addcbc32 Mon Sep 17 00:00:00 2001
From: zhuzhuanzhuan
Date: 星期二, 19 九月 2023 17:39:28 +0800
Subject: [PATCH] 项目优化

---
 src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementModal.vue |   22 +++++++++++++++++++---
 1 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementModal.vue b/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementModal.vue
index ff5ad89..6d49fa1 100644
--- a/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementModal.vue
+++ b/src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementModal.vue
@@ -6,7 +6,7 @@
         <a-row :gutter="24">
           <a-col :span="24">
             <a-form-item label="鐝閫夋嫨" :labelCol="labelColLong" :wrapperCol="wrapperColLong">
-              <a-input-search :readOnly="true" v-decorator="['ids', validatorRules.ids]"
+              <a-input-search :readOnly="true" v-decorator="['calendarId', validatorRules.calendarId]"
                               @search="deviceSearch" enter-button/>
             </a-form-item>
           </a-col>
@@ -151,12 +151,12 @@
           if (i == 0) {
             calendarId =  val[i].id;
           } else {
-            calendarId = ids + "," + val[i].id;
+            calendarId = calendarId + "," + val[i].id;
           }
         }
         // console.log("========",equipmentIds);
         this.form.setFieldsValue({
-          ids: calendarId,
+          calendarId: calendarId,
         })
         //   this.form.setFieldsValue({
         // equipmentId: val.equipmentId,
@@ -212,6 +212,19 @@
         this.visible = false
         this.show = false
       },
+      fun(obj) {
+    if(obj){
+      if (obj = obj.split("T")) {
+        var tim = obj[1];
+        if(tim = tim.split(".")){
+          var tim0 = tim[0];
+        }
+        var dd = tim0
+        return dd;
+      }
+    }
+
+  },
       handleOk() {
         const that = this
         // 瑙﹀彂琛ㄥ崟楠岃瘉
@@ -237,7 +250,10 @@
                 that.confirmLoading = false
               }else{
                 let obj
+
                 if (!this.model.id) {
+                  formData.startTime = this.fun(JSON.stringify(formData.startTime));
+                  formData.endTime = this.fun(JSON.stringify(formData.endTime))
                   obj = postAction(this.url.add, formData)
                 } else {
                   obj = requestPut(this.url.edit, formData, {

--
Gitblit v1.9.3