소스 검색

支助一站式优化

maotao 3 달 전
부모
커밋
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
   scopeTabs:any[] = [];
44
   scopeTabs:any[] = [];
45
   activeScopeTab:any;
45
   activeScopeTab:any;
46
-
46
+	menuList:any;
47
+	
47
   ngOnInit() {
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
 		this.init()
54
 		this.init()
51
     this.getHospitalList();
55
     this.getHospitalList();
52
     this.getHjzxCornetList();
56
     this.getHjzxCornetList();
@@ -54,11 +58,15 @@ export class BindExtensionNumberComponent implements OnInit {
54
   }
58
   }
55
 	
59
 	
56
 	init(){
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
 		if(this.scopeTabs.length>0){
71
 		if(this.scopeTabs.length>0){
64
 			this.activeScopeTab = this.scopeTabs[0]
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
 	activeScopeTab:any;
45
 	activeScopeTab:any;
46
 	//#region 工单范围-运维start
46
 	//#region 工单范围-运维start
47
 	allDuty:number = 1;
47
 	allDuty:number = 1;
48
+	menuList:any;
48
 	
49
 	
49
   ngOnInit() {
50
   ngOnInit() {
51
+		let menuItem = JSON.parse(localStorage.getItem("menuItem"))
52
+		this.menuList = menuItem.find(i=>i.link=='gongdanfanwei')
50
     this.initItsm();
53
     this.initItsm();
51
   }
54
   }
52
 
55
 
@@ -63,12 +66,17 @@ export class OrderScopeComponent implements OnInit {
63
   }
66
   }
64
 
67
 
65
   initItsm(){
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
 		if(this.scopeTabs.length>0){
80
 		if(this.scopeTabs.length>0){
73
 			this.activeScopeTab = this.scopeTabs[0]
81
 			this.activeScopeTab = this.scopeTabs[0]
74
 		}
82
 		}
@@ -302,17 +310,21 @@ export class OrderScopeComponent implements OnInit {
302
     saveOrderScope() {
310
     saveOrderScope() {
303
       // 配送的院区必填
311
       // 配送的院区必填
304
       let value2 = this.scopeTabs.find(v => v.value == 2 );
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
       let value1 = this.scopeTabs.find(v => v.value == 1 );
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
       this.saveLoading = true;
329
       this.saveLoading = true;
318
       let types = [];
330
       let types = [];
@@ -362,20 +374,20 @@ export class OrderScopeComponent implements OnInit {
362
       let postData:any = {
374
       let postData:any = {
363
         workerOrderScope: {
375
         workerOrderScope: {
364
           userId: this.user.user.id,
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
           range: 0,
379
           range: 0,
368
           dutyRange: 0,
380
           dutyRange: 0,
369
         },
381
         },
370
       };
382
       };
371
 
383
 
372
-      if(itsm.checked){
384
+      if(itsm && itsm.checked){
373
         postData.workerOrderScope.allDuty = this.allDuty;
385
         postData.workerOrderScope.allDuty = this.allDuty;
374
         postData.workerOrderScope.dutyIds = this.itsmCheckedHos.filter(v => v.checked).map(v => v.value).toString() || undefined;
386
         postData.workerOrderScope.dutyIds = this.itsmCheckedHos.filter(v => v.checked).map(v => v.value).toString() || undefined;
375
         postData.workerOrderScope.dutyGroupIds = this.itsmCheckedGroup.filter(v => v.checked).map(v => v.value).toString() || undefined;
387
         postData.workerOrderScope.dutyGroupIds = this.itsmCheckedGroup.filter(v => v.checked).map(v => v.value).toString() || undefined;
376
         postData.workerOrderScope.dutyRange = this.itsmOrderScopeRadio - 0;
388
         postData.workerOrderScope.dutyRange = this.itsmOrderScopeRadio - 0;
377
       }
389
       }
378
-      if(hsms.checked){
390
+      if(hsms && hsms.checked){
379
         postData.workerOrderScope.hospitalId = this.checkedHos ? { id: this.checkedHos - 0 } : undefined;
391
         postData.workerOrderScope.hospitalId = this.checkedHos ? { id: this.checkedHos - 0 } : undefined;
380
         postData.workerOrderScope.typeIds = typesId || undefined;
392
         postData.workerOrderScope.typeIds = typesId || undefined;
381
         postData.workerOrderScope.groupIds = groupsId || undefined;
393
         postData.workerOrderScope.groupIds = groupsId || undefined;

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

@@ -114,6 +114,7 @@ export class ToolService {
114
     }
114
     }
115
     let secondMenus = []; // 二级菜单
115
     let secondMenus = []; // 二级菜单
116
     let jurisdiction = []; //当前菜单的权限列表
116
     let jurisdiction = []; //当前菜单的权限列表
117
+		let menuItem = null;
117
     let coopBtns: any = {}; // 初始化权限
118
     let coopBtns: any = {}; // 初始化权限
118
     menu.forEach((e) => {
119
     menu.forEach((e) => {
119
       if (e.childrens) {
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
     jurisdiction.forEach((e) => {
141
     jurisdiction.forEach((e) => {
139
       switch (e.link) {
142
       switch (e.link) {
140
         case "look":
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
       company: {
174
       company: {
175
         name: keyword,
175
         name: keyword,
176
         busiType: {key: "company_busi_type", value: "2"},
176
         busiType: {key: "company_busi_type", value: "2"},
177
-        hosId: this.currentHospital.id,
177
+        statisticalHosId: this.currentHospital.id,
178
       },
178
       },
179
       idx: 0,
179
       idx: 0,
180
       sum: 20,
180
       sum: 20,

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

@@ -203,6 +203,7 @@
203
 							</ng-container>
203
 							</ng-container>
204
               <!-- 运维 蓝色-->
204
               <!-- 运维 蓝色-->
205
               <ng-container *ngIf="data.type === 'mdv2'">
205
               <ng-container *ngIf="data.type === 'mdv2'">
206
+								<div class="top-border" *ngIf="!osComponentRef2.viewPortItems[index-1]"></div>
206
 								<div class="top-border top-border3" *ngIf="osComponentRef2.viewPortItems[index-1] && osComponentRef2.viewPortItems[index-1].type=='hsms'"></div>
207
 								<div class="top-border top-border3" *ngIf="osComponentRef2.viewPortItems[index-1] && osComponentRef2.viewPortItems[index-1].type=='hsms'"></div>
207
 								<div class="top-border" *ngIf="osComponentRef2.viewPortItems[index-1] && osComponentRef2.viewPortItems[index-1].type!='hsms'" [ngClass]="{'top-border3': data.data.overtimePercent > 100}"></div>
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
 								<div class="left-border"></div>
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
   ngOnInit() {
806
   ngOnInit() {
807
     this.websocketLoading = true;
807
     this.websocketLoading = true;
808
     this.coopBtns = this.tool.initCoopBtns(this.route);
808
     this.coopBtns = this.tool.initCoopBtns(this.route);
809
+		// console.log(8989899,this.coopBtns)
809
     //防抖
810
     //防抖
810
     this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
811
     this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
811
       this.searchApplicationDepartment(v[0], v[1]);
812
       this.searchApplicationDepartment(v[0], v[1]);
@@ -861,7 +862,7 @@ export class FuwutaiComponent implements OnInit {
861
     this.initRole();
862
     this.initRole();
862
     this.initLogin();
863
     this.initLogin();
863
     this.retract();
864
     this.retract();
864
-    // this.refresh();
865
+    this.refresh();
865
     this.initOrderScope();
866
     this.initOrderScope();
866
     this.getVisitList();
867
     this.getVisitList();
867
     this.getMessageList();
868
     this.getMessageList();

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

@@ -49,7 +49,7 @@
49
             <td>
49
             <td>
50
               <div class="coop">
50
               <div class="coop">
51
                 <span *ngIf="coopBtns.edit" (click)="edit($event, data)">编辑</span>
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
               </div>
53
               </div>
54
             </td>
54
             </td>
55
           </tr>
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
 		}else{
124
 		}else{
125
 			if(this.currentHospital.parent && this.currentHospital.parentDeptId){
125
 			if(this.currentHospital.parent && this.currentHospital.parentDeptId){
126
-				this.scopeValue = this.currentHospital.parent.id
126
+				this.scopeValue = this.currentHospital.parentDeptId
127
 			}else{
127
 			}else{
128
 				this.scopeValue = this.currentHospital.id
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
     let companyData = {
267
     let companyData = {
268
       company: {
268
       company: {
269
         busiType: {key: "company_busi_type", value: "2"},
269
         busiType: {key: "company_busi_type", value: "2"},
270
-        hosId: hid,
270
+        statisticalHosId: hid,
271
       },
271
       },
272
       idx: 0,
272
       idx: 0,
273
       sum: 20,
273
       sum: 20,
@@ -737,7 +737,7 @@ export class UsersManagementComponent implements OnInit {
737
       company: {
737
       company: {
738
         name: keyword,
738
         name: keyword,
739
         busiType: {key: "company_busi_type", value: "2"},
739
         busiType: {key: "company_busi_type", value: "2"},
740
-        hosId,
740
+        statisticalHosId: hosId,
741
       },
741
       },
742
       idx: 0,
742
       idx: 0,
743
       sum: 20,
743
       sum: 20,