maotao 2 місяців тому
батько
коміт
7c7870bb0e
56 змінених файлів з 4741 додано та 1269 видалено
  1. 5 0
      src/app/components/configurationCenter/configuration-sys/configuration-sys.component.html
  2. 21 4
      src/app/components/configurationCenter/configuration-sys/configuration-sys.component.ts
  3. 9 0
      src/app/components/order-scope/order-scope.component.html
  4. 5 1
      src/app/components/order-scope/order-scope.component.ts
  5. 18 1
      src/app/services/main.service.ts
  6. 12 0
      src/app/services/tool.service.ts
  7. 2 1
      src/app/share/businessData-detail-modal/businessData-detail-modal.component.ts
  8. 1 0
      src/app/share/detail-ordinary/detail-ordinary.component.html
  9. 2 0
      src/app/share/detail-ordinary/detail-ordinary.component.ts
  10. 3 0
      src/app/share/share.module.ts
  11. 36 0
      src/app/share/upload-file/upload-file.component.html
  12. 76 0
      src/app/share/upload-file/upload-file.component.less
  13. 39 0
      src/app/share/upload-file/upload-file.component.ts
  14. 50 77
      src/app/views/common-document/common-document.component.html
  15. 34 3
      src/app/views/common-document/common-document.component.less
  16. 230 422
      src/app/views/common-document/common-document.component.ts
  17. 73 3
      src/app/views/fuwutai/fuwutai.component.html
  18. 55 0
      src/app/views/fuwutai/fuwutai.component.less
  19. 242 32
      src/app/views/fuwutai/fuwutai.component.ts
  20. 15 0
      src/app/views/government-duty/government-duty-routing.module.ts
  21. 247 0
      src/app/views/government-duty/government-duty.component.html
  22. 178 0
      src/app/views/government-duty/government-duty.component.less
  23. 452 0
      src/app/views/government-duty/government-duty.component.ts
  24. 19 0
      src/app/views/government-duty/government-duty.module.ts
  25. 1 1
      src/app/views/home/home.component.ts
  26. 22 1
      src/app/views/main/main-routing.module.ts
  27. 8 2
      src/app/views/main/main.component.html
  28. 2 1
      src/app/views/main/main.component.ts
  29. 15 0
      src/app/views/monthly-task/monthly-task-routing.module.ts
  30. 261 0
      src/app/views/monthly-task/monthly-task.component.html
  31. 180 0
      src/app/views/monthly-task/monthly-task.component.less
  32. 436 0
      src/app/views/monthly-task/monthly-task.component.ts
  33. 19 0
      src/app/views/monthly-task/monthly-task.module.ts
  34. 148 241
      src/app/views/personage-document/personage-document.component.html
  35. 80 6
      src/app/views/personage-document/personage-document.component.less
  36. 353 416
      src/app/views/personage-document/personage-document.component.ts
  37. 1 1
      src/app/views/specimen-search/specimen-search.component.html
  38. 8 19
      src/app/views/specimen-search/specimen-search.component.ts
  39. 15 0
      src/app/views/task-inventory/task-inventory-routing.module.ts
  40. 143 0
      src/app/views/task-inventory/task-inventory.component.html
  41. 191 0
      src/app/views/task-inventory/task-inventory.component.less
  42. 146 0
      src/app/views/task-inventory/task-inventory.component.ts
  43. 19 0
      src/app/views/task-inventory/task-inventory.module.ts
  44. 15 0
      src/app/views/task-list/task-list-routing.module.ts
  45. 227 0
      src/app/views/task-list/task-list.component.html
  46. 185 0
      src/app/views/task-list/task-list.component.less
  47. 386 0
      src/app/views/task-list/task-list.component.ts
  48. 19 0
      src/app/views/task-list/task-list.module.ts
  49. 1 1
      src/app/views/users-management/users-management.component.html
  50. 21 21
      src/assets/iconfont/demo_index.html
  51. 7 7
      src/assets/iconfont/iconfont.css
  52. 1 1
      src/assets/iconfont/iconfont.js
  53. 7 7
      src/assets/iconfont/iconfont.json
  54. BIN
      src/assets/iconfont/iconfont.ttf
  55. BIN
      src/assets/iconfont/iconfont.woff
  56. BIN
      src/assets/iconfont/iconfont.woff2

+ 5 - 0
src/app/components/configurationCenter/configuration-sys/configuration-sys.component.html

@@ -29,6 +29,11 @@
29 29
 							<label nz-radio [nzValue]="0">否</label>
30 30
 						</nz-radio-group>
31 31
 					</div>
32
+					
33
+					<div class="mar-10">
34
+						<nz-form-label class="label">调度政务值班</nz-form-label>
35
+						<nz-checkbox-group [(ngModel)]="government"></nz-checkbox-group>
36
+					</div>
32 37
 		    </div>
33 38
 		  	<div class="contentBtns">
34 39
 		  	  <button nz-button nzType="primary" [nzLoading]="btnLoading" (click)="submitMessageForm()">确定</button>

+ 21 - 4
src/app/components/configurationCenter/configuration-sys/configuration-sys.component.ts

@@ -26,6 +26,9 @@ export class ConfigurationSysComponent implements OnInit {
26 26
 		{ label: '科内报修', value: 'deptRepair', checked:false},
27 27
 		{ label: '公共报修', value: 'publicRepair', checked:false },
28 28
 	];
29
+	government:any = [
30
+    {label:'是否开启',value: 0}
31
+  ];
29 32
 	
30 33
 	// 申请人是否必填
31 34
 	applicantMustFillIn:any= 0;
@@ -45,7 +48,8 @@ export class ConfigurationSysComponent implements OnInit {
45 48
 				item.keyconfig === "deptRepair" ||
46 49
 				item.keyconfig === "publicRepair" ||
47 50
 				item.keyconfig === "hospitalModel" ||
48
-				item.keyconfig === "applicantMustFillIn"
51
+				item.keyconfig === "applicantMustFillIn"||
52
+				item.keyconfig === "governmentDuty"
49 53
 		)
50 54
 		filterData.forEach((item) => {
51 55
 		 if (item.keyconfig === "deptRepair") {
@@ -68,6 +72,14 @@ export class ConfigurationSysComponent implements OnInit {
68 72
 		    item.valueconfig = this.hospitalModel;
69 73
 		  }else if (item.keyconfig === "applicantMustFillIn") {
70 74
 		    item.valueconfig = this.applicantMustFillIn;
75
+		  }else if (item.keyconfig === "governmentDuty") {
76
+				let value = null
77
+				if(this.government[0].checked){
78
+					value = '1'
79
+				}else{
80
+					value = '0'
81
+				}
82
+				item.valueconfig = value;
71 83
 		  }
72 84
 		});
73 85
 		const postData = filterData;
@@ -121,13 +133,18 @@ export class ConfigurationSysComponent implements OnInit {
121 133
 								}
122 134
 								break;
123 135
 							case "hospitalModel":
124
-							console.log(111,c)
125 136
 								this.hospitalModel =  Number(c[1])
126 137
 								break;	
127 138
 							case "applicantMustFillIn":
128
-							console.log(222,c)
129 139
 								this.applicantMustFillIn =  Number(c[1])
130
-								break;	
140
+								break;
141
+							case "governmentDuty":
142
+								if(c[1]=='1'){
143
+									this.government[0].checked = true
144
+								}else{
145
+									this.government[0].checked = false
146
+								}
147
+								break;
131 148
 						}
132 149
 					});
133 150
 				} else {

+ 9 - 0
src/app/components/order-scope/order-scope.component.html

@@ -58,6 +58,15 @@
58 58
 				    </nz-radio-group>
59 59
 				  </div>
60 60
 				</div>
61
+				<div nz-row *ngIf="showGovDutyConfig==1">
62
+				  <div nz-col nzSpan="5">是否开通政务值班:</div>
63
+				  <div nz-col nzSpan="19">
64
+				    <nz-radio-group class="w100" [(ngModel)]="showGovDuty" [nzDisabled]="!activeScopeTab.checked">
65
+				      <label nz-radio [nzValue]="1">是</label>
66
+				      <label nz-radio [nzValue]="0">否</label>
67
+				    </nz-radio-group>
68
+				  </div>
69
+				</div>
61 70
       </div>
62 71
       <!-- 配送 -->
63 72
       <div class="conditions" *ngIf="scopeTabs.length>0 && activeScopeTab.value == 2">

+ 5 - 1
src/app/components/order-scope/order-scope.component.ts

@@ -22,7 +22,7 @@ export class OrderScopeComponent implements OnInit {
22 22
     orderScopeRadio: undefined,
23 23
   }
24 24
 	@Input() coopBtns:any;
25
-
25
+	@Input() showGovDutyConfig:any;
26 26
   @Output() confirmModal = new EventEmitter();
27 27
   @Output() cancelModal = new EventEmitter();
28 28
   constructor(
@@ -47,6 +47,7 @@ export class OrderScopeComponent implements OnInit {
47 47
 	//#region 工单范围-运维start
48 48
 	allDuty:number = 1;
49 49
 	showReassign:any = 0;
50
+	showGovDuty:any = 0;
50 51
 	menuList:any;
51 52
 
52 53
   ngOnInit() {
@@ -101,9 +102,11 @@ export class OrderScopeComponent implements OnInit {
101 102
     }
102 103
     // 工单范围数据
103 104
     itsmGetOrderScope() {
105
+			console.log(444,this.itsmData)
104 106
       // 是否不限制部门
105 107
       this.allDuty = this.itsmData.allDuty === undefined ? 1 : this.itsmData.allDuty;
106 108
       this.showReassign = this.itsmData.showReassign || 0;
109
+			this.showGovDuty = this.itsmData.showGovDuty || 0;
107 110
 			// 权限内的院区和组
108 111
       let hosList = this.user.infoPermission.dutyList || [];
109 112
       let groups = this.user.infoPermission.dutyGroupList || [];
@@ -389,6 +392,7 @@ export class OrderScopeComponent implements OnInit {
389 392
       if(itsm && itsm.checked){
390 393
         postData.workerOrderScope.allDuty = this.allDuty;
391 394
 				postData.workerOrderScope.showReassign = this.showReassign;
395
+				postData.workerOrderScope.showGovDuty = this.showGovDuty;
392 396
         postData.workerOrderScope.dutyIds = this.itsmCheckedHos.filter(v => v.checked).map(v => v.value).toString() || undefined;
393 397
         postData.workerOrderScope.dutyGroupIds = this.itsmCheckedGroup.filter(v => v.checked).map(v => v.value).toString() || undefined;
394 398
         postData.workerOrderScope.dutyRange = this.itsmOrderScopeRadio - 0;

+ 18 - 1
src/app/services/main.service.ts

@@ -1217,5 +1217,22 @@ export class MainService {
1217 1217
 		  headers: this.headers,
1218 1218
 		});
1219 1219
 	}
1220
-
1220
+	
1221
+	// 文档管理上传
1222
+	documentImport(folderId, personal): string {
1223
+	  return `${host.host}/document/importFile/${folderId}/${personal}`;
1224
+	}
1225
+	
1226
+	// 文档管理更新
1227
+	documentUpdateFile(fileId): string {
1228
+	  return `${host.host}/document/updateFile/${fileId}`;
1229
+	}
1230
+	
1231
+	// 文档管理导出
1232
+	documentExport(fileToken): any {
1233
+	  return this.http.post(host.host + `/document/downloadFile/${fileToken}`,{}, {
1234
+	    headers: this.exportHeader,
1235
+	    responseType: "arraybuffer",
1236
+	  });
1237
+	}
1221 1238
 }

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

@@ -324,6 +324,18 @@ export class ToolService {
324 324
 				case "download":
325 325
 				  coopBtns.download = true; //下载
326 326
 				  break;
327
+				case "allocation":
328
+				  coopBtns.allocation = true; //分配任务
329
+				  break;
330
+				case "accomplish":
331
+				  coopBtns.accomplish = true; //任务完成
332
+				  break;
333
+				case "startTask":
334
+				  coopBtns.startTask = true; //开始任务
335
+				  break;
336
+				case "record":
337
+				  coopBtns.record = true; //任务记录
338
+				  break;
327 339
       }
328 340
     });
329 341
     console.log(coopBtns);

+ 2 - 1
src/app/share/businessData-detail-modal/businessData-detail-modal.component.ts

@@ -26,6 +26,7 @@ export class BusinessDataDetailModalComponent implements OnInit {
26 26
   }
27 27
   @Input() show: Boolean;
28 28
   @Input() orderId: String;
29
+	@Input() orderHosId: String;
29 30
   @Input() type: String = '';
30 31
   @Input() dataInfo: any;
31 32
 	@Input() taskTypeValue: String;
@@ -317,7 +318,7 @@ export class BusinessDataDetailModalComponent implements OnInit {
317 318
       taskTypeConfig: {
318 319
         taskTypeDTO: {
319 320
           hosId: {
320
-            id: this.hosId
321
+            id: this.orderHosId
321 322
           },
322 323
           ordinaryField: {
323 324
             key: 'ordinary_field',

+ 1 - 0
src/app/share/detail-ordinary/detail-ordinary.component.html

@@ -186,6 +186,7 @@
186 186
   [show]="bloodModalShow"
187 187
   [type]="businessDataModalType"
188 188
   [orderId]="orderId"
189
+	[orderHosId]="orderHosId"
189 190
   (closeModelHs)="closeModelBlood($event)"
190 191
 ></app-businessData-detail-modal>
191 192
 

+ 2 - 0
src/app/share/detail-ordinary/detail-ordinary.component.ts

@@ -75,8 +75,10 @@ export class DetailOrdinaryComponent implements OnInit {
75 75
   bloodModalShow = false; //业务数据弹窗开关
76 76
   orderId = ""; //查看业务数据携带
77 77
   businessDataModalType = ''; //业务数据类型
78
+	orderHosId:any; //创建工单院区id
78 79
   viewDetail(data, type) {
79 80
     this.orderId = data.id;
81
+		this.orderHosId = data.hosId;
80 82
     this.businessDataModalType = type;
81 83
     this.bloodModalShow = true;
82 84
   }

+ 3 - 0
src/app/share/share.module.ts

@@ -66,6 +66,7 @@ import { PackageSpecimenRuleComponent } from './package-specimen-rule/package-sp
66 66
 import { SpecimenPackageListModalComponent } from './specimen-package-list-modal/specimen-package-list-modal.component';
67 67
 import { NgxPrintModule } from 'ngx-print';
68 68
 import { SpecimenPackageLogPromptModalComponent } from './specimen-package-log-prompt-modal/specimen-package-log-prompt-modal.component';
69
+import { UploadFileComponent } from './upload-file/upload-file.component';
69 70
 
70 71
 @NgModule({
71 72
   declarations: [
@@ -134,6 +135,7 @@ import { SpecimenPackageLogPromptModalComponent } from './specimen-package-log-p
134 135
     PackageSpecimenRuleComponent,
135 136
     SpecimenPackageListModalComponent,
136 137
     SpecimenPackageLogPromptModalComponent,
138
+		UploadFileComponent
137 139
   ],
138 140
   imports: [
139 141
     CommonModule,
@@ -211,6 +213,7 @@ import { SpecimenPackageLogPromptModalComponent } from './specimen-package-log-p
211 213
     PackageSpecimenRuleComponent,
212 214
     SpecimenPackageListModalComponent,
213 215
     SpecimenPackageLogPromptModalComponent,
216
+		UploadFileComponent
214 217
   ]
215 218
 })
216 219
 export class ShareModule { }

+ 36 - 0
src/app/share/upload-file/upload-file.component.html

@@ -0,0 +1,36 @@
1
+<div
2
+  class="save add display_flex align-items_center justify-content_flex-center excelUpload"
3
+  *ngIf="isShow"
4
+>
5
+  <div class="modalBody">
6
+    <div class="title"> 选择导入的文件<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
7
+    </div>
8
+    <div class="content">
9
+      <div>
10
+        <nz-upload [(nzFileList)]="fileList" [nzBeforeUpload]="beforeUpload" nzType="drag">
11
+          <p class="ant-upload-drag-icon">
12
+            <i nz-icon nzType="inbox"></i>
13
+          </p>
14
+          <p class="ant-upload-text">单击或将文件拖到此区域以上传</p>
15
+        </nz-upload>
16
+      </div>
17
+    </div>
18
+    <div class="display_flex justify-content_flex-center">
19
+      <button
20
+        nzType="primary"
21
+        nz-button
22
+        (click)="submitForm()"
23
+      >
24
+        确认导入
25
+      </button>
26
+      <button
27
+        class="btn cancel"
28
+        nz-button
29
+        nzType="default"
30
+        (click)="hideModal()"
31
+      >
32
+        取消
33
+      </button>
34
+    </div>
35
+  </div>
36
+</div>

+ 76 - 0
src/app/share/upload-file/upload-file.component.less

@@ -0,0 +1,76 @@
1
+.save {
2
+  position: fixed;
3
+  left: 0;
4
+  top: 0;
5
+  width: 100%;
6
+  height: 100%;
7
+  background: rgba(0, 0, 0, 0.4);
8
+  z-index: 999;
9
+  &.excelUpload ::ng-deep .ant-upload-list-item .anticon-close{
10
+    opacity: 1!important;
11
+    transition: all 0.2s;
12
+  }
13
+  .modalBody {
14
+    width: 350px;
15
+    background: #fff;
16
+    border-radius: 5px;
17
+    padding: 10px 20px;
18
+    color: #333;
19
+
20
+    .title {
21
+      width: 100%;
22
+      text-align: center;
23
+      font-size: 18px;
24
+      position: relative;
25
+
26
+      i {
27
+        position: absolute;
28
+        right: 0;
29
+        top: 0;
30
+        font-size: 20px;
31
+        color: #666;
32
+        cursor: pointer;
33
+        padding: 0 5px;
34
+      }
35
+    }
36
+
37
+    .content {
38
+      width: 100%;
39
+      height: 117px;
40
+      background: #f9fafb;
41
+      border: 1px solid #e5e9ed;
42
+      border-radius: 5px;
43
+      overflow: hidden;
44
+      margin-top: 12px;
45
+    }
46
+
47
+    button {
48
+      margin-top: 10px;
49
+
50
+      &.btn {
51
+        margin-left: 8px;
52
+      }
53
+    }
54
+  }
55
+
56
+  // 新增
57
+  &.add {
58
+    .modalBody {
59
+      width: 480px;
60
+      height: auto;
61
+
62
+      .content {
63
+        width: 100%;
64
+        padding: 14px;
65
+        height: 200px;
66
+        .isNumOrIntegral {
67
+          margin: 24px 0;
68
+        }
69
+      }
70
+
71
+      button:nth-child(1) {
72
+        margin-right: 20px;
73
+      }
74
+    }
75
+  }
76
+}

+ 39 - 0
src/app/share/upload-file/upload-file.component.ts

@@ -0,0 +1,39 @@
1
+import { Component, OnInit, Output, Input } from "@angular/core";
2
+import { EventEmitter } from "@angular/core";
3
+import { UploadFile, NzMessageService} from 'ng-zorro-antd';
4
+
5
+
6
+@Component({
7
+  selector: "app-upload-file",
8
+  templateUrl: "./upload-file.component.html",
9
+  styleUrls: ["./upload-file.component.less"],
10
+})
11
+export class UploadFileComponent implements OnInit {
12
+  @Output() submitFormHand = new EventEmitter();
13
+  @Output() hideFormHand = new EventEmitter();
14
+  @Input() isShow: boolean = false; //模态框
15
+  fileList: UploadFile[] = [];
16
+
17
+  constructor(private message: NzMessageService) {}
18
+
19
+  beforeUpload = (file: UploadFile): boolean => {
20
+    if(this.fileList.length === 0){
21
+      this.fileList = this.fileList.concat(file);
22
+    }
23
+    return false;
24
+  };
25
+
26
+  ngOnInit() {}
27
+  // 隐藏模态框
28
+  hideModal() {
29
+    this.hideFormHand.emit();
30
+  }
31
+  // 表单提交
32
+  submitForm(): void {
33
+    if(this.fileList.length === 0){
34
+      this.message.warning('请选择一个文件');
35
+      return;
36
+    }
37
+    this.submitFormHand.emit({fileList: this.fileList});
38
+  }
39
+}

+ 50 - 77
src/app/views/common-document/common-document.component.html

@@ -12,36 +12,21 @@
12 12
 			<div class="tree-content">
13 13
 				<nz-tree [nzData]="nodes" 
14 14
 				(nzClick)="nodeClick($event)"
15
-				(nzDblClick)="openFolder($event)"
16
-				[nzExpandedIcon]="mutiExpandedIconTpl"
17
-				[nzTreeTemplate]="nzTreeTemplate"
15
+				[nzExpandedKeys]="defaultExpandedKeys"
18 16
 				[nzTreeTemplate]="nzTreeTemplate"
19 17
 				>
20
-<!-- 					<ng-template #mutiExpandedIconTpl let-node>
21
-						<i
22
-							*ngIf="!node.origin.isLeaf"
23
-							nz-icon
24
-							[nzType]="node.isExpanded ? 'folder-open' : 'folder'"
25
-							class="ant-tree-switcher-line-icon"
26
-						></i>
27
-						<i *ngIf="node.origin.isLeaf" nz-icon nzType="file" class="ant-tree-switcher-line-icon"></i>
28
-					</ng-template>
29
-					<ng-template #nzTreeTemplate let-node>
30
-						<div>{{node.folderName}}</div>
31
-					</ng-template> -->
32
-					<ng-template #nzTreeTemplate let-node>
33
-						<span class="custom-node" [class.active]="treeItem?.id === node.origin.id">
34
-							<span *ngIf="node.origin.children">
35
-								<i nz-icon [nzType]="node.origin.isExpanded ? 'folder-open' : 'folder'" (click)="openFolder(node)"></i>
36
-								<span class="folder-name">{{ node.origin.folderName }}</span>
18
+				</nz-tree>
19
+				<ng-template #nzTreeTemplate let-node>
20
+					 <span class="custom-node" [ngClass]="treeItem?.id === node.origin.id?'activeClass':''">
21
+							<span *ngIf="!node.isLeaf">
22
+								<i nz-icon [nzType]="node.isExpanded ? 'minus-square' : 'plus-square'" (click)="openFolder(node)"></i>
23
+								<span class="folder-name">{{ node.title }}</span>
37 24
 							</span>
38
-							<span *ngIf="!node.origin.children">
39
-								<i nz-icon nzType="file"></i>
40
-								<span class="file-name">{{ node.folderName }}</span>
25
+							<span *ngIf="node.isLeaf">
26
+								<span class="file-name">{{ node.title }}</span>
41 27
 							</span>
42 28
 						</span>
43
-					</ng-template>
44
-				</nz-tree>
29
+				</ng-template>
45 30
 			</div>
46 31
 		</div>
47 32
 		<div class="list-right">
@@ -49,24 +34,13 @@
49 34
 			  <div class="list-template__searchBox">
50 35
 					<div class="list-template__searchItem">
51 36
 					  <span class="label">文档名称:</span>
52
-					  <input nz-input class="formItem" [(ngModel)]="batchNumber" placeholder="请输入文档名称" nzSize="default" />
37
+					  <input nz-input class="formItem" [(ngModel)]="fileName" placeholder="请输入文档名称" nzSize="default" />
53 38
 					</div>
54
-			    <div class="list-template__searchItem">
55
-			      <span class="label">文档格式:</span>
56
-			      <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" (nzOnSearch)="changeInp($event)" nzServerSearch nzShowSearch nzAllowClear nzPlaceHolder="请选择文档格式" [(ngModel)]="department">
57
-			        <ng-container *ngFor="let option of hospitals1">
58
-			          <nz-option *ngIf="!isDeptLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
59
-			        </ng-container>
60
-			        <nz-option *ngIf="isDeptLoading" nzDisabled nzCustomContent>
61
-			          <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
62
-			        </nz-option>
63
-			      </nz-select>
64
-			    </div>
65
-
66 39
 			  </div>
67 40
 			  <div class="list-template__btns">
68 41
 			    <button class="btn default" (click)='search()'>搜索</button>
69 42
 			    <button class="btn default ml8" (click)='reset()'>重置</button>
43
+					<button class="btn default ml8" (click)='excelImport("",1)'>上传文档</button>
70 44
 			  </div>
71 45
 			</div>
72 46
 			<div class="list-template__bottom">
@@ -84,19 +58,19 @@
84 58
 			      </tr>
85 59
 			    </thead>
86 60
 			    <tbody v-if="listOfData && listOfData.length>0">
87
-			      <tr *ngFor="let data of listOfData let index = index;" (click)="selectedListData(data.id)">
61
+			      <tr *ngFor="let data of listOfData let index = index;">
88 62
 							<td>{{ index+(pageIndex-1) * pageSize + 1 }}</td>
89
-			        <td>{{ data.applyDeptDTO?data.applyDeptDTO.dept :'-' }}</td>
90
-			        <td>{{ data.totalCount||'0' }}</td>
91
-			        <td>{{ data.expendPrice ||'0' }}</td>
92
-			        <td>{{ data.actualPrice || '0'}}</td>
93
-			        <td>{{ data.pharmacyDTO?data.pharmacyDTO.dept:'-'}}</td>
63
+			        <td>{{ data.fileName || '-' }}</td>
64
+			        <td>{{ data.fileType||'0' }}</td>
65
+			        <td>{{ data.docSize ||'0' }}</td>
66
+			        <td>{{ data.createUserDTO && data.createUserDTO.name || '0'}}</td>
67
+			        <td>{{ data.updateTime|date:'yyyy-MM-dd HH:mm:ss'}}</td>
94 68
 			        <td>
95 69
 			          <div class="coop">
96
-									<span *ngIf="coopBtns.del" (click)="detail($event,data.id)">删除</span>
97
-									<span *ngIf="coopBtns.download" (click)="excelExport($event,data.id)">下载</span>
98
-			            <span *ngIf="coopBtns.updata" (click)="detail($event,data.id)">更新</span>
99
-									<span *ngIf="coopBtns.look" (click)="detail($event,data.id)">查看历史</span>
70
+									<span *ngIf="coopBtns.del" (click)="delList($event,data.id)">删除</span>
71
+									<span *ngIf="coopBtns.download" (click)="excelExport($event,data)">下载</span>
72
+			            <span *ngIf="coopBtns.updata" (click)="excelImport(data.id,2)">更新</span>
73
+									<span *ngIf="coopBtns.look" (click)="detail(data)">查看历史</span>
100 74
 								</div>
101 75
 			        </td>
102 76
 			      </tr>
@@ -115,7 +89,7 @@
115 89
   <!-- 新增/编辑模态框 -->
116 90
   <div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="modal">
117 91
     <div class="modalBody">
118
-      <div class="title">科室发药单-查看<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
92
+      <div class="title">查看历史<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
119 93
       </div>
120 94
       <overlay-scrollbars #osComponentRef1 class="content">
121 95
         <div class="list-template__bottom">
@@ -123,30 +97,29 @@
123 97
             [nzLoading]="loading1">
124 98
             <thead>
125 99
               <tr class="thead">
126
-								<th nzWidth="10%">药品标识</th>
127
-                <th nzWidth="10%">药品名称</th>
128
-                <th nzWidth="10%">规格</th>
129
-                <th nzWidth="10%">消耗数量</th>
130
-                <th nzWidth="10%">实发数量</th>
131
-                <th nzWidth="10%">包装规格</th>
132
-                <th nzWidth="10%">发药药箱</th>
133
-                <th nzWidth="10%">原库存数</th>
134
-                <th nzWidth="10%">计算后库存</th>
135
-        				<th nzWidth="10%">增减</th>
100
+								<th>文档名称</th>
101
+								<th>文档格式</th>
102
+                <th>上传者</th>
103
+                <th>版本号</th>
104
+                <th>大小</th>
105
+                <th>上传时间</th>
106
+        				<th>操作</th>
136 107
               </tr>
137 108
             </thead>
138 109
             <tbody>
139 110
               <tr *ngFor="let data of viewData">
140
-								<td>{{ data.drugsInfoDTO?data.drugsInfoDTO.drugCode:'无' }}</td>
141
-                <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.drugName:'无' }}</td>
142
-                <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.specs:'无' }}</td>
143
-                <td>{{ data.expendCount||'0' }}</td>
144
-                <td>{{ data.actualCount||'0' }}</td>
145
-                <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.packingSpecs:'0' }}</td>
146
-                <td>{{ data.cartonNum || '0' }}</td>
147
-                <td>{{ data.formerInventory || '0' }}</td>
148
-                <td>{{ data.afterInventory || '0'}}</td>
149
-        				<td>{{ data.addSub || '0' }}</td>
111
+								<td>{{ data.fileName }}</td>
112
+								<td>{{ data.fileType||'-' }}</td>
113
+                <td>{{ data.createUserDTO?data.createUserDTO.name:'-' }}</td>
114
+                <td>{{ data.fileVersion||'-' }}</td>
115
+                <td>{{ data.docSize||'0' }}</td>
116
+                <td>{{ data.createTime|date:'yyyy-MM-dd HH:mm:ss'}}</td>
117
+								<td>
118
+								  <div class="coop">
119
+										<!-- <span *ngIf="coopBtns.del" (click)="delHistory(data)">删除</span> -->
120
+										<span *ngIf="coopBtns.download" (click)="excelHistory(data)">下载</span>
121
+									</div>
122
+								</td>
150 123
               </tr>
151 124
             </tbody>
152 125
           </nz-table>
@@ -159,12 +132,11 @@
159 132
   </div>
160 133
   <!-- 删除模态框 -->
161 134
   <app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
162
-    (confirmDelEvent)="confirmDel()" content="您确认要删除科室吗?"></app-dialog-delete>
163
-
164
-  <!-- 启用停用模态框 -->
165
-  <app-dialog-delete [delModal]="delModal1" (hideDelModalEvent)="hideDelModal1()" [btnLoading]="btnLoading"
166
-    (confirmDelEvent)="confirmDel1()" [content]="'您确认要建立配送工单吗?'"></app-dialog-delete>
167
-
135
+    (confirmDelEvent)="confirmDel()" content="您确认要删除文档吗?"></app-dialog-delete>
136
+		
137
+	<!-- 删除模态框 -->
138
+	<app-dialog-delete [delModal]="delHistoryModal" (hideDelModalEvent)="hideHistoryModal()" [btnLoading]="btnLoading"
139
+		(confirmDelEvent)="confirmHistory()" content="您确认要删除吗?"></app-dialog-delete>
168 140
 </div>
169 141
 <!-- 操作成功/失败提示框 -->
170 142
 <app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
@@ -174,7 +146,8 @@
174 146
 <router-outlet></router-outlet>
175 147
 <!-- 遮罩 -->
176 148
 <app-mask *ngIf="maskFlag"></app-mask>
177
-<app-excel-import [isShow]="isShow" (hideFormHand)="hideExcelImport($event)" *ngIf="isShow" (submitFormHand)="submitExcelImport($event)"></app-excel-import>
149
+
150
+<app-upload-file [isShow]="isShow" (hideFormHand)="hideExcelImport($event)" *ngIf="isShow" (submitFormHand)="submitExcelImport($event)"></app-upload-file>
178 151
 
179 152
 <!-- 删除树结构模态框 -->
180 153
   <app-dialog-delete [delModal]="delTreeModal" (hideDelModalEvent)="hideTreeModal()" [btnLoading]="btnLoading"
@@ -188,7 +161,7 @@
188 161
 		<div class="content">
189 162
 			<form nz-form [formGroup]="validateTreeForm" class="addForm" (ngSubmit)="submitForm()">
190 163
 				<nz-form-item *ngIf="treeType==2">
191
-					<nz-form-label [nzSpan]="7" nzRequired nzFor="parent">父级目录名称</nz-form-label>
164
+					<nz-form-label [nzSpan]="7" nzFor="parent">父级目录名称</nz-form-label>
192 165
 					<nz-form-control [nzSpan]="17" nzErrorTip="请输入父级目录名称!">
193 166
 						<nz-input-group>
194 167
 							<input nz-input disabled formControlName="parent" placeholder="请输入父级目录名称" />

+ 34 - 3
src/app/views/common-document/common-document.component.less

@@ -1,5 +1,9 @@
1 1
 @import "../../../../src/theme.less";
2 2
 :host {
3
+	.activeClass{
4
+		background: #34b349;
5
+		color: #fff;
6
+	}
3 7
   .add-button {
4 8
     margin: 0 auto 16px !important;
5 9
   }
@@ -33,6 +37,7 @@
33 37
 			margin-right: 15px;
34 38
 			height: 100vh;
35 39
 			overflow-y: auto;
40
+			overflow-x: hidden;
36 41
 			background: #fff;
37 42
 			.tree-top-add{
38 43
 				margin: 6px;
@@ -53,8 +58,14 @@
53 58
 			}
54 59
 			.tree-content{
55 60
 				padding: 0 10px;
56
-				.ant-tree-node-content-wrapper{
61
+				.custom-node{
62
+					display: inline-block;
57 63
 					width: 100%;
64
+					cursor: pointer;
65
+					padding: 5px;
66
+					.folder-name{
67
+						margin-left: 2px;
68
+					}
58 69
 				}
59 70
 			}
60 71
 		}
@@ -155,8 +166,27 @@
155 166
   &.add {
156 167
     .modalBody {
157 168
       width: 80%;
158
-      height: auto;
159
-
169
+      background: #fff;
170
+      border-radius: 5px;
171
+      padding: 10px 20px;
172
+      color: #333;
173
+    
174
+      .title {
175
+        width: 100%;
176
+        text-align: center;
177
+        font-size: 18px;
178
+        position: relative;
179
+    
180
+        i {
181
+          position: absolute;
182
+          right: 0;
183
+          top: 0;
184
+          font-size: 20px;
185
+          color: #666;
186
+          cursor: pointer;
187
+          padding: 0 5px;
188
+        }
189
+      }
160 190
       .content {
161 191
         width: 100%;
162 192
         height: auto;
@@ -268,6 +298,7 @@
268 298
       button {
269 299
         &:nth-child(1) {
270 300
           margin-right: 20px;
301
+					margin-top: 15px;
271 302
         }
272 303
       }
273 304
     }

+ 230 - 422
src/app/views/common-document/common-document.component.ts

@@ -41,24 +41,10 @@ export class CommonDocumentComponent implements OnInit{
41 41
   ) {}
42 42
 
43 43
   ngOnInit() {
44
-    this.searchParentDeptSubject.pipe(debounceTime(500)).subscribe((e) => {
45
-      // this.getAllParentdepart(v).subscribe((result) => {
46
-      //   this.isLoading = false;
47
-      //   if (result.status == 200) {
48
-      //     this.allParentdepart = result.list;
49
-      //   }
50
-      // });
51
-			this.isDeptLoading = true;
52
-			this.getDeparts(e);
53
-    });
54 44
 		this.hosId = this.tool.getCurrentHospital().id;
55 45
 		this.userId = this.tool.getCurrentUserId();
56 46
     this.coopBtns = this.tool.initCoopBtns(this.route);
57 47
 		this.getTreeData();
58
-    this.initForm();
59
-    this.getAllHospital();
60
-    // this.getType();
61
-    // this.getDeptHandoverType();
62 48
   }
63 49
 	userId:any;
64 50
   listOfData: any[] = []; //表格数据
@@ -105,11 +91,13 @@ export class CommonDocumentComponent implements OnInit{
105 91
 				this.message.error('请先选择目录!')
106 92
 				return
107 93
 			}
94
+		}else if(type==1){
95
+			this.treeItem = null
96
+			this.parentNode = null
108 97
 		}
109 98
 		this.treeType = type
110 99
 		this.add = true
111 100
 		this.initAddForm();
112
-		this.addModal = true
113 101
 	}	
114 102
 	
115 103
 	// 编辑目录
@@ -121,7 +109,6 @@ export class CommonDocumentComponent implements OnInit{
121 109
 		this.treeType = type
122 110
 		this.add = false
123 111
 		this.initAddForm('edit');
124
-		this.addModal = true
125 112
 	}
126 113
 	
127 114
 	hideAddModal(){
@@ -133,21 +120,15 @@ export class CommonDocumentComponent implements OnInit{
133 120
 	parentNode:any; //父级节点
134 121
 	activedNode:any;
135 122
 	nodeClick(data: NzFormatEmitEvent): void{
136
-		console.log(123,data)
137 123
 		this.treeItem = data.node.origin
138 124
 		this.parentNode = data.node.parentNode ? data.node.parentNode.origin : null
125
+		// console.log(123,this.treeItem)
126
+		// console.log(456,this.parentNode)
127
+		this.getList();
139 128
 	}
140 129
 	
141 130
 	openFolder(data: NzTreeNode | Required<NzFormatEmitEvent>): void {
142
-		console.log(456, data)
143
-		if (data instanceof NzTreeNode) {
144
-			data.isExpanded = !data.isExpanded;
145
-		} else {
146
-			const node = data.node;
147
-			if (node) {
148
-				node.isExpanded = !node.isExpanded;
149
-			}
150
-		}
131
+		console.log(9998, data)
151 132
 	}
152 133
 		
153 134
 	// 删除目录
@@ -170,56 +151,77 @@ export class CommonDocumentComponent implements OnInit{
170 151
 	  that.mainService
171 152
 	    .coopData(
172 153
 	      "rmvData",
173
-	      "department",
154
+	      "documentFolder",
174 155
 	      [that.treeItem.id]
175 156
 	    )
176 157
 	    .subscribe((data) => {
177 158
 	      that.btnLoading = false;
178 159
 	      that.delTreeModal = false;
179
-	      if (data.data && data.data[0]) {
180
-	        if (!data.data[0].msg) {
181
-	          that.showPromptModal("删除", true, "");
182
-						this.getTreeData();
183
-	        } else {
184
-	          that.showPromptModal("删除", false, data.data[0].msg);
185
-	        }
186
-	      } else {
187
-	        that.showPromptModal("删除", false, "");
188
-	      }
160
+				if (data.status==200) {
161
+					that.showPromptModal("删除", true, "");
162
+					this.treeItem = null
163
+					this.parentNode = null
164
+					this.getTreeData();
165
+				} else {
166
+					that.showPromptModal("删除", false, data.msg);
167
+				}
168
+
189 169
 	    });
190 170
 	}
191 171
 	// 获取目录数据
172
+	defaultExpandedKeys:any = [];	
192 173
 	getTreeData(){
193
-		let data = {
174
+		let query = {
194 175
 			idx: 0,
195 176
 			sum: 9999,
196 177
 			documentFolder:{
197 178
 				personal: 0,
198
-				createUser: this.userId,
179
+				// createUser: this.userId,
199 180
 				hosId: this.hosId
200 181
 			}
201 182
 		}
202 183
 		this.mainService
203
-		  .getFetchDataList("data", "documentFolder", data)
204
-		  .subscribe((data) => {
205
-		    this.nodes = data.list;
206
-		  });
184
+		  .getFetchDataList("data", "documentFolder", query)
185
+		  .subscribe((res) => {
186
+		    let data = res.list;
187
+				data = data.map(v => ({...v, parentId: v.parent ? v.parent.id : undefined, title: v.folderName, key: v.id}));
188
+				this.nodes = this.tool.tranListToTreeDataLeaf(data, undefined, "parentId");
189
+				this.defaultExpandedKeys = [this.nodes.length>0?this.nodes[0].key:null]
190
+				// if(this.nodes[0].children && this.nodes[0].children.length>0){
191
+				// 	this.defaultExpandedKeys.push(this.nodes[0].key)
192
+				// 	this.setSelectKey(this.nodes[0].children);
193
+				// 	console.log(4444,this.defaultExpandedKeys)
194
+				// }
195
+			});
196
+	}
197
+	
198
+	setSelectKey(data){
199
+		for(let i of data){
200
+			this.defaultExpandedKeys.push(i.key)
201
+			if(i.children && i.children.length>0){
202
+				this.setSelectKey(i.children);
203
+			}
204
+		}
207 205
 	}
208 206
 	
209 207
 	// 初始化新增form表单
210 208
 	initAddForm(type:any = 'add') {
211 209
 		this.validateTreeForm = this.fb.group({
212 210
 			folderName: [type=='edit' ? this.treeItem.folderName : null, [Validators.required]],
213
-			parent: [type=='edit' && this.parentNode ? this.parentNode.folderName : this.treeItem.folderName, [Validators.required]],
211
+			parent: [null, []],
214 212
 		});
215 213
 		if(this.treeType==2){
216 214
 			this.validateTreeForm.addControl(
217 215
 			  "parent",
218
-			  new FormControl(type=='edit' && this.parentNode ? this.parentNode.folderName : this.treeItem.folderName, Validators.required)
216
+			  new FormControl(null)
219 217
 			);
218
+			this.validateTreeForm.controls.parent.setValue(this.treeItem.folderName);
220 219
 		}else{
221 220
 			this.validateTreeForm.removeControl("parent");
222 221
 		}
222
+		setTimeout(_=>{
223
+			this.addModal = true
224
+		},50)
223 225
 	}
224 226
 	
225 227
 	// 新增/编辑树
@@ -231,28 +233,33 @@ export class CommonDocumentComponent implements OnInit{
231 233
 	  if (this.validateTreeForm.invalid) return;
232 234
 	  this.btnLoading = true;
233 235
 		let postData = {
234
-			personal: 0,
235
-			hosId: this.hosId,
236
-			folderName: this.validateTreeForm.value.folderName,
237
-			parent:{
238
-				id:''
239
-			},
240
-			id:null,
236
+			documentFolder:{
237
+				personal: 0,
238
+				hosId: this.hosId,
239
+				folderName: this.validateTreeForm.value.folderName,
240
+				parent:{
241
+					id:''
242
+				},
243
+				id:null,
244
+			}
241 245
 		};
242 246
 	  if (this.treeType==1) {
243
-	    delete postData.parent
244
-			delete postData.id
247
+	    delete postData.documentFolder.parent
248
+			delete postData.documentFolder.id
245 249
 	  } else if(this.treeType==2) {
246
-			postData.parent.id = this.treeItem.id
250
+			postData.documentFolder.parent.id = this.treeItem.id
247 251
 		} else if(this.treeType==3) {
248
-			postData.id = this.treeItem.id
252
+			postData.documentFolder.id = this.treeItem.id
253
+			delete postData.documentFolder.parent
249 254
 		}
250 255
 	  this.mainService
251
-	    .simplePost("addData", "documentFolder", postData)
256
+	    .coopData(this.add ? "addData" : "updData", "documentFolder", postData)
252 257
 	    .subscribe((result) => {
253 258
 	      this.hideAddModal();
254 259
 	      this.btnLoading = false;
255 260
 	      if (result["status"] == 200) {
261
+					this.treeItem = null
262
+					this.parentNode = null
256 263
 					this.getTreeData();
257 264
 	        this.showPromptModal(this.add ? "新增" : "编辑", true, "");
258 265
 	      } else {
@@ -266,31 +273,53 @@ export class CommonDocumentComponent implements OnInit{
266 273
 	}
267 274
 	
268 275
   // 模板导出
269
-  excelExport(e, id){
270
-    this.maskFlag = this.message.loading("下载模板中..", {
276
+  excelExport(e, item){
277
+    this.maskFlag = this.message.loading("下载中..", {
271 278
       nzDuration: 0,
272 279
     }).messageId;
273
-    this.mainService.exportExcel("department", {}).subscribe(
280
+    this.mainService.documentExport(item.fileToken).subscribe(
274 281
       (data) => {
275 282
         this.message.remove(this.maskFlag);
276 283
         this.maskFlag = false;
277
-        this.message.success('下载模板成功');
284
+        this.message.success('下载成功');
285
+				let type = null
286
+				if(item.fileType=='xls'){
287
+					console.log(1)
288
+					type = 'application/vnd.ms-excel'
289
+				}else if(item.fileType=='xlsx'){
290
+					type = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
291
+				}else if(item.fileType=='doc'){
292
+					type = 'application/msword'
293
+				}else if(item.fileType=='docx'){
294
+					type = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
295
+				}else if(item.fileType=='pdf'){
296
+					type = 'application/pdf'
297
+				}else if(item.fileType=='ppt'){
298
+					type = 'application/vnd.ms-powerpoint'
299
+				}else if(item.fileType=='pptx'){
300
+					type = 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
301
+				}else if(item.fileType=='png'){
302
+					type = 'image/png'
303
+				}else if(item.fileType=='gif'){
304
+					type = 'image/gif'
305
+				}else if(item.fileType=='jpeg' || item.fileType=='jpg'){
306
+					type = 'image/jpeg'
307
+				}
278 308
         var file = new Blob([data], {
279
-          type: "application/vnd.ms-excel",
309
+          type: type,
280 310
         });
281
-        //trick to download store a file having its URL
282 311
         var fileURL = URL.createObjectURL(file);
283 312
         var a = document.createElement("a");
284 313
         a.href = fileURL;
285 314
         a.target = "_blank";
286
-        a.download = "科室导入模板.xls";
315
+        a.download = item.fileName;
287 316
         document.body.appendChild(a);
288 317
         a.click();
289 318
       },
290 319
       (err) => {
291 320
         this.message.remove(this.maskFlag);
292 321
         this.maskFlag = false;
293
-        this.message.error('下载模板失败');
322
+        this.message.error('下载失败');
294 323
       }
295 324
     );
296 325
   }
@@ -302,19 +331,39 @@ export class CommonDocumentComponent implements OnInit{
302 331
     this.isShow = false;
303 332
   }
304 333
   // 触发
305
-  excelImport() {
334
+	uploadType:any;
335
+	itemId:any;
336
+  excelImport(id, type) {
337
+		if(!this.treeItem && type==1){
338
+			this.message.error('请先选择目录!')
339
+			return
340
+		}
341
+		this.uploadType = type
342
+		this.itemId = id
306 343
     this.isShow = true;
307 344
   }
345
+	maskFlag:any;
308 346
   submitExcelImport({fileList}){
309 347
     this.isShow = false;
310 348
     const formData = new FormData();
311 349
     fileList.forEach((file: any) => {
312 350
       formData.append('file', file);
351
+			formData.append('filename', file.name);
313 352
     });
314
-    this.maskFlag = this.message.loading("正在导入中..", {
353
+		let url = null
354
+		let title = null
355
+		if(this.uploadType==1){
356
+			url = this.mainService.documentImport(this.treeItem.id, 0);
357
+			title = '上传'
358
+		}else{
359
+			url = this.mainService.documentUpdateFile(this.itemId);
360
+			title = '更新'
361
+		}
362
+    this.maskFlag = this.message.loading(`正在${title}中..`, {
315 363
       nzDuration: 0,
316 364
     }).messageId;
317
-    const req = new HttpRequest('Post', this.mainService.returnImportExcelUrl('department'), formData, {
365
+
366
+    const req = new HttpRequest('Post', url, formData, {
318 367
       reportProgress: true
319 368
     });
320 369
     this.http
@@ -325,18 +374,18 @@ export class CommonDocumentComponent implements OnInit{
325 374
           if(res.body.status == 200){
326 375
             this.message.remove(this.maskFlag);
327 376
             this.maskFlag = false;
328
-            this.message.success('导入成功');
377
+            this.message.success(`${title}成功`);
329 378
             this.getList();
330 379
           }else{
331 380
             this.message.remove(this.maskFlag);
332 381
             this.maskFlag = false;
333
-            this.showPromptModal("导入", false, res.body.msg);
382
+            this.showPromptModal(`${title}`, false, res.body.msg);
334 383
           }
335 384
         },
336 385
         () => {
337 386
           this.message.remove(this.maskFlag);
338 387
           this.maskFlag = false;
339
-          this.message.error('导入失败');
388
+          this.message.error(`${title}失败`);
340 389
         },
341 390
       );
342 391
   }
@@ -348,90 +397,14 @@ export class CommonDocumentComponent implements OnInit{
348 397
   }
349 398
   // 打开父级科室下拉框baba
350 399
   isLoading = false;
351
-  openDeptSelect(flag) {
352
-    if (flag) {
353
-      this.isLoading = true;
354
-      this.getAllParentdepart().subscribe((result) => {
355
-        this.isLoading = false;
356
-        if (result.status == 200) {
357
-          this.allParentdepart = result.list;
358
-        }
359
-      });
360
-    }
361
-  }
362 400
   // 配送建单
363 401
   coopData:any = {};
364
-  addDateModal(data) {
402
+  delList(e,data) {
365 403
     this.coopData = data;
366
-    this.showDelModal1();
404
+    this.showDelModal(e,data);
367 405
   }
368 406
   delModal1: boolean = false; //删除模态框
369 407
 
370
-  showDelModal1() {
371
-    this.delModal1 = true;
372
-  }
373
-  hideDelModal1() {
374
-    this.delModal1 = false;
375
-  }
376
-  // 确认配送工单
377
-  confirmDel1() {
378
-    this.btnLoading = true;
379
-    this.mainService
380
-      .transfusionBuildOrder({
381
-				drugsListId:this.coopData.id
382
-			})
383
-      .subscribe((data) => {
384
-        this.btnLoading = false;
385
-        this.delModal1 = false;
386
-        if (data.status == 200) {
387
-          this.showPromptModal('操作', true, "");
388
-        } else {
389
-          this.showPromptModal('操作', false, data.msg);
390
-        }
391
-      });
392
-  }
393
-  //获取所有的父级科室列表
394
-  getAllParentdepart(keyWord = "") {
395
-    let postData: any = {
396
-      idx: 0,
397
-      sum: 10,
398
-      department: {
399
-        // hospital: { id: this.add ? this.tool.getCurrentHospital().id : this.hospital },
400
-        keyWord: keyWord,
401
-      },
402
-    };
403
-    if (this.coopItem) {
404
-      // 过滤这个科室及其子科室
405
-      postData.department.filterByDeptId = this.coopItem.id;
406
-    }
407
-    return this.mainService.getFetchDataList("data", "department", postData);
408
-  }
409
-  // 新添加科室号码
410
-  addDeptPhone(e: MouseEvent) {
411
-    e.preventDefault();
412
-    this.deptPhones.push({ id: ++this.deptsPhoneId, phone: "" });
413
-    this.deptsPhoneChange();
414
-  }
415
-  // 删除新添加科室号码
416
-  removeDeptPhone(index: number, e: MouseEvent) {
417
-    e.preventDefault();
418
-    this.deptPhones.splice(index, 1);
419
-    this.deptsPhoneChange();
420
-  }
421
-  //监听科室电话输入事件
422
-  deptsPhoneChange(e?, phone?) {
423
-    if (e !== undefined && phone !== undefined) {
424
-      phone.phone = e;
425
-    }
426
-    // -------------判断添加按钮是否禁用 start
427
-    this.isAddDeptsPhone = !this.validateForm.value.officeNum;
428
-    if (!this.isAddDeptsPhone) {
429
-      //如果没禁用
430
-      this.isAddDeptsPhone = this.deptPhones.some((item) => item.phone === "");
431
-    }
432
-    // -------------判断添加按钮是否禁用 end
433
-  }
434
-
435 408
   // 搜索
436 409
   search() {
437 410
     this.pageIndex = 1;
@@ -440,43 +413,26 @@ export class CommonDocumentComponent implements OnInit{
440 413
   // 重置
441 414
   reset() {
442 415
     this.pageIndex = 1;
443
-    this.department = null;
444
-    this.batchNumber = "";
445
-		this.dateRange = [];
446
-		this.startDate = "";
447
-		this.endDate = "";
448 416
     this.getList();
449 417
   }
450 418
   // 表格数据
451 419
   loading1 = false;
420
+	fileName:any;
452 421
   getList() {
453 422
     var that = this;
454 423
     let data = {
455 424
       idx: that.pageIndex - 1,
456 425
       sum: that.pageSize,
457
-      drugsList: {
458
-        applyDept: that.department,
459
-				batch:{
460
-					batchNo:that.batchNumber
461
-				},
462
-        startTime: this.startDate,
463
-				endTime: this.endDate,
464
-				hosId: this.hosId
426
+      documentFile: {
427
+				hosId: this.hosId,
428
+				fileName: this.fileName,
429
+				personal: 0,
430
+				folderId: this.treeItem && this.treeItem.id || undefined
465 431
       },
466 432
     };
467
-		if(that.department){
468
-			data.drugsList.applyDept = that.department
469
-		}else{
470
-			delete data.drugsList.applyDept
471
-		}
472
-		if(that.batchNumber){
473
-			data.drugsList.batch.batchNo = that.batchNumber
474
-		}else{
475
-			delete data.drugsList.batch
476
-		}
477 433
     this.loading1 = true;
478 434
     that.mainService
479
-      .getFetchDataList("data", "drugsList", data)
435
+      .getFetchDataList("data", "documentFile", data)
480 436
       .subscribe((data) => {
481 437
         this.loading1 = false;
482 438
         that.listOfData = data.list;
@@ -496,174 +452,6 @@ export class CommonDocumentComponent implements OnInit{
496 452
 	  this.endDate = format(endOfDay(result[1]), 'yyyy-MM-dd HH:mm:ss');
497 453
 	}
498 454
 
499
-	// 获取所有科室
500
-  // snum = 0;
501
-  getDeparts(dept) {
502
-    var that = this;
503
-    let data:any = {
504
-      department: {
505
-        dept,
506
-        hosIds: this.hosId,
507
-      },
508
-      idx: 0,
509
-      sum: 20,
510
-    };
511
-		if(this.isParentData==1){
512
-			if(this.tool.getCurrentUserInfo().currentHospital &&
513
-			this.tool.getCurrentUserInfo().currentHospital.parent){
514
-				data.department.hosIds = this.hosId +','+this.tool.getCurrentUserInfo().currentHospital.parent.id
515
-			}else{
516
-				data.department.hosIds = this.hosId
517
-			}
518
-		}
519
-    that.mainService
520
-		.getFetchDataList("data", "department", data)
521
-		.subscribe((data) => {
522
-			setTimeout(_=>{
523
-				this.isDeptLoading = false
524
-				this.hospitals1 = data.list
525
-			},500)
526
-		});
527
-  }
528
-
529
-  // 获取所有院区
530
-	isParentData:any = null;
531
-  getAllHospital() {
532
-		this.mainService.getDictionary("list", "ordinary_field").subscribe((data) => {
533
-			let taskTypeData = data.find(i=>i.value=='infusionSolutions')
534
-			let postData = {
535
-			  idx: 0,
536
-			  sum: 10,
537
-			  taskTypeConfig: {
538
-					hosId:this.hosId,
539
-					taskType:taskTypeData.id
540
-			  }
541
-			};
542
-			this.mainService
543
-			  .getFetchDataList("simple/data", "taskTypeConfig", postData)
544
-			  .subscribe((result) => {
545
-			    if (result.status == 200) {
546
-						let data = result.list[0] || {};
547
-						this.isParentData = data.quoteParentData;
548
-						this.getDeparts('')
549
-						this.getList();
550
-			    }
551
-			  });
552
-		});
553
-  }
554
-
555
-  // 切换院区选项
556
-  buildings: any = []; //楼栋
557
-  maskFlag: any = false;
558
-  changeHosp(obj?) {
559
-    let hospitalId;
560
-    if (obj) {
561
-      hospitalId = obj.hospital.id;
562
-    }
563
-    let hid;
564
-    if (hospitalId || hospitalId == 0) {
565
-      hid = hospitalId - 0;
566
-    }
567
-		// else {
568
-  //     hid = this.hospital - 0;
569
-  //   }
570
-    let data = {
571
-      // hosId: this.add ? this.tool.getCurrentHospital().id : hid,
572
-    };
573
-    this.maskFlag = this.message.loading("正在加载中..", {
574
-      nzDuration: 0,
575
-    }).messageId;
576
-    this.mainService
577
-      .coopData("getBuildingOrFloor", "building", data)
578
-      .subscribe((data) => {
579
-        this.buildings = data.data;
580
-        this.floors = [];
581
-        // ---------
582
-        if (obj) {
583
-          //编辑
584
-          let arr = this.buildings.map((item) => item.id);
585
-          if (obj.building.id && arr.includes(obj.building.id)) {
586
-            //有楼栋
587
-            this.changeBuilding(obj.building.id, obj);
588
-            this.validateForm.controls.building.setValue(obj.building.id + "");
589
-          } else {
590
-            //无楼栋
591
-            this.floors = [];
592
-            this.message.remove(this.maskFlag);
593
-            this.maskFlag = false;
594
-            this.modal = true;
595
-            this.validateForm.controls.building.setValue(null);
596
-            this.validateForm.controls.officeAddress.setValue(null);
597
-          }
598
-        } else {
599
-          //新增
600
-          this.message.remove(this.maskFlag);
601
-          this.maskFlag = false;
602
-          this.modal = true;
603
-        }
604
-        // ---------
605
-      });
606
-  }
607
-
608
-  // 切换楼栋信息
609
-  floors: Array<any> = []; //楼层
610
-  floorLoading: boolean = false;
611
-  changeBuilding(buildingId?, obj?) {
612
-    var that = this;
613
-    that.floors = [];
614
-    var bid;
615
-    if (buildingId || buildingId == 0) {
616
-      bid = buildingId - 0;
617
-    } else if (!that.add && that.validateForm.value.building) {
618
-      bid = that.validateForm.value.building - 0;
619
-    } else {
620
-      return;
621
-    }
622
-    let data = {
623
-      buildingId: bid,
624
-    };
625
-    this.floorLoading = true;
626
-    that.mainService
627
-      .coopData("getBuildingOrFloor", "floor", data)
628
-      .subscribe((data) => {
629
-        this.floorLoading = false;
630
-        this.message.remove(this.maskFlag);
631
-        this.maskFlag = false;
632
-        this.modal = true;
633
-        that.floors = data.data;
634
-        if (obj) {
635
-          let floorId = obj.floor.id;
636
-          let arr = that.floors.map((item) => item["id"]);
637
-          if (floorId && arr.includes(floorId)) {
638
-            this.validateForm.controls.floor.setValue(floorId + "");
639
-          } else {
640
-            this.validateForm.controls.floor.setValue(null);
641
-            this.validateForm.controls.officeAddress.setValue(null);
642
-          }
643
-        }
644
-      });
645
-  }
646
-
647
-  // 获取科室类型
648
-  types: Array<any> = [];
649
-  getType() {
650
-    var that = this;
651
-    that.mainService.getDictionary("list", "dept_type").subscribe((data) => {
652
-      console.log(data);
653
-      that.types = data;
654
-    });
655
-  }
656
-
657
-  // 获取科室汇总交接类型
658
-  deptHandoverTypes: Array<any> = [];
659
-  getDeptHandoverType() {
660
-    var that = this;
661
-    that.mainService.getDictionary("list", "dept_handover_type").subscribe((data) => {
662
-      console.log(data);
663
-      that.deptHandoverTypes = data;
664
-    });
665
-  }
666
-
667 455
   // 新增弹框
668 456
   showModal() {
669 457
     this.initForm();
@@ -864,57 +652,6 @@ export class CommonDocumentComponent implements OnInit{
864 652
 
865 653
   // 编辑
866 654
   coopItem: any = null;
867
-  edit(e, data) {
868
-    e.stopPropagation();
869
-    this.add = false;
870
-    this.coopId = data.id;
871
-    this.coopItem = data;
872
-    this.isAddDeptsPhone = false;
873
-    this.deptPhones = [];
874
-    let phones = data.manyPhone ? data.manyPhone.split(",") : [];
875
-    if (phones.length === 0) {
876
-      this.validateForm.controls.officeNum.setValue("");
877
-      this.deptPhones = [];
878
-    } else if (phones.length === 1) {
879
-      this.validateForm.controls.officeNum.setValue(phones[0]);
880
-      this.deptPhones = [];
881
-    } else {
882
-      this.validateForm.controls.officeNum.setValue(phones[0]);
883
-      this.deptPhones = phones.slice(1).map((item) => {
884
-        return {
885
-          id: ++this.deptsPhoneId,
886
-          phone: item,
887
-        };
888
-      });
889
-    }
890
-    if (data.startTime1 && data.endTime1) {
891
-      this.validateForm.controls.startTime1.setValue(new Date(data.startTime1));
892
-      this.validateForm.controls.endTime1.setValue(new Date(data.endTime1));
893
-      this.validateForm.controls.dynamicCode1.setValue(data.dynamicCode1 == 1);
894
-    }
895
-    if (data.startTime2 && data.endTime2) {
896
-      this.validateForm.controls.startTime2.setValue(new Date(data.startTime2));
897
-      this.validateForm.controls.endTime2.setValue(new Date(data.endTime2));
898
-      this.validateForm.controls.dynamicCode2.setValue(data.dynamicCode2 == 1);
899
-    }
900
-    this.validateForm.controls.officeAddress.setValue(data.address);
901
-    if (data.parent) {
902
-      this.getAllParentdepart(data.parent.dept).subscribe((res) => {
903
-        if (res.status == 200) {
904
-          this.allParentdepart = res.list;
905
-          this.validateForm.controls.parentOfficeName.setValue(data.parent.id);
906
-        }
907
-      });
908
-    }
909
-    this.validateForm.controls.officeName.setValue(data.dept);
910
-    this.validateForm.controls.deptalias.setValue(data.deptalias);
911
-    this.validateForm.controls.officeNo.setValue(data.pcode);
912
-    this.validateForm.controls.officeType.setValue(data.type.id + "");
913
-    this.validateForm.controls.deptHandoverType.setValue(data.deptHandoverType ? data.deptHandoverType.id + "" : null);
914
-    // this.changeHosp(data);
915
-    this.validateForm.controls.officeAddress.setValue(data.address);
916
-  }
917
-
918 655
   // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
919 656
   showPromptModal(con, success, promptInfo?) {
920 657
     this.promptModalShow = false;
@@ -937,15 +674,10 @@ export class CommonDocumentComponent implements OnInit{
937 674
    * @param flag true是批量删除,false是单个删除
938 675
    * @param id
939 676
    */
940
-  showDelModal(e, flag, id) {
677
+  showDelModal(e, id) {
941 678
     e.stopPropagation();
942 679
     this.delModal = true;
943
-    this.coopFlag = flag;
944
-    if (flag) {
945
-      this.coopIds = id;
946
-    } else {
947
-      this.coopId = id;
948
-    }
680
+    this.coopId = id;
949 681
   }
950 682
   hideDelModal() {
951 683
     this.delModal = false;
@@ -957,54 +689,130 @@ export class CommonDocumentComponent implements OnInit{
957 689
     that.mainService
958 690
       .coopData(
959 691
         "rmvData",
960
-        "department",
961
-        this.coopFlag ? this.coopIds : [that.coopId]
692
+        "documentFile",
693
+        [that.coopId]
962 694
       )
963 695
       .subscribe((data) => {
964 696
         that.btnLoading = false;
965 697
         that.delModal = false;
966
-        if (data.data && data.data[0]) {
967
-          if (!data.data[0].msg) {
968
-            if (
969
-              that.listOfData.length == 1 &&
970
-              that.pageIndex == Math.ceil(that.listLength / that.pageSize)
971
-            ) {
972
-              that.listLength--;
973
-              that.pageIndex = Math.ceil(that.listLength / that.pageSize) || 1;
974
-            }
975
-            that.showPromptModal("删除", true, "");
976
-          } else {
977
-            that.showPromptModal("删除", false, data.data[0].msg);
978
-          }
698
+        if (data.status==200) {
699
+          that.showPromptModal("删除", true, "");
979 700
         } else {
980
-          that.showPromptModal("删除", false, "");
701
+          that.showPromptModal("删除", false, data.msg);
981 702
         }
982 703
       });
983 704
   }
984 705
 
985 706
   // 查看
986
-  detail(e, id) {
987
-    e.stopPropagation();
707
+  detail(item) {
708
+		this.coopData = item;
988 709
 		var that = this;
989 710
 		let data = {
990 711
 			idx: 0,
991 712
 			sum: 9999,
992
-			drugsConfigure: {
713
+			documentFile: {
993 714
 			  hosId: this.hosId,
994
-			  drugListId: id
715
+			  fileCode: item.fileCode
995 716
 			}
996 717
 		};
997 718
 		this.loading1 = true;
998 719
 		that.mainService
999
-		  .getFetchDataList("data", "drugsConfigure", data)
720
+		  .getFetchDataList("data", "documentFile", data)
1000 721
 		  .subscribe((data) => {
1001 722
 		    this.loading1 = false;
1002 723
 				this.modal = true
1003 724
 		    that.viewData = data.list;
1004
-		    // that.listLength = data.totalNum;
1005 725
 		  });
1006 726
   }
1007
-
727
+	
728
+	// 删除历史
729
+	delHistory(e,data){
730
+		this.coopData = data;
731
+		this.showHistoryModal(e,data);
732
+	}
733
+	
734
+	HistoryId:any;
735
+	showHistoryModal(e, id) {
736
+	  e.stopPropagation();
737
+	  this.delModal = true;
738
+	  this.HistoryId = id;
739
+	}
740
+	hideHistoryModal() {
741
+	  this.delModal = false;
742
+	}
743
+	// 确认删除
744
+	confirmHistory() {
745
+	  var that = this;
746
+	  that.btnLoading = true;
747
+	  that.mainService
748
+	    .coopData(
749
+	      "rmvData",
750
+	      "documentFile",
751
+	      [that.HistoryId]
752
+	    )
753
+	    .subscribe((data) => {
754
+	      that.btnLoading = false;
755
+	      that.delModal = false;
756
+	      if (data.status==200) {
757
+	        that.showPromptModal("删除", true, "");
758
+					this.detail(this.coopData)
759
+	      } else {
760
+	        that.showPromptModal("删除", false, data.msg);
761
+	      }
762
+	    });
763
+	}
764
+	
765
+	// 下载历史
766
+	excelHistory(item){
767
+		this.maskFlag = this.message.loading("下载中..", {
768
+		  nzDuration: 0,
769
+		}).messageId;
770
+		this.mainService.documentExport(item.fileToken).subscribe(
771
+		  (data) => {
772
+		    this.message.remove(this.maskFlag);
773
+		    this.maskFlag = false;
774
+		    this.message.success('下载成功');
775
+				let type = null
776
+				if(item.fileType=='xls'){
777
+					type = 'application/vnd.ms-excel'
778
+				}else if(item.fileType=='xlsx'){
779
+					type = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
780
+				}else if(item.fileType=='doc'){
781
+					type = 'application/msword'
782
+				}else if(item.fileType=='docx'){
783
+					type = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
784
+				}else if(item.fileType=='pdf'){
785
+					type = 'application/pdf'
786
+				}else if(item.fileType=='ppt'){
787
+					type = 'application/vnd.ms-powerpoint'
788
+				}else if(item.fileType=='pptx'){
789
+					type = 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
790
+				}else if(item.fileType=='png'){
791
+					type = 'image/png'
792
+				}else if(item.fileType=='gif'){
793
+					type = 'image/gif'
794
+				}else if(item.fileType=='jpeg' || item.fileType=='.jpg'){
795
+					type = 'image/jpeg'
796
+				}
797
+		    var file = new Blob([data], {
798
+		      type: type,
799
+		    });
800
+		    var fileURL = URL.createObjectURL(file);
801
+		    var a = document.createElement("a");
802
+		    a.href = fileURL;
803
+		    a.target = "_blank";
804
+		    a.download = item.fileName + item.fileType;
805
+		    document.body.appendChild(a);
806
+		    a.click();
807
+		  },
808
+		  (err) => {
809
+		    this.message.remove(this.maskFlag);
810
+		    this.maskFlag = false;
811
+		    this.message.error('下载失败');
812
+		  }
813
+		);
814
+	}
815
+	
1008 816
   // 选中表格中科室
1009 817
   mapOfCheckedId: { [key: string]: boolean } = {};
1010 818
   checkedDepIds = []; //已选中科室id

+ 73 - 3
src/app/views/fuwutai/fuwutai.component.html

@@ -977,7 +977,7 @@
977 977
   <!-- 新建工单 -->
978 978
   <div class="newOrder display_flex justify-content_flex-center align-items_center" *ngIf="newOrderShow && newOrderShowOpen" (click)="clickExtra($event)">
979 979
     <div class="modalBody">
980
-      <div class="title" *ngIf="currentTabIndex !== '故障报修'">
980
+      <div class="title" *ngIf="currentTabIndex !== '故障报修' && currentTabIndex !== '政务值班'">
981 981
         <div class="newTop">
982 982
           <div class="name">来电咨询</div>
983 983
           <div class="newTopItem">
@@ -1519,6 +1519,41 @@
1519 1519
                   </div>
1520 1520
                 </div>
1521 1521
               </overlay-scrollbars>
1522
+							<!-- 政务值班 -->
1523
+							<overlay-scrollbars #osComponentRef25 *ngIf="currentTabIndex == item.key && item.key  == '政务值班'">
1524
+								<div class="zw-content">
1525
+									<div class="item df">
1526
+										<div class="df-fl margin-right">
1527
+											<span class="label mar"><span class="red">*</span> 联系人:</span>
1528
+											<input nz-input class="formItem" [(ngModel)]="contacts" placeholder="请输入联系人" nzSize="default" />
1529
+										</div>
1530
+										<div class="df-fl margin-right">
1531
+											<span class="label"><span class="red">*</span> 联系电话:</span>
1532
+											<input nz-input type="number" class="formItem" [(ngModel)]="contactsPhone" placeholder="请输入联系电话" nzSize="default" />
1533
+										</div>
1534
+									</div>
1535
+									<div class="item df">
1536
+										<span class="label"><span class="red">*</span> 投诉人:</span>
1537
+										<input nz-input class="formItem" [(ngModel)]="complainant" placeholder="请输入联系人" nzSize="default" />
1538
+									</div>
1539
+									<div class="item df">
1540
+										<span class="label"><span class="red">*</span> 省市区:</span>
1541
+										<nz-cascader [nzOptions]="nzOptions" [(ngModel)]="province" placeholder="请选择省市区" (ngModelChange)="onProvinceChanges($event)"></nz-cascader>
1542
+									</div>
1543
+									<div class="item df">
1544
+										<span class="label"><span class="red">*</span> 详细地址:</span>
1545
+										<input nz-input class="formItem" [(ngModel)]="detailedAddress" placeholder="请输入联系电话" nzSize="default" />
1546
+									</div>
1547
+									<div class="item df">
1548
+										<span class="label"><span class="red">*</span> 简述:</span>
1549
+										<textarea [(ngModel)]="sketch" nz-input rows="1" placeholder="请输入简述"></textarea>
1550
+									</div>
1551
+									<div class="item lw-df">
1552
+										<span class="label"><span class="red">*</span> 记录内容:</span>
1553
+										<textarea [(ngModel)]="record" nz-input rows="3" placeholder="请输入记录内容"></textarea>
1554
+									</div>
1555
+								</div>
1556
+							</overlay-scrollbars>
1522 1557
             </ng-container>
1523 1558
             <!-- loading -->
1524 1559
             <div class="bottom" *ngIf="newLoading">
@@ -1539,7 +1574,7 @@
1539 1574
             <span class="toLastTime1"><span class="time" *ngIf="applyDept">{{ orderRefreshTime }}s</span></span>
1540 1575
           </div>
1541 1576
           <!-- 近期配送 start -->
1542
-          <div class="cots_body weifenpai" *ngIf="currentRTab == 0" [ngClass]="{ top185: hurseInfoHiding != 1 }">
1577
+          <div class="cots_body weifenpai" *ngIf="currentRTab == 0 && currentTabIndex != '政务值班'" [ngClass]="{ top185: hurseInfoHiding != 1 }">
1543 1578
             <overlay-scrollbars #osComponentRef12 [ngStyle]="{ height: '100%' }">
1544 1579
               <div *ngIf="noArrives.length && !loading4">
1545 1580
                 <div class="list listsTypeColor" *ngFor="let data of noArrives">
@@ -1756,6 +1791,36 @@
1756 1791
             </overlay-scrollbars>
1757 1792
           </div>
1758 1793
           <!-- 知识库 end -->
1794
+					<!-- 政务值班-近期记录 -->
1795
+					<div class="cots_body weifenpai" *ngIf="currentRTab == 4 && currentTabIndex == '政务值班'" [ngClass]="{ top185: hurseInfoHiding != 1 }">
1796
+					  <overlay-scrollbars #osComponentRef26 [ngStyle]="{ height: '100%' }">
1797
+					    <div class="record" *ngIf="itsmZwOrders.length>0">
1798
+								<div class="content" *ngFor="let i of itsmZwOrders">
1799
+									<div class="item ju-sb">
1800
+										<div class="item-code">{{i.govDutySign}}</div>
1801
+										<div>{{i.addTime|date:'yyyy-MM-dd HH:mm:ss'}}</div>
1802
+									</div>
1803
+									<div class="item">
1804
+										{{i.record}}
1805
+									</div>
1806
+									<div class="item">
1807
+										{{ i.province && i.province.name || '-'}}{{ i.city && i.city.name || '-'}}{{ i.district && i.district.name || '-'}}{{ i.detailedAddress || '-'}}
1808
+									</div>
1809
+								</div>
1810
+					    </div>
1811
+					    <div class="no_data" *ngIf="itsmZwOrders.length == 0 && !loading6">
1812
+					      暂无数据
1813
+					    </div>
1814
+					    <div class="no_data" *ngIf="loading6">
1815
+					      <div class="loadingFull display_flex justify-content_flex-center align-items_center">
1816
+					        <div class="loadingFullInner">
1817
+					          <img src="../../../assets/images/loading.gif" alt="" />
1818
+					          <div>加载中...</div>
1819
+					        </div>
1820
+					      </div>
1821
+					    </div>
1822
+					  </overlay-scrollbars>
1823
+					</div>
1759 1824
         </div>
1760 1825
       </div>
1761 1826
       <div class="btns display_flex justify-content_flex-center align-items_center">
@@ -1787,6 +1852,11 @@
1787 1852
         <button class="btn cancel" nz-button nzType="default" (click)="newOrderCancel()">
1788 1853
           取消
1789 1854
         </button>
1855
+				<ng-container *ngIf="currentTabIndex === '政务值班'">
1856
+				  <button nz-button [nzLoading]="zwLoading" class="btn" nzType="primary" (click)="saveZwOrder()">
1857
+				    保存
1858
+				  </button>
1859
+				</ng-container>
1790 1860
       </div>
1791 1861
     </div>
1792 1862
   </div>
@@ -1878,7 +1948,7 @@
1878 1948
 <!-- 绑定分机 -->
1879 1949
 <app-bind-extension-number [hsmsData]="hsmsData" [itsmData]="itsmData" [coopBtns]="coopBtns" [websocketLoading]="websocketLoading" *ngIf="showBindExtensionNumberModal" (confirmModal)="checkIn($event)" (cancelModal)="cancelBindExtensionNumber($event)"></app-bind-extension-number>
1880 1950
 <!-- 工单范围 -->
1881
-<app-order-scope *ngIf="showInitModal" [hsmsData]="hsmsData" [itsmData]="itsmData" [coopBtns]="coopBtns" (confirmModal)="confirmOrderScope($event)" (cancelModal)="cancelOrderScope($event)"></app-order-scope>
1951
+<app-order-scope *ngIf="showInitModal" [showGovDutyConfig]="showGovDutyConfig" [hsmsData]="hsmsData" [itsmData]="itsmData" [coopBtns]="coopBtns" (confirmModal)="confirmOrderScope($event)" (cancelModal)="cancelOrderScope($event)"></app-order-scope>
1882 1952
 <!-- 展示形式 -->
1883 1953
 <app-display-form *ngIf="showDisplayFormModal" (confirmModal)="confirmDisplayForm($event)" (cancelModal)="cancelDisplayForm($event)"></app-display-form>
1884 1954
 <!-- 消息弹框模板 -->

+ 55 - 0
src/app/views/fuwutai/fuwutai.component.less

@@ -2568,6 +2568,24 @@
2568 2568
               // overflow: scroll;
2569 2569
               // padding-right: 2%;
2570 2570
               padding-top: 47px;
2571
+							.record{
2572
+								.content{
2573
+									color: #555555;
2574
+									padding: 10px;
2575
+									height: 115px;
2576
+									border-bottom: 1px solid #E9E9E9;
2577
+									.item{
2578
+										display: flex;
2579
+										margin-bottom: 10px;
2580
+										.item-code{
2581
+											color: #000;
2582
+										}
2583
+									}
2584
+									.ju-sb{
2585
+										justify-content: space-between;
2586
+									}
2587
+								}
2588
+							}
2571 2589
             }
2572 2590
           }
2573 2591
         }
@@ -2796,3 +2814,40 @@
2796 2814
     }
2797 2815
   }
2798 2816
 }
2817
+
2818
+.zw-content {
2819
+	width: 100%;
2820
+	padding: 20px;
2821
+	
2822
+	.item{
2823
+		width: 100%;
2824
+		margin-bottom: 20px;
2825
+		.res{
2826
+			color: red;
2827
+			color: 18px;
2828
+		}
2829
+		.label{
2830
+			width: 120px;
2831
+		}
2832
+		.mar{
2833
+			margin-right: 24px;
2834
+		}
2835
+		.ant-cascader-picker{
2836
+			width: 100% !important;
2837
+		}
2838
+	}
2839
+	.df{
2840
+		display: flex;
2841
+		align-items: center;
2842
+		.df-fl{
2843
+			display: flex;
2844
+			align-items: center;
2845
+		}
2846
+		.margin-right{
2847
+			margin-right: 20px;
2848
+		}
2849
+	}
2850
+	.lw-df{
2851
+		display: flex;
2852
+	}
2853
+}

+ 242 - 32
src/app/views/fuwutai/fuwutai.component.ts

@@ -104,6 +104,16 @@ export class FuwutaiComponent implements OnInit {
104 104
     static: false,
105 105
   })
106 106
   osComponentRef17: OverlayScrollbarsComponent;
107
+	@ViewChild("osComponentRef25", {
108
+	  read: OverlayScrollbarsComponent,
109
+	  static: false,
110
+	})
111
+	osComponentRef25: OverlayScrollbarsComponent;
112
+	@ViewChild("osComponentRef26", {
113
+	  read: OverlayScrollbarsComponent,
114
+	  static: false,
115
+	})
116
+	osComponentRef26: OverlayScrollbarsComponent;
107 117
   constructor(
108 118
     private fb: FormBuilder,
109 119
     public router: Router,
@@ -174,7 +184,8 @@ export class FuwutaiComponent implements OnInit {
174 184
 
175 185
   // 初始化增删改按钮
176 186
   coopBtns: any = {};
177
-
187
+	validateZwForm: FormGroup; //新增政务值班表单
188
+	
178 189
   // 获取院区配置配置,是否核酸打印
179 190
   isShowNucleicAcidPrinting = false;
180 191
   getHospitalConfigList(key) {
@@ -1487,7 +1498,7 @@ export class FuwutaiComponent implements OnInit {
1487 1498
     scopeGroups: [],
1488 1499
     orderScopeRadio: '0',
1489 1500
   }; //转运工单范围相关信息
1490
-
1501
+	showGovDuty:any; //是否开通政务值班
1491 1502
   itsmData: any = {
1492 1503
     checkedHos: [],
1493 1504
     scopeGroups: [],
@@ -1502,6 +1513,7 @@ export class FuwutaiComponent implements OnInit {
1502 1513
     this.checkedHos = scopeInfo.hospitalId ? scopeInfo.hospitalId.id : undefined;
1503 1514
     this.checkedHosDTO = scopeInfo.hospitalId || undefined;
1504 1515
     this.orderScopeRadio = scopeInfo.range + "";
1516
+		this.showGovDuty = scopeInfo.showGovDuty;
1505 1517
     let groupIds = scopeInfo.groupIds || [];
1506 1518
     let dutyGroupList = scopeInfo.dutyGroupList || [];
1507 1519
     this.scopeGroups = dutyGroupList.concat(groupIds);
@@ -1528,7 +1540,8 @@ export class FuwutaiComponent implements OnInit {
1528 1540
       mdv2Switch: scopeInfo.mdv2Switch === 1,
1529 1541
       allDuty: scopeInfo.allDuty === undefined ? 1 : scopeInfo.allDuty,
1530 1542
 			showReassign: scopeInfo.showReassign == null || scopeInfo.showReassign == 0 ? 0 : 1,
1531
-    }
1543
+			showGovDuty: scopeInfo.showGovDuty == null || scopeInfo.showGovDuty == 0 ? 0 : 1,
1544
+		}
1532 1545
     this.flagList.itsmFlag1 = this.itsmData.mdv2Switch;
1533 1546
     this.flagList.itsmFlag2 = this.itsmData.mdv2Switch;
1534 1547
     this.flagList.itsmFlag3 = this.itsmData.mdv2Switch;
@@ -1880,6 +1893,8 @@ export class FuwutaiComponent implements OnInit {
1880 1893
       this.getItsmOrders(this.incidentModel.department);
1881 1894
     } else if (i === 3) {
1882 1895
       this.getDictionaryList();
1896
+    }else if (i === 4) {
1897
+      this.getZwOrders();
1883 1898
     }
1884 1899
   }
1885 1900
   // 服务台新建工单—根据申请科室id来查询未到达工单(科室id)
@@ -1955,6 +1970,45 @@ export class FuwutaiComponent implements OnInit {
1955 1970
         }
1956 1971
       });
1957 1972
   }
1973
+	
1974
+	// 获取政务值班近期记录
1975
+	itsmZwOrders:any=[];
1976
+	getZwOrders(){
1977
+		let postData = {
1978
+		  governmentDuty: {
1979
+				callAccept: this.incidentModel.callID || undefined,
1980
+		    province: {
1981
+		    	id:null
1982
+		    },
1983
+		    city: {
1984
+		    	id:null
1985
+		    },
1986
+		    district: {
1987
+		    	id:null
1988
+		    }
1989
+		  },
1990
+		  idx: 0,
1991
+		  sum: 6,
1992
+		};
1993
+		if(this.province.length>0){
1994
+			postData.governmentDuty.province.id = this.province[0]
1995
+			postData.governmentDuty.city.id = this.province[1]
1996
+			postData.governmentDuty.district.id = this.province[2]
1997
+		}else{
1998
+			delete postData.governmentDuty.province
1999
+			delete postData.governmentDuty.city
2000
+			delete postData.governmentDuty.province
2001
+		}
2002
+		this.loading6 = true;
2003
+		this.mainService
2004
+		  .getFetchDataList("data", "governmentDuty", postData)
2005
+		  .subscribe((data) => {
2006
+		    this.loading6 = false;
2007
+		    if (data.status == 200) {
2008
+		      this.itsmZwOrders = data.list;
2009
+		    }
2010
+		  });
2011
+	}
1958 2012
   //获取知识库状态/类型
1959 2013
   getDictionaryList() {
1960 2014
     let solutionStatus$ = this.mainService.getDictionary('list', 'solution_status', true);
@@ -2053,7 +2107,9 @@ export class FuwutaiComponent implements OnInit {
2053 2107
           this.getItsmOrders(this.incidentModel.department);
2054 2108
         } else if (this.currentRTab === 3) {
2055 2109
           this.getDictionaryList();
2056
-        }
2110
+        } else if (this.currentRTab === 4) {
2111
+					this.getZwOrders();
2112
+				}
2057 2113
         this.orderRefreshTime = this.orderInfoTime;
2058 2114
       }
2059 2115
       if (this.workerRefreshTime == 0) {
@@ -2088,7 +2144,9 @@ export class FuwutaiComponent implements OnInit {
2088 2144
       this.getItsmOrders(this.incidentModel.department);
2089 2145
     } else if (this.currentRTab === 3) {
2090 2146
       this.getDictionaryList();
2091
-    }
2147
+    }else if (this.currentRTab === 4) {
2148
+			this.getZwOrders();
2149
+		}
2092 2150
   }
2093 2151
 
2094 2152
   // 切换顶部tab栏
@@ -2268,10 +2326,14 @@ export class FuwutaiComponent implements OnInit {
2268 2326
           "queryTask": "storageAcceptReassign",
2269 2327
           "assignee": this.tool.getCurrentUserId(),
2270 2328
           "deleteFlag": 0,
2271
-					"showReassign":null
2329
+					"showReassign":null,
2330
+					"showGovDuty":null
2272 2331
         }
2273 2332
 				postData.incidentQuery.incident.showReassign = this.user.user.scope.showReassign==0 || !this.user.user.scope.showReassign ? undefined : this.user.user.scope.showReassign
2274
-      }else if(stateId == 2){
2333
+				postData.incidentQuery.incident.showGovDuty = 
2334
+				this.user.user.scope.showGovDuty==0 || 
2335
+				!this.user.user.scope.showGovDuty ? undefined : this.user.user.scope.showGovDuty
2336
+			}else if(stateId == 2){
2275 2337
         postData.incidentQuery.incident = {
2276 2338
           // "groupIds": this.itsmData.allDuty == 1 ? undefined : (this.itsmData.scopeGroups.map(v => v.id).toString() || undefined),
2277 2339
           "dutyIds": this.itsmData.allDuty == 1 ? undefined : (this.itsmData.checkedHos.map(v => v.id).toString() || undefined),
@@ -2585,22 +2647,32 @@ export class FuwutaiComponent implements OnInit {
2585 2647
   }
2586 2648
   // 获取配置文件写死的任务类型ID(转科,给转出院记录用6)
2587 2649
   patientLogTasktypeLoading: boolean = false;
2650
+	showGovDutyConfig:any;
2588 2651
   patientLogTasktype() {
2589 2652
     if(!this.hsmsData.hsmsSwitch){
2590 2653
       return;
2591 2654
     }
2592 2655
     let postData = {
2593 2656
       idx: 0,
2594
-      sum: 1,
2595
-      systemConfiguration: {
2596
-        keyconfig: "transDeptTypeId",
2597
-      },
2657
+      sum: 999,
2658
+      // systemConfiguration: {
2659
+      //   keyconfig: "transDeptTypeId",
2660
+      // },
2598 2661
     };
2599 2662
     this.patientLogTasktypeLoading = true;
2600 2663
     this.mainService.getFetchDataList("simple/data", "systemConfiguration", postData).subscribe(res => {
2601 2664
       this.patientLogTasktypeLoading = false;
2602 2665
       if (res.status == 200) {
2603
-        this.deathTasktypeIdPatient = res.list.length ? res.list[0].valueconfig : undefined;
2666
+				res.list.forEach((c) => {
2667
+					switch (c.keyconfig) {
2668
+						case "transDeptTypeId":
2669
+							this.deathTasktypeIdPatient =  c.valueconfig
2670
+							break;
2671
+						case "governmentDuty":
2672
+							this.showGovDutyConfig =  c.valueconfig
2673
+							break;
2674
+					}
2675
+				});
2604 2676
       } else {
2605 2677
         this.msg.error('请求数据失败');
2606 2678
       }
@@ -2662,6 +2734,10 @@ export class FuwutaiComponent implements OnInit {
2662 2734
 									break;
2663 2735
 								case "hospitalModel":
2664 2736
 									this.hospitalModel = c[1]
2737
+									if(this.hospitalModel==1){
2738
+										this.incidentModel.hosId = this.tool.getCurrentHospital().id
2739
+										console.log(777777,this.incidentModel.hosId)
2740
+									}
2665 2741
 									break;	
2666 2742
 								case "applicantMustFillIn":
2667 2743
 									this.applicantMustFillIn = c[1]
@@ -2840,6 +2916,9 @@ export class FuwutaiComponent implements OnInit {
2840 2916
     this.radioValueZy = null;
2841 2917
     this.radioValueZyPre = null;
2842 2918
     this.defaultInspectFn();
2919
+		if(this.showGovDuty==1){
2920
+			this.initZwForm()
2921
+		}
2843 2922
     if(this.currentTabIndex === '患者转运'){
2844 2923
       this.getPatientList(this.applyDept, "", patient);
2845 2924
     }
@@ -2858,23 +2937,24 @@ export class FuwutaiComponent implements OnInit {
2858 2937
     this.deptQtList["endDept"] = [];
2859 2938
     this.deptQtList["startStatus"] = 0;
2860 2939
     this.deptQtList["endStatus"] = 0;
2940
+    // if(preCurrentTabIndex === '故障报修'){
2941
+    //   if(this.applyDept){
2942
+    //     this.rightTitle_tab = [
2943
+    //       { id: 0, name: '近期配送' },
2944
+    //       // { id: 1, name: '转出院记录' },
2945
+    //     ]
2946
+    //     this.rightTitleHandler(this.rightTitle_tab[0].id);
2947
+    //   }
2861 2948
 
2862
-    if(preCurrentTabIndex === '故障报修'){
2863
-      if(this.applyDept){
2864
-        this.rightTitle_tab = [
2865
-          { id: 0, name: '近期配送' },
2866
-          // { id: 1, name: '转出院记录' },
2867
-        ]
2868
-        this.rightTitleHandler(this.rightTitle_tab[0].id);
2869
-      }
2870
-
2871
-      let deptObj = this.applicationDeptList.find(v => v.id == this.incidentModel.department);
2949
+    //   let deptObj = this.applicationDeptList.find(v => v.id == this.incidentModel.department);
2872 2950
 
2873
-      if(this.applyDept != this.incidentModel.department){
2874
-        this.applyDept = this.incidentModel.department;
2875
-        this.searchApplicationDepartment('hsms', deptObj ? deptObj.dept : '', undefined, this.incidentModel.department);
2876
-      }
2877
-    }else if(this.currentTabIndex === '故障报修'){
2951
+    //   if(this.applyDept != this.incidentModel.department){
2952
+    //     this.applyDept = this.incidentModel.department;
2953
+    //     this.searchApplicationDepartment('hsms', deptObj ? deptObj.dept : '', undefined, this.incidentModel.department);
2954
+    //   }
2955
+    // }else
2956
+		 
2957
+		 if(this.currentTabIndex === '故障报修'){
2878 2958
       if(this.incidentModel.department){
2879 2959
         this.rightTitle_tab = [
2880 2960
           { id: 2, name: '近期维修' },
@@ -2889,8 +2969,122 @@ export class FuwutaiComponent implements OnInit {
2889 2969
         this.incidentModel.department = this.applyDept;
2890 2970
         this.searchApplicationDepartment('itsm', deptObj ? deptObj.dept : '', undefined, this.applyDept);
2891 2971
       }
2892
-    }
2972
+    }else if (this.currentTabIndex === '政务值班'){
2973
+			this.rightTitle_tab = [
2974
+			  { id: 4, name: '近期记录' },
2975
+			]
2976
+			this.rightTitleHandler(4);
2977
+			
2978
+			let deptObj = this.applicationDepartmentList.find(v => v.id == this.applyDept);
2979
+			
2980
+			if(this.incidentModel.department != this.applyDept && (!isInit || !this.buildType)){
2981
+			  this.incidentModel.department = this.applyDept;
2982
+			  this.searchApplicationDepartment('itsm', deptObj ? deptObj.dept : '', undefined, this.applyDept);
2983
+			}
2984
+		}
2893 2985
   }
2986
+	
2987
+	// 获取省市区
2988
+	priorityData:any = [];
2989
+	nzOptions:any = [];
2990
+	getCity(){
2991
+		this.mainService.getDictionary("tree", "administrative_division").subscribe((res) => {
2992
+			let list = res;
2993
+			list = list.map(v => ({...v, parentId: v.parent ? v.parent : undefined, label: v.name, value: v.id}));
2994
+			this.nzOptions = this.tool.tranListToTreeDataLeaf(list, undefined, "parentId");
2995
+		});
2996
+	}
2997
+	
2998
+	// 选择省市区
2999
+	onProvinceChanges	(values: any): void {
3000
+		this.getZwOrders();
3001
+	}
3002
+	
3003
+	// 初始化政务值班form
3004
+	sketch:any = null;
3005
+	record:any = null;
3006
+	contactsPhone:any = null;
3007
+	contacts:any = null;
3008
+	province:any = [];
3009
+	complainant:any = null;
3010
+	detailedAddress:any = null;
3011
+	initZwForm(){
3012
+		this.sketch = null;
3013
+		this.record = null;
3014
+		this.contactsPhone = null;
3015
+		this.contacts = null;
3016
+		this.province = [];
3017
+		this.complainant = null;
3018
+		this.detailedAddress = null;
3019
+	}
3020
+	
3021
+	// 保存政务值班
3022
+	zwLoading:boolean = false;
3023
+	saveZwOrder(): void{
3024
+		var that = this;
3025
+		if(!this.contacts){
3026
+			this.msg.error('联系人不能为空')
3027
+			return
3028
+		}
3029
+		if(!this.contactsPhone){
3030
+			this.msg.error('联系电话不能为空')
3031
+			return
3032
+		}
3033
+		if(!this.complainant){
3034
+			this.msg.error('投诉人不能为空')
3035
+			return
3036
+		}
3037
+		if(this.province.length==0){
3038
+			this.msg.error('省市区不能为空')
3039
+			return
3040
+		}
3041
+		if(this.detailedAddress.length==0){
3042
+			this.msg.error('详细地址不能为空')
3043
+			return
3044
+		}
3045
+		if(!this.sketch){
3046
+			this.msg.error('简述不能为空')
3047
+			return
3048
+		}
3049
+		if(!this.record){
3050
+			this.msg.error('记录内容不能为空')
3051
+			return
3052
+		}
3053
+		let data = {
3054
+			governmentDuty:{
3055
+				sketch: this.sketch,
3056
+				record: this.record,
3057
+				contactsPhone: this.contactsPhone,
3058
+				contacts: this.contacts,
3059
+				complainant: this.complainant,
3060
+				detailedAddress: this.complainant,
3061
+				province: {
3062
+					id: this.province[0]
3063
+				},
3064
+				city: {
3065
+					id: this.province[1]
3066
+				},
3067
+				district: {
3068
+					id: this.province[2]
3069
+				},
3070
+				callAccept: this.incidentModel.callID || undefined
3071
+			}
3072
+		};
3073
+		that.zwLoading = true;
3074
+		that.mainService
3075
+			.dataPost("addData", "governmentDuty", data)
3076
+			.subscribe((data) => {
3077
+				that.zwLoading = false;
3078
+				that.initZwForm();
3079
+				if (data.status == 200) {
3080
+					this.getZwOrders();
3081
+					that.showPromptModal("新增", true, "");
3082
+				} else {
3083
+					that.showPromptModal("新增", false, data.msg);
3084
+				}
3085
+			});
3086
+	}
3087
+	
2894 3088
   // 获取患者信息
2895 3089
   searchPatientList(id, searchWords) {
2896 3090
     this.searchPatientListSubject.next([id, searchWords]);
@@ -3574,6 +3768,7 @@ export class FuwutaiComponent implements OnInit {
3574 3768
     if(!this.hsmsData.hsmsSwitch && !this.itsmData.mdv2Switch){
3575 3769
       return;
3576 3770
     }
3771
+		console.log(8787878787878,type)
3577 3772
     let keyWord = "";
3578 3773
     if (e && e !== "&ks&" && e !== "&go&") {
3579 3774
       keyWord = e;
@@ -3828,7 +4023,9 @@ export class FuwutaiComponent implements OnInit {
3828 4023
         this.getItsmOrders(this.incidentModel.department);
3829 4024
       } else if (this.currentRTab === 3) {
3830 4025
         this.getDictionaryList();
3831
-      }
4026
+      }else if (this.currentRTab === 4) {
4027
+				this.getZwOrders();
4028
+			}
3832 4029
     } else if (phone === "&go&") {
3833 4030
       if (this.currentTabIndex == "患者转运") {
3834 4031
         //患者转运
@@ -3843,7 +4040,9 @@ export class FuwutaiComponent implements OnInit {
3843 4040
         this.getItsmOrders(this.incidentModel.department);
3844 4041
       } else if (this.currentRTab === 3) {
3845 4042
         this.getDictionaryList();
3846
-      }
4043
+      }else if (this.currentRTab === 4) {
4044
+				this.getZwOrders();
4045
+			}
3847 4046
     } else if (phone === "&same&") {
3848 4047
       if (this.currentTabIndex == "患者转运") {
3849 4048
         //患者转运
@@ -3858,7 +4057,9 @@ export class FuwutaiComponent implements OnInit {
3858 4057
         this.getItsmOrders(this.incidentModel.department);
3859 4058
       } else if (this.currentRTab === 3) {
3860 4059
         this.getDictionaryList();
3861
-      }
4060
+      }else if (this.currentRTab === 4) {
4061
+				this.getZwOrders();
4062
+			}
3862 4063
     }
3863 4064
   }
3864 4065
 
@@ -4297,6 +4498,13 @@ export class FuwutaiComponent implements OnInit {
4297 4498
     // 运维
4298 4499
     if(this.itsmData.mdv2Switch){
4299 4500
       this.workTypesArrange = [{key:'故障报修', value: []}];
4501
+			if(this.showGovDuty==1){
4502
+				this.workTypesArrange.push({
4503
+					key:'政务值班', value: []
4504
+				})
4505
+				this.initZwForm();
4506
+				this.getCity();
4507
+			}
4300 4508
       if(!this.hsmsData.hsmsSwitch){
4301 4509
         console.log('workTypesArrange', this.workTypesArrange);
4302 4510
         // 是否显示操作项
@@ -5565,7 +5773,9 @@ export class FuwutaiComponent implements OnInit {
5565 5773
       this.getItsmOrders(this.incidentModel.department);
5566 5774
     } else if (this.currentRTab === 3) {
5567 5775
       this.getDictionaryList();
5568
-    }
5776
+    }else if (this.currentRTab === 4) {
5777
+			this.getZwOrders();
5778
+		}
5569 5779
 		// this.newOrderShow = false;
5570 5780
 		// this.newOrderShowOpen = false;
5571 5781
     this.fixedTab = "";

+ 15 - 0
src/app/views/government-duty/government-duty-routing.module.ts

@@ -0,0 +1,15 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+import { GovernmentDutyComponent } from './government-duty.component';
4
+
5
+
6
+const routes: Routes = [{
7
+  path: '',
8
+  component: GovernmentDutyComponent
9
+}];
10
+
11
+@NgModule({
12
+  imports: [RouterModule.forChild(routes)],
13
+  exports: [RouterModule]
14
+})
15
+export class GovernmentDutyRoutingModule { }

+ 247 - 0
src/app/views/government-duty/government-duty.component.html

@@ -0,0 +1,247 @@
1
+<div class="list-template">
2
+  <div class="list-template__content">
3
+    <div class="list-template__top" nz-row>
4
+      <div nz-col nzXl='18' class="list-template__searchBox">
5
+				<div class="list-template__searchItem">
6
+				  <span class="label width-105">记录时间区间:</span>
7
+				  <nz-range-picker nzShowTime [(ngModel)]="dateRange" (ngModelChange)="changeDate($event)"></nz-range-picker>
8
+				</div>
9
+				<div class="list-template__searchItem">
10
+				  <span class="label">来电电话</span>:
11
+				  <input nz-input class="formItem" [(ngModel)]="incomingCall" placeholder="请输入来电电话" nzSize="default" />
12
+				</div>
13
+				<div class="list-template__searchItem">
14
+				  <span class="label">投诉人</span>:
15
+				  <input nz-input class="formItem" [(ngModel)]="complainant" placeholder="请输入投诉人" nzSize="default" />
16
+				</div>
17
+				<div class="list-template__searchItem">
18
+				  <span class="label">省市区:</span>
19
+					<nz-cascader [nzOptions]="nzOptions" [(ngModel)]="district" (ngModelChange)="onChanges($event)"></nz-cascader>
20
+				</div>
21
+      </div>
22
+      <div nz-col nzXl='6' class="list-template__btns">
23
+        <button nz-button class="btn default" (click)='search()'>搜索</button>
24
+        <button nz-button class="btn ml8 default" (click)='reset()'>重置</button>
25
+        <button nz-button *ngIf="coopBtns.add" class="btn ml8 default" (click)="showModal()">新增</button>
26
+      </div>
27
+    </div>
28
+    <div class="list-template__bottom">
29
+      <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
30
+        [nzLoading]="loading1">
31
+        <thead>
32
+          <tr class="thead">
33
+            <th>单号</th>
34
+            <th>来电电话</th>
35
+            <th>投诉人</th>
36
+            <th>记录人</th>
37
+            <th>记录内容</th>
38
+						<th>记录时间</th>
39
+						<th>联系电话</th>
40
+						<th>省/市/区/详细地址</th>
41
+            <th nzWidth="180px">操作</th>
42
+          </tr>
43
+        </thead>
44
+        <tbody>
45
+          <tr *ngFor="let data of listOfData;let index=index;">
46
+            <td>{{ data.govDutySign||'-' }}</td>
47
+            <td>{{ data.incomingCall||'-' }}</td>
48
+            <td>{{ data.complainant||'-'}}</td>
49
+						<td>{{ data.userDTO && data.userDTO.name ||'-'}}</td>
50
+            <td>{{ data.record||'-' }}</td>
51
+            <td>{{ data.addTime | date:'yyyy-MM-dd HH:mm:ss' }}</td>
52
+            <td>{{ data.contactsPhone || '-'}}</td>
53
+						<td>
54
+							{{ data.province && data.province.name || '-'}}/
55
+							{{ data.city && data.city.name || '-'}}/
56
+							{{ data.district && data.district.name || '-'}}/
57
+							{{ data.detailedAddress || '-'}}
58
+						</td>
59
+            <td>
60
+              <div class="coop">
61
+                <span *ngIf="coopBtns.edit" (click)="edit(data)">编辑</span>
62
+                <span *ngIf="coopBtns.del" (click)="del(data)">删除</span>
63
+							</div>
64
+            </td>
65
+          </tr>
66
+        </tbody>
67
+      </nz-table>
68
+      <div class="list-template__pagination">
69
+        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
70
+          (nzPageIndexChange)="getList()" (nzPageSizeChange)="getList()">
71
+        </nz-pagination>
72
+      </div>
73
+    </div>
74
+  </div>
75
+</div>
76
+<!-- 新增/编辑模态框 -->
77
+<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="modal">
78
+  <div class="modalBody">
79
+    <div class="title">{{add?"新增":"编辑"}}<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
80
+    </div>
81
+    <div class="content">
82
+      <form nz-form [formGroup]="validateForm" class="addForm" (ngSubmit)="submitForm()">
83
+        <nz-form-item>
84
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="incomingCall">来电电话</nz-form-label>
85
+          <nz-form-control nzErrorTip="请选择来电电话!">
86
+            <nz-input-group>
87
+        			<input nz-input type="number" class="formItem" formControlName="incomingCall" placeholder="请输入来电电话" nzSize="default" />
88
+            </nz-input-group>
89
+          </nz-form-control>
90
+        </nz-form-item>
91
+				
92
+				<nz-form-item>
93
+				  <nz-form-label class="margin-label" [nzSm]="6" [nzXs]="24" nzRequired nzFor="sketch">简述</nz-form-label>
94
+				  <nz-form-control nzErrorTip="请选择简述!">
95
+				    <nz-input-group>
96
+							<textarea formControlName="sketch" nz-input rows="1" placeholder="请输入简述"></textarea>
97
+						</nz-input-group>
98
+				  </nz-form-control>
99
+				</nz-form-item>
100
+				
101
+				<nz-form-item>
102
+				  <nz-form-label class="margin-label" [nzSm]="6" [nzXs]="24" nzRequired nzFor="record">记录内容</nz-form-label>
103
+				  <nz-form-control nzErrorTip="请选择记录内容!">
104
+				    <nz-input-group>
105
+							<textarea formControlName="record" nz-input rows="3" placeholder="请输入记录内容"></textarea>
106
+						</nz-input-group>
107
+				  </nz-form-control>
108
+				</nz-form-item>
109
+				
110
+				<nz-form-item>
111
+				  <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="contactsPhone">联系电话</nz-form-label>
112
+				  <nz-form-control nzErrorTip="请选择联系电话!">
113
+				    <nz-input-group>
114
+							<input nz-input type="number" class="formItem" formControlName="contactsPhone" placeholder="请输入联系电话" nzSize="default" />
115
+				    </nz-input-group>
116
+				  </nz-form-control>
117
+				</nz-form-item>
118
+				
119
+				<nz-form-item>
120
+				  <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="contacts">联系人</nz-form-label>
121
+				  <nz-form-control nzErrorTip="请选择联系人!">
122
+				    <nz-input-group>
123
+							<input nz-input class="formItem" formControlName="contacts" placeholder="请输入联系人" nzSize="default" />
124
+				    </nz-input-group>
125
+				  </nz-form-control>
126
+				</nz-form-item>
127
+				
128
+				<nz-form-item>
129
+				  <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="complainant">投诉人</nz-form-label>
130
+				  <nz-form-control nzErrorTip="请选择投诉人!">
131
+				    <nz-input-group>
132
+							<input nz-input class="formItem" formControlName="complainant" placeholder="请输入投诉人" nzSize="default" />
133
+				    </nz-input-group>
134
+				  </nz-form-control>
135
+				</nz-form-item>
136
+				
137
+				<nz-form-item>
138
+				  <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="province">省市区</nz-form-label>
139
+				  <nz-form-control nzErrorTip="请选择省市区!">
140
+				    <nz-input-group>
141
+							<nz-cascader [nzOptions]="nzOptions" formControlName="province" placeholder="请选择省市区" (ngModelChange)="onProvinceChanges($event)"></nz-cascader>
142
+				    </nz-input-group>
143
+				  </nz-form-control>
144
+				</nz-form-item>
145
+				
146
+				<nz-form-item>
147
+				  <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="detailedAddress">详细地址</nz-form-label>
148
+				  <nz-form-control nzErrorTip="请选择详细地址!">
149
+				    <nz-input-group>
150
+							<input nz-input class="formItem" formControlName="detailedAddress" placeholder="请输入详细地址" nzSize="default" />
151
+				    </nz-input-group>
152
+				  </nz-form-control>
153
+				</nz-form-item>
154
+				
155
+      </form>
156
+    </div>
157
+    <div class="display_flex justify-content_flex-center">
158
+      <button nzType="primary" nz-button (click)="submitForm()" [nzLoading]="btnLoading">确认</button>
159
+      <button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
160
+    </div>
161
+  </div>
162
+</div>
163
+
164
+<!-- 分配任务 -->
165
+<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="allocationModal">
166
+  <div class="modalBody">
167
+    <div class="title">分配任务<i class="icon_transport transport-guanbi" (click)="hideAllocationModal()"></i>
168
+    </div>
169
+    <div class="content">
170
+      <form nz-form [formGroup]="validateAllocationForm" class="addForm" (ngSubmit)="submitAllocationForm()">
171
+				
172
+				<nz-form-item>
173
+				  <nz-form-label class="margin-label" [nzSm]="6" [nzXs]="24" nzRequired nzFor="taskContent">任务内容</nz-form-label>
174
+				  <nz-form-control nzErrorTip="请选择任务内容!">
175
+				    <nz-input-group>
176
+							<textarea formControlName="taskContent" nz-input rows="3" placeholder="请输入任务内容"></textarea>
177
+						</nz-input-group>
178
+				  </nz-form-control>
179
+				</nz-form-item>
180
+				
181
+				<nz-form-item>
182
+				  <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="executor">执行人</nz-form-label>
183
+				  <nz-form-control nzErrorTip="请选择执行人!">
184
+				    <nz-input-group>
185
+							<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
186
+							  (nzOnSearch)="changeUser($event)" nzAllowClear nzPlaceHolder="请选择执行人" formControlName="executor">
187
+							  <ng-container *ngFor="let option of dutyUser">
188
+							    <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
189
+							  </ng-container>
190
+								<nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
191
+								  <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
192
+								</nz-option>
193
+							</nz-select>
194
+				    </nz-input-group>
195
+				  </nz-form-control>
196
+				</nz-form-item>
197
+				
198
+				<nz-form-item>
199
+          <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="estimatedCompletionTime">预计完成时间</nz-form-label>
200
+          <nz-form-control nzErrorTip="请选择预计完成时间!">
201
+            <nz-input-group>
202
+              <nz-date-picker
203
+								class="width-100"
204
+								nzShowTime
205
+								nzFormat="yyyy-MM-dd HH:mm:ss"
206
+								nzPlaceHolder="请选择预计完成时间"
207
+								formControlName="estimatedCompletionTime"
208
+								(ngModelChange)="onAllocationChange($event)"
209
+							></nz-date-picker>
210
+            </nz-input-group>
211
+          </nz-form-control>
212
+        </nz-form-item>
213
+      </form>
214
+    </div>
215
+    <div class="display_flex justify-content_flex-center">
216
+      <button nzType="primary" nz-button (click)="submitAllocationForm()" [nzLoading]="btnLoading">确认</button>
217
+      <button class="btn cancel" nz-button nzType="default" (click)="hideAllocationModal()">取消</button>
218
+    </div>
219
+  </div>
220
+</div>
221
+<!-- 任务完成 -->
222
+<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="accomplishModal">
223
+  <div class="modalBody">
224
+    <div class="title">任务完成<i class="icon_transport transport-guanbi"></i>
225
+    </div>
226
+    <div class="content padding-bottom">
227
+			<span class="label"><span class="sign">*</span> 月度任务总结:</span>
228
+      <textarea [(ngModel)]="taskConclusion" nz-input rows="3" placeholder="请输入任务内容"></textarea>
229
+    </div>
230
+    <div class="display_flex justify-content_flex-center">
231
+      <button nzType="primary" nz-button (click)="submitAccomplishForm()" [nzLoading]="btnLoading">确认</button>
232
+      <button class="btn cancel" nz-button nzType="default" (click)="hideAccomplishModal()">取消</button>
233
+    </div>
234
+  </div>
235
+</div>
236
+<!-- 删除模态框 -->
237
+<app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading" 
238
+  (confirmDelEvent)="confirmDel()" (cancelDelEvent)="cancelDel()" content="您确认要删除吗?" confirmTxt="是" cancelTxt="否">
239
+</app-dialog-delete>
240
+
241
+<!-- 操作成功/失败提示框 -->
242
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
243
+  [info]="promptInfo"></app-prompt-modal>
244
+
245
+<!-- 查看详情 -->
246
+<router-outlet (deactivate)="getList()"></router-outlet>
247
+

+ 178 - 0
src/app/views/government-duty/government-duty.component.less

@@ -0,0 +1,178 @@
1
+@import "../../../../src/theme.less";
2
+.width-105{
3
+	width: 105px !important;
4
+}
5
+.save {
6
+  position: fixed;
7
+  left: 0;
8
+  top: 0;
9
+  width: 100%;
10
+  height: 100%;
11
+  background: rgba(0, 0, 0, 0.4);
12
+  z-index: 99;
13
+
14
+  .modalBody {
15
+    width: 60%;
16
+    background: #fff;
17
+    border-radius: 5px;
18
+    padding: 10px 20px;
19
+    color: #333;
20
+
21
+    .title {
22
+      width: 100%;
23
+      text-align: center;
24
+      font-size: 18px;
25
+      position: relative;
26
+
27
+      i {
28
+        position: absolute;
29
+        right: 0;
30
+        top: 0;
31
+        font-size: 20px;
32
+        color: #666;
33
+        cursor: pointer;
34
+        padding: 0 5px;
35
+      }
36
+    }
37
+
38
+    .content {
39
+      width: 100%;
40
+      // height: 117px;
41
+      background: #f9fafb;
42
+      border: 1px solid #e5e9ed;
43
+      border-radius: 5px;
44
+      // overflow: hidden;
45
+      margin-top: 12px;
46
+
47
+      div {
48
+        text-align: center;
49
+        margin: 0;
50
+
51
+        &.icon {
52
+          margin-top: 17px;
53
+
54
+          i {
55
+            color: #34b349;
56
+            font-size: 30px !important;
57
+
58
+            &.transport-wenhao {
59
+              color: #f5a523;
60
+            }
61
+
62
+            &.transport-shibai {
63
+              color: #ff3a52;
64
+            }
65
+          }
66
+        }
67
+
68
+        &.defeat {
69
+          color: #333;
70
+          font-size: 18px;
71
+        }
72
+
73
+        &:nth-child(3) {
74
+          font-size: 14px;
75
+          color: #666;
76
+        }
77
+      }
78
+    }
79
+
80
+    button {
81
+      margin-top: 10px;
82
+
83
+      &.btn {
84
+        margin-left: 8px;
85
+      }
86
+    }
87
+  }
88
+
89
+  // 新增
90
+  &.add {
91
+    .modalBody {
92
+      width: 40%;
93
+      height: auto;
94
+			
95
+			.padding-bottom{
96
+				padding-bottom: 20px !important;
97
+				.label{
98
+					margin-bottom: 5px;
99
+					.sign{
100
+						color: red;
101
+						font-size: 15px;
102
+					}
103
+				}
104
+			}
105
+			
106
+      .content {
107
+        width: 100%;
108
+        // height: auto;
109
+        padding: 19px 14px 0 14px;
110
+        max-height: 450px;
111
+        overflow-y: auto;
112
+
113
+        .addForm {
114
+          .ant-form-item {
115
+            margin-bottom: 8px;
116
+						.ant-select{
117
+							width: 100% !important;
118
+						}
119
+						.ant-input-number{
120
+							width: 100% !important;
121
+						}
122
+            .ant-form-item-label {
123
+              line-height: 14px;
124
+              text-align: left;
125
+            }
126
+						.margin-label{
127
+							margin-bottom: 5px !important;
128
+						}
129
+						.ant-calendar-picker{
130
+							width: 100% !important;
131
+						}
132
+						.ant-cascader-picker{
133
+							width: 100% !important;
134
+						}
135
+          }
136
+					.address{
137
+					  position: relative;
138
+					  .addressList{
139
+					    position: absolute;
140
+					    bottom: 100%;
141
+					    left: 0;
142
+					    width: 100%;
143
+					    max-height: 256px;
144
+					    z-index: 2;
145
+					    background: #fff;
146
+					    border: 1px solid #d9d9d9;
147
+					    border-radius: 4px;
148
+					    overflow: hidden auto;
149
+					    .addressItem{
150
+					      padding: 5px 12px;
151
+					      cursor: pointer;
152
+					      &:hover{
153
+					        background-color: #e9f7e9;
154
+					      }
155
+					    }
156
+					  }
157
+					}
158
+        }
159
+
160
+        .editForm {
161
+          .ant-form-item {
162
+            margin-bottom: 14px;
163
+						.ant-input-number{
164
+							width: 100% !important;
165
+						}
166
+            .ant-form-item-label {
167
+              line-height: 0;
168
+            }
169
+          }
170
+        }
171
+      }
172
+
173
+      button:nth-child(1) {
174
+        margin-right: 20px;
175
+      }
176
+    }
177
+  }
178
+}

+ 452 - 0
src/app/views/government-duty/government-duty.component.ts

@@ -0,0 +1,452 @@
1
+import { Component, OnInit, ViewChild } from "@angular/core";
2
+import { ActivatedRoute, Router } from "@angular/router";
3
+import { FormBuilder, Validators, FormGroup, FormControl } from "@angular/forms";
4
+
5
+import { MainService } from "../../services/main.service";
6
+import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
7
+import { ToolService } from "../../services/tool.service";
8
+import { forkJoin, Subject } from "rxjs";
9
+import { debounceTime } from "rxjs/operators";
10
+import { NzMessageService } from "ng-zorro-antd";
11
+import { format, startOfDay, endOfDay } from 'date-fns';
12
+
13
+@Component({
14
+  selector: "app-government-duty",
15
+  templateUrl: "./government-duty.component.html",
16
+  styleUrls: ["./government-duty.component.less"],
17
+})
18
+export class GovernmentDutyComponent implements OnInit {
19
+  @ViewChild("osComponentRef1", {
20
+    read: OverlayScrollbarsComponent,
21
+    static: false,
22
+  })
23
+  osComponentRef1: OverlayScrollbarsComponent;
24
+  constructor(
25
+    private message: NzMessageService,
26
+    private fb: FormBuilder,
27
+    private route: ActivatedRoute,
28
+    private router: Router,
29
+    private mainService: MainService,
30
+    private tool: ToolService
31
+  ) {}
32
+
33
+  listOfData: any[] = []; //表格数据
34
+
35
+  modal: boolean = false; //新增/编辑模态框
36
+  add: boolean; //true:新增;false:编辑
37
+  validateForm: FormGroup; //新增/编辑表单
38
+	validateAllocationForm: FormGroup; //新增/编辑表单
39
+  coopId: number; //表格中执行操作的id
40
+  dept: any; //所属科室
41
+  drugCode; //编号
42
+  name; //名称
43
+  userType: any; //用户类型
44
+  hosId: any; //院区(搜索)
45
+  userGroup; //所属组
46
+  userGroup1; //所属组(搜索)
47
+  userTypes: Array<any>; //所有用户类型
48
+  alldepart: any = []; //所有所属科室
49
+  alldepart1: any = []; //所有所属科室(搜索)
50
+  hospitals1: any = []; //院区列表(搜索)
51
+	drugTypeData: any = []; //药品类型
52
+  allUserGroup: Array<any>; //所有用户组
53
+  allUserGroup1: Array<any>; //用户组(搜索)
54
+  allUserRole: Array<any>; //所有角色
55
+  pageIndex: number = 1; //页码
56
+  listLength: number = 10; //总条数
57
+  pageSize: number = 10; //每页条数
58
+
59
+  promptContent: string; //操作提示框提示信息
60
+  ifSuccess: boolean; //操作成功/失败
61
+  promptInfo: string; //操作结果提示信息
62
+  promptModalShow: boolean; //操作提示框是否展示
63
+
64
+  btnLoading: boolean = false; //提交按钮loading状态
65
+  wxRequired = false; //新增或编辑用户的时候,微信号是否必填
66
+  changeInpSubject = new Subject(); //防抖
67
+	searchParentDeptSubject = new Subject();
68
+	specimenName:any = null;
69
+	containPosition:any = null;
70
+	placeList:any = [];
71
+	systemList:any = [];
72
+	apparatusList:any = [];
73
+	specimenNameList:any = [];
74
+	addressLoading:any = false;
75
+	complainant:any;
76
+	incomingCall:any;
77
+	options:any = [];
78
+	nzOptions:any;
79
+	district:any = [];
80
+	stateData:any = [];
81
+	
82
+  ngOnInit() {
83
+    this.coopBtns = this.tool.initCoopBtns(this.route);
84
+		this.hosId = this.tool.getCurrentHospital().id;
85
+    this.initForm();
86
+		this.getList();
87
+		this.getDicData();
88
+  }
89
+	
90
+	// 选择省市区
91
+	onChanges(values: any): void {
92
+		// console.log(values, this.district);
93
+	}
94
+	
95
+	onProvinceChanges	(values: any): void {
96
+		console.log(111,values);
97
+	}
98
+	
99
+  // 初始化增删改按钮
100
+  coopBtns: any = {};
101
+  // 搜索
102
+  search() {
103
+    this.pageIndex = 1;
104
+    this.getList();
105
+  }
106
+  // 重置
107
+  reset() {
108
+    this.pageIndex = 1;
109
+    this.complainant = null;
110
+    this.incomingCall = null;
111
+    this.startDate = null;
112
+    this.endDate = null;
113
+		this.dateRange = [];
114
+		this.district = [];
115
+    this.getList();
116
+  }
117
+	
118
+  // 表格数据
119
+  loading1 = false;
120
+  getList() {
121
+    let data = {
122
+      idx: this.pageIndex - 1,
123
+      sum: this.pageSize,
124
+      governmentDuty: {
125
+				complainant: this.complainant || undefined,
126
+				incomingCall: this.incomingCall || undefined,
127
+				startTime: this.startDate || undefined,
128
+				endTime: this.endDate || undefined,
129
+				province: {
130
+					id:null
131
+				},
132
+				city: {
133
+					id:null
134
+				},
135
+				district: {
136
+					id:null
137
+				}
138
+      }
139
+    };
140
+		if(this.district.length>0){
141
+			data.governmentDuty.province.id = this.district[0]
142
+			data.governmentDuty.city.id = this.district[1]
143
+			data.governmentDuty.district.id = this.district[2]
144
+		}else{
145
+			delete data.governmentDuty.province
146
+			delete data.governmentDuty.city
147
+			delete data.governmentDuty.district
148
+		}
149
+    this.loading1 = true;
150
+    this.mainService
151
+      .getFetchDataList("data", "governmentDuty", data)
152
+      .subscribe((data) => {
153
+        this.loading1 = false;
154
+        this.listOfData = data.list;
155
+        this.listLength = data.totalNum;
156
+      });
157
+  }
158
+	
159
+	// 日期选择
160
+	startDate: string; //发起时间开始
161
+	endDate: string; //发起时间结束
162
+	dateRange: any = [];
163
+	changeDate(result?): void {
164
+	  if (result.length==0) {
165
+	    this.startDate = this.endDate = null;
166
+	    return;
167
+	  }
168
+	  this.startDate = format(startOfDay(result[0]), 'yyyy-MM-dd HH:mm:ss');
169
+	  this.endDate = format(endOfDay(result[1]), 'yyyy-MM-dd HH:mm:ss');
170
+	  this.dateRange = [this.startDate,this.endDate]
171
+	}
172
+	
173
+	// 获取责任人
174
+	dutyUser:any= [];
175
+	getAllUser(name) {
176
+	  let data:any = {
177
+	    user: {
178
+				name,
179
+	      hosIds: this.hosId,
180
+	    },
181
+	    idx: 0,
182
+	    sum: 20,
183
+	  };
184
+	  this.mainService
185
+	    .getFetchDataList("data", "user", data)
186
+	    .subscribe((data) => {
187
+				this.isLoading = false
188
+				this.dutyUser = data.list
189
+	    });
190
+	}
191
+	
192
+	// 搜索责任人
193
+	isLoading = false;
194
+	changeUser(e,type) {
195
+	  this.searchParentDeptSubject.next([e,type]);
196
+	}
197
+	
198
+	// 获取省市区
199
+	priorityData:any = [];
200
+	getDicData(){
201
+		this.mainService.getDictionary("tree", "administrative_division").subscribe((res) => {
202
+			let list = res;
203
+			list = list.map(v => ({...v, parentId: v.parent ? v.parent : undefined, label: v.name, value: v.id}));
204
+			this.nzOptions = this.tool.tranListToTreeDataLeaf(list, undefined, "parentId");
205
+		});
206
+	}
207
+	
208
+	// 分配任务
209
+	allocationModal:boolean = false;
210
+	allocation(data){
211
+		this.coopId = data.id;
212
+		this.allocationModal = true
213
+		this.initAllocationForm();
214
+	}
215
+	
216
+	hideAllocationModal() {
217
+	  this.allocationModal = false;
218
+		this.initAllocationForm();
219
+	}
220
+	
221
+	// 初始化新增form表单
222
+	initAllocationForm() {
223
+	  this.validateAllocationForm = this.fb.group({
224
+	    taskContent: [null, [Validators.required]],
225
+			executor: [null, [Validators.required]],
226
+	    estimatedCompletionTime: [null, [Validators.required]],
227
+	  });
228
+	}
229
+	
230
+	onAllocationChange(result?): void {
231
+		console.log('Selected Time: ', result);
232
+		let endTime = format(result, 'yyyy-MM-dd HH:mm:ss');
233
+		this.validateAllocationForm.controls.estimatedCompletionTime.setValue(endTime);
234
+	}
235
+		
236
+	// 表单提交
237
+	submitAllocationForm(): void {
238
+	  var that = this;
239
+		for (const i in that.validateAllocationForm.controls) {
240
+		  that.validateAllocationForm.controls[i].markAsDirty();
241
+		  that.validateAllocationForm.controls[i].updateValueAndValidity();
242
+		}
243
+		if (that.validateAllocationForm.invalid) return;
244
+	  let data = {
245
+			governmentDutyList:{
246
+				taskContent: this.validateAllocationForm.value.taskContent,
247
+				executor: this.validateAllocationForm.value.executor,
248
+				estimatedCompletionTime: this.validateAllocationForm.value.estimatedCompletionTime,
249
+				governmentDuty: that.coopId,
250
+			}
251
+	  };
252
+
253
+		that.btnLoading = true;
254
+	  that.mainService
255
+	    .dataPost("addData", "governmentDutyList", data)
256
+	    .subscribe((data) => {
257
+	      that.btnLoading = false;
258
+	      that.hideAllocationModal();
259
+	      if (data.status == 200) {
260
+	        that.showPromptModal("分配", true, "");
261
+	      } else {
262
+	        that.showPromptModal("分配", false, data.msg);
263
+	      }
264
+	    });
265
+	}
266
+	
267
+	// 任务完成
268
+	accomplishModal:boolean = false;
269
+	taskConclusion:any;
270
+	accomplish(data){
271
+		this.coopId = data.id;
272
+		this.taskConclusion = null;
273
+		this.accomplishModal = true
274
+	}
275
+	
276
+	// 任务完成提交
277
+	submitAccomplishForm(){
278
+		if(!this.taskConclusion){
279
+			this.message.error('月度任务总结不能为空!')
280
+			return
281
+		}
282
+		let data = {
283
+			governmentDuty:{
284
+				taskConclusion: this.taskConclusion,
285
+				operationType: 'taskDone',
286
+				id:this.coopId
287
+			}
288
+		};
289
+		this.btnLoading = true;
290
+		this.mainService
291
+		  .dataPost("updData", "governmentDuty", data)
292
+		  .subscribe((data) => {
293
+		    this.btnLoading = false;
294
+		    this.hideAccomplishModal();
295
+		    if (data.status == 200) {
296
+		      this.showPromptModal("操作", true, "");
297
+		    } else {
298
+		      this.showPromptModal("操作", false, data.msg);
299
+		    }
300
+		  });
301
+	}
302
+	
303
+	hideAccomplishModal(){
304
+		this.accomplishModal = false
305
+	}
306
+	
307
+  // 新增弹框
308
+  showModal() {
309
+    this.add = true;
310
+		this.modal = true;
311
+		this.itemData = null;
312
+    this.initForm();
313
+  }
314
+  hideModal() {
315
+    this.modal = false;
316
+    this.initForm();
317
+  }
318
+	
319
+  // 初始化新增form表单
320
+  initForm() {
321
+    this.validateForm = this.fb.group({
322
+			incomingCall:[null, []],
323
+      sketch: [null, [Validators.required]],
324
+      record: [null, [Validators.required]],
325
+			contactsPhone: [null, [Validators.required]],
326
+      contacts: [null, [Validators.required]],
327
+      province: [null, [Validators.required]],
328
+			detailedAddress: [null, [Validators.required]],
329
+			complainant: [null, [Validators.required]],
330
+    });
331
+  }
332
+		
333
+  // 表单提交
334
+  submitForm(): void {
335
+    var that = this;
336
+		for (const i in that.validateForm.controls) {
337
+		  that.validateForm.controls[i].markAsDirty();
338
+		  that.validateForm.controls[i].updateValueAndValidity();
339
+		}
340
+		if (that.validateForm.invalid) return;
341
+    let data = {
342
+			governmentDuty:{
343
+				...this.itemData,
344
+				incomingCall:this.validateForm.value.incomingCall,
345
+				sketch: this.validateForm.value.sketch,
346
+				record: this.validateForm.value.record,
347
+				contactsPhone: this.validateForm.value.contactsPhone,
348
+				contacts: this.validateForm.value.contacts,
349
+				detailedAddress: this.validateForm.value.detailedAddress,
350
+				complainant: this.validateForm.value.complainant,
351
+				province: {
352
+					id: this.validateForm.value.province[0]
353
+				},
354
+				city: {
355
+					id: this.validateForm.value.province[1]
356
+				},
357
+				district: {
358
+					id: this.validateForm.value.province[2]
359
+				},
360
+				state:{
361
+					id: null
362
+				},
363
+				id:0,
364
+			}
365
+    };
366
+    if (!that.add) {
367
+      data.governmentDuty.id = that.coopId;
368
+			data.governmentDuty.state.id =  this.itemData.state.id
369
+    }else{
370
+			delete data.governmentDuty.id
371
+			delete data.governmentDuty.state.id
372
+		}
373
+		that.btnLoading = true;
374
+    that.mainService
375
+      .dataPost(this.add ? "addData":"updData", "governmentDuty", data)
376
+      .subscribe((data) => {
377
+        that.btnLoading = false;
378
+        that.hideModal();
379
+        that.initForm();
380
+        if (data.status == 200) {
381
+          that.showPromptModal(that.add ? "新增" : "编辑", true, "");
382
+        } else {
383
+          that.showPromptModal(that.add ? "新增" : "编辑", false, data.msg);
384
+        }
385
+      });
386
+  }
387
+
388
+  // 编辑
389
+	itemData:any;
390
+  edit(data) {
391
+		this.add = false
392
+		this.itemData = data;
393
+		this.coopId = data.id;
394
+		this.validateForm.controls.incomingCall.setValue(data.incomingCall);
395
+		this.validateForm.controls.sketch.setValue(data.sketch);
396
+		this.validateForm.controls.record.setValue(data.record);
397
+		this.validateForm.controls.contactsPhone.setValue(data.contactsPhone)
398
+		this.validateForm.controls.contacts.setValue(data.contacts);
399
+		this.validateForm.controls.detailedAddress.setValue(data.detailedAddress);
400
+		this.validateForm.controls.complainant.setValue(data.complainant);
401
+		this.validateForm.controls.province.setValue([data.province && data.province.id || null, data.city && data.city.id || null, data.district && data.district.id || null]);
402
+		this.modal = true
403
+  }
404
+
405
+  // 删除
406
+  delModal: boolean = false; //删除模态框
407
+  del(data) {
408
+    let that = this;
409
+    that.coopId = data.id;
410
+    that.delModal = true;
411
+  }
412
+	
413
+	// 取消删除弹框
414
+	cancelDel(){
415
+		this.hideDelModal();
416
+	}
417
+	
418
+  // 确认删除
419
+  confirmDel() {
420
+    let that = this;
421
+    that.btnLoading = true;
422
+    that.mainService
423
+      .apiPublicData('rmvData', 'governmentDuty', [this.coopId])
424
+      .subscribe((data) => {
425
+        that.btnLoading = false;
426
+        that.hideDelModal();
427
+        if (data["status"] == 200) {
428
+          that.showPromptModal("删除", true, "");
429
+        } else {
430
+          that.showPromptModal("删除", false, data["msg"]);
431
+        }
432
+      });
433
+  }
434
+	
435
+	// 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
436
+	showPromptModal(con, success, promptInfo?) {
437
+	  this.promptModalShow = false;
438
+	  this.promptContent = con;
439
+	  this.ifSuccess = success;
440
+	  this.promptInfo = promptInfo;
441
+	  setTimeout(() => {
442
+	    this.promptModalShow = true;
443
+	  }, 100);
444
+	  this.getList();
445
+	}
446
+	
447
+  // 关闭删除模态框
448
+  hideDelModal() {
449
+    this.delModal = false;
450
+  }
451
+}
452
+

+ 19 - 0
src/app/views/government-duty/government-duty.module.ts

@@ -0,0 +1,19 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+
4
+import { GovernmentDutyRoutingModule } from './government-duty-routing.module';
5
+import { GovernmentDutyComponent } from './government-duty.component';
6
+import { ShareModule } from 'src/app/share/share.module';
7
+
8
+
9
+@NgModule({
10
+  declarations: [
11
+    GovernmentDutyComponent
12
+  ],
13
+  imports: [
14
+    CommonModule,
15
+    GovernmentDutyRoutingModule,
16
+    ShareModule
17
+  ]
18
+})
19
+export class GovernmentDutyModule { }

+ 1 - 1
src/app/views/home/home.component.ts

@@ -410,7 +410,7 @@ export class HomeComponent implements OnInit {
410 410
 		if(data.orderType.value==1){
411 411
 			this.detailModalShow = true;
412 412
 		}else{
413
-			this.router.navigateByUrl("/main/orderManagement/orderDetail/" + data.workOrder);
413
+			this.router.navigateByUrl("/main/home/orderDetail/" + data.workOrder);
414 414
 		}
415 415
 	}
416 416
 	

+ 22 - 1
src/app/views/main/main-routing.module.ts

@@ -647,7 +647,28 @@ const routes: Routes = [
647 647
 			{
648 648
 			  path: "personageDocument",
649 649
 			  loadChildren: () => import("../personage-document/personage-document.module").then((m) => m.PersonageDocumentModule),
650
-			}
650
+			},
651
+			// 任务管理-月度任务
652
+			{
653
+			  path: "monthlyTask",
654
+			  loadChildren: () => import("../monthly-task/monthly-task.module").then((m) => m.MonthlyTaskModule),
655
+			},
656
+			// 任务管理-任务列表
657
+			{
658
+			  path: "taskList",
659
+			  loadChildren: () => import("../task-list/task-list.module").then((m) => m.TaskListModule),
660
+			},
661
+			// 任务管理-任务清单
662
+			{
663
+			  path: "taskInventory",
664
+			  loadChildren: () => import("../task-inventory/task-inventory.module").then((m) => m.TaskInventoryModule),
665
+			},
666
+			// 故障管理-政务值班
667
+			{
668
+			  path: "governmentDuty",
669
+			  loadChildren: () => import("../government-duty/government-duty.module").then((m) => m.GovernmentDutyModule),
670
+			},
671
+			
651 672
     ],
652 673
   },
653 674
 ];

+ 8 - 2
src/app/views/main/main.component.html

@@ -30,8 +30,14 @@
30 30
     <nz-header>
31 31
       <div class="app-header display_flex justify-content_space-between align-items_center">
32 32
         <div class="left">
33
-					<i class="icon_transport transport-xinzeng green" *ngIf='speediness' (click)="speedinessAdd()" nz-tooltip nzTooltipTitle="新增报修"></i>
34
-          <i class="icon_transport transport-tiaodu-fill green" *ngIf='deskRole' (click)="toFuwutai()" nz-tooltip nzTooltipTitle="调度台"></i>
33
+					<!-- <i class="icon_transport transport-tianjiahover green" *ngIf='speediness' (click)="speedinessAdd()" nz-tooltip nzTooltipTitle="新增报修"></i> -->
34
+          <div class="dropdown">
35
+            <i class="icon_transport transport-tianjiahover green" (mouseenter)="showFastDropdown = true" (mouseleave)="showFastDropdown = false"></i>
36
+            <div class="dropdown-content ct" [hidden]="!showFastDropdown" (mouseenter)="showFastDropdown = true" (mouseleave)="showFastDropdown = false">
37
+              <div class="dropdownItem" *ngIf="speediness" (click)="speedinessAdd()">新增报修</div>
38
+          	</div>
39
+          </div>
40
+					<i class="icon_transport transport-tiaodu-fill green" *ngIf='deskRole' (click)="toFuwutai()" nz-tooltip nzTooltipTitle="调度台"></i>
35 41
           <i class="icon_transport transport-hushizhihanghuligongzuo green" *ngIf="nurseRole" (click)="toHuShi()" nz-tooltip nzTooltipTitle="护士端"></i>
36 42
           <i class="icon_transport transport-peizhi1 green" *ngIf="incidentConfigRole || otherConfigRole || pageConfigRole || nurseConfigRole" (click)="toConfigurationCenter()" nz-tooltip nzTooltipTitle="配置中心"></i>
37 43
           <i class="icon_transport transport-tongji-2 green" *ngIf="newStatisticsRole" (click)="toNewStatistics()" nz-tooltip nzTooltipTitle="统计"></i>

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

@@ -4042,7 +4042,8 @@ export class MainComponent implements OnInit {
4042 4042
   // 下拉
4043 4043
   showDropdown:boolean = false;
4044 4044
   showDropdown1:boolean = false;
4045
-
4045
+	showFastDropdown:boolean = false;
4046
+	
4046 4047
   // 选择院区
4047 4048
   selectHospital(){
4048 4049
     this.hosFlag1 = true

+ 15 - 0
src/app/views/monthly-task/monthly-task-routing.module.ts

@@ -0,0 +1,15 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+import { MonthlyTaskComponent } from './monthly-task.component';
4
+
5
+
6
+const routes: Routes = [{
7
+  path: '',
8
+  component: MonthlyTaskComponent
9
+}];
10
+
11
+@NgModule({
12
+  imports: [RouterModule.forChild(routes)],
13
+  exports: [RouterModule]
14
+})
15
+export class MonthlyTaskRoutingModule { }

+ 261 - 0
src/app/views/monthly-task/monthly-task.component.html

@@ -0,0 +1,261 @@
1
+<div class="list-template">
2
+  <div class="list-template__content">
3
+    <div class="list-template__top" nz-row>
4
+      <div nz-col nzXl='18' class="list-template__searchBox">
5
+				<div class="list-template__searchItem">
6
+				  <span class="label">任务标题</span>:
7
+				  <input nz-input class="formItem" [(ngModel)]="taskTitle" placeholder="请输入任务标题" nzSize="default" />
8
+				</div>
9
+				<div class="list-template__searchItem">
10
+				  <span class="label">责任人:</span>
11
+					<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
12
+					  (nzOnSearch)="changeUser($event)" nzAllowClear nzPlaceHolder="请选择执行人员" [(ngModel)]="liableUser">
13
+					  <ng-container *ngFor="let option of dutyUser">
14
+					    <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
15
+					  </ng-container>
16
+					  <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
17
+					    <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
18
+					  </nz-option>
19
+					</nz-select>
20
+				</div>
21
+        <div class="list-template__searchItem">
22
+          <span class="label">优先级:</span>
23
+          <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择优先级" [(ngModel)]="priority">
24
+            <ng-container *ngFor="let option of priorityData">
25
+              <nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
26
+            </ng-container>
27
+          </nz-select>
28
+        </div>
29
+				<div class="list-template__searchItem">
30
+				  <span class="label width-105">开始时间区间:</span>
31
+				  <nz-range-picker nzShowTime [(ngModel)]="dateRange" (ngModelChange)="changeDate($event)"></nz-range-picker>
32
+				</div>
33
+      </div>
34
+      <div nz-col nzXl='6' class="list-template__btns">
35
+        <button nz-button class="btn default" (click)='search()'>搜索</button>
36
+        <button nz-button class="btn ml8 default" (click)='reset()'>重置</button>
37
+        <button nz-button *ngIf="coopBtns.add" class="btn ml8 default" (click)="showModal()">新增</button>
38
+      </div>
39
+    </div>
40
+    <div class="list-template__bottom">
41
+      <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
42
+        [nzLoading]="loading1">
43
+        <thead>
44
+          <tr class="thead">
45
+            <th>任务标题</th>
46
+            <th>任务描述</th>
47
+            <th>优先级</th>
48
+            <th>责任人</th>
49
+            <th>开始时间</th>
50
+						<th>结束时间</th>
51
+						<th>状态</th>
52
+            <th nzWidth="250px">操作</th>
53
+          </tr>
54
+        </thead>
55
+        <tbody>
56
+          <tr *ngFor="let data of listOfData;let index=index;">
57
+            <td>{{ data.taskTitle||'-' }}</td>
58
+            <td>{{ data.taskDescribe||'-' }}</td>
59
+            <td>{{ data.priority && data.priority.name||'-'}}</td>
60
+            <td>{{ data.liableUserDTO && data.liableUserDTO.name||'-' }}</td>
61
+            <td>{{ data.startTime | date:'yyyy-MM-dd HH:mm:ss' }}</td>
62
+            <td>{{ data.endTime | date:'yyyy-MM-dd HH:mm:ss' }}</td>
63
+						<td>{{ data.state && data.state.name||'-'}}</td>
64
+            <td>
65
+              <div class="coop">
66
+                <span *ngIf="coopBtns.edit && data.state.value==1" (click)="edit(data)">编辑</span>
67
+                <span *ngIf="coopBtns.del && data.state.value==1" (click)="del(data)">删除</span>
68
+								<span *ngIf="coopBtns.allocation && data.state.value==1" (click)="allocation(data)">分配任务</span>
69
+								<span *ngIf="coopBtns.accomplish && data.state.value==1" (click)="accomplish(data)">任务完成</span>
70
+							</div>
71
+            </td>
72
+          </tr>
73
+        </tbody>
74
+      </nz-table>
75
+      <div class="list-template__pagination">
76
+        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
77
+          (nzPageIndexChange)="getList()" (nzPageSizeChange)="getList()">
78
+        </nz-pagination>
79
+      </div>
80
+    </div>
81
+  </div>
82
+</div>
83
+<!-- 新增/编辑模态框 -->
84
+<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="modal">
85
+  <div class="modalBody">
86
+    <div class="title">{{add?"新增":"编辑"}}<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
87
+    </div>
88
+    <div class="content">
89
+      <form nz-form [formGroup]="validateForm" class="addForm" (ngSubmit)="submitForm()">
90
+        <nz-form-item>
91
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="taskTitle">任务标题</nz-form-label>
92
+          <nz-form-control nzErrorTip="请选择任务标题!">
93
+            <nz-input-group>
94
+        			<input nz-input class="formItem" formControlName="taskTitle" placeholder="请输入任务标题" nzSize="default" />
95
+            </nz-input-group>
96
+          </nz-form-control>
97
+        </nz-form-item>
98
+				
99
+				<nz-form-item>
100
+				  <nz-form-label class="margin-label" [nzSm]="6" [nzXs]="24" nzRequired nzFor="taskDescribe">任务描述</nz-form-label>
101
+				  <nz-form-control nzErrorTip="请选择任务描述!">
102
+				    <nz-input-group>
103
+							<textarea formControlName="taskDescribe" nz-input rows="3" placeholder="请输入任务描述"></textarea>
104
+						</nz-input-group>
105
+				  </nz-form-control>
106
+				</nz-form-item>
107
+				
108
+				<nz-form-item>
109
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="priority">优先级</nz-form-label>
110
+          <nz-form-control nzErrorTip="请选择优先级!">
111
+            <nz-input-group>
112
+							<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择优先级" formControlName="priority">
113
+							  <ng-container *ngFor="let option of priorityData">
114
+							    <nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
115
+							  </ng-container>
116
+							</nz-select>
117
+            </nz-input-group>
118
+          </nz-form-control>
119
+        </nz-form-item>
120
+				
121
+				<nz-form-item>
122
+				  <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="liableUser">责任人</nz-form-label>
123
+				  <nz-form-control nzErrorTip="请选择责任人!">
124
+				    <nz-input-group>
125
+							<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
126
+							  (nzOnSearch)="changeUser($event)" nzAllowClear nzPlaceHolder="请选择责任人" formControlName="liableUser">
127
+								<ng-container *ngFor="let option of dutyUser">
128
+								  <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
129
+								</ng-container>
130
+								<nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
131
+								  <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
132
+								</nz-option>
133
+							</nz-select>
134
+				    </nz-input-group>
135
+				  </nz-form-control>
136
+				</nz-form-item>
137
+				
138
+				<div class="df">
139
+					<nz-form-item>
140
+					  <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="startTime">开始时间</nz-form-label>
141
+					  <nz-form-control nzErrorTip="请选择开始时间!">
142
+					    <nz-input-group>
143
+					      <nz-date-picker
144
+									nzShowTime
145
+									nzFormat="yyyy-MM-dd HH:mm:ss"
146
+									nzPlaceHolder="请选择开始时间"
147
+									formControlName="startTime"
148
+									(ngModelChange)="onStartChange($event)"
149
+								></nz-date-picker>
150
+					    </nz-input-group>
151
+					  </nz-form-control>
152
+					</nz-form-item>
153
+					
154
+					<nz-form-item>
155
+					  <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="endTime">结束时间</nz-form-label>
156
+					  <nz-form-control nzErrorTip="请选择结束时间!">
157
+					    <nz-input-group>
158
+					      <nz-date-picker
159
+									nzShowTime
160
+									nzFormat="yyyy-MM-dd HH:mm:ss"
161
+									nzPlaceHolder="请选择结束时间"
162
+									formControlName="endTime"
163
+									(ngModelChange)="onEndChange($event)"
164
+								></nz-date-picker>
165
+					    </nz-input-group>
166
+					  </nz-form-control>
167
+					</nz-form-item>
168
+				</div>
169
+      </form>
170
+    </div>
171
+    <div class="display_flex justify-content_flex-center">
172
+      <button nzType="primary" nz-button (click)="submitForm()" [nzLoading]="btnLoading">确认</button>
173
+      <button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
174
+    </div>
175
+  </div>
176
+</div>
177
+
178
+<!-- 分配任务 -->
179
+<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="allocationModal">
180
+  <div class="modalBody">
181
+    <div class="title">分配任务<i class="icon_transport transport-guanbi" (click)="hideAllocationModal()"></i>
182
+    </div>
183
+    <div class="content">
184
+      <form nz-form [formGroup]="validateAllocationForm" class="addForm" (ngSubmit)="submitAllocationForm()">
185
+				
186
+				<nz-form-item>
187
+				  <nz-form-label class="margin-label" [nzSm]="6" [nzXs]="24" nzRequired nzFor="taskContent">任务内容</nz-form-label>
188
+				  <nz-form-control nzErrorTip="请选择任务内容!">
189
+				    <nz-input-group>
190
+							<textarea formControlName="taskContent" nz-input rows="3" placeholder="请输入任务内容"></textarea>
191
+						</nz-input-group>
192
+				  </nz-form-control>
193
+				</nz-form-item>
194
+				
195
+				<nz-form-item>
196
+				  <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="executor">执行人</nz-form-label>
197
+				  <nz-form-control nzErrorTip="请选择执行人!">
198
+				    <nz-input-group>
199
+							<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
200
+							  (nzOnSearch)="changeUser($event)" nzAllowClear nzPlaceHolder="请选择执行人" formControlName="executor">
201
+							  <ng-container *ngFor="let option of dutyUser">
202
+							    <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
203
+							  </ng-container>
204
+								<nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
205
+								  <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
206
+								</nz-option>
207
+							</nz-select>
208
+				    </nz-input-group>
209
+				  </nz-form-control>
210
+				</nz-form-item>
211
+				
212
+				<nz-form-item>
213
+          <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="estimatedCompletionTime">预计完成时间</nz-form-label>
214
+          <nz-form-control nzErrorTip="请选择预计完成时间!">
215
+            <nz-input-group>
216
+              <nz-date-picker
217
+								class="width-100"
218
+								nzShowTime
219
+								nzFormat="yyyy-MM-dd HH:mm:ss"
220
+								nzPlaceHolder="请选择预计完成时间"
221
+								formControlName="estimatedCompletionTime"
222
+								(ngModelChange)="onAllocationChange($event)"
223
+							></nz-date-picker>
224
+            </nz-input-group>
225
+          </nz-form-control>
226
+        </nz-form-item>
227
+      </form>
228
+    </div>
229
+    <div class="display_flex justify-content_flex-center">
230
+      <button nzType="primary" nz-button (click)="submitAllocationForm()" [nzLoading]="btnLoading">确认</button>
231
+      <button class="btn cancel" nz-button nzType="default" (click)="hideAllocationModal()">取消</button>
232
+    </div>
233
+  </div>
234
+</div>
235
+<!-- 任务完成 -->
236
+<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="accomplishModal">
237
+  <div class="modalBody">
238
+    <div class="title">任务完成<i class="icon_transport transport-guanbi"></i>
239
+    </div>
240
+    <div class="content padding-bottom">
241
+			<span class="label"><span class="sign">*</span> 月度任务总结:</span>
242
+      <textarea [(ngModel)]="taskConclusion" nz-input rows="3" placeholder="请输入任务内容"></textarea>
243
+    </div>
244
+    <div class="display_flex justify-content_flex-center">
245
+      <button nzType="primary" nz-button (click)="submitAccomplishForm()" [nzLoading]="btnLoading">确认</button>
246
+      <button class="btn cancel" nz-button nzType="default" (click)="hideAccomplishModal()">取消</button>
247
+    </div>
248
+  </div>
249
+</div>
250
+<!-- 删除模态框 -->
251
+<app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading" 
252
+  (confirmDelEvent)="confirmDel()" (cancelDelEvent)="cancelDel()" content="您确认要删除吗?" confirmTxt="是" cancelTxt="否">
253
+</app-dialog-delete>
254
+
255
+<!-- 操作成功/失败提示框 -->
256
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
257
+  [info]="promptInfo"></app-prompt-modal>
258
+
259
+<!-- 查看详情 -->
260
+<router-outlet (deactivate)="getList()"></router-outlet>
261
+

+ 180 - 0
src/app/views/monthly-task/monthly-task.component.less

@@ -0,0 +1,180 @@
1
+@import "../../../../src/theme.less";
2
+.width-105{
3
+	width: 105px !important;
4
+}
5
+.save {
6
+  position: fixed;
7
+  left: 0;
8
+  top: 0;
9
+  width: 100%;
10
+  height: 100%;
11
+  background: rgba(0, 0, 0, 0.4);
12
+  z-index: 99;
13
+
14
+  .modalBody {
15
+    width: 60%;
16
+    background: #fff;
17
+    border-radius: 5px;
18
+    padding: 10px 20px;
19
+    color: #333;
20
+
21
+    .title {
22
+      width: 100%;
23
+      text-align: center;
24
+      font-size: 18px;
25
+      position: relative;
26
+
27
+      i {
28
+        position: absolute;
29
+        right: 0;
30
+        top: 0;
31
+        font-size: 20px;
32
+        color: #666;
33
+        cursor: pointer;
34
+        padding: 0 5px;
35
+      }
36
+    }
37
+
38
+    .content {
39
+      width: 100%;
40
+      height: 117px;
41
+      background: #f9fafb;
42
+      border: 1px solid #e5e9ed;
43
+      border-radius: 5px;
44
+      // overflow: hidden;
45
+      margin-top: 12px;
46
+
47
+      div {
48
+        text-align: center;
49
+        margin: 0;
50
+
51
+        &.icon {
52
+          margin-top: 17px;
53
+
54
+          i {
55
+            color: #34b349;
56
+            font-size: 30px !important;
57
+
58
+            &.transport-wenhao {
59
+              color: #f5a523;
60
+            }
61
+
62
+            &.transport-shibai {
63
+              color: #ff3a52;
64
+            }
65
+          }
66
+        }
67
+
68
+        &.defeat {
69
+          color: #333;
70
+          font-size: 18px;
71
+        }
72
+
73
+        &:nth-child(3) {
74
+          font-size: 14px;
75
+          color: #666;
76
+        }
77
+      }
78
+    }
79
+
80
+    button {
81
+      margin-top: 10px;
82
+
83
+      &.btn {
84
+        margin-left: 8px;
85
+      }
86
+    }
87
+  }
88
+
89
+  // 新增
90
+  &.add {
91
+    .modalBody {
92
+      width: 40%;
93
+      height: auto;
94
+			
95
+			.padding-bottom{
96
+				padding-bottom: 20px !important;
97
+				.label{
98
+					margin-bottom: 5px;
99
+					.sign{
100
+						color: red;
101
+						font-size: 15px;
102
+					}
103
+				}
104
+			}
105
+			
106
+      .content {
107
+        width: 100%;
108
+        height: auto;
109
+        padding: 19px 14px 0 14px;
110
+        // max-height: 500px;
111
+        overflow-y: auto;
112
+
113
+        .addForm {
114
+          .ant-form-item {
115
+            margin-bottom: 8px;
116
+						.ant-select{
117
+							width: 100% !important;
118
+						}
119
+						.ant-input-number{
120
+							width: 100% !important;
121
+						}
122
+            .ant-form-item-label {
123
+              line-height: 14px;
124
+              text-align: left;
125
+							overflow: visible !important;
126
+            }
127
+						.margin-label{
128
+							margin-bottom: 5px !important;
129
+						}
130
+						.ant-calendar-picker{
131
+							width: 100% !important;
132
+						}
133
+          }
134
+					.address{
135
+					  position: relative;
136
+					  .addressList{
137
+					    position: absolute;
138
+					    bottom: 100%;
139
+					    left: 0;
140
+					    width: 100%;
141
+					    max-height: 256px;
142
+					    z-index: 2;
143
+					    background: #fff;
144
+					    border: 1px solid #d9d9d9;
145
+					    border-radius: 4px;
146
+					    overflow: hidden auto;
147
+					    .addressItem{
148
+					      padding: 5px 12px;
149
+					      cursor: pointer;
150
+					      &:hover{
151
+					        background-color: #e9f7e9;
152
+					      }
153
+					    }
154
+					  }
155
+					}
156
+					.df{
157
+						display: flex;
158
+						justify-content: space-between;
159
+					}
160
+        }
161
+
162
+        .editForm {
163
+          .ant-form-item {
164
+            margin-bottom: 14px;
165
+						.ant-input-number{
166
+							width: 100% !important;
167
+						}
168
+            .ant-form-item-label {
169
+              line-height: 0;
170
+            }
171
+          }
172
+        }
173
+      }
174
+
175
+      button:nth-child(1) {
176
+        margin-right: 20px;
177
+      }
178
+    }
179
+  }
180
+}

+ 436 - 0
src/app/views/monthly-task/monthly-task.component.ts

@@ -0,0 +1,436 @@
1
+import { Component, OnInit, ViewChild } from "@angular/core";
2
+import { ActivatedRoute, Router } from "@angular/router";
3
+import { FormBuilder, Validators, FormGroup, FormControl } from "@angular/forms";
4
+
5
+import { MainService } from "../../services/main.service";
6
+import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
7
+import { ToolService } from "../../services/tool.service";
8
+import { forkJoin, Subject } from "rxjs";
9
+import { debounceTime } from "rxjs/operators";
10
+import { NzMessageService } from "ng-zorro-antd";
11
+import { format, startOfDay, endOfDay } from 'date-fns';
12
+
13
+@Component({
14
+  selector: "app-monthly-task",
15
+  templateUrl: "./monthly-task.component.html",
16
+  styleUrls: ["./monthly-task.component.less"],
17
+})
18
+export class MonthlyTaskComponent implements OnInit {
19
+  @ViewChild("osComponentRef1", {
20
+    read: OverlayScrollbarsComponent,
21
+    static: false,
22
+  })
23
+  osComponentRef1: OverlayScrollbarsComponent;
24
+  constructor(
25
+    private message: NzMessageService,
26
+    private fb: FormBuilder,
27
+    private route: ActivatedRoute,
28
+    private router: Router,
29
+    private mainService: MainService,
30
+    private tool: ToolService
31
+  ) {}
32
+
33
+  listOfData: any[] = []; //表格数据
34
+
35
+  modal: boolean = false; //新增/编辑模态框
36
+  add: boolean; //true:新增;false:编辑
37
+  validateForm: FormGroup; //新增/编辑表单
38
+	validateAllocationForm: FormGroup; //新增/编辑表单
39
+  coopId: number; //表格中执行操作的id
40
+  dept: any; //所属科室
41
+  drugCode; //编号
42
+  name; //名称
43
+  userType: any; //用户类型
44
+  hosId: any; //院区(搜索)
45
+  userGroup; //所属组
46
+  userGroup1; //所属组(搜索)
47
+  userTypes: Array<any>; //所有用户类型
48
+  alldepart: any = []; //所有所属科室
49
+  alldepart1: any = []; //所有所属科室(搜索)
50
+  hospitals1: any = []; //院区列表(搜索)
51
+	drugTypeData: any = []; //药品类型
52
+  allUserGroup: Array<any>; //所有用户组
53
+  allUserGroup1: Array<any>; //用户组(搜索)
54
+  allUserRole: Array<any>; //所有角色
55
+  pageIndex: number = 1; //页码
56
+  listLength: number = 10; //总条数
57
+  pageSize: number = 10; //每页条数
58
+
59
+  promptContent: string; //操作提示框提示信息
60
+  ifSuccess: boolean; //操作成功/失败
61
+  promptInfo: string; //操作结果提示信息
62
+  promptModalShow: boolean; //操作提示框是否展示
63
+
64
+  btnLoading: boolean = false; //提交按钮loading状态
65
+  wxRequired = false; //新增或编辑用户的时候,微信号是否必填
66
+  changeInpSubject = new Subject(); //防抖
67
+	searchParentDeptSubject = new Subject();
68
+	specimenName:any = null;
69
+	containPosition:any = null;
70
+	placeList:any = [];
71
+	systemList:any = [];
72
+	apparatusList:any = [];
73
+	specimenNameList:any = [];
74
+	addressLoading:any = false;
75
+	priority:any;
76
+	liableUser:any;
77
+	taskTitle:any;
78
+	
79
+  ngOnInit() {
80
+    this.coopBtns = this.tool.initCoopBtns(this.route);
81
+		this.hosId = this.tool.getCurrentHospital().id;
82
+		this.searchParentDeptSubject.pipe(debounceTime(500)).subscribe((e) => {
83
+			this.isLoading = true;
84
+			this.getAllUser(e[0])
85
+		});
86
+    this.initForm();
87
+		this.getList();
88
+		this.getAllUser('');
89
+		this.getPriorityData();
90
+  }
91
+
92
+  // 初始化增删改按钮
93
+  coopBtns: any = {};
94
+  // 搜索
95
+  search() {
96
+    this.pageIndex = 1;
97
+    this.getList();
98
+  }
99
+  // 重置
100
+  reset() {
101
+    this.pageIndex = 1;
102
+    this.priority = null;
103
+    this.liableUser = null;
104
+    this.taskTitle = null;
105
+    this.startDate = null;
106
+    this.endDate = null;
107
+		this.dateRange = [];
108
+    this.getList();
109
+  }
110
+	
111
+  // 表格数据
112
+  loading1 = false;
113
+  getList() {
114
+    let data = {
115
+      idx: this.pageIndex - 1,
116
+      sum: this.pageSize,
117
+      monthTask: {
118
+				priority: {
119
+					id:this.priority || undefined,
120
+				},
121
+				liableUser: this.liableUser || undefined,
122
+				taskTitle: this.taskTitle || undefined,
123
+				startTime: this.startDate || undefined,
124
+				endTime: this.endDate || undefined
125
+      },
126
+    };
127
+    this.loading1 = true;
128
+    this.mainService
129
+      .getFetchDataList("data", "monthTask", data)
130
+      .subscribe((data) => {
131
+        this.loading1 = false;
132
+        this.listOfData = data.list;
133
+        this.listLength = data.totalNum;
134
+      });
135
+  }
136
+	
137
+	// 日期选择
138
+	startDate: string; //发起时间开始
139
+	endDate: string; //发起时间结束
140
+	dateRange: any = [];
141
+	changeDate(result?): void {
142
+	  if (result.length==0) {
143
+	    this.startDate = this.endDate = null;
144
+	    return;
145
+	  }
146
+	  this.startDate = format(startOfDay(result[0]), 'yyyy-MM-dd HH:mm:ss');
147
+	  this.endDate = format(endOfDay(result[1]), 'yyyy-MM-dd HH:mm:ss');
148
+	  this.dateRange = [this.startDate,this.endDate]
149
+	}
150
+	
151
+	// 获取责任人
152
+	dutyUser:any= [];
153
+	getAllUser(name) {
154
+	  let data:any = {
155
+	    user: {
156
+				name,
157
+	      hosIds: this.hosId,
158
+	    },
159
+	    idx: 0,
160
+	    sum: 20,
161
+	  };
162
+	  this.mainService
163
+	    .getFetchDataList("data", "user", data)
164
+	    .subscribe((data) => {
165
+				this.isLoading = false
166
+				this.dutyUser = data.list
167
+	    });
168
+	}
169
+	
170
+	// 搜索责任人
171
+	isLoading = false;
172
+	changeUser(e,type) {
173
+	  this.searchParentDeptSubject.next([e,type]);
174
+	}
175
+	
176
+	// 获取优先级
177
+	priorityData:any = [];
178
+	getPriorityData(){
179
+		let postData = {
180
+		  idx: 0,
181
+		  sum: 9999,
182
+		  priority: {},
183
+		};
184
+		this.isLoading = true;
185
+		this.mainService
186
+		.getFetchDataList("simple/data", "priority", postData)
187
+		.subscribe((data) => {
188
+			this.isLoading = false;
189
+			if (data.status == 200) {
190
+				this.priorityData = data.list;
191
+			}
192
+		});
193
+	}
194
+	
195
+	// 分配任务
196
+	allocationModal:boolean = false;
197
+	allocation(data){
198
+		this.coopId = data.id;
199
+		this.allocationModal = true
200
+		this.initAllocationForm();
201
+	}
202
+	
203
+	hideAllocationModal() {
204
+	  this.allocationModal = false;
205
+		this.initAllocationForm();
206
+	}
207
+	
208
+	// 初始化新增form表单
209
+	initAllocationForm() {
210
+	  this.validateAllocationForm = this.fb.group({
211
+	    taskContent: [null, [Validators.required]],
212
+			executor: [null, [Validators.required]],
213
+	    estimatedCompletionTime: [null, [Validators.required]],
214
+	  });
215
+	}
216
+	
217
+	onAllocationChange(result?): void {
218
+		console.log('Selected Time: ', result);
219
+		let endTime = format(result, 'yyyy-MM-dd HH:mm:ss');
220
+		this.validateAllocationForm.controls.estimatedCompletionTime.setValue(endTime);
221
+	}
222
+		
223
+	// 表单提交
224
+	submitAllocationForm(): void {
225
+	  var that = this;
226
+		for (const i in that.validateAllocationForm.controls) {
227
+		  that.validateAllocationForm.controls[i].markAsDirty();
228
+		  that.validateAllocationForm.controls[i].updateValueAndValidity();
229
+		}
230
+		if (that.validateAllocationForm.invalid) return;
231
+	  let data = {
232
+			monthTaskList:{
233
+				taskContent: this.validateAllocationForm.value.taskContent,
234
+				executor: this.validateAllocationForm.value.executor,
235
+				estimatedCompletionTime: this.validateAllocationForm.value.estimatedCompletionTime,
236
+				monthTask: that.coopId,
237
+			}
238
+	  };
239
+
240
+		that.btnLoading = true;
241
+	  that.mainService
242
+	    .dataPost("addData", "monthTaskList", data)
243
+	    .subscribe((data) => {
244
+	      that.btnLoading = false;
245
+	      that.hideAllocationModal();
246
+	      if (data.status == 200) {
247
+	        that.showPromptModal("分配", true, "");
248
+	      } else {
249
+	        that.showPromptModal("分配", false, data.msg);
250
+	      }
251
+	    });
252
+	}
253
+	
254
+	// 任务完成
255
+	accomplishModal:boolean = false;
256
+	taskConclusion:any;
257
+	accomplish(data){
258
+		this.coopId = data.id;
259
+		this.taskConclusion = null;
260
+		this.accomplishModal = true
261
+	}
262
+	
263
+	// 任务完成提交
264
+	submitAccomplishForm(){
265
+		if(!this.taskConclusion){
266
+			this.message.error('月度任务总结不能为空!')
267
+			return
268
+		}
269
+		let data = {
270
+			monthTask:{
271
+				taskConclusion: this.taskConclusion,
272
+				operationType: 'taskDone',
273
+				id:this.coopId
274
+			}
275
+		};
276
+		this.btnLoading = true;
277
+		this.mainService
278
+		  .dataPost("updData", "monthTask", data)
279
+		  .subscribe((data) => {
280
+		    this.btnLoading = false;
281
+		    this.hideAccomplishModal();
282
+		    if (data.status == 200) {
283
+		      this.showPromptModal("操作", true, "");
284
+		    } else {
285
+		      this.showPromptModal("操作", false, data.msg);
286
+		    }
287
+		  });
288
+	}
289
+	
290
+	hideAccomplishModal(){
291
+		this.accomplishModal = false
292
+	}
293
+	
294
+  // 新增弹框
295
+  showModal() {
296
+    this.add = true;
297
+		this.modal = true;
298
+		this.itemData = null;
299
+    this.initForm();
300
+  }
301
+  hideModal() {
302
+    this.modal = false;
303
+    this.initForm();
304
+  }
305
+	
306
+  // 初始化新增form表单
307
+  initForm() {
308
+    this.validateForm = this.fb.group({
309
+			taskTitle:[null, [Validators.required]],
310
+      taskDescribe: [null, [Validators.required]],
311
+      priority: [null, [Validators.required]],
312
+			liableUser: [null, [Validators.required]],
313
+      startTime: [null, [Validators.required]],
314
+      endTime: [null, [Validators.required]],
315
+    });
316
+  }
317
+	
318
+	// 选择开始时间
319
+	onStartChange(result: Date): void {
320
+		console.log('Selected Time: ', result);
321
+		let startTime = format(result, 'yyyy-MM-dd HH:mm:ss');
322
+		this.validateForm.controls.startTime.setValue(startTime);
323
+	}
324
+	
325
+	// 选择结束时间
326
+	onEndChange(result: Date): void {
327
+		console.log('Selected Time: ', result);
328
+		let endTime = format(result, 'yyyy-MM-dd HH:mm:ss');
329
+		this.validateForm.controls.endTime.setValue(endTime);
330
+	}
331
+		
332
+  // 表单提交
333
+  submitForm(): void {
334
+    var that = this;
335
+		for (const i in that.validateForm.controls) {
336
+		  that.validateForm.controls[i].markAsDirty();
337
+		  that.validateForm.controls[i].updateValueAndValidity();
338
+		}
339
+		if (that.validateForm.invalid) return;
340
+    let data = {
341
+			monthTask:{
342
+				...this.itemData,
343
+				taskTitle: this.validateForm.value.taskTitle,
344
+				taskDescribe: this.validateForm.value.taskDescribe,
345
+				priority: {
346
+					id: this.validateForm.value.priority
347
+				},
348
+				liableUser: this.validateForm.value.liableUser,
349
+				startTime: this.validateForm.value.startTime,
350
+				endTime: this.validateForm.value.endTime,
351
+				id:0,
352
+			}
353
+    };
354
+    if (!that.add) {
355
+      data.monthTask.id = that.coopId;
356
+    }else{
357
+			delete data.monthTask.id
358
+		}
359
+		that.btnLoading = true;
360
+    that.mainService
361
+      .dataPost(this.add ? "addData":"updData", "monthTask", data)
362
+      .subscribe((data) => {
363
+        that.btnLoading = false;
364
+        that.hideModal();
365
+        that.initForm();
366
+        if (data.status == 200) {
367
+          that.showPromptModal(that.add ? "新增" : "编辑", true, "");
368
+        } else {
369
+          that.showPromptModal(that.add ? "新增" : "编辑", false, data.msg);
370
+        }
371
+      });
372
+  }
373
+
374
+  // 编辑
375
+	itemData:any;
376
+  edit(data) {
377
+		this.add = false
378
+		this.itemData = data;
379
+		this.coopId = data.id;
380
+		this.validateForm.controls.taskTitle.setValue(data.taskTitle);
381
+		this.validateForm.controls.taskDescribe.setValue(data.taskDescribe);
382
+		this.validateForm.controls.priority.setValue(data.priority.id);
383
+		this.validateForm.controls.liableUser.setValue(data.liableUserDTO.id)
384
+		this.validateForm.controls.startTime.setValue(data.startTime);
385
+		this.validateForm.controls.endTime.setValue(data.endTime);
386
+		this.modal = true
387
+  }
388
+
389
+  // 删除
390
+  delModal: boolean = false; //删除模态框
391
+  del(data) {
392
+    let that = this;
393
+    that.coopId = data.id;
394
+    that.delModal = true;
395
+  }
396
+	
397
+	// 取消删除弹框
398
+	cancelDel(){
399
+		this.hideDelModal();
400
+	}
401
+	
402
+  // 确认删除
403
+  confirmDel() {
404
+    let that = this;
405
+    that.btnLoading = true;
406
+    that.mainService
407
+      .apiPublicData('rmvData', 'monthTask', [this.coopId])
408
+      .subscribe((data) => {
409
+        that.btnLoading = false;
410
+        that.hideDelModal();
411
+        if (data["status"] == 200) {
412
+          that.showPromptModal("删除", true, "");
413
+        } else {
414
+          that.showPromptModal("删除", false, data["msg"]);
415
+        }
416
+      });
417
+  }
418
+	
419
+	// 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
420
+	showPromptModal(con, success, promptInfo?) {
421
+	  this.promptModalShow = false;
422
+	  this.promptContent = con;
423
+	  this.ifSuccess = success;
424
+	  this.promptInfo = promptInfo;
425
+	  setTimeout(() => {
426
+	    this.promptModalShow = true;
427
+	  }, 100);
428
+	  this.getList();
429
+	}
430
+	
431
+  // 关闭删除模态框
432
+  hideDelModal() {
433
+    this.delModal = false;
434
+  }
435
+}
436
+

+ 19 - 0
src/app/views/monthly-task/monthly-task.module.ts

@@ -0,0 +1,19 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+
4
+import { MonthlyTaskRoutingModule } from './monthly-task-routing.module';
5
+import { MonthlyTaskComponent } from './monthly-task.component';
6
+import { ShareModule } from 'src/app/share/share.module';
7
+
8
+
9
+@NgModule({
10
+  declarations: [
11
+    MonthlyTaskComponent
12
+  ],
13
+  imports: [
14
+    CommonModule,
15
+    MonthlyTaskRoutingModule,
16
+    ShareModule
17
+  ]
18
+})
19
+export class MonthlyTaskModule { }

+ 148 - 241
src/app/views/personage-document/personage-document.component.html

@@ -1,88 +1,95 @@
1 1
 <div class="list-template">
2
-  <div class="list-template__content">
3
-    <div class="list-template__top" nz-row>
4
-      <div nz-col nzLg='20' class="list-template__searchBox">
5
-        <div class="list-template__searchItem">
6
-          <span class="label">申请科室:</span>
7
-          <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" (nzOnSearch)="changeInp($event)" nzServerSearch nzShowSearch nzAllowClear nzPlaceHolder="请选择申请科室" [(ngModel)]="department">
8
-            <ng-container *ngFor="let option of hospitals1">
9
-              <nz-option *ngIf="!isDeptLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
10
-            </ng-container>
11
-            <nz-option *ngIf="isDeptLoading" nzDisabled nzCustomContent>
12
-              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
13
-            </nz-option>
14
-          </nz-select>
15
-        </div>
16
-        <div class="list-template__searchItem">
17
-          <span class="label">批次号:</span>
18
-          <input nz-input class="formItem" [(ngModel)]="batchNumber" placeholder="请输入批次号" nzSize="default" />
19
-        </div>
20
-        <div class="list-template__searchItem">
21
-          <span class="label">创建时间:</span>
22
-          <nz-range-picker [(ngModel)]="dateRange" nzFormat="yyyy-MM-dd"
23
-					(ngModelChange)="changeDate($event)"></nz-range-picker>
24
-        </div>
25
-      </div>
26
-      <div nz-col nzLg="4" class="list-template__btns">
27
-        <button class="btn default" (click)='search()'>搜索</button>
28
-        <button class="btn default ml8" (click)='reset()'>重置</button>
29
-      </div>
30
-    </div>
31
-    <div class="list-template__bottom">
32
-      <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
33
-        [nzLoading]="loading1">
34
-        <thead>
35
-          <tr class="thead">
36
-            <th nzWidth="10%">单号|创建时间</th>
37
-            <th nzWidth="10%">批次号</th>
38
-            <th nzWidth="10%">申请科室</th>
39
-            <th nzWidth="7%">总件数</th>
40
-            <th nzWidth="7%">品类数</th>
41
-            <th nzWidth="7%">消耗总价</th>
42
-            <th nzWidth="7%">实发总价</th>
43
-            <th nzWidth="10%">取药药房</th>
44
-						<th nzWidth="7%">是否已建单</th>
45
-						<th nzWidth="6%">状态</th>
46
-            <th nzWidth="18%">操作</th>
47
-          </tr>
48
-        </thead>
49
-        <tbody v-if="listOfData && listOfData.length>0">
50
-          <tr *ngFor="let data of listOfData" (click)="selectedListData(data.id)">
51
-            <td>
52
-							<div>{{ data.packingNo}}</div>
53
-							<div>{{ data.createTime|date:'yyyy-MM-dd HH:mm'}}</div>
54
-						</td>
55
-            <td>{{ data.batch?data.batch.batchNo:'-' }}</td>
56
-            <td>{{ data.applyDeptDTO?data.applyDeptDTO.dept :'-' }}</td>
57
-            <td>{{ data.totalCount||'0' }}</td>
58
-            <td>{{data.kindCount||'0'}}</td>
59
-            <td>{{ data.expendPrice ||'0' }}</td>
60
-            <td>{{ data.actualPrice || '0'}}</td>
61
-            <td>{{ data.pharmacyDTO?data.pharmacyDTO.dept:'-'}}</td>
62
-						<td>{{ data.createOrder==1?'是':'否'}}</td>
63
-						<td>{{ data.orderState.name}}</td>
64
-            <td>
65
-              <div class="coop">
66
-                <span *ngIf="coopBtns.look" (click)="detail($event,data.id)">查看</span>
67
-                <span *ngIf="coopBtns.print" (click)="print($event, data, data.id)">打印</span>
68
-                <span *ngIf="coopBtns.establish && ( data.createOrder=='0' || data.createOrder==null)" (click)="addDateModal(data)">配送建单</span>
69
-              </div>
70
-            </td>
71
-          </tr>
72
-        </tbody>
73
-      </nz-table>
74
-      <div class="list-template__pagination">
75
-        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
76
-          (nzPageIndexChange)="getList()" (nzPageSizeChange)="getList()">
77
-        </nz-pagination>
78
-      </div>
79
-    </div>
2
+  <div class="content list-template__content">
3
+		<div class="list-left">
4
+			<div class="tree-top-add">
5
+				<button class="btn default" (click)='addTree(1)'>新增一级目录</button>
6
+			</div>
7
+			<div class="tree-opt">
8
+				<div class="item" (click)='addTree(2)'>新增</div>
9
+				<div class="item" (click)="treeDel()">删除</div>
10
+				<div class="item" (click)='editTree(3)'>修改</div>
11
+			</div>
12
+			<div class="tree-content">
13
+				<nz-tree [nzData]="nodes" 
14
+				(nzClick)="nodeClick($event)"
15
+				[nzExpandedKeys]="defaultExpandedKeys"
16
+				[nzTreeTemplate]="nzTreeTemplate"
17
+				>
18
+					<ng-template #nzTreeTemplate let-node>
19
+						<span class="custom-node" [ngClass]="treeItem?.id === node.origin.id?'activeClass':''">
20
+							<span *ngIf="!node.isLeaf">
21
+								<i nz-icon [nzType]="node.isExpanded ? 'minus-square' : 'plus-square'" (click)="openFolder(node)"></i>
22
+								<span class="folder-name">{{ node.title }}</span>
23
+							</span>
24
+							<span *ngIf="node.isLeaf">
25
+								<span class="file-name">{{ node.title }}</span>
26
+							</span>
27
+						</span>
28
+					</ng-template>
29
+				</nz-tree>
30
+			</div>
31
+		</div>
32
+		<div class="list-right">
33
+			<div class="list-template__top">
34
+			  <div class="list-template__searchBox">
35
+					<div class="list-template__searchItem">
36
+					  <span class="label">文档名称:</span>
37
+					  <input nz-input class="formItem" [(ngModel)]="fileName" placeholder="请输入文档名称" nzSize="default" />
38
+					</div>
39
+			  </div>
40
+			  <div class="list-template__btns">
41
+			    <button class="btn default" (click)='search()'>搜索</button>
42
+			    <button class="btn default ml8" (click)='reset()'>重置</button>
43
+					<button class="btn default ml8" (click)='excelImport("",1)'>上传文档</button>
44
+			  </div>
45
+			</div>
46
+			<div class="list-template__bottom">
47
+			  <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
48
+			    [nzLoading]="loading1">
49
+			    <thead>
50
+			      <tr class="thead">
51
+			        <th nzWidth="10%">序号</th>
52
+			        <th>文档名称</th>
53
+			        <th>文档格式</th>
54
+			        <th>大小</th>
55
+			        <th>上传者</th>
56
+			        <th>更新时间</th>
57
+			        <th nzWidth="25%">操作</th>
58
+			      </tr>
59
+			    </thead>
60
+			    <tbody v-if="listOfData && listOfData.length>0">
61
+			      <tr *ngFor="let data of listOfData let index = index;">
62
+							<td>{{ index+(pageIndex-1) * pageSize + 1 }}</td>
63
+			        <td>{{ data.fileName || '-' }}</td>
64
+			        <td>{{ data.fileType||'0' }}</td>
65
+			        <td>{{ data.docSize ||'0' }}</td>
66
+			        <td>{{ data.createUserDTO && data.createUserDTO.name || '0'}}</td>
67
+			        <td>{{ data.updateTime|date:'yyyy-MM-dd HH:mm:ss'}}</td>
68
+			        <td>
69
+			          <div class="coop">
70
+									<span *ngIf="coopBtns.del" (click)="delList($event,data.id)">删除</span>
71
+									<span *ngIf="coopBtns.download" (click)="excelExport($event,data)">下载</span>
72
+			            <span *ngIf="coopBtns.updata" (click)="excelImport(data.id,2)">更新</span>
73
+									<span *ngIf="coopBtns.look" (click)="detail(data)">查看历史</span>
74
+								</div>
75
+			        </td>
76
+			      </tr>
77
+			    </tbody>
78
+			  </nz-table>
79
+			  <div class="list-template__pagination">
80
+			    <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
81
+			      (nzPageIndexChange)="getList()" (nzPageSizeChange)="getList()">
82
+			    </nz-pagination>
83
+			  </div>
84
+			</div>
85
+		</div>
86
+
80 87
   </div>
81 88
 
82 89
   <!-- 新增/编辑模态框 -->
83 90
   <div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="modal">
84 91
     <div class="modalBody">
85
-      <div class="title">科室发药单-查看<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
92
+      <div class="title">查看历史<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
86 93
       </div>
87 94
       <overlay-scrollbars #osComponentRef1 class="content">
88 95
         <div class="list-template__bottom">
@@ -90,30 +97,29 @@
90 97
             [nzLoading]="loading1">
91 98
             <thead>
92 99
               <tr class="thead">
93
-								<th nzWidth="10%">药品标识</th>
94
-                <th nzWidth="10%">药品名称</th>
95
-                <th nzWidth="10%">规格</th>
96
-                <th nzWidth="10%">消耗数量</th>
97
-                <th nzWidth="10%">实发数量</th>
98
-                <th nzWidth="10%">包装规格</th>
99
-                <th nzWidth="10%">发药药箱</th>
100
-                <th nzWidth="10%">原库存数</th>
101
-                <th nzWidth="10%">计算后库存</th>
102
-        				<th nzWidth="10%">增减</th>
100
+								<th>文档名称</th>
101
+								<th>文档格式</th>
102
+                <th>上传者</th>
103
+                <th>版本号</th>
104
+                <th>大小</th>
105
+                <th>上传时间</th>
106
+        				<th>操作</th>
103 107
               </tr>
104 108
             </thead>
105 109
             <tbody>
106 110
               <tr *ngFor="let data of viewData">
107
-								<td>{{ data.drugsInfoDTO?data.drugsInfoDTO.drugCode:'无' }}</td>
108
-                <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.drugName:'无' }}</td>
109
-                <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.specs:'无' }}</td>
110
-                <td>{{ data.expendCount||'0' }}</td>
111
-                <td>{{ data.actualCount||'0' }}</td>
112
-                <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.packingSpecs:'0' }}</td>
113
-                <td>{{ data.cartonNum || '0' }}</td>
114
-                <td>{{ data.formerInventory || '0' }}</td>
115
-                <td>{{ data.afterInventory || '0'}}</td>
116
-        				<td>{{ data.addSub || '0' }}</td>
111
+								<td>{{ data.fileName }}</td>
112
+								<td>{{ data.fileType||'-' }}</td>
113
+                <td>{{ data.createUserDTO?data.createUserDTO.name:'-' }}</td>
114
+                <td>{{ data.fileVersion||'-' }}</td>
115
+                <td>{{ data.docSize||'0' }}</td>
116
+                <td>{{ data.createTime|date:'yyyy-MM-dd HH:mm:ss'}}</td>
117
+								<td>
118
+								  <div class="coop">
119
+										<!-- <span *ngIf="coopBtns.del" (click)="delHistory(data)">删除</span> -->
120
+										<span *ngIf="coopBtns.download" (click)="excelHistory(data)">下载</span>
121
+									</div>
122
+								</td>
117 123
               </tr>
118 124
             </tbody>
119 125
           </nz-table>
@@ -126,147 +132,11 @@
126 132
   </div>
127 133
   <!-- 删除模态框 -->
128 134
   <app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
129
-    (confirmDelEvent)="confirmDel()" content="您确认要删除科室吗?"></app-dialog-delete>
130
-
131
-  <!-- 启用停用模态框 -->
132
-  <app-dialog-delete [delModal]="delModal1" (hideDelModalEvent)="hideDelModal1()" [btnLoading]="btnLoading"
133
-    (confirmDelEvent)="confirmDel1()" [content]="'您确认要建立配送工单吗?'"></app-dialog-delete>
134
-
135
-  <!-- 打印 -->
136
-  <div id="report" style="display: none;">
137
-		<div class="monad" 
138
-				*ngIf="rowData"
139
-				style="padding: 10px;
140
-				border: 1px solid #e7e7e7;
141
-				border-radius: 5px;">
142
-			<div class="monad-title" 
143
-				style="text-align: center;
144
-				font-size: 18px;
145
-				border-bottom: 1px solid #e7e7e7;
146
-				padding-bottom: 10px;">
147
-				大输液发药单-{{rowData.applyDeptDTO?rowData.applyDeptDTO.dept:''}}
148
-			</div>
149
-			<div class="monad-sign" style="display: flex;line-height: 23px;font-size: 14px;">
150
-				<div style="margin-right: 15px;">日期:{{rowData.createTime|date:'yyyy-MM-dd HH:mm'}}</div>
151
-				<div style="margin-right: 15px;">批次号:{{rowData.batch?rowData.batch.batchNo:'-'}}</div>
152
-				<div style="margin-right: 15px;">单号:{{rowData.packingNo}}</div>
153
-			</div>
154
-			<div class="monad-sign" style="display: flex;line-height: 23px;font-size: 14px;">
155
-				<div style="margin-right: 15px;">取药药房:{{rowData.pharmacyDTO?rowData.pharmacyDTO.dept:'-'}}</div>
156
-			</div>
157
-			<div style="border: 1px solid #e7e7e7;border-bottom: none;font-size: 14px;">
158
-				<div class="thead" style="display: flex;">
159
-					<div style="width: 40%;display: flex;font-size: 12px;
160
-					align-items: center;
161
-					justify-content: center;
162
-					flex-wrap: wrap;
163
-					border-right: 1px solid #e7e7e7;
164
-					border-bottom: 1px solid #e7e7e7;">药品名称</div>
165
-					
166
-					<div style="width: 20%;display: flex;font-size: 12px;
167
-					align-items: center;
168
-					justify-content: center;
169
-					flex-wrap: wrap;
170
-					border-right: 1px solid #e7e7e7;
171
-					border-bottom: 1px solid #e7e7e7;">规格</div>
172
-					
173
-					<div style="width: 10%;display: flex;font-size: 12px;
174
-					align-items: center;
175
-					justify-content: center;
176
-					flex-wrap: wrap;
177
-					border-right: 1px solid #e7e7e7;
178
-					border-bottom: 1px solid #e7e7e7;">15日消耗</div>
179
-					
180
-					<div style="width: 8%;display: flex;font-size: 12px;
181
-					align-items: center;
182
-					justify-content: center;
183
-					flex-wrap: wrap;
184
-					border-right: 1px solid #e7e7e7;
185
-					border-bottom: 1px solid #e7e7e7;">包规</div>
186
-					
187
-					<div style="width: 8%;display: flex;font-size: 12px;
188
-					align-items: center;
189
-					justify-content: center;
190
-					flex-wrap: wrap;
191
-					border-right: 1px solid #e7e7e7;
192
-					border-bottom: 1px solid #e7e7e7;">实消</div>
193
-					
194
-					<div style="width: 10%;display: flex;font-size: 12px;
195
-					align-items: center;
196
-					justify-content: center;
197
-					flex-wrap: wrap;
198
-					border-right: 1px solid #e7e7e7;
199
-					border-bottom: 1px solid #e7e7e7;">临时增发</div>
200
-					
201
-					<div style="width: 10%;display: flex;font-size: 12px;
202
-					align-items: center;
203
-					justify-content: center;
204
-					flex-wrap: wrap;
205
-					border-bottom: 1px solid #e7e7e7;">箱数</div>
206
-				</div>
207
-				<div *ngFor="let data of codes" style="display: flex;">
208
-					<div style="width: 40%;display: flex;font-size: 12px;
209
-					align-items: center;
210
-					justify-content: center;
211
-					flex-wrap: wrap;
212
-					border-right: 1px solid #e7e7e7;
213
-					border-bottom: 1px solid #e7e7e7;">{{ data.drugsInfoDTO.drugName }}</div>
214
-					
215
-					<div style="width: 20%;display: flex;font-size: 12px;
216
-					align-items: center;
217
-					justify-content: center;
218
-					flex-wrap: wrap;
219
-					border-right: 1px solid #e7e7e7;
220
-					border-bottom: 1px solid #e7e7e7;">{{ data.drugsInfoDTO.specs }}</div>
221
-					
222
-					<div style="width: 10%;display: flex;font-size: 12px;
223
-					align-items: center;
224
-					justify-content: center;
225
-					flex-wrap: wrap;
226
-					border-right: 1px solid #e7e7e7;
227
-					border-bottom: 1px solid #e7e7e7;">{{data.fifteenExpendCount}}</div>
228
-					
229
-					<div style="width: 8%;display: flex;font-size: 12px;
230
-					align-items: center;
231
-					justify-content: center;
232
-					flex-wrap: wrap;
233
-					border-right: 1px solid #e7e7e7;
234
-					border-bottom: 1px solid #e7e7e7;">{{ data.drugsInfoDTO.packingSpecs }}</div>
235
-					
236
-					<div style="width: 8%;display: flex;font-size: 12px;
237
-					align-items: center;
238
-					justify-content: center;
239
-					flex-wrap: wrap;
240
-					border-right: 1px solid #e7e7e7;
241
-					border-bottom: 1px solid #e7e7e7;">{{ data.expendCount }}</div>
242
-					
243
-					<div style="width: 10%;display: flex;font-size: 12px;
244
-					align-items: center;
245
-					justify-content: center;
246
-					flex-wrap: wrap;
247
-					border-right: 1px solid #e7e7e7;
248
-					border-bottom: 1px solid #e7e7e7;">{{ data.addSub || 0 }}</div>
249
-					
250
-					<div style="width: 10%;display: flex;font-size: 12px;
251
-					align-items: center;
252
-					justify-content: center;
253
-					flex-wrap: wrap;
254
-					border-bottom: 1px solid #e7e7e7;">
255
-						<span *ngIf="data.drugsInfoDTO.drugName!='合计'">
256
-							{{ data.giveOutType.value==1 ? data.actualCount :data.cartonNum }}
257
-							{{data.giveOutType && data.giveOutType.value==1?
258
-							data.drugsInfoDTO.unit:'箱'}}
259
-						</span>
260
-						<span *ngIf="data.drugsInfoDTO.drugName=='合计'">
261
-							{{ data.cartonActual}}
262
-						</span>
263
-					</div>
264
-					
265
-				</div>
266
-			</div>
267
-		</div>
268
-  </div>
269
-
135
+    (confirmDelEvent)="confirmDel()" content="您确认要删除文档吗?"></app-dialog-delete>
136
+		
137
+	<!-- 删除模态框 -->
138
+	<app-dialog-delete [delModal]="delHistoryModal" (hideDelModalEvent)="hideHistoryModal()" [btnLoading]="btnLoading"
139
+		(confirmDelEvent)="confirmHistory()" content="您确认要删除吗?"></app-dialog-delete>
270 140
 </div>
271 141
 <!-- 操作成功/失败提示框 -->
272 142
 <app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
@@ -276,4 +146,41 @@
276 146
 <router-outlet></router-outlet>
277 147
 <!-- 遮罩 -->
278 148
 <app-mask *ngIf="maskFlag"></app-mask>
279
-<app-excel-import [isShow]="isShow" (hideFormHand)="hideExcelImport($event)" *ngIf="isShow" (submitFormHand)="submitExcelImport($event)"></app-excel-import>
149
+
150
+<app-upload-file [isShow]="isShow" (hideFormHand)="hideExcelImport($event)" *ngIf="isShow" (submitFormHand)="submitExcelImport($event)"></app-upload-file>
151
+
152
+<!-- 删除树结构模态框 -->
153
+  <app-dialog-delete [delModal]="delTreeModal" (hideDelModalEvent)="hideTreeModal()" [btnLoading]="btnLoading"
154
+    (confirmDelEvent)="confirmTree()" content="您确认要删除目录吗?"></app-dialog-delete>
155
+		
156
+<!-- 新增一级目录 -->
157
+<div class="save display_flex justify-content_flex-center align-items_center add" *ngIf="addModal">
158
+	<div class="modalAddBody">
159
+		<div class="title">{{add?'新增':'编辑'}}<i class="icon_transport transport-guanbi" (click)="hideAddModal()"></i>
160
+		</div>
161
+		<div class="content">
162
+			<form nz-form [formGroup]="validateTreeForm" class="addForm" (ngSubmit)="submitForm()">
163
+				<nz-form-item *ngIf="treeType==2">
164
+					<nz-form-label [nzSpan]="7" nzFor="parent">父级目录名称</nz-form-label>
165
+					<nz-form-control [nzSpan]="17" nzErrorTip="请输入父级目录名称!">
166
+						<nz-input-group>
167
+							<input nz-input disabled formControlName="parent" placeholder="请输入父级目录名称" />
168
+						</nz-input-group>
169
+					</nz-form-control>
170
+				</nz-form-item>
171
+				<nz-form-item>
172
+					<nz-form-label [nzSpan]="7" nzRequired nzFor="folderName">目录名称</nz-form-label>
173
+					<nz-form-control [nzSpan]="17" nzErrorTip="请输入目录名称!">
174
+						<nz-input-group>
175
+							<input nz-input formControlName="folderName" placeholder="请输入目录名称" />
176
+						</nz-input-group>
177
+					</nz-form-control>
178
+				</nz-form-item>
179
+			</form>
180
+		</div>
181
+		<div class=" display_flex justify-content_flex-center">
182
+			<button nzType="primary" [nzLoading]="btnLoading" nz-button (click)="submitAddForm()">确认</button>
183
+			<button class="btn cancel" nz-button nzType="default" (click)="hideAddModal()">取消</button>
184
+		</div>
185
+	</div>
186
+</div>

+ 80 - 6
src/app/views/personage-document/personage-document.component.less

@@ -1,5 +1,9 @@
1 1
 @import "../../../../src/theme.less";
2 2
 :host {
3
+	.activeClass{
4
+		background: #34b349;
5
+		color: #fff;
6
+	}
3 7
   .add-button {
4 8
     margin: 0 auto 16px !important;
5 9
   }
@@ -24,6 +28,56 @@
24 28
   }
25 29
 }
26 30
 
31
+.list-template{
32
+	background: #eee;
33
+	.content{
34
+		display: flex;
35
+		.list-left{
36
+			width: 20%;
37
+			margin-right: 15px;
38
+			height: 100vh;
39
+			overflow-y: auto;
40
+			overflow-x: hidden;
41
+			background: #fff;
42
+			.tree-top-add{
43
+				margin: 6px;
44
+			}
45
+			.tree-opt{
46
+				display: flex;
47
+				flex: 1;
48
+				.item{
49
+					width: 34%;
50
+					text-align: center;
51
+					height: 38px;
52
+					line-height: 38px;
53
+					color: #333;
54
+					background: #F0F6ED;
55
+					border: 1px solid #e5e9ed;
56
+					cursor: pointer;
57
+				}
58
+			}
59
+			.tree-content{
60
+				padding: 0 10px;
61
+				.custom-node{
62
+					display: inline-block;
63
+					width: 100%;
64
+					cursor: pointer;
65
+					padding: 5px;
66
+					.folder-name{
67
+						margin-left: 2px;
68
+					}
69
+				}
70
+			}
71
+		}
72
+		
73
+		.list-right{
74
+			width: 80%;
75
+			background: #fff;
76
+			padding: 10px;
77
+		}
78
+	}
79
+}
80
+
27 81
 .save {
28 82
   position: fixed;
29 83
   left: 0;
@@ -33,8 +87,8 @@
33 87
   background: rgba(0, 0, 0, 0.4);
34 88
   z-index: 99;
35 89
 
36
-  .modalBody {
37
-    width: 350px;
90
+  .modalAddBody {
91
+    width: 480px;
38 92
     background: #fff;
39 93
     border-radius: 5px;
40 94
     padding: 10px 20px;
@@ -59,13 +113,13 @@
59 113
 
60 114
     .content {
61 115
       width: 100%;
62
-      height: 117px;
63 116
       background: #f9fafb;
64 117
       border: 1px solid #e5e9ed;
65 118
       border-radius: 5px;
66 119
       overflow: hidden;
67 120
       margin-top: 12px;
68
-
121
+			padding: 16px;
122
+			
69 123
       div {
70 124
         text-align: center;
71 125
         margin: 0;
@@ -112,8 +166,27 @@
112 166
   &.add {
113 167
     .modalBody {
114 168
       width: 80%;
115
-      height: auto;
116
-
169
+      background: #fff;
170
+      border-radius: 5px;
171
+      padding: 10px 20px;
172
+      color: #333;
173
+    
174
+      .title {
175
+        width: 100%;
176
+        text-align: center;
177
+        font-size: 18px;
178
+        position: relative;
179
+    
180
+        i {
181
+          position: absolute;
182
+          right: 0;
183
+          top: 0;
184
+          font-size: 20px;
185
+          color: #666;
186
+          cursor: pointer;
187
+          padding: 0 5px;
188
+        }
189
+      }
117 190
       .content {
118 191
         width: 100%;
119 192
         height: auto;
@@ -225,6 +298,7 @@
225 298
       button {
226 299
         &:nth-child(1) {
227 300
           margin-right: 20px;
301
+					margin-top: 15px;
228 302
         }
229 303
       }
230 304
     }

+ 353 - 416
src/app/views/personage-document/personage-document.component.ts

@@ -16,6 +16,8 @@ import { Subject } from "rxjs";
16 16
 import { debounceTime, filter } from "rxjs/operators";
17 17
 import host from "../../../assets/js/http";
18 18
 import { HttpRequest, HttpResponse, HttpClient } from '@angular/common/http';
19
+import { NzContextMenuService, NzDropdownMenuComponent } from 'ng-zorro-antd/dropdown';
20
+import { NzFormatEmitEvent, NzTreeNode } from 'ng-zorro-antd/core';
19 21
 
20 22
 @Component({
21 23
   selector: "app-personage-document",
@@ -39,23 +41,12 @@ export class PersonageDocumentComponent implements OnInit{
39 41
   ) {}
40 42
 
41 43
   ngOnInit() {
42
-    this.searchParentDeptSubject.pipe(debounceTime(500)).subscribe((e) => {
43
-      // this.getAllParentdepart(v).subscribe((result) => {
44
-      //   this.isLoading = false;
45
-      //   if (result.status == 200) {
46
-      //     this.allParentdepart = result.list;
47
-      //   }
48
-      // });
49
-			this.isDeptLoading = true;
50
-			this.getDeparts(e);
51
-    });
52 44
 		this.hosId = this.tool.getCurrentHospital().id;
45
+		this.userId = this.tool.getCurrentUserId();
53 46
     this.coopBtns = this.tool.initCoopBtns(this.route);
54
-    this.initForm();
55
-    this.getAllHospital();
56
-    // this.getType();
57
-    // this.getDeptHandoverType();
47
+		this.getTreeData();
58 48
   }
49
+	userId:any;
59 50
   listOfData: any[] = []; //表格数据
60 51
   promptContent: string; //操作提示框提示信息
61 52
   ifSuccess: boolean; //操作成功/失败
@@ -64,6 +55,7 @@ export class PersonageDocumentComponent implements OnInit{
64 55
   modal: boolean = false; //新增/编辑模态框
65 56
   add: boolean; //true:新增;false:编辑
66 57
   validateForm: FormGroup; //新增/编辑表单
58
+	validateTreeForm: FormGroup; //新增/编辑表单
67 59
   coopId: number; //表格中执行操作的id
68 60
   department: ""; //所属科室
69 61
 	hosId: number;
@@ -88,32 +80,233 @@ export class PersonageDocumentComponent implements OnInit{
88 80
   // 初始化增删改按钮
89 81
   coopBtns: any = {};
90 82
 	viewData: any = []; //科室单查看数据
83
+	nodes: any = [];
84
+	
85
+	// 新增一级目录
86
+	addModal:boolean = false;
87
+	treeType:any;
88
+	addTree(type){
89
+		if(type==2){
90
+			if(!this.treeItem){
91
+				this.message.error('请先选择目录!')
92
+				return
93
+			}
94
+		}else if(type==1){
95
+			this.treeItem = null
96
+			this.parentNode = null
97
+		}
98
+		this.treeType = type
99
+		this.add = true
100
+		this.initAddForm();
101
+	}	
102
+	
103
+	// 编辑目录
104
+	editTree(type){
105
+		if(!this.treeItem){
106
+			this.message.error('请先选择目录!')
107
+			return
108
+		}
109
+		this.treeType = type
110
+		this.add = false
111
+		this.initAddForm('edit');
112
+	}
113
+	
114
+	hideAddModal(){
115
+		this.addModal = false
116
+	}
117
+	
118
+	// 点击数节点
119
+	treeItem:any; //当前节点
120
+	parentNode:any; //父级节点
121
+	activedNode:any;
122
+	nodeClick(data: NzFormatEmitEvent): void{
123
+		this.treeItem = data.node.origin
124
+		this.parentNode = data.node.parentNode ? data.node.parentNode.origin : null
125
+		// console.log(123,this.treeItem)
126
+		// console.log(456,this.parentNode)
127
+		this.getList();
128
+	}
129
+	
130
+	openFolder(data: NzTreeNode | Required<NzFormatEmitEvent>): void {
131
+		console.log(9998, data)
132
+	}
133
+		
134
+	// 删除目录
135
+	treeDel(){
136
+		if(!this.treeItem){
137
+			this.message.error('请先选择目录!')
138
+			return
139
+		}
140
+		this.delTreeModal = true;
141
+	}
142
+	// 取消删除目录
143
+	delTreeModal:boolean = false;
144
+	hideTreeModal() {
145
+	  this.delTreeModal = false;
146
+	}
147
+	// 确认删除目录
148
+	confirmTree() {
149
+	  var that = this;
150
+	  that.btnLoading = true;
151
+	  that.mainService
152
+	    .coopData(
153
+	      "rmvData",
154
+	      "documentFolder",
155
+	      [that.treeItem.id]
156
+	    )
157
+	    .subscribe((data) => {
158
+	      that.btnLoading = false;
159
+	      that.delTreeModal = false;
160
+				if (data.status==200) {
161
+					that.showPromptModal("删除", true, "");
162
+					this.treeItem = null
163
+					this.parentNode = null
164
+					this.getTreeData();
165
+				} else {
166
+					that.showPromptModal("删除", false, data.msg);
167
+				}
168
+
169
+	    });
170
+	}
171
+	// 获取目录数据
172
+	defaultExpandedKeys:any = [];
173
+	getTreeData(){
174
+		let query = {
175
+			idx: 0,
176
+			sum: 9999,
177
+			documentFolder:{
178
+				personal: 1,
179
+				createUser: this.userId,
180
+				hosId: this.hosId
181
+			}
182
+		}
183
+		this.mainService
184
+		  .getFetchDataList("data", "documentFolder", query)
185
+		  .subscribe((res) => {
186
+		    let data = res.list;
187
+				data = data.map(v => ({...v, parentId: v.parent ? v.parent.id : undefined, title: v.folderName, key: v.id}));
188
+				this.nodes = this.tool.tranListToTreeDataLeaf(data, undefined, "parentId");
189
+				this.defaultExpandedKeys = [this.nodes.length>0?this.nodes[0].key:null]
190
+			});
191
+	}
192
+	
193
+	// 初始化新增form表单
194
+	initAddForm(type:any = 'add') {
195
+		this.validateTreeForm = this.fb.group({
196
+			folderName: [type=='edit' ? this.treeItem.folderName : null, [Validators.required]],
197
+			parent: [null, []],
198
+		});
199
+		if(this.treeType==2){
200
+			this.validateTreeForm.addControl(
201
+			  "parent",
202
+			  new FormControl(null)
203
+			);
204
+			this.validateTreeForm.controls.parent.setValue(this.treeItem.folderName);
205
+		}else{
206
+			this.validateTreeForm.removeControl("parent");
207
+		}
208
+		setTimeout(_=>{
209
+			this.addModal = true
210
+		},50)
211
+	}
212
+	
213
+	// 新增/编辑树
214
+	submitAddForm(): void {
215
+	  for (const i in this.validateTreeForm.controls) {
216
+	    this.validateTreeForm.controls[i].markAsDirty();
217
+	    this.validateTreeForm.controls[i].updateValueAndValidity();
218
+	  }
219
+	  if (this.validateTreeForm.invalid) return;
220
+	  this.btnLoading = true;
221
+		let postData = {
222
+			documentFolder:{
223
+				personal: 1,
224
+				createUser: this.userId,
225
+				hosId: this.hosId,
226
+				folderName: this.validateTreeForm.value.folderName,
227
+				parent:{
228
+					id:''
229
+				},
230
+				id:null,
231
+			}
232
+		};
233
+	  if (this.treeType==1) {
234
+	    delete postData.documentFolder.parent
235
+			delete postData.documentFolder.id
236
+	  } else if(this.treeType==2) {
237
+			postData.documentFolder.parent.id = this.treeItem.id
238
+		} else if(this.treeType==3) {
239
+			postData.documentFolder.id = this.treeItem.id
240
+			delete postData.documentFolder.parent
241
+		}
242
+	  this.mainService
243
+	    .coopData(this.add ? "addData" : "updData", "documentFolder", postData)
244
+	    .subscribe((result) => {
245
+	      this.hideAddModal();
246
+	      this.btnLoading = false;
247
+	      if (result["status"] == 200) {
248
+					this.treeItem = null
249
+					this.parentNode = null
250
+					this.getTreeData();
251
+	        this.showPromptModal(this.add ? "新增" : "编辑", true, "");
252
+	      } else {
253
+	        this.showPromptModal(
254
+	          this.add ? "新增" : "编辑",
255
+	          false,
256
+	          result["msg"]
257
+	        );
258
+	      }
259
+	    });
260
+	}
261
+	
91 262
   // 模板导出
92
-  excelExport(){
93
-    this.maskFlag = this.message.loading("下载模板中..", {
263
+  excelExport(e, item){
264
+    this.maskFlag = this.message.loading("下载中..", {
94 265
       nzDuration: 0,
95 266
     }).messageId;
96
-    this.mainService.exportExcel("department", {}).subscribe(
267
+    this.mainService.documentExport(item.fileToken).subscribe(
97 268
       (data) => {
98 269
         this.message.remove(this.maskFlag);
99 270
         this.maskFlag = false;
100
-        this.message.success('下载模板成功');
271
+        this.message.success('下载成功');
272
+				let type = null
273
+				if(item.fileType=='xls'){
274
+					console.log(1)
275
+					type = 'application/vnd.ms-excel'
276
+				}else if(item.fileType=='xlsx'){
277
+					type = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
278
+				}else if(item.fileType=='doc'){
279
+					type = 'application/msword'
280
+				}else if(item.fileType=='docx'){
281
+					type = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
282
+				}else if(item.fileType=='pdf'){
283
+					type = 'application/pdf'
284
+				}else if(item.fileType=='ppt'){
285
+					type = 'application/vnd.ms-powerpoint'
286
+				}else if(item.fileType=='pptx'){
287
+					type = 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
288
+				}else if(item.fileType=='png'){
289
+					type = 'image/png'
290
+				}else if(item.fileType=='gif'){
291
+					type = 'image/gif'
292
+				}else if(item.fileType=='jpeg' || item.fileType=='jpg'){
293
+					type = 'image/jpeg'
294
+				}
101 295
         var file = new Blob([data], {
102
-          type: "application/vnd.ms-excel",
296
+          type: type,
103 297
         });
104
-        //trick to download store a file having its URL
105 298
         var fileURL = URL.createObjectURL(file);
106 299
         var a = document.createElement("a");
107 300
         a.href = fileURL;
108 301
         a.target = "_blank";
109
-        a.download = "科室导入模板.xls";
302
+        a.download = item.fileName;
110 303
         document.body.appendChild(a);
111 304
         a.click();
112 305
       },
113 306
       (err) => {
114 307
         this.message.remove(this.maskFlag);
115 308
         this.maskFlag = false;
116
-        this.message.error('下载模板失败');
309
+        this.message.error('下载失败');
117 310
       }
118 311
     );
119 312
   }
@@ -125,19 +318,39 @@ export class PersonageDocumentComponent implements OnInit{
125 318
     this.isShow = false;
126 319
   }
127 320
   // 触发
128
-  excelImport() {
321
+	uploadType:any;
322
+	itemId:any;
323
+  excelImport(id, type) {
324
+		if(!this.treeItem && type==1){
325
+			this.message.error('请先选择目录!')
326
+			return
327
+		}
328
+		this.uploadType = type
329
+		this.itemId = id
129 330
     this.isShow = true;
130 331
   }
332
+	maskFlag:any;
131 333
   submitExcelImport({fileList}){
132 334
     this.isShow = false;
133 335
     const formData = new FormData();
134 336
     fileList.forEach((file: any) => {
135 337
       formData.append('file', file);
338
+			formData.append('filename', file.name);
136 339
     });
137
-    this.maskFlag = this.message.loading("正在导入中..", {
340
+		let url = null
341
+		let title = null
342
+		if(this.uploadType==1){
343
+			url = this.mainService.documentImport(this.treeItem.id, 1);
344
+			title = '上传'
345
+		}else{
346
+			url = this.mainService.documentUpdateFile(this.itemId);
347
+			title = '更新'
348
+		}
349
+    this.maskFlag = this.message.loading(`正在${title}中..`, {
138 350
       nzDuration: 0,
139 351
     }).messageId;
140
-    const req = new HttpRequest('Post', this.mainService.returnImportExcelUrl('department'), formData, {
352
+
353
+    const req = new HttpRequest('Post', url, formData, {
141 354
       reportProgress: true
142 355
     });
143 356
     this.http
@@ -148,18 +361,18 @@ export class PersonageDocumentComponent implements OnInit{
148 361
           if(res.body.status == 200){
149 362
             this.message.remove(this.maskFlag);
150 363
             this.maskFlag = false;
151
-            this.message.success('导入成功');
364
+            this.message.success(`${title}成功`);
152 365
             this.getList();
153 366
           }else{
154 367
             this.message.remove(this.maskFlag);
155 368
             this.maskFlag = false;
156
-            this.showPromptModal("导入", false, res.body.msg);
369
+            this.showPromptModal(`${title}`, false, res.body.msg);
157 370
           }
158 371
         },
159 372
         () => {
160 373
           this.message.remove(this.maskFlag);
161 374
           this.maskFlag = false;
162
-          this.message.error('导入失败');
375
+          this.message.error(`${title}失败`);
163 376
         },
164 377
       );
165 378
   }
@@ -171,90 +384,14 @@ export class PersonageDocumentComponent implements OnInit{
171 384
   }
172 385
   // 打开父级科室下拉框baba
173 386
   isLoading = false;
174
-  openDeptSelect(flag) {
175
-    if (flag) {
176
-      this.isLoading = true;
177
-      this.getAllParentdepart().subscribe((result) => {
178
-        this.isLoading = false;
179
-        if (result.status == 200) {
180
-          this.allParentdepart = result.list;
181
-        }
182
-      });
183
-    }
184
-  }
185 387
   // 配送建单
186 388
   coopData:any = {};
187
-  addDateModal(data) {
389
+  delList(e,data) {
188 390
     this.coopData = data;
189
-    this.showDelModal1();
391
+    this.showDelModal(e,data);
190 392
   }
191 393
   delModal1: boolean = false; //删除模态框
192 394
 
193
-  showDelModal1() {
194
-    this.delModal1 = true;
195
-  }
196
-  hideDelModal1() {
197
-    this.delModal1 = false;
198
-  }
199
-  // 确认配送工单
200
-  confirmDel1() {
201
-    this.btnLoading = true;
202
-    this.mainService
203
-      .transfusionBuildOrder({
204
-				drugsListId:this.coopData.id
205
-			})
206
-      .subscribe((data) => {
207
-        this.btnLoading = false;
208
-        this.delModal1 = false;
209
-        if (data.status == 200) {
210
-          this.showPromptModal('操作', true, "");
211
-        } else {
212
-          this.showPromptModal('操作', false, data.msg);
213
-        }
214
-      });
215
-  }
216
-  //获取所有的父级科室列表
217
-  getAllParentdepart(keyWord = "") {
218
-    let postData: any = {
219
-      idx: 0,
220
-      sum: 10,
221
-      department: {
222
-        // hospital: { id: this.add ? this.tool.getCurrentHospital().id : this.hospital },
223
-        keyWord: keyWord,
224
-      },
225
-    };
226
-    if (this.coopItem) {
227
-      // 过滤这个科室及其子科室
228
-      postData.department.filterByDeptId = this.coopItem.id;
229
-    }
230
-    return this.mainService.getFetchDataList("data", "department", postData);
231
-  }
232
-  // 新添加科室号码
233
-  addDeptPhone(e: MouseEvent) {
234
-    e.preventDefault();
235
-    this.deptPhones.push({ id: ++this.deptsPhoneId, phone: "" });
236
-    this.deptsPhoneChange();
237
-  }
238
-  // 删除新添加科室号码
239
-  removeDeptPhone(index: number, e: MouseEvent) {
240
-    e.preventDefault();
241
-    this.deptPhones.splice(index, 1);
242
-    this.deptsPhoneChange();
243
-  }
244
-  //监听科室电话输入事件
245
-  deptsPhoneChange(e?, phone?) {
246
-    if (e !== undefined && phone !== undefined) {
247
-      phone.phone = e;
248
-    }
249
-    // -------------判断添加按钮是否禁用 start
250
-    this.isAddDeptsPhone = !this.validateForm.value.officeNum;
251
-    if (!this.isAddDeptsPhone) {
252
-      //如果没禁用
253
-      this.isAddDeptsPhone = this.deptPhones.some((item) => item.phone === "");
254
-    }
255
-    // -------------判断添加按钮是否禁用 end
256
-  }
257
-
258 395
   // 搜索
259 396
   search() {
260 397
     this.pageIndex = 1;
@@ -263,43 +400,27 @@ export class PersonageDocumentComponent implements OnInit{
263 400
   // 重置
264 401
   reset() {
265 402
     this.pageIndex = 1;
266
-    this.department = null;
267
-    this.batchNumber = "";
268
-		this.dateRange = [];
269
-		this.startDate = "";
270
-		this.endDate = "";
271 403
     this.getList();
272 404
   }
273 405
   // 表格数据
274 406
   loading1 = false;
407
+	fileName:any;
275 408
   getList() {
276 409
     var that = this;
277 410
     let data = {
278 411
       idx: that.pageIndex - 1,
279 412
       sum: that.pageSize,
280
-      drugsList: {
281
-        applyDept: that.department,
282
-				batch:{
283
-					batchNo:that.batchNumber
284
-				},
285
-        startTime: this.startDate,
286
-				endTime: this.endDate,
287
-				hosId: this.hosId
413
+      documentFile: {
414
+				hosId: this.hosId,
415
+				fileName: this.fileName,
416
+				personal: 1,
417
+				createUser: this.userId,
418
+				folderId: this.treeItem && this.treeItem.id || undefined
288 419
       },
289 420
     };
290
-		if(that.department){
291
-			data.drugsList.applyDept = that.department
292
-		}else{
293
-			delete data.drugsList.applyDept
294
-		}
295
-		if(that.batchNumber){
296
-			data.drugsList.batch.batchNo = that.batchNumber
297
-		}else{
298
-			delete data.drugsList.batch
299
-		}
300 421
     this.loading1 = true;
301 422
     that.mainService
302
-      .getFetchDataList("data", "drugsList", data)
423
+      .getFetchDataList("data", "documentFile", data)
303 424
       .subscribe((data) => {
304 425
         this.loading1 = false;
305 426
         that.listOfData = data.list;
@@ -319,174 +440,6 @@ export class PersonageDocumentComponent implements OnInit{
319 440
 	  this.endDate = format(endOfDay(result[1]), 'yyyy-MM-dd HH:mm:ss');
320 441
 	}
321 442
 
322
-	// 获取所有科室
323
-  // snum = 0;
324
-  getDeparts(dept) {
325
-    var that = this;
326
-    let data:any = {
327
-      department: {
328
-        dept,
329
-        hosIds: this.hosId,
330
-      },
331
-      idx: 0,
332
-      sum: 20,
333
-    };
334
-		if(this.isParentData==1){
335
-			if(this.tool.getCurrentUserInfo().currentHospital &&
336
-			this.tool.getCurrentUserInfo().currentHospital.parent){
337
-				data.department.hosIds = this.hosId +','+this.tool.getCurrentUserInfo().currentHospital.parent.id
338
-			}else{
339
-				data.department.hosIds = this.hosId
340
-			}
341
-		}
342
-    that.mainService
343
-		.getFetchDataList("data", "department", data)
344
-		.subscribe((data) => {
345
-			setTimeout(_=>{
346
-				this.isDeptLoading = false
347
-				this.hospitals1 = data.list
348
-			},500)
349
-		});
350
-  }
351
-
352
-  // 获取所有院区
353
-	isParentData:any = null;
354
-  getAllHospital() {
355
-		this.mainService.getDictionary("list", "ordinary_field").subscribe((data) => {
356
-			let taskTypeData = data.find(i=>i.value=='infusionSolutions')
357
-			let postData = {
358
-			  idx: 0,
359
-			  sum: 10,
360
-			  taskTypeConfig: {
361
-					hosId:this.hosId,
362
-					taskType:taskTypeData.id
363
-			  }
364
-			};
365
-			this.mainService
366
-			  .getFetchDataList("simple/data", "taskTypeConfig", postData)
367
-			  .subscribe((result) => {
368
-			    if (result.status == 200) {
369
-						let data = result.list[0] || {};
370
-						this.isParentData = data.quoteParentData;
371
-						this.getDeparts('')
372
-						this.getList();
373
-			    }
374
-			  });
375
-		});
376
-  }
377
-
378
-  // 切换院区选项
379
-  buildings: any = []; //楼栋
380
-  maskFlag: any = false;
381
-  changeHosp(obj?) {
382
-    let hospitalId;
383
-    if (obj) {
384
-      hospitalId = obj.hospital.id;
385
-    }
386
-    let hid;
387
-    if (hospitalId || hospitalId == 0) {
388
-      hid = hospitalId - 0;
389
-    }
390
-		// else {
391
-  //     hid = this.hospital - 0;
392
-  //   }
393
-    let data = {
394
-      // hosId: this.add ? this.tool.getCurrentHospital().id : hid,
395
-    };
396
-    this.maskFlag = this.message.loading("正在加载中..", {
397
-      nzDuration: 0,
398
-    }).messageId;
399
-    this.mainService
400
-      .coopData("getBuildingOrFloor", "building", data)
401
-      .subscribe((data) => {
402
-        this.buildings = data.data;
403
-        this.floors = [];
404
-        // ---------
405
-        if (obj) {
406
-          //编辑
407
-          let arr = this.buildings.map((item) => item.id);
408
-          if (obj.building.id && arr.includes(obj.building.id)) {
409
-            //有楼栋
410
-            this.changeBuilding(obj.building.id, obj);
411
-            this.validateForm.controls.building.setValue(obj.building.id + "");
412
-          } else {
413
-            //无楼栋
414
-            this.floors = [];
415
-            this.message.remove(this.maskFlag);
416
-            this.maskFlag = false;
417
-            this.modal = true;
418
-            this.validateForm.controls.building.setValue(null);
419
-            this.validateForm.controls.officeAddress.setValue(null);
420
-          }
421
-        } else {
422
-          //新增
423
-          this.message.remove(this.maskFlag);
424
-          this.maskFlag = false;
425
-          this.modal = true;
426
-        }
427
-        // ---------
428
-      });
429
-  }
430
-
431
-  // 切换楼栋信息
432
-  floors: Array<any> = []; //楼层
433
-  floorLoading: boolean = false;
434
-  changeBuilding(buildingId?, obj?) {
435
-    var that = this;
436
-    that.floors = [];
437
-    var bid;
438
-    if (buildingId || buildingId == 0) {
439
-      bid = buildingId - 0;
440
-    } else if (!that.add && that.validateForm.value.building) {
441
-      bid = that.validateForm.value.building - 0;
442
-    } else {
443
-      return;
444
-    }
445
-    let data = {
446
-      buildingId: bid,
447
-    };
448
-    this.floorLoading = true;
449
-    that.mainService
450
-      .coopData("getBuildingOrFloor", "floor", data)
451
-      .subscribe((data) => {
452
-        this.floorLoading = false;
453
-        this.message.remove(this.maskFlag);
454
-        this.maskFlag = false;
455
-        this.modal = true;
456
-        that.floors = data.data;
457
-        if (obj) {
458
-          let floorId = obj.floor.id;
459
-          let arr = that.floors.map((item) => item["id"]);
460
-          if (floorId && arr.includes(floorId)) {
461
-            this.validateForm.controls.floor.setValue(floorId + "");
462
-          } else {
463
-            this.validateForm.controls.floor.setValue(null);
464
-            this.validateForm.controls.officeAddress.setValue(null);
465
-          }
466
-        }
467
-      });
468
-  }
469
-
470
-  // 获取科室类型
471
-  types: Array<any> = [];
472
-  getType() {
473
-    var that = this;
474
-    that.mainService.getDictionary("list", "dept_type").subscribe((data) => {
475
-      console.log(data);
476
-      that.types = data;
477
-    });
478
-  }
479
-
480
-  // 获取科室汇总交接类型
481
-  deptHandoverTypes: Array<any> = [];
482
-  getDeptHandoverType() {
483
-    var that = this;
484
-    that.mainService.getDictionary("list", "dept_handover_type").subscribe((data) => {
485
-      console.log(data);
486
-      that.deptHandoverTypes = data;
487
-    });
488
-  }
489
-
490 443
   // 新增弹框
491 444
   showModal() {
492 445
     this.initForm();
@@ -687,57 +640,6 @@ export class PersonageDocumentComponent implements OnInit{
687 640
 
688 641
   // 编辑
689 642
   coopItem: any = null;
690
-  edit(e, data) {
691
-    e.stopPropagation();
692
-    this.add = false;
693
-    this.coopId = data.id;
694
-    this.coopItem = data;
695
-    this.isAddDeptsPhone = false;
696
-    this.deptPhones = [];
697
-    let phones = data.manyPhone ? data.manyPhone.split(",") : [];
698
-    if (phones.length === 0) {
699
-      this.validateForm.controls.officeNum.setValue("");
700
-      this.deptPhones = [];
701
-    } else if (phones.length === 1) {
702
-      this.validateForm.controls.officeNum.setValue(phones[0]);
703
-      this.deptPhones = [];
704
-    } else {
705
-      this.validateForm.controls.officeNum.setValue(phones[0]);
706
-      this.deptPhones = phones.slice(1).map((item) => {
707
-        return {
708
-          id: ++this.deptsPhoneId,
709
-          phone: item,
710
-        };
711
-      });
712
-    }
713
-    if (data.startTime1 && data.endTime1) {
714
-      this.validateForm.controls.startTime1.setValue(new Date(data.startTime1));
715
-      this.validateForm.controls.endTime1.setValue(new Date(data.endTime1));
716
-      this.validateForm.controls.dynamicCode1.setValue(data.dynamicCode1 == 1);
717
-    }
718
-    if (data.startTime2 && data.endTime2) {
719
-      this.validateForm.controls.startTime2.setValue(new Date(data.startTime2));
720
-      this.validateForm.controls.endTime2.setValue(new Date(data.endTime2));
721
-      this.validateForm.controls.dynamicCode2.setValue(data.dynamicCode2 == 1);
722
-    }
723
-    this.validateForm.controls.officeAddress.setValue(data.address);
724
-    if (data.parent) {
725
-      this.getAllParentdepart(data.parent.dept).subscribe((res) => {
726
-        if (res.status == 200) {
727
-          this.allParentdepart = res.list;
728
-          this.validateForm.controls.parentOfficeName.setValue(data.parent.id);
729
-        }
730
-      });
731
-    }
732
-    this.validateForm.controls.officeName.setValue(data.dept);
733
-    this.validateForm.controls.deptalias.setValue(data.deptalias);
734
-    this.validateForm.controls.officeNo.setValue(data.pcode);
735
-    this.validateForm.controls.officeType.setValue(data.type.id + "");
736
-    this.validateForm.controls.deptHandoverType.setValue(data.deptHandoverType ? data.deptHandoverType.id + "" : null);
737
-    // this.changeHosp(data);
738
-    this.validateForm.controls.officeAddress.setValue(data.address);
739
-  }
740
-
741 643
   // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
742 644
   showPromptModal(con, success, promptInfo?) {
743 645
     this.promptModalShow = false;
@@ -748,6 +650,7 @@ export class PersonageDocumentComponent implements OnInit{
748 650
       this.promptModalShow = true;
749 651
     }, 100);
750 652
     this.getList();
653
+		this.getTreeData();
751 654
   }
752 655
 
753 656
   delModal: boolean = false; //删除模态框
@@ -759,15 +662,10 @@ export class PersonageDocumentComponent implements OnInit{
759 662
    * @param flag true是批量删除,false是单个删除
760 663
    * @param id
761 664
    */
762
-  showDelModal(e, flag, id) {
665
+  showDelModal(e, id) {
763 666
     e.stopPropagation();
764 667
     this.delModal = true;
765
-    this.coopFlag = flag;
766
-    if (flag) {
767
-      this.coopIds = id;
768
-    } else {
769
-      this.coopId = id;
770
-    }
668
+    this.coopId = id;
771 669
   }
772 670
   hideDelModal() {
773 671
     this.delModal = false;
@@ -779,54 +677,130 @@ export class PersonageDocumentComponent implements OnInit{
779 677
     that.mainService
780 678
       .coopData(
781 679
         "rmvData",
782
-        "department",
783
-        this.coopFlag ? this.coopIds : [that.coopId]
680
+        "documentFile",
681
+        [that.coopId]
784 682
       )
785 683
       .subscribe((data) => {
786 684
         that.btnLoading = false;
787 685
         that.delModal = false;
788
-        if (data.data && data.data[0]) {
789
-          if (!data.data[0].msg) {
790
-            if (
791
-              that.listOfData.length == 1 &&
792
-              that.pageIndex == Math.ceil(that.listLength / that.pageSize)
793
-            ) {
794
-              that.listLength--;
795
-              that.pageIndex = Math.ceil(that.listLength / that.pageSize) || 1;
796
-            }
797
-            that.showPromptModal("删除", true, "");
798
-          } else {
799
-            that.showPromptModal("删除", false, data.data[0].msg);
800
-          }
686
+        if (data.status==200) {
687
+          that.showPromptModal("删除", true, "");
801 688
         } else {
802
-          that.showPromptModal("删除", false, "");
689
+          that.showPromptModal("删除", false, data.msg);
803 690
         }
804 691
       });
805 692
   }
806 693
 
807 694
   // 查看
808
-  detail(e, id) {
809
-    e.stopPropagation();
695
+  detail(item) {
696
+		this.coopData = item;
810 697
 		var that = this;
811 698
 		let data = {
812 699
 			idx: 0,
813 700
 			sum: 9999,
814
-			drugsConfigure: {
701
+			documentFile: {
815 702
 			  hosId: this.hosId,
816
-			  drugListId: id
703
+			  fileCode: item.fileCode
817 704
 			}
818 705
 		};
819 706
 		this.loading1 = true;
820 707
 		that.mainService
821
-		  .getFetchDataList("data", "drugsConfigure", data)
708
+		  .getFetchDataList("data", "documentFile", data)
822 709
 		  .subscribe((data) => {
823 710
 		    this.loading1 = false;
824 711
 				this.modal = true
825 712
 		    that.viewData = data.list;
826
-		    // that.listLength = data.totalNum;
827 713
 		  });
828 714
   }
829
-
715
+	
716
+	// 删除历史
717
+	delHistory(e,data){
718
+		this.coopData = data;
719
+		this.showHistoryModal(e,data);
720
+	}
721
+	
722
+	HistoryId:any;
723
+	showHistoryModal(e, id) {
724
+	  e.stopPropagation();
725
+	  this.delModal = true;
726
+	  this.HistoryId = id;
727
+	}
728
+	hideHistoryModal() {
729
+	  this.delModal = false;
730
+	}
731
+	// 确认删除
732
+	confirmHistory() {
733
+	  var that = this;
734
+	  that.btnLoading = true;
735
+	  that.mainService
736
+	    .coopData(
737
+	      "rmvData",
738
+	      "documentFile",
739
+	      [that.HistoryId]
740
+	    )
741
+	    .subscribe((data) => {
742
+	      that.btnLoading = false;
743
+	      that.delModal = false;
744
+	      if (data.status==200) {
745
+	        that.showPromptModal("删除", true, "");
746
+					this.detail(this.coopData)
747
+	      } else {
748
+	        that.showPromptModal("删除", false, data.msg);
749
+	      }
750
+	    });
751
+	}
752
+	
753
+	// 下载历史
754
+	excelHistory(item){
755
+		this.maskFlag = this.message.loading("下载中..", {
756
+		  nzDuration: 0,
757
+		}).messageId;
758
+		this.mainService.documentExport(item.fileToken).subscribe(
759
+		  (data) => {
760
+		    this.message.remove(this.maskFlag);
761
+		    this.maskFlag = false;
762
+		    this.message.success('下载成功');
763
+				let type = null
764
+				if(item.fileType=='xls'){
765
+					type = 'application/vnd.ms-excel'
766
+				}else if(item.fileType=='xlsx'){
767
+					type = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
768
+				}else if(item.fileType=='doc'){
769
+					type = 'application/msword'
770
+				}else if(item.fileType=='docx'){
771
+					type = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
772
+				}else if(item.fileType=='pdf'){
773
+					type = 'application/pdf'
774
+				}else if(item.fileType=='ppt'){
775
+					type = 'application/vnd.ms-powerpoint'
776
+				}else if(item.fileType=='pptx'){
777
+					type = 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
778
+				}else if(item.fileType=='png'){
779
+					type = 'image/png'
780
+				}else if(item.fileType=='gif'){
781
+					type = 'image/gif'
782
+				}else if(item.fileType=='jpeg' || item.fileType=='.jpg'){
783
+					type = 'image/jpeg'
784
+				}
785
+		    var file = new Blob([data], {
786
+		      type: type,
787
+		    });
788
+		    var fileURL = URL.createObjectURL(file);
789
+		    var a = document.createElement("a");
790
+		    a.href = fileURL;
791
+		    a.target = "_blank";
792
+		    a.download = item.fileName + item.fileType;
793
+		    document.body.appendChild(a);
794
+		    a.click();
795
+		  },
796
+		  (err) => {
797
+		    this.message.remove(this.maskFlag);
798
+		    this.maskFlag = false;
799
+		    this.message.error('下载失败');
800
+		  }
801
+		);
802
+	}
803
+	
830 804
   // 选中表格中科室
831 805
   mapOfCheckedId: { [key: string]: boolean } = {};
832 806
   checkedDepIds = []; //已选中科室id
@@ -855,41 +829,4 @@ export class PersonageDocumentComponent implements OnInit{
855 829
     this.refreshStatus();
856 830
   }
857 831
 
858
-  // 打印
859
-  codes = []; //二维码
860
-  print(e, data, id) {
861
-		this.rowData = data
862
-    e.stopPropagation();
863
-    let that = this;
864
-    that.printLoading = true;
865
-    that.mainService
866
-      .transfusionPrint("drugsList", id)
867
-      .subscribe((res) => {
868
-				let arr = res.data.drugsConfigureDTOS;
869
-				for(let i of arr){
870
-					i.deptName = res.data.pharmacyDTO?res.data.pharmacyDTO.dept:'-'
871
-				}
872
-				arr.push({
873
-					drugsInfoDTO:{
874
-						drugName:'合计',
875
-						specs:'',
876
-					},
877
-					expendCount:res.data.totalExpendCount,
878
-					addSub:res.data.totalAddSub,
879
-					deptName:'',
880
-					cartonActual:res.data.cartonActual
881
-				})
882
-        that.codes = arr
883
-        that.printLoading = false;
884
-        setTimeout(() => {
885
-          const printContent = document.getElementById("report");
886
-          const WindowPrt = window.open("", "", "width=1000,height=900");
887
-          WindowPrt.document.write(printContent.innerHTML);
888
-          WindowPrt.document.close();
889
-          WindowPrt.focus();
890
-          WindowPrt.print();
891
-          WindowPrt.close();
892
-        }, 500);
893
-      });
894
-  }
895 832
 }

+ 1 - 1
src/app/views/specimen-search/specimen-search.component.html

@@ -121,7 +121,7 @@
121 121
         </div>
122 122
         <div class="list-template__searchItem">
123 123
           <span class="label">收取时间:</span>
124
-          <nz-range-picker nzShowTime (nzOnCalendarChange)="onCalendarChangeDate($event)" [(ngModel)]="searchCriteria.dateRange" (ngModelChange)="changeDate($event)"></nz-range-picker>
124
+          <nz-range-picker nzShowTime [(ngModel)]="searchCriteria.dateRange" (ngModelChange)="changeDate($event)"></nz-range-picker>
125 125
         </div>
126 126
 
127 127
       </div>

+ 8 - 19
src/app/views/specimen-search/specimen-search.component.ts

@@ -3,7 +3,7 @@ import { MainService } from "../../services/main.service";
3 3
 import { ToolService } from "../../services/tool.service";
4 4
 import { Subject } from "rxjs";
5 5
 import { debounceTime } from "rxjs/operators";
6
-import { format, subDays, endOfDay } from "date-fns";
6
+import { format, subDays, endOfDay, startOfDay } from "date-fns";
7 7
 @Component({
8 8
   selector: "app-specimen-search",
9 9
   templateUrl: "./specimen-search.component.html",
@@ -123,22 +123,13 @@ export class SpecimenSearchComponent implements OnInit {
123 123
   startDate: string; //发起时间开始
124 124
   endDate: string; //发起时间结束
125 125
 	changeDate(result?): void {
126
-	  if (!result) {
127
-	    this.startDate = this.endDate = "";
126
+	  if (result.length==0) {
127
+	    this.startDate = this.endDate = null;
128 128
 	    return;
129 129
 	  }
130
-	  this.startDate = format(result[0], 'yyyy-MM-dd HH:mm:ss');
131
-	  this.endDate = format(result[1], 'yyyy-MM-dd HH:mm:ss');
132
-	}
133
-	onCalendarChangeDate(dateArr){
134
-	  console.log(dateArr)
135
-	  if(dateArr.length == 2){
136
-	    let dateStart = new Date(dateArr[0]);
137
-	    let dateEnd = new Date(dateArr[1]);
138
-	    dateStart.setHours(0,0,0);
139
-	    dateEnd.setHours(23,59,59);
140
-	    this.searchCriteria.dateRange = [dateStart,dateEnd];
141
-	  }
130
+	  this.startDate = format(startOfDay(result[0]), 'yyyy-MM-dd HH:mm:ss');
131
+	  this.endDate = format(endOfDay(result[1]), 'yyyy-MM-dd HH:mm:ss');
132
+	  this.searchCriteria.dateRange = [this.startDate,this.endDate]
142 133
 	}
143 134
   // 重置
144 135
   reset() {
@@ -313,15 +304,13 @@ export class SpecimenSearchComponent implements OnInit {
313 304
         speState: this.searchCriteria.speState
314 305
           ? { id: this.searchCriteria.speState }
315 306
           : undefined,
307
+				startArriveTime: this.startDate || undefined,
308
+				endArriveTime: this.endDate || undefined,
316 309
       },
317 310
     };
318 311
     if (field && sort) {
319 312
       postData.specimen.orderBy = sort === "ascend" ? field : `${field} desc`;
320 313
     }
321
-    if (this.startDate && this.endDate) {
322
-      postData.specimen.startArriveTime = this.startDate;
323
-      postData.specimen.endArriveTime = this.endDate;
324
-    }
325 314
     this.loading1 = true;
326 315
     this.mainService
327 316
       .getFetchDataList("simple/data", "specimen", postData)

+ 15 - 0
src/app/views/task-inventory/task-inventory-routing.module.ts

@@ -0,0 +1,15 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+import { TaskInventoryComponent } from './task-inventory.component';
4
+
5
+
6
+const routes: Routes = [{
7
+  path: '',
8
+  component: TaskInventoryComponent
9
+}];
10
+
11
+@NgModule({
12
+  imports: [RouterModule.forChild(routes)],
13
+  exports: [RouterModule]
14
+})
15
+export class TaskInventoryRoutingModule { }

+ 143 - 0
src/app/views/task-inventory/task-inventory.component.html

@@ -0,0 +1,143 @@
1
+<div class="list-template">
2
+  <div class="content list-template__content">
3
+		<div class="list-left">
4
+			<div class="tree-content">
5
+				<div class="margin-bottom">
6
+					<nz-year-picker [(ngModel)]="year" [nzAllowClear]="false" (ngModelChange)="onChange($event)" nzPlaceHolder="请选择年份"></nz-year-picker>
7
+				</div>
8
+				<div class="item" (click)="itemClick(data, index)" [ngClass]="selectIndex == index ? 'activeClass' : ''" *ngFor="let data of month let index = index;">{{data.name}}</div>
9
+			</div>
10
+		</div>
11
+		<div class="list-right">
12
+			<div class="list-template__bottom">
13
+			  <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
14
+			    [nzLoading]="loading1">
15
+			    <thead>
16
+			      <tr class="thead">
17
+			        <th nzWidth="25%">月度任务标题</th>
18
+			        <th nzWidth="25%">月度任务状态</th>
19
+			        <th nzWidth="50%">工作情况</th>
20
+			      </tr>
21
+			    </thead>
22
+			    <tbody v-if="listOfData && listOfData.length>0">
23
+			      <tr *ngFor="let data of listOfData let index = index;">
24
+			        <td>{{ data.taskTitle }}</td>
25
+			        <td>{{ data.state && data.state.name||'-'}}</td>
26
+							<td>
27
+								<div *ngFor="let item of data.taskListDTOS;">
28
+									{{item.taskContent}}、
29
+									{{item.state && item.state.name}}、
30
+									{{item.executorDTO && item.executorDTO.name}}
31
+								</div>
32
+							</td>
33
+			      </tr>
34
+			    </tbody>
35
+			  </nz-table>
36
+			  <div class="list-template__pagination">
37
+			    <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
38
+			      (nzPageIndexChange)="getList()" (nzPageSizeChange)="getList()">
39
+			    </nz-pagination>
40
+			  </div>
41
+			</div>
42
+		</div>
43
+
44
+  </div>
45
+
46
+  <!-- 新增/编辑模态框 -->
47
+  <div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="modal">
48
+    <div class="modalBody">
49
+      <div class="title">查看历史<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
50
+      </div>
51
+      <overlay-scrollbars #osComponentRef1 class="content">
52
+        <div class="list-template__bottom">
53
+          <nz-table class="list-template__nzTable" [nzData]="viewData" nzSize="middle" [nzShowPagination]="false"
54
+            [nzLoading]="loading1">
55
+            <thead>
56
+              <tr class="thead">
57
+								<th>文档名称</th>
58
+								<th>文档格式</th>
59
+                <th>上传者</th>
60
+                <th>版本号</th>
61
+                <th>大小</th>
62
+                <th>上传时间</th>
63
+        				<th>操作</th>
64
+              </tr>
65
+            </thead>
66
+            <tbody>
67
+              <tr *ngFor="let data of viewData">
68
+								<td>{{ data.fileName }}</td>
69
+								<td>{{ data.fileType||'-' }}</td>
70
+                <td>{{ data.createUserDTO?data.createUserDTO.name:'-' }}</td>
71
+                <td>{{ data.fileVersion||'-' }}</td>
72
+                <td>{{ data.docSize||'0' }}</td>
73
+                <td>{{ data.createTime|date:'yyyy-MM-dd HH:mm:ss'}}</td>
74
+								<td>
75
+								  <div class="coop">
76
+										<!-- <span *ngIf="coopBtns.del" (click)="delHistory(data)">删除</span> -->
77
+										<span *ngIf="coopBtns.download" (click)="excelHistory(data)">下载</span>
78
+									</div>
79
+								</td>
80
+              </tr>
81
+            </tbody>
82
+          </nz-table>
83
+        </div>
84
+      </overlay-scrollbars>
85
+      <div class="display_flex justify-content_flex-center">
86
+        <button class="btn" nz-button nzType="primary" (click)="hideModal()">知道了</button>
87
+      </div>
88
+    </div>
89
+  </div>
90
+  <!-- 删除模态框 -->
91
+  <app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
92
+    (confirmDelEvent)="confirmDel()" content="您确认要删除文档吗?"></app-dialog-delete>
93
+		
94
+	<!-- 删除模态框 -->
95
+	<app-dialog-delete [delModal]="delHistoryModal" (hideDelModalEvent)="hideHistoryModal()" [btnLoading]="btnLoading"
96
+		(confirmDelEvent)="confirmHistory()" content="您确认要删除吗?"></app-dialog-delete>
97
+</div>
98
+<!-- 操作成功/失败提示框 -->
99
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
100
+  [info]="promptInfo"></app-prompt-modal>
101
+
102
+<!-- 查看详情 -->
103
+<router-outlet></router-outlet>
104
+<!-- 遮罩 -->
105
+<app-mask *ngIf="maskFlag"></app-mask>
106
+
107
+<app-upload-file [isShow]="isShow" (hideFormHand)="hideExcelImport($event)" *ngIf="isShow" (submitFormHand)="submitExcelImport($event)"></app-upload-file>
108
+
109
+<!-- 删除树结构模态框 -->
110
+  <app-dialog-delete [delModal]="delTreeModal" (hideDelModalEvent)="hideTreeModal()" [btnLoading]="btnLoading"
111
+    (confirmDelEvent)="confirmTree()" content="您确认要删除目录吗?"></app-dialog-delete>
112
+		
113
+<!-- 新增一级目录 -->
114
+<div class="save display_flex justify-content_flex-center align-items_center add" *ngIf="addModal">
115
+	<div class="modalAddBody">
116
+		<div class="title">{{add?'新增':'编辑'}}<i class="icon_transport transport-guanbi" (click)="hideAddModal()"></i>
117
+		</div>
118
+		<div class="content">
119
+			<form nz-form [formGroup]="validateTreeForm" class="addForm" (ngSubmit)="submitForm()">
120
+				<nz-form-item *ngIf="treeType==2">
121
+					<nz-form-label [nzSpan]="7" nzFor="parent">父级目录名称</nz-form-label>
122
+					<nz-form-control [nzSpan]="17" nzErrorTip="请输入父级目录名称!">
123
+						<nz-input-group>
124
+							<input nz-input disabled formControlName="parent" placeholder="请输入父级目录名称" />
125
+						</nz-input-group>
126
+					</nz-form-control>
127
+				</nz-form-item>
128
+				<nz-form-item>
129
+					<nz-form-label [nzSpan]="7" nzRequired nzFor="folderName">目录名称</nz-form-label>
130
+					<nz-form-control [nzSpan]="17" nzErrorTip="请输入目录名称!">
131
+						<nz-input-group>
132
+							<input nz-input formControlName="folderName" placeholder="请输入目录名称" />
133
+						</nz-input-group>
134
+					</nz-form-control>
135
+				</nz-form-item>
136
+			</form>
137
+		</div>
138
+		<div class=" display_flex justify-content_flex-center">
139
+			<button nzType="primary" [nzLoading]="btnLoading" nz-button (click)="submitAddForm()">确认</button>
140
+			<button class="btn cancel" nz-button nzType="default" (click)="hideAddModal()">取消</button>
141
+		</div>
142
+	</div>
143
+</div>

+ 191 - 0
src/app/views/task-inventory/task-inventory.component.less

@@ -0,0 +1,191 @@
1
+@import "../../../../src/theme.less";
2
+.list-template{
3
+	background: #eee;
4
+	.content{
5
+		display: flex;
6
+		.list-left{
7
+			width: 18%;
8
+			margin-right: 15px;
9
+			height: 100vh;
10
+			overflow-y: auto;
11
+			overflow-x: hidden;
12
+			background: #fff;
13
+			padding: 10px;
14
+			.tree-content{
15
+				.margin-bottom{
16
+					margin-bottom: 10px;
17
+				}
18
+				.item{
19
+					padding: 10px 0;
20
+					text-align: center;
21
+					cursor: pointer;
22
+				}
23
+				.activeClass{
24
+					background: #49B856;
25
+					color: #fff;
26
+				}
27
+			}
28
+		}
29
+		
30
+		.list-right{
31
+			width: 82%;
32
+			background: #fff;
33
+			padding: 10px;
34
+		}
35
+	}
36
+}
37
+	
38
+.save {
39
+  position: fixed;
40
+  left: 0;
41
+  top: 0;
42
+  width: 100%;
43
+  height: 100%;
44
+  background: rgba(0, 0, 0, 0.4);
45
+  z-index: 99;
46
+
47
+  .modalBody {
48
+    width: 60%;
49
+    background: #fff;
50
+    border-radius: 5px;
51
+    padding: 10px 20px;
52
+    color: #333;
53
+
54
+    .title {
55
+      width: 100%;
56
+      text-align: center;
57
+      font-size: 18px;
58
+      position: relative;
59
+
60
+      i {
61
+        position: absolute;
62
+        right: 0;
63
+        top: 0;
64
+        font-size: 20px;
65
+        color: #666;
66
+        cursor: pointer;
67
+        padding: 0 5px;
68
+      }
69
+    }
70
+
71
+    .content {
72
+      width: 100%;
73
+      height: 117px;
74
+      background: #f9fafb;
75
+      border: 1px solid #e5e9ed;
76
+      border-radius: 5px;
77
+      // overflow: hidden;
78
+      margin-top: 12px;
79
+
80
+      div {
81
+        text-align: center;
82
+        margin: 0;
83
+
84
+        &.icon {
85
+          margin-top: 17px;
86
+
87
+          i {
88
+            color: #34b349;
89
+            font-size: 30px !important;
90
+
91
+            &.transport-wenhao {
92
+              color: #f5a523;
93
+            }
94
+
95
+            &.transport-shibai {
96
+              color: #ff3a52;
97
+            }
98
+          }
99
+        }
100
+
101
+        &.defeat {
102
+          color: #333;
103
+          font-size: 18px;
104
+        }
105
+
106
+        &:nth-child(3) {
107
+          font-size: 14px;
108
+          color: #666;
109
+        }
110
+      }
111
+    }
112
+
113
+    button {
114
+      margin-top: 10px;
115
+
116
+      &.btn {
117
+        margin-left: 8px;
118
+      }
119
+    }
120
+  }
121
+
122
+  // 新增
123
+  &.add {
124
+    .modalBody {
125
+      width: 40%;
126
+      height: auto;
127
+
128
+      .content {
129
+        width: 100%;
130
+        height: auto;
131
+        padding: 19px 14px 0 14px;
132
+        // max-height: 500px;
133
+        overflow-y: auto;
134
+
135
+        .addForm {
136
+          .ant-form-item {
137
+            margin-bottom: 8px;
138
+						.ant-select{
139
+							width: 100% !important;
140
+						}
141
+						.ant-input-number{
142
+							width: 100% !important;
143
+						}
144
+            .ant-form-item-label {
145
+              line-height: 14px;
146
+              text-align: left;
147
+            }
148
+          }
149
+					.address{
150
+					  position: relative;
151
+					  .addressList{
152
+					    position: absolute;
153
+					    bottom: 100%;
154
+					    left: 0;
155
+					    width: 100%;
156
+					    max-height: 256px;
157
+					    z-index: 2;
158
+					    background: #fff;
159
+					    border: 1px solid #d9d9d9;
160
+					    border-radius: 4px;
161
+					    overflow: hidden auto;
162
+					    .addressItem{
163
+					      padding: 5px 12px;
164
+					      cursor: pointer;
165
+					      &:hover{
166
+					        background-color: #e9f7e9;
167
+					      }
168
+					    }
169
+					  }
170
+					}
171
+        }
172
+
173
+        .editForm {
174
+          .ant-form-item {
175
+            margin-bottom: 14px;
176
+						.ant-input-number{
177
+							width: 100% !important;
178
+						}
179
+            .ant-form-item-label {
180
+              line-height: 0;
181
+            }
182
+          }
183
+        }
184
+      }
185
+
186
+      button:nth-child(1) {
187
+        margin-right: 20px;
188
+      }
189
+    }
190
+  }
191
+}

+ 146 - 0
src/app/views/task-inventory/task-inventory.component.ts

@@ -0,0 +1,146 @@
1
+import { Component, OnInit, ViewChild } from "@angular/core";
2
+import { ActivatedRoute, Router } from "@angular/router";
3
+import { FormBuilder, Validators, FormGroup, FormControl } from "@angular/forms";
4
+
5
+import { MainService } from "../../services/main.service";
6
+import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
7
+import { ToolService } from "../../services/tool.service";
8
+import { forkJoin, Subject } from "rxjs";
9
+import { debounceTime } from "rxjs/operators";
10
+import { NzMessageService } from "ng-zorro-antd";
11
+import { format, getYear } from 'date-fns';
12
+
13
+@Component({
14
+  selector: "app-task-inventory",
15
+  templateUrl: "./task-inventory.component.html",
16
+  styleUrls: ["./task-inventory.component.less"],
17
+})
18
+export class TaskInventoryComponent implements OnInit {
19
+  @ViewChild("osComponentRef1", {
20
+    read: OverlayScrollbarsComponent,
21
+    static: false,
22
+  })
23
+  osComponentRef1: OverlayScrollbarsComponent;
24
+  constructor(
25
+    private message: NzMessageService,
26
+    private fb: FormBuilder,
27
+    private route: ActivatedRoute,
28
+    private router: Router,
29
+    private mainService: MainService,
30
+    private tool: ToolService
31
+  ) {}
32
+
33
+  listOfData: any[] = []; //表格数据
34
+
35
+  modal: boolean = false; //新增/编辑模态框
36
+  add: boolean; //true:新增;false:编辑
37
+  validateForm: FormGroup; //新增/编辑表单
38
+  coopId: number; //表格中执行操作的id
39
+  dept: any; //所属科室
40
+  drugCode; //编号
41
+  name; //名称
42
+  userType: any; //用户类型
43
+  hosId: any; //院区(搜索)
44
+  userGroup; //所属组
45
+  userGroup1; //所属组(搜索)
46
+  userTypes: Array<any>; //所有用户类型
47
+  alldepart: any = []; //所有所属科室
48
+  alldepart1: any = []; //所有所属科室(搜索)
49
+  hospitals1: any = []; //院区列表(搜索)
50
+	drugTypeData: any = []; //药品类型
51
+  allUserGroup: Array<any>; //所有用户组
52
+  allUserGroup1: Array<any>; //用户组(搜索)
53
+  allUserRole: Array<any>; //所有角色
54
+  pageIndex: number = 1; //页码
55
+  listLength: number = 10; //总条数
56
+  pageSize: number = 10; //每页条数
57
+
58
+  promptContent: string; //操作提示框提示信息
59
+  ifSuccess: boolean; //操作成功/失败
60
+  promptInfo: string; //操作结果提示信息
61
+  promptModalShow: boolean; //操作提示框是否展示
62
+
63
+  btnLoading: boolean = false; //提交按钮loading状态
64
+  wxRequired = false; //新增或编辑用户的时候,微信号是否必填
65
+  searchTaskSubject = new Subject(); //防抖
66
+	searchParentDeptSubject = new Subject();
67
+	specimenName:any = null;
68
+	containPosition:any = null;
69
+	placeList:any = [];
70
+	systemList:any = [];
71
+	apparatusList:any = [];
72
+	specimenNameList:any = [];
73
+	addressLoading:any = false;
74
+	month:any = [];
75
+	
76
+  ngOnInit() {
77
+		for(let i=1; i<13; i++){
78
+			this.month.push({
79
+				name:i + '月',
80
+				value: i
81
+			})
82
+		}
83
+		this.year = this.yearTime;
84
+		console.log(2222,this.year)
85
+    this.coopBtns = this.tool.initCoopBtns(this.route);
86
+		this.hosId = this.tool.getCurrentHospital().id;
87
+		this.getList();
88
+  }
89
+	
90
+	yearTime:any = format(new Date(), 'yyyy');
91
+	onChange(result: Date): void {
92
+		this.yearTime = format(result, 'yyyy');
93
+		console.log('onChange: ', this.yearTime);
94
+	}
95
+	
96
+	// 选择月份
97
+	selectIndex:any = 0;
98
+	itemData:any = 1;
99
+	itemClick(data, index){
100
+		this.selectIndex = index;
101
+		this.itemData = data.value;
102
+		this.getList();
103
+	}
104
+	
105
+  // 初始化增删改按钮
106
+  coopBtns: any = {};
107
+  // 表格数据
108
+  loading1 = false;
109
+	state:any;
110
+	priority:any;
111
+	monthTask:any;
112
+	executor:any;
113
+	year:any;
114
+  getList() {
115
+		let num = this.itemData<10 ? '0'+ this.itemData : this.itemData
116
+    let data = {
117
+      idx: this.pageIndex - 1,
118
+      sum: this.pageSize,
119
+      monthTask: {
120
+				operationType: 'taskDetails',
121
+        yearMonth: this.yearTime + '-' + num
122
+      },
123
+    };
124
+    this.loading1 = true;
125
+    this.mainService
126
+      .getFetchDataList("data", "monthTask", data)
127
+      .subscribe((data) => {
128
+        this.loading1 = false;
129
+        this.listOfData = data.list;
130
+        this.listLength = data.totalNum;
131
+      });
132
+  }
133
+
134
+	// 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
135
+	showPromptModal(con, success, promptInfo?) {
136
+	  this.promptModalShow = false;
137
+	  this.promptContent = con;
138
+	  this.ifSuccess = success;
139
+	  this.promptInfo = promptInfo;
140
+	  setTimeout(() => {
141
+	    this.promptModalShow = true;
142
+	  }, 100);
143
+	  this.getList();
144
+	}
145
+}
146
+

+ 19 - 0
src/app/views/task-inventory/task-inventory.module.ts

@@ -0,0 +1,19 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+
4
+import { TaskInventoryRoutingModule } from './task-inventory-routing.module';
5
+import { TaskInventoryComponent } from './task-inventory.component';
6
+import { ShareModule } from 'src/app/share/share.module';
7
+
8
+
9
+@NgModule({
10
+  declarations: [
11
+    TaskInventoryComponent
12
+  ],
13
+  imports: [
14
+    CommonModule,
15
+    TaskInventoryRoutingModule,
16
+    ShareModule
17
+  ]
18
+})
19
+export class TaskInventoryModule { }

+ 15 - 0
src/app/views/task-list/task-list-routing.module.ts

@@ -0,0 +1,15 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+import { TaskListComponent } from './task-list.component';
4
+
5
+
6
+const routes: Routes = [{
7
+  path: '',
8
+  component: TaskListComponent
9
+}];
10
+
11
+@NgModule({
12
+  imports: [RouterModule.forChild(routes)],
13
+  exports: [RouterModule]
14
+})
15
+export class TaskListRoutingModule { }

+ 227 - 0
src/app/views/task-list/task-list.component.html

@@ -0,0 +1,227 @@
1
+<div class="list-template">
2
+  <div class="content list-template__content">
3
+		<div class="list-template__top" nz-row>
4
+		  <div nz-col nzXl='18' class="list-template__searchBox">
5
+				<div class="list-template__searchItem">
6
+					<span class="label">状态:</span>
7
+					<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择状态" [(ngModel)]="state">
8
+						<ng-container *ngFor="let option of stateList">
9
+							<nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
10
+						</ng-container>
11
+					</nz-select>
12
+				</div>
13
+				<div class="list-template__searchItem">
14
+					<span class="label">月度任务:</span>
15
+					<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择月度任务" [(ngModel)]="monthTask">
16
+						<ng-container *ngFor="let option of monthlyData">
17
+							<nz-option [nzLabel]="option.taskTitle" [nzValue]="option.id"></nz-option>
18
+						</ng-container>
19
+					</nz-select>
20
+				</div>
21
+				<div class="list-template__searchItem">
22
+					<span class="label">优先级:</span>
23
+					<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择优先级" [(ngModel)]="priority">
24
+						<ng-container *ngFor="let option of priorityData">
25
+							<nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
26
+						</ng-container>
27
+					</nz-select>
28
+				</div>
29
+				<div class="list-template__searchItem">
30
+					<span class="label">执行人:</span>
31
+					<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
32
+						(nzOnSearch)="changeUser($event)" nzAllowClear nzPlaceHolder="请选择执行人员" [(ngModel)]="executor">
33
+						<ng-container *ngFor="let option of dutyUser">
34
+							<nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
35
+						</ng-container>
36
+						<nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
37
+							<i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
38
+						</nz-option>
39
+					</nz-select>
40
+				</div>
41
+		  </div>
42
+			<div class="list-template__btns">
43
+				<button class="btn default" (click)='search()'>搜索</button>
44
+				<button class="btn default ml8" (click)='reset()'>重置</button>
45
+			</div>
46
+		</div>
47
+		
48
+		<div class="list-template__bottom">
49
+			<nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
50
+				[nzLoading]="loading1">
51
+				<thead>
52
+					<tr class="thead">
53
+						<th>任务内容</th>
54
+						<th>月度任务标题</th>
55
+						<th>预计完成时间</th>
56
+						<th>优先级</th>
57
+						<th>状态</th>
58
+						<th>开始时间</th>
59
+						<th>结束时间</th>
60
+						<th>执行人</th>
61
+						<th nzWidth="240px">操作</th>
62
+					</tr>
63
+				</thead>
64
+				<tbody v-if="listOfData && listOfData.length>0">
65
+					<tr *ngFor="let data of listOfData let index = index;">
66
+						<td>{{ data.taskContent || '-' }}</td>
67
+						<td>{{ data.monthTaskDTO.taskTitle || '-' }}</td>
68
+						<td>{{ data.estimatedCompletionTime|date:'yyyy-MM-dd HH:mm:ss' }}</td>
69
+						<td>{{ data.priority && data.priority.name||'-'}}</td>
70
+						<td>{{ data.state && data.state.name||'-'}}</td>
71
+						<td>{{ data.startTime | date:'yyyy-MM-dd HH:mm:ss'}}</td>
72
+						<td>{{ data.endTime | date:'yyyy-MM-dd HH:mm:ss'}}</td>
73
+						<td>{{ data.executorDTO && data.executorDTO.name||'-' }}</td>
74
+						<td>
75
+							<div class="coop">
76
+								<span *ngIf="coopBtns.startTask && data.state && data.state.value==1" (click)="startTask(data)">开始任务</span>
77
+								<span *ngIf="coopBtns.accomplish && data.state && data.state.value==2" (click)="accomplish(data)">完成任务</span>
78
+								<span *ngIf="coopBtns.record && data.state && data.state.value==2" (click)="record(data)">任务记录</span>
79
+							</div>
80
+						</td>
81
+					</tr>
82
+				</tbody>
83
+			</nz-table>
84
+			<div class="list-template__pagination">
85
+				<nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
86
+					(nzPageIndexChange)="getList()" (nzPageSizeChange)="getList()">
87
+				</nz-pagination>
88
+			</div>
89
+		</div>
90
+  </div>
91
+
92
+  <!-- 新增/编辑模态框 -->
93
+  <div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="modal">
94
+    <div class="modalBody">
95
+      <div class="title">查看历史<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
96
+      </div>
97
+      <overlay-scrollbars #osComponentRef1 class="content">
98
+        <div class="list-template__bottom">
99
+          <nz-table class="list-template__nzTable" [nzData]="viewData" nzSize="middle" [nzShowPagination]="false"
100
+            [nzLoading]="loading1">
101
+            <thead>
102
+              <tr class="thead">
103
+								<th>文档名称</th>
104
+								<th>文档格式</th>
105
+                <th>上传者</th>
106
+                <th>版本号</th>
107
+                <th>大小</th>
108
+                <th>上传时间</th>
109
+        				<th>操作</th>
110
+              </tr>
111
+            </thead>
112
+            <tbody>
113
+              <tr *ngFor="let data of viewData">
114
+								<td>{{ data.fileName }}</td>
115
+								<td>{{ data.fileType||'-' }}</td>
116
+                <td>{{ data.createUserDTO?data.createUserDTO.name:'-' }}</td>
117
+                <td>{{ data.fileVersion||'-' }}</td>
118
+                <td>{{ data.docSize||'0' }}</td>
119
+                <td>{{ data.createTime|date:'yyyy-MM-dd HH:mm:ss'}}</td>
120
+								<td>
121
+								  <div class="coop">
122
+										<!-- <span *ngIf="coopBtns.del" (click)="delHistory(data)">删除</span> -->
123
+										<span *ngIf="coopBtns.download" (click)="excelHistory(data)">下载</span>
124
+									</div>
125
+								</td>
126
+              </tr>
127
+            </tbody>
128
+          </nz-table>
129
+        </div>
130
+      </overlay-scrollbars>
131
+      <div class="display_flex justify-content_flex-center">
132
+        <button class="btn" nz-button nzType="primary" (click)="hideModal()">知道了</button>
133
+      </div>
134
+    </div>
135
+  </div>
136
+  <!-- 删除模态框 -->
137
+  <app-dialog-delete [delModal]="startModal" (hideDelModalEvent)="hideStartModal()" [btnLoading]="btnLoading"
138
+    (confirmDelEvent)="confirmStart()" content="您确认要开始任务吗?"></app-dialog-delete>
139
+		
140
+	<!-- 删除模态框 -->
141
+	<app-dialog-delete [delModal]="delHistoryModal" (hideDelModalEvent)="hideHistoryModal()" [btnLoading]="btnLoading"
142
+		(confirmDelEvent)="confirmHistory()" content="您确认要删除吗?"></app-dialog-delete>
143
+</div>
144
+<!-- 操作成功/失败提示框 -->
145
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
146
+  [info]="promptInfo"></app-prompt-modal>
147
+
148
+<!-- 查看详情 -->
149
+<router-outlet></router-outlet>
150
+<!-- 遮罩 -->
151
+<app-mask *ngIf="maskFlag"></app-mask>
152
+
153
+<app-upload-file [isShow]="isShow" (hideFormHand)="hideExcelImport($event)" *ngIf="isShow" (submitFormHand)="submitExcelImport($event)"></app-upload-file>
154
+
155
+<!-- 删除树结构模态框 -->
156
+  <app-dialog-delete [delModal]="delTreeModal" (hideDelModalEvent)="hideTreeModal()" [btnLoading]="btnLoading"
157
+    (confirmDelEvent)="confirmTree()" content="您确认要删除目录吗?"></app-dialog-delete>
158
+		
159
+<!-- 任务记录 -->
160
+<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="allocationModal">
161
+  <div class="modalBody">
162
+    <div class="title">任务记录<i class="icon_transport transport-guanbi" (click)="hideAllocationModal()"></i>
163
+    </div>
164
+    <div class="content">
165
+      <form nz-form [formGroup]="validateAllocationForm" class="addForm" (ngSubmit)="submitAllocationForm()">
166
+				<nz-form-item>
167
+				  <nz-form-label class="margin-label" [nzSm]="6" [nzXs]="24" nzRequired nzFor="taskConclusion">任务记录</nz-form-label>
168
+				  <nz-form-control nzErrorTip="请输入任务记录!">
169
+				    <nz-input-group>
170
+							<textarea formControlName="taskConclusion" nz-input rows="3" placeholder="请输入任务记录"></textarea>
171
+						</nz-input-group>
172
+				  </nz-form-control>
173
+				</nz-form-item>
174
+				
175
+				<nz-form-item>
176
+				  <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="manHour">工时</nz-form-label>
177
+				  <nz-form-control nzErrorTip="请输入工时!">
178
+				    <nz-input-group>
179
+							<nz-input-number
180
+								formControlName="manHour"
181
+								[nzMin]="0"
182
+								[nzPrecision]="0"
183
+								[nzMax]="999999"
184
+								[nzStep]="1"
185
+								[nzPlaceHolder]="'请输入工时'"
186
+							 ></nz-input-number>
187
+				    </nz-input-group>
188
+				  </nz-form-control>
189
+				</nz-form-item>
190
+      </form>
191
+    </div>
192
+    <div class="display_flex justify-content_flex-center">
193
+      <button nzType="primary" nz-button (click)="submitAllocationForm()" [nzLoading]="btnLoading">确认</button>
194
+      <button class="btn cancel" nz-button nzType="default" (click)="hideAllocationModal()">取消</button>
195
+    </div>
196
+  </div>
197
+</div>
198
+
199
+<!-- 完成任务 -->
200
+<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="accomplishModal">
201
+  <div class="modalBody">
202
+    <div class="title">完成任务<i class="icon_transport transport-guanbi"></i>
203
+    </div>
204
+    <div class="content padding-bottom">
205
+			<div class="item">
206
+				<div class="label"><span class="sign">*</span>任务总结:</div>
207
+				<textarea [(ngModel)]="taskConclusion" nz-input rows="3" placeholder="请输入任务总结"></textarea>
208
+			</div>
209
+			<div class="item">
210
+				<div class="label"><span class="sign">*</span>总工时:</div>
211
+				<nz-input-number
212
+					[(ngModel)]="manHour"
213
+					[nzMin]="0"
214
+					[nzPrecision]="0"
215
+					[nzMax]="999999"
216
+					[nzStep]="1"
217
+					[nzPlaceHolder]="'请输入工时'"
218
+				 ></nz-input-number>
219
+			</div>
220
+			
221
+		</div>
222
+    <div class="display_flex justify-content_flex-center">
223
+      <button nzType="primary" nz-button (click)="submitAccomplishForm()" [nzLoading]="btnLoading">确认</button>
224
+      <button class="btn cancel" nz-button nzType="default" (click)="hideAccomplishModal()">取消</button>
225
+    </div>
226
+  </div>
227
+</div>

+ 185 - 0
src/app/views/task-list/task-list.component.less

@@ -0,0 +1,185 @@
1
+@import "../../../../src/theme.less";
2
+.width-105{
3
+	width: 105px !important;
4
+}
5
+.save {
6
+  position: fixed;
7
+  left: 0;
8
+  top: 0;
9
+  width: 100%;
10
+  height: 100%;
11
+  background: rgba(0, 0, 0, 0.4);
12
+  z-index: 99;
13
+
14
+  .modalBody {
15
+    width: 60%;
16
+    background: #fff;
17
+    border-radius: 5px;
18
+    padding: 10px 20px;
19
+    color: #333;
20
+
21
+    .title {
22
+      width: 100%;
23
+      text-align: center;
24
+      font-size: 18px;
25
+      position: relative;
26
+
27
+      i {
28
+        position: absolute;
29
+        right: 0;
30
+        top: 0;
31
+        font-size: 20px;
32
+        color: #666;
33
+        cursor: pointer;
34
+        padding: 0 5px;
35
+      }
36
+    }
37
+
38
+    .content {
39
+      width: 100%;
40
+      height: 117px;
41
+      background: #f9fafb;
42
+      border: 1px solid #e5e9ed;
43
+      border-radius: 5px;
44
+      // overflow: hidden;
45
+      margin-top: 12px;
46
+			
47
+      div {
48
+        text-align: center;
49
+        margin: 0;
50
+
51
+        &.icon {
52
+          margin-top: 17px;
53
+
54
+          i {
55
+            color: #34b349;
56
+            font-size: 30px !important;
57
+
58
+            &.transport-wenhao {
59
+              color: #f5a523;
60
+            }
61
+
62
+            &.transport-shibai {
63
+              color: #ff3a52;
64
+            }
65
+          }
66
+        }
67
+
68
+        &.defeat {
69
+          color: #333;
70
+          font-size: 18px;
71
+        }
72
+
73
+        &:nth-child(3) {
74
+          font-size: 14px;
75
+          color: #666;
76
+        }
77
+      }
78
+    }
79
+
80
+    button {
81
+      margin-top: 10px;
82
+
83
+      &.btn {
84
+        margin-left: 8px;
85
+      }
86
+    }
87
+  }
88
+
89
+  // 新增
90
+  &.add {
91
+    .modalBody {
92
+      width: 40%;
93
+      height: auto;
94
+			
95
+			.padding-bottom{
96
+				padding-bottom: 20px !important;
97
+				.item{
98
+					margin-bottom: 5px;
99
+					.label{
100
+						margin-bottom: 5px;
101
+						text-align: left;
102
+						.sign{
103
+							color: red;
104
+							font-size: 15px;
105
+						}
106
+					}
107
+					.ant-input-number{
108
+						width: 100% !important;
109
+					}
110
+				}
111
+			}
112
+			
113
+      .content {
114
+        width: 100%;
115
+        height: auto;
116
+        padding: 19px 14px 0 14px;
117
+        // max-height: 500px;
118
+        overflow-y: auto;
119
+
120
+        .addForm {
121
+          .ant-form-item {
122
+            margin-bottom: 8px;
123
+						.ant-select{
124
+							width: 100% !important;
125
+						}
126
+						.ant-input-number{
127
+							width: 100% !important;
128
+						}
129
+            .ant-form-item-label {
130
+              line-height: 14px;
131
+              text-align: left;
132
+            }
133
+						.margin-label{
134
+							margin-bottom: 5px !important;
135
+						}
136
+						.ant-calendar-picker{
137
+							width: 100% !important;
138
+						}
139
+						.ant-input-number{
140
+							width: 100% !important;
141
+						}
142
+          }
143
+					.address{
144
+					  position: relative;
145
+					  .addressList{
146
+					    position: absolute;
147
+					    bottom: 100%;
148
+					    left: 0;
149
+					    width: 100%;
150
+					    max-height: 256px;
151
+					    z-index: 2;
152
+					    background: #fff;
153
+					    border: 1px solid #d9d9d9;
154
+					    border-radius: 4px;
155
+					    overflow: hidden auto;
156
+					    .addressItem{
157
+					      padding: 5px 12px;
158
+					      cursor: pointer;
159
+					      &:hover{
160
+					        background-color: #e9f7e9;
161
+					      }
162
+					    }
163
+					  }
164
+					}
165
+        }
166
+
167
+        .editForm {
168
+          .ant-form-item {
169
+            margin-bottom: 14px;
170
+						.ant-input-number{
171
+							width: 100% !important;
172
+						}
173
+            .ant-form-item-label {
174
+              line-height: 0;
175
+            }
176
+          }
177
+        }
178
+      }
179
+
180
+      button:nth-child(1) {
181
+        margin-right: 20px;
182
+      }
183
+    }
184
+  }
185
+}

+ 386 - 0
src/app/views/task-list/task-list.component.ts

@@ -0,0 +1,386 @@
1
+import { Component, OnInit, ViewChild } from "@angular/core";
2
+import { ActivatedRoute, Router } from "@angular/router";
3
+import { FormBuilder, Validators, FormGroup, FormControl } from "@angular/forms";
4
+
5
+import { MainService } from "../../services/main.service";
6
+import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
7
+import { ToolService } from "../../services/tool.service";
8
+import { forkJoin, Subject } from "rxjs";
9
+import { debounceTime } from "rxjs/operators";
10
+import { NzMessageService } from "ng-zorro-antd";
11
+
12
+@Component({
13
+  selector: "app-task-list",
14
+  templateUrl: "./task-list.component.html",
15
+  styleUrls: ["./task-list.component.less"],
16
+})
17
+export class TaskListComponent implements OnInit {
18
+  @ViewChild("osComponentRef1", {
19
+    read: OverlayScrollbarsComponent,
20
+    static: false,
21
+  })
22
+  osComponentRef1: OverlayScrollbarsComponent;
23
+  constructor(
24
+    private message: NzMessageService,
25
+    private fb: FormBuilder,
26
+    private route: ActivatedRoute,
27
+    private router: Router,
28
+    private mainService: MainService,
29
+    private tool: ToolService
30
+  ) {}
31
+
32
+  listOfData: any[] = []; //表格数据
33
+
34
+  modal: boolean = false; //新增/编辑模态框
35
+  add: boolean; //true:新增;false:编辑
36
+  validateForm: FormGroup; //新增/编辑表单
37
+	validateAllocationForm: FormGroup; //新增/编辑表单
38
+  coopId: number; //表格中执行操作的id
39
+  dept: any; //所属科室
40
+  drugCode; //编号
41
+  name; //名称
42
+  userType: any; //用户类型
43
+  hosId: any; //院区(搜索)
44
+  userGroup; //所属组
45
+  userGroup1; //所属组(搜索)
46
+  userTypes: Array<any>; //所有用户类型
47
+  alldepart: any = []; //所有所属科室
48
+  alldepart1: any = []; //所有所属科室(搜索)
49
+  hospitals1: any = []; //院区列表(搜索)
50
+	drugTypeData: any = []; //药品类型
51
+  allUserGroup: Array<any>; //所有用户组
52
+  allUserGroup1: Array<any>; //用户组(搜索)
53
+  allUserRole: Array<any>; //所有角色
54
+  pageIndex: number = 1; //页码
55
+  listLength: number = 10; //总条数
56
+  pageSize: number = 10; //每页条数
57
+
58
+  promptContent: string; //操作提示框提示信息
59
+  ifSuccess: boolean; //操作成功/失败
60
+  promptInfo: string; //操作结果提示信息
61
+  promptModalShow: boolean; //操作提示框是否展示
62
+
63
+  btnLoading: boolean = false; //提交按钮loading状态
64
+  wxRequired = false; //新增或编辑用户的时候,微信号是否必填
65
+  searchTaskSubject = new Subject(); //防抖
66
+	searchParentDeptSubject = new Subject();
67
+	specimenName:any = null;
68
+	containPosition:any = null;
69
+	placeList:any = [];
70
+	systemList:any = [];
71
+	apparatusList:any = [];
72
+	specimenNameList:any = [];
73
+	addressLoading:any = false;
74
+	month:any = [];
75
+	
76
+  ngOnInit() {
77
+		for(let i=1; i<13; i++){
78
+			this.month.push({
79
+				name:i + '月'
80
+			})
81
+		}
82
+    this.coopBtns = this.tool.initCoopBtns(this.route);
83
+		this.hosId = this.tool.getCurrentHospital().id;
84
+		this.searchParentDeptSubject.pipe(debounceTime(500)).subscribe((e) => {
85
+			this.isLoading = true;
86
+			this.getAllUser(e[0])
87
+		});
88
+		this.searchTaskSubject.pipe(debounceTime(500)).subscribe((e) => {
89
+			this.isLoading = true;
90
+			this.getmonthlyData(e[0])
91
+		});
92
+		
93
+		this.getList();
94
+		this.getAllUser('');
95
+		this.getStateDic();
96
+		this.getPriorityData();
97
+		this.getmonthlyData('');
98
+  }
99
+	
100
+	// 选择月份
101
+	selectIndex:any;
102
+	itemData:any;
103
+	itemClick(data, index){
104
+		this.selectIndex = index;
105
+		this.itemData = data;
106
+	}
107
+	
108
+  // 初始化增删改按钮
109
+  coopBtns: any = {};
110
+  // 搜索
111
+  search() {
112
+    this.pageIndex = 1;
113
+    this.getList();
114
+  }
115
+	
116
+  // 重置
117
+  reset() {
118
+    this.pageIndex = 1;
119
+    this.state = null;
120
+    this.priority = null;
121
+    this.monthTask = null;
122
+    this.executor = null;
123
+    this.getList();
124
+  }
125
+	
126
+  // 表格数据
127
+  loading1 = false;
128
+	state:any;
129
+	priority:any;
130
+	monthTask:any;
131
+	executor:any;
132
+  getList() {
133
+    let data = {
134
+      idx: this.pageIndex - 1,
135
+      sum: this.pageSize,
136
+      monthTaskList: {
137
+        priority: {
138
+        	id: '',
139
+        },
140
+        state: {
141
+					id: '',
142
+				},
143
+				monthTask:this.monthTask || undefined,
144
+        executor: this.executor || undefined,
145
+      },
146
+    };
147
+		if(this.priority){
148
+			data.monthTaskList.priority.id = this.priority
149
+		}else{
150
+			delete data.monthTaskList.priority
151
+		}
152
+		if(this.state){
153
+			data.monthTaskList.state.id = this.state
154
+		}else{
155
+			delete data.monthTaskList.state
156
+		}
157
+    this.loading1 = true;
158
+    this.mainService
159
+      .getFetchDataList("data", "monthTaskList", data)
160
+      .subscribe((data) => {
161
+        this.loading1 = false;
162
+        this.listOfData = data.list;
163
+        this.listLength = data.totalNum;
164
+      });
165
+  }
166
+	
167
+	// 获取月度任务
168
+	monthlyData:any=[];
169
+	getmonthlyData(name){
170
+		let data = {
171
+		  idx: 0,
172
+		  sum: 20,
173
+		  monthTask: {
174
+				taskTitle: name || undefined,
175
+		  },
176
+		};
177
+		this.mainService
178
+		  .getFetchDataList("data", "monthTask", data)
179
+		  .subscribe((data) => {
180
+		    this.isLoading = false;
181
+		    this.monthlyData = data.list;
182
+		  });
183
+	}
184
+	
185
+	// 获取责任人
186
+	dutyUser:any= [];
187
+	getAllUser(name) {
188
+	  let data:any = {
189
+	    user: {
190
+				name,
191
+	      hosIds: this.hosId,
192
+	    },
193
+	    idx: 0,
194
+	    sum: 20,
195
+	  };
196
+	  this.mainService
197
+	    .getFetchDataList("data", "user", data)
198
+	    .subscribe((data) => {
199
+				this.isLoading = false
200
+				this.dutyUser = data.list
201
+	    });
202
+	}
203
+	
204
+	// 搜索责任人
205
+	isLoading = false;
206
+	changeUser(e,type) {
207
+	  this.searchParentDeptSubject.next([e,type]);
208
+	}
209
+	
210
+	// 搜索月度任务
211
+	changeTask(e,type) {
212
+	  this.searchTaskSubject.next([e,type]);
213
+	}
214
+	
215
+	// 获取优先级
216
+	priorityData:any = [];
217
+	getPriorityData(){
218
+		let postData = {
219
+		  idx: 0,
220
+		  sum: 9999,
221
+		  priority: {},
222
+		};
223
+		this.isLoading = true;
224
+		this.mainService
225
+		.getFetchDataList("simple/data", "priority", postData)
226
+		.subscribe((data) => {
227
+			this.isLoading = false;
228
+			if (data.status == 200) {
229
+				this.priorityData = data.list;
230
+			}
231
+		});
232
+	}
233
+	
234
+	// 获取状态
235
+	stateList:any = [];
236
+	getStateDic(){
237
+		this.mainService.getDictionary("list", "month_task_list_state").subscribe((res) => {
238
+			this.stateList = res
239
+		});
240
+	}
241
+	
242
+	// 开始任务
243
+	startModal:boolean = false
244
+	startTask(data){
245
+		this.coopId = data.id;
246
+		this.startModal = true
247
+	}
248
+	
249
+	hideStartModal(){
250
+		this.startModal = false
251
+	}
252
+	
253
+	// 确认开始任务
254
+	confirmStart() {
255
+	  let that = this;
256
+		let query = {
257
+			monthTaskList:{
258
+				id: this.coopId,
259
+				operationType: 'start'
260
+			}
261
+		}
262
+	  that.btnLoading = true;
263
+	  that.mainService
264
+	    .apiPublicData('updData', 'monthTaskList', query)
265
+	    .subscribe((data) => {
266
+	      that.btnLoading = false;
267
+	      that.hideStartModal();
268
+	      if (data["status"] == 200) {
269
+	        that.showPromptModal("操作", true, "");
270
+	      } else {
271
+	        that.showPromptModal("操作", false, data["msg"]);
272
+	      }
273
+	    });
274
+	}
275
+	
276
+	// 任务记录
277
+	allocationModal:boolean = false;
278
+	record(data){
279
+		this.coopId = data.id;
280
+		this.initAllocationForm();
281
+		this.allocationModal = true
282
+	}
283
+	
284
+	hideAllocationModal() {
285
+	  this.allocationModal = false;
286
+		this.initAllocationForm();
287
+	}
288
+	
289
+	// 初始化新增form表单
290
+	initAllocationForm() {
291
+	  this.validateAllocationForm = this.fb.group({
292
+	    taskConclusion: [null, [Validators.required]],
293
+			manHour: [null, [Validators.required]],
294
+	  });
295
+	}
296
+		
297
+	// 任务记录提交
298
+	submitAllocationForm(): void {
299
+	  var that = this;
300
+		for (const i in that.validateAllocationForm.controls) {
301
+		  that.validateAllocationForm.controls[i].markAsDirty();
302
+		  that.validateAllocationForm.controls[i].updateValueAndValidity();
303
+		}
304
+		if (that.validateAllocationForm.invalid) return;
305
+	  let data = {
306
+			monthTaskList:{
307
+				taskConclusion: this.validateAllocationForm.value.taskConclusion,
308
+				manHour: this.validateAllocationForm.value.manHour,
309
+				id:this.coopId,
310
+				operationType: 'record'
311
+			}
312
+	  };
313
+	
314
+		that.btnLoading = true;
315
+	  that.mainService
316
+	    .dataPost("updData", "monthTaskList", data)
317
+	    .subscribe((data) => {
318
+	      that.btnLoading = false;
319
+	      that.hideAllocationModal();
320
+	      if (data.status == 200) {
321
+	        that.showPromptModal("记录", true, "");
322
+	      } else {
323
+	        that.showPromptModal("记录", false, data.msg);
324
+	      }
325
+	    });
326
+	}
327
+	
328
+	// 任务完成
329
+	accomplishModal:boolean = false;
330
+	taskConclusion:any;
331
+	manHour:any;
332
+	accomplish(data){
333
+		this.coopId = data.id;
334
+		this.taskConclusion = null;
335
+		this.accomplishModal = true
336
+	}
337
+	
338
+	// 任务完成提交
339
+	submitAccomplishForm(){
340
+		if(!this.taskConclusion){
341
+			this.message.error('任务总结不能为空!')
342
+			return
343
+		}
344
+		if(!this.manHour){
345
+			this.message.error('总工时不能为空!')
346
+			return
347
+		}
348
+		let data = {
349
+			monthTaskList:{
350
+				taskConclusion: this.taskConclusion,
351
+				manHour: this.manHour,
352
+				operationType: 'done',
353
+				id:this.coopId
354
+			}
355
+		};
356
+		this.btnLoading = true;
357
+		this.mainService
358
+		  .dataPost("updData", "monthTaskList", data)
359
+		  .subscribe((data) => {
360
+		    this.btnLoading = false;
361
+		    this.hideAccomplishModal();
362
+		    if (data.status == 200) {
363
+		      this.showPromptModal("操作", true, "");
364
+		    } else {
365
+		      this.showPromptModal("操作", false, data.msg);
366
+		    }
367
+		  });
368
+	}
369
+	
370
+	hideAccomplishModal(){
371
+		this.accomplishModal = false
372
+	}
373
+	
374
+	// 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
375
+	showPromptModal(con, success, promptInfo?) {
376
+	  this.promptModalShow = false;
377
+	  this.promptContent = con;
378
+	  this.ifSuccess = success;
379
+	  this.promptInfo = promptInfo;
380
+	  setTimeout(() => {
381
+	    this.promptModalShow = true;
382
+	  }, 100);
383
+	  this.getList();
384
+	}
385
+}
386
+

+ 19 - 0
src/app/views/task-list/task-list.module.ts

@@ -0,0 +1,19 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+
4
+import { TaskListRoutingModule } from './task-list-routing.module';
5
+import { TaskListComponent } from './task-list.component';
6
+import { ShareModule } from 'src/app/share/share.module';
7
+
8
+
9
+@NgModule({
10
+  declarations: [
11
+    TaskListComponent
12
+  ],
13
+  imports: [
14
+    CommonModule,
15
+    TaskListRoutingModule,
16
+    ShareModule
17
+  ]
18
+})
19
+export class TaskListModule { }

+ 1 - 1
src/app/views/users-management/users-management.component.html

@@ -118,7 +118,7 @@
118 118
             <nz-input-group>
119 119
               <input type="name" nz-input formControlName="name" placeholder="请填写姓名" />
120 120
             </nz-input-group>
121
-          </nz-form-contr(ngModelChange)ol>
121
+          </nz-form-control>
122 122
         </nz-form-item>
123 123
         <nz-form-item>
124 124
           <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="account">用户名</nz-form-label>

+ 21 - 21
src/assets/iconfont/demo_index.html

@@ -55,15 +55,15 @@
55 55
           <ul class="icon_lists dib-box">
56 56
           
57 57
             <li class="dib">
58
-              <span class="icon icon_transport">&#xe688;</span>
59
-                <div class="name">任务管理</div>
60
-                <div class="code-name">&amp;#xe688;</div>
58
+              <span class="icon icon_transport">&#xe675;</span>
59
+                <div class="name">添加hover</div>
60
+                <div class="code-name">&amp;#xe675;</div>
61 61
               </li>
62 62
           
63 63
             <li class="dib">
64
-              <span class="icon icon_transport">&#xe672;</span>
65
-                <div class="name">新增</div>
66
-                <div class="code-name">&amp;#xe672;</div>
64
+              <span class="icon icon_transport">&#xe688;</span>
65
+                <div class="name">任务管理</div>
66
+                <div class="code-name">&amp;#xe688;</div>
67 67
               </li>
68 68
           
69 69
             <li class="dib">
@@ -1104,9 +1104,9 @@
1104 1104
 <pre><code class="language-css"
1105 1105
 >@font-face {
1106 1106
   font-family: 'icon_transport';
1107
-  src: url('iconfont.woff2?t=1748055150475') format('woff2'),
1108
-       url('iconfont.woff?t=1748055150475') format('woff'),
1109
-       url('iconfont.ttf?t=1748055150475') format('truetype');
1107
+  src: url('iconfont.woff2?t=1748483326469') format('woff2'),
1108
+       url('iconfont.woff?t=1748483326469') format('woff'),
1109
+       url('iconfont.ttf?t=1748483326469') format('truetype');
1110 1110
 }
1111 1111
 </code></pre>
1112 1112
           <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -1133,20 +1133,20 @@
1133 1133
         <ul class="icon_lists dib-box">
1134 1134
           
1135 1135
           <li class="dib">
1136
-            <span class="icon icon_transport transport-renwuguanli"></span>
1136
+            <span class="icon icon_transport transport-tianjiahover"></span>
1137 1137
             <div class="name">
1138
-              任务管理
1138
+              添加hover
1139 1139
             </div>
1140
-            <div class="code-name">.transport-renwuguanli
1140
+            <div class="code-name">.transport-tianjiahover
1141 1141
             </div>
1142 1142
           </li>
1143 1143
           
1144 1144
           <li class="dib">
1145
-            <span class="icon icon_transport transport-xinzeng"></span>
1145
+            <span class="icon icon_transport transport-renwuguanli"></span>
1146 1146
             <div class="name">
1147
-              新增
1147
+              任务管理
1148 1148
             </div>
1149
-            <div class="code-name">.transport-xinzeng
1149
+            <div class="code-name">.transport-renwuguanli
1150 1150
             </div>
1151 1151
           </li>
1152 1152
           
@@ -2709,18 +2709,18 @@
2709 2709
           
2710 2710
             <li class="dib">
2711 2711
                 <svg class="icon svg-icon" aria-hidden="true">
2712
-                  <use xlink:href="#transport-renwuguanli"></use>
2712
+                  <use xlink:href="#transport-tianjiahover"></use>
2713 2713
                 </svg>
2714
-                <div class="name">任务管理</div>
2715
-                <div class="code-name">#transport-renwuguanli</div>
2714
+                <div class="name">添加hover</div>
2715
+                <div class="code-name">#transport-tianjiahover</div>
2716 2716
             </li>
2717 2717
           
2718 2718
             <li class="dib">
2719 2719
                 <svg class="icon svg-icon" aria-hidden="true">
2720
-                  <use xlink:href="#transport-xinzeng"></use>
2720
+                  <use xlink:href="#transport-renwuguanli"></use>
2721 2721
                 </svg>
2722
-                <div class="name">新增</div>
2723
-                <div class="code-name">#transport-xinzeng</div>
2722
+                <div class="name">任务管理</div>
2723
+                <div class="code-name">#transport-renwuguanli</div>
2724 2724
             </li>
2725 2725
           
2726 2726
             <li class="dib">

+ 7 - 7
src/assets/iconfont/iconfont.css

@@ -1,8 +1,8 @@
1 1
 @font-face {
2 2
   font-family: "icon_transport"; /* Project id 4543613 */
3
-  src: url('iconfont.woff2?t=1748055150475') format('woff2'),
4
-       url('iconfont.woff?t=1748055150475') format('woff'),
5
-       url('iconfont.ttf?t=1748055150475') format('truetype');
3
+  src: url('iconfont.woff2?t=1748483326469') format('woff2'),
4
+       url('iconfont.woff?t=1748483326469') format('woff'),
5
+       url('iconfont.ttf?t=1748483326469') format('truetype');
6 6
 }
7 7
 
8 8
 .icon_transport {
@@ -13,12 +13,12 @@
13 13
   -moz-osx-font-smoothing: grayscale;
14 14
 }
15 15
 
16
-.transport-renwuguanli:before {
17
-  content: "\e688";
16
+.transport-tianjiahover:before {
17
+  content: "\e675";
18 18
 }
19 19
 
20
-.transport-xinzeng:before {
21
-  content: "\e672";
20
+.transport-renwuguanli:before {
21
+  content: "\e688";
22 22
 }
23 23
 
24 24
 .transport-wendangguanli:before {

Різницю між файлами не показано, бо вона завелика
+ 1 - 1
src/assets/iconfont/iconfont.js


+ 7 - 7
src/assets/iconfont/iconfont.json

@@ -5,6 +5,13 @@
5 5
   "css_prefix_text": "transport-",
6 6
   "description": "",
7 7
   "glyphs": [
8
+    {
9
+      "icon_id": "2488133",
10
+      "name": "添加hover",
11
+      "font_class": "tianjiahover",
12
+      "unicode": "e675",
13
+      "unicode_decimal": 58997
14
+    },
8 15
     {
9 16
       "icon_id": "6899011",
10 17
       "name": "任务管理",
@@ -12,13 +19,6 @@
12 19
       "unicode": "e688",
13 20
       "unicode_decimal": 59016
14 21
     },
15
-    {
16
-      "icon_id": "7366981",
17
-      "name": "新增",
18
-      "font_class": "xinzeng",
19
-      "unicode": "e672",
20
-      "unicode_decimal": 58994
21
-    },
22 22
     {
23 23
       "icon_id": "26851705",
24 24
       "name": "文档管理",

BIN
src/assets/iconfont/iconfont.ttf


BIN
src/assets/iconfont/iconfont.woff


BIN
src/assets/iconfont/iconfont.woff2