duwendi 1 anno fa
parent
commit
212197eb30
1 ha cambiato i file con 6 aggiunte e 6 eliminazioni
  1. 6 6
      src/pages/index/components/service_configuration.vue

+ 6 - 6
src/pages/index/components/service_configuration.vue

@@ -560,7 +560,8 @@ export default {
560 560
 
561 561
     handleEdit2(row) {
562 562
       this.title2 = '修改'
563
-      this.formLabelAlign2 = {...row, time: [row.startTime, row.endTime]}
563
+      console.log([row.startTime, row.endTime], '9999')
564
+      this.formLabelAlign2 = {...row, time: row.startTime ? [row.startTime + ' 00:00:00', row.endTime + ' 23:59:59'] : undefined}
564 565
       this.dialogVisible2 = true
565 566
     },
566 567
     deleteRow2(record) {
@@ -572,13 +573,13 @@ export default {
572 573
       })
573 574
     },
574 575
     handleConfirm2() {
575
-      if (this.title2 === '修改') {
576
-        let params = {...this.formLabelAlign2}
576
+      let params = {...this.formLabelAlign2}
577 577
         if (params.time && params.time.length > 0) {
578 578
           params.startTime = params.time[0].substring(0, 10) + ' 00:00:00'
579 579
           params.endTime = params.time[1].substring(0, 10) + ' 23:59:59'
580 580
         }
581 581
         delete params.time
582
+      if (this.title2 === '修改') {
582 583
         api_z.editServiceConfigurationHoliday({...params, regionName: this.areaCodeMap[this.formLabelAlign2.regionCode]}).then(res => {
583 584
           if (res.code === 200) {
584 585
             this.dialogVisible2 = false
@@ -590,7 +591,7 @@ export default {
590 591
           }
591 592
         })
592 593
       } else {
593
-        api_z.addServiceConfigurationHoliday({...this.formLabelAlign2, regionName: this.areaCodeMap[this.formLabelAlign2.regionCode]}).then(res => {
594
+        api_z.addServiceConfigurationHoliday({...params, regionName: this.areaCodeMap[this.formLabelAlign2.regionCode]}).then(res => {
594 595
           if (res.code === 200) {
595 596
             this.dialogVisible2 = false
596 597
             this.$message({
@@ -754,7 +755,6 @@ export default {
754 755
       margin-bottom: 0px;
755 756
     }
756 757
   }
757
-
758 758
   .button-block {
759 759
     text-align: right;
760 760
     margin-bottom: 20px;
@@ -785,7 +785,7 @@ export default {
785 785
     .form-div {
786 786
       /deep/ .el-input__inner {
787 787
         height: 35px;
788
-        width: 90%;
788
+        width: 99%;
789 789
         border: 1px solid #a6a5a5;
790 790
       }
791 791
     }