See999 4 years ago
parent
commit
81387b80d2

+ 15 - 7
src/xt_pages/qcd/treatmentControlAnalysis/components/TimePersonal.vue View File

21
         align="right"
21
         align="right"
22
         format="yyyy-MM-dd"
22
         format="yyyy-MM-dd"
23
         value-format="yyyy-MM-dd"
23
         value-format="yyyy-MM-dd"
24
+        :picker-options="pickerOptions"
24
       ></el-date-picker>
25
       ></el-date-picker>
25
       <span class>-</span>
26
       <span class>-</span>
26
       <el-date-picker
27
       <el-date-picker
34
         align="right"
35
         align="right"
35
         format="yyyy-MM-dd"
36
         format="yyyy-MM-dd"
36
         value-format="yyyy-MM-dd"
37
         value-format="yyyy-MM-dd"
38
+        :picker-options="pickerOptions"
37
       ></el-date-picker>
39
       ></el-date-picker>
38
     </div>
40
     </div>
39
     <el-container>
41
     <el-container>
116
       prescriptionList:[],
118
       prescriptionList:[],
117
       limit:1000,
119
       limit:1000,
118
       page:1,
120
       page:1,
121
+      pickerOptions: {
122
+        disabledDate(time) {
123
+          let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear()-1)).getTime() - 24 * 3600 * 1000;
124
+          return time.getTime() > Date.now() || time.getTime() < threeMonths;;
125
+        }
126
+      }, 
119
     };
127
     };
120
   },
128
   },
121
   methods: {
129
   methods: {
235
           this.getModeId(prescriptionList)
243
           this.getModeId(prescriptionList)
236
           
244
           
237
          // console.log("prescriptionList",prescriptionList)
245
          // console.log("prescriptionList",prescriptionList)
238
-          for(let i=0;i<this.prescriptionList.length;i++){
239
-            for(let j=0;j<list.length;j++){
240
-              if(this.prescriptionList[i].patient_id == list[j].patient_id){
241
-                arr.push(this.prescriptionList[i])
242
-              }
243
-            }
244
-          }
246
+          // for(let i=0;i<this.prescriptionList.length;i++){
247
+          //   for(let j=0;j<list.length;j++){
248
+          //     if(this.prescriptionList[i].patient_id == list[j].patient_id){
249
+          //       arr.push(this.prescriptionList[i])
250
+          //     }
251
+          //   }
252
+          // }
245
           let dataInfo = {}
253
           let dataInfo = {}
246
           list.forEach((item, index) => {
254
           list.forEach((item, index) => {
247
             let { patient_id } = item
255
             let { patient_id } = item