See999 il y a 5 ans
Parent
révision
9c34c088e6

+ 7 - 7
src/xt_pages/dialysis/details/NavIgation.vue Voir le fichier

@@ -571,31 +571,31 @@ export default {
571 571
       this.$refs.monitor_dialog.show();
572 572
     },
573 573
     showAssessmentAfterDialog: function() {
574
-      this.$refs.assessment_after_dislysis.show();
574
+      this.$refs.assessment_after_dislysis.show(this.assessment_after_dislysis);
575 575
     },
576 576
     showDoctorAdviceDialog: function() {
577 577
       this.$refs.doctor_advice.show();
578 578
     },
579 579
     showComputerDialog: function() {
580
-      this.$refs.computer_dialog.show();
580
+      this.$refs.computer_dialog.show(this.dialysis_order);
581 581
     },
582 582
     showFinishDialog: function() {
583
-      this.$refs.finish_dialog.show();
583
+      this.$refs.finish_dialog.show(this.dialysis_order);
584 584
     },
585 585
     showPrescription: function() {
586
-      this.$refs.prescription.show();
586
+      this.$refs.prescription.show(this.prescription);
587 587
     },
588 588
     showAccepts: function() {
589
-      this.$refs.accepts.show();
589
+      this.$refs.accepts.show(this.receiver_treatment_access);
590 590
     },
591 591
     showAssessmentBefore: function() {
592
-      this.$refs.assessmentBefore.show();
592
+      this.$refs.assessmentBefore.show(this.predialysis_evaluation);
593 593
     },
594 594
     showDoubleCheck: function() {
595 595
       this.$refs.doubleCheck.show();
596 596
     },
597 597
     showrTeatmentSummary: function() {
598
-      this.$refs.treatmentSummary.show();
598
+      this.$refs.treatmentSummary.show(this.treatment_summary);
599 599
     },
600 600
     assessmentAfterDislysisFunc: function(val) {
601 601
       this.assessment_after_dislysis = val;

+ 65 - 3
src/xt_pages/dialysis/details/dialog/AssessmentAfterDislysis.vue Voir le fichier

@@ -1,11 +1,13 @@
1 1
 <template>
2 2
   <div class="assessment-after-box">
3 3
     <el-dialog
4
+      class="newDialog"
4 5
       title="透后评估"
5 6
       :visible.sync="isVisibility"
6 7
       width="1010px"
7 8
       :modal-append-to-body="false"
8 9
     >
10
+    <div class="warnTxt" v-if="showTxt != ''">{{ showTxt }}</div>
9 11
       <el-form ref="form" :model="form" label-width="160px">
10 12
         <!-- <el-row :gutter="20"> -->
11 13
         <el-row :gutter="20">
@@ -476,7 +478,7 @@
476 478
 
477 479
       <span slot="footer" class="dialog-footer">
478 480
         <el-button @click="hide">取 消</el-button>
479
-        <el-button type="primary" @click="submitForm" :loading="loading"
481
+        <el-button type="primary" @click="submitForm" :loading="loading" v-if="hasPermission"
480 482
           >保 存</el-button
481 483
         >
482 484
       </span>
@@ -497,6 +499,8 @@ import { postAssessmentAfterDislysis } from "@/api/dialysis";
497 499
 import { uParseTime } from "@/utils/tools";
498 500
 import store from "@/store";
499 501
 
502
+import request from '@/utils/request'
503
+
500 504
 export default {
501 505
   name: "AssessmentAfterDislysis",
502 506
   props: {
@@ -524,6 +528,8 @@ export default {
524 528
   },
525 529
   data() {
526 530
     return {
531
+      showTxt:'',
532
+      hasPermission:true,
527 533
       loading: false,
528 534
       record_date: "",
529 535
       isVisibility: false,
@@ -935,8 +941,11 @@ export default {
935 941
       this.InnerDialogProps.visibility = false;
936 942
     },
937 943
 
938
-    show() {
944
+    show(predialysis) {
939 945
       this.isVisibility = true;
946
+      this.predialysis = predialysis
947
+      console.log("透后",predialysis)
948
+      this.getPermission()
940 949
     },
941 950
 
942 951
     hide() {
@@ -967,6 +976,41 @@ export default {
967 976
         this.assessment_after_dislysis["actual_treatment_hour"],
968 977
         this.assessment_after_dislysis["actual_treatment_minute"]
969 978
       );
979
+    },
980
+    getPermission(){
981
+      request.get("/api/func_per/get",{
982
+        params:{
983
+          create_url:"/api/dialysis/assessmentafterdislysis?mode=1",
984
+          modify_url:"/api/dialysis/assessmentafterdislysis?mode=2",
985
+          modify_other_url:"/api/dialysis/assessmentafterdislysis?mode=3",
986
+          module:8
987
+        }
988
+      }).then(res => {
989
+        console.log(res)
990
+        console.log("透后",this.predialysis)
991
+        if(res.data.state == 0){
992
+          this.hasPermission = false
993
+        }else if(res.data.state == 1){
994
+          if(this.predialysis.id != "" && this.predialysis.creater != 0){//有数据
995
+            if(this.predialysis.creater == this.$store.getters.xt_user.user.id){//创建人是自己
996
+              if(res.data.data.is_has_modify == false){
997
+                this.hasPermission = false
998
+                this.showTxt = "你没有修改透后评估权限"
999
+              }
1000
+            }else{//创建人不是自己
1001
+              if(res.data.data.is_has_modify_other == false){
1002
+                this.hasPermission = false
1003
+                this.showTxt = "你没有修改他人透后评估权限"
1004
+              }
1005
+            }
1006
+          }else if(this.predialysis.id == "" || this.predialysis.creater == 0){
1007
+            if(res.data.data.is_has_create  == false){
1008
+              this.hasPermission = false
1009
+              this.showTxt = "你没有新增透后评估权限"
1010
+            }
1011
+          }
1012
+        }
1013
+      })
970 1014
     }
971 1015
   },
972 1016
   created() {
@@ -1001,4 +1045,22 @@ export default {
1001 1045
 };
1002 1046
 </script>
1003 1047
 
1004
-<style scoped></style>
1048
+<style scoped>
1049
+.warnTxt{
1050
+  text-align: center;
1051
+  margin: 0 auto;
1052
+  background: #faa331;
1053
+  max-width: 240px;
1054
+  padding: 10px 20px;
1055
+  border-radius: 4px;
1056
+  margin-bottom: 10px;
1057
+  color:#fff;
1058
+}
1059
+</style>
1060
+<style lang="scss">
1061
+.newDialog{
1062
+  .el-dialog__body{
1063
+    padding: 10px 20px 30px;
1064
+  }
1065
+}
1066
+</style>

+ 65 - 4
src/xt_pages/dialysis/details/dialog/acceptsTreatmentDialog.vue Voir le fichier

@@ -1,8 +1,10 @@
1 1
 <template>
2 2
   <el-dialog title="接诊评估"
3
+              class="newDialog"
3 4
              :modal-append-to-body="false"
4 5
              :visible.sync="isVisibility"
5 6
              width="854px">
7
+    <div class="warnTxt" v-if="showTxt != ''">{{ showTxt }}</div>
6 8
     <el-form :model="receiveTreatmentAsses" label-width="80px">
7 9
       <el-form-item label="入室方式 : " v-if="isShow('入室方式')">
8 10
         <!--<el-radio-group v-model="receiveTreatmentAsses.way">-->
@@ -155,7 +157,7 @@
155 157
     </el-form>
156 158
     <div slot="footer" class="dialog-footer">
157 159
       <el-button @click="handleCancle">取 消</el-button>
158
-      <el-button type="primary" @click="handleComfirm">保 存</el-button>
160
+      <el-button type="primary" v-if="hasPermission" @click="handleComfirm">保 存</el-button>
159 161
     </div>
160 162
   </el-dialog>
161 163
 </template>
@@ -166,10 +168,14 @@
166 168
   import store from '@/store'
167 169
   import { getDataConfig } from '@/utils/data'
168 170
 
171
+  import request from '@/utils/request'
172
+
169 173
   export default {
170 174
     name: 'acceptsTreatmentDialog',
171 175
     data() {
172 176
       return {
177
+        showTxt:'',
178
+        hasPermission:true,
173 179
         isVisibility: false,
174 180
         record_date: '',
175 181
         way_arr: [],
@@ -214,7 +220,10 @@
214 220
         }
215 221
         return false
216 222
       },
217
-      show() {
223
+      show(accepts) {
224
+        this.accepts = accepts
225
+        console.log("accepts",accepts)
226
+        this.getPermission()
218 227
         for (var index in this.receiveTreatmentAsses) {
219 228
           if (index == 'condition' || index == 'danger_level' || index == 'psychological_assessment') {
220 229
             this.receiveTreatmentAsses[index] = this.receiver_treatment_access[index] + ''
@@ -267,7 +276,42 @@
267 276
           }
268 277
         })
269 278
 
270
-      }
279
+      },
280
+      getPermission(){
281
+      request.get("/api/func_per/get",{
282
+        params:{
283
+          create_url:"/api/dialysis/accepts?mode=1",
284
+          modify_url:"/api/dialysis/accepts?mode=2",
285
+          modify_other_url:"/api/dialysis/accepts?mode=3",
286
+          module:2
287
+        }
288
+      }).then(res => {
289
+        console.log(res)
290
+        console.log("接诊",this.accepts)
291
+        if(res.data.state == 0){
292
+          this.hasPermission = false
293
+        }else if(res.data.state == 1){
294
+          if(this.accepts.id != "" && this.accepts.creater != 0){//有数据
295
+            if(this.accepts.creater == this.$store.getters.xt_user.user.id){//创建人是自己
296
+              if(res.data.data.is_has_modify == false){
297
+                this.hasPermission = false
298
+                this.showTxt = "你没有修改接诊评估权限"
299
+              }
300
+            }else{//创建人不是自己
301
+              if(res.data.data.is_has_modify_other == false){
302
+                this.hasPermission = false
303
+                this.showTxt = "你没有修改他人接诊评估权限"
304
+              }
305
+            }
306
+          }else if(this.accepts.id == "" || this.accepts.creater == 0){
307
+            if(res.data.data.is_has_create  == false){
308
+              this.hasPermission = false
309
+              this.showTxt = "你没有新增接诊评估权限"
310
+            }
311
+          }
312
+        }
313
+      })
314
+    }
271 315
     },
272 316
     props: {
273 317
       receiver_treatment_access: { // 双人核对
@@ -294,6 +338,7 @@
294 338
         }
295 339
       }
296 340
     }, created() {
341
+      console.log("接诊评估",this.receiver_treatment_access)
297 342
       var date = this.$route.query && this.$route.query.date
298 343
       this.record_date = uParseTime(date, '{y}-{m}-{d}')
299 344
 
@@ -312,5 +357,21 @@
312 357
 </script>
313 358
 
314 359
 <style scoped>
315
-
360
+.warnTxt{
361
+  text-align: center;
362
+  margin: 0 auto;
363
+  background: #faa331;
364
+  max-width: 240px;
365
+  padding: 10px 20px;
366
+  border-radius: 4px;
367
+  margin-bottom: 10px;
368
+  color:#fff;
369
+}
370
+</style>
371
+<style lang="scss">
372
+.newDialog{
373
+  .el-dialog__body{
374
+    padding: 10px 20px 30px;
375
+  }
376
+}
316 377
 </style>

+ 64 - 5
src/xt_pages/dialysis/details/dialog/assessmentBeforeDislysisDialog.vue Voir le fichier

@@ -1,12 +1,13 @@
1 1
 <template>
2 2
   <div>
3 3
     <el-dialog
4
+      class="newDialog"
4 5
       title="透前评估"
5 6
       :visible.sync="isVisibility"
6 7
       width="1010px"
7 8
       :modal-append-to-body="false"
8 9
     >
9
-
10
+    <div class="warnTxt" v-if="showTxt != ''">{{ showTxt }}</div>
10 11
       <!--<check-box-dialog-->
11 12
       <!--:propsForm="InnerDialogProps"-->
12 13
       <!--v-on:dialog-comfirm="innerDialogComfirm"-->
@@ -446,7 +447,7 @@
446 447
       </el-form>
447 448
       <span slot="footer" class="dialog-footer">
448 449
                 <el-button @click="handleCancle">取 消</el-button>
449
-                <el-button type="primary" @click="handleComfirm">保 存</el-button>
450
+                <el-button type="primary" v-if="hasPermission" @click="handleComfirm">保 存</el-button>
450 451
             </span>
451 452
     </el-dialog>
452 453
 
@@ -488,6 +489,8 @@
488 489
   import store from '@/store'
489 490
   import { uParseTime } from '@/utils/tools'
490 491
 
492
+  import request from '@/utils/request'
493
+
491 494
   export default {
492 495
     components: {
493 496
       multiSelectBox
@@ -495,6 +498,8 @@
495 498
     name: 'assessment-after-dislysis-dialog',
496 499
     data() {
497 500
       return {
501
+        showTxt:'',
502
+        hasPermission:true,
498 503
         weight_adjust: {
499 504
           weight: '',
500 505
           doctor: '',
@@ -616,8 +621,10 @@
616 621
         }
617 622
         return false
618 623
       },
619
-      show() {
620
-
624
+      show(assessment) {
625
+        this.assessment = assessment
626
+        console.log("透前",assessment)
627
+        this.getPermission()
621 628
         this.isVisibility = true
622 629
         for (let i = 0; i < this.admin_users.length; i++) {
623 630
           if (this.admin_users[i].user_type != 3) {
@@ -876,6 +883,42 @@
876 883
       },cancleDryWeight(){
877 884
         this.dialogFormVisible = false
878 885
         this.isVisibility = true
886
+      },
887
+      getPermission(){
888
+        request.get("/api/func_per/get",{
889
+          params:{
890
+            create_url:"/api/dialysis/assessmentbeforedislysis?mode=1",
891
+            modify_url:"/api/dialysis/assessmentbeforedislysis?mode=2",
892
+            modify_other_url:"/api/dialysis/assessmentbeforedislysis?mode=3",
893
+            module:3
894
+          }
895
+        }).then(res => {
896
+          console.log(res)
897
+          console.log("透前",this.patient_prop)
898
+          console.log("透前",this.assessment)
899
+          if(res.data.state == 0){
900
+            this.hasPermission = false
901
+          }else if(res.data.state == 1){
902
+            if(this.assessment.id != "" && this.assessment.creater != 0){//有数据
903
+              if(this.assessment.creater == this.$store.getters.xt_user.user.id){//创建人是自己
904
+                if(res.data.data.is_has_modify == false){
905
+                  this.hasPermission = false
906
+                  this.showTxt = "你没有修改透前评估权限"
907
+                }
908
+              }else{//创建人不是自己
909
+                if(res.data.data.is_has_modify_other == false){
910
+                  this.hasPermission = false
911
+                  this.showTxt = "你没有修改他人透前评估权限"
912
+                }
913
+              }
914
+            }else if(this.assessment.id == "" || this.assessment.creater == 0){
915
+              if(res.data.data.is_has_create  == false){
916
+                this.hasPermission = false
917
+                this.showTxt = "你没有新增透前评估权限"
918
+              }
919
+            }
920
+          }
921
+        })
879 922
       }
880 923
     },
881 924
     created() {
@@ -1005,5 +1048,21 @@
1005 1048
 </script>
1006 1049
 
1007 1050
 <style scoped>
1008
-
1051
+.warnTxt{
1052
+  text-align: center;
1053
+  margin: 0 auto;
1054
+  background: #faa331;
1055
+  max-width: 240px;
1056
+  padding: 10px 20px;
1057
+  border-radius: 4px;
1058
+  margin-bottom: 10px;
1059
+  color:#fff;
1060
+}
1061
+</style>
1062
+<style lang="scss">
1063
+.newDialog{
1064
+  .el-dialog__body{
1065
+    padding: 10px 20px 30px;
1066
+  }
1067
+}
1009 1068
 </style>

+ 62 - 2
src/xt_pages/dialysis/details/dialog/computer_dialog.vue Voir le fichier

@@ -1,6 +1,7 @@
1 1
 <template>
2 2
   <div>
3
-    <el-dialog title="透析上机" :visible.sync="visible" width="854px" :modal-append-to-body="false">
3
+    <el-dialog title="透析上机" class="newDialog" :visible.sync="visible" width="854px" :modal-append-to-body="false">
4
+      <div class="warnTxt" v-if="showTxt != ''">{{ showTxt }}</div>
4 5
       <el-form :model="form" label-width="100px">
5 6
 
6 7
         <el-form-item label="班次">
@@ -58,10 +59,14 @@
58 59
   import { GetSchedualNumber, PostModifyStartDialysis, startDialysis } from '@/api/dialysis_record'
59 60
   import { parseTime } from '@/utils'
60 61
 
62
+  import request from '@/utils/request'
63
+
61 64
   export default {
62 65
     name: 'ComputerDialog',
63 66
     data() {
64 67
       return {
68
+        showTxt:'',
69
+        hasPermission:true,
65 70
         zone_beds: [],
66 71
         visible: false,
67 72
         loading: false,
@@ -212,7 +217,10 @@
212 217
         }
213 218
         return ''
214 219
       },
215
-      show: function() {
220
+      show: function(dialysis) {
221
+        this.record = dialysis
222
+        console.log("上机",dialysis)
223
+        this.getPermission()
216 224
         this.visible = true
217 225
 
218 226
         var nowDate = new Date()
@@ -321,6 +329,41 @@
321 329
             this.$message.error(resp.msg)
322 330
           }
323 331
         })
332
+      },
333
+      getPermission(){
334
+        request.get("/api/func_per/get",{
335
+          params:{
336
+            create_url:"/api/dialysis/start_record?mode=1",
337
+            modify_url:"/api/start_dialysis/modify?mode=2",
338
+            modify_other_url:"/api/start_dialysis/modify?mode=3",
339
+            module:0
340
+          }
341
+        }).then(res => {
342
+          console.log(res)
343
+          console.log("上机",this.record)
344
+          if(res.data.state == 0){
345
+            this.hasPermission = false
346
+          }else if(res.data.state == 1){
347
+            if(this.record.id != "" && this.record.creater != 0){//有数据
348
+              if(this.record.creater == this.$store.getters.xt_user.user.id){//创建人是自己
349
+                if(res.data.data.is_has_modify == false){
350
+                  this.hasPermission = false
351
+                  this.showTxt = "你没有修改执行上机权限"
352
+                }
353
+              }else{//创建人不是自己
354
+                if(res.data.data.is_has_modify_other == false){
355
+                  this.hasPermission = false
356
+                  this.showTxt = "你没有修改他人执行上机权限"
357
+                }
358
+              }
359
+            }else if(this.record.id == "" || this.record.creater == 0){
360
+              if(res.data.data.is_has_create  == false){
361
+                this.hasPermission = false
362
+                this.showTxt = "你没有执行上机权限"
363
+              }
364
+            }
365
+          }
366
+        })
324 367
       }
325 368
 
326 369
     }
@@ -332,4 +375,21 @@
332 375
     text-align: center;
333 376
     margin-bottom: 20px;
334 377
   }
378
+.warnTxt{
379
+  text-align: center;
380
+  margin: 0 auto;
381
+  background: #faa331;
382
+  max-width: 240px;
383
+  padding: 10px 20px;
384
+  border-radius: 4px;
385
+  margin-bottom: 10px;
386
+  color:#fff;
387
+}
388
+</style>
389
+<style lang="scss">
390
+.newDialog{
391
+  .el-dialog__body{
392
+    padding: 10px 20px 30px;
393
+  }
394
+}
335 395
 </style>

+ 67 - 5
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue Voir le fichier

@@ -6,9 +6,10 @@
6 6
       width="1010px"
7 7
       :modal-append-to-body="false"
8 8
       :append-to-body="true"
9
+      class="newDialog"
9 10
     >
10 11
       <el-button style="position: absolute;left: 12%;top: 2%" @click="handlePatientInfo">{{patient.name}}</el-button>
11
-
12
+      <div class="warnTxt" v-if="showTxt != ''">{{ showTxt }}</div>
12 13
       <el-form ref="dialysisPrescription" :model="dialysisPrescription" label-width="148px">
13 14
         <el-row :gutter="24">
14 15
           <el-col :span="8" v-if="isShows('透析模式')">
@@ -449,7 +450,8 @@
449 450
       </el-form>
450 451
       <span slot="footer" class="dialog-footer">
451 452
                 <el-button @click="handleCancle">取 消</el-button>
452
-                <el-button type="primary" @click="handleCommit" v-if="isPermission()">保 存</el-button>
453
+                <!-- <el-button type="primary" @click="handleCommit" v-if="isPermission()">保 存</el-button> -->
454
+                <el-button type="primary" @click="handleCommit" v-if="hasPermission">保 存</el-button>
453 455
                 <el-button type="primary" @click="handleSolution" v-if="isPermission()">保存为长期处方</el-button>
454 456
 
455 457
     </span>
@@ -549,6 +551,8 @@
549 551
   import store from '@/store'
550 552
   import MsgTip from './MsgTip'
551 553
 
554
+  import request from '@/utils/request'
555
+
552 556
   export default {
553 557
     name: 'dialysisPrescriptionDialog',
554 558
     components: { MsgTip },
@@ -750,6 +754,8 @@
750 754
     },
751 755
     data() {
752 756
       return {
757
+        showTxt:'',
758
+        hasPermission:true,
753 759
         zhiShow: false,
754 760
         totalShow: false,
755 761
         huShow: false,
@@ -1205,7 +1211,11 @@
1205 1211
       getTime(val) {
1206 1212
         return uParseTime(val, '{y}-{m}-{d} {h}:{i}')
1207 1213
       },
1208
-      show() {
1214
+      show(pre) {
1215
+        this.pre = pre
1216
+        console.log("pre",pre)
1217
+        this.getPermission()
1218
+
1209 1219
         let last_weight_after = 0
1210 1220
         let weight_before = 0
1211 1221
 
@@ -2207,6 +2217,42 @@
2207 2217
       }, cancleMsg() {
2208 2218
         this.isVisibility = true
2209 2219
         this.msgtip_visibility = false
2220
+      },
2221
+      getPermission() {
2222
+        request.get("/api/func_per/get", {
2223
+          params: {
2224
+            create_url: "/api/dialysis/prescription?mode=1",
2225
+            modify_url: "/api/dialysis/prescription?mode=2",
2226
+            modify_other_url: "/api/dialysis/prescription?mode=3",
2227
+            module: 1
2228
+          }
2229
+        }).then(res => {
2230
+          console.log(res)
2231
+          console.log("predialysis.creater", this.pre.creater)
2232
+          console.log("admin.id", this.$store.getters.xt_user.user.id)
2233
+          if (res.data.state == 0) {
2234
+            this.hasPermission = false
2235
+          } else if (res.data.state == 1) {
2236
+            if (this.pre.id != "" && this.pre.creater != 0) {//有数据
2237
+              if (this.pre.creater == this.$store.getters.xt_user.user.id) {//创建人是自己
2238
+                if (res.data.data.is_has_modify == false) {
2239
+                  this.hasPermission = false
2240
+                  this.showTxt = "你没有修改透析处方权限"
2241
+                }
2242
+              } else {//创建人不是自己
2243
+                if (res.data.data.is_has_modify_other == false) {
2244
+                  this.hasPermission = false
2245
+                  this.showTxt = "你没有修改他人透析处方权限"
2246
+                }
2247
+              }
2248
+            } else if (this.pre.id == "" || this.pre.creater == 0) {
2249
+              if (res.data.data.is_has_create == false) {
2250
+                this.hasPermission = false
2251
+                this.showTxt = "你没有新增透析处方权限"
2252
+              }
2253
+            }
2254
+          }
2255
+        })
2210 2256
       }
2211 2257
     },
2212 2258
 
@@ -2522,7 +2568,7 @@
2522 2568
           }
2523 2569
         }
2524 2570
       }
2525
-    }
2571
+    },
2526 2572
   }
2527 2573
 
2528 2574
 </script>
@@ -2540,5 +2586,21 @@
2540 2586
     line-height: 40px;
2541 2587
     border-bottom: 1px solid #ccc;
2542 2588
   }
2543
-
2589
+.warnTxt{
2590
+  text-align: center;
2591
+  margin: 0 auto;
2592
+  background: #faa331;
2593
+  max-width: 240px;
2594
+  padding: 10px 20px;
2595
+  border-radius: 4px;
2596
+  margin-bottom: 10px;
2597
+  color:#fff;
2598
+}
2599
+</style>
2600
+<style lang="scss">
2601
+.newDialog{
2602
+  .el-dialog__body{
2603
+    padding: 10px 20px 30px;
2604
+  }
2605
+}
2544 2606
 </style>

+ 66 - 5
src/xt_pages/dialysis/details/dialog/finish_dialog.vue Voir le fichier

@@ -1,8 +1,9 @@
1 1
 <template>
2 2
   <div>
3
-    <el-dialog title="透析下机" :visible.sync="visible" width="854px" :modal-append-to-body="false">
4
-      <div class="txsj">
5
-      </div>
3
+    <el-dialog title="透析下机" class="newDialog" :visible.sync="visible" width="854px" :modal-append-to-body="false">
4
+      <!-- <div class="txsj">
5
+      </div> -->
6
+      <div class="warnTxt" v-if="showTxt != ''">{{ showTxt }}</div>
6 7
       <el-form :model="form" label-width="80px">
7 8
         <el-form-item label="下机护士">
8 9
           <el-select v-model="form.nurse_id" :disabled="!(dialysis_order.id != 0)">
@@ -46,10 +47,14 @@
46 47
   import { finishDialysis,PostModifyFinishDialysis } from '@/api/dialysis_record'
47 48
   import { parseTime } from '@/utils'
48 49
 
50
+  import request from '@/utils/request'
51
+
49 52
   export default {
50 53
     name: 'FinishDialog',
51 54
     data() {
52 55
       return {
56
+        showTxt:'',
57
+        hasPermission:true,
53 58
         visible: false,
54 59
         loading: false,
55 60
         creator: 0,
@@ -94,7 +99,10 @@
94 99
       }
95 100
     },
96 101
     methods: {
97
-      show: function() {
102
+      show: function(record) {
103
+        this.record = record
104
+        console.log("下机",record)
105
+        this.getPermission()
98 106
         this.visible = true
99 107
         var nowDate = new Date()
100 108
         var nowYear = nowDate.getFullYear()
@@ -215,7 +223,43 @@
215 223
           return parseTime(value, temp)
216 224
         }
217 225
         return ''
218
-      }
226
+      },
227
+      getPermission(){
228
+      request.get("/api/func_per/get",{
229
+        params:{
230
+          create_url:"/api/dialysis/finish?mode=1",
231
+          modify_url:"/api/finish_dialysis/modify?mode=2",
232
+          modify_other_url:"/api/finish_dialysis/modify?mode=3",
233
+          module:6
234
+        }
235
+      }).then(res => {
236
+        console.log(res)
237
+        console.log("下机",this.record)
238
+        // console.log("上机",this.record)
239
+        if(res.data.state == 0){
240
+          this.hasPermission = false
241
+        }else if(res.data.state == 1){
242
+          if(this.record.id != "" && this.record.creater != 0){//有数据
243
+            if(this.record.creater == this.$store.getters.xt_user.user.id){//创建人是自己
244
+              if(res.data.data.is_has_modify == false){
245
+                this.hasPermission = false
246
+                this.showTxt = "你没有修改执行下机权限"
247
+              }
248
+            }else{//创建人不是自己
249
+              if(res.data.data.is_has_modify_other == false){
250
+                this.hasPermission = false
251
+                this.showTxt = "你没有修改他人执行下机权限"
252
+              }
253
+            }
254
+          }else if(this.record.id == "" || this.record.creater == 0){
255
+            if(res.data.data.is_has_create  == false){
256
+              this.hasPermission = false
257
+              this.showTxt = "你没有执行下机权限"
258
+            }
259
+          }
260
+        }
261
+      })
262
+    }
219 263
     }
220 264
   }
221 265
 </script>
@@ -226,4 +270,21 @@
226 270
     text-align: center;
227 271
     margin-bottom: 20px;
228 272
   }
273
+.warnTxt{
274
+  text-align: center;
275
+  margin: 0 auto;
276
+  background: #faa331;
277
+  max-width: 240px;
278
+  padding: 10px 20px;
279
+  border-radius: 4px;
280
+  margin-bottom: 10px;
281
+  color:#fff;
282
+}
283
+</style>
284
+<style lang="scss">
285
+.newDialog{
286
+  .el-dialog__body{
287
+    padding: 10px 20px 30px;
288
+  }
289
+}
229 290
 </style>

+ 64 - 4
src/xt_pages/dialysis/details/dialog/treatmentSummaryDialog.vue Voir le fichier

@@ -1,10 +1,12 @@
1 1
 <template>
2 2
   <el-dialog
3
+    class="newDialog"
3 4
     title="治疗小结"
4 5
     width="854px"
5 6
     :visible.sync="isVisibility"
6 7
     :modal-append-to-body="false"
7
-  >
8
+  > 
9
+    <div class="warnTxt" v-if="showTxt != ''">{{ showTxt }}</div>
8 10
     <el-form :model="treatmentSummary">
9 11
       <el-row :gutter="20">
10 12
         <el-col :span="24">
@@ -33,7 +35,7 @@
33 35
     </el-form>
34 36
     <div slot="footer" class="dialog-footer">
35 37
       <el-button @click="handleCancle">取 消</el-button>
36
-      <el-button type="primary" @click="handleComfirm">保 存</el-button>
38
+      <el-button type="primary" @click="handleComfirm" v-if="hasPermission">保 存</el-button>
37 39
     </div>
38 40
   </el-dialog>
39 41
 </template>
@@ -43,6 +45,8 @@
43 45
 import { postTreatmentsummary } from '@/api/dialysis'
44 46
 import { uParseTime } from '@/utils/tools'
45 47
 
48
+import request from '@/utils/request'
49
+
46 50
 export default {
47 51
     name: 'treatmentSummaryDialog',
48 52
 
@@ -62,6 +66,8 @@ export default {
62 66
     },
63 67
     data() {
64 68
       return {
69
+        showTxt:'',
70
+        hasPermission:true,
65 71
         value: '',
66 72
         value2: '',
67 73
 
@@ -81,8 +87,11 @@ export default {
81 87
       }
82 88
   },
83 89
     methods: {
84
-      show() {
90
+      show(record) {
85 91
         this.isVisibility = true
92
+        this.record = record
93
+        console.log("治疗小结",record)
94
+        this.getPermission()
86 95
       },
87 96
       hide() {
88 97
         this.isVisibility = false
@@ -148,6 +157,41 @@ export default {
148 157
             this.hide()
149 158
           }
150 159
         })
160
+      },
161
+      getPermission(){
162
+        request.get("/api/func_per/get",{
163
+          params:{
164
+            create_url:"/api/dialysis/treatmentsummary?mode=1",
165
+            modify_url:"/api/dialysis/treatmentsummary?mode=2",
166
+            modify_other_url:"/api/dialysis/treatmentsummary?mode=3",
167
+            module:9
168
+          }
169
+        }).then(res => {
170
+          console.log(res)
171
+          console.log("小结",this.record)
172
+          if(res.data.state == 0){
173
+            this.hasPermission = false
174
+          }else if(res.data.state == 1){
175
+            if(this.record.id != "" && this.record.creater != 0){//有数据
176
+              if(this.record.creater == this.$store.getters.user.admin.id){//创建人是自己
177
+                if(res.data.data.is_has_modify == false){
178
+                  this.hasPermission = false
179
+                  this.showTxt = "你没有修改治疗小结权限"
180
+                }
181
+              }else{//创建人不是自己
182
+                if(res.data.data.is_has_modify_other == false){
183
+                  this.hasPermission = false
184
+                  this.showTxt = "你没有修改他人治疗小结权限"
185
+                }
186
+              }
187
+            }else if(this.record.id == "" || this.record.creater == 0){
188
+              if(res.data.data.is_has_create  == false){
189
+                this.hasPermission = false
190
+                this.showTxt = "你没有新增治疗小结权限"
191
+              }
192
+            }
193
+          }
194
+        })
151 195
       }
152 196
     }, watch: {
153 197
       isVisibility(val) {
@@ -171,5 +215,21 @@ export default {
171 215
 </script>
172 216
 
173 217
 <style scoped>
174
-
218
+.warnTxt{
219
+  text-align: center;
220
+  margin: 0 auto;
221
+  background: #faa331;
222
+  max-width: 240px;
223
+  padding: 10px 20px;
224
+  border-radius: 4px;
225
+  margin-bottom: 10px;
226
+  color:#fff;
227
+}
228
+</style>
229
+<style lang="scss">
230
+.newDialog{
231
+  .el-dialog__body{
232
+    padding: 10px 20px 30px;
233
+  }
234
+}
175 235
 </style>