Bladeren bron

hah阿凡达

28169 6 maanden geleden
bovenliggende
commit
beea75afcc
3 gewijzigde bestanden met toevoegingen van 49 en 42 verwijderingen
  1. 3 2
      src/api/patient.js
  2. 4 4
      src/xt_pages/user/components/PatientSidebar.vue
  3. 42 36
      src/xt_pages/user/sickHistory_new.vue

+ 3 - 2
src/api/patient.js Bestand weergeven

@@ -1233,11 +1233,12 @@ export function createNewSickHistoryRecord(data){
1233 1233
   })
1234 1234
 }
1235 1235
 
1236
-export function getNewSickHistory(){
1236
+export function getNewSickHistory(params){
1237 1237
 
1238 1238
   return request({
1239 1239
     url:"/api/patient/getnewsickhistory",
1240 1240
     method:"get",
1241 1241
     params:params,
1242 1242
   })
1243
-}
1243
+}
1244
+

+ 4 - 4
src/xt_pages/user/components/PatientSidebar.vue Bestand weergeven

@@ -167,10 +167,10 @@ export default {
167 167
               name: '3-1',
168 168
               label: '病史'
169 169
             },
170
-            // {
171
-            //   name: '3-4',
172
-            //   label: '病史新'
173
-            // },
170
+            {
171
+              name: '3-4',
172
+              label: '病史新'
173
+            },
174 174
             {
175 175
               name: '3-2',
176 176
               label: '体格检查'

+ 42 - 36
src/xt_pages/user/sickHistory_new.vue Bestand weergeven

@@ -17,24 +17,25 @@
17 17
             </div>
18 18
             <div>
19 19
               <el-table class="table"
20
-                ref="phy_table"
20
+                ref="record_table"
21 21
                 :data="tableData"
22 22
                 :highlight-current-row="true"
23
-                @row-click="rowclick"
23
+                @current-change="getCurrentChange"
24 24
                 style="width: 100%">
25
-                <el-table-column
26
-                  prop="index"
27
-                  label="序号"
28
-                  width="50">
25
+                <el-table-column prop="index" label="序号" width="50" align="center">
26
+                   <template slot-scope="scope">
27
+                       {{ scope.$index + 1 }}
28
+                   </template>
29 29
                 </el-table-column>
30
-                <el-table-column
31
-                  prop="date"
32
-                  label="时间"
33
-                  width="">
30
+                <el-table-column prop="date" label="时间" width="" align="center">
31
+                    <template slot-scope="scope">
32
+                         {{ getTime(scope.row.record_time) }}
33
+                    </template>
34 34
                 </el-table-column>
35
-                <el-table-column
36
-                  prop="doctor"
37
-                  label="医生">
35
+                <el-table-column prop="doctor" label="医生" align="center">
36
+                  <template slot-scope="scope">
37
+                         {{ getDocName(scope.row.doctor_id) }}
38
+                  </template>
38 39
                 </el-table-column>
39 40
               </el-table>
40 41
             </div>
@@ -216,10 +217,11 @@ import {
216 217
   deleteSickHistoryRecords,
217 218
   getNewSickHistory,
218 219
   ModifySickHistoryRecord,
220
+  getSickHistoryByPatient
219 221
 } from '@/api/patient'
220 222
 import { parseTime } from '@/utils'
221
-import BreadCrumb from '@/xt_pages/components/bread-crumb'
222
-
223
+import BreadCrumb from '@/xt_pages/components/bread-crumb' 
224
+import { uParseTime } from '@/utils/tools'
223 225
 export default {
224 226
   name: 'CourseOfDisease',
225 227
   components: {
@@ -401,15 +403,6 @@ export default {
401 403
       var time = new Date(timestamp * 1000)
402 404
       return parseTime(time, '{y}-{m}-{d} {h}:{i}:{s}')
403 405
     },
404
-    doctorName: function(doctor_id) {
405
-      for (let index = 0; index < this.doctorOptions.length; index++) {
406
-        const doctor = this.doctorOptions[index]
407
-        if (doctor.id == doctor_id) {
408
-          return doctor.name
409
-        }
410
-      }
411
-      return ''
412
-    },
413 406
     modifyAction: function() {
414 407
       this.edit_new_content = this.$refs.edit_neditor.content
415 408
       if (this.edit_new_content.length == 0) {
@@ -482,7 +475,7 @@ export default {
482 475
          if(response.data.state == 1){
483 476
            var patientSickHistory = response.data.data.patientSickHistory
484 477
            this.$message.success("保存成功!")
485
-           
478
+           this.getlist()
486 479
          }
487 480
 
488 481
       }).catch(error => {
@@ -548,15 +541,7 @@ export default {
548 541
         this.$message.error(err)
549 542
       })
550 543
     },
551
-    showDialog(){
552
-      for(let i = 0; i < this.doctorOptions.length; i++){
553
-        if(this.doctorOptions[i].id == this.$store.getters.xt_user.user.id){
554
-          this.doctor_id =this.$store.getters.xt_user.user.id
555
-        }
556
-      }
557
-      this.show_dialog = true
558
-
559
-    },showEdit() {
544
+    showEdit() {
560 545
       if (this.table_current_index == -1) {
561 546
         this.$message.error('请选择要修改的病程内容')
562 547
         return
@@ -596,14 +581,35 @@ export default {
596 581
        var params = {
597 582
         patient_id:this.patient_id
598 583
        }
599
-       console.log("paraosm===============",params)
600 584
       getNewSickHistory(params).then(response=>{
601 585
         if(response.data.state ==1 ){
602 586
           var list = response.data.data.list
603
-          console.log("类别===============",list)
604 587
           this.tableData = list
588
+          this.$refs.record_table.setCurrentRow(this.tableData[0])
605 589
         } 
606 590
       })
591
+    },
592
+    getDocName(admin_user_id){
593
+      var user_name = ""
594
+      for(let i=0;i<this.doctorOptions.length;i++){
595
+        if(admin_user_id == this.doctorOptions[i].id){
596
+             user_name = this.doctorOptions[i].name
597
+        }
598
+      }
599
+      return user_name
600
+    },
601
+    getTime (time) {
602
+      return uParseTime(time, '{y}-{m}-{d}')
603
+    },
604
+    getCurrentChange(val){
605
+       console.log("VAL---------------",val)
606
+      this.record_time = this.getTime(val.record_time)
607
+      this.id = val.id
608
+      this.content = val.content
609
+      this.guominyaowu_desc = val.hypersusceptibility_desc
610
+
611
+      this.is_fumotouxishi = val.is_fumo_dialysis_history
612
+      this.is_hypersusceptibility  = val.is_shenyizhi_history
607 613
     }
608 614
   }
609 615
 }