XMLWAN 5 years ago
parent
commit
c9b426ecf5
2 changed files with 23 additions and 3 deletions
  1. 11 0
      src/api/patient/patient.js
  2. 12 3
      src/pages/patientManagement/components/Member.vue

+ 11 - 0
src/api/patient/patient.js View File

389
     params: params
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 View File

20
 </template>
20
 </template>
21
 
21
 
22
 <script>
22
 <script>
23
-import { getAllMemberPatient } from '@/api/patient/patient'
23
+import { getAllMemberPatient, getMemberSearchPatient } from '@/api/patient/patient'
24
 export default {
24
 export default {
25
   props: {
25
   props: {
26
     searchValue: String
26
     searchValue: String
70
     },
70
     },
71
     toPatientDetail (id) {
71
     toPatientDetail (id) {
72
       this.$router.push('/patientdetail?patientid=' + id)
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
   created () {
83
   created () {
77
     this.getAllMemberPatient()
85
     this.getAllMemberPatient()
78
   },
86
   },
79
   watch: {
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
 }