Your Name 1 anno fa
parent
commit
f5aeaf4713
4 ha cambiato i file con 113 aggiunte e 64 eliminazioni
  1. 4 0
      src/api.js
  2. BIN
      src/assets/images/delete.png
  3. 0 1
      src/components/DiagCalc.vue
  4. 109 63
      src/components/PatCaseList.vue

+ 4 - 0
src/api.js

@@ -128,4 +128,8 @@ export default {
   get_patient_info: params => {
     return axios.get(`${baseURL}/api/doctor/patient`,{params:params})
   },
+  // 删除病例
+  deleteCaseInfo: params => {
+    return axios.delete(`${baseURL}/api/doctor/patient/case/info`,{params:params})
+  },
 }

BIN
src/assets/images/delete.png


+ 0 - 1
src/components/DiagCalc.vue

@@ -532,7 +532,6 @@
         //   delete params["id"]
         // }
         this.$api.regPatientCase(params).then(res => {
-          console.log(paarms,1111111111)
           if (!res.data.code) {
             that.form = res.data.data;
             that.form.lyl = Math.round(that.form.lyl*100)

+ 109 - 63
src/components/PatCaseList.vue

@@ -11,8 +11,8 @@
           <mt-button type="primary" size="small" @click="get_patient_list()">搜索</mt-button>
         </mt-field>
         <mt-field v-if="selected==3" class="searchInput" placeholder="请输入患者姓名" v-model="queryForm.name">
-            <mt-button type="primary" size="small" @click="getPatientCaseList()">搜索</mt-button>
-          </mt-field>
+          <mt-button type="primary" size="small" @click="getPatientCaseList()">搜索</mt-button>
+        </mt-field>
       </div>
       <!-- <mt-navbar v-model="selected">
         <mt-tab-item id="1"><span @click.prevent="tabChange">医生</span></mt-tab-item>
@@ -26,7 +26,8 @@
       </div>
       <!-- 医生 -->
       <div class="diagShowForm" v-if="selected=='1'">
-        <div  @click="goToPatient(item)" v-for="(item,index) in doctorList" :key="index"  style="display:flex;border-bottom:1px solid #ccc;position: relative;">
+        <div @click="goToPatient(item)" v-for="(item,index) in doctorList" :key="index"
+          style="display:flex;border-bottom:1px solid #ccc;position: relative;">
           <div class="rowfont" style="width:30%;">{{item.name}}</div>
           <div class="rowfont" style="width:30%;">
             <div class="badge">{{item.patient_cnt}}</div>
@@ -43,7 +44,8 @@
       <!-- 患者 -->
       <div class="diagShowForm" v-if="selected=='2'">
         <div class="formTitle" v-if="curDoctor.id">{{curDoctor.name}}医生</div>
-        <div  @click="goToCase(item)" v-for="(item,index) in patientList" :key="index" style="display:flex;border-bottom:1px solid #ccc;position: relative;">
+        <div @click="goToCase(item)" v-for="(item,index) in patientList" :key="index"
+          style="display:flex;border-bottom:1px solid #ccc;position: relative;">
           <div class="rowfont" style="width:45%;">{{item.name}}</div>
           <div class="rowfont" style="width:45%;">
             <div class="badge">{{item.case_cnt}}</div>
@@ -61,6 +63,7 @@
       <div class="patCaseForm baseInfo" v-for="(item,index) in caseList" v-if="selected=='3'">
         <!-- <mt-cell :title="'姓名:'+item.name" :value="'ID:'+item.code"></mt-cell>
         <mt-cell :title="'年龄:'+item.age" :value="'性别:'+item.sex"></mt-cell> -->
+        <img class="delete" src="../assets/images/delete.png" alt="" width="32px" @click="del(item)" />
         <mt-cell :title="'产品:'+item.ckmpro" :value="'剂量(IU):'+item.ckzsjl"></mt-cell>
         <mt-cell :title="'频次:'+item.ckmfreq" :value="'体重(KG):'+item.bltz"></mt-cell>
         <mt-cell :title="'方案医生:'+item.doctor_name"></mt-cell>
@@ -91,7 +94,8 @@
     Button,
     Navbar,
     Badge,
-    Toast
+    Toast,
+    MessageBox
   } from 'mint-ui'
 
   export default {
@@ -103,41 +107,42 @@
       Button,
       Navbar,
       Badge,
-      Toast
+      Toast,
+      MessageBox
     },
     data() {
       return {
         searchName: "",
         form: {},
         queryForm: {},
-        selected: this.$route.query.select?this.$route.query.select:"1",
+        selected: this.$route.query.select ? this.$route.query.select : "1",
         caseInfo: {},
         caseList: [],
-        doctorList:[],
-        patientList:[],
-        curDoctor:{},
-        curPatient:{}
+        doctorList: [],
+        patientList: [],
+        curDoctor: {},
+        curPatient: {}
       }
     },
     methods: {
-      tabChange(i){
+      tabChange(i) {
         this.selected = i
-        if(this.selected==2 && !this.curDoctor.id){
+        if (this.selected == 2 && !this.curDoctor.id) {
           Toast("请先选择医生")
           this.selected = 1
         }
-        if(this.selected==3 && !this.curPatient.id){
+        if (this.selected == 3 && !this.curPatient.id) {
           Toast("请先选择患者")
           this.selected = 2
         }
       },
-      goToPatient(item){
+      goToPatient(item) {
         this.queryForm.cur_doctor_id = item.id
         this.getData()
         this.selected = 2
         this.curDoctor = item
       },
-      goToCase(item){
+      goToCase(item) {
         this.queryForm.patient_id = item.id
         this.getData()
         this.selected = 3
@@ -155,37 +160,37 @@
           }
         })
       },
-      getPatientCaseList(){
+      getPatientCaseList() {
         this.$api.getPatientCaseList(this.queryForm).then(res => {
           if (!res.data.code) {
             this.caseList = res.data.data.list
-            this.caseList.forEach((item,index)=>{
-                if(!item.ckmpro){
-                  item.ckmpro = ""
-                }
-                if(!item.ckmfreq){
-                  item.ckmfreq = ""
-                }
-                if(!item.ckzsjl){
-                  item.ckzsjl = ""
-                }
-                if(!item.bltz){
-                  item.bltz = ""
-                }
+            this.caseList.forEach((item, index) => {
+              if (!item.ckmpro) {
+                item.ckmpro = ""
+              }
+              if (!item.ckmfreq) {
+                item.ckmfreq = ""
+              }
+              if (!item.ckzsjl) {
+                item.ckzsjl = ""
+              }
+              if (!item.bltz) {
+                item.bltz = ""
+              }
             })
           }
         })
       },
-      get_doctor_list(){
-        this.$api.get_doctor_list(this.queryForm).then(res=>{
-          if(!res.data.code){
+      get_doctor_list() {
+        this.$api.get_doctor_list(this.queryForm).then(res => {
+          if (!res.data.code) {
             this.doctorList = res.data.data.list
           }
         })
       },
-      get_patient_list(){
-        this.$api.get_patient_list(this.queryForm).then(res=>{
-          if(!res.data.code){
+      get_patient_list() {
+        this.$api.get_patient_list(this.queryForm).then(res => {
+          if (!res.data.code) {
             this.patientList = res.data.data.list
           }
         })
@@ -196,29 +201,50 @@
         this.get_doctor_list()
         this.get_patient_list()
       },
-      edit(item){
+      edit(item) {
         this.$router.push({
           path: "diagcalc",
           query: {
             id: item.id,
-            patid:item.patient_id,
-            back:"patcaselist",
-            edit:1
+            patid: item.patient_id,
+            back: "patcaselist",
+            edit: 1
           }
         })
       },
-      add(item){
+      add(item) {
         this.$router.push({
           path: "regpatinfo",
-          query:{
-            patid:item.patient_id
+          query: {
+            patid: item.patient_id
           }
         })
+      },
+      del(item) {
+        MessageBox({
+          title: '提示',
+          message: '确认删除?',
+          showCancelButton: true,
+          confirmButtonText: "确认删除",
+          cancelButtonText: "取消",
+          cancelButtonClass: "docIndexCancelBtn",
+          confirmButtonClass: "confirmButtonClass"
+        }, action => {
+          if (action == "confirm") {
+            this.$api.deleteCaseInfo({id:item.id}).then(res=>{
+              this.getData()
+            })
+          } else {
+            // this.$router.push("regpatinfo")
+          }
+        });
       }
     },
     created() {
       this.getData()
-    }
+    },
+    mounted() {
+    },
   }
 
 </script>
@@ -228,7 +254,7 @@
     width: 94%;
     margin: auto;
     margin-bottom: 0.5rem;
-    margin-top:10px;
+    margin-top: 10px;
 
     .mint-search {
       height: 100%;
@@ -253,7 +279,8 @@
     padding: 1rem;
     border-radius: 5px;
     position: relative;
-    padding-bottom:2rem;
+    padding-bottom: 2rem;
+    position: relative;
 
     .mint-button--small {
       height: 1.6rem;
@@ -261,6 +288,14 @@
       left: 78%;
     }
 
+    .delete {
+      width: 32px;
+      position: absolute;
+      right: 5px;
+      top: 5px;
+      z-index: 10;
+    }
+
     .mint-cell {
       min-height: 1.8rem;
     }
@@ -294,8 +329,9 @@
   .container {
     height: 100vh;
     overflow-y: scroll;
-    .content{
-      margin-top:1rem;
+
+    .content {
+      margin-top: 1rem;
     }
   }
 
@@ -341,36 +377,46 @@
     .jbbtn {
       width: 74%;
       height: 3.2rem;
-      font-size:1.4rem;
-      line-height:3.2rem;
+      font-size: 1.4rem;
+      line-height: 3.2rem;
     }
   }
 
-  .cusNav{
+  .cusNav {
     width: 94%;
     display: flex;
     height: 3.2rem;
     line-height: 3.2rem;
     background: #fff;
-    margin:auto;
-    .cusNavItem{
+    margin: auto;
+
+    .cusNavItem {
       width: 33%;
-      font-size:1.2rem;
+      font-size: 1.2rem;
     }
-    .active{
-      border-bottom:3px solid #26a2ff;
-      color:#26a2ff;
+
+    .active {
+      border-bottom: 3px solid #26a2ff;
+      color: #26a2ff;
     }
   }
-  /deep/ .mint-cell-value{
-    color:#000;
+
+  /deep/ .mint-cell-value {
+    color: #000;
   }
-  /deep/ .mint-cell:last-child{
+
+  /deep/ .mint-cell:last-child {
     background-image: none;
   }
-  .pageFooter{
-    .jbbtn{
-      margin-top:0px;
+
+  .pageFooter {
+    .jbbtn {
+      margin-top: 0px;
     }
   }
+
+  .docIndexCancelBtn {
+    font-size: 24px;
+    /* color: red !important; */
+  }
 </style>