From e0b8b033b1c2483367dddb556ca82f906c217185 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期二, 01 十一月 2022 11:28:29 +0800
Subject: [PATCH] 45

---
 src/views/login/index.vue            |    3 ++-
 src/App.vue                          |    5 +++--
 src/views/prescriptionDrug/index.vue |   52 ++++++++++++++++++++++++++++++++++++++++++++--------
 3 files changed, 49 insertions(+), 11 deletions(-)

diff --git a/src/App.vue b/src/App.vue
index 9a6fba9..4b75800 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -10,8 +10,9 @@
     import { userInfoStore } from '@/stores/userInfo'
     import { ajaxPost} from '@/utils/axios'
     const userInfo = userInfoStore()
-    // const token =Session.get('token')
-    const token='eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJQQVRfU0ZfUEFUMjQ0MTUyMTM4MzcwMjgyN19TRl8iLCJhdXRoIjpbeyJhdXRob3JpdHkiOiJhZG1pbiJ9XSwiaWF0IjoxNjY2ODQ4OTI4LCJleHAiOjE2NjcyMDg5Mjh9.R7BtrJHJJFywW6bytMWB6EVVYdD5rpMZQAcVnQG-8t4'
+    const token =Session.get('token')
+    // const token='eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJQQVRfU0ZfUEFUMjQ0MTUyMTM4MzcwMjgyN19TRl8iLCJhdXRoIjpbeyJhdXRob3JpdHkiOiJhZG1pbiJ9XSwiaWF0IjoxNjY3MjcwNTc5LCJleHAiOjE2Njc2MzA1Nzl9.3_K8avdonSTtFhPErO0M0JVan0KtnHxdACJno9B-PWg'
+    // console.log('token到底等于机',token)
     if (token){
         Session.set('token', token)
         console.log('token='+Session.get('token '))
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index baadcce..a71cd46 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -44,7 +44,8 @@
     const onSubmit = (values:any) => {
         console.log('submit', values)
         loadingBUt.value=true
-        ajaxPost('/patient/info/wechatLogin2',`mobile=${username.value}&password=${password.value}`,config).then((re:any)=>{
+        const openid='odFja56xfwSZDHhAEMn-JotSzlRc'
+        ajaxPost('/patient/info/wechatLogin2',`mobile=${username.value}&password=${password.value}&openId=${openid}`,config).then((re:any)=>{
             console.log(re)
             if (re===''){
                 Toast('登录失败,请重新登录')
diff --git a/src/views/prescriptionDrug/index.vue b/src/views/prescriptionDrug/index.vue
index 2135fd8..1d9c14f 100644
--- a/src/views/prescriptionDrug/index.vue
+++ b/src/views/prescriptionDrug/index.vue
@@ -7,35 +7,39 @@
             @click="fanhui"
         />
         <div class="inputdiv">
-            <van-field left-icon="search" class="input" v-model="inputValue" placeholder="模糊匹配项目、日期检索" />
+            <van-field left-icon="search" class="input" v-model="inputValue" placeholder="模糊匹配项目、医嘱名称" />
         </div>
         <div class="listdiv">
-            <div class="listrow" v-for="x in 6" :key="x">
+            <div class="listrow" v-for="(order,index) in pageData" :key="index">
                 <van-row>
                     <div class="info"></div>
                     <van-row class="lable">
                         <van-col span="18">
                             <span class="labletext">医嘱名称:</span>
-                            <span>人促红素注射液(环尔博)</span>
+                            <span>{{order.orderNameInfo.drugName}}</span>
                         </van-col>
                         <van-col span="6" style="text-align: right;color: #769AFF;font-weight: 400;">长期医嘱</van-col>
                     </van-row>
-                    <van-row class="lable">
+                    <van-row class="lable3">
                         <van-col span="24">
                             <span class="labletext">医嘱内容:</span>
                             <span>
-                                人促红素注射液(环尔博)12gmm/dsad
+                                {{order.orderNameInfo.drugName}}
+                                {{order.orderNameInfo.drugSpec}}
+                                {{order.orderUsage}}
+                                {{order.orderFromInfo.dictText}}
+                                {{order.orderFreqInfo.dictText}}
                             </span>
                         </van-col>
                     </van-row>
                     <van-row class="lable">
                         <van-col span="12">
                             <span class="labletext">开嘱医生:</span>
-                            <span>张三丰</span>
+                            <span>{{order.orderDoctorInfo.userName}}</span>
                         </van-col>
                         <van-col span="12">
                             <span class="labletext">开嘱时间:</span>
-                            <span>2022-08-01</span>
+                            <span>{{order.createTime.split(' ')[0]}}</span>
                         </van-col>
                     </van-row>
                 </van-row>
@@ -44,13 +48,27 @@
     </div>
 </template>
 <script lang="ts" setup>
-    import {ref,reactive,watchEffect,watch} from 'vue'
+    import {ref,reactive,watchEffect,watch,onMounted} from 'vue'
+    import {ajaxPost} from '@/utils/axios'
     import {useRouter} from 'vue-router'
     const router=useRouter()
     const inputValue=ref('')
+    const pageData=ref([])
     const fanhui=()=>{
         router.go(-1)
     }
+    const chaxu=(orderName:string)=>{
+        ajaxPost('/patient/drug/order/listDrugOrdersByPatient',`orderName=${orderName}`).then((re:any)=>{
+            console.log(re)
+            pageData.value=re
+        })
+    }
+    onMounted(()=>{
+        chaxu(inputValue.value)
+    })
+    watch(()=>inputValue.value,()=>{
+        chaxu(inputValue.value)
+    })
 </script>
 <style lang="scss">
     .report{
@@ -95,6 +113,24 @@
                 }
                }
             }
+            .lable3{
+                width: 90%;
+                margin-left: 5%;
+                height: 40px;
+               div{
+                height: 40px;
+                font-size: 13px;
+                font-family: PingFangSC-Regular, PingFang SC;
+                font-weight: 400;
+                color: #2A2A2A;
+                line-height: 20px;
+                border-bottom: #F1F1F2 1px solid;
+                .labletext{
+                    font-weight: 400;
+                    color: #777777;
+                }
+               }
+            }
         }
     }
 </style>
\ No newline at end of file

--
Gitblit v1.8.0