tanyanfei 6 maanden geleden
bovenliggende
commit
3753ed785e
4 gewijzigde bestanden met toevoegingen van 44 en 10 verwijderingen
  1. 17 4
      src/components/DocLogin.vue
  2. 1 1
      src/components/PatIndex.vue
  3. 11 3
      src/components/PatInjectionList.vue
  4. 15 2
      src/components/PatRegister.vue

+ 17 - 4
src/components/DocLogin.vue

@@ -19,8 +19,8 @@
       <div class="footer">
         <div class="jbbtn" @click="submit">提交</div>
         <div class="agreeInfo">
-          <input type="checkbox" checked v-if="form.isagree" @change="checkOnClick" />
-          <input type="checkbox" v-else @change="checkOnClick" />
+          <!-- <input type="checkbox" checked v-if="form.isagree" @change="checkOnClick" /> -->
+          <input type="checkbox" v-model="form.isagree" @change="checkOnClick" />
           <!-- <mt-checklist v-model="form.isagree" :options="['选项A', '选项B', '选项C']"></mt-checklist> -->
           <span>我已知晓<span @click="showAgree=true" style="color:blue;">《用户隐私条款》</span></span>
 
@@ -69,8 +69,10 @@
         timeCouterText: '发送',
         seconds: 60,
         disable: false,
-        isagree: false,
-        form: {},
+        isagree: true,
+        form: {
+          isagree:true
+        },
         showAgree: false,
         agreementInfo:{}
       }
@@ -150,6 +152,8 @@
         params.role = 1
         this.$api.login(params).then(res => {
           if (!res.data.code) {
+            var login_info=this.form
+            localStorage.setItem('doc_login_info',JSON.stringify(login_info))
             localStorage.setItem("token", res.data.data.token)
             this.goPage("/docindex")
           } else {
@@ -162,6 +166,15 @@
       this.$api.getUserAgreementInfo({id:1}).then(res=>{
         this.agreementInfo = res.data.data
       })
+      var info=localStorage.getItem('doc_login_info')
+      if(info){
+        info=JSON.parse(info)
+        this.form={
+          name:info.name,
+          phone:info.phone,
+          isagree:true
+        }
+      }
     }
   }
 

+ 1 - 1
src/components/PatIndex.vue

@@ -326,7 +326,7 @@
 
     .docinfo {
       position: absolute;
-      top: 100px;
+      top: 4rem;
       left: 0;
       right: 0;
 

+ 11 - 3
src/components/PatInjectionList.vue

@@ -3,7 +3,7 @@
     <div class="bgimg"></div>
     <div class="content">
       <div class="title">注射记录</div>
-      <div v-if='id' class="title" style="font-size: 1rem;">姓名:{{recordsList[0].name}}</div>
+      <div v-if='id &&recordsList.length>0' class="title" style="font-size: 1rem;">姓名:{{recordsList[0].name}}</div>
       <div class="injectionListForm baseInfo">
         <div class="listItemContainer">
           <div class="listItem listHeader" style="width:80%;background:#6DA2FE;color:#fff;">打卡时间</div>
@@ -14,7 +14,7 @@
           <div class="listItem" style="width:80%;">{{item.zssjt0}}</div>
           <div class="listItem">{{item.mpro}}</div>
           <div class="listItem">{{item.mdose}}</div>
-          <img v-if="item.candel==1" src="../assets/images/delete.png" style="position:absolute;right:-5px;top:14px;" alt="" width="20px"
+          <img v-if="item.candel==1 && patinfo.role !='1'" src="../assets/images/delete.png" style="position:absolute;right:-5px;top:14px;" alt="" width="20px"
              @click="delRecord(item)" />
         </div>
       </div>
@@ -33,7 +33,8 @@
     Picker,
     Search,
     Button,
-    Toast
+    Toast,
+    MessageBox
   } from 'mint-ui'
 
   export default {
@@ -43,6 +44,7 @@
       Picker,
       Search,
       Button,
+      MessageBox,
       Toast
     },
     data() {
@@ -75,6 +77,12 @@
         this.$api.getPatientRecordsList(queryForm).then(res => {
           if (!res.data.code) {
             this.recordsList = res.data.data.list
+            if(this.recordsList.length<=0){
+              MessageBox({
+                title: '提示',
+                message: '该患者尚未进行注射打卡'
+              })
+            }
           }
         })
         this.$api.getAccountInfo().then(res => {

+ 15 - 2
src/components/PatRegister.vue

@@ -34,7 +34,7 @@
         <div class="title">用户隐私条款</div>
         <div class="agreeForm">
           <div class="agreedoc" v-html="agreementInfo.content">
-            
+
           </div>
         </div>
         <div class="footer">
@@ -70,7 +70,9 @@
         seconds: 60,
         disable: false,
         isagree: false,
-        form: {},
+        form: {
+          isagree:true
+        },
         showAgree: false,
         agreementInfo:{}
       }
@@ -150,6 +152,8 @@
         params.role = 2
         this.$api.login(params).then(res => {
           if (!res.data.code) {
+            var login_info=this.form
+            localStorage.setItem('login_info',JSON.stringify(login_info))
             localStorage.setItem("token", res.data.data.token)
             this.goPage("/patindex")
           } else {
@@ -162,6 +166,15 @@
       this.$api.getUserAgreementInfo({id:2}).then(res=>{
         this.agreementInfo = res.data.data
       })
+      var info=localStorage.getItem('login_info')
+      if(info){
+        info=JSON.parse(info)
+        this.form={
+          name:info.name,
+          phone:info.phone,
+          isagree:true
+        }
+      }
     },
   }