See999 5 年前
父节点
当前提交
9c34c088e6

+ 7 - 7
src/xt_pages/dialysis/details/NavIgation.vue 查看文件

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

+ 65 - 3
src/xt_pages/dialysis/details/dialog/AssessmentAfterDislysis.vue 查看文件

1
 <template>
1
 <template>
2
   <div class="assessment-after-box">
2
   <div class="assessment-after-box">
3
     <el-dialog
3
     <el-dialog
4
+      class="newDialog"
4
       title="透后评估"
5
       title="透后评估"
5
       :visible.sync="isVisibility"
6
       :visible.sync="isVisibility"
6
       width="1010px"
7
       width="1010px"
7
       :modal-append-to-body="false"
8
       :modal-append-to-body="false"
8
     >
9
     >
10
+    <div class="warnTxt" v-if="showTxt != ''">{{ showTxt }}</div>
9
       <el-form ref="form" :model="form" label-width="160px">
11
       <el-form ref="form" :model="form" label-width="160px">
10
         <!-- <el-row :gutter="20"> -->
12
         <!-- <el-row :gutter="20"> -->
11
         <el-row :gutter="20">
13
         <el-row :gutter="20">
476
 
478
 
477
       <span slot="footer" class="dialog-footer">
479
       <span slot="footer" class="dialog-footer">
478
         <el-button @click="hide">取 消</el-button>
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
           >保 存</el-button
482
           >保 存</el-button
481
         >
483
         >
482
       </span>
484
       </span>
497
 import { uParseTime } from "@/utils/tools";
499
 import { uParseTime } from "@/utils/tools";
498
 import store from "@/store";
500
 import store from "@/store";
499
 
501
 
502
+import request from '@/utils/request'
503
+
500
 export default {
504
 export default {
501
   name: "AssessmentAfterDislysis",
505
   name: "AssessmentAfterDislysis",
502
   props: {
506
   props: {
524
   },
528
   },
525
   data() {
529
   data() {
526
     return {
530
     return {
531
+      showTxt:'',
532
+      hasPermission:true,
527
       loading: false,
533
       loading: false,
528
       record_date: "",
534
       record_date: "",
529
       isVisibility: false,
535
       isVisibility: false,
935
       this.InnerDialogProps.visibility = false;
941
       this.InnerDialogProps.visibility = false;
936
     },
942
     },
937
 
943
 
938
-    show() {
944
+    show(predialysis) {
939
       this.isVisibility = true;
945
       this.isVisibility = true;
946
+      this.predialysis = predialysis
947
+      console.log("透后",predialysis)
948
+      this.getPermission()
940
     },
949
     },
941
 
950
 
942
     hide() {
951
     hide() {
967
         this.assessment_after_dislysis["actual_treatment_hour"],
976
         this.assessment_after_dislysis["actual_treatment_hour"],
968
         this.assessment_after_dislysis["actual_treatment_minute"]
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
   created() {
1016
   created() {
1001
 };
1045
 };
1002
 </script>
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 查看文件

1
 <template>
1
 <template>
2
   <el-dialog title="接诊评估"
2
   <el-dialog title="接诊评估"
3
+              class="newDialog"
3
              :modal-append-to-body="false"
4
              :modal-append-to-body="false"
4
              :visible.sync="isVisibility"
5
              :visible.sync="isVisibility"
5
              width="854px">
6
              width="854px">
7
+    <div class="warnTxt" v-if="showTxt != ''">{{ showTxt }}</div>
6
     <el-form :model="receiveTreatmentAsses" label-width="80px">
8
     <el-form :model="receiveTreatmentAsses" label-width="80px">
7
       <el-form-item label="入室方式 : " v-if="isShow('入室方式')">
9
       <el-form-item label="入室方式 : " v-if="isShow('入室方式')">
8
         <!--<el-radio-group v-model="receiveTreatmentAsses.way">-->
10
         <!--<el-radio-group v-model="receiveTreatmentAsses.way">-->
155
     </el-form>
157
     </el-form>
156
     <div slot="footer" class="dialog-footer">
158
     <div slot="footer" class="dialog-footer">
157
       <el-button @click="handleCancle">取 消</el-button>
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
     </div>
161
     </div>
160
   </el-dialog>
162
   </el-dialog>
161
 </template>
163
 </template>
166
   import store from '@/store'
168
   import store from '@/store'
167
   import { getDataConfig } from '@/utils/data'
169
   import { getDataConfig } from '@/utils/data'
168
 
170
 
171
+  import request from '@/utils/request'
172
+
169
   export default {
173
   export default {
170
     name: 'acceptsTreatmentDialog',
174
     name: 'acceptsTreatmentDialog',
171
     data() {
175
     data() {
172
       return {
176
       return {
177
+        showTxt:'',
178
+        hasPermission:true,
173
         isVisibility: false,
179
         isVisibility: false,
174
         record_date: '',
180
         record_date: '',
175
         way_arr: [],
181
         way_arr: [],
214
         }
220
         }
215
         return false
221
         return false
216
       },
222
       },
217
-      show() {
223
+      show(accepts) {
224
+        this.accepts = accepts
225
+        console.log("accepts",accepts)
226
+        this.getPermission()
218
         for (var index in this.receiveTreatmentAsses) {
227
         for (var index in this.receiveTreatmentAsses) {
219
           if (index == 'condition' || index == 'danger_level' || index == 'psychological_assessment') {
228
           if (index == 'condition' || index == 'danger_level' || index == 'psychological_assessment') {
220
             this.receiveTreatmentAsses[index] = this.receiver_treatment_access[index] + ''
229
             this.receiveTreatmentAsses[index] = this.receiver_treatment_access[index] + ''
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
     props: {
316
     props: {
273
       receiver_treatment_access: { // 双人核对
317
       receiver_treatment_access: { // 双人核对
294
         }
338
         }
295
       }
339
       }
296
     }, created() {
340
     }, created() {
341
+      console.log("接诊评估",this.receiver_treatment_access)
297
       var date = this.$route.query && this.$route.query.date
342
       var date = this.$route.query && this.$route.query.date
298
       this.record_date = uParseTime(date, '{y}-{m}-{d}')
343
       this.record_date = uParseTime(date, '{y}-{m}-{d}')
299
 
344
 
312
 </script>
357
 </script>
313
 
358
 
314
 <style scoped>
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
 </style>
377
 </style>

+ 64 - 5
src/xt_pages/dialysis/details/dialog/assessmentBeforeDislysisDialog.vue 查看文件

1
 <template>
1
 <template>
2
   <div>
2
   <div>
3
     <el-dialog
3
     <el-dialog
4
+      class="newDialog"
4
       title="透前评估"
5
       title="透前评估"
5
       :visible.sync="isVisibility"
6
       :visible.sync="isVisibility"
6
       width="1010px"
7
       width="1010px"
7
       :modal-append-to-body="false"
8
       :modal-append-to-body="false"
8
     >
9
     >
9
-
10
+    <div class="warnTxt" v-if="showTxt != ''">{{ showTxt }}</div>
10
       <!--<check-box-dialog-->
11
       <!--<check-box-dialog-->
11
       <!--:propsForm="InnerDialogProps"-->
12
       <!--:propsForm="InnerDialogProps"-->
12
       <!--v-on:dialog-comfirm="innerDialogComfirm"-->
13
       <!--v-on:dialog-comfirm="innerDialogComfirm"-->
446
       </el-form>
447
       </el-form>
447
       <span slot="footer" class="dialog-footer">
448
       <span slot="footer" class="dialog-footer">
448
                 <el-button @click="handleCancle">取 消</el-button>
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
             </span>
451
             </span>
451
     </el-dialog>
452
     </el-dialog>
452
 
453
 
488
   import store from '@/store'
489
   import store from '@/store'
489
   import { uParseTime } from '@/utils/tools'
490
   import { uParseTime } from '@/utils/tools'
490
 
491
 
492
+  import request from '@/utils/request'
493
+
491
   export default {
494
   export default {
492
     components: {
495
     components: {
493
       multiSelectBox
496
       multiSelectBox
495
     name: 'assessment-after-dislysis-dialog',
498
     name: 'assessment-after-dislysis-dialog',
496
     data() {
499
     data() {
497
       return {
500
       return {
501
+        showTxt:'',
502
+        hasPermission:true,
498
         weight_adjust: {
503
         weight_adjust: {
499
           weight: '',
504
           weight: '',
500
           doctor: '',
505
           doctor: '',
616
         }
621
         }
617
         return false
622
         return false
618
       },
623
       },
619
-      show() {
620
-
624
+      show(assessment) {
625
+        this.assessment = assessment
626
+        console.log("透前",assessment)
627
+        this.getPermission()
621
         this.isVisibility = true
628
         this.isVisibility = true
622
         for (let i = 0; i < this.admin_users.length; i++) {
629
         for (let i = 0; i < this.admin_users.length; i++) {
623
           if (this.admin_users[i].user_type != 3) {
630
           if (this.admin_users[i].user_type != 3) {
876
       },cancleDryWeight(){
883
       },cancleDryWeight(){
877
         this.dialogFormVisible = false
884
         this.dialogFormVisible = false
878
         this.isVisibility = true
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
     created() {
924
     created() {
1005
 </script>
1048
 </script>
1006
 
1049
 
1007
 <style scoped>
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
 </style>
1068
 </style>

+ 62 - 2
src/xt_pages/dialysis/details/dialog/computer_dialog.vue 查看文件

1
 <template>
1
 <template>
2
   <div>
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
       <el-form :model="form" label-width="100px">
5
       <el-form :model="form" label-width="100px">
5
 
6
 
6
         <el-form-item label="班次">
7
         <el-form-item label="班次">
58
   import { GetSchedualNumber, PostModifyStartDialysis, startDialysis } from '@/api/dialysis_record'
59
   import { GetSchedualNumber, PostModifyStartDialysis, startDialysis } from '@/api/dialysis_record'
59
   import { parseTime } from '@/utils'
60
   import { parseTime } from '@/utils'
60
 
61
 
62
+  import request from '@/utils/request'
63
+
61
   export default {
64
   export default {
62
     name: 'ComputerDialog',
65
     name: 'ComputerDialog',
63
     data() {
66
     data() {
64
       return {
67
       return {
68
+        showTxt:'',
69
+        hasPermission:true,
65
         zone_beds: [],
70
         zone_beds: [],
66
         visible: false,
71
         visible: false,
67
         loading: false,
72
         loading: false,
212
         }
217
         }
213
         return ''
218
         return ''
214
       },
219
       },
215
-      show: function() {
220
+      show: function(dialysis) {
221
+        this.record = dialysis
222
+        console.log("上机",dialysis)
223
+        this.getPermission()
216
         this.visible = true
224
         this.visible = true
217
 
225
 
218
         var nowDate = new Date()
226
         var nowDate = new Date()
321
             this.$message.error(resp.msg)
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
     text-align: center;
375
     text-align: center;
333
     margin-bottom: 20px;
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
 </style>
395
 </style>

+ 67 - 5
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue 查看文件

6
       width="1010px"
6
       width="1010px"
7
       :modal-append-to-body="false"
7
       :modal-append-to-body="false"
8
       :append-to-body="true"
8
       :append-to-body="true"
9
+      class="newDialog"
9
     >
10
     >
10
       <el-button style="position: absolute;left: 12%;top: 2%" @click="handlePatientInfo">{{patient.name}}</el-button>
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
       <el-form ref="dialysisPrescription" :model="dialysisPrescription" label-width="148px">
13
       <el-form ref="dialysisPrescription" :model="dialysisPrescription" label-width="148px">
13
         <el-row :gutter="24">
14
         <el-row :gutter="24">
14
           <el-col :span="8" v-if="isShows('透析模式')">
15
           <el-col :span="8" v-if="isShows('透析模式')">
449
       </el-form>
450
       </el-form>
450
       <span slot="footer" class="dialog-footer">
451
       <span slot="footer" class="dialog-footer">
451
                 <el-button @click="handleCancle">取 消</el-button>
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
                 <el-button type="primary" @click="handleSolution" v-if="isPermission()">保存为长期处方</el-button>
455
                 <el-button type="primary" @click="handleSolution" v-if="isPermission()">保存为长期处方</el-button>
454
 
456
 
455
     </span>
457
     </span>
549
   import store from '@/store'
551
   import store from '@/store'
550
   import MsgTip from './MsgTip'
552
   import MsgTip from './MsgTip'
551
 
553
 
554
+  import request from '@/utils/request'
555
+
552
   export default {
556
   export default {
553
     name: 'dialysisPrescriptionDialog',
557
     name: 'dialysisPrescriptionDialog',
554
     components: { MsgTip },
558
     components: { MsgTip },
750
     },
754
     },
751
     data() {
755
     data() {
752
       return {
756
       return {
757
+        showTxt:'',
758
+        hasPermission:true,
753
         zhiShow: false,
759
         zhiShow: false,
754
         totalShow: false,
760
         totalShow: false,
755
         huShow: false,
761
         huShow: false,
1205
       getTime(val) {
1211
       getTime(val) {
1206
         return uParseTime(val, '{y}-{m}-{d} {h}:{i}')
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
         let last_weight_after = 0
1219
         let last_weight_after = 0
1210
         let weight_before = 0
1220
         let weight_before = 0
1211
 
1221
 
2207
       }, cancleMsg() {
2217
       }, cancleMsg() {
2208
         this.isVisibility = true
2218
         this.isVisibility = true
2209
         this.msgtip_visibility = false
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
           }
2568
           }
2523
         }
2569
         }
2524
       }
2570
       }
2525
-    }
2571
+    },
2526
   }
2572
   }
2527
 
2573
 
2528
 </script>
2574
 </script>
2540
     line-height: 40px;
2586
     line-height: 40px;
2541
     border-bottom: 1px solid #ccc;
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
 </style>
2606
 </style>

+ 66 - 5
src/xt_pages/dialysis/details/dialog/finish_dialog.vue 查看文件

1
 <template>
1
 <template>
2
   <div>
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
       <el-form :model="form" label-width="80px">
7
       <el-form :model="form" label-width="80px">
7
         <el-form-item label="下机护士">
8
         <el-form-item label="下机护士">
8
           <el-select v-model="form.nurse_id" :disabled="!(dialysis_order.id != 0)">
9
           <el-select v-model="form.nurse_id" :disabled="!(dialysis_order.id != 0)">
46
   import { finishDialysis,PostModifyFinishDialysis } from '@/api/dialysis_record'
47
   import { finishDialysis,PostModifyFinishDialysis } from '@/api/dialysis_record'
47
   import { parseTime } from '@/utils'
48
   import { parseTime } from '@/utils'
48
 
49
 
50
+  import request from '@/utils/request'
51
+
49
   export default {
52
   export default {
50
     name: 'FinishDialog',
53
     name: 'FinishDialog',
51
     data() {
54
     data() {
52
       return {
55
       return {
56
+        showTxt:'',
57
+        hasPermission:true,
53
         visible: false,
58
         visible: false,
54
         loading: false,
59
         loading: false,
55
         creator: 0,
60
         creator: 0,
94
       }
99
       }
95
     },
100
     },
96
     methods: {
101
     methods: {
97
-      show: function() {
102
+      show: function(record) {
103
+        this.record = record
104
+        console.log("下机",record)
105
+        this.getPermission()
98
         this.visible = true
106
         this.visible = true
99
         var nowDate = new Date()
107
         var nowDate = new Date()
100
         var nowYear = nowDate.getFullYear()
108
         var nowYear = nowDate.getFullYear()
215
           return parseTime(value, temp)
223
           return parseTime(value, temp)
216
         }
224
         }
217
         return ''
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
 </script>
265
 </script>
226
     text-align: center;
270
     text-align: center;
227
     margin-bottom: 20px;
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
 </style>
290
 </style>

+ 64 - 4
src/xt_pages/dialysis/details/dialog/treatmentSummaryDialog.vue 查看文件

1
 <template>
1
 <template>
2
   <el-dialog
2
   <el-dialog
3
+    class="newDialog"
3
     title="治疗小结"
4
     title="治疗小结"
4
     width="854px"
5
     width="854px"
5
     :visible.sync="isVisibility"
6
     :visible.sync="isVisibility"
6
     :modal-append-to-body="false"
7
     :modal-append-to-body="false"
7
-  >
8
+  > 
9
+    <div class="warnTxt" v-if="showTxt != ''">{{ showTxt }}</div>
8
     <el-form :model="treatmentSummary">
10
     <el-form :model="treatmentSummary">
9
       <el-row :gutter="20">
11
       <el-row :gutter="20">
10
         <el-col :span="24">
12
         <el-col :span="24">
33
     </el-form>
35
     </el-form>
34
     <div slot="footer" class="dialog-footer">
36
     <div slot="footer" class="dialog-footer">
35
       <el-button @click="handleCancle">取 消</el-button>
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
     </div>
39
     </div>
38
   </el-dialog>
40
   </el-dialog>
39
 </template>
41
 </template>
43
 import { postTreatmentsummary } from '@/api/dialysis'
45
 import { postTreatmentsummary } from '@/api/dialysis'
44
 import { uParseTime } from '@/utils/tools'
46
 import { uParseTime } from '@/utils/tools'
45
 
47
 
48
+import request from '@/utils/request'
49
+
46
 export default {
50
 export default {
47
     name: 'treatmentSummaryDialog',
51
     name: 'treatmentSummaryDialog',
48
 
52
 
62
     },
66
     },
63
     data() {
67
     data() {
64
       return {
68
       return {
69
+        showTxt:'',
70
+        hasPermission:true,
65
         value: '',
71
         value: '',
66
         value2: '',
72
         value2: '',
67
 
73
 
81
       }
87
       }
82
   },
88
   },
83
     methods: {
89
     methods: {
84
-      show() {
90
+      show(record) {
85
         this.isVisibility = true
91
         this.isVisibility = true
92
+        this.record = record
93
+        console.log("治疗小结",record)
94
+        this.getPermission()
86
       },
95
       },
87
       hide() {
96
       hide() {
88
         this.isVisibility = false
97
         this.isVisibility = false
148
             this.hide()
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
     }, watch: {
196
     }, watch: {
153
       isVisibility(val) {
197
       isVisibility(val) {
171
 </script>
215
 </script>
172
 
216
 
173
 <style scoped>
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
 </style>
235
 </style>