Pārlūkot izejas kodu

日期时间确定样式

zsw007 3 gadi atpakaļ
vecāks
revīzija
2883938035

+ 2 - 0
src/assets/css/common.css

@@ -14,3 +14,5 @@ html,body,#app {
   .el-time-panel__btn.confirm {
       color: #48C5D7;
   }
+
+  

+ 29 - 11
src/components/callRecord/CallRecordManager.vue

@@ -15,6 +15,7 @@
             :default-time="['00:00:00', '23:59:59']"
             format="yyyy-MM-dd HH:mm"
             value-format="yyyy-MM-dd HH:mm"
+            :class="filter.recepDate === null ? 'active' : ''"
           >
           </el-date-picker>
         </el-form-item>
@@ -31,6 +32,7 @@
             :default-time="['00:00:00', '23:59:59']"
             format="yyyy-MM-dd HH:mm"
             value-format="yyyy-MM-dd HH:mm"
+            unlink-panels
           >
           </el-date-picker>
         </el-form-item>
@@ -287,8 +289,8 @@ export default {
         patientId: "",
         sceneName: "",
         subHospitalName: "", // 子院区
-        recepDate: "", // 接收日期
-        resDate: "", // 响应日期
+        recepDate: null, // 接收日期
+        resDate: null, // 响应日期
       },
       cacheData: {},
       currentPage: 1,
@@ -301,6 +303,7 @@ export default {
       respVisible: false,
       params: "",
       result: "",
+      gmtReq: ''
     };
   },
   created() {
@@ -310,6 +313,13 @@ export default {
       that.getDataList();
     });
   },
+  computed: {
+  //   pickerOptions: {
+  //       disabledDate(time) {
+  //         return time.getTime() > Date.now()
+  //     }
+  // }
+  },
   watch: {
     filter: {
       handler: function () {
@@ -379,6 +389,9 @@ export default {
               data.records[j].successFlag == "1" ? "成功" : "失败";
             }
             this.list = data.records;
+            this.gmtReq = list.map(item => {
+              return item.gmtReq.tofixed(2)
+            })
             console.log("调用接口数据:", this.list);
             if (!flag) {
               //搜索时不缓存
@@ -405,14 +418,12 @@ export default {
       if (isTurnPage && !this.searched) {
         this.clearFilter();
       }
-      console.log(this.filter.recepDate);
+
+      //  接收时间 开始时间补0  结束时间补59
       let startGmtReq, endGmtReq, startGmtResp, endGmtResp;
       if (this.filter.recepDate) {
         console.log(this.filter.recepDate[0].split(" "));
-        if (
-          this.filter.recepDate[0].split(0, 9) ===
-          this.filter.recepDate[1].split(0, 9)
-        ) {
+        if (this.filter.recepDate[0].split(0, 9) === this.filter.recepDate[1].split(0, 9)) {
           if (this.filter.recepDate[0]) {
             startGmtReq = this.filter.recepDate[0] + ":00";
             endGmtReq = this.filter.recepDate[1] + ":59";
@@ -423,6 +434,7 @@ export default {
         }
       }
 
+      //  响应时间 开始时间补0  结束时间补59
       if (this.filter.resDate) {
         if (
           this.filter.resDate[0].split(0, 9) ===
@@ -444,10 +456,10 @@ export default {
         patientId: this.filter.patientId.trim(), // 患者标识
         sceneName: this.filter.sceneName.trim(), // 服务名
         successFlag: this.filter.successFlag,
-        startGmtReq: startGmtReq,
-        endGmtReq: endGmtReq,
-        startGmtResp: startGmtResp,
-        endGmtResp: endGmtResp,
+        startGmtReq: startGmtReq ? startGmtReq : null,
+        endGmtReq: endGmtReq ? endGmtReq : null,
+        startGmtResp: startGmtResp ? startGmtResp : null,
+        endGmtResp: endGmtResp ? endGmtResp : null,
         subHospitalName: this.filter.subHospitalName.trim(), // 子院区
       };
       return param;
@@ -648,4 +660,10 @@ export default {
     color: #48c5d7 !important;
   }
 }
+
+.active {
+  color: #ff0000;
+}
+
+
 </style>