ソースを参照

支助一站式优化

maotao 1 ヶ月 前
コミット
871e9b145d

+ 16 - 8
src/app/components/bind-extension-number/bind-extension-number.component.ts

@@ -43,10 +43,14 @@ export class BindExtensionNumberComponent implements OnInit {
43 43
   // 工单范选项卡
44 44
   scopeTabs:any[] = [];
45 45
   activeScopeTab:any;
46
-
46
+	menuList:any;
47
+	
47 48
   ngOnInit() {
48
-    console.log('itsmData', this.itsmData);
49
-    console.log('hsmsData', this.hsmsData);
49
+    // console.log('itsmData', this.itsmData);
50
+    // console.log('hsmsData', this.hsmsData);
51
+		let menuItem = JSON.parse(localStorage.getItem("menuItem"))
52
+		this.menuList = menuItem.find(i=>i.link=='bangdingfenji')
53
+		// console.log(111, this.menuList);
50 54
 		this.init()
51 55
     this.getHospitalList();
52 56
     this.getHjzxCornetList();
@@ -54,11 +58,15 @@ export class BindExtensionNumberComponent implements OnInit {
54 58
   }
55 59
 	
56 60
 	init(){
57
-		if(this.coopBtns.extension){
58
-			this.scopeTabs.push({ name: '分机绑定', value: 1, checked: false })
59
-		}
60
-		if(this.coopBtns.callCenter){
61
-			this.scopeTabs.push({ name: '呼叫中心', value: 2, checked: false })
61
+		if(this.menuList && this.menuList.childrens){
62
+			for(let i of this.menuList.childrens){
63
+				if(i.link=='extension'){
64
+					this.scopeTabs.push({ name: '分机绑定', value: 1, checked: false })
65
+				}
66
+				if(i.link=='callCenter'){
67
+					this.scopeTabs.push({ name: '呼叫中心', value: 2, checked: false })
68
+				}
69
+			}
62 70
 		}
63 71
 		if(this.scopeTabs.length>0){
64 72
 			this.activeScopeTab = this.scopeTabs[0]

+ 29 - 17
src/app/components/order-scope/order-scope.component.ts

@@ -45,8 +45,11 @@ export class OrderScopeComponent implements OnInit {
45 45
 	activeScopeTab:any;
46 46
 	//#region 工单范围-运维start
47 47
 	allDuty:number = 1;
48
+	menuList:any;
48 49
 	
49 50
   ngOnInit() {
51
+		let menuItem = JSON.parse(localStorage.getItem("menuItem"))
52
+		this.menuList = menuItem.find(i=>i.link=='gongdanfanwei')
50 53
     this.initItsm();
51 54
   }
52 55
 
@@ -63,12 +66,17 @@ export class OrderScopeComponent implements OnInit {
63 66
   }
64 67
 
65 68
   initItsm(){
66
-		if(this.coopBtns.maintenance){
67
-			this.scopeTabs.push({ name: '运维', value: 1, checked: false })
68
-		}
69
-		if(this.coopBtns.distributionPj){
70
-			this.scopeTabs.push({ name: '配送陪检', value: 2, checked: false })
69
+		if(this.menuList && this.menuList.childrens){
70
+			for(let i of this.menuList.childrens){
71
+				if(i.link=='maintenance'){
72
+					this.scopeTabs.push({ name: '运维', value: 1, checked: false })
73
+				}
74
+				if(i.link=='distributionPj'){
75
+					this.scopeTabs.push({ name: '配送陪检', value: 2, checked: false })
76
+				}
77
+			}
71 78
 		}
79
+		
72 80
 		if(this.scopeTabs.length>0){
73 81
 			this.activeScopeTab = this.scopeTabs[0]
74 82
 		}
@@ -302,17 +310,21 @@ export class OrderScopeComponent implements OnInit {
302 310
     saveOrderScope() {
303 311
       // 配送的院区必填
304 312
       let value2 = this.scopeTabs.find(v => v.value == 2 );
305
-      if(value2.checked && !this.checkedHos){
306
-        this.message.warning('【配送】的院区必填!')
307
-        return;
308
-      }
313
+			if(value2){
314
+				if(value2.checked && !this.checkedHos){
315
+				  this.message.warning('【配送】的院区必填!')
316
+				  return;
317
+				}
318
+			}
309 319
 
310 320
       // 运维限制部门的时候,部门必填
311 321
       let value1 = this.scopeTabs.find(v => v.value == 1 );
312
-      if(value1.checked && !this.itsmCheckedHos.filter(v => v.checked).length && this.allDuty != 1){
313
-        this.message.warning('【运维】的部门必填!')
314
-        return;
315
-      }
322
+			if(value1){
323
+				if(value1.checked && !this.itsmCheckedHos.filter(v => v.checked).length && this.allDuty != 1){
324
+				  this.message.warning('【运维】的部门必填!')
325
+				  return;
326
+				}
327
+			}
316 328
 
317 329
       this.saveLoading = true;
318 330
       let types = [];
@@ -362,20 +374,20 @@ export class OrderScopeComponent implements OnInit {
362 374
       let postData:any = {
363 375
         workerOrderScope: {
364 376
           userId: this.user.user.id,
365
-          mdv2Switch: Number(itsm.checked),
366
-          hsmsSwitch: Number(hsms.checked),
377
+          mdv2Switch: itsm?Number(itsm.checked):null,
378
+          hsmsSwitch: hsms?Number(hsms.checked):null,
367 379
           range: 0,
368 380
           dutyRange: 0,
369 381
         },
370 382
       };
371 383
 
372
-      if(itsm.checked){
384
+      if(itsm && itsm.checked){
373 385
         postData.workerOrderScope.allDuty = this.allDuty;
374 386
         postData.workerOrderScope.dutyIds = this.itsmCheckedHos.filter(v => v.checked).map(v => v.value).toString() || undefined;
375 387
         postData.workerOrderScope.dutyGroupIds = this.itsmCheckedGroup.filter(v => v.checked).map(v => v.value).toString() || undefined;
376 388
         postData.workerOrderScope.dutyRange = this.itsmOrderScopeRadio - 0;
377 389
       }
378
-      if(hsms.checked){
390
+      if(hsms && hsms.checked){
379 391
         postData.workerOrderScope.hospitalId = this.checkedHos ? { id: this.checkedHos - 0 } : undefined;
380 392
         postData.workerOrderScope.typeIds = typesId || undefined;
381 393
         postData.workerOrderScope.groupIds = groupsId || undefined;

+ 3 - 0
src/app/services/tool.service.ts

@@ -114,6 +114,7 @@ export class ToolService {
114 114
     }
115 115
     let secondMenus = []; // 二级菜单
116 116
     let jurisdiction = []; //当前菜单的权限列表
117
+		let menuItem = null;
117 118
     let coopBtns: any = {}; // 初始化权限
118 119
     menu.forEach((e) => {
119 120
       if (e.childrens) {
@@ -135,6 +136,8 @@ export class ToolService {
135 136
         }
136 137
       })
137 138
     }
139
+		menuItem = jurisdiction
140
+		localStorage.setItem("menuItem", JSON.stringify(menuItem))
138 141
     jurisdiction.forEach((e) => {
139 142
       switch (e.link) {
140 143
         case "look":

+ 1 - 1
src/app/views/assets-product-management/assets-product-management.component.ts

@@ -174,7 +174,7 @@ export class AssetsProductManagementComponent implements OnInit {
174 174
       company: {
175 175
         name: keyword,
176 176
         busiType: {key: "company_busi_type", value: "2"},
177
-        hosId: this.currentHospital.id,
177
+        statisticalHosId: this.currentHospital.id,
178 178
       },
179 179
       idx: 0,
180 180
       sum: 20,

+ 1 - 0
src/app/views/fuwutai/fuwutai.component.html

@@ -203,6 +203,7 @@
203 203
 							</ng-container>
204 204
               <!-- 运维 蓝色-->
205 205
               <ng-container *ngIf="data.type === 'mdv2'">
206
+								<div class="top-border" *ngIf="!osComponentRef2.viewPortItems[index-1]"></div>
206 207
 								<div class="top-border top-border3" *ngIf="osComponentRef2.viewPortItems[index-1] && osComponentRef2.viewPortItems[index-1].type=='hsms'"></div>
207 208
 								<div class="top-border" *ngIf="osComponentRef2.viewPortItems[index-1] && osComponentRef2.viewPortItems[index-1].type!='hsms'" [ngClass]="{'top-border3': data.data.overtimePercent > 100}"></div>
208 209
 								<div class="left-border"></div>

+ 2 - 1
src/app/views/fuwutai/fuwutai.component.ts

@@ -806,6 +806,7 @@ export class FuwutaiComponent implements OnInit {
806 806
   ngOnInit() {
807 807
     this.websocketLoading = true;
808 808
     this.coopBtns = this.tool.initCoopBtns(this.route);
809
+		// console.log(8989899,this.coopBtns)
809 810
     //防抖
810 811
     this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
811 812
       this.searchApplicationDepartment(v[0], v[1]);
@@ -861,7 +862,7 @@ export class FuwutaiComponent implements OnInit {
861 862
     this.initRole();
862 863
     this.initLogin();
863 864
     this.retract();
864
-    // this.refresh();
865
+    this.refresh();
865 866
     this.initOrderScope();
866 867
     this.getVisitList();
867 868
     this.getMessageList();

+ 1 - 1
src/app/views/tripartite-company/tripartite-company.component.html

@@ -49,7 +49,7 @@
49 49
             <td>
50 50
               <div class="coop">
51 51
                 <span *ngIf="coopBtns.edit" (click)="edit($event, data)">编辑</span>
52
-                <span *ngIf="coopBtns.del" (click)="showDelModal($event, data,'删除后您配置的相关巡检计划,下次执行时不在生成巡检任务,您确认要删除吗?','删除','del')">删除</span>
52
+                <span *ngIf="coopBtns.del" (click)="showDelModal($event, data,'您确认要删除吗?','删除','del')">删除</span>
53 53
               </div>
54 54
             </td>
55 55
           </tr>

+ 1 - 1
src/app/views/tripartite-company/tripartite-company.component.ts

@@ -123,7 +123,7 @@ export class TripartiteCompanyComponent implements OnInit {
123 123
 			}
124 124
 		}else{
125 125
 			if(this.currentHospital.parent && this.currentHospital.parentDeptId){
126
-				this.scopeValue = this.currentHospital.parent.id
126
+				this.scopeValue = this.currentHospital.parentDeptId
127 127
 			}else{
128 128
 				this.scopeValue = this.currentHospital.id
129 129
 			}

+ 2 - 2
src/app/views/users-management/users-management.component.ts

@@ -267,7 +267,7 @@ export class UsersManagementComponent implements OnInit {
267 267
     let companyData = {
268 268
       company: {
269 269
         busiType: {key: "company_busi_type", value: "2"},
270
-        hosId: hid,
270
+        statisticalHosId: hid,
271 271
       },
272 272
       idx: 0,
273 273
       sum: 20,
@@ -737,7 +737,7 @@ export class UsersManagementComponent implements OnInit {
737 737
       company: {
738 738
         name: keyword,
739 739
         busiType: {key: "company_busi_type", value: "2"},
740
-        hosId,
740
+        statisticalHosId: hosId,
741 741
       },
742 742
       idx: 0,
743 743
       sum: 20,