liyongli пре 3 година
родитељ
комит
2cbf464e05
1 измењених фајлова са 3 додато и 2 уклоњено
  1. 3 2
      src/views/Appointment.vue

+ 3 - 2
src/views/Appointment.vue

@@ -108,12 +108,13 @@ export default {
       const li = res || [];
       let l = [];
       li.sort((a, b) => {
-        if (a.self || b.self) this.isDis = true;
         return new Date(a.orderTime) - new Date(b.orderTime);
       });
+      that.isDis = false;
       for (let i = 0; i < li.length; i++) {
         const v = li[i];
         // v.orderTime = v.orderTime.replace(/:00$/, "");
+        if (v.status !== 2 && v.self) that.isDis = true;
         let key = v.orderTime.split(" ")[0];
         if (that.group[key]) {
           that.group[key].push(v);
@@ -199,7 +200,7 @@ export default {
             });
             for (let i = 0; i < li.length; i++) {
               const v = li[i];
-              if (v.status !== 2 &&  v.self ) that.isDis = true;
+              if (v.status !== 2 && v.self) that.isDis = true;
               v.orderTime = v.orderTime.replace(/:00$/, "");
               let key = v.orderTime.split(" ")[0];
               if (group[key]) {