Browse Source

巡检计划时间问题

Shannon_mu 3 years ago
parent
commit
4b324ba3aa
1 changed files with 6 additions and 6 deletions
  1. 6 6
      operationSupport/src/views/facilityInspections/popups/add.vue

+ 6 - 6
operationSupport/src/views/facilityInspections/popups/add.vue

@@ -180,13 +180,13 @@ export default {
             }).then(() => {
                 var loading = this.$loading();
                 let url = '/sc-community/inspection/add';
-
+                let initData = JSON.parse(JSON.stringify(this.formData));
                 if (this.params.todo === 'edit') {
                     url = '/sc-community/inspection/update';
+                    // } else {
+                    //     initData.startDate = this.formData.startDate + '00:00:00';
+                    // initData.endDate = this.formData.endDate + '23:59:59';
                 }
-                let initData = JSON.parse(JSON.stringify(this.formData));
-                // initData.startDate = this.formData.startDate + '00:00:00';
-                // initData.endDate = this.formData.endDate + '23:59:59';
                 this.$http
                     .post(url, initData)
                     .then(({ status, msg }) => {
@@ -227,8 +227,8 @@ export default {
             if (!arr) {
                 arr = ['', ''];
             }
-            this.formData.startDate = arr[0];
-            this.formData.endDate = arr[1];
+            this.formData.startDate = arr[0] + '00:00:00';
+            this.formData.endDate = arr[1] + '23:59:59';
         },
         getDetails(id, resolve) {
             this.$http.get('/sc-community/inspection/find/' + id).then(({ data, msg }) => {