Browse Source

Merge remote-tracking branch 'origin/20230223_pad_vue_new_branch' into 20230223_pad_vue_new_branch

yq1 1 week ago
parent
commit
12497502da
2 changed files with 35 additions and 35 deletions
  1. 1 1
      build/cdn.json
  2. 34 34
      src/pages/main/DetailsPage.vue

+ 1 - 1
build/cdn.json View File

1
 {
1
 {
2
-  "version": "2999.999.13759"
2
+  "version": "2999.999.13753"
3
 }
3
 }

+ 34 - 34
src/pages/main/DetailsPage.vue View File

456
     this.websocketSend(unObj)
456
     this.websocketSend(unObj)
457
   },
457
   },
458
   methods: {
458
   methods: {
459
+    compare (property) {
460
+        return function (a, b) {
461
+          var value1 = a[property]
462
+          var value2 = b[property]
463
+          return value1 - value2
464
+        }
465
+     },
459
     down (event) {
466
     down (event) {
460
       this.flags = true
467
       this.flags = true
461
       var touch
468
       var touch
808
         }
815
         }
809
        
816
        
810
         this.newPatient = []
817
         this.newPatient = []
811
-        this.newPatient = cityNameList.sort(function (a, b) {
812
-            return a.sort > b.sort
813
-         })
818
+        this.newPatient = cityNameList.sort(this.compare('sort'))
814
 
819
 
815
 
820
 
816
 
821
 
951
         }
956
         }
952
        
957
        
953
         this.myPatientsOne = []
958
         this.myPatientsOne = []
954
-        this.myPatientsOne = zoneArr.sort(function (a, b) {
955
-            return a.sort > b.sort
956
-         })
959
+        this.myPatientsOne = zoneArr.sort(this.compare('sort'))
957
 
960
 
958
        
961
        
959
 
962
 
1043
         }
1046
         }
1044
        
1047
        
1045
         this.myPatientsOne = []
1048
         this.myPatientsOne = []
1046
-        this.myPatientsOne = zoneArr.sort(function (a, b) {
1047
-            return a.sort > b.sort
1048
-         })
1049
-
1049
+        this.myPatientsOne = zoneArr.sort(this.compare('sort'))
1050
+        console.log("我的病人hhhhhhhhhhhhhhhhhhhh",this.myPatientsOne)
1050
       
1051
       
1051
 
1052
 
1052
         let cityNameList = []
1053
         let cityNameList = []
1115
               }
1116
               }
1116
             
1117
             
1117
               this.myPatientsOne = []
1118
               this.myPatientsOne = []
1118
-              this.myPatientsOne = zoneArr.sort(function (a, b) {
1119
-                  return a.sort > b.sort
1120
-              })
1119
+              this.myPatientsOne = zoneArr.sort(this.compare('sort'))
1121
 
1120
 
1122
             this.searchArr = zoneArr
1121
             this.searchArr = zoneArr
1123
 
1122
 
1178
               }
1177
               }
1179
             
1178
             
1180
               this.myPatientsOne = []
1179
               this.myPatientsOne = []
1181
-              this.myPatientsOne = zoneArr.sort(function (a, b) {
1182
-                  return a.sort > b.sort
1183
-              })
1184
-
1180
+              this.myPatientsOne = zoneArr.sort(this.compare('sort'))
1185
 
1181
 
1182
+             this.searchArr = zoneArr
1186
 
1183
 
1187
             // console.log('arr', arr)
1184
             // console.log('arr', arr)
1188
             let cityNameList = []
1185
             let cityNameList = []
1235
     },
1232
     },
1236
     onSearch (val) {
1233
     onSearch (val) {
1237
       console.log(val)
1234
       console.log(val)
1235
+      console.log("active=-----------------",this.active)
1236
+      console.log("searchArr",this.searchArr)
1238
       if (this.active == 0) {
1237
       if (this.active == 0) {
1239
         let arr = []
1238
         let arr = []
1240
         this.searchArr.map(item => {
1239
         this.searchArr.map(item => {
1247
           cityNameList.push(arr[p])
1246
           cityNameList.push(arr[p])
1248
         }
1247
         }
1249
 
1248
 
1249
+        console.log("cityNameList",cityNameList)
1250
+
1250
           // //解决溪康排序问题  我的病人列表
1251
           // //解决溪康排序问题  我的病人列表
1251
           if(cityNameList!=null && cityNameList.length>0){
1252
           if(cityNameList!=null && cityNameList.length>0){
1252
-                for(let i=0;i<cityNameList.length;i++){
1253
-                  cityNameList[i].sort = 0
1254
-                  cityNameList[i].sort = cityNameList[i].device_number.sort 
1255
-                }
1253
+              for(let i=0;i<cityNameList.length;i++){
1254
+                cityNameList[i].sort = 0
1255
+                cityNameList[i].sort = cityNameList[i].device_number.sort 
1256
               }
1256
               }
1257
+          }
1257
             
1258
             
1258
-              this.myPatientsOne = []
1259
-              this.myPatientsOne = cityNameList.sort(function (a, b) {
1260
-                  return a.sort > b.sort
1261
-         })
1259
+          this.myPatientsOne = []
1260
+          this.myPatientsOne = cityNameList.sort(this.compare('sort'))
1261
+          console.log("myPatientsOne----------------",this.myPatientsOne)
1262
 
1262
 
1263
 
1263
 
1264
         let firstName = {}
1264
         let firstName = {}
1281
           this.mypatients = newObj
1281
           this.mypatients = newObj
1282
         })
1282
         })
1283
       } else if (this.active == 1) {
1283
       } else if (this.active == 1) {
1284
+
1285
+        console.log("allSearchArr------------------",this.allSearchArr)
1284
         let arr = []
1286
         let arr = []
1285
         this.allSearchArr.map(item => {
1287
         this.allSearchArr.map(item => {
1286
           if (item.patient.name.indexOf(val) != -1) {
1288
           if (item.patient.name.indexOf(val) != -1) {
1295
 
1297
 
1296
        // //解决溪康排序问题  我的病人列表
1298
        // //解决溪康排序问题  我的病人列表
1297
        if(cityNameList!=null && cityNameList.length>0){
1299
        if(cityNameList!=null && cityNameList.length>0){
1298
-                for(let i=0;i<cityNameList.length;i++){
1299
-                  cityNameList[i].sort = 0
1300
-                  cityNameList[i].sort = cityNameList[i].device_number.sort 
1301
-                }
1302
-              }
1300
+          for(let i=0;i<cityNameList.length;i++){
1301
+             cityNameList[i].sort = 0
1302
+             cityNameList[i].sort = cityNameList[i].device_number.sort 
1303
+           }
1304
+         }
1303
             
1305
             
1304
-              this.myPatientsOne = []
1305
-              this.myPatientsOne = cityNameList.sort(function (a, b) {
1306
-                  return a.sort > b.sort
1307
-         })
1306
+        this.newPatient = []
1307
+        this.newPatient = cityNameList.sort(this.compare('sort'))
1308
 
1308
 
1309
 
1309
 
1310
         let firstName = {}
1310
         let firstName = {}