XMLWAN 5 anos atrás
pai
commit
c9b426ecf5

+ 11 - 0
src/api/patient/patient.js Ver arquivo

@@ -389,3 +389,14 @@ export function getSlowSearchPatient(keyword) {
389 389
     params: params
390 390
   })
391 391
 }
392
+
393
+export function getMemberSearchPatient(keyword) {
394
+  const params = {
395
+    keyword: keyword
396
+  }
397
+  return request({
398
+    url: '/m/api/patient/getmembersearchpatient',
399
+    method: 'get',
400
+    params: params
401
+  })
402
+}

+ 12 - 3
src/pages/patientManagement/components/Member.vue Ver arquivo

@@ -20,7 +20,7 @@
20 20
 </template>
21 21
 
22 22
 <script>
23
-import { getAllMemberPatient } from '@/api/patient/patient'
23
+import { getAllMemberPatient, getMemberSearchPatient } from '@/api/patient/patient'
24 24
 export default {
25 25
   props: {
26 26
     searchValue: String
@@ -70,6 +70,14 @@ export default {
70 70
     },
71 71
     toPatientDetail (id) {
72 72
       this.$router.push('/patientdetail?patientid=' + id)
73
+    },
74
+    getMemberSearchPatient (value) {
75
+      getMemberSearchPatient(value).then(response => {
76
+        if (response.data.state === 1) {
77
+          var memberpatient = response.data.data.memberPatient
78
+          console.log('会员病人', memberpatient)
79
+        }
80
+      })
73 81
     }
74 82
   },
75 83
   created () {
@@ -77,8 +85,9 @@ export default {
77 85
     this.getAllMemberPatient()
78 86
   },
79 87
   watch: {
80
-    searchValue(newVal) {
81
-      console.log(newVal);
88
+    searchValue (newVal) {
89
+      console.log(newVal)
90
+      this.getMemberSearchPatient(newVal)
82 91
     }
83 92
   }
84 93
 }