ソースを参照

Merge branch 'master' into develop

seimin 1 ヶ月 前
コミット
03396919f1
共有22 個のファイルを変更した425 個の追加141 個の削除を含む
  1. 9 6
      src/app/components/bind-extension-number/bind-extension-number.component.html
  2. 24 17
      src/app/components/bind-extension-number/bind-extension-number.component.less
  3. 33 9
      src/app/components/bind-extension-number/bind-extension-number.component.ts
  4. 8 5
      src/app/components/order-scope/order-scope.component.html
  5. 26 18
      src/app/components/order-scope/order-scope.component.less
  6. 56 29
      src/app/components/order-scope/order-scope.component.ts
  7. 15 0
      src/app/services/tool.service.ts
  8. 4 1
      src/app/share/order-detail/order-detail.component.html
  9. 8 1
      src/app/share/order-detail/order-detail.component.less
  10. 7 2
      src/app/share/order-detail/order-detail.component.ts
  11. 1 1
      src/app/views/assets-product-management/assets-product-management.component.ts
  12. 45 13
      src/app/views/fuwutai/fuwutai.component.html
  13. 69 5
      src/app/views/fuwutai/fuwutai.component.less
  14. 1 0
      src/app/views/fuwutai/fuwutai.component.ts
  15. 7 6
      src/app/views/hushijiandan/hushijiandan.component.html
  16. 4 0
      src/app/views/new-statistics/maintenance-statistics/synthesize-statistics/synthesize-statistics.component.html
  17. 7 3
      src/app/views/new-statistics/maintenance-statistics/synthesize-statistics/synthesize-statistics.component.less
  18. 24 14
      src/app/views/new-statistics/maintenance-statistics/synthesize-statistics/synthesize-statistics.component.ts
  19. 0 1
      src/app/views/new-statistics/maintenance-statistics/tripartite-company-statistics/tripartite-company-statistics.component.ts
  20. 12 1
      src/app/views/tripartite-company/tripartite-company.component.html
  21. 62 6
      src/app/views/tripartite-company/tripartite-company.component.ts
  22. 3 3
      src/app/views/users-management/users-management.component.ts

+ 9 - 6
src/app/components/bind-extension-number/bind-extension-number.component.html

@@ -6,12 +6,15 @@
6 6
     </div>
7 7
     <div class="content">
8 8
       <div class="scopeTab">
9
-        <div class="scopeTabItem" [ngClass]="{ active: item.value == activeScopeTab.value }" *ngFor="let item of scopeTabs" (click)="activeScopeTab = item">
10
-          <label nz-checkbox [(ngModel)]="item.checked" (ngModelChange)="changeFlag($event, item)">{{item.name}}</label>
11
-        </div>
9
+				<div *ngIf="scopeTabs.length>0" class="scopeBox">
10
+					<div class="scopeTabItem" [ngClass]="{ active: item.value == activeScopeTab.value }" *ngFor="let item of scopeTabs" (click)="activeScopeTab = item">
11
+					  <label nz-checkbox [(ngModel)]="item.checked" (ngModelChange)="changeFlag($event, item)">{{item.name}}</label>
12
+					</div>
13
+				</div>
14
+				<div class="tips" *ngIf="scopeTabs.length == 0">您没有分机绑定或呼叫中心调度权限,请联系管理员!</div>
12 15
       </div>
13 16
       <!-- 分机绑定 -->
14
-      <div class="conditions" *ngIf="activeScopeTab.value == 1">
17
+      <div class="conditions" *ngIf="scopeTabs.length>0 && activeScopeTab.value == 1">
15 18
         <div nz-row class="row">
16 19
           <div nz-col nzSpan="3" class="name">院区:</div>
17 20
           <div nz-col nzSpan="21">
@@ -40,7 +43,7 @@
40 43
         </div>
41 44
       </div>
42 45
       <!-- 呼叫中心 -->
43
-      <div class="conditions" *ngIf="activeScopeTab.value == 2">
46
+      <div class="conditions" *ngIf="scopeTabs.length>0 && activeScopeTab.value == 2">
44 47
         <div nz-row class="row">
45 48
           <div nz-col nzSpan="3" class="name">分机号:</div>
46 49
           <div nz-col nzSpan="21">
@@ -57,7 +60,7 @@
57 60
       </div>
58 61
     </div>
59 62
     <div class="btns display_flex justify-content_flex-center">
60
-      <button class="btn" nz-button nzType="primary" [nzLoading]="websocketLoading" (click)="saveOrderScope()">
63
+      <button *ngIf="scopeTabs.length>0" class="btn" nz-button nzType="primary" [nzLoading]="websocketLoading" (click)="saveOrderScope()">
61 64
         {{activeScopeTab.value == 1 ? '绑定' : '签入'}}
62 65
       </button>
63 66
       <button class="btn cancel" nz-button nzType="default" (click)="cancelInit()">

+ 24 - 17
src/app/components/bind-extension-number/bind-extension-number.component.less

@@ -145,23 +145,30 @@
145 145
         height: auto;
146 146
 
147 147
         .scopeTab{
148
-          display: flex;
149
-          height: 60px;
150
-          border-bottom: 1px solid #D9D9D9;
151
-          .scopeTabItem{
152
-            flex: 1;
153
-            display: flex;
154
-            justify-content: center;
155
-            align-items: center;
156
-            border-right: 1px solid #D9D9D9;
157
-            background-color: #fff;
158
-            cursor: pointer;
159
-            &:last-of-type{
160
-              border-right: none;
161
-            }
162
-            &.active{
163
-              background-color: #F0F6ED;
164
-            }
148
+          .tips{
149
+          	width: 100%;
150
+          	margin: 20px 0;
151
+          	font-weight: 500;
152
+          }
153
+          .scopeBox{
154
+          	display: flex;
155
+          	height: 60px;
156
+          	border-bottom: 1px solid #D9D9D9;
157
+          	.scopeTabItem{
158
+          	  flex: 1;
159
+          	  display: flex;
160
+          	  justify-content: center;
161
+          	  align-items: center;
162
+          	  border-right: 1px solid #D9D9D9;
163
+          	  background-color: #fff;
164
+          	  cursor: pointer;
165
+          	  &:last-of-type{
166
+          	    border-right: none;
167
+          	  }
168
+          	  &.active{
169
+          	    background-color: #F0F6ED;
170
+          	  }
171
+          	}
165 172
           }
166 173
         }
167 174
 

+ 33 - 9
src/app/components/bind-extension-number/bind-extension-number.component.ts

@@ -4,6 +4,7 @@ import { MainService } from 'src/app/services/main.service';
4 4
 import { ToolService } from 'src/app/services/tool.service';
5 5
 import { NzMessageService } from 'ng-zorro-antd';
6 6
 import { WebsocketIncomingService } from 'src/app/services/websocket-incoming.service';
7
+import { Router } from "@angular/router";
7 8
 
8 9
 @Component({
9 10
   selector: 'app-bind-extension-number',
@@ -24,11 +25,13 @@ export class BindExtensionNumberComponent implements OnInit {
24 25
   }
25 26
   @Output() confirmModal = new EventEmitter();
26 27
   @Output() cancelModal = new EventEmitter();
28
+	@Input() coopBtns:any;
27 29
   constructor(
28 30
     private mainService: MainService,
29 31
     private tool: ToolService,
30 32
     private message: NzMessageService,
31 33
     private icomingService: WebsocketIncomingService,
34
+		public router: Router
32 35
   ) { }
33 36
 
34 37
   user = JSON.parse(localStorage.getItem("user")); //用户信息
@@ -38,20 +41,41 @@ export class BindExtensionNumberComponent implements OnInit {
38 41
   hospitalList:any[] = [];
39 42
 
40 43
   // 工单范选项卡
41
-  scopeTabs:any[] = [
42
-    { name: '分机绑定', value: 1, checked: false },
43
-    { name: '呼叫中心', value: 2, checked: false },
44
-  ];
45
-  activeScopeTab = this.scopeTabs[0];
46
-
44
+  scopeTabs:any[] = [];
45
+  activeScopeTab:any;
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);
54
+		this.init()
50 55
     this.getHospitalList();
51 56
     this.getHjzxCornetList();
52 57
     this.getCallCenterConfig();
53 58
   }
54
-
59
+	
60
+	init(){
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
+			}
70
+		}
71
+		if(this.scopeTabs.length>0){
72
+			this.activeScopeTab = this.scopeTabs[0]
73
+		}
74
+		if(this.scopeTabs.length == 1){
75
+			this.scopeTabs[0].checked = true
76
+		}
77
+	}
78
+	
55 79
   // 获取院区列表
56 80
   getHospitalList() {
57 81
     // 工单范围

+ 8 - 5
src/app/components/order-scope/order-scope.component.html

@@ -6,12 +6,15 @@
6 6
     </div>
7 7
     <div class="content">
8 8
       <div class="scopeTab">
9
-        <div class="scopeTabItem" [ngClass]="{ active: item.value == activeScopeTab.value }" *ngFor="let item of scopeTabs" (click)="activeScopeTab = item">
10
-          <label nz-checkbox [(ngModel)]="item.checked" (ngModelChange)="activeScopeTab = item">{{item.name}}</label>
11
-        </div>
9
+				<div *ngIf="scopeTabs.length>0" class="scopeBox">
10
+					<div class="scopeTabItem" [ngClass]="{ active: item.value == activeScopeTab.value }" *ngFor="let item of scopeTabs" (click)="activeScopeTab = item">
11
+					  <label nz-checkbox [(ngModel)]="item.checked" (ngModelChange)="activeScopeTab = item">{{item.name}}</label>
12
+					</div>
13
+				</div>
14
+				<div class="tips" *ngIf="scopeTabs.length == 0">您没有运维或配送陪检调度权限,请联系管理员!</div>
12 15
       </div>
13 16
       <!-- 运维 -->
14
-      <div class="conditions" *ngIf="activeScopeTab.value == 1">
17
+      <div class="conditions" *ngIf="scopeTabs.length>0 && activeScopeTab.value == 1">
15 18
         <div nz-row>
16 19
           <div nz-col nzSpan="4">是否不限制部门:</div>
17 20
           <div nz-col nzSpan="20">
@@ -48,7 +51,7 @@
48 51
         </div>
49 52
       </div>
50 53
       <!-- 配送 -->
51
-      <div class="conditions" *ngIf="activeScopeTab.value == 2">
54
+      <div class="conditions" *ngIf="scopeTabs.length>0 && activeScopeTab.value == 2">
52 55
         <div nz-row>
53 56
           <div nz-col nzSpan="3" class="required">院区:</div>
54 57
           <div nz-col nzSpan="21">

+ 26 - 18
src/app/components/order-scope/order-scope.component.less

@@ -137,24 +137,32 @@
137 137
         height: auto;
138 138
 
139 139
         .scopeTab{
140
-          display: flex;
141
-          height: 60px;
142
-          border-bottom: 1px solid #D9D9D9;
143
-          .scopeTabItem{
144
-            flex: 1;
145
-            display: flex;
146
-            justify-content: center;
147
-            align-items: center;
148
-            border-right: 1px solid #D9D9D9;
149
-            background-color: #fff;
150
-            cursor: pointer;
151
-            &:last-of-type{
152
-              border-right: none;
153
-            }
154
-            &.active{
155
-              background-color: #F0F6ED;
156
-            }
157
-          }
140
+          
141
+					.tips{
142
+						width: 100%;
143
+						margin-top: 20px;
144
+						font-weight: 500;
145
+					}
146
+					.scopeBox{
147
+						display: flex;
148
+						height: 60px;
149
+						border-bottom: 1px solid #D9D9D9;
150
+						.scopeTabItem{
151
+						  flex: 1;
152
+						  display: flex;
153
+						  justify-content: center;
154
+						  align-items: center;
155
+						  border-right: 1px solid #D9D9D9;
156
+						  background-color: #fff;
157
+						  cursor: pointer;
158
+						  &:last-of-type{
159
+						    border-right: none;
160
+						  }
161
+						  &.active{
162
+						    background-color: #F0F6ED;
163
+						  }
164
+						}
165
+					}
158 166
         }
159 167
 
160 168
         .remin {

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

@@ -3,6 +3,7 @@ import { EventEmitter } from '@angular/core';
3 3
 import { MainService } from 'src/app/services/main.service';
4 4
 import { ToolService } from 'src/app/services/tool.service';
5 5
 import { NzMessageService } from 'ng-zorro-antd';
6
+import { Router } from "@angular/router";
6 7
 
7 8
 @Component({
8 9
   selector: 'app-order-scope',
@@ -20,12 +21,15 @@ export class OrderScopeComponent implements OnInit {
20 21
     scopeGroups: [],
21 22
     orderScopeRadio: undefined,
22 23
   }
24
+	@Input() coopBtns:any;
25
+	
23 26
   @Output() confirmModal = new EventEmitter();
24 27
   @Output() cancelModal = new EventEmitter();
25 28
   constructor(
26 29
     private mainService: MainService,
27 30
     private tool: ToolService,
28 31
     private message: NzMessageService,
32
+		public router: Router
29 33
   ) { }
30 34
 
31 35
   user = JSON.parse(localStorage.getItem("user")); //用户信息
@@ -36,16 +40,25 @@ export class OrderScopeComponent implements OnInit {
36 40
   itsmCheckedGroup:any[] = [];//运维-分组
37 41
   itsmOrderScopeRadio:any = '0';//运维-工单范围
38 42
   isAllItsmGroupChecked:boolean = false;//运维-是否全选分组
39
-
43
+	// 工单范选项卡
44
+	scopeTabs:any[] = [];
45
+	activeScopeTab:any;
46
+	//#region 工单范围-运维start
47
+	allDuty:number = 1;
48
+	menuList:any;
49
+	
40 50
   ngOnInit() {
41
-    this.initHsms();
51
+		let menuItem = JSON.parse(localStorage.getItem("menuItem"))
52
+		this.menuList = menuItem.find(i=>i.link=='gongdanfanwei')
42 53
     this.initItsm();
43 54
   }
44 55
 
45 56
   initHsms(){
46 57
     console.log('hsmsData:', this.hsmsData);
47 58
     let index = this.scopeTabs.findIndex(v => v.value === 2);
48
-    this.scopeTabs[index].checked = this.hsmsData.hsmsSwitch;
59
+		if(index!=-1){
60
+			this.scopeTabs[index].checked = this.hsmsData.hsmsSwitch;
61
+		}
49 62
     this.checkedHos = this.hsmsData.checkedHos;
50 63
     this.orderScopeRadio = this.hsmsData.orderScopeRadio;
51 64
     this.initOrderScope();
@@ -53,24 +66,34 @@ export class OrderScopeComponent implements OnInit {
53 66
   }
54 67
 
55 68
   initItsm(){
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
+			}
78
+		}
79
+		
80
+		if(this.scopeTabs.length>0){
81
+			this.activeScopeTab = this.scopeTabs[0]
82
+		}
83
+		this.initHsms();
84
+		this.itsmInitOrderScope();
56 85
     console.log('itsmData', this.itsmData);
57
-    let index = this.scopeTabs.findIndex(v => v.value === 1);
58
-    this.scopeTabs[index].checked = this.itsmData.mdv2Switch;
59
-    this.itsmOrderScopeRadio = this.itsmData.orderScopeRadio;
60
-    this.itsmInitOrderScope();
61
-    this.itsmGetOrderScope();
62 86
   }
63 87
 
64
-    // 工单范选项卡
65
-    scopeTabs:any[] = [
66
-      { name: '运维', value: 1, checked: false },
67
-      { name: '配送', value: 2, checked: false },
68
-    ];
69
-    activeScopeTab = this.scopeTabs[0];
70
-    //#region 工单范围-运维start
71
-    allDuty:number = 1;
72 88
     itsmInitOrderScope(){
73
-
89
+			if(this.scopeTabs.length == 1){
90
+				this.scopeTabs[0].checked = true
91
+			}else if(this.scopeTabs.length == 2){
92
+				let index = this.scopeTabs.findIndex(v => v.value === 1);
93
+				this.scopeTabs[index].checked = this.itsmData.mdv2Switch;
94
+			}
95
+			this.itsmOrderScopeRadio = this.itsmData.orderScopeRadio;
96
+			this.itsmGetOrderScope();
74 97
     }
75 98
     // 工单范围数据
76 99
     itsmGetOrderScope() {
@@ -287,17 +310,21 @@ export class OrderScopeComponent implements OnInit {
287 310
     saveOrderScope() {
288 311
       // 配送的院区必填
289 312
       let value2 = this.scopeTabs.find(v => v.value == 2 );
290
-      if(value2.checked && !this.checkedHos){
291
-        this.message.warning('【配送】的院区必填!')
292
-        return;
293
-      }
313
+			if(value2){
314
+				if(value2.checked && !this.checkedHos){
315
+				  this.message.warning('【配送】的院区必填!')
316
+				  return;
317
+				}
318
+			}
294 319
 
295 320
       // 运维限制部门的时候,部门必填
296 321
       let value1 = this.scopeTabs.find(v => v.value == 1 );
297
-      if(value1.checked && !this.itsmCheckedHos.filter(v => v.checked).length && this.allDuty != 1){
298
-        this.message.warning('【运维】的部门必填!')
299
-        return;
300
-      }
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
+			}
301 328
 
302 329
       this.saveLoading = true;
303 330
       let types = [];
@@ -347,20 +374,20 @@ export class OrderScopeComponent implements OnInit {
347 374
       let postData:any = {
348 375
         workerOrderScope: {
349 376
           userId: this.user.user.id,
350
-          mdv2Switch: Number(itsm.checked),
351
-          hsmsSwitch: Number(hsms.checked),
377
+          mdv2Switch: itsm?Number(itsm.checked):null,
378
+          hsmsSwitch: hsms?Number(hsms.checked):null,
352 379
           range: 0,
353 380
           dutyRange: 0,
354 381
         },
355 382
       };
356 383
 
357
-      if(itsm.checked){
384
+      if(itsm && itsm.checked){
358 385
         postData.workerOrderScope.allDuty = this.allDuty;
359 386
         postData.workerOrderScope.dutyIds = this.itsmCheckedHos.filter(v => v.checked).map(v => v.value).toString() || undefined;
360 387
         postData.workerOrderScope.dutyGroupIds = this.itsmCheckedGroup.filter(v => v.checked).map(v => v.value).toString() || undefined;
361 388
         postData.workerOrderScope.dutyRange = this.itsmOrderScopeRadio - 0;
362 389
       }
363
-      if(hsms.checked){
390
+      if(hsms && hsms.checked){
364 391
         postData.workerOrderScope.hospitalId = this.checkedHos ? { id: this.checkedHos - 0 } : undefined;
365 392
         postData.workerOrderScope.typeIds = typesId || undefined;
366 393
         postData.workerOrderScope.groupIds = groupsId || undefined;

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

@@ -112,6 +112,7 @@ export class ToolService {
112 112
     }
113 113
     let secondMenus = []; // 二级菜单
114 114
     let jurisdiction = []; //当前菜单的权限列表
115
+		let menuItem = null;
115 116
     let coopBtns: any = {}; // 初始化权限
116 117
     menu.forEach((e) => {
117 118
       if (e.childrens) {
@@ -133,6 +134,8 @@ export class ToolService {
133 134
         }
134 135
       })
135 136
     }
137
+		menuItem = jurisdiction
138
+		localStorage.setItem("menuItem", JSON.stringify(menuItem))
136 139
     jurisdiction.forEach((e) => {
137 140
       switch (e.link) {
138 141
         case "look":
@@ -297,6 +300,18 @@ export class ToolService {
297 300
 				case "crossHospital":
298 301
 				  coopBtns.crossHospital = true; //跨部门选组
299 302
 				  break;
303
+				case "maintenance":
304
+				  coopBtns.maintenance = true; //运维
305
+				  break;
306
+				case "distributionPj":
307
+				  coopBtns.distributionPj = true; //配送陪检
308
+				  break;
309
+				case "extension":
310
+				  coopBtns.extension = true; //分机绑定
311
+				  break;
312
+				case "callCenter":
313
+				  coopBtns.callCenter = true; //呼叫中心
314
+				  break;
300 315
       }
301 316
     });
302 317
     console.log(coopBtns);

+ 4 - 1
src/app/share/order-detail/order-detail.component.html

@@ -1225,7 +1225,10 @@
1225 1225
                   >
1226 1226
                     查看图片</button
1227 1227
                   > -->
1228
-									<img *ngIf="item.attachments" (click)="previewImageHandler(item.attachments[0])" width="50" height="50" [src]="imgUrl + item.attachments[0].relativeFilePath" alt="">
1228
+									<div class="img-box" *ngIf="item.attachments && item.attachments.length>0">
1229
+										<img (click)="previewImageHandler(i, index)"
1230
+										width="50" height="50" *ngFor="let i of item.attachments; let index = index;" [src]="imgUrl + i.relativeFilePath" alt="">
1231
+									</div>
1229 1232
 									<span *ngIf="!item.attachments">无</span>
1230 1233
                 </td>
1231 1234
                 <td>

+ 8 - 1
src/app/share/order-detail/order-detail.component.less

@@ -4,6 +4,13 @@ img{
4 4
 	cursor: pointer;
5 5
 }
6 6
 
7
+.img-box{
8
+	display: flex;
9
+	img{
10
+		margin: 0 2px;
11
+	}
12
+}
13
+
7 14
 :host {
8 15
   width: 100%;
9 16
   height: 100%;
@@ -201,7 +208,7 @@ img{
201 208
           min-height: 160px;
202 209
           background: #fff;
203 210
           border-radius: 5px;
204
-
211
+					
205 212
           .thead {
206 213
             background-image: repeating-linear-gradient(
207 214
               to right,

+ 7 - 2
src/app/share/order-detail/order-detail.component.ts

@@ -129,11 +129,16 @@ export class OrderDetailComponent implements OnInit {
129 129
   // 预览图片
130 130
   imgs = [];
131 131
   isPreview = false;
132
-  previewImageHandler(data) {
132
+  previewImageHandler(data,index) {
133
+		// this.imgs = data.map((v) => location.origin + '/file' + v.relativeFilePath)
134
+		// console.log(9999,this.imgs)
135
+		// this.isPreview = true;
133 136
     this.isPreview = false;
134 137
     this.mainService.getPreviewImage(data.bindType,data.bindId).subscribe((result:any)=>{
135 138
       if (result.status == 200) {
136
-        this.imgs = result.data.map((v) => location.origin + '/file' + v.relativeFilePath);
139
+				this.imgs = [location.origin + '/file' + result.data[index].relativeFilePath]
140
+				// console.log(898988,result)
141
+        // this.imgs = result.data.map((v) => location.origin + '/file' + v.relativeFilePath);
137 142
         this.isPreview = true;
138 143
       } else {
139 144
         this.imgs = [];

+ 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,

+ 45 - 13
src/app/views/fuwutai/fuwutai.component.html

@@ -106,9 +106,13 @@
106 106
       <div class="cots_body weifenpai" *ngIf="(txtLabelCol == 1 && flagList.hsmsFlag1 && !flagList.itsmFlag1) || flagList.itsmFlag1" [ngClass]="{ top185: hurseInfoHiding != 1, top185_1: flagList.itsmFlag1 }">
107 107
         <virtual-scroller [items]="unassignedList" #osComponentRef2 [ngStyle]="{ height: '100%' }">
108 108
           <ng-container *ngIf="unassignedList.length && !loading1">
109
-            <div class="list listsTypeColor" *ngFor="let data of osComponentRef2.viewPortItems;trackBy:trackById">
110
-              <!-- 配送 -->
109
+            <div class="list listsTypeColor" *ngFor="let data of osComponentRef2.viewPortItems;trackBy:trackById;let index = index;">
110
+              <!-- 配送 绿色-->
111 111
               <ng-container *ngIf="data.type === 'hsms'">
112
+								<div class="top-border2" *ngIf="index == 0"></div>
113
+								<div class="top-border2 top-border3" *ngIf="index == 1"></div>
114
+								<div class="top-border2" *ngIf="index > 1" [ngClass]="{'top-border3': data.data.timeOut == true}"></div>
115
+								<div class="left-border2"></div>
112 116
                 <div class="left_cots" (click)="openDetails(data.data)">
113 117
                   <!-- 工单 -->
114 118
                   <div class="gongdan" (click)="batchDispatchSelect(!data.checked, data.data.id, $event)">
@@ -194,9 +198,15 @@
194 198
                 </div>
195 199
                 <div *ngIf="data.data.timeOut != true" class="slider sgreen" [ngStyle]="{ width: data.data.percent + '%' }"></div>
196 200
                 <div *ngIf="data.data.timeOut == true" class="slider sred" [ngStyle]="{ width: '100%' }"></div>
197
-              </ng-container>
198
-              <!-- 运维 -->
201
+								<div class="bottom-border2"></div>
202
+								<div class="right-border2"></div>
203
+							</ng-container>
204
+              <!-- 运维 蓝色-->
199 205
               <ng-container *ngIf="data.type === 'mdv2'">
206
+								<div class="top-border" *ngIf="!osComponentRef2.viewPortItems[index-1]"></div>
207
+								<div class="top-border top-border3" *ngIf="osComponentRef2.viewPortItems[index-1] && osComponentRef2.viewPortItems[index-1].type=='hsms'"></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>
209
+								<div class="left-border"></div>
200 210
                 <div class="left_cots" (click)="openItsmDetails(data.data)">
201 211
                   <div class="gongdan">
202 212
                     <span class="left gongdan_name">
@@ -250,7 +260,9 @@
250 260
                 </div>
251 261
                 <div *ngIf="data.data.overtimePercent <= 100" class="slider sgreen" [ngStyle]="{ width: data.data.overtimePercent + '%' }"></div>
252 262
                 <div *ngIf="data.data.overtimePercent > 100" class="slider sred" [ngStyle]="{ width: '100%' }"></div>
253
-              </ng-container>
263
+								<div class="bottom-border"></div>
264
+								<div class="right-border"></div>
265
+							</ng-container>
254 266
             </div>
255 267
           </ng-container>
256 268
           <div class="loading display_flex col-flex justify-content_flex-center align-items_center" *ngIf="loading1">
@@ -290,9 +302,12 @@
290 302
       <div class="cots_body daidaoda" *ngIf="(txtLabelCol == 1 && flagList.hsmsFlag2 && !flagList.itsmFlag2) || flagList.itsmFlag2" [ngClass]="{ top185: hurseInfoHiding != 1, top185_1: flagList.itsmFlag2 }">
291 303
         <virtual-scroller [items]="arriveList" #osComponentRef3 [ngStyle]="{ height: '100%' }">
292 304
           <ng-container *ngIf="arriveList.length && !loading2">
293
-            <div class="list listsTypeColor" *ngFor="let data of osComponentRef3.viewPortItems;trackBy:trackById">
305
+            <div class="list listsTypeColor" *ngFor="let data of osComponentRef3.viewPortItems;trackBy:trackById;let index = index;">
294 306
               <!-- 配送 -->
295 307
               <ng-container *ngIf="data.type === 'hsms'">
308
+								<div class="top-border2" *ngIf="index == 0"></div>
309
+								<div class="top-border2" *ngIf="index > 0" [ngClass]="{'top-border3': data.data.timeOut == true}"></div>
310
+								<div class="left-border2"></div>
296 311
                 <div class="left_cots" (click)="openDetails(data.data)">
297 312
                   <!-- 工单 -->
298 313
                   <div class="gongdan" (click)="batchWithdrawalSelect(!data.checked, data.data.id, $event)">
@@ -376,9 +391,14 @@
376 391
                 </div>
377 392
                 <div *ngIf="data.data.timeOut != true" class="slider sgreen" [ngStyle]="{ width: data.data.percent + '%' }"></div>
378 393
                 <div *ngIf="data.data.timeOut == true" class="slider sred" [ngStyle]="{ width: '100%' }"></div>
379
-              </ng-container>
394
+								<div class="bottom-border2"></div>
395
+								<div class="right-border2"></div>
396
+							</ng-container>
380 397
               <!-- 运维 -->
381 398
               <ng-container *ngIf="data.type === 'mdv2'">
399
+								<div class="top-border" *ngIf="index == 0"></div>
400
+								<div class="top-border" *ngIf="index > 0" [ngClass]="{'top-border3': data.data.overtimePercent > 100}"></div>
401
+								<div class="left-border"></div>
382 402
                 <div class="left_cots" (click)="openItsmDetails(data.data)">
383 403
                   <div class="gongdan">
384 404
                     <span class="left gongdan_name">
@@ -430,7 +450,9 @@
430 450
                 </div>
431 451
                 <div *ngIf="data.data.overtimePercent <= 100" class="slider sgreen" [ngStyle]="{ width: data.data.overtimePercent + '%' }"></div>
432 452
                 <div *ngIf="data.data.overtimePercent > 100" class="slider sred" [ngStyle]="{ width: '100%' }"></div>
433
-              </ng-container>
453
+								<div class="bottom-border"></div>
454
+								<div class="right-border"></div>
455
+							</ng-container>
434 456
             </div>
435 457
           </ng-container>
436 458
           <div class="loading display_flex col-flex justify-content_flex-center align-items_center"  *ngIf="loading2">
@@ -465,9 +487,12 @@
465 487
       <div class="cots_body zhixingzhong" *ngIf="(txtLabelCol == 1 && flagList.hsmsFlag3 && !flagList.itsmFlag3) || flagList.itsmFlag3" [ngClass]="{ top185: hurseInfoHiding != 1, top185_1: flagList.itsmFlag3 }">
466 488
         <virtual-scroller [items]="executionList" #osComponentRef5 [ngStyle]="{ height: '100%' }">
467 489
           <ng-container *ngIf="executionList.length && !loading3">
468
-            <div class="list" *ngFor="let data of osComponentRef5.viewPortItems;trackBy:trackById">
490
+            <div class="list" *ngFor="let data of osComponentRef5.viewPortItems;trackBy:trackById;let index = index;">
469 491
               <!-- 配送 -->
470 492
               <ng-container *ngIf="data.type === 'hsms'">
493
+								<div class="top-border2" *ngIf="index == 0"></div>
494
+								<div class="top-border2" *ngIf="index > 0" [ngClass]="{'top-border3': data.data.timeOut == true}"></div>
495
+								<div class="left-border2"></div>
471 496
                 <div class="left_cots" (click)="openDetails(data.data)">
472 497
                   <!-- 工单 -->
473 498
                   <div class="gongdan">
@@ -550,9 +575,14 @@
550 575
                 </div>
551 576
                 <div *ngIf="data.data.timeOut != true" class="slider sgreen" [ngStyle]="{ width: data.data.percent + '%' }"></div>
552 577
                 <div *ngIf="data.data.timeOut == true" class="slider sred" [ngStyle]="{ width: '100%' }"></div>
553
-              </ng-container>
578
+								<div class="bottom-border2"></div>
579
+								<div class="right-border2"></div>
580
+							</ng-container>
554 581
               <!-- 运维 -->
555 582
               <ng-container *ngIf="data.type === 'mdv2'">
583
+								<div class="top-border" *ngIf="index == 0"></div>
584
+								<div class="top-border" *ngIf="index > 0" [ngClass]="{'top-border3': data.data.overtimePercent > 100}"></div>
585
+								<div class="left-border"></div>
556 586
                 <div class="left_cots" (click)="openItsmDetails(data.data)">
557 587
                   <div class="gongdan">
558 588
                     <span class="left gongdan_name">
@@ -604,7 +634,9 @@
604 634
                 </div>
605 635
                 <div *ngIf="data.data.overtimePercent <= 100" class="slider sgreen" [ngStyle]="{ width: data.data.overtimePercent + '%' }"></div>
606 636
                 <div *ngIf="data.data.overtimePercent > 100" class="slider sred" [ngStyle]="{ width: '100%' }"></div>
607
-              </ng-container>
637
+								<div class="bottom-border"></div>
638
+								<div class="right-border"></div>
639
+							</ng-container>
608 640
             </div>
609 641
           </ng-container>
610 642
           <div class="loading display_flex col-flex justify-content_flex-center align-items_center" *ngIf="loading3">
@@ -1817,9 +1849,9 @@
1817 1849
   ></app-dialog-delete>
1818 1850
 </div>
1819 1851
 <!-- 绑定分机 -->
1820
-<app-bind-extension-number [hsmsData]="hsmsData" [itsmData]="itsmData" [websocketLoading]="websocketLoading" *ngIf="showBindExtensionNumberModal" (confirmModal)="checkIn($event)" (cancelModal)="cancelBindExtensionNumber($event)"></app-bind-extension-number>
1852
+<app-bind-extension-number [hsmsData]="hsmsData" [itsmData]="itsmData" [coopBtns]="coopBtns" [websocketLoading]="websocketLoading" *ngIf="showBindExtensionNumberModal" (confirmModal)="checkIn($event)" (cancelModal)="cancelBindExtensionNumber($event)"></app-bind-extension-number>
1821 1853
 <!-- 工单范围 -->
1822
-<app-order-scope *ngIf="showInitModal" [hsmsData]="hsmsData" [itsmData]="itsmData" (confirmModal)="confirmOrderScope($event)" (cancelModal)="cancelOrderScope($event)"></app-order-scope>
1854
+<app-order-scope *ngIf="showInitModal" [hsmsData]="hsmsData" [itsmData]="itsmData" [coopBtns]="coopBtns" (confirmModal)="confirmOrderScope($event)" (cancelModal)="cancelOrderScope($event)"></app-order-scope>
1823 1855
 <!-- 展示形式 -->
1824 1856
 <app-display-form *ngIf="showDisplayFormModal" (confirmModal)="confirmDisplayForm($event)" (cancelModal)="cancelDisplayForm($event)"></app-display-form>
1825 1857
 <!-- 消息弹框模板 -->

+ 69 - 5
src/app/views/fuwutai/fuwutai.component.less

@@ -593,15 +593,80 @@
593 593
     justify-content: center;
594 594
     align-items: center;
595 595
   }
596
-
596
+	
597
+	.top-border2{
598
+		width: 15px;
599
+		height: 2px;
600
+		background: #49B856;
601
+		position: absolute;
602
+		top: 0;
603
+	}
604
+	.top-border3{
605
+		top: -2px !important;
606
+	}
607
+	.left-border2{
608
+		width: 2px;
609
+		height: 15px;
610
+		background: #49B856;
611
+		position: absolute;
612
+		left: 0;
613
+	}
614
+	.bottom-border2{
615
+		width: 15px;
616
+		height: 2px;
617
+		background: #49B856;
618
+		position: absolute;
619
+		bottom: 0;
620
+		right: 0;
621
+	}
622
+	.right-border2{
623
+		width: 2px;
624
+		height: 15px;
625
+		background: #49B856;
626
+		position: absolute;
627
+		right: 0;
628
+		bottom: 0;
629
+	}
630
+	.top-border{
631
+		width: 15px;
632
+		height: 2px;
633
+		background: #0F70BB;
634
+		position: absolute;
635
+		top: 0;
636
+	}
637
+	.left-border{
638
+		width: 2px;
639
+		height: 15px;
640
+		background: #0F70BB;
641
+		position: absolute;
642
+		left: 0;
643
+	}
644
+	.bottom-border{
645
+		width: 15px;
646
+		height: 2px;
647
+		background: #0F70BB;
648
+		position: absolute;
649
+		bottom: 0;
650
+		right: 0;
651
+	}
652
+	.right-border{
653
+		width: 2px;
654
+		height: 15px;
655
+		background: #0F70BB;
656
+		position: absolute;
657
+		right: 0;
658
+		bottom: 0;
659
+	}
660
+	
597 661
   /* 未分派 */
598 662
   .weifenpai .list {
599 663
     // height: 100px;
600 664
     border-bottom: 1px rgb(225, 229, 232) solid;
601 665
     position: relative;
602
-    overflow: hidden;
666
+    // overflow: hidden;
603 667
     display: flex;
604 668
   }
669
+	
605 670
   // 转出院记录
606 671
   .patientLog .list {
607 672
     height: auto !important;
@@ -815,7 +880,7 @@
815 880
   /* 待到达 */
816 881
   .daidaoda .list {
817 882
     // height: 100px;
818
-    overflow: hidden;
883
+    // overflow: hidden;
819 884
     border-bottom: 1px rgb(225, 229, 232) solid;
820 885
     position: relative;
821 886
     display: flex;
@@ -963,7 +1028,7 @@
963 1028
     border-bottom: 1px rgb(225, 229, 232) solid;
964 1029
     cursor: pointer;
965 1030
     position: relative;
966
-    overflow: hidden;
1031
+    // overflow: hidden;
967 1032
     display: flex;
968 1033
   }
969 1034
 
@@ -1476,7 +1541,6 @@
1476 1541
       height: 56px;
1477 1542
       border-right: 1px solid #e5e9ed;
1478 1543
       padding: 0;
1479
-
1480 1544
       &:nth-child(4n-2) {
1481 1545
         background: #f9fafb;
1482 1546
       }

+ 1 - 0
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]);

+ 7 - 6
src/app/views/hushijiandan/hushijiandan.component.html

@@ -535,7 +535,8 @@
535 535
                         </div>
536 536
                         <overlay-scrollbars #osComponentRef2 class="otherBox-nav__main" [ngStyle]="{ height: '100%' }">
537 537
                           <div class="otherBox-nav__mainInner" *ngIf="!oLoading && othersList[checkedTableType]?.length > 0">
538
-                            <div [sortablejs]="othersList[checkedTableType]" [sortablejsOptions]="othersListOptions" class="w100">
538
+                            <!-- <div [sortablejs]="othersList[checkedTableType]" [sortablejsOptions]="othersListOptions" class="w100"> -->
539
+                            <div class="w100">
539 540
                               <div class="otherBox-nav__mainItem" *ngFor="let item of othersList[checkedTableType]" (click)="otherClick(item)" [ngClass]="{ active: selectOtherId == item.id }" [title]="item.taskName">
540 541
                                 {{ item.taskName }}
541 542
                               </div>
@@ -2387,11 +2388,11 @@
2387 2388
 				<nz-form-item>
2388 2389
 					<nz-form-label [nzSm]="4" [nzXs]="4" nzFor="description">图片上传</nz-form-label>
2389 2390
 					<nz-form-control style="display: inline-block;" *ngIf="repairImgs.length === 0">
2390
-					  <nz-upload nzListType="picture-card" [(nzFileList)]="fileList" 
2391
-						[nzShowUploadList]="showUploadList" [nzPreview]="handlePreview" 
2392
-						nzFileType="image/jpeg,image/png" nzAccept="image/jpeg,image/png" 
2393
-						[nzShowButton]="fileList.length < 3" 
2394
-						[nzBeforeUpload]="beforeUpload" [nzAction]="temporarilyUrl" 
2391
+					  <nz-upload nzListType="picture-card" [(nzFileList)]="fileList"
2392
+						[nzShowUploadList]="showUploadList" [nzPreview]="handlePreview"
2393
+						nzFileType="image/jpeg,image/png" nzAccept="image/jpeg,image/png"
2394
+						[nzShowButton]="fileList.length < 3"
2395
+						[nzBeforeUpload]="beforeUpload" [nzAction]="temporarilyUrl"
2395 2396
 						[nzSize]="10240">
2396 2397
 					    <i nz-icon nzType="plus"></i>
2397 2398
 					    <div class="ant-upload-text">上传照片</div>

+ 4 - 0
src/app/views/new-statistics/maintenance-statistics/synthesize-statistics/synthesize-statistics.component.html

@@ -23,24 +23,28 @@
23 23
 				<div class="sign-describe">待接单: <span class="sign-num">{{workData.gd_todo || 0}}</span></div>
24 24
 				<div class="sign-describe">处理中: <span class="sign-num">{{workData.gd_doing || 0}}</span></div>
25 25
 			</div>
26
+			<div class="border"></div>
26 27
 		</div>
27 28
 		<div class="top-list">
28 29
 			<div class="special-box">
29 30
 				<div class="num">{{workData.sum_price || 0}}</div>
30 31
 				<div class="describe">总费用 (元)</div>
31 32
 			</div>
33
+			<div class="border"></div>
32 34
 		</div>
33 35
 		<div class="top-list">
34 36
 			<div class="special-box">
35 37
 				<div class="num">{{workData.gd_postpone || 0}}</div>
36 38
 				<div class="describe">挂起单数</div>
37 39
 			</div>
40
+			<div class="border"></div>
38 41
 		</div>
39 42
 		<div class="top-list">
40 43
 			<div class="special-box">
41 44
 				<div class="num">{{workData.gd_overtime || 0}}</div>
42 45
 				<div class="describe">超时单数</div>
43 46
 			</div>
47
+			<div class="border"></div>
44 48
 		</div>
45 49
 		<div class="top-list">
46 50
 			<div class="special-box">

+ 7 - 3
src/app/views/new-statistics/maintenance-statistics/synthesize-statistics/synthesize-statistics.component.less

@@ -36,9 +36,13 @@
36 36
 				align-items: center;
37 37
 				justify-content: center;
38 38
 				width: 20%;
39
-				border-right: 1px solid #D9D9D9;
40
-				&:last-child{
41
-					border-right:none;
39
+				position: relative;
40
+				.border{
41
+					width: 1px;
42
+					height: 42px;
43
+					background: #D9D9D9;
44
+					position: absolute;
45
+					right: 0;
42 46
 				}
43 47
 				.special-box{
44 48
 					text-align: center;

+ 24 - 14
src/app/views/new-statistics/maintenance-statistics/synthesize-statistics/synthesize-statistics.component.ts

@@ -116,20 +116,30 @@ export class SynthesizeStatisticsComponent implements OnInit {
116 116
 									show: true,
117 117
 									formatter: '{b}: {c} {d}%'
118 118
 							},
119
-				      // itemStyle: {
120
-				      //   normal: {
121
-				      //     //每根柱子颜色设置
122
-				      //     color: function (params) {
123
-				      //       let colorList = [
124
-				      //         "#33CC85",
125
-				      //         "#72C0DD",
126
-				      //         "#FAC958",
127
-										// 	"#546FC6",
128
-				      //       ];
129
-				      //       return colorList[params.dataIndex];
130
-				      //     },
131
-				      //   },
132
-				      // },
119
+				      itemStyle: {
120
+				        normal: {
121
+				          //每根柱子颜色设置
122
+				          color: function (params) {
123
+				            let colorList = [
124
+				              "#33CC85",
125
+				              "#72C0DD",
126
+				              "#FAC958",
127
+											"#546FC6",
128
+											"#d35b7e",
129
+											"#778ccC",
130
+											"#fad354",
131
+											"#aldee0",
132
+											"#ee84a8",
133
+											"#8475c5",
134
+											"#b0d097",
135
+											"#ffadbb",
136
+											"#fd8c67",
137
+											"#d495e0",
138
+				            ];
139
+				            return colorList[params.dataIndex];
140
+				          },
141
+				        },
142
+				      },
133 143
 				    },
134 144
 				  ],
135 145
 				};

+ 0 - 1
src/app/views/new-statistics/maintenance-statistics/tripartite-company-statistics/tripartite-company-statistics.component.ts

@@ -26,7 +26,6 @@ export class TripartiteCompanyStatisticsComponent implements OnInit, AfterViewIn
26 26
   listLength: number = 0; //表格总数据量
27 27
 
28 28
   repairDeptId;//报修科室id
29
-
30 29
   searchTimerSubject = new Subject();
31 30
 
32 31
   ngOnInit() {

+ 12 - 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>
@@ -75,6 +75,17 @@
75 75
               {{coopData.code}}
76 76
             </nz-form-control>
77 77
           </nz-form-item>
78
+					<nz-form-item>
79
+					  <nz-form-label [nzSpan]="5" nzRequired nzFor="name">使用范围</nz-form-label>
80
+					  <nz-form-control [nzSpan]="19" nzErrorTip="请输入使用范围!">
81
+					    <nz-radio-group formControlName="employScope">
82
+					    	<label nz-radio [nzValue]="i.id" *ngFor="let i of scopeList" [nzDisabled]="i.disabled">{{i.name}}</label>
83
+					    	<!-- <label nz-radio nzValue="1">院区内使用</label> -->
84
+					    	<!-- <label nz-radio nzValue="2" *ngIf="currentHospital.parentDeptId">部门内使用</label> -->
85
+					    	<!-- <label nz-radio nzValue="3" *ngIf="currentHospital.parent || currentHospital.parentDeptId">垂直部门使用</label> -->
86
+					    </nz-radio-group>
87
+					  </nz-form-control>
88
+					</nz-form-item>
78 89
           <nz-form-item>
79 90
             <nz-form-label [nzSpan]="5" nzRequired nzFor="name">公司全称</nz-form-label>
80 91
             <nz-form-control [nzSpan]="19" nzErrorTip="请输入公司全称!">

+ 62 - 6
src/app/views/tripartite-company/tripartite-company.component.ts

@@ -71,7 +71,7 @@ export class TripartiteCompanyComponent implements OnInit {
71 71
       idx: this.pageIndex - 1,
72 72
       sum: this.pageSize,
73 73
       company: {
74
-        hosId: this.currentHospital.id,
74
+        statisticalHosId: this.currentHospital.id,
75 75
         busiType: { key: 'company_busi_type', value: '2' },
76 76
         ...this.searchDto,
77 77
       },
@@ -102,10 +102,39 @@ export class TripartiteCompanyComponent implements OnInit {
102 102
     this.modal = false;
103 103
     this.initForm();
104 104
   }
105
-
105
+	
106
+	// 使用范围选择
107
+	scopeValue:any;
108
+	// 格式化使用范围
109
+	setScopeRadio(){
110
+		let value = this.validateForm.value.employScope
111
+		let list = this.scopeList.find(i=>i.id == value)
112
+		if(list.value=='-1'){
113
+			this.scopeValue = ''
114
+		}else if(list.value=='1'){
115
+			if(this.currentHospital.parent){
116
+				this.scopeValue = this.currentHospital.parent.id
117
+			}else{
118
+				this.scopeValue = this.currentHospital.id
119
+			}
120
+		}else if(list.value=='2'){
121
+			if(this.currentHospital.parent && this.currentHospital.parentDeptId){
122
+				this.scopeValue = this.currentHospital.id
123
+			}
124
+		}else{
125
+			if(this.currentHospital.parent && this.currentHospital.parentDeptId){
126
+				this.scopeValue = this.currentHospital.parentDeptId
127
+			}else{
128
+				this.scopeValue = this.currentHospital.id
129
+			}
130
+		}
131
+		console.log(111,this.scopeValue)
132
+	}
133
+	
106 134
   // 初始化新增form表单
107 135
   initForm() {
108 136
     this.validateForm = this.fb.group({
137
+			employScope: ['', [Validators.required]],
109 138
       name: ['', [Validators.required, Validators.pattern(/\S/)]],
110 139
       nickName: ['', [Validators.required]],
111 140
       companyTypeIds: [this.companyTypeList.map(v => ({ label: v.name, value: v.id, checked: false })), [Validators.required]],
@@ -117,12 +146,32 @@ export class TripartiteCompanyComponent implements OnInit {
117 146
   //获取公司分类
118 147
   isLoading:boolean = false;
119 148
   companyTypeList:any[] = [];
149
+	scopeList:any[] = [];
120 150
   getCompanyType() {
121 151
     this.isLoading = true;
122 152
     this.mainService.getDictionary("list", "company_type").subscribe((data) => {
123
-      this.isLoading = false;
124 153
       this.companyTypeList = data || [];
125 154
     });
155
+		this.mainService.getDictionary("list", "select_range").subscribe((data) => {
156
+		  this.isLoading = false;
157
+			for(let i of data){
158
+				i.disabled = false
159
+			}
160
+			for(let i of data){
161
+				if((this.currentHospital || this.currentHospital.parent) && !this.currentHospital.parentDeptId){
162
+					if(i.value=='2'){
163
+						i.disabled = true
164
+					}
165
+				}
166
+				if (!this.currentHospital.parent && !this.currentHospital.parentDeptId){
167
+					if(i.value=='3'){
168
+						i.disabled = true
169
+					}
170
+				}
171
+			}
172
+		  this.scopeList = data;
173
+			console.log(9999,this.scopeList)
174
+		});
126 175
   }
127 176
 
128 177
   // 新增/编辑表单提交
@@ -134,7 +183,7 @@ export class TripartiteCompanyComponent implements OnInit {
134 183
     if (this.validateForm.invalid) {
135 184
       return;
136 185
     }
137
-
186
+		this.setScopeRadio()
138 187
     console.log(this.validateForm.value)
139 188
     let companyList = this.validateForm.value.companyTypeIds.filter(v => v.checked);
140 189
     if(!companyList.length){
@@ -149,7 +198,10 @@ export class TripartiteCompanyComponent implements OnInit {
149 198
       //增加
150 199
       postData = {
151 200
         company: {
152
-          hosId: this.currentHospital.id,
201
+          hosId: this.scopeValue,
202
+					selectRange:{
203
+						id:this.validateForm.value.employScope
204
+					},
153 205
           name: this.validateForm.value.name,
154 206
           nickName: this.validateForm.value.nickName,
155 207
           companyTypeIds: companyList.map(v => v.value).toString(),
@@ -164,7 +216,10 @@ export class TripartiteCompanyComponent implements OnInit {
164 216
         company:{
165 217
           ...this.coopData,
166 218
           ...{
167
-            hosId: this.currentHospital.id,
219
+            hosId: this.scopeValue,
220
+						selectRange:{
221
+							id:this.validateForm.value.employScope
222
+						},
168 223
             name: this.validateForm.value.name,
169 224
             nickName: this.validateForm.value.nickName,
170 225
             companyTypeIds: this.validateForm.value.companyTypeIds.filter(v => v.checked).map(v => v.value).toString(),
@@ -204,6 +259,7 @@ export class TripartiteCompanyComponent implements OnInit {
204 259
     this.add = false;
205 260
     this.modal = true;
206 261
     this.coopData = data;
262
+		this.validateForm.controls.employScope.setValue(data.selectRange.id);
207 263
     this.validateForm.controls.name.setValue(data.name);
208 264
     this.validateForm.controls.nickName.setValue(data.nickName);
209 265
     this.validateForm.controls.companyTypeIds.setValue(this.companyTypeList.map(v => ({label: v.name, value: v.id, checked: data.companyTypeIds.includes(v.id)})));

+ 3 - 3
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,
@@ -486,7 +486,7 @@ export class UsersManagementComponent implements OnInit {
486 486
     let companyData = {
487 487
       company: {
488 488
         busiType: {key: "company_busi_type", value: "2"},
489
-        hosId: hid,
489
+        statisticalHosId: hid,
490 490
       },
491 491
       idx: 0,
492 492
       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,