tanyanfei преди 10 месеца
родител
ревизия
5a84478517
променени са 6 файла, в които са добавени 146 реда и са изтрити 33 реда
  1. 12 4
      src/App.vue
  2. 11 0
      src/api.js
  3. 2 1
      src/components/PatBleedList.vue
  4. 5 5
      src/components/PatClockBleed.vue
  5. 87 5
      src/components/PatIndex.vue
  6. 29 18
      src/components/RegPatinfo.vue

+ 12 - 4
src/App.vue

@@ -178,10 +178,18 @@
 
   .picker-item {
     font-size: 14px !important;
-    overflow-x: auto;
-    width: 95%;
-    text-overflow: inherit;
-    margin: auto;
+    white-space: normal !important;
+    text-overflow: inherit !important;
+    height: auto !important;
+    line-height: normal !important;
+    margin: 10px 0 !important;
+    color: #999 !important;
+  }
+  .picker-center-highlight:before, .picker-center-highlight:after{
+    background-color: transparent;
+  }
+  .picker-item.picker-selected{
+    color: #000 !important;
   }
 
   .mint-msgbox {

+ 11 - 0
src/api.js

@@ -169,4 +169,15 @@ export default {
   deleteRecord: params => {
     return axios.delete(`${baseURL}/api/doctor/patient/records/delete`,{params:params})
   },
+  // 病例详情
+  // getPatientCaseInfo: params => {
+  //   return axios.get(`${baseURL}/api/doctor/patient/case/info`, { params: params })
+  // },
+  updateInfo: params => {
+    return axios.post(`${baseURL}/api/doctor/patient/info/update`, params)
+  },
+  searchInfo: params => {
+    return axios.get(`${baseURL}/api/doctor/patient/authinfo/search`, {params:params})
+  },
+
 }

+ 2 - 1
src/components/PatBleedList.vue

@@ -67,8 +67,9 @@
           sessionStorage.setItem('id',this.id)
           this.$router.go(-1)
 
-          
+
         }else if(path == 2){
+          sessionStorage.setItem('id',this.id)
           this.$router.push({name:'病例管理',params:{id:this.id}})
         }
         else{

+ 5 - 5
src/components/PatClockBleed.vue

@@ -180,13 +180,13 @@
         let params = this.form
         this.$api.regPatientClockBleed(params).then(res => {
           if (!res.data.code) {
-            
+
             if(this.form.bleed_level.indexOf('重度')>=0 || this.form.bleed_level == '自行无法判断'){
               this.$router.push({name:'患者出血打卡成功',params:{flag:1}})
             }else{
               this.goPage("/patclockbleedsuc")
             }
-            
+
           }else{
             this.lock=false
           }
@@ -216,9 +216,9 @@
         options.chux_reason[0].values=data.chux_reason
         options.chux_level[0].values=data.chux_level
         options.chux_level1[0].values=[
-          '轻度:轻微出血,关节轻度受限',
-          '中度:四肢软组织和肌肉严重出血,关节腔出血,关节功能受限',
-          '重度:内脏,中枢,咽部和髂腰肌等复杂出血乃至危及生命的出血',
+          '轻度:轻微出血,关节轻度受限',
+          '中度:四肢软组织和肌肉严重出血,关节腔出血,关节功能受限',
+          '重度:内脏,中枢,咽部和髂腰肌等复杂出血乃至危及生命的出血',
           '自行无法判断'
         ]
         this.options=options

+ 87 - 5
src/components/PatIndex.vue

@@ -123,12 +123,31 @@
             <img class="docavatar" src="../assets/images/doch1.jpg" width="60rem" height="60rem" />
             <p class="docname">{{patinfo.name}} 您好!</p>
           </div>
-          <div style="margin:40px auto;width:80%;font-size:1.4rem;">
-            未查询到您的信息请等待主治医生进行信息录入
+          <div class="sign_form">
+            <!-- 未查询到您的信息请等待主治医生进行信息录入 -->
+            <h3 align='center'>请补充个人信息</h3>
+            <div class="input_item">
+              <label>姓名</label>
+              <input v-model="form.name" type="text">
+            </div>
+            <div class="input_item">
+              <label>手机</label>
+              <input  v-model="form.phone" type="tel">
+            </div>
+            <div class="input_item">
+              <label>生日</label>
+              <input  v-model="form.birthday" type="date">
+            </div>
+            <div class="input_item">
+              <label>性别</label>
+              <input  v-model="form.sex" type="radio" name="sex" value="男">男
+              <input v-model="form.sex" type="radio" name="sex" value="男">女
+            </div>
           </div>
         </div>
         <div class="footer">
-          <div class="jbbtn" @click="logout">退出登录</div>
+          <div class="jbbtn" @click="submit">提交</div>
+          <div style="background-color: #ccc;background-image: none;" class="jbbtn" @click="logout">退出登录</div>
         </div>
         <div class="desc">
           <img src="../assets/images/desc.png" alt="" width="100%">
@@ -165,7 +184,10 @@
         patinfo: {},
         latestCase: {},
         ratioHeight: 0,
-        timeinfo: {}
+        timeinfo: {},
+        form:{
+
+        }
       }
     },
     methods: {
@@ -188,7 +210,12 @@
         this.$api.getAccountInfo().then(res => {
           if (!res.data.code) {
             this.patinfo = res.data.data
-
+            this.form={
+              name:this.patinfo.name,
+              phone:this.patinfo.phone,
+              sex:this.patinfo.sex,
+              birthday:this.patinfo.birthday
+            }
             this.$api.getPatientLatestCase().then(res => {
               if (!res.data.code) {
                 that.latestCase = res.data.data
@@ -203,6 +230,37 @@
         this.$api.get_patient_timecalc().then(res => {
           this.timeinfo = res.data.data
         })
+      },
+      submit(){
+        if (!this.form.birthday) {
+            MessageBox({
+              title: '提示',
+              message: '请选择出生日期'
+            })
+            return
+          }
+          if (!this.form.sex) {
+            MessageBox({
+              title: '提示',
+              message: '请选择性别'
+            })
+            return
+          }
+
+          let params = this.form
+          // params.role = 2
+          this.$api.updateInfo(params).then(res => {
+            console.log(res.data)
+            if (res.data.code == 0) {
+              // localStorage.setItem("token", res.data.data.token)
+              MessageBox({
+                title: '',
+                message: '提交成功,请等待主治医生进行病例录入'
+              })
+            } else {
+              // Toast(res.data.message)
+            }
+          })
       }
     },
     created() {
@@ -213,6 +271,30 @@
 </script>
 
 <style scoped lang="scss">
+  .sign_form{
+    text-align: left;
+    width: 450px;
+    margin:0 auto;
+    font-size: 1.2rem;
+    label{
+      display: inline-block;
+      width: 80px;
+      text-align: right;
+      padding-right: 10px;
+    }
+    div{
+      margin: 15px 0;
+    }
+    input[type='text'],input[type='date'],input[type='tel']{
+      width: 300px;
+      height: 35px;
+      border: 1px solid #d9d9d9;
+      outline: none;
+      border-radius: 4px;
+      padding: 0 10px;
+      font-size: 1rem;
+    }
+  }
   .container {
     .content {
       height: 100%;

+ 29 - 18
src/components/RegPatinfo.vue

@@ -2,18 +2,18 @@
   <div class="container">
     <div class="bgimg"></div>
     <div class="content">
-      <div class="title">请录入病例信息</div>
+      <div class="title">请选择患者</div>
       <div class="loginForm">
         <mt-field placeholder="请输入病例姓名" label="姓名" v-model="form.name"></mt-field>
         <!-- <mt-field placeholder="请选择出生年月" class="inputDisable" disabled label="年龄" v-model="form.birthday"
           @click.native="$refs.birthdayPicker.open();sexFlag=false">
           <img src="../assets/images/down.png" alt="" width="16px">
         </mt-field> -->
-        <mt-field placeholder="请选择出生年月" class="inputDisable" disabled label="生日" v-model="form.birthday"
+        <mt-field v-if='form.birthday' placeholder="请选择出生年月" class="inputDisable" disabled label="生日" v-model="form.birthday"
           @click.native="hashCalen=true;sexFlag=false">
           <img src="../assets/images/down.png" alt="" width="16px">
         </mt-field>
-        <mt-field placeholder="请选择性别" class="inputDisable" disabled label="性别" v-model="form.sex"
+        <mt-field v-if='form.birthday' placeholder="请选择性别" class="inputDisable" disabled label="性别" v-model="form.sex"
           @click.native="sexFlag=true">
           <img src="../assets/images/down.png" alt="" width="16px">
         </mt-field>
@@ -36,7 +36,7 @@
       <div class="pickerConfirm" v-model="now" @click="sexFlag=false">确认</div>
     </mt-picker>
 
-    <vue-hash-calendar :visible="hashCalen" 
+    <vue-hash-calendar :visible="hashCalen"
       model="dialog"
       :is-show-action="true"
       picker-type="date"
@@ -124,20 +124,20 @@
           })
           return
         }
-        if (!this.form.birthday) {
-          MessageBox({
-            title: '提示',
-            message: '请选择出生年月'
-          })
-          return
-        }
-        if (!this.form.sex) {
-          MessageBox({
-            title: '提示',
-            message: '请选择性别'
-          })
-          return
-        }
+        // if (!this.form.birthday) {
+        //   MessageBox({
+        //     title: '提示',
+        //     message: '请选择出生年月'
+        //   })
+        //   return
+        // }
+        // if (!this.form.sex) {
+        //   MessageBox({
+        //     title: '提示',
+        //     message: '请选择性别'
+        //   })
+        //   return
+        // }
         if (!this.form.phone) {
           MessageBox({
             title: '提示',
@@ -154,6 +154,17 @@
           }
         }
         let params = this.form
+        if(!params.sex){
+          this.$api.searchInfo(params).then(res=>{
+            // console.log(res.data)
+            if(res.data.code == 0){
+                this.form=res.data.data[0]
+            }
+          })
+          return
+        }
+        
+
         localStorage.setItem("patientCase", JSON.stringify(params))
         this.$api.regPatient(params).then(res => {
           if (!res.data.code) {