Your Name 2 vuotta sitten
vanhempi
commit
ec28002291

+ 2 - 0
.eslintignore

@@ -3,3 +3,5 @@
 /dist/
 /*.js
 /test/unit/coverage/
+/*.vue
+

+ 4 - 4
.eslintrc.js

@@ -13,12 +13,12 @@ module.exports = {
     // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
     'plugin:vue/essential', 
     // https://github.com/standard/standard/blob/master/docs/RULES-en.md
-    'standard'
+    // 'standard'
   ],
   // required to lint *.vue files
-  plugins: [
-    'vue'
-  ],
+  // plugins: [
+  //   'vue'
+  // ],
   // add your custom rules here
   rules: {
     // allow async-await

+ 48 - 5
src/App.vue

@@ -6,7 +6,32 @@
 
 <script>
   export default {
-    name: 'App'
+    name: 'App',
+    data() {
+      return {
+        doctorInfo:{}
+      }
+    },
+    methods: {
+      goPage(path) {
+        this.$router.push(path)
+      },
+      getData(){
+        this.$api.getAccountInfo().then(res=>{
+          if(!res.data.code){
+            // if(res.data.data.role=="1"){
+            //   this.goPage("/docindex")
+            // }else{
+            //   this.goPage("/patindex")
+            // }
+            localStorage.setItem("authinfo",JSON.stringify(res.data.data))
+          }
+        })
+      }
+    },
+    created(){
+      this.getData()
+    }
   }
 
 </script>
@@ -22,14 +47,13 @@
 
   .container {
     width: 100%;
-    border: 1px solid #ccc;
+    border: 1px solid #fff;
     height: 100vh;
     background: #EFEFEF;
 
-    /* position: relative; */
     .content {
-      width: 94%;
-      border: 1px solid #ccc;
+      width: 100%;
+      /* border: 1px solid #fff; */
       margin: auto;
       /* height: 85%; */
       margin-top: 3rem;
@@ -100,4 +124,23 @@
     background-size: 100% 100%;
   }
 
+  .pickerConfirm{
+    width:100%;
+    height: 40px;
+    line-height: 40px;
+    color:#26a2ff;
+  }
+
+  .sexPicker{
+    position: fixed;
+    width: 100%;
+    z-index: 10;
+    bottom:0;
+    background: #fff;
+  }
+
+  .searchInput{
+    border-radius: 1rem;
+  }
+
 </style>

+ 37 - 7
src/api.js

@@ -1,7 +1,7 @@
 import axios from 'axios';
-var baseURL='http://118.190.145.217:8090'
+// var baseURL='http://118.190.145.217:8077'
+var baseURL='http://xjctest.baianxi.com'
 // var baseURL = '/'
-// axios.defaults.baseURL='/'
 axios.interceptors.request.use(
   config => {
     const token = localStorage.getItem('token')
@@ -32,11 +32,13 @@ axios.interceptors.response.use(function (response) {
   if (response.data.code == 305) {
     // window.location.hash = "/";
   }
+  if (response.data.code == 403) {
+    window.location.hash = "/";
+  }
   return response;
 }, function (error) {
   // 对响应错误做点什么
   if (error.request.status == 403) {
-    // window.location.hash = "/login";
     window.location.hash = "/";
   }
   // console.log(Object.getOwnPropertyNames(error))
@@ -48,14 +50,42 @@ export default {
   login: params => {
     return axios.post(`${baseURL}/api/account/doctor/login`, params)
   },
+  sendPhcode: params => {
+    return axios.post(`${baseURL}/api/account/phcode`, params)
+  },
   logout: params => {
     return axios.post(`${baseURL}/api/account/logout`, params)
   },
-  reset: params => {
-    return axios.put(`${baseURL}/api/account/pwd/reset`, params)
-  },
   // 全局账号信息
   getAccountInfo: params => {
     return axios.get(`${baseURL}/api/account/doctor/authinfo`)
-  }
+  },
+  // 病人注册
+  regPatient: params => {
+    return axios.post(`${baseURL}/api/doctor/patient/register`, params)
+  },
+  // 病人注册
+  regPatientCase: params => {
+    return axios.post(`${baseURL}/api/doctor/patient/case/register`, params)
+  },
+  // 病例详情
+  getPatientCaseInfo: params => {
+    return axios.get(`${baseURL}/api/doctor/patient/case/info`, { params: params })
+  },
+  // 病例列表
+  getPatientCaseList: params => {
+    return axios.get(`${baseURL}/api/doctor/patient/case/list`, { params: params })
+  },
+  // 病人最新病例
+  getPatientLatestCase: params => {
+    return axios.get(`${baseURL}/api/doctor/patient/case/latest`, { params: params })
+  },
+  // 注册打卡
+  regPatientRecords: params => {
+    return axios.post(`${baseURL}/api/doctor/patient/records`, params)
+  },
+  // 患者打开记录
+  getPatientRecordsList: params => {
+    return axios.get(`${baseURL}/api/doctor/patient/records/list`, { params: params })
+  },
 }

BIN
src/assets/images/entrybg.jpg


BIN
src/assets/images/infobg.png


+ 227 - 25
src/components/DiagCalc.vue

@@ -4,48 +4,247 @@
     <div class="content">
       <div class="title">FVIII药代动力学检测</div>
       <div class="diagForm">
-        <mt-field label="病例体重(kg)" v-model="email"></mt-field>
-        <mt-field label="注射计量" v-model="email"></mt-field>
-        <mt-field label="注射时间t0" v-model="email"></mt-field>
-        <mt-field label="基础活性%" v-model="email"></mt-field>
-        <mt-field label="注射后半小时内活性%" v-model="email"></mt-field>
-        <mt-field label="采血时间t1" v-model="email"></mt-field>
-        <mt-field label="t1点活性%" v-model="email"></mt-field>
-        <mt-field label="采血时间t2" v-model="email"></mt-field>
-        <mt-field label="t2点活性%" v-model="email"></mt-field>
-        <mt-field label="采血时间t3" v-model="email"></mt-field>
-        <mt-field label="t3点活性%" v-model="email"></mt-field>
+        <mt-field label="病例体重(kg)" placeholder="请输入病例体重(整数或1位小数)" type="number" v-model="form.bltz"></mt-field>
+        <mt-field label="注射计量" placeholder="请输入注射计量(整数)" v-model="form.zsjl" type="number"></mt-field>
+        <mt-field disabled label="注射时间t0" placeholder="请选择注射时间" v-model="form.zssjt0"
+          @click.native="$refs.t0Picker.open()">
+          <img src="../assets/images/down.png" alt="" width="16px">
+        </mt-field>
+        <mt-field label="基础活性%" placeholder="请输入基础活性(2位小数)" v-model="form.jchx"></mt-field>
+        <mt-field label="注射后半小时内活性%" placeholder="请输入半小时内活性%" v-model="form.zs30hx"></mt-field>
+        <mt-field disabled label="采血时间t1" placeholder="请输入采血时间t1" v-model="form.cxsjt1"
+          @click.native="$refs.t1Picker.open()">
+          <img src="../assets/images/down.png" alt="" width="16px">
+        </mt-field>
+        <mt-field label="t1点活性%" placeholder="请输入t1点活性%(2位小数)" v-model="form.t1hx"></mt-field>
+        <mt-field disabled label="采血时间t2" placeholder="请输入采血时间t2" v-model="form.cxsjt2"
+          @click.native="$refs.t2Picker.open()">
+          <img src="../assets/images/down.png" alt="" width="16px">
+        </mt-field>
+        <mt-field label="t2点活性%" placeholder="请输入t2点活性%(2位小数)" v-model="form.t2hx"></mt-field>
+        <mt-field disabled label="采血时间t3" placeholder="请输入采血时间t3" v-model="form.cxsjt3"
+          @click.native="$refs.t3Picker.open()">
+          <img src="../assets/images/down.png" alt="" width="16px">
+        </mt-field>
+        <mt-field label="t3点活性%" placeholder="请输入t3点活性%(2位小数)" v-model="form.t3hx"></mt-field>
       </div>
       <div class="diagForm">
-          <div class="formTitle">血友病治疗方案</div>
-        <mt-field label="预防谷活性" v-model="email"></mt-field>
-        <mt-field label="注射频次" v-model="email"></mt-field>
+        <div class="formTitle">血友病治疗方案</div>
+        <mt-field label="预防谷活性" type="number" placeholder="请输入预防谷活性(2位小数)" v-model="form.yfghx"></mt-field>
+        <mt-field disabled label="注射频次" placeholder="请选择注射频次" v-model="form.zspc" @click.native="mfreqFlag=true">
+          <img src="../assets/images/down.png" alt="" width="16px">
+        </mt-field>
       </div>
       <div class="footer">
-        <div class="jbbtn" @click="goPage">提交</div>
+        <div class="jbbtn" @click="submit">提交</div>
       </div>
     </div>
+    <!-- 注射时间t0 -->
+    <mt-datetime-picker ref="t0Picker" type="datetime" year-format="{value} 年" month-format="{value} 月"
+      date-format="{value} 日" @confirm='changeTime0'
+      :endDate = 'endDate'
+      >
+    </mt-datetime-picker>
+    <!-- 采血时间t1 -->
+    <mt-datetime-picker ref="t1Picker" type="datetime" year-format="{value} 年" month-format="{value} 月"
+      date-format="{value} 日" @confirm='changeTime1'
+      :endDate = 'endDate'
+      >
+    </mt-datetime-picker>
+    <!-- 采血时间t2 -->
+    <mt-datetime-picker ref="t2Picker" type="datetime" year-format="{value} 年" month-format="{value} 月"
+      date-format="{value} 日" @confirm='changeTime2'
+      :endDate = 'endDate'
+      >
+    </mt-datetime-picker>
+    <!-- 采血时间t3 -->
+    <mt-datetime-picker ref="t3Picker" type="datetime" year-format="{value} 年" month-format="{value} 月"
+      date-format="{value} 日" @confirm='changeTime3'
+      :endDate = 'endDate'
+      >
+    </mt-datetime-picker>
+    <!-- 注射频次 -->
+    <mt-picker @change="onValuesChange1" v-if="mfreqFlag" :slots="slots1" ref="sexPicker1" class="sexPicker"
+      :showToolbar="true">
+      <div class="pickerConfirm" @click="mfreqFlag=false">确认</div>
+    </mt-picker>
   </div>
 </template>
 
 <script>
   import {
-    Field
+    Field,
+    MessageBox,
+    Toast
   } from 'mint-ui'
 
   export default {
     name: 'Index',
     components: {
-      Field
+      Field,
+      MessageBox,
+      Toast
     },
     data() {
       return {
-        msg: 'Welcome to Your Vue.js App'
+        msg: 'Welcome to Your Vue.js App',
+        mfreqFlag: false,
+        form: {
+          jchx:1,
+          zssjt0: '',
+          cxsjt1: '',
+          cxsjt2: '',
+          cxsjt3: ''
+        },
+        slots1: [{
+          flex: 1,
+          values: ['每周2次', '每周3次', '每天1次', '每2天一次', '每3天一次'],
+          className: 'slot1',
+          textAlign: 'center'
+        }],
+        endDate:new Date(this.$datetime.formatDateTime(new Date())),
       }
     },
     methods: {
       goPage() {
         this.$router.push('/diagcalcshow')
+      },
+      changeTime0(value) {
+        this.form.zssjt0 = this.$datetime.formatDateTime(value)
+      },
+      changeTime1(value) {
+        this.form.cxsjt1 = this.$datetime.formatDateTime(value)
+      },
+      changeTime2(value) {
+        this.form.cxsjt2 = this.$datetime.formatDateTime(value)
+      },
+      changeTime3(value) {
+        this.form.cxsjt3 = this.$datetime.formatDateTime(value)
+      },
+      onValuesChange1(picker, values) {
+        if (picker.getSlotValue(0)) {
+          this.form.zspc = picker.getSlotValue(0)
+        } else {
+          this.form.zspc = "每周2次"
+        }
+      },
+      submit() {
+        if (!this.form.bltz) {
+          MessageBox({
+            title: '提示',
+            message: '请输入病例体重'
+          })
+          return
+        }
+        if (!this.form.zsjl) {
+          MessageBox({
+            title: '提示',
+            message: '请输入注射剂量?'
+          })
+          return
+        }
+        if (!this.form.zssjt0) {
+          MessageBox({
+            title: '提示',
+            message: '请选择注射时间t0?'
+          })
+          return
+        }
+        // if (!this.form.jchx) {
+        //   MessageBox({
+        //     title: '提示',
+        //     message: '请输入手机号?'
+        //   })
+        //   return
+        // }
+        if (!this.form.zs30hx) {
+          MessageBox({
+            title: '提示',
+            message: '请输入注射后半小时内活性?'
+          })
+          return
+        }
+        if (!this.form.cxsjt1) {
+          MessageBox({
+            title: '提示',
+            message: '请选择采血时间t1?'
+          })
+          return
+        }
+        if (!this.form.t1hx) {
+          MessageBox({
+            title: '提示',
+            message: '请输入t1点活性?'
+          })
+          return
+        }
+        if (!this.form.cxsjt2) {
+          MessageBox({
+            title: '提示',
+            message: '请选择采血时间t2?'
+          })
+          return
+        }
+        if (!this.form.t2hx) {
+          MessageBox({
+            title: '提示',
+            message: '请输入t2点活性?'
+          })
+          return
+        }
+        if (!this.form.cxsjt3) {
+          MessageBox({
+            title: '提示',
+            message: '请选择采血时间t3?'
+          })
+          return
+        }
+        if (!this.form.t3hx) {
+          MessageBox({
+            title: '提示',
+            message: '请输入t3点活性?'
+          })
+          return
+        }
+        if (!this.form.yfghx) {
+          MessageBox({
+            title: '提示',
+            message: '请输入预防谷活性?'
+          })
+          return
+        }
+        if (!this.form.zspc) {
+          MessageBox({
+            title: '提示',
+            message: '请选择注射频次?'
+          })
+          return
+        }
+        MessageBox.confirm('请您再次确认录入信息是否有误?').then(action => {
+          let params = this.form
+          let patientCase = localStorage.getItem("patientCase")
+          if(patientCase){
+            patientCase = JSON.parse(patientCase)
+            Object.keys(patientCase).forEach(function(item){
+              console.log(item)
+              params[item] = patientCase[item]
+            })
+          }else{
+            patientCase = params
+            this.goPage("/regpatinfo")
+          }
+          this.$api.regPatientCase(params).then(res => {
+            if (!res.data.code) {
+              let id = res.data.data.id
+              localStorage.removeItem("patientCase")
+              this.$router.push({path:'diagcalcshow',query:{id:id}})
+            }else{
+              Toast(res.data.message)
+            }
+          })
+        });
+
+
       }
     }
   }
@@ -60,20 +259,23 @@
     background: #fff;
     padding: 1rem;
     border-radius: 5px;
-    .formTitle{
+
+    .formTitle {
       height: 1rem;
-      line-height:1rem;
-      text-align:left;
-      color:#2882F4;
-      padding-bottom:0.5rem;
-      border-bottom:1px solid #2882F4;
-      font-weight:bold;
+      line-height: 1rem;
+      text-align: left;
+      color: #2882F4;
+      padding-bottom: 0.5rem;
+      border-bottom: 1px solid #2882F4;
+      font-weight: bold;
     }
+
     .mint-field {
       border: 1px solid #ccc;
       border-radius: 50px;
       margin-top: 1rem;
     }
+
     .mint-cell {
       min-height: 2rem;
     }

+ 40 - 27
src/components/DiagCalcShow.vue

@@ -4,36 +4,36 @@
     <div class="content">
       <div class="diagShowForm">
         <div class="formTitle">FVIII药代动力学检测</div>
-        <mt-cell title="姓名" value="说明文字"></mt-cell>
-        <mt-cell title="ID" value="说明文字"></mt-cell>
-        <mt-cell title="年龄" value="说明文字"></mt-cell>
-        <mt-cell title="体重(kg)" value="说明文字"></mt-cell>
-        <mt-cell title="性别" value="说明文字"></mt-cell>
-        <mt-cell title="注射产品" value="说明文字"></mt-cell>
-        <mt-cell title="注射剂量(IU/kg)" value="说明文字"></mt-cell>
-        <mt-cell title="注射时间t0" value="说明文字"></mt-cell>
-        <mt-cell title="基础活性%" value="说明文字"></mt-cell>
-        <mt-cell title="注射后半小时内活性%" value="说明文字"></mt-cell>
-        <mt-cell title="采血时间t1" value="说明文字"></mt-cell>
-        <mt-cell title="t1点活性%" value="说明文字"></mt-cell>
-        <mt-cell title="采血时间t2" value="说明文字"></mt-cell>
-        <mt-cell title="t2点活性%" value="说明文字"></mt-cell>
-        <mt-cell title="采血时间t3" value="说明文字"></mt-cell>
-        <mt-cell title="t3点活性%" value="说明文字"></mt-cell>
-        <mt-cell title="采血时间t4" value="说明文字"></mt-cell>
-        <mt-cell title="t4点活性%" value="说明文字"></mt-cell>
-        <mt-cell title="预期峰值活性%" value="说明文字"></mt-cell>
+        <mt-cell title="姓名" :value="caseInfo.name"></mt-cell>
+        <mt-cell title="ID" :value="caseInfo.code"></mt-cell>
+        <mt-cell title="年龄" :value="caseInfo.age"></mt-cell>
+        <mt-cell title="体重(kg)" :value="caseInfo.bltz"></mt-cell>
+        <mt-cell title="性别" :value="caseInfo.sex"></mt-cell>
+        <mt-cell title="注射产品" :value="caseInfo.mpro"></mt-cell>
+        <mt-cell title="注射剂量(IU/kg)" :value="caseInfo.zsjl"></mt-cell>
+        <mt-cell title="注射时间t0" :value="caseInfo.zssjt0"></mt-cell>
+        <mt-cell title="基础活性%" :value="caseInfo.jchx"></mt-cell>
+        <mt-cell title="注射后半小时内活性%" :value="caseInfo.zs30hx"></mt-cell>
+        <mt-cell title="采血时间t1" :value="caseInfo.cxsjt1"></mt-cell>
+        <mt-cell title="t1点活性%" :value="caseInfo.t1hx"></mt-cell>
+        <mt-cell title="采血时间t2" :value="caseInfo.cxsjt2"></mt-cell>
+        <mt-cell title="t2点活性%" :value="caseInfo.t2hx"></mt-cell>
+        <mt-cell title="采血时间t3" :value="caseInfo.cxsjt2"></mt-cell>
+        <mt-cell title="t3点活性%" :value="caseInfo.t3hx"></mt-cell>
+        <!-- <mt-cell title="采血时间t4" :value="caseInfo.cxsjt4"></mt-cell>
+        <mt-cell title="t4点活性%" :value="caseInfo.t4hx"></mt-cell> -->
+        <mt-cell title="预期峰值活性%" :value="caseInfo.yqfzhx"></mt-cell>
       </div>
       <div class="diagShowForm">
         <div class="formTitle">FVI药代动力学参数</div>
-        <mt-cell title="半衰期:" value="说明文字"></mt-cell>
-        <mt-cell title="利用率%:" value="说明文字"></mt-cell>
+        <mt-cell title="半衰期:" :value="caseInfo.bsq"></mt-cell>
+        <mt-cell title="利用率%:" :value="caseInfo.lyl"></mt-cell>
       </div>
       <div class="diagShowForm">
         <div class="formTitle">血友病治疗方案</div>
-        <mt-cell title="预防谷活性%:" value="说明文字"></mt-cell>
-        <mt-cell title="注射频次:" value="说明文字"></mt-cell>
-        <mt-cell title="每次注射剂量(IU/kg):" value="说明文字"></mt-cell>
+        <mt-cell title="预防谷活性%:" :value="caseInfo.yfghx"></mt-cell>
+        <mt-cell title="注射频次:" :value="caseInfo.zspc"></mt-cell>
+        <mt-cell title="每次注射剂量(IU/kg):" :value="caseInfo.mczsjl"></mt-cell>
       </div>
       <div class="footer">
         <div class="jbbtn" @click="goPage">下一页</div>
@@ -55,13 +55,26 @@
     },
     data() {
       return {
-        msg: 'Welcome to Your Vue.js App'
+        msg: 'Welcome to Your Vue.js App',
+        caseInfo:{}
       }
     },
     methods: {
       goPage() {
-        this.$router.push('/solutionpkline')
+        let id = this.$route.query.id
+        this.$router.push({'path':'/solutionpkline',query:{id:id}})
+      },
+      getData(){
+        let id = this.$route.query.id
+        this.$api.getPatientCaseInfo({id:id}).then(res=>{
+          if(!res.data.code){
+            this.caseInfo = res.data.data
+          }
+        })
       }
+    },
+    created(){
+      this.getData()
     }
   }
 
@@ -96,7 +109,7 @@
     }
 
     /deep/ .mint-cell .mint-cell-value {
-      width: 30%;
+      width: 50%;
       text-align: right;
     }
   }

+ 31 - 12
src/components/DocIndex.vue

@@ -1,16 +1,22 @@
 <template>
   <div class="container">
-    <div class="bgcolor">
+    <!-- <div class="bgcolor">
+      <div class="docinfo">
+        <img class="docavatar" src="../assets/images/doch1.jpg" width="60rem" height="60rem" />
+        <p class="docname">{{doctorInfo.name}} 医生,您好!</p>
+      </div>
+    </div> -->
+    <div class="bgimg">
       <div class="docinfo">
         <img class="docavatar" src="../assets/images/doch1.jpg" width="60rem" height="60rem" />
         <p class="docname">{{doctorInfo.name}} 医生,您好!</p>
       </div>
     </div>
-    <div class="bgimg"></div>
     <div class="content">
       <div class="footer">
         <div class="csbtn" @click="goPage('/regpatinfo')">病例信息录入</div>
         <div class="jbbtn" @click="goPage('patcaselist')">病例管理</div>
+        <div class="usageInfo">使用说明</div>
       </div>
     </div>
   </div>
@@ -21,22 +27,22 @@
     name: 'Index',
     data() {
       return {
-        doctorInfo:{}
+        doctorInfo: {}
       }
     },
     methods: {
       goPage(path) {
         this.$router.push(path)
       },
-      getData(){
-        this.$api.getAccountInfo().then(res=>{
-          if(!res.data.code){
+      getData() {
+        this.$api.getAccountInfo().then(res => {
+          if (!res.data.code) {
             this.doctorInfo = res.data.data
           }
         })
       }
     },
-    created(){
+    created() {
       this.getData()
     }
   }
@@ -56,12 +62,12 @@
 
     .bgimg {
       width: 100%;
-      height: 10rem;
+      height: 22.8rem;
       // border:1px solid red;
-      top: 10rem;
+      /* top: 10rem; */
       position: absolute;
       /* z-index:-1; */
-      background-image: url("../assets/images/entrybg.jpg");
+      background-image: url("../assets/images/infobg.png");
       background-size: 100% 100%;
     }
 
@@ -80,8 +86,21 @@
       position: relative;
       z-index:3;
     }
-    .footer{
-      margin-bottom:2rem;
+
+    .footer {
+      margin-bottom: 2rem;
+      margin-top: 26.8rem;
+
+      .usageInfo {
+        width: 6rem;
+        height: 2.4rem;
+        line-height: 2.4rem;
+        border-radius: 1rem;
+        background: #595758;
+        color: #fff;
+        margin:2rem 1rem;
+      }
+
     }
   }
 

+ 22 - 12
src/components/DocLogin.vue

@@ -6,15 +6,15 @@
       <div class="loginForm">
         <mt-field placeholder="姓 名" v-model="form.name"></mt-field>
         <div style="display:flex;">
-          <div>
+          <div style="width:80%;">
             <mt-field placeholder="手机号" v-model="form.phone"></mt-field>
           </div>
-          <div>
+          <div style="width:20%;">
             <mt-button :disabled="disable" type="primary" class="sendPhcode" @click="timeCounter">{{timeCouterText}}
             </mt-button>
           </div>
         </div>
-        <mt-field placeholder="短信验证码" v-model="form.phcode"></mt-field>
+        <mt-field placeholder="短信验证码" v-model="form.phcode" type="number"></mt-field>
       </div>
       <div class="footer">
         <div class="jbbtn" @click="submit">提交</div>
@@ -22,7 +22,7 @@
           <input type="checkbox" checked v-if="form.isagree" @change="checkOnClick" />
           <input type="checkbox" v-else @change="checkOnClick" />
           <!-- <mt-checklist v-model="form.isagree" :options="['选项A', '选项B', '选项C']"></mt-checklist> -->
-          <span>我已知晓<a href="/#/agreedoc" @click.native="checkOnClick">《PK程序用户隐私条款》</a></span>
+          <span>我已知晓<a href="/#/agreedoc?from=1" @click.native="checkOnClick">《PK程序用户隐私条款》</a></span>
 
         </div>
       </div>
@@ -52,7 +52,7 @@
       return {
         email: '',
         timeCouterText: '发送',
-        seconds: 6,
+        seconds: 60,
         disable: false,
         isagree: false,
         form: {}
@@ -63,7 +63,15 @@
         this.$router.push(path)
       },
       timeCounter() {
+        if(!this.form.phone){
+          MessageBox({
+            title: '提示',
+            message: '请输入手机号?'
+          })
+          return
+        }
         let _this = this
+        this.$api.sendPhcode(this.form).then(res=>{})
         var timer = setInterval(function () {
           if (_this.seconds < 2) {
             clearInterval(timer)
@@ -88,28 +96,28 @@
         if (!this.form.name) {
           MessageBox({
             title: '提示',
-            message: '请输入姓名?'
+            message: '请输入姓名'
           })
           return 
         }
         if (!this.form.phone) {
           MessageBox({
             title: '提示',
-            message: '请输入手机号?'
+            message: '请输入手机号'
           })
           return
         }
         if (!this.form.phcode) {
           MessageBox({
             title: '提示',
-            message: '请输入验证码?'
+            message: '请输入验证码'
           })
           return
         }
         if (!this.form.isagree) {
           MessageBox({
             title: '提示',
-            message: '请先同意《PK程序用户隐私条款》?'
+            message: '请先同意《PK程序用户隐私条款》'
           })
           return
         }
@@ -117,9 +125,10 @@
         params.role = 1
         this.$api.login(params).then(res=>{
           if(!res.data.code){
-            console.log(res)
             localStorage.setItem("token",res.data.data.token)
             this.goPage("/docindex")
+          }else{
+            Toast(res.data.message)
           }
         })
       }
@@ -135,10 +144,11 @@
 
     .loginForm {
       .sendPhcode {
-        width: 6rem;
+        /* width: 6rem; */
+        width: 100%;
         margin-top: 1rem;
         height: 3.0rem;
-        border-radius: 1rem;
+        border-radius: 1.4rem;
       }
     }
 

+ 7 - 1
src/components/Index.vue

@@ -4,6 +4,7 @@
     <div class="content">
       <div class="csbtn" @click="goPage('/doclogin')">医生端</div>
       <div class="jbbtn" @click="goPage('/patregister')">个人端</div>
+      <button class="jbbtn" @click="logout">退出登录</button>
     </div>
   </div>
 </template>
@@ -19,6 +20,11 @@
     methods: {
       goPage(path) {
         this.$router.push(path)
+      },
+      logout(){
+        window.localStorage.removeItem('token')
+        window.localStorage.removeItem('authinfo')
+        window.location.reload()
       }
     }
   }
@@ -31,7 +37,7 @@
     .bgimg {
       width: 100%;
       height: 14rem;
-      margin-top: 6rem;
+      margin-top: 3rem;
       position: absolute;
       background-image: url("../assets/images/entrybg.jpg");
       background-image: url("../assets/images/entrybg.jpg");

+ 34 - 36
src/components/PatCaseList.vue

@@ -4,45 +4,24 @@
     <div class="content">
       <div class="title">病例管理</div>
       <div class="searchinput">
-          <mt-search
-            v-model="value"
-            placeholder="搜索">
-          </mt-search>
+          <mt-field class="searchInput" placeholder="请输入患者姓名" v-model="queryForm.name">
+              <mt-button type="primary" size="small" @click="getData()">搜索</mt-button>
+          </mt-field>
       </div>
-      <div class="patCaseForm baseInfo">
-          <mt-cell title="姓名:张三" value="病例ID:XXX"></mt-cell>
-          <mt-cell title="年龄:51" value="性别:男"></mt-cell>
-          <mt-cell title="使用产品:XXX" value="注射剂量:XXX"></mt-cell>
-          <mt-cell title="注射频次:XXX"></mt-cell>
+      <div class="patCaseForm baseInfo" v-for="(item,index) in caseList">
+          <mt-cell :title="'姓名:'+item.name" :value="'病例ID:'+item.code"></mt-cell>
+          <mt-cell :title="'年龄:'+item.age" :value="'性别:'+item.sex"></mt-cell>
+          <mt-cell :title="'使用产品:'+item.mpro" :value="'注射剂量:'+item.zsjl"></mt-cell>
+          <mt-cell :title="'注射频次:'+item.zspc"></mt-cell>
           <div style="font-size:1rem;text-align:left;padding-left:10px;">
-              方案时间:2023-05-13 18:53:00
-              <mt-button type="primary" size="small" @click="goPage('/diagcalcshow')">详情</mt-button>
+              方案时间:{{item.ctime}}
+              <mt-button type="primary" size="small" @click="showDetail(item.id)">详情</mt-button>
           </div>
       </div>
-      <div class="patCaseForm baseInfo">
-          <mt-cell title="姓名:张三" value="病例ID:XXX"></mt-cell>
-          <mt-cell title="年龄:51" value="性别:男"></mt-cell>
-          <mt-cell title="使用产品:XXX" value="注射剂量:XXX"></mt-cell>
-          <mt-cell title="注射频次:XXX"></mt-cell>
-          <div style="font-size:1rem;text-align:left;padding-left:10px;">
-              方案时间:2023-05-13 18:53:00
-              <mt-button type="primary" size="small">详情</mt-button>
-          </div>
-      </div>
-      <div class="patCaseForm baseInfo">
-          <mt-cell title="姓名:张三" value="病例ID:XXX"></mt-cell>
-          <mt-cell title="年龄:51" value="性别:男"></mt-cell>
-          <mt-cell title="使用产品:XXX" value="注射剂量:XXX"></mt-cell>
-          <mt-cell title="注射频次:XXX"></mt-cell>
-          <div style="font-size:1rem;text-align:left;padding-left:10px;">
-              方案时间:2023-05-13 18:53:00
-              <mt-button type="primary" size="small">详情</mt-button>
-          </div>
-      </div>
-      <div class="footer">
+      <!-- <div class="footer">
         <div class="jbbtn">确定</div>
         <div class="jbbtn" @click="goPage('/patinjectionlist')">查看注射记录</div>
-      </div>
+      </div> -->
     </div>
   </div>
 </template>
@@ -65,13 +44,30 @@
     },
     data() {
       return {
-        form: {}
+        searchName:"",
+        form: {},
+        queryForm:{},
+        caseList:{}
       }
     },
     methods: {
       goPage(path) {
         this.$router.push(path)
+      },
+      showDetail(id){
+        this.$router.push({"path":"diagcalcshow",query:{id:id}})
+      },
+      getData() {
+        let id = this.$route.query.id
+        this.$api.getPatientCaseList(this.queryForm).then(res => {
+          if (!res.data.code) {
+            this.caseList = res.data.data.list
+          }
+        })
       }
+    },
+    created() {
+      this.getData()
     }
   }
 
@@ -109,7 +105,7 @@
     }
 
     /deep/ .mint-cell .mint-cell-value {
-      width: 40%;
+      width: 45%;
       text-align: right;
     }
 
@@ -118,7 +114,9 @@
       background-image: none;
     }
   }
-
+  .container{
+    height: 100%;
+  }
   .footer {
     display: flex;
     .jbbtn{

+ 66 - 4
src/components/PatClockIn.vue

@@ -4,13 +4,25 @@
     <div class="content">
       <div class="title">注射打卡</div>
       <div class="loginForm">
-        <mt-field label="产品选择" v-model="form.email" placeholder="请选择您本次使用的产品"></mt-field>
-        <mt-field label="注射剂量" v-model="form.email" placeholder="请选择您本次使用的剂量"></mt-field>
+        <mt-field label="产品选择" v-model="form.mpro" @focus.native.capture="mproFlag=true" placeholder="请选择使用的产品">
+          <img src="../assets/images/down.png" alt="" width="16px">
+        </mt-field>
+        <mt-field label="注射频次" v-model="form.mfreq" @focus.native.capture="mfreqFlag=true" placeholder="请选择使用的剂量">
+          <img src="../assets/images/down.png" alt="" width="16px">
+        </mt-field>
       </div>
       <div class="footer">
-        <div class="jbbtn" @click="goPage('patclockinsuc')">确定并提交</div>
+        <div class="jbbtn" @click="submit">确定并提交</div>
       </div>
     </div>
+    <mt-picker @change="onValuesChange" v-if="mproFlag" :slots="slots" ref="sexPicker" class="sexPicker"
+      :showToolbar="true">
+      <div class="pickerConfirm" @click="mproFlag=false">确认</div>
+    </mt-picker>
+    <mt-picker @change="onValuesChange1" v-if="mfreqFlag" :slots="slots1" ref="sexPicker1" class="sexPicker"
+      :showToolbar="true">
+      <div class="pickerConfirm" @click="mfreqFlag=false">确认</div>
+    </mt-picker>
   </div>
 </template>
 
@@ -28,12 +40,62 @@
     },
     data() {
       return {
-        form: {}
+        form: {},
+        mproFlag: false,
+        mfreqFlag: false,
+        slots: [{
+          flex: 1,
+          values: ['人血FVIII', '百因止', '科跃奇', '诺易', '任捷', '重凝贝', '安佳因', '其他'],
+          className: 'slot1',
+          textAlign: 'center'
+        }],
+        slots1: [{
+          flex: 1,
+          values: ['每周2次', '每周3次', '每天1次', '每2天一次', '每3天一次', '不固定/按需治疗'],
+          className: 'slot1',
+          textAlign: 'center'
+        }]
       }
     },
     methods: {
       goPage(path) {
         this.$router.push(path)
+      },
+      onValuesChange(picker, values) {
+        if (picker.getSlotValue(0)) {
+          this.form.mpro = picker.getSlotValue(0)
+        } else {
+          this.form.mpro = "人血FVIII"
+        }
+      },
+      onValuesChange1(picker, values) {
+        if (picker.getSlotValue(0)) {
+          this.form.mfreq = picker.getSlotValue(0)
+        } else {
+          this.form.mfreq = "每周2次"
+        }
+      },
+      submit() {
+        if (!this.form.mpro) {
+          MessageBox({
+            title: '提示',
+            message: '请选择产品?'
+          })
+          return
+        }
+        if (!this.form.mfreq) {
+          MessageBox({
+            title: '提示',
+            message: '请选择注射频次?'
+          })
+          return
+        }
+        let params = this.form
+        this.$api.regPatientRecords(params).then(res => {
+          if (!res.data.code) {
+            this.goPage("/patclockinsuc")
+          }
+        })
       }
     }
   }

+ 1 - 1
src/components/PatClockInSuc.vue

@@ -80,7 +80,7 @@
     }
     .clockintime {
       width: 60%;
-      font-size: 12px;
+      font-size: 1rem;
       color: #ccc;
       margin: auto;
       margin-top: 2rem;

+ 68 - 33
src/components/PatIndex.vue

@@ -1,36 +1,53 @@
 <template>
   <div class="container">
-    <div class="bgcolor">
-      <div class="docinfo">
-        <img class="docavatar" src="../assets/images/doch1.jpg" width="60rem" height="60rem" />
-        <p class="docname">肖小肖 您好!</p>
+    <div v-if="latestCase.id">
+      <div class="bgcolor">
+        <div class="docinfo">
+          <img class="docavatar" src="../assets/images/doch1.jpg" width="60rem" height="60rem" />
+          <p class="docname">{{patinfo.name}} 您好!</p>
+        </div>
       </div>
-    </div>
-    <div class="bgimg" v-if="inflag"></div>
-    <div class="content">
-      <div class="injectRecord">
-        <div class="formTitle">体内FVIII活性水平实时预报</div>
-        <div class="lrcontainer">
-          <div class="lritem left">
-            <div class="personRatio">
-
+      <div class="bgimg"></div>
+      <div class="content">
+        <div class="injectRecord">
+          <div class="formTitle">体内FVIII活性水平实时预报</div>
+          <div class="lrcontainer">
+            <div class="lritem left">
+              <div class="personRatio">
+
+              </div>
+            </div>
+            <div class="lritem right">
+              <p style="margin:5px 0px;color:red;font-weight:bold;font-size:1.5rem">FVIII浓度:{{latestCase.FVIII}}</p>
+              <mt-cell title="参考方案"></mt-cell>
+              <mt-cell :title="'1.产品:'+latestCase.mpro"></mt-cell>
+              <mt-cell :title="'2.剂量:'+latestCase.zsjl"></mt-cell>
+              <mt-cell :title="'3.频次:'+latestCase.mfreq"></mt-cell>
+              <mt-cell title="本结果仅供参考,"></mt-cell>
+              <mt-cell title="具体治疗方案请遵医嘱执行"></mt-cell>
             </div>
           </div>
-          <div class="lritem right">
-            <p style="margin:5px 0px;color:red;font-weight:bold;font-size:1.5rem">FVIII浓度:50%</p>
-            <mt-cell title="参考方案"></mt-cell>
-            <mt-cell title="1.XXX产品"></mt-cell>
-            <mt-cell title="2.XXX剂量"></mt-cell>
-            <mt-cell title="3.XXX频次"></mt-cell>
-            <mt-cell title="本结果仅供参考,"></mt-cell>
-            <mt-cell title="具体治疗方案请遵医嘱执行"></mt-cell>
+          <div class="footer">
+            <div class="jbbtn" @click="goPage('/patclockin')">注射打卡</div>
+            <div class="jbbtn" @click="goPage('/patinjectionlist')">注射记录</div>
+            <div class="jbbtn" @click="goPage('/procaselist')">查看PK曲线</div>
           </div>
         </div>
-        <div class="footer">
-          <div class="jbbtn" @click="goPage('/patclockin')">注射打卡</div>
-          <div class="jbbtn" @click="goPage('patinjectionlist')">注射记录</div>
-          <div class="jbbtn" @click="goPage('solutionpkline')">查看PK曲线</div>
-        </div>
+      </div>
+    </div>
+    <!-- 未查询到病例信息 -->
+    <div v-else>
+        <div class="content">
+          <div class="bgimg">
+            <div class="docinfo">
+              <img class="docavatar" src="../assets/images/doch1.jpg" width="60rem" height="60rem" />
+              <p class="docname">{{patinfo.name}} 您好!</p>
+            </div>
+            <div style="margin:16.8rem auto;width:50%;font-size:1.4rem;margin-top:16.8rem">
+                未查询到您的信息请等待主治医生进行信息录入
+              </div>
+          </div>
+          
       </div>
     </div>
   </div>
@@ -48,13 +65,26 @@
     data() {
       return {
         msg: 'Welcome to Your Vue.js App',
-        inflag: 0
+        inflag: 0,
+        patinfo: {},
+        latestCase: {}
       }
     },
     methods: {
       goPage(path) {
         this.$router.push(path)
+      },
+      getData() {
+        this.patinfo = localStorage.getItem("authinfo") ? JSON.parse(localStorage.getItem("authinfo")) : {}
+        this.$api.getPatientLatestCase().then(res => {
+          if (!res.data.code) {
+            this.latestCase = res.data.data
+          }
+        })
       }
+    },
+    created() {
+      this.getData()
     }
   }
 
@@ -64,6 +94,7 @@
   .container {
     .content {
       height: 100%;
+      margin-top:0px;
     }
 
     height: 100%;
@@ -78,10 +109,12 @@
 
     .bgimg {
       width: 100%;
-      height: 10rem;
-      top: 10rem;
+      height: 22.8rem;
+      // border:1px solid red;
+      /* top: 10rem; */
       position: absolute;
-      background-image: url("../assets/images/entrybg.jpg");
+      /* z-index:-1; */
+      background-image: url("../assets/images/infobg.png");
       background-size: 100% 100%;
     }
 
@@ -95,7 +128,7 @@
       .docname {
         color: #fff;
         margin: 0.2rem;
-        font-size:1.2rem;
+        font-size: 1.2rem;
       }
 
       position: relative;
@@ -112,8 +145,8 @@
       color: #2882F4;
       padding-bottom: 0.5rem;
       font-weight: bold;
-      font-size:1.2rem;
-      margin-top:9rem;
+      font-size: 1.2rem;
+      margin-top: 9rem;
     }
 
     .lrcontainer {
@@ -125,9 +158,11 @@
       .lritem {
         justify-content: space-between;
         height: 15rem;
+
         .left {
           width: 40%;
         }
+
         .personRatio {
           height: 15rem;
           width: 4.2rem;

+ 24 - 15
src/components/PatInjectionList.vue

@@ -4,26 +4,20 @@
     <div class="content">
       <div class="title">注射记录</div>
       <div class="injectionListForm baseInfo">
-      <div style="width:50%;font-size:1.2rem;text-align: center;margin:1rem auto;font-weight: bold;">姓名:肖小肖</div>
+        <div style="width:50%;font-size:1.2rem;text-align: center;margin:1rem auto;font-weight: bold;">姓名:{{patinfo.name}}</div>
         <div class="listItemContainer">
           <div class="listItem" style="width:70%;background:#6DA2FE;color:#fff;">打卡时间</div>
           <div class="listItem" style="background:#6DA2FE;color:#fff;">使用产品</div>
           <div class="listItem" style="background:#6DA2FE;color:#fff;">使用剂量</div>
         </div>
-        <div class="listItemContainer">
-          <div class="listItem" style="width:70%;">2023年03月30日16:00</div>
-          <div class="listItem">使用产品</div>
-          <div class="listItem">使用剂量</div>
-        </div>
-        <div class="listItemContainer">
-          <div class="listItem" style="width:70%;">2023年03月30日16:00</div>
-          <div class="listItem">使用产品</div>
-          <div class="listItem">使用剂量</div>
+        <div class="listItemContainer" v-for="(item,index) in recordsList">
+          <div class="listItem" style="width:70%;">{{item.ctime}}</div>
+          <div class="listItem">{{item.mpro}}</div>
+          <div class="listItem">{{item.mdose}}</div>
         </div>
-        
       </div>
       <div class="footer">
-        <div class="jbbtn">确定</div>
+        <div class="jbbtn" @click="goPage('/patindex')">确定</div>
         <div class="jbbtn" @click="goPage('/patclockin')">开始注射打卡</div>
       </div>
     </div>
@@ -48,13 +42,26 @@
     },
     data() {
       return {
-        form: {}
+        form: {},
+        patinfo:localStorage.getItem("authinfo")?JSON.parse(localStorage.getItem("authinfo")):{},
+        recordsList: []
       }
     },
     methods: {
       goPage(path) {
         this.$router.push(path)
+      },
+      getData() {
+        let id = this.$route.query.id
+        this.$api.getPatientRecordsList(this.queryForm).then(res => {
+          if (!res.data.code) {
+            this.recordsList = res.data.data.list
+          }
+        })
       }
+    },
+    created() {
+      this.getData()
     }
   }
 
@@ -73,7 +80,8 @@
 
   .footer {
     display: flex;
-    .jbbtn{
+
+    .jbbtn {
       width: 42%;
     }
   }
@@ -87,7 +95,8 @@
       line-height: 2.8rem;
       flex-direction: row;
       justify-content: space-between;
-      border-bottom:1px solid #ccc;
+      border-bottom: 1px solid #ccc;
+      font-size:12px;
     }
   }
 

+ 161 - 55
src/components/PatRegister.vue

@@ -1,64 +1,170 @@
 <template>
-  <div class="container">
-    <div class="bgimg"></div>
-    <div class="content">
-      <div class="title">注册信息</div>
-      <div class="loginForm">
-        <mt-field placeholder="姓 名" v-model="email"></mt-field>
-        <mt-field placeholder="手机号" v-model="email"></mt-field>
-        <mt-field placeholder="短信验证码" v-model="email"></mt-field>
-      </div>
-      <div class="footer">
-          <div class="jbbtn" @click="goPage('patindex')">提交</div>
+    <div class="container">
+      <div class="bgimg"></div>
+      <div class="content">
+        <div class="title">注册信息</div>
+        <div class="loginForm">
+          <mt-field placeholder="姓 名" v-model="form.name"></mt-field>
+          <div style="display:flex;">
+            <div style="width:80%;">
+              <mt-field placeholder="手机号" v-model="form.phone"></mt-field>
+            </div>
+            <div style="width:20%;">
+              <mt-button :disabled="disable" type="primary" class="sendPhcode" @click="timeCounter">{{timeCouterText}}
+              </mt-button>
+            </div>
+          </div>
+          <mt-field placeholder="短信验证码" v-model="form.phcode" type="number"></mt-field>
+        </div>
+        <div class="footer">
+          <div class="jbbtn" @click="submit">提交</div>
           <div class="agreeInfo">
-            <input type="checkbox" />
-            <span>我已知晓<a href="/#/agreedoc">《PK程序用户隐私条款》</a></span>
+            <input type="checkbox" checked v-if="form.isagree" @change="checkOnClick" />
+            <input type="checkbox" v-else @change="checkOnClick" />
+            <!-- <mt-checklist v-model="form.isagree" :options="['选项A', '选项B', '选项C']"></mt-checklist> -->
+            <span>我已知晓<a href="/#/agreedoc?from=1" @click.native="checkOnClick">《PK程序用户隐私条款》</a></span>
+  
           </div>
         </div>
+      </div>
     </div>
-  </div>
-</template>
-
-<script>
-  import {
-    Field
-  } from 'mint-ui'
-
-  export default {
-    name: 'Index',
-    components: {
-      Field
-    },
-    data() {
-      return {
-        email: ''
-      }
-    },
-    methods: {
-      goPage(path) {
-        this.$router.push(path)
+  </template>
+  
+  <script>
+    import {
+      Field,
+      Button,
+      Toast,
+      MessageBox,
+      Checklist
+    } from 'mint-ui'
+  
+    export default {
+      name: 'Index',
+      components: {
+        Field,
+        Button,
+        Toast,
+        MessageBox,
+        Checklist
+      },
+      data() {
+        return {
+          email: '',
+          timeCouterText: '发送',
+          seconds: 60,
+          disable: false,
+          isagree: false,
+          form: {}
+        }
+      },
+      methods: {
+        goPage(path) {
+          this.$router.push(path)
+        },
+        timeCounter() {
+          if(!this.form.phone){
+            MessageBox({
+              title: '提示',
+              message: '请输入手机号?'
+            })
+            return
+          }
+          let _this = this
+          this.$api.sendPhcode(this.form).then(res=>{})
+          var timer = setInterval(function () {
+            if (_this.seconds < 2) {
+              clearInterval(timer)
+              _this.seconds = 60
+              _this.timeCouterText = '发送'
+              _this.disable = false
+              return
+            }
+            _this.seconds -= 1
+            _this.timeCouterText = _this.seconds + '秒后重新发送'
+            _this.disable = true
+          }, 1000)
+        },
+        checkOnClick(e){
+          if(e.target.checked){
+            this.form.isagree = true
+          }else{
+            this.form.isagree = false
+          }
+        },
+        submit() {
+          if (!this.form.name) {
+            MessageBox({
+              title: '提示',
+              message: '请输入姓名'
+            })
+            return 
+          }
+          if (!this.form.phone) {
+            MessageBox({
+              title: '提示',
+              message: '请输入手机号'
+            })
+            return
+          }
+          if (!this.form.phcode) {
+            MessageBox({
+              title: '提示',
+              message: '请输入验证码'
+            })
+            return
+          }
+          if (!this.form.isagree) {
+            MessageBox({
+              title: '提示',
+              message: '请先同意《PK程序用户隐私条款》'
+            })
+            return
+          }
+          let params = this.form
+          params.role = 2
+          this.$api.login(params).then(res=>{
+            if(!res.data.code){
+              localStorage.setItem("token",res.data.data.token)
+              this.goPage("/docindex")
+            }else{
+              Toast(res.data.message)
+            }
+          })
+        }
       }
     }
-  }
-
-</script>
-
-<style scoped lang="scss">
-
-.content {
-    position: relative;
-    z-index: 1;
-
-    .footer {
-      /* position: absolute; */
-      bottom: 1rem;
-      margin: 0 auto;
-      left: 0;
-      right: 0;
-      bottom: 1rem;
-      .agreeInfo{
-        margin:2rem 0;
+  
+  </script>
+  
+  <style scoped lang="scss">
+    .content {
+      position: relative;
+      z-index: 1;
+  
+      .loginForm {
+        .sendPhcode {
+          /* width: 6rem; */
+          width: 100%;
+          margin-top: 1rem;
+          height: 3.0rem;
+          border-radius: 1.4rem;
+        }
+      }
+  
+      .footer {
+        /* position: absolute; */
+        bottom: 1rem;
+        margin: 0 auto;
+        left: 0;
+        right: 0;
+        bottom: 1rem;
+  
+        .agreeInfo {
+          margin: 2rem 0;
+        }
       }
     }
-  }
-</style>
+  
+  </style>
+  

+ 34 - 26
src/components/ProCaseList.vue

@@ -4,24 +4,14 @@
     <div class="content">
       <div class="title">方案列表</div>
       <div class="loginForm baseInfo">
-          <mt-cell title="使用产品:XXX" value="注射剂量:XXX"></mt-cell>
+        <div v-for="(item,index) in list">
+          <mt-cell :title="'使用产品:'+item.mpro" :value="'注射剂量:'+item.zsjl"></mt-cell>
           <div style="font-size:12px;text-align:left;padding-left:10px;">
-              方案时间:2023-05-13 18:53:00
-              <mt-button type="primary" size="small" @click="goPage">详情</mt-button>
-          </div>
-          <hr>
-          <mt-cell title="使用产品:XXX" value="注射剂量:XXX"></mt-cell>
-          <div style="font-size:12px;text-align:left;padding-left:10px;">
-              方案时间:2023-05-13 18:53:00
-              <mt-button type="primary" size="small">详情</mt-button>
-          </div>
-          <hr>
-          <mt-cell title="使用产品:XXX" value="注射剂量:XXX"></mt-cell>
-          <div style="font-size:12px;text-align:left;padding-left:10px;">
-              方案时间:2023-05-13 18:53:00
-              <mt-button type="primary" size="small">详情</mt-button>
+            方案时间:{{item.ctime}}
+            <mt-button type="primary" size="small" @click="goPage(item.id)">详情</mt-button>
           </div>
           <hr>
+        </div>
       </div>
       <div class="footer">
         <div class="preBtn">确定</div>
@@ -49,22 +39,35 @@
     },
     data() {
       return {
-        form: {}
+        form: {},
+        list: []
       }
     },
     methods: {
-      goPage() {
-        this.$router.push('/diagcalcshow')
+      goPage(id) {
+        this.$router.push({'path':'/diagcalcshow',query:{id:id}})
+      },
+      getData() {
+        let id = this.$route.query.id
+        this.$api.getPatientCaseList().then(res => {
+          if (!res.data.code) {
+            this.list = res.data.data.list
+          }
+        })
       }
+    },
+    created() {
+      this.getData()
     }
   }
 
 </script>
 
 <style scoped lang="scss">
-  hr{
-    margin:1rem 0;
+  hr {
+    margin: 1rem 0;
   }
+
   .bgimg {
     width: 100%;
     height: 10rem;
@@ -86,14 +89,17 @@
     font-weight: bold;
     color: white;
   }
-  .searchinput{
+
+  .searchinput {
     width: 80%;
     margin: auto;
-    .mint-search{
+
+    .mint-search {
       height: 100%;
-      margin-top:1rem;
+      margin-top: 1rem;
     }
   }
+
   .returnBtn {
     width: 40%;
     height: 2.5rem;
@@ -115,7 +121,8 @@
     padding: 1rem;
     border-radius: 5px;
     position: relative;
-    .mint-button--small{
+
+    .mint-button--small {
       height: 1.2rem;
       position: absolute;
       left: 78%;
@@ -153,6 +160,7 @@
 
   .footer {
     display: flex;
+
     .preBtn {
       width: 42%;
       height: 3rem;
@@ -164,7 +172,7 @@
       background-image: linear-gradient(to right, #23E0FD, #0173F0);
       font-weight: bold;
       color: white;
-      font-size:1.4rem;
+      font-size: 1.4rem;
     }
 
     .returnBtn {
@@ -178,7 +186,7 @@
       background-image: linear-gradient(to right, #23E0FD, #0173F0);
       font-weight: bold;
       color: white;
-      font-size:1.4rem;
+      font-size: 1.4rem;
     }
   }
 

+ 46 - 26
src/components/RegPatinfo.vue

@@ -5,22 +5,32 @@
       <div class="title">请录入病例信息</div>
       <div class="loginForm">
         <mt-field label="病例姓名" v-model="form.name"></mt-field>
-        <mt-field label="病例年龄" v-model="form.birthday" @focus.native.capture="$refs.birthdayPicker.open()">
+        <mt-field disabled label="病例年龄" v-model="form.birthday" @click.native="$refs.birthdayPicker.open()">
           <img src="../assets/images/down.png" alt="" width="16px">
         </mt-field>
-        </mt-datetime-picker>
-        <mt-field label="病例性别" v-model="form.sex" @focus.native.capture="sexFlag=true">
+        <mt-field disabled label="病例性别" v-model="form.sex" @click.native="sexFlag=true">
           <img src="../assets/images/down.png" alt="" width="16px">
         </mt-field>
-        <mt-field label="病例手机" v-model="form.phone"></mt-field>
+        <mt-field label="病例手机" v-model="form.phone" type="number"></mt-field>
       </div>
       <div class="footer">
         <div class="jbbtn" @click="submit">下一页</div>
       </div>
     </div>
-    <mt-datetime-picker ref="birthdayPicker" type="date" v-model="form.birthday">
+    <mt-datetime-picker ref="birthdayPicker" type="date" v-model="form.birthday"
+      year-format="{value} 年"
+      month-format="{value} 月"
+      date-format="{value} 日"
+      @confirm = 'changeTime'
+      :startDate = 'startDate'
+      :endDate = 'endDate'
+      @change = 'changeTime'
+    >
     </mt-datetime-picker>
-    <mt-picker v-if="sexFlag" :slots="slots" ref="sexPicker" class="sexPicker"></mt-picker>
+    <mt-picker @change="onValuesChange" v-if="sexFlag" :slots="slots" ref="sexPicker" class="sexPicker"
+      :showToolbar="true">
+      <div class="pickerConfirm" @click="sexFlag=false">确认</div>
+    </mt-picker>
   </div>
 </template>
 
@@ -29,7 +39,8 @@
     Field,
     MessageBox,
     DatetimePicker,
-    Picker
+    Picker,
+    Button
   } from 'mint-ui'
 
   export default {
@@ -38,26 +49,37 @@
       Field,
       MessageBox,
       DatetimePicker,
-      Picker
+      Picker,
+      Button
     },
     data() {
       return {
-        form: {},
-        sexFlag:false,
-        slots: [
-        {
+        form: {birthday:'',sex:''},
+        sexFlag: false,
+        slots: [{
           flex: 1,
           values: ['男', '女'],
           className: 'slot1',
           textAlign: 'center'
-        }
-      ]
+        }],
+        startDate:new Date('1923-01-01'),
+        endDate:new Date(this.$datetime.formatDate(new Date())),
       }
     },
     methods: {
       goPage() {
         this.$router.push('/regpatpro')
       },
+      changeTime(value){
+        this.form.birthday = this.$datetime.formatDate(value)
+      },
+      onValuesChange(picker, values) {
+        if (picker.getSlotValue(0)) {
+          this.form.sex = picker.getSlotValue(0)
+        } else {
+          this.form.sex = "男"
+        }
+      },
       submit() {
         if (!this.form.name) {
           MessageBox({
@@ -69,14 +91,14 @@
         if (!this.form.birthday) {
           MessageBox({
             title: '提示',
-            message: '请输入手机号?'
+            message: '请选择出生年月?'
           })
           return
         }
         if (!this.form.sex) {
           MessageBox({
             title: '提示',
-            message: '请输入验证码?'
+            message: '请选择性别?'
           })
           return
         }
@@ -88,23 +110,21 @@
           return
         }
         let params = this.form
-        this.$api.login(params).then(res => {
+        localStorage.setItem("patientCase", JSON.stringify(params))
+        this.$api.regPatient(params).then(res => {
           if (!res.data.code) {
-            this.goPage("/docindex")
+            this.goPage("/regpatpro")
           }
         })
       }
-    }
+    },
+    created() {
+      console.log(this.endDate,222222222222)
+    },
   }
 
 </script>
 
 <style scoped lang="scss">
-  .sexPicker{
-    position: fixed;
-    width: 100%;
-    z-index: 10;
-    bottom:0;
-    background: #fff;
-  }
+
 </style>

+ 81 - 6
src/components/RegPatpro.vue

@@ -4,36 +4,111 @@
     <div class="content">
       <div class="title">请选择患者使用产品</div>
       <div class="loginForm">
-        <mt-field label="产品选择" v-model="form.email"></mt-field>
-        <mt-field label="注射频次" v-model="form.email"></mt-field>
+        <mt-field disabled label="产品选择" v-model="form.mpro" @click.native="mproFlag=true">
+          <img src="../assets/images/down.png" alt="" width="16px">
+        </mt-field>
+        <mt-field disabled label="注射频次" v-model="form.mfreq" @click.native="mfreqFlag=true">
+          <img src="../assets/images/down.png" alt="" width="16px">
+        </mt-field>
       </div>
       <div class="footer">
-        <div class="jbbtn" @click="goPage">下一页</div>
+        <div class="jbbtn" @click="submit">下一页</div>
       </div>
     </div>
+    <mt-picker @change="onValuesChange" v-if="mproFlag" :slots="slots" ref="sexPicker" class="sexPicker"
+      :showToolbar="true">
+      <div class="pickerConfirm" @click="mproFlag=false">确认</div>
+    </mt-picker>
+    <mt-picker @change="onValuesChange1" v-if="mfreqFlag" :slots="slots1" ref="sexPicker1" class="sexPicker"
+      :showToolbar="true">
+      <div class="pickerConfirm" @click="mfreqFlag=false">确认</div>
+    </mt-picker>
   </div>
 </template>
 
 <script>
   import {
     Field,
-    Picker
+    Picker,
+    MessageBox
   } from 'mint-ui'
 
   export default {
     name: 'Index',
     components: {
       Field,
-      Picker
+      Picker,
+      MessageBox
     },
     data() {
       return {
-        form: {}
+        form: {},
+        mproFlag: false,
+        mfreqFlag: false,
+        slots: [{
+          flex: 1,
+          values: ['人血FVIII', '百因止', '科跃奇', '诺易', '任捷', '重凝贝', '安佳因', '其他'],
+          className: 'slot1',
+          textAlign: 'center'
+        }],
+        slots1: [{
+          flex: 1,
+          values: ['每周2次', '每周3次', '每天1次', '每2天一次', '每3天一次', '不固定/按需治疗'],
+          className: 'slot1',
+          textAlign: 'center'
+        }]
       }
     },
     methods: {
       goPage() {
         this.$router.push('/diagcalc')
+      },
+      onValuesChange(picker, values) {
+        if (picker.getSlotValue(0)) {
+          this.form.mpro = picker.getSlotValue(0)
+        } else {
+          this.form.mpro = "人血FVIII"
+        }
+      },
+      onValuesChange1(picker, values) {
+        if (picker.getSlotValue(0)) {
+          this.form.mfreq = picker.getSlotValue(0)
+        } else {
+          this.form.mfreq = "每周2次"
+        }
+      },
+      submit() {
+        if (!this.form.mpro) {
+          MessageBox({
+            title: '提示',
+            message: '请选择产品?'
+          })
+          return
+        }
+        if (!this.form.mfreq) {
+          MessageBox({
+            title: '提示',
+            message: '请选择注射频次?'
+          })
+          return
+        }
+        let params = this.form
+        let patientCase = localStorage.getItem("patientCase")
+        if(patientCase){
+          patientCase = JSON.parse(patientCase)
+          patientCase.mpro = params.mpro
+          patientCase.mfreq = params.mfreq
+        }else{
+          patientCase = params
+        }
+        localStorage.setItem("patientCase",JSON.stringify(patientCase))
+        this.goPage("/diagcalc")
+
+        // this.$api.regPatient(params).then(res => {
+        //   if (!res.data.code) {
+        //     this.goPage("/regpatpro")
+        //   }
+        // })
       }
     }
   }

+ 19 - 5
src/components/SolutionPkLine.vue

@@ -11,11 +11,11 @@
         <mt-cell title="活性大于3%的时间:14.4" value="谷活性(IU/kg):1.16"></mt-cell>
         <mt-cell title="活性大于1%的时间:14.4"></mt-cell>
         <hr>
-        <mt-cell title="姓名:张三" value="病例ID:XXX"></mt-cell>
-        <mt-cell title="年龄:51" value="性别:男"></mt-cell>
-        <mt-cell title="使用产品:XXX" value="注射剂量:XXX"></mt-cell>
-        <mt-cell title="注射频次:XXX"></mt-cell>
-        <div style="font-size:12px;text-align:left;padding-left:10px;">方案时间时间:2023-05-13 18:53:00</div>
+        <mt-cell :title="'姓名:'+caseInfo.name" :value="'病例ID:'+caseInfo.code"></mt-cell>
+        <mt-cell :title="'年龄:'+caseInfo.age" :value="'性别:'+caseInfo.sex"></mt-cell>
+        <mt-cell :title="'使用产品:'+caseInfo.mpro" :value="'注射剂量:'+caseInfo.zsjl"></mt-cell>
+        <mt-cell :title="'注射频次:'+caseInfo.mfreq"></mt-cell>
+        <div style="font-size:12px;text-align:left;padding-left:10px;">方案时间时间:{{caseInfo.ctime}}</div>
       </div>
       <div class="footer">
         <div class="jbbtn" @click="goPage(-1)">上一页</div>
@@ -40,6 +40,7 @@
     data() {
       return {
         msg: 'Welcome to Your Vue.js App',
+        caseInfo: {},
         pklineOption: {
           title: {},
           calculable: true,
@@ -79,7 +80,20 @@
           this.$router.go(-1)
         }
         this.$router.push(path)
+      },
+      getData() {
+        let id = this.$route.query.id
+        this.$api.getPatientCaseInfo({
+          id: id
+        }).then(res => {
+          if (!res.data.code) {
+            this.caseInfo = res.data.data
+          }
+        })
       }
+    },
+    created() {
+      this.getData()
     }
   }
 

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 330 - 4
src/components/UserAgree.vue


+ 2 - 0
src/main.js

@@ -8,10 +8,12 @@ import App from './App'
 import 'echarts'
 import ECharts from 'vue-echarts'
 import api from './api'
+import datetime from './utils/datetime'
 
 Vue.use(MintUI)
 Vue.component('v-chart', ECharts)
 Vue.prototype.$api = api
+Vue.prototype.$datetime = datetime
 Vue.config.productionTip = false
 
 /* eslint-disable no-new */

+ 20 - 0
src/utils/datetime.js

@@ -0,0 +1,20 @@
+export default{
+    formatTen(num) {
+        return num > 9 ? (num + "") : ("0" + num);
+    },
+    formatDateTime(date) {
+        var year = date.getFullYear();
+        var month = date.getMonth() + 1;
+        var day = date.getDate();
+        var hour = date.getHours();
+        var minute = date.getMinutes();
+        return year + '-' + this.formatTen(month) + '-' + this.formatTen(day) + ' '+ this.formatTen(hour) + ':'+ this.formatTen(minute);
+    },
+    formatDate(date) {
+        var year = date.getFullYear();
+        var month = date.getMonth() + 1;
+        var day = date.getDate();
+        return year + '-' + this.formatTen(month) + '-' + this.formatTen(day)
+    }
+}
+

+ 3 - 5
vue.config.js

@@ -2,11 +2,9 @@ module.exports = {
     devServer: {
         proxy: {
             '/api': {
-                target: 'http://118.190.145.217:8090',
-                changeOrigin: true,
-                pathRewrite:{
-                    '^/api': '/api'
-                }
+                // target: 'http://118.190.145.217:8090',
+                target: 'xjctest.baianxi.com',
+                changeOrigin: true
             }
         }
     },