XMLWAN il y a 4 ans
Parent
révision
11c74ab746

+ 55 - 0
src/api/patient.js Voir le fichier

@@ -70,6 +70,7 @@ export function createPatientDialysisSolution(id, solution, mode) {
70 70
 }
71 71
 
72 72
 export function editPatientDialysisSolution(patient, id, solution, mode) {
73
+  
73 74
   return request({
74 75
     url: '/api/patients/dialysissolution/edit?patient=' + patient + '&id=' + id + '&mode=' + mode,
75 76
     method: 'put',
@@ -398,4 +399,58 @@ export function getAllVascularAccessList(params){
398 399
     method:"Get",
399 400
     params:params
400 401
   })
402
+}
403
+
404
+export function getVascularAccessByDetail(id,params){
405
+  
406
+  return request({
407
+    url:"/api/patient/getvascularaccessbydetial?id="+id,
408
+    method:"get",
409
+    params:params,
410
+  })
411
+}
412
+
413
+export function updatedVasularAccess(params){
414
+  
415
+  return request({
416
+    url:"/api/patient/updatevasularaccess",
417
+    method:"get",
418
+    params:params
419
+  })
420
+}
421
+
422
+export function DeleteVascularAccess(id,params){
423
+  
424
+  return request({
425
+    url:"/api/patient/deletevascularaccess?id="+id,
426
+    method:"get",
427
+    params:params
428
+  })
429
+}
430
+
431
+export function savePasswayAssessment(params){
432
+  
433
+  return request({
434
+    url:"/api/patient/savepasswayassessment",
435
+    method:"get",
436
+    params:params
437
+  })
438
+}
439
+
440
+export function getAllPassWayAssessmentList(params){
441
+  
442
+  return request({
443
+    url:"/api/patient/getallpasswayassessment",
444
+    method:"get",
445
+    params:params
446
+  })
447
+}
448
+
449
+export function getPassWayAssessmentById(id){
450
+  
451
+  return request({
452
+    url:"/api/patient/getpasswayassmentbyid?id="+id,
453
+    method:"Get",
454
+    params:params,
455
+  })
401 456
 }

+ 11 - 0
src/router/modules/patient.js Voir le fichier

@@ -74,6 +74,17 @@ export default {
74 74
       noCache: true
75 75
     }
76 76
   },
77
+  {
78
+    path: '/patients/patient/:id/vascularAccessDetail/:pid',
79
+    component: () => import('@/xt_pages/user/vascularAccessDetail'),
80
+    hidden: true,
81
+    is_menu: false,
82
+    name: 'vascularAccessDetail',
83
+    meta: {
84
+      title: 'vascularAccessDetail',
85
+      noCache: true
86
+    }
87
+  },
77 88
   {
78 89
     path: '/patients/patient/:id/dialysisRecord',
79 90
     component: () => import('@/xt_pages/user/dialysisRecord'),

+ 19 - 10
src/xt_pages/user/dialysisSolution.vue Voir le fichier

@@ -85,6 +85,17 @@
85 85
             <span>{{ getAdminUserName(scope.row.registrars_id) }}</span>
86 86
           </template>
87 87
         </el-table-column>
88
+        
89
+        <el-table-column
90
+          prop="created_time"
91
+          align="center"
92
+          label="创建日期"
93
+          min-width="60"
94
+        >
95
+          <template slot-scope="scope">
96
+            <span>{{ scope.row.created_time | parseTime("{y}-{m}-{d}") }}</span>
97
+          </template>
98
+        </el-table-column>
88 99
 
89 100
         <el-table-column
90 101
           prop="updated_time"
@@ -1176,13 +1187,9 @@ export default {
1176 1187
           ) {
1177 1188
             mode = '3'
1178 1189
           }
1179
-
1180
-          editPatientDialysisSolution(
1181
-            this.patientID,
1182
-            this.addPlan.id,
1183
-            this.addPlan,
1184
-            mode
1185
-          ).then(response => {
1190
+          console.log("2233333",this.addPlan)
1191
+          
1192
+          editPatientDialysisSolution(this.patientID,this.addPlan.id,this.addPlan, mode).then(response => {
1186 1193
             if (response.data.state == 0) {
1187 1194
               this.$message.error(response.data.msg)
1188 1195
               return false
@@ -1216,6 +1223,7 @@ export default {
1216 1223
       })
1217 1224
     },
1218 1225
     submitNewSolution(formName) {
1226
+     
1219 1227
       this.addPlan.anticoagulant_zongliang = this.addPlan.anticoagulant_zongliang.toString()
1220 1228
       this.$refs[formName].validate(valid => {
1221 1229
         if (valid) {
@@ -1260,7 +1268,7 @@ export default {
1260 1268
       this.fetchPatientDialysisSolutions()
1261 1269
     },
1262 1270
     openEdit(index, row) {
1263
-     
1271
+      console.log("ro2333333",row)
1264 1272
       this.current_index = index
1265 1273
 
1266 1274
       this.addPlan.id = row.id
@@ -1324,7 +1332,7 @@ export default {
1324 1332
       this.addPlan.blood_access = row.blood_access
1325 1333
 
1326 1334
       this.addPlan.registrars_id = row.registrars_id
1327
-
1335
+      this.addPlan.created_time =  row.created_time
1328 1336
       this.dialogVisible = true
1329 1337
       this.isEdit = true
1330 1338
       if(row.dialysate_formulation==0){
@@ -1398,7 +1406,8 @@ export default {
1398 1406
 
1399 1407
         dialysis_duration: '3.30',
1400 1408
         dialysis_duration_hour: '3',
1401
-        dialysis_duration_minute: '30'
1409
+        dialysis_duration_minute: '30',
1410
+        created_time:"",
1402 1411
       }
1403 1412
       this.addPlanTypeChange()
1404 1413
 

+ 332 - 24
src/xt_pages/user/vascularAccess.vue Voir le fichier

@@ -6,13 +6,13 @@
6 6
          <span>血管通路列表</span>
7 7
          <el-button size="medium" type="primary" @click="dialogVisible =true" style="margin-left:800px" >新增</el-button>
8 8
       </div>
9
-      <el-table  :data="tableData" border style="width:100%">
9
+      <el-table  :data="tableData" border style="width:100%" @row-click="rowClick">
10 10
       <el-table-column  prop="start_time"   label="建立日期"  width="150"    align="center">
11 11
           <template  slot-scope="scope">
12 12
             <span>{{ getTime(scope.row.start_time, "{y}-{m}-{d}")}}</span>
13 13
           </template>
14 14
      </el-table-column>
15
-      <el-table-column     prop="blood_access_part_opera_id"    label="血管通路"   align="center">
15
+      <el-table-column   prop="blood_access_part_opera_id" label="血管通路"   align="center" width="200">
16 16
         <template slot-scope="scope">
17 17
            <span>{{scope.row.blood_access_part_opera_id}}</span>  
18 18
         </template>
@@ -22,7 +22,7 @@
22 22
             <span>{{scope.row.inflow_pass}}</span>
23 23
          </template>
24 24
       </el-table-column>
25
-      <el-table-column     prop="date"    label="首次启用日期" width="200"     align="center">
25
+      <el-table-column     prop="date"    label="首次启用日期" width="120"     align="center">
26 26
           <template slot-scope="scope">
27 27
             <span>{{ getTime(scope.row.first_start_time, "{y}-{m}-{d}")}}</span>
28 28
           </template>
@@ -35,33 +35,53 @@
35 35
       </el-table-column>
36 36
        <el-table-column     prop="date"    label="停用日期"      align="center">
37 37
           <template slot-scope="scope">
38
-             
38
+            <span v-if="scope.row.stop_time>0">{{ getTime(scope.row.stop_time, "{y}-{m}-{d}")}}</span>
39
+             <span v-if="scope.row.stop_time<0"></span>
39 40
           </template>
40 41
       </el-table-column>
41 42
        <el-table-column     prop="date"    label="停用原因"      align="center">
42 43
           <template slot-scope="scope">
43
-             
44
+             <span>{{scope.row.stop_reason}}</span>
44 45
           </template>
45 46
       </el-table-column>
46 47
        <el-table-column     prop="date"    label="使用寿命(天)"      align="center">
47 48
           <template slot-scope="scope">
48
-             
49
+           <span v-if="scope.row.stop_time>0&&(scope.row.stop_time - scope.row.start_time)/86400 == 0"></span> 
50
+           <span v-if="scope.row.stop_time>0&&(scope.row.stop_time - scope.row.start_time)/86400 != 0">{{(scope.row.stop_time - scope.row.start_time)/86400}}</span>
49 51
           </template>
50 52
       </el-table-column>
51
-       <el-table-column     prop="date"    label="备注"      align="center">
53
+       <el-table-column   prop="date"    label="备注"      align="center">
52 54
           <template slot-scope="scope">
53
-             
55
+             <span>{{scope.row.remark}}</span>
54 56
           </template>
55 57
       </el-table-column>
56 58
       <el-table-column     prop="date"    label="创始人"      align="center">
57 59
           <template slot-scope="scope">
58
-             
60
+            <span>{{getDoctor(scope.row.creator)}}</span>
59 61
           </template>
60 62
       </el-table-column>
61
-       <el-table-column     prop="date"    label="操作"      align="center">
63
+       <el-table-column   prop="date"  label="操作" width="140" align="center">
62 64
           <template slot-scope="scope">
63
-             
64
-          </template>
65
+             <el-tooltip class="item" effect="dark" content="编辑" placement="top">
66
+               <el-button
67
+                  type="primary"
68
+                  size="small"
69
+                  icon="el-icon-edit-outline"
70
+                 
71
+                  @click="handleUpdateAdviceTemplate(scope.row.id)"
72
+                  >
73
+               </el-button>
74
+             </el-tooltip>
75
+              <el-tooltip class="item" effect="dark" content="删除" placement="top">
76
+                 <el-button
77
+                  size="small"
78
+                  type="danger"
79
+                  icon="el-icon-delete"
80
+                  @click="handleDeleteAdviceTemplate(scope.row.id, scope.$index)"
81
+                  >
82
+                 </el-button>
83
+              </el-tooltip>
84
+           </template>
65 85
       </el-table-column>
66 86
   </el-table>
67 87
     <el-pagination
@@ -98,7 +118,7 @@
98 118
                     value-format="yyyy-MM-dd"
99 119
                     placeholder="选择时间"
100 120
                     v-model="form.start_time"
101
-                    style="width:150px">
121
+                    style="width:130px">
102 122
                  </el-date-picker>
103 123
                </el-form-item>
104 124
             </el-col>
@@ -149,7 +169,7 @@
149 169
                     value-format="yyyy-MM-dd"
150 170
                     placeholder="选择时间"
151 171
                     v-model="form.first_start_time"
152
-                    style="width:150px">
172
+                    style="width:130px">
153 173
                  </el-date-picker>
154 174
                </el-form-item>
155 175
             </el-col>
@@ -166,6 +186,20 @@
166 186
                </el-form-item>
167 187
             </el-col>
168 188
          </el-row>
189
+         <el-row v-show="show">
190
+            <el-col :span="8">
191
+               <el-form-item label="停用日期:">
192
+                  <el-date-picker
193
+                    type="datetime"
194
+                    format="yyyy-MM-dd"
195
+                    value-format="yyyy-MM-dd"
196
+                    placeholder="选择时间"
197
+                    v-model="form.stop_time"
198
+                    style="width:150px">
199
+                 </el-date-picker>
200
+               </el-form-item>
201
+            </el-col>
202
+         </el-row>
169 203
          <el-row v-show="show">
170 204
            <el-col>
171 205
             <el-form-item label="停用原因:">
@@ -188,6 +222,135 @@
188 222
      </span>
189 223
      </el-dialog>
190 224
 
225
+
226
+
227
+      <el-dialog
228
+         title="编辑通路"
229
+         :visible.sync="editDialogVisible"
230
+         width="60%"
231
+         center>
232
+      <el-form label-width="120px" :model="form" ref="form" :rules="rules" >
233
+         <el-row :gutter="24">
234
+            <el-col :span="24">
235
+                <el-form-item label="通路项目:" :required="true" prop="access_project">
236
+                    <el-radio v-model="form.access_project" label="1">内瘘</el-radio>
237
+                    <el-radio v-model="form.access_project" label="2">导管</el-radio>
238
+                </el-form-item>
239
+            </el-col>
240
+         </el-row>
241
+         <el-row :gutter="24">
242
+            <el-col :span="8">
243
+               <el-form-item label="建立日期:" :required="true" prop="start_time">
244
+                 <el-date-picker
245
+                    type="datetime"
246
+                    format="yyyy-MM-dd"
247
+                    value-format="yyyy-MM-dd"
248
+                    placeholder="选择时间"
249
+                    v-model="form.start_time"
250
+                    style="width:150px">
251
+                 </el-date-picker>
252
+               </el-form-item>
253
+            </el-col>
254
+             <el-col :span="8">
255
+               <el-form-item label="血管通路类型:" :required="true" prop="blood_access_part_opera_id">
256
+                 <el-select v-model="form.blood_access_part_opera_id" placeholder="请选择"  style="width:150px">
257
+                    <el-option
258
+                        v-for="item in blood_access_part_opera"
259
+                        :key="item.id"
260
+                        :label="item.name"
261
+                        :value="item.id"
262
+                        >
263
+                    </el-option>
264
+                  </el-select>
265
+               </el-form-item>
266
+            </el-col>
267
+             <el-col :span="8">
268
+               <el-form-item label="血管通路部位:" :required="true" prop="blood_access_part_id">
269
+                 <el-select v-model="form.blood_access_part_id" placeholder="请选择" style="width:150px">
270
+                    <el-option
271
+                        v-for="item in blood_access_part"
272
+                        :key="item.id"
273
+                        :label="item.name"
274
+                        :value="item.id">
275
+                    </el-option>
276
+                  </el-select>
277
+               </el-form-item>
278
+            </el-col>
279
+         </el-row>
280
+          <el-row :gutter="24">
281
+            <el-col :span="8">
282
+               <el-form-item label="流入-流出道:" :required="true" prop="inflow_pass">
283
+                 <el-select v-model="form.inflow_pass" placeholder="请选择" style="width:150px">
284
+                    <el-option
285
+                        v-for="item in optionsPass"
286
+                        :key="item.id"
287
+                        :label="item.name"
288
+                        :value="item.id">
289
+                    </el-option>
290
+                  </el-select>
291
+               </el-form-item>
292
+            </el-col>
293
+             <el-col :span="8">
294
+               <el-form-item label="首次启用日期:" :required="true" prop="first_start_time">
295
+                  <el-date-picker
296
+                    type="datetime"
297
+                    format="yyyy-MM-dd"
298
+                    value-format="yyyy-MM-dd"
299
+                    placeholder="选择时间"
300
+                    v-model="form.first_start_time"
301
+                    style="width:150px">
302
+                 </el-date-picker>
303
+               </el-form-item>
304
+            </el-col>
305
+             <el-col :span="8">
306
+               <el-form-item label="使用状态:" :required="true" prop="user_status">
307
+                 <el-select v-model="form.user_status" placeholder="请选择" style="width:150px" @change="changeStatus">
308
+                    <el-option
309
+                        v-for="item in options"
310
+                        :key="item.id"
311
+                        :label="item.name"
312
+                        :value="item.id">
313
+                    </el-option>
314
+                  </el-select>
315
+               </el-form-item>
316
+            </el-col>
317
+         </el-row>
318
+         <el-row v-show="show">
319
+            <el-col :span="8">
320
+               <el-form-item label="停用日期:">
321
+                  <el-date-picker
322
+                    type="datetime"
323
+                    format="yyyy-MM-dd"
324
+                    value-format="yyyy-MM-dd"
325
+                    placeholder="选择时间"
326
+                    v-model="form.stop_time"
327
+                    style="width:150px">
328
+                 </el-date-picker>
329
+               </el-form-item>
330
+            </el-col>
331
+         </el-row>
332
+         <el-row v-show="show">
333
+           <el-col>
334
+            <el-form-item label="停用原因:">
335
+               <el-input v-model="form.stop_reason"></el-input>
336
+            </el-form-item>
337
+           </el-col>  
338
+         </el-row>
339
+           <el-row>
340
+            <el-col>
341
+                <el-form-item label="备注:">
342
+                 <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.remark"></el-input>
343
+                </el-form-item>
344
+            </el-col>  
345
+         </el-row>
346
+      </el-form>
347
+
348
+     <span slot="footer" class="dialog-footer">
349
+        <el-button @click="editDialogVisible= false">取 消</el-button>
350
+        <el-button type="primary" @click="updatedVasularAccess('form')">保存</el-button>
351
+     </span>
352
+     </el-dialog>
353
+
191 354
     </div>
192 355
   </div>
193 356
 </template>
@@ -195,7 +358,7 @@
195 358
   const moment = require('moment')
196 359
   import PatientSidebar from './components/PatientSidebar'
197 360
   import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
198
-  import { saveVasularAccess,getAllVascularAccessList } from '@/api/patient'
361
+  import { saveVasularAccess,getAllVascularAccessList,getVascularAccessByDetail,updatedVasularAccess,DeleteVascularAccess } from '@/api/patient'
199 362
 
200 363
   import { jsGetAge, uParseTime } from '@/utils/tools'
201 364
   import { getDataConfig } from '@/utils/data'
@@ -221,16 +384,19 @@
221 384
           user_status:[{required:true,message:"请选择使用状态"}]
222 385
         },
223 386
         dialogVisible:false,
387
+        editDialogVisible:false,
224 388
         form:{
389
+         id:0,
225 390
          access_project:"1",
226 391
          blood_access_part_id:"",
227 392
          blood_access_part_opera_id:"",
228 393
          inflow_pass:"",
229
-         start_time:"",
230
-         first_start_time:"",
394
+         start_time:moment(new Date()).format('YYYY-MM-DD'),
395
+         first_start_time:moment(new Date()).format('YYYY-MM-DD'),
231 396
          stop_reason:"",
232 397
          user_status:"",
233
-         remark:""
398
+         remark:"",
399
+         stop_time:"",
234 400
         },
235 401
         options:[
236 402
          {id:1,name:"启用"},
@@ -242,7 +408,8 @@
242 408
         ],
243 409
         blood_access_part_opera:[],
244 410
         blood_access_part:[],
245
-        show:false
411
+        show:false,
412
+        doctorList:[]
246 413
       }
247 414
     },
248 415
     methods: {
@@ -260,13 +427,12 @@
260 427
      
261 428
       handleSizeChange(limit) {
262 429
         this.limit = limit
263
-        const id = this.$route.params && this.$route.params.id
264
-       
430
+        this.getlist()
265 431
       },
266 432
       handleCurrentChange(page) {
267 433
         this.page = page
268
-        const id = this.$route.params && this.$route.params.id
269
-       
434
+      
435
+        this.getlist()
270 436
       },
271 437
       changeStatus(val){
272 438
         if(val == 1 ){
@@ -298,6 +464,7 @@
298 464
                  }
299 465
               }
300 466
               var params = {
467
+                patient_id:this.patientID,
301 468
                 access_project:parseInt(this.form.access_project),
302 469
                 start_time:this.form.start_time,
303 470
                 blood_access_part_opera_id:blood_name,
@@ -307,6 +474,7 @@
307 474
                 user_status:this.form.user_status,
308 475
                 stop_reason:this.form.stop_reason,
309 476
                 remark:this.form.remark,
477
+                stop_time:this.form.stop_time
310 478
               }
311 479
               console.log("params",params)
312 480
              saveVasularAccess(params).then(response=>{
@@ -315,7 +483,13 @@
315 483
                    console.log("access",access)
316 484
                    this.$message.success("保存成功")
317 485
                    this.dialogVisible = false
318
-                   
486
+                   this.getlist()
487
+                   this.form.blood_access_part_opera_id=""
488
+                   this.form.blood_access_part_id = ""
489
+                   this.inflow_pass = ""
490
+                   this.user_status = ""
491
+                   this.stop_reason = ""
492
+                   this.remark = ""
319 493
                 }
320 494
              })
321 495
            }  
@@ -325,6 +499,7 @@
325 499
          var params = {
326 500
                page:this.page,
327 501
                limit:this.limit,
502
+               patient_id:this.patientID,
328 503
            }
329 504
         getAllVascularAccessList(params).then(response=>{
330 505
            if(response.data.state == 1){
@@ -334,6 +509,9 @@
334 509
              var total = response.data.data.total
335 510
              console.log("total",total)
336 511
              this.total = total
512
+             var doctor = response.data.data.doctor
513
+             console.log("doctor",doctor)
514
+             this.doctorList = doctor
337 515
            }  
338 516
         })   
339 517
       },
@@ -343,6 +521,136 @@
343 521
         }
344 522
         return "";
345 523
      },
524
+     handleUpdateAdviceTemplate(id){
525
+        getVascularAccessByDetail(id).then(response=>{
526
+           if(response.data.state ==1){
527
+             var accessDetail =  response.data.data.accessDetail
528
+             console.log("accessDetail",accessDetail)
529
+             this.form.id = accessDetail.id
530
+             this.form.access_project = accessDetail.access_project.toString()
531
+             
532
+            
533
+
534
+             var blood_name = 0
535
+              for(let i=0;i<this.blood_access_part_opera.length;i++){
536
+                 if(this.blood_access_part_opera[i].name == accessDetail.blood_access_part_opera_id){
537
+                     blood_name = this.blood_access_part_opera[i].id
538
+                 }
539
+              }
540
+             this.form.blood_access_part_id = blood_name
541
+             
542
+              var blood_part = 0
543
+              for(let i=0;i<this.blood_access_part.length;i++){
544
+                 if(accessDetail.blood_access_part_id == this.blood_access_part[i].name){
545
+                    blood_part = this.blood_access_part[i].id
546
+                 }
547
+              }
548
+             this.form.blood_access_part_opera_id = blood_part
549
+             this.form.first_start_time = this.getTime(accessDetail.first_start_time,"{y}-{m}-{d}")
550
+
551
+             var inflow_id = 0
552
+             for(let i=0;i<this.optionsPass.length;i++){
553
+               if(this.optionsPass[i].name == accessDetail.inflow_pass){
554
+                  inflow_id = this.optionsPass[i].id
555
+               }
556
+             }
557
+             this.form.inflow_pass = inflow_id
558
+             this.form.remark = accessDetail.remark
559
+             this.form.start_time = this.getTime(accessDetail.start_time,"{y}-{m}-{d}")
560
+             this.form.stop_reason = accessDetail.stop_reason
561
+             this.form.stop_time = this.getTime(accessDetail.stop_time,"{y}-{m}-{d}")
562
+
563
+             this.form.user_status = accessDetail.user_status
564
+             if(accessDetail.user_status == 1){
565
+               this.show = false
566
+             }
567
+             if(accessDetail.user_status == 2){
568
+               this.show = true
569
+             }
570
+             this.editDialogVisible = true
571
+           }
572
+        }) 
573
+     },
574
+     getDoctor(id){
575
+       var name = ""
576
+       for(let i=0;i<this.doctorList.length;i++){
577
+          if(id == this.doctorList[i].admin_user_id){
578
+             name = this.doctorList[i].user_name
579
+          }
580
+       }
581
+       return name
582
+     },
583
+     handleDeleteAdviceTemplate(id,index){
584
+       this.$confirm("确认删除吗?", "删除", {
585
+        confirmButtonText: "确 定",
586
+        cancelButtonText: "取 消",
587
+        type: "warning"
588
+      })
589
+        .then(() => {
590
+          DeleteVascularAccess(id).then(response => {
591
+            if(response.data.state == 1){
592
+              var msg = response.data.data.msg
593
+              this.tableData.splice(index, 1);
594
+              this.$message.success("删除成功!")
595
+            }
596
+             
597
+            
598
+          });
599
+        })
600
+        .catch(() => {});
601
+     },
602
+     updatedVasularAccess(formName){
603
+        this.$refs[formName].validate((valid)=>{
604
+           if(valid){
605
+              var blood_name = ""
606
+              for(let i=0;i<this.blood_access_part_opera.length;i++){
607
+                 if(this.blood_access_part_opera[i].id == this.form.blood_access_part_opera_id){
608
+                     blood_name = this.blood_access_part_opera[i].name
609
+                 }
610
+              }
611
+              var blood_part = ""
612
+              for(let i=0;i<this.blood_access_part.length;i++){
613
+                 if(this.form.blood_access_part_id == this.blood_access_part[i].id){
614
+                    blood_part = this.blood_access_part[i].name
615
+                 }
616
+              }
617
+              var inflow_pass = ""
618
+              for(let i=0;i<this.optionsPass.length;i++){
619
+                 if(this.optionsPass[i].id == this.form.inflow_pass){
620
+                     inflow_pass = this.optionsPass[i].name
621
+                 }
622
+              }
623
+              var params = {
624
+                id:this.form.id,
625
+                patient_id:this.patientID,
626
+                access_project:parseInt(this.form.access_project),
627
+                start_time:this.form.start_time,
628
+                blood_access_part_opera_id:blood_name,
629
+                blood_access_part_id:blood_part,
630
+                inflow_pass:inflow_pass,
631
+                first_start_time:this.form.first_start_time,
632
+                user_status:this.form.user_status,
633
+                stop_reason:this.form.stop_reason,
634
+                remark:this.form.remark,
635
+                stop_time:this.form.stop_time
636
+              }
637
+              console.log("编辑",params)
638
+              updatedVasularAccess(params).then(response=>{
639
+                if(response.data.state == 1){
640
+                  var access =  response.data.data.access
641
+                  console.log("access",access)
642
+                  this.$message.success("保存成功")
643
+                  this.editDialogVisible = false
644
+                  this.getlist()
645
+                }
646
+              })
647
+           }
648
+        })
649
+     },
650
+     rowClick(row){
651
+       console.log("row",row)
652
+       this.$router.push({path:'/patients/patient/'+this.patientID+'/vascularAccessDetail/'+row.id})
653
+     }
346 654
     },
347 655
     created() {
348 656
       const id = this.$route.params && this.$route.params.id

+ 322 - 0
src/xt_pages/user/vascularAccessDetail.vue Voir le fichier

@@ -0,0 +1,322 @@
1
+<template>
2
+  <div class="patient-container">
3
+    <patient-sidebar :id="patientID" defaultActive="1-6" v-on:tran-patient="onTranPatient"></patient-sidebar>
4
+    <div class="patient-app-container advice-container app-container">
5
+      <div class="cell clearfix">
6
+         <span>通路详情 &nbsp; </span>
7
+         <el-button size="medium" type="primary" @click="dialogVisible =true" style="margin-left:800px" >新增</el-button>
8
+      </div>
9
+      <div class="cell clearfix">
10
+         <span>启用日期:{{getTime(start_time,"{y}-{m}-{d}")}} &nbsp; 血管通路类型:{{blood_access_part_opera_id}}</span> 
11
+      </div>
12
+      <el-table  :data="tableData" border style="width:100%" >
13
+      <el-table-column  prop="start_time"   label="日期"  width="150"    align="center">
14
+          <template  slot-scope="scope">
15
+            <span>{{getTime(scope.row.start_time,"{y}-{m}-{d}")}}</span>
16
+          </template>
17
+     </el-table-column>
18
+      <el-table-column   prop="blood_access_part_opera_id" label="项目"   align="center" width="200">
19
+        <template slot-scope="scope">
20
+           <span>{{scope.row.blood_project}}</span>  
21
+        </template>
22
+     </el-table-column>
23
+      <el-table-column     prop="inflow_pass"    label="结果"    align="center">
24
+         <template slot-scope="scope">
25
+            <span>{{scope.row.blood_result}}</span>
26
+         </template>
27
+      </el-table-column>
28
+      <el-table-column     prop="date"    label="处理" width="120"     align="center">
29
+          <template slot-scope="scope">
30
+            <span>{{scope.row.blood_dealwith}}</span>
31
+          </template>
32
+      </el-table-column>
33
+      <el-table-column     prop="date"    label="评估人"      align="center">
34
+          <template slot-scope="scope">
35
+           {{getDoctor(scope.row.creator)}}
36
+          </template>
37
+      </el-table-column>
38
+  
39
+       <el-table-column   prop="date"  label="操作" width="140" align="center">
40
+          <template slot-scope="scope">
41
+             <el-tooltip class="item" effect="dark" content="编辑" placement="top">
42
+               <el-button
43
+                  type="primary"
44
+                  size="small"
45
+                  icon="el-icon-edit-outline"
46
+                 
47
+                  @click="handleUpdateAdviceTemplate(scope.row.id)"
48
+                  >
49
+               </el-button>
50
+             </el-tooltip>
51
+              <el-tooltip class="item" effect="dark" content="删除" placement="top">
52
+                 <el-button
53
+                  size="small"
54
+                  type="danger"
55
+                  icon="el-icon-delete"
56
+                  @click="handleDeleteAdviceTemplate(scope.row.id, scope.$index)"
57
+                  >
58
+                 </el-button>
59
+              </el-tooltip>
60
+           </template>
61
+      </el-table-column>
62
+  </el-table>
63
+    <el-pagination
64
+        @size-change="handleSizeChange"
65
+        @current-change="handleCurrentChange"
66
+        :page-sizes="[10,20,50,100]"
67
+        :page-size="10"
68
+        background
69
+        style="margin-top:20px;"
70
+        align="right"
71
+        layout="total, sizes, prev, pager, next, jumper"
72
+        :total="total"></el-pagination>
73
+
74
+     <el-dialog
75
+         title="新增通路评估"
76
+         :visible.sync="dialogVisible"
77
+         width="60%"
78
+         center>
79
+      <el-form label-width="120px" :model="form" ref="form" :rules="rules" >
80
+         <el-row :gutter="24">
81
+            <el-col :span="8">
82
+               <el-form-item label="建立日期:" :required="true" prop="start_time">
83
+                 <el-date-picker
84
+                    type="datetime"
85
+                    format="yyyy-MM-dd"
86
+                    value-format="yyyy-MM-dd"
87
+                    placeholder="选择时间"
88
+                    v-model="form.start_time"
89
+                    style="width:150px">
90
+                 </el-date-picker>
91
+               </el-form-item>
92
+            </el-col>
93
+             <el-col :span="8">
94
+               <el-form-item label="评估人:" :required="true" prop="creator">
95
+                 <el-select v-model="form.creator" placeholder="请选择"  style="width:150px">
96
+                    <el-option
97
+                        v-for="item in doctorList"
98
+                        :key="item.admin_user_id"
99
+                        :label="item.user_name"
100
+                        :value="item.admin_user_id"
101
+                        >
102
+                    </el-option>
103
+                  </el-select>
104
+               </el-form-item>
105
+            </el-col>
106
+         </el-row>
107
+       
108
+         <el-row>
109
+            <el-col>
110
+                <el-form-item label="项目:">
111
+                 <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.blood_project"></el-input>
112
+                </el-form-item>
113
+            </el-col>  
114
+         </el-row>
115
+          <el-row>
116
+            <el-col>
117
+                <el-form-item label="结果:">
118
+                 <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.blood_result"></el-input>
119
+                </el-form-item>
120
+            </el-col>  
121
+         </el-row>
122
+         <el-row>
123
+            <el-col>
124
+                <el-form-item label="处理:">
125
+                 <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.blood_dealwith"></el-input>
126
+                </el-form-item>
127
+            </el-col>  
128
+         </el-row>
129
+      </el-form>
130
+
131
+     <span slot="footer" class="dialog-footer">
132
+        <el-button @click="dialogVisible = false">取 消</el-button>
133
+        <el-button type="primary" @click="savePasswayAssessment('form')">保存</el-button>
134
+     </span>
135
+     </el-dialog>
136
+
137
+
138
+
139
+      
140
+
141
+    </div>
142
+  </div>
143
+</template>
144
+<script>
145
+  const moment = require('moment')
146
+  import PatientSidebar from './components/PatientSidebar'
147
+  import {getVascularAccessByDetail,savePasswayAssessment,getAllPassWayAssessmentList,getPassWayAssessmentById} from '@/api/patient'
148
+  import { uParseTime } from '@/utils/tools'
149
+  import { getDataConfig } from '@/utils/data'
150
+  export default {
151
+    name: 'doctorAdvice',
152
+    components: {
153
+      PatientSidebar,
154
+    },
155
+    data() {
156
+      return {
157
+        tableData: [],
158
+        nowtime: moment(new Date()).format('YYYY-MM-DD'),
159
+        page: 1,
160
+        limit: 10,
161
+        total: 0,
162
+        rules: {
163
+          start_time: [{ required: true, message: '请输入建立日期' }],
164
+          creator: [{ required: true, message: '请选择评估人' }],
165
+        },
166
+        dialogVisible:false,
167
+        editDialogVisible:false,
168
+        form:{
169
+         id:0,
170
+         start_time:moment(new Date()).format('YYYY-MM-DD'),
171
+         creator:this.$store.getters.xt_user.user.id,
172
+         blood_project:"",
173
+         blood_result:"",
174
+         blood_dealwith:"",
175
+        },
176
+        doctorList:[],
177
+        start_time:"",
178
+        blood_access_part_opera_id:"",
179
+        parent_id:"",
180
+        patientID:""
181
+      }
182
+    },
183
+    methods: {
184
+     clickuseradvicecell(row, column, cell, event) {
185
+      },
186
+      onTranPatient: function(tranPatient) {
187
+        this.currentPatient = tranPatient
188
+      },
189
+      handleSizeChange(limit) {
190
+        this.limit = limit
191
+        this.getlist()
192
+      },
193
+      handleCurrentChange(page) {
194
+        this.page = page
195
+      
196
+        this.getlist()
197
+      },
198
+   
199
+    
200
+    
201
+     getTime(value, temp) {
202
+        if (value != undefined) {
203
+            return uParseTime(value, temp);
204
+        }
205
+        return "";
206
+     },
207
+
208
+ 
209
+     getVascularAccessByDetail(id){
210
+        getVascularAccessByDetail(id).then(response=>{
211
+           if(response.data.state ==1){
212
+             var accessDetail =  response.data.data.accessDetail
213
+             console.log("accessDetail",accessDetail)
214
+             this.start_time = accessDetail.start_time
215
+             this.blood_access_part_opera_id = accessDetail.blood_access_part_opera_id
216
+             var doctor = response.data.data.doctor
217
+             console.log("意思",doctor)
218
+             this.doctorList = doctor
219
+           }
220
+        }) 
221
+     },
222
+     getDoctor(id){
223
+       var name = ""
224
+       for(let i=0;i<this.doctorList.length;i++){
225
+          if(id == this.doctorList[i].admin_user_id){
226
+             name = this.doctorList[i].user_name
227
+          }
228
+       }
229
+       return name
230
+     },
231
+     handleDeleteAdviceTemplate(id,index){
232
+       this.$confirm("确认删除吗?", "删除", {
233
+        confirmButtonText: "确 定",
234
+        cancelButtonText: "取 消",
235
+        type: "warning"
236
+      })
237
+        .then(() => {
238
+          DeleteVascularAccess(id).then(response => {
239
+            if(response.data.state == 1){
240
+              var msg = response.data.data.msg
241
+              this.tableData.splice(index, 1);
242
+              this.$message.success("删除成功!")
243
+            }
244
+             
245
+            
246
+          });
247
+        })
248
+        .catch(() => {});
249
+     },
250
+    savePasswayAssessment(formName){
251
+       this.$refs[formName].validate((valid)=>{
252
+          if(valid){
253
+              var params = {
254
+                start_time:this.form.start_time,
255
+                creator:this.form.creator,
256
+                blood_project:this.form.blood_project,
257
+                blood_result:this.form.blood_result,
258
+                blood_dealwith:this.form.blood_dealwith,
259
+                patient_id:this.patientID,
260
+                parent_id:this.parent_id,
261
+              }
262
+              console.log("parasm",params)
263
+            savePasswayAssessment(params).then(response=>{
264
+               if(response.data.state == 1){
265
+                 var assessment =  response.data.data.assessment
266
+                 console.log("assessment",assessment)
267
+                 this.dialogVisible = false
268
+                 this.$message.success("保存成功")
269
+                 this.getlist()
270
+               }
271
+            })
272
+          }
273
+       })
274
+    },
275
+    getlist(){
276
+        const params = {
277
+          parent_id:this.parent_id,
278
+          patient_id:this.patientID, 
279
+          page:this.page,
280
+          limit:this.limit,
281
+        }
282
+       getAllPassWayAssessmentList(params).then(response=>{
283
+          if(response.data.state == 1){
284
+             var list =  response.data.data.list
285
+             console.log("列表",list)
286
+             this.tableData = list
287
+             var total =  response.data.data.total
288
+             console.log("total",total)
289
+             this.total = total
290
+           }
291
+       }) 
292
+    },
293
+
294
+    handleUpdateAdviceTemplate(id){
295
+       getPassWayAssessmentById(id).then(response=>{
296
+
297
+       })
298
+    }
299
+   
300
+    },
301
+    created() {
302
+      const id = this.$route.params && this.$route.params.id
303
+      this.patientID = parseInt(id)
304
+      const pid = this.$route.params&& this.$route.params.pid 
305
+      this.parent_id = parseInt(pid)
306
+      this.getVascularAccessByDetail(pid) 
307
+      this.getlist()
308
+    }
309
+  }
310
+</script>
311
+
312
+<style>
313
+  #oictable ::-webkit-scrollbar {
314
+    height: 15px;
315
+  }
316
+</style>
317
+
318
+<style rel="stylesheet/scss" lang="scss" scoped>
319
+   
320
+
321
+</style>
322
+