浏览代码

no message

duwendi 1 年之前
父节点
当前提交
212197eb30
共有 1 个文件被更改,包括 6 次插入6 次删除
  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
     handleEdit2(row) {
561
     handleEdit2(row) {
562
       this.title2 = '修改'
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
       this.dialogVisible2 = true
565
       this.dialogVisible2 = true
565
     },
566
     },
566
     deleteRow2(record) {
567
     deleteRow2(record) {
@@ -572,13 +573,13 @@ export default {
572
       })
573
       })
573
     },
574
     },
574
     handleConfirm2() {
575
     handleConfirm2() {
575
-      if (this.title2 === '修改') {
576
-        let params = {...this.formLabelAlign2}
576
+      let params = {...this.formLabelAlign2}
577
         if (params.time && params.time.length > 0) {
577
         if (params.time && params.time.length > 0) {
578
           params.startTime = params.time[0].substring(0, 10) + ' 00:00:00'
578
           params.startTime = params.time[0].substring(0, 10) + ' 00:00:00'
579
           params.endTime = params.time[1].substring(0, 10) + ' 23:59:59'
579
           params.endTime = params.time[1].substring(0, 10) + ' 23:59:59'
580
         }
580
         }
581
         delete params.time
581
         delete params.time
582
+      if (this.title2 === '修改') {
582
         api_z.editServiceConfigurationHoliday({...params, regionName: this.areaCodeMap[this.formLabelAlign2.regionCode]}).then(res => {
583
         api_z.editServiceConfigurationHoliday({...params, regionName: this.areaCodeMap[this.formLabelAlign2.regionCode]}).then(res => {
583
           if (res.code === 200) {
584
           if (res.code === 200) {
584
             this.dialogVisible2 = false
585
             this.dialogVisible2 = false
@@ -590,7 +591,7 @@ export default {
590
           }
591
           }
591
         })
592
         })
592
       } else {
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
           if (res.code === 200) {
595
           if (res.code === 200) {
595
             this.dialogVisible2 = false
596
             this.dialogVisible2 = false
596
             this.$message({
597
             this.$message({
@@ -754,7 +755,6 @@ export default {
754
       margin-bottom: 0px;
755
       margin-bottom: 0px;
755
     }
756
     }
756
   }
757
   }
757
-
758
   .button-block {
758
   .button-block {
759
     text-align: right;
759
     text-align: right;
760
     margin-bottom: 20px;
760
     margin-bottom: 20px;
@@ -785,7 +785,7 @@ export default {
785
     .form-div {
785
     .form-div {
786
       /deep/ .el-input__inner {
786
       /deep/ .el-input__inner {
787
         height: 35px;
787
         height: 35px;
788
-        width: 90%;
788
+        width: 99%;
789
         border: 1px solid #a6a5a5;
789
         border: 1px solid #a6a5a5;
790
       }
790
       }
791
     }
791
     }