|
@@ -11,7 +11,7 @@ import {
|
11
|
11
|
FormGroup,
|
12
|
12
|
FormControl,
|
13
|
13
|
} from "@angular/forms";
|
14
|
|
-import { Router } from "@angular/router";
|
|
14
|
+import { Router, ActivatedRoute } from "@angular/router";
|
15
|
15
|
|
16
|
16
|
import http from "../../../assets/js/http";
|
17
|
17
|
import { MainService } from "../../services/main.service";
|
|
@@ -108,6 +108,7 @@ export class HushijiandanComponent implements OnInit {
|
108
|
108
|
private message: NzMessageService,
|
109
|
109
|
private fb: FormBuilder,
|
110
|
110
|
public router: Router,
|
|
111
|
+ private route: ActivatedRoute,
|
111
|
112
|
private mainService: MainService,
|
112
|
113
|
private notification: NzNotificationService,
|
113
|
114
|
private webs: WebsocketNurseService,
|
|
@@ -149,7 +150,11 @@ export class HushijiandanComponent implements OnInit {
|
149
|
150
|
orderListTimeConst = 60; //工单列表自动刷新秒数
|
150
|
151
|
deptDisplay; //护士端是否显示可以别名,1是显示科室名称,2是显示科室别名
|
151
|
152
|
|
|
153
|
+ // 初始化权限按钮
|
|
154
|
+ coopBtns: any = {};
|
|
155
|
+
|
152
|
156
|
ngOnInit() {
|
|
157
|
+ this.getCoopBtns();
|
153
|
158
|
this.currentHospital = this.tool.getCurrentHospital();
|
154
|
159
|
this.tool.getDeptDisplay().subscribe((result) => {
|
155
|
160
|
if (result.status == 200) {
|
|
@@ -260,6 +265,38 @@ export class HushijiandanComponent implements OnInit {
|
260
|
265
|
jpDrugsWKOMsg: any = {}; //药品静配提示信息
|
261
|
266
|
surgeryWKOMsg: any = {}; //手术提示信息
|
262
|
267
|
|
|
268
|
+
|
|
269
|
+ getCoopBtns(){
|
|
270
|
+ let menu: any = JSON.parse(localStorage.getItem("menu")) || []; //菜单
|
|
271
|
+ let coopBtns:any = {};
|
|
272
|
+ let nurseMenu = menu.find(v => v.link === 'nurse');
|
|
273
|
+ let nurseMenuChildren = nurseMenu.childrens || [];
|
|
274
|
+ nurseMenuChildren.forEach((e) => {
|
|
275
|
+ switch (e.link) {
|
|
276
|
+ case "suggestionBox":
|
|
277
|
+ coopBtns.suggestionBox = true; //意见箱
|
|
278
|
+ break;
|
|
279
|
+ case "inquiryOfHistoricalSpecimens":
|
|
280
|
+ coopBtns.inquiryOfHistoricalSpecimens = true; //历史标本查询
|
|
281
|
+ break;
|
|
282
|
+ case "historicalMedicineListInquiry":
|
|
283
|
+ coopBtns.historicalMedicineListInquiry = true; //历史药单查询
|
|
284
|
+ break;
|
|
285
|
+ case "quickReportForRepair":
|
|
286
|
+ coopBtns.quickReportForRepair = true; //快捷报修
|
|
287
|
+ break;
|
|
288
|
+ case "repairList":
|
|
289
|
+ coopBtns.repairList = true; //报修列表
|
|
290
|
+ break;
|
|
291
|
+ case "buildOrdersForOtherTasks":
|
|
292
|
+ coopBtns.buildOrdersForOtherTasks = true; //其他任务建单
|
|
293
|
+ break;
|
|
294
|
+ }
|
|
295
|
+ });
|
|
296
|
+ this.coopBtns = coopBtns;
|
|
297
|
+ console.log(this.coopBtns);
|
|
298
|
+ }
|
|
299
|
+
|
263
|
300
|
// 切换综合日志和一键报修
|
264
|
301
|
smallTabs = [];
|
265
|
302
|
smallTabId = 2; //默认显示一键报修
|
|
@@ -418,7 +455,7 @@ export class HushijiandanComponent implements OnInit {
|
418
|
455
|
this.mainService.getFetchDataList("simple/data", "hospitalConfig", postData).subscribe((result) => {
|
419
|
456
|
if (result.status == 200) {
|
420
|
457
|
this.isShowBx = result.list.find(v => v.key == 'hos_itsmIncident').value == 1;
|
421
|
|
- if (this.isShowBx) {
|
|
458
|
+ if (this.isShowBx && (this.coopBtns.repairList || this.coopBtns.quickReportForRepair)) {
|
422
|
459
|
this.smallTabs = [
|
423
|
460
|
{ id: 1, name: "综合日志" },
|
424
|
461
|
{ id: 2, name: "一键报修" },
|
|
@@ -3101,11 +3138,11 @@ export class HushijiandanComponent implements OnInit {
|
3101
|
3138
|
this.getHistorySpecimen();
|
3102
|
3139
|
} else if (type === "historyDrugsbag") {
|
3103
|
3140
|
this.getHistoryDrugsbag();
|
3104
|
|
- } else if (type === "bxlb" && this.isShowBx) {
|
|
3141
|
+ } else if (type === "bxlb" && this.isShowBx && this.coopBtns.repairList) {
|
3105
|
3142
|
this.getBxlb();
|
3106
|
3143
|
this.getIncidentState();
|
3107
|
3144
|
this.getDegrees();
|
3108
|
|
- } else if (type === "kjbx" && this.isShowBx) {
|
|
3145
|
+ } else if (type === "kjbx" && this.isShowBx && this.coopBtns.quickReportForRepair) {
|
3109
|
3146
|
// this.getQuickBxlb();
|
3110
|
3147
|
this.getIncidentcategory();
|
3111
|
3148
|
// 获取报修的区域(所属院区)
|
|
@@ -3180,6 +3217,9 @@ export class HushijiandanComponent implements OnInit {
|
3180
|
3217
|
adviceSearchInp: string = ""; //意见箱搜索
|
3181
|
3218
|
adviceLoading = false;
|
3182
|
3219
|
getAdvice() {
|
|
3220
|
+ if(!this.coopBtns.suggestionBox){
|
|
3221
|
+ return;
|
|
3222
|
+ }
|
3183
|
3223
|
let that = this;
|
3184
|
3224
|
let postData = {
|
3185
|
3225
|
advice: {
|