From 3e0c374256cb8abdde99ff274c4c3d70abe27ca0 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期四, 27 十月 2022 09:45:06 +0800
Subject: [PATCH] 56

---
 src/views/myMine/index.vue |  124 ++++++++++++++++++++++++++++++++++-------
 1 files changed, 102 insertions(+), 22 deletions(-)

diff --git a/src/views/myMine/index.vue b/src/views/myMine/index.vue
index 2a50bfe..aed19a9 100644
--- a/src/views/myMine/index.vue
+++ b/src/views/myMine/index.vue
@@ -1,40 +1,45 @@
 <template>
     <div class="page">
         <div class="hader">
-            <van-row>
-                <van-col span="12">
+            <div class="listrow">
+                <div class="rowioc">
                     <van-image
                         round
                         width="50px"
                         height="50px"
-                        src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg"
+                        :src="patientInfo.patientInfo.patientAvatarIcon"
                     />
-                </van-col>
-                <van-col span="12" class="hader-regth">
-                    账号管理员
-                    <van-icon name="arrow" />
-                </van-col>
-            </van-row>
+                </div>
+                <div class="rowtext">
+                    手机号:{{patientInfo.patientInfo.patientTelNo}}
+                </div>
+            </div>
         </div>
         <div class="userInfo">
+            <div style="padding-left: 20px; padding-top: 12px; padding-right: 20px;">
+                <van-row style="border-bottom: 1px solid #F1F1F2;margin-top: 12px;">
+                    <van-col span="12" style="margin-bottom: 12px;">患者卡片</van-col>
+                    <van-col span="12" style="text-align: right;padding-right: 25px;"> <van-icon name="arrow" /></van-col>
+                </van-row>
+            </div>
+
             <van-row style="padding-left: 20px;">
                 <van-col span="16" class="info16">
-                    <div class="div1">张三丰
+                    <div class="div1">{{patientInfo.patientInfo.patientName}}
                         <span class="but">排班提醒</span>
                     </div>
                     <div class="div2">患者卡号</div>
-                    <div class="div3">000000001</div>
+                    <div class="div3">{{patientInfo.patientInfo.patientCardNo}} </div>
                 </van-col>
                 <van-col span="8" class="info8">
-                    <div class="img">
+                    <div class="img" @click="imgShow">
                         <img
-                            style=" width: 50px;height: 50px;margin-left: 8%; margin-top: 22px;"
+                            preview="1"
+                            style=" width: 55px;height: 55px;margin-left: 8%; margin-top: 15px;"
                             referrerpolicy="no-referrer"
-                            src="@/views/home/assets/img/SketchPng011ef35b32ef075413b756766208370cde43357dffc3333d2acf29b70793c15d.png"
+                            :src="erweima"
                         />
-                    </div>
-                    <div class="text" style="font-size: 10px;font-weight: 400;color: #777777;">
-                        出示称重码
+                        <div class="devcc">出示患者码</div>
                     </div>
                 </van-col>
             </van-row>
@@ -96,26 +101,62 @@
                 </van-row>
             </div>
         </div>
+        <div class="ButtonBody">
+            <van-button type="primary" @click="logOUT" round block>退出登录</van-button>
+        </div>
+        <van-popup v-model:show="show">
+            <div class="imgcla">
+                <img
+                    preview="1"
+                    style=" width: 350px;height: 350px;"
+                    referrerpolicy="no-referrer"
+                    :src="erweiImg"
+                />
+            </div>
+        </van-popup>
         <van-tabbar v-model="active" @change="tabChang">
-            <van-tabbar-item name="home" @click="active = 'home'" icon="home-o">首页</van-tabbar-item>
-            <van-tabbar-item name="my" @click="active = 'my'" icon="manager">我的</van-tabbar-item>
+            <van-tabbar-item name="home" icon="like">首页</van-tabbar-item>
+            <van-tabbar-item name="my" icon="manager">我的</van-tabbar-item>
         </van-tabbar>
     </div>
 </template>
 <script lang="ts" setup>
-    import { ref } from 'vue'
+    import { ref,computed } from 'vue'
+    import {ajaxPost} from '@/utils/axios'
+    import { Session } from '@/utils/storage'
+    import { userInfoStore } from '@/stores/userInfo'
     import serve1 from './imgs/serve1.png'
+    import erweima from './imgs/erwm.png'
     import { Image as VanImage,Tabbar as VanTabbar , TabbarItem as VanTabbarItem} from 'vant'
     import {useRouter} from 'vue-router'
     const router=useRouter()
+    const userInfo = userInfoStore()
     const active=ref('my')
+    const show=ref(false)
+    const erweiImg=ref('')
     const tabChang=(index:any)=>{
-        alert(index)
         if (index==='home'){
             router.push('/')
         } else {
             router.push('my')
         }
+    }
+    const imgShow=()=>{
+        show.value=true
+        ajaxPost('/patient/info/showQRCode',`patientCode=${patientInfo.value.patientInfo.code}&isForceLoad=1`).then((res:any)=>{
+            show.value=true
+            erweiImg.value=res
+        })
+    }
+    const patientInfo=computed(()=>{
+        return userInfo.patient
+    })
+    const logOUT=()=>{
+        ajaxPost('/patient/info/logout','').then((re:any)=>{
+            console.log(re)
+            Session.clear() // 清除缓存/token等
+            router.push('login')
+        })
     }
 </script>
 <style lang="scss" scoped>
@@ -123,6 +164,11 @@
         background-color:#166bd3;
     }
 .page{
+    .imgcla{
+        width: 350px;
+        min-height: 350px;
+        border: #777777 1px solid;
+    }
     background-color:#F6FAFF;
     position:relative;
     min-width: 375px;
@@ -134,6 +180,17 @@
         width: 92%;
         margin-left: 4%;
         text-align:left;
+        .listrow{
+            grid-template-columns: minmax(50px, 20%) 1fr ;
+            display: grid;
+            .rowtext{
+                margin-top: 15px;
+                font-size: 13px;
+                font-family: PingFangSC-Regular, PingFang SC;
+                font-weight: 400;
+                color: #777777;
+            }
+        }
         .hader-regth{
             height: 50px;
             text-align:right;
@@ -143,7 +200,7 @@
     .userInfo{
         width: 92%;
         margin-left: 4%;
-        height: 100px;
+        height: 160px;
         background: #FFFFFF;
         box-shadow: 0px 2px 4px 0px rgba(70,150,249,0.1);
         border-radius: 5px;
@@ -223,4 +280,27 @@
         }
     }
 }
+.info8{
+    text-align: right;
+    padding-right: 40px;
+    border-left: #F1F1F2  solid 1px;
+    // background: #166bd3;
+    .devcc{
+        height: 14px;
+        font-size: 10px;
+        font-family: PingFangSC-Regular, PingFang SC;
+        font-weight: 400;
+        color: #777777;
+        line-height: 14px;
+    }
+}
+.text{
+    background: #166bd3;
+}
+.ButtonBody{
+    margin-top: 40px;
+    width: 92%;
+    margin-left: 4%;
+    // background: #166bd3;
+}
 </style>
\ No newline at end of file

--
Gitblit v1.8.0