Selaa lähdekoodia

Merge branch 'master' of http://git.dashitech.com/seimin/zy-pc

maotao 6 kuukautta sitten
vanhempi
commit
66d32009f5
38 muutettua tiedostoa jossa 5815 lisäystä ja 849 poistoa
  1. 1 0
      src/app/components/bind-extension-number/bind-extension-number.component.ts
  2. 33 6
      src/app/components/configurationCenter/configuration-category/configuration-category.component.html
  3. 146 46
      src/app/components/configurationCenter/configuration-category/configuration-category.component.ts
  4. 92 0
      src/app/components/configurationCenter/configuration-commonFaults/configuration-commonFaults.component.html
  5. 290 0
      src/app/components/configurationCenter/configuration-commonFaults/configuration-commonFaults.component.less
  6. 235 0
      src/app/components/configurationCenter/configuration-commonFaults/configuration-commonFaults.component.ts
  7. 1 0
      src/app/components/configurationCenter/configuration-message/configuration-message.component.ts
  8. 30 1
      src/app/components/configurationCenter/configuration-specimen/configuration-specimen.component.html
  9. 35 0
      src/app/components/configurationCenter/configuration-specimen/configuration-specimen.component.ts
  10. 343 0
      src/app/components/incidentManagement/incident-create/incident-create.component.html
  11. 2619 0
      src/app/components/incidentManagement/incident-create/incident-create.component.less
  12. 1450 0
      src/app/components/incidentManagement/incident-create/incident-create.component.ts
  13. 22 0
      src/app/components/incidentManagement/incident-create/incident-create.module.ts
  14. 1 1
      src/app/components/incidentManagement/incident-substitutio-assign/incident-substitution-assign.component.ts
  15. 5 0
      src/app/components/incidentManagement/incident-substitution/incident-substitution.component.ts
  16. 1 1
      src/app/components/order-scope/order-scope.component.html
  17. 11 56
      src/app/share/detail-bx/detail-bx.component.html
  18. 22 1
      src/app/share/detail-bx/detail-bx.component.less
  19. 46 143
      src/app/share/detail-bx/detail-bx.component.ts
  20. 2 2
      src/app/share/dialog-bx/dialog-bx.component.html
  21. 2 0
      src/app/share/image-viewer/image-viewer.component.less
  22. 1 1
      src/app/share/incident-details/incident-details.component.ts
  23. 28 51
      src/app/views/fuwutai/fuwutai.component.html
  24. 6 11
      src/app/views/fuwutai/fuwutai.component.less
  25. 192 24
      src/app/views/fuwutai/fuwutai.component.ts
  26. 0 40
      src/app/views/hospital-config/hospital-config.component.html
  27. 19 273
      src/app/views/hushijiandan/hushijiandan.component.html
  28. 2 0
      src/app/views/hushijiandan/hushijiandan.component.less
  29. 122 175
      src/app/views/hushijiandan/hushijiandan.component.ts
  30. 4 0
      src/app/views/incident-config/incident-config.component.html
  31. 6 4
      src/app/views/incident-config/incident-config.component.ts
  32. 2 0
      src/app/views/incident-config/incident-config.module.ts
  33. 4 0
      src/app/views/incident-management/incident-management.component.html
  34. 24 0
      src/app/views/incident-management/incident-management.component.ts
  35. 2 0
      src/app/views/incident-management/incident-management.module.ts
  36. 4 4
      src/app/views/main/main.component.html
  37. 6 5
      src/app/views/other-config/other-config.component.ts
  38. 6 4
      src/app/views/page-config/page-config.component.ts

+ 1 - 0
src/app/components/bind-extension-number/bind-extension-number.component.ts

@@ -126,6 +126,7 @@ export class BindExtensionNumberComponent implements OnInit {
126 126
 
127 127
   // 修改选项卡-是否启动
128 128
   changeFlag(flag, item){
129
+    this.activeScopeTab = item;
129 130
     if(flag){
130 131
       this.scopeTabs.forEach(v => {
131 132
         if(v.value != item.value){

+ 33 - 6
src/app/components/configurationCenter/configuration-category/configuration-category.component.html

@@ -7,21 +7,21 @@
7 7
 <div class="content">
8 8
   <div class="contentInner">
9 9
     <div class="address">
10
-      <div class="contentHead">一级故障现象<button nz-button nzType="primary" nzSize="small" (click)="addCategoryModal(1)">新增</button></div>
10
+      <div class="contentHead">一级故障现象<div><button nz-button nzType="primary" nzSize="small" (click)="editCategory(1, activeCategory1)" class="mr8" *ngIf="activeCategory1.id && hospitalConfig === 2">编辑</button><button nz-button nzType="primary" nzSize="small" (click)="addCategoryModal(1)">新增</button></div></div>
11 11
       <overlay-scrollbars #osComponentRef1 class="contentBody">
12 12
         <nz-spin nzSimple [nzSpinning]="categoryLoading1" class="mt8 text_align_center"></nz-spin>
13 13
         <div [hidden]="categoryLoading1" class="contentItem" [title]="item.category" [ngClass]="{ active: item.id === activeCategory1.id }" (click)="clickCategory(item, 1)" *ngFor="let item of categoryList1">{{ item.category }}</div>
14 14
       </overlay-scrollbars>
15 15
     </div>
16 16
     <div class="address">
17
-      <div class="contentHead">二级故障现象<button nz-button nzType="primary" nzSize="small" *ngIf="activeCategory1.id" (click)="addCategoryModal(2)">新增</button></div>
17
+      <div class="contentHead">二级故障现象<div><button nz-button nzType="primary" nzSize="small" *ngIf="activeCategory2.id && hospitalConfig === 2" (click)="editCategory(2, activeCategory2)" class="mr8">编辑</button><button nz-button nzType="primary" nzSize="small" *ngIf="activeCategory1.id" (click)="addCategoryModal(2)">新增</button></div></div>
18 18
       <overlay-scrollbars #osComponentRef2 class="contentBody">
19 19
         <nz-spin nzSimple [nzSpinning]="categoryLoading2" class="mt8 text_align_center"></nz-spin>
20 20
         <div [hidden]="categoryLoading2" class="contentItem" [title]="item.category" [ngClass]="{ active: item.id === activeCategory2.id }" (click)="clickCategory(item, 2)" *ngFor="let item of categoryList2">{{ item.category }}</div>
21 21
       </overlay-scrollbars>
22 22
     </div>
23 23
     <div class="address">
24
-      <div class="contentHead">三级故障现象<button nz-button nzType="primary" nzSize="small" *ngIf="activeCategory2.id" (click)="addCategoryModal(3)">新增</button></div>
24
+      <div class="contentHead">三级故障现象<div><button nz-button nzType="primary" nzSize="small" *ngIf="activeCategory3.id && hospitalConfig === 2" (click)="editCategory(3, activeCategory3)" class="mr8">编辑</button><button nz-button nzType="primary" nzSize="small" *ngIf="activeCategory2.id" (click)="addCategoryModal(3)">新增</button></div></div>
25 25
       <overlay-scrollbars #osComponentRef3 class="contentBody">
26 26
         <nz-spin nzSimple [nzSpinning]="categoryLoading3" class="mt8 text_align_center"></nz-spin>
27 27
         <div [hidden]="categoryLoading3" class="contentItem" [title]="item.category" [ngClass]="{ active: item.id === activeCategory3.id }" (click)="clickCategory(item, 3)" *ngFor="let item of categoryList3">{{ item.category }}</div>
@@ -186,11 +186,38 @@
186 186
   <div class="modalBody">
187 187
     <div class="title">{{modelName}}<i class="icon_transport transport-guanbi" (click)="hideCategoryModal()"></i></div>
188 188
     <div class="content">
189
-      <div class="tips" *ngIf="coopType === 1">您将添加一级故障现象,请输入故障现象</div>
190
-      <div class="tips" *ngIf="coopType === 2">您将在“<span class="red">{{activeCategory1.category}}</span>”下新增故障现象,请输入故障现象</div>
191
-      <div class="tips" *ngIf="coopType === 3">您将在“<span class="red">{{activeCategory1.category}}{{activeCategory2.category ? ' - ' + activeCategory2.category : ''}}</span>”下新增故障现象,请输入故障现象</div>
189
+      <div class="tips" *ngIf="coopType === 1 && add">您将添加一级故障现象,请输入故障现象</div>
190
+      <div class="tips" *ngIf="coopType === 2 && add">您将在“<span class="red">{{activeCategory1.category}}</span>”下新增故障现象,请输入故障现象</div>
191
+      <div class="tips" *ngIf="coopType === 3 && add">您将在“<span class="red">{{activeCategory1.category}}{{activeCategory2.category ? ' - ' + activeCategory2.category : ''}}</span>”下新增故障现象,请输入故障现象</div>
192 192
       <form nz-form [formGroup]="validateCategoryForm" class="addForm">
193
+        <nz-form-item *ngIf="!add && (coopType === 2 || coopType === 3)">
194
+          <nz-form-label nzFor="category1" nzRequired [nzSpan]="6">一级故障现象</nz-form-label>
195
+          <nz-form-control [nzSpan]="24" nzErrorTip="请选择一级故障现象!">
196
+						<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzPlaceHolder="请选择一级故障现象" formControlName="category1" (ngModelChange)="changeOneCategory($event)">
197
+						  <ng-container *ngFor="let option of categoryListP1">
198
+						    <nz-option *ngIf="!isLoading" [nzLabel]="option.category" [nzValue]="option.id"></nz-option>
199
+						  </ng-container>
200
+						  <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
201
+						    <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
202
+						  </nz-option>
203
+						</nz-select>
204
+          </nz-form-control>
205
+        </nz-form-item>
206
+        <nz-form-item *ngIf="!add && coopType === 3">
207
+          <nz-form-label nzFor="category2" nzRequired [nzSpan]="6">二级故障现象</nz-form-label>
208
+          <nz-form-control [nzSpan]="24" nzErrorTip="请选择二级故障现象!">
209
+						<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzPlaceHolder="请选择二级故障现象" formControlName="category2">
210
+						  <ng-container *ngFor="let option of categoryListP2">
211
+						    <nz-option *ngIf="!isLoading" [nzLabel]="option.category" [nzValue]="option.id"></nz-option>
212
+						  </ng-container>
213
+						  <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
214
+						    <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
215
+						  </nz-option>
216
+						</nz-select>
217
+          </nz-form-control>
218
+        </nz-form-item>
193 219
         <nz-form-item>
220
+          <nz-form-label nzFor="category" nzRequired [nzSpan]="6" *ngIf="!add">故障现象名称</nz-form-label>
194 221
           <nz-form-control [nzSpan]="24" nzErrorTip="请输入故障现象名称!">
195 222
             <nz-input-group>
196 223
               <textarea formControlName="name" nz-input placeholder="请输入故障现象名称" [nzAutosize]="{minRows: 3}"></textarea>

+ 146 - 46
src/app/components/configurationCenter/configuration-category/configuration-category.component.ts

@@ -6,6 +6,7 @@ import { MainService } from "../../../services/main.service";
6 6
 import { Validators, FormGroup, FormBuilder } from '@angular/forms';
7 7
 import { ToolService } from 'src/app/services/tool.service';
8 8
 import { OverlayScrollbarsComponent } from 'overlayscrollbars-ngx';
9
+import cloneDeep from 'lodash-es/cloneDeep'
9 10
 
10 11
 @Component({
11 12
   selector: "app-configuration-category",
@@ -349,7 +350,7 @@ export class ConfigurationCategoryComponent implements OnInit {
349 350
   categoryLoading1:boolean = false;
350 351
   categoryLoading2:boolean = false;
351 352
   categoryLoading3:boolean = false;
352
-  getCategoryList(type:number, parentId = 0) {
353
+  getCategoryList(type:number, parentId = 0, isEdit = false, isOnly = false) {
353 354
     setTimeout(() => {
354 355
       this['categoryLoading' + type] = true;
355 356
     }, 0)
@@ -363,6 +364,33 @@ export class ConfigurationCategoryComponent implements OnInit {
363 364
     this.mainService.incidentPost("listIncidentCategory", postData).subscribe(res => {
364 365
       this['categoryLoading' + type] = false;
365 366
       this['categoryList' + type] = res.data || [];
367
+      this['categoryListP' + type] = cloneDeep(this['categoryList' + type]);
368
+      if(isEdit){
369
+        this['activeCategory' + type] = this['categoryList' + type].find(v => v.id == this['activeCategory' + type].id);
370
+      }
371
+
372
+      if(isOnly){
373
+        this['activeCategory' + type] = this['categoryList' + type].find(v => v.id == this.validateCategoryForm.value['category' + type]);
374
+      }
375
+    })
376
+  }
377
+
378
+  // 弹窗-故障现象查询
379
+  categoryListP1: any[] = [];
380
+  categoryListP2: any[] = [];
381
+  categoryListP3: any[] = [];
382
+  getCategoryListP(type:number, parentId = 0) {
383
+    this.isLoading = true;
384
+    let postData = {
385
+      category: {
386
+        hierarchy: type === 1 ? 1 : undefined,
387
+        dutyIds: this.hospitalConfig === 1 ? this.currentHospital.id.toString()  : undefined,
388
+        parent: type === 1 ? undefined : { id: parentId },
389
+      },
390
+    };
391
+    this.mainService.incidentPost("listIncidentCategory", postData).subscribe(res => {
392
+      this.isLoading = false;
393
+      this['categoryListP' + type] = res.data || [];
366 394
     })
367 395
   }
368 396
 
@@ -385,23 +413,54 @@ export class ConfigurationCategoryComponent implements OnInit {
385 413
 
386 414
   // 初始化新增form表单
387 415
   validateCategoryForm: FormGroup; //新增/编辑表单
388
-  initCategoryForm() {
389
-    this.validateCategoryForm = this.fb.group({
390
-      name: [null, [Validators.required]],//名称
391
-    });
416
+  initCategoryForm(isEdit = false) {
417
+    if(isEdit){
418
+      if(this.coopType === 1){
419
+        this.validateCategoryForm = this.fb.group({
420
+          name: [null, [Validators.required]],//名称
421
+        });
422
+      }else if(this.coopType === 2){
423
+        this.validateCategoryForm = this.fb.group({
424
+          category1: [null, [Validators.required]],//一级故障现象
425
+          name: [null, [Validators.required]],//名称
426
+        });
427
+      }else if(this.coopType === 3){
428
+        this.validateCategoryForm = this.fb.group({
429
+          category1: [null, [Validators.required]],//一级故障现象
430
+          category2: [null, [Validators.required]],//二级故障现象
431
+          name: [null, [Validators.required]],//名称
432
+        });
433
+      }
434
+    }else{
435
+      this.validateCategoryForm = this.fb.group({
436
+        name: [null, [Validators.required]],//名称
437
+      });
438
+    }
439
+
392 440
     console.log(this.validateCategoryForm.controls)
393 441
   }
394 442
 
395 443
   // 编辑
396
-  // editCategory(data) {
397
-  //   console.log(data);
398
-  //   this.modelName = "编辑";
399
-  //   this.add = false;
400
-  //   this.modalCategory = true;
401
-  //   this.initCategoryForm();
402
-  //   this.coopData = data;
403
-  //   this.validateCategoryForm.controls.name.setValue(data.name);
404
-  // }
444
+  editCategory(type, data) {
445
+    console.log(data);
446
+    this.coopType = type;
447
+    this.modelName = "编辑";
448
+    this.add = false;
449
+    this.modalCategory = true;
450
+    this.initCategoryForm(true);
451
+    this.coopData = data;
452
+
453
+    this.validateCategoryForm.controls.name.setValue(data.category);
454
+    if(type === 2){
455
+      this.categoryListP1 = cloneDeep(this.categoryList1);
456
+      this.validateCategoryForm.controls.category1.setValue(this.activeCategory1.id);
457
+    }else if(type === 3){
458
+      this.categoryListP1 = cloneDeep(this.categoryList1);
459
+      this.categoryListP2 = cloneDeep(this.categoryList2);
460
+      this.validateCategoryForm.controls.category1.setValue(this.activeCategory1.id);
461
+      this.validateCategoryForm.controls.category2.setValue(this.activeCategory2.id);
462
+    }
463
+  }
405 464
 
406 465
   // 新增/编辑表单提交
407 466
   btnLoading: boolean = false; //提交按钮loading状态
@@ -416,34 +475,54 @@ export class ConfigurationCategoryComponent implements OnInit {
416 475
     console.log(this.validateCategoryForm.value);
417 476
     this.btnLoading = true;
418 477
     // -----------------------------------
419
-    let postData:any = {
420
-      category: {
421
-        hosId: this.currentHospital.id,
422
-        parent: this.coopType === 1 ? undefined : this['activeCategory' + (this.coopType - 1)],
423
-        category: this.validateCategoryForm.value.name,
424
-        hierarchy: this.coopType,
425
-        dutyIds: this.hospitalConfig === 1 ? this.currentHospital.id.toString() : undefined,
426
-      },
427
-    };
428
-    this.mainService
429
-      .incidentPost("checkIncidentCategory", postData)
430
-      .subscribe((result) => {
431
-        let msg = "";
432
-        if (this.add) {
433
-          msg = "新增";
434
-        } else {
435
-          msg = "修改";
478
+    if(this.add){
479
+      // 新增
480
+      let postData:any = {
481
+        category: {
482
+          hosId: this.currentHospital.id,
483
+          parent: this.coopType === 1 ? undefined : this['activeCategory' + (this.coopType - 1)],
484
+          category: this.validateCategoryForm.value.name,
485
+          hierarchy: this.coopType,
486
+          dutyIds: this.hospitalConfig === 1 ? this.currentHospital.id.toString() : undefined,
487
+        },
488
+      };
489
+      this.mainService
490
+        .incidentPost("checkIncidentCategory", postData)
491
+        .subscribe((result) => {
492
+          if (result.status == 200) {
493
+            this.submitCategoryAddForm();
494
+          } else if(result.status == 502) {
495
+            this.btnLoading = false;
496
+            this.showDelModal(null, result.msg, '', 'relevance');
497
+          } else {
498
+            this.btnLoading = false;
499
+            this.showPromptModal('新增', false, result.msg);
500
+          }
501
+        });
502
+    }else{
503
+      // 编辑
504
+      console.log(this['activeCategory' + this.coopType])
505
+      //编辑
506
+      let postData = {
507
+        incidentCategory: {
508
+          ...this.coopData,
509
+          parent: this.coopType === 1 ? undefined : (this.coopType === 2 ? { id: this.validateCategoryForm.value.category1 } : { id: this.validateCategoryForm.value.category2 }),
510
+          category: this.validateCategoryForm.value.name,
436 511
         }
437
-        if (result.status == 200) {
438
-          this.submitCategoryAddForm();
439
-        } else if(result.status == 502) {
440
-          this.btnLoading = false;
441
-          this.showDelModal(null, result.msg, '', 'relevance');
442
-        } else {
512
+      };
513
+      console.log(postData);
514
+      this.mainService
515
+        .coopData("updData", "incidentCategory", postData)
516
+        .subscribe((result) => {
443 517
           this.btnLoading = false;
444
-          this.showPromptModal(msg, false, result.msg);
445
-        }
446
-      });
518
+          this.hideCategoryModal();
519
+          if (result.status == 200) {
520
+            this.showPromptModal('编辑', true, '');
521
+          } else {
522
+            this.showPromptModal('编辑', false, result.msg);
523
+          }
524
+        });
525
+    }
447 526
     // -----------------------------------
448 527
   }
449 528
 
@@ -704,6 +783,12 @@ export class ConfigurationCategoryComponent implements OnInit {
704 783
     this.validateConfigForm.get(name)!.updateValueAndValidity();
705 784
   }
706 785
 
786
+  // 修改故障现象
787
+  changeOneCategory(id){
788
+    this.validateCategoryForm.controls.category2.setValue(null);
789
+    this.getCategoryListP(2, id);
790
+  }
791
+
707 792
   // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
708 793
   promptContent: string; //操作提示框提示信息
709 794
   ifSuccess: boolean; //操作成功/失败
@@ -717,13 +802,28 @@ export class ConfigurationCategoryComponent implements OnInit {
717 802
     setTimeout(() => {
718 803
       this.promptModalShow = true;
719 804
     }, 100);
720
-    if(this.coopType !== 0){
721
-      this.getCategoryList(this.coopType, this.coopType === 1 ? undefined : this['activeCategory' + (this.coopType - 1)].id);
805
+    if(con === '编辑'){
806
+      if(success){
807
+        if(this.coopType === 1){
808
+          this.getCategoryList(1, 0, true);
809
+        }else if(this.coopType === 2){
810
+          this.getCategoryList(1, 0, false, true);
811
+          this.getCategoryList(2, this.validateCategoryForm.value.category1, true);
812
+        }else if(this.coopType === 3){
813
+          this.getCategoryList(1, 0, false, true);
814
+          this.getCategoryList(2, this.validateCategoryForm.value.category1, false, true);
815
+          this.getCategoryList(3, this.validateCategoryForm.value.category2, true);
816
+        }
817
+      }
722 818
     }else{
723
-      this.getCategoryList(this.currentCategoryIndex, this.currentCategoryIndex === 1 ? undefined : this['activeCategory' + (this.currentCategoryIndex - 1)].id);
724
-    }
725
-    if(this.activeCategory3.id || this.activeCategory2.id || this.activeCategory1.id){
726
-      this.getCategoryConfigList(this.activeCategory3.id || this.activeCategory2.id || this.activeCategory1.id);
819
+      if(this.coopType !== 0){
820
+        this.getCategoryList(this.coopType, this.coopType === 1 ? undefined : this['activeCategory' + (this.coopType - 1)].id);
821
+      }else{
822
+        this.getCategoryList(this.currentCategoryIndex, this.currentCategoryIndex === 1 ? undefined : this['activeCategory' + (this.currentCategoryIndex - 1)].id);
823
+      }
824
+      if(this.activeCategory3.id || this.activeCategory2.id || this.activeCategory1.id){
825
+        this.getCategoryConfigList(this.activeCategory3.id || this.activeCategory2.id || this.activeCategory1.id);
826
+      }
727 827
     }
728 828
   }
729 829
 }

+ 92 - 0
src/app/components/configurationCenter/configuration-commonFaults/configuration-commonFaults.component.html

@@ -0,0 +1,92 @@
1
+<div class="content priority">
2
+  <div class="contentInner">
3
+    <div class="list-template" id="priorityTable">
4
+      <div class="list-template__content">
5
+        <div class="list-template__bottom">
6
+         <div class="list-template__top" nz-row>
7
+            <div nz-col nzLg="24" class="list-template__btns">
8
+              <button nz-button class="btn default" (click)="addPriorityModal()">新增</button>
9
+            </div>
10
+          </div>
11
+          <nz-table class="list-template__nzTable" [nzData]="commonFaultsList" nzSize="middle" [nzShowPagination]="false"
12
+            [nzLoading]="loading1" [nzScroll]="{ y: tablePriorityHeight + 'px' }">
13
+            <thead>
14
+              <tr class="thead">
15
+                <th nzWidth="25%">排序号</th>
16
+                <th nzWidth="25%">故障现象</th>
17
+                <th nzWidth="25%">别名</th>
18
+                <th nzWidth="25%">操作</th>
19
+              </tr>
20
+            </thead>
21
+            <tbody>
22
+              <tr *ngFor="let data of commonFaultsList;let i = index">
23
+                <td>{{data.orders}}</td>
24
+                <td>{{data.categoryDTO?.mutiCategory}}</td>
25
+                <td>{{data.content}}</td>
26
+                <td>
27
+                  <div class="coop">
28
+                    <span (click)="showDelModal(data,'您确认要删除吗?','删除','delPriority')">删除</span>
29
+                    <span (click)="editPriority(data)">编辑</span>
30
+                  </div>
31
+                </td>
32
+              </tr>
33
+            </tbody>
34
+          </nz-table>
35
+        </div>
36
+      </div>
37
+    </div>
38
+  </div>
39
+</div>
40
+
41
+<!-- 操作成功/失败提示框 -->
42
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
43
+  [info]="promptInfo">
44
+</app-prompt-modal>
45
+
46
+<!-- 删除模态框 -->
47
+<app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
48
+(confirmDelEvent)="confirmDel()" [content]="tipsMsg1"></app-dialog-delete>
49
+
50
+<!-- 新增/编辑模态框 -->
51
+<div class="save display_flex justify-content_flex-center align-items_center add" *ngIf="modalPriority">
52
+  <div class="modalBody">
53
+    <div class="title">{{modelName}}<i class="icon_transport transport-guanbi" (click)="hidePriorityModal()"></i></div>
54
+    <div class="content">
55
+      <form nz-form [formGroup]="validatePriorityForm" class="addForm">
56
+        <nz-form-item>
57
+          <nz-form-label [nzSpan]="6" nzRequired nzFor="orders">排序号</nz-form-label>
58
+          <nz-form-control [nzSpan]="18" nzErrorTip="请输入排序号!">
59
+            <nz-input-group>
60
+              <nz-input-number class="w100" formControlName="orders" nzPlaceHolder="请输入排序号" [nzMin]="0" [nzStep]="1" [nzPrecision]="0"></nz-input-number>
61
+            </nz-input-group>
62
+          </nz-form-control>
63
+        </nz-form-item>
64
+        <nz-form-item>
65
+          <nz-form-label [nzSpan]="6" nzRequired nzFor="content">别名</nz-form-label>
66
+          <nz-form-control [nzSpan]="18" nzErrorTip="请输入别名!">
67
+            <nz-input-group>
68
+              <input formControlName="content" nz-input placeholder="请输入别名">
69
+            </nz-input-group>
70
+          </nz-form-control>
71
+        </nz-form-item>
72
+        <nz-form-item>
73
+          <nz-form-label nzFor="category" nzRequired [nzSpan]="6">故障现象</nz-form-label>
74
+          <nz-form-control [nzSpan]="18">
75
+						<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择故障现象" formControlName="category" (nzOnSearch)="changeCommonInp('category', $event)">
76
+						  <ng-container *ngFor="let option of malfunctionData">
77
+						    <nz-option *ngIf="!isLoading" [nzLabel]="option.mutiCategory" [nzValue]="option.id"></nz-option>
78
+						  </ng-container>
79
+						  <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
80
+						    <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
81
+						  </nz-option>
82
+						</nz-select>
83
+          </nz-form-control>
84
+        </nz-form-item>
85
+      </form>
86
+    </div>
87
+    <div class=" display_flex justify-content_flex-center">
88
+      <button nzType="primary" nz-button (click)="submitPriorityForm()" [nzLoading]="btnLoading">确认</button>
89
+      <button class="btn cancel" nz-button nzType="default" (click)="hidePriorityModal()">取消</button>
90
+    </div>
91
+  </div>
92
+</div>

+ 290 - 0
src/app/components/configurationCenter/configuration-commonFaults/configuration-commonFaults.component.less

@@ -0,0 +1,290 @@
1
+@import "../../../../../src/theme.less";
2
+:host {
3
+  height: 100%;
4
+  display: flex;
5
+  flex-direction: column;
6
+  justify-content: space-between;
7
+  background-color: #F0F2F5;
8
+  .list-template__nzTable,
9
+  .list-template__bottom{
10
+    padding: 0!important;
11
+    border: none!important;
12
+    background: #fff!important;
13
+  }
14
+  .list-template{
15
+    width: 100%!important;
16
+    height: 100%!important;
17
+  }
18
+  .content{
19
+    flex: 1;
20
+    min-height: 0;
21
+    display: flex;
22
+    flex-direction: column;
23
+    justify-content: space-between;
24
+    border: 1px solid #EEF3F9;
25
+    &.priority{
26
+      margin: 20px;
27
+      background-color: #fff;
28
+      .contentInner{
29
+        border: 1px solid #E8EBEF;
30
+      }
31
+    }
32
+    .contentItem{
33
+      padding: 4px 16px;
34
+      cursor: pointer;
35
+      overflow: hidden;
36
+      text-overflow: ellipsis;
37
+      white-space: nowrap;
38
+      &.active{
39
+        color: @primary-color;
40
+        background-color: #F0F6ED;
41
+        border-radius: 4px;
42
+      }
43
+    }
44
+    .contentInner{
45
+      flex: 1;
46
+      display: flex;
47
+      justify-content: space-between;
48
+      align-items: center;
49
+      padding: 0 16px;
50
+      gap: 16px;
51
+      .contentHead{
52
+        height: 45px;
53
+        display: flex;
54
+        justify-content: space-between;
55
+        align-items: center;
56
+        gap: 16px;
57
+        padding: 0 16px;
58
+        font-size: 16px;
59
+        font-weight: bold;
60
+        border-bottom: 1px solid #D9D9D9;
61
+        .title{
62
+          overflow: hidden;
63
+          text-overflow: ellipsis;
64
+          white-space: nowrap;
65
+        }
66
+        .btns{
67
+          flex-shrink: 0;
68
+        }
69
+      }
70
+      .contentBody{
71
+        padding: 0 8px;
72
+        margin: 4px 0;
73
+        flex: 1;
74
+      }
75
+      .address{
76
+        flex: 1;
77
+        height: 100%;
78
+        background: #FFFFFF;
79
+        border: 1px solid #E8EBEF;
80
+        display: flex;
81
+        flex-direction: column;
82
+        width: 0;
83
+      }
84
+      .addressAssign{
85
+        flex: 3;
86
+        height: 100%;
87
+        background: #FFFFFF;
88
+        border: 1px solid #E8EBEF;
89
+        display: flex;
90
+        flex-direction: column;
91
+        width: 0;
92
+      }
93
+      .list-template__searchItem {
94
+        margin-bottom: 16px;
95
+        .label {
96
+          color: #333;
97
+          display: inline-block;
98
+          width: 70px;
99
+          text-align-last: justify;
100
+          text-align: justify;
101
+          &.label--big {
102
+            width: 100px;
103
+          }
104
+        }
105
+        .formItem {
106
+          width: 135px;
107
+        }
108
+      }
109
+    }
110
+    .contentBtns{
111
+      margin-bottom: 16px;
112
+      display: flex;
113
+      justify-content: center;
114
+      align-items: center;
115
+    }
116
+  }
117
+
118
+  .save {
119
+    position: fixed;
120
+    left: 0;
121
+    top: 0;
122
+    width: 100%;
123
+    height: 100%;
124
+    background: rgba(0, 0, 0, 0.4);
125
+    z-index: 99;
126
+
127
+    .tips{
128
+      margin-bottom: 16px!important;
129
+    }
130
+
131
+    .modalBody {
132
+      width: 350px;
133
+      background: #fff;
134
+      border-radius: 5px;
135
+      padding: 10px 20px;
136
+      color: #333;
137
+
138
+      .title {
139
+        width: 100%;
140
+        text-align: center;
141
+        font-size: 18px;
142
+        position: relative;
143
+
144
+        i {
145
+          position: absolute;
146
+          right: 0;
147
+          top: 0;
148
+          font-size: 20px;
149
+          color: #666;
150
+          cursor: pointer;
151
+          padding: 0 5px;
152
+        }
153
+      }
154
+
155
+      .content {
156
+        width: 310px;
157
+        background: #f9fafb;
158
+        border: 1px solid #e5e9ed;
159
+        border-radius: 5px;
160
+        overflow: hidden;
161
+        margin-top: 12px;
162
+        padding: 16px 0;
163
+
164
+        .busyList{
165
+          display: flex;
166
+          margin-bottom: 8px;
167
+          .busyContent{
168
+            margin-right: 8px;
169
+            flex: 1;
170
+          }
171
+        }
172
+
173
+        & > div {
174
+          text-align: center;
175
+          margin: 0;
176
+
177
+          &.icon {
178
+            // margin-top: 17px;
179
+
180
+            i {
181
+              color: #34b349;
182
+              font-size: 30px !important;
183
+
184
+              &.transport-wenhao {
185
+                color: #f5a523;
186
+              }
187
+
188
+              &.transport-shibai {
189
+                color: #ff3a52;
190
+              }
191
+            }
192
+          }
193
+
194
+          &.defeat {
195
+            color: #333;
196
+            font-size: 14px;
197
+          }
198
+
199
+          &:nth-child(3) {
200
+            font-size: 14px;
201
+            color: #666;
202
+          }
203
+        }
204
+        .workAssignmentTips {
205
+          font-size: 12px;
206
+        }
207
+      }
208
+
209
+      button {
210
+        margin-top: 10px;
211
+
212
+        &.btn {
213
+          margin-left: 8px;
214
+        }
215
+      }
216
+    }
217
+
218
+    // 新增
219
+    &.add {
220
+      .modalBody {
221
+        width: 480px;
222
+        height: auto;
223
+
224
+        .content {
225
+          width: 100%;
226
+          height: auto;
227
+          padding: 16px;
228
+          max-height: 497px;
229
+          overflow-y: auto;
230
+
231
+          .addForm {
232
+            .ant-form-item {
233
+              margin-bottom: 0;
234
+							.ant-select{
235
+								width: 100% !important;
236
+							}
237
+              .ant-form-item-label {
238
+                text-align: left;
239
+              }
240
+
241
+              .desc {
242
+                margin-top: 5px;
243
+              }
244
+            }
245
+
246
+            .datesControl {
247
+              margin-top: -16px;
248
+
249
+              .ant-form-item-label {
250
+                line-height: 40px;
251
+              }
252
+            }
253
+
254
+            .timer {
255
+              .ant-form-item-label {
256
+                width: 100%;
257
+                text-align: left;
258
+              }
259
+
260
+              .numInp {
261
+                margin-right: 5px;
262
+              }
263
+
264
+              .line {
265
+                margin-right: 5px;
266
+              }
267
+            }
268
+
269
+            .timer2 {
270
+              .ant-form-item-label {
271
+                line-height: 20px;
272
+              }
273
+            }
274
+          }
275
+
276
+          .editForm {
277
+            .ant-form-item {
278
+              margin-bottom: 15px;
279
+
280
+              .ant-form-item-label {
281
+                line-height: 14px;
282
+                text-align: left;
283
+              }
284
+            }
285
+          }
286
+        }
287
+      }
288
+    }
289
+  }
290
+}

+ 235 - 0
src/app/components/configurationCenter/configuration-commonFaults/configuration-commonFaults.component.ts

@@ -0,0 +1,235 @@
1
+import { Component, OnInit } from "@angular/core";
2
+import { ActivatedRoute } from "@angular/router";
3
+import { Subject } from 'rxjs';
4
+import { debounceTime } from 'rxjs/operators';
5
+import { MainService } from "../../../services/main.service";
6
+import { Validators, FormGroup, FormBuilder } from '@angular/forms';
7
+import { ToolService } from 'src/app/services/tool.service';
8
+import { NzMessageService } from 'ng-zorro-antd';
9
+
10
+@Component({
11
+  selector: "app-configuration-commonFaults",
12
+  templateUrl: "./configuration-commonFaults.component.html",
13
+  styleUrls: ["./configuration-commonFaults.component.less"],
14
+})
15
+export class ConfigurationCommonFaultsComponent implements OnInit {
16
+  constructor(
17
+    private route: ActivatedRoute,
18
+    private mainService: MainService,
19
+    private fb: FormBuilder,
20
+    private tool: ToolService,
21
+    private message: NzMessageService,
22
+  ) {}
23
+
24
+  coopData: any = {}; //当前操作列
25
+	hosId:any;
26
+	hospitals:any = [];
27
+	isDeptLoading: boolean = false;
28
+
29
+	currentHospital:any;
30
+	malfunctionData:any = [];
31
+	allUserGroup:any = [];
32
+	userData:any = [];
33
+
34
+  changeCommonInpSubject = new Subject();
35
+
36
+  ngOnInit() {
37
+		this.changeCommonInpSubject.pipe(debounceTime(500)).subscribe((v) => {
38
+      if(v[0] === 'category'){
39
+        this.searchApplicationCategory(v[1]);
40
+      }
41
+    });
42
+
43
+    // 优先级
44
+    setTimeout(() => {
45
+      this.tablePriorityHeight = document.querySelector('#priorityTable').clientHeight - document.querySelector('#priorityTable .list-template__top').clientHeight - 8 - document.querySelector('#priorityTable .thead').clientHeight;
46
+    }, 100)
47
+		this.hosId = this.tool.getCurrentHospital().id;
48
+		this.currentHospital = this.tool.getCurrentHospital();
49
+    this.getCommonFaultsList();
50
+		this.searchApplicationCategory()
51
+  }
52
+
53
+  // 新增优先级弹框
54
+  modelName = ""; //模态框名称
55
+  modalPriority: boolean = false; //新增/编辑模态框
56
+  add: boolean; //true:新增;false:编辑
57
+  addPriorityModal() {
58
+    this.modelName = "新增";
59
+    this.add = true; //新增
60
+    this.modalPriority = true;
61
+    this.initForm();
62
+  }
63
+  //关闭新增/编辑弹框
64
+  hidePriorityModal() {
65
+    this.modalPriority = false;
66
+  }
67
+
68
+  changeCommonInp(type, e) {
69
+    this.changeCommonInpSubject.next([type, e]);
70
+  }
71
+
72
+	// 获取故障现象数据
73
+  isLoading:boolean = false;
74
+	searchApplicationCategory(keyWord?){
75
+		let postData = {
76
+		  category: {
77
+        category: keyWord,
78
+        selectType: "mutlQuery",
79
+		    hierarchy: 3,
80
+		  },
81
+		};
82
+    this.isLoading = true;
83
+		this.mainService.incidentPost("listIncidentCategory", postData).subscribe(data => {
84
+		  this.isLoading = false;
85
+      if (data.status == 200) {
86
+        this.malfunctionData = data.data || [];
87
+      }
88
+		})
89
+	}
90
+
91
+  // 编辑
92
+  editPriority(data) {
93
+    console.log(data);
94
+    this.modelName = "编辑";
95
+    this.add = false;
96
+    this.modalPriority = true;
97
+    this.initForm();
98
+    this.coopData = data;
99
+    this.validatePriorityForm.controls.orders.setValue(data.orders);
100
+    this.validatePriorityForm.controls.content.setValue(data.content);
101
+    this.validatePriorityForm.controls.category.setValue(data.category);
102
+  }
103
+
104
+  // 新增/编辑表单提交
105
+  btnLoading: boolean = false; //提交按钮loading状态
106
+  submitPriorityForm(): void {
107
+    for (const i in this.validatePriorityForm.controls) {
108
+      this.validatePriorityForm.controls[i].markAsDirty();
109
+      this.validatePriorityForm.controls[i].updateValueAndValidity();
110
+    }
111
+    if (this.validatePriorityForm.invalid) {
112
+      return;
113
+    }
114
+    console.log(this.validatePriorityForm.value);
115
+    this.btnLoading = true;
116
+    let postData:any = {};
117
+    if (this.add) {
118
+      //增加
119
+      postData = {
120
+        orders: this.validatePriorityForm.value.orders,
121
+        content: this.validatePriorityForm.value.content,
122
+        category: this.validatePriorityForm.value.category,
123
+      };
124
+    } else {
125
+      //编辑
126
+      postData = {
127
+				...this.coopData,
128
+				orders: this.validatePriorityForm.value.orders,
129
+        content: this.validatePriorityForm.value.content,
130
+        category: this.validatePriorityForm.value.category,
131
+      };
132
+    }
133
+    this.mainService
134
+      .simplePost("addData", "incidentCategoryContent", postData)
135
+      .subscribe((result) => {
136
+        this.btnLoading = false;
137
+        this.hidePriorityModal();
138
+        let msg = "";
139
+        if (this.add) {
140
+          msg = "新增";
141
+        } else {
142
+          msg = "修改";
143
+        }
144
+        if (result.status == 200) {
145
+          this.showPromptModal(msg, true, '');
146
+        } else {
147
+          this.showPromptModal(msg, false, result.msg);
148
+        }
149
+      });
150
+  }
151
+
152
+  // 初始化新增form表单
153
+  validatePriorityForm: FormGroup; //新增/编辑表单
154
+  initForm() {
155
+    this.validatePriorityForm = this.fb.group({
156
+      orders: [0, [Validators.required]],//排序号
157
+      content: [null, [Validators.required]],//别名
158
+      category: [null, [Validators.required]],//故障现象
159
+    });
160
+    console.log(this.validatePriorityForm.controls)
161
+  }
162
+
163
+  // 获取列表
164
+  loading1:boolean = false;
165
+  commonFaultsList: any[] = []; //表格数据
166
+  tablePriorityHeight:number = 0;
167
+  getCommonFaultsList() {
168
+    let data = {
169
+			idx: 0,
170
+			sum: 99999,
171
+			incidentCategoryContent: {},
172
+		};
173
+		this.loading1 = true;
174
+		this.mainService
175
+			.getFetchDataList("simple/data", "incidentCategoryContent", data)
176
+			.subscribe((data) => {
177
+				this.loading1 = false;
178
+				this.commonFaultsList = data.list || [];
179
+			});
180
+  }
181
+
182
+  delModal: boolean = false; //删除模态框
183
+  tipsMsg1: string; //提示框信息
184
+  tipsMsg2: string; //操作后信息
185
+  confirmDelType: string; //确认的类型(启用/停用,删除)
186
+  showDelModal(
187
+    data,
188
+    tipsMsg1: string,
189
+    tipsMsg2: string,
190
+    type: string,
191
+  ) {
192
+    this.confirmDelType = type;
193
+    this.delModal = true;
194
+    this.coopData = data;
195
+    console.log(this.coopData);
196
+    this.tipsMsg1 = tipsMsg1;
197
+    this.tipsMsg2 = tipsMsg2;
198
+  }
199
+  // 隐藏删除框
200
+  hideDelModal() {
201
+    this.delModal = false;
202
+  }
203
+  // 确认删除
204
+  confirmDel() {
205
+    this.btnLoading = true;
206
+		//删除-优先级
207
+		this.mainService
208
+			.simplePost("rmvData", "incidentCategoryContent", [this.coopData.id])
209
+			.subscribe((data) => {
210
+				this.btnLoading = false;
211
+				this.delModal = false;
212
+				if (data.status == 200) {
213
+					this.showPromptModal(this.tipsMsg2, true, "");
214
+				} else {
215
+					this.showPromptModal(this.tipsMsg2, false, data.msg);
216
+				}
217
+			});
218
+  }
219
+
220
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
221
+  promptContent: string; //操作提示框提示信息
222
+  ifSuccess: boolean; //操作成功/失败
223
+  promptInfo: string; //操作结果提示信息
224
+  promptModalShow: boolean; //操作提示框是否展示
225
+  showPromptModal(con, success, promptInfo?) {
226
+    this.promptModalShow = false;
227
+    this.promptContent = con;
228
+    this.ifSuccess = success;
229
+    this.promptInfo = promptInfo;
230
+    setTimeout(() => {
231
+      this.promptModalShow = true;
232
+    }, 100);
233
+    this.getCommonFaultsList();
234
+  }
235
+}

+ 1 - 0
src/app/components/configurationCenter/configuration-message/configuration-message.component.ts

@@ -158,6 +158,7 @@ export class ConfigurationMessageComponent implements OnInit {
158 158
 
159 159
   //checkbox选中或者取消
160 160
   selectThis(e, index) {
161
+    this.selectTab(index);
161 162
     //遮罩切换
162 163
     this.tabs[index].disable = !this.tabs[index].checkboxFlag;
163 164
     //所有checkbox有一个选中,总开关开启

+ 30 - 1
src/app/components/configurationCenter/configuration-specimen/configuration-specimen.component.html

@@ -39,12 +39,41 @@
39 39
                   <nz-form-label class="label">收取时需扫描二维码</nz-form-label>
40 40
                   <nz-checkbox-group [(ngModel)]="arriveScanCode" (ngModelChange)="changeArriveScanCode($event)"></nz-checkbox-group>
41 41
                 </div>
42
-
43 42
                 <!-- 必须扫描动态二维码 -->
44 43
                 <div class="display_flex align-items_center mb8" *ngIf="arriveScanCode[0].checked">
45 44
                   <nz-form-label class="label">必须扫描动态二维码</nz-form-label>
46 45
                   <nz-checkbox-group [(ngModel)]="arriveScanDynamicCode"></nz-checkbox-group>
47 46
                 </div>
47
+
48
+                <!-- 退回标本是否填写交接人 -->
49
+                <div class="display_flex align-items_center mb8">
50
+                  <nz-form-label class="label">退回标本是否填写交接人</nz-form-label>
51
+                  <nz-checkbox-group [(ngModel)]="returnSpecimenWhetherHandover"></nz-checkbox-group>
52
+                </div>
53
+
54
+                <!-- 显示接单签到按钮 -->
55
+                <div class="display_flex align-items_center mb8">
56
+                  <nz-form-label class="label">显示接单签到按钮</nz-form-label>
57
+                  <nz-checkbox-group [(ngModel)]="bigScanShowSignBtn"></nz-checkbox-group>
58
+                </div>
59
+
60
+                <!-- 支持待到达非本人 -->
61
+                <!-- <div class="display_flex align-items_center mb8">
62
+                  <nz-form-label class="label">支持待到达非本人</nz-form-label>
63
+                  <nz-checkbox-group [(ngModel)]="bigScanArriveNotOwner"></nz-checkbox-group>
64
+                </div> -->
65
+
66
+                <!-- 显示建单并签到按钮 -->
67
+                <div class="display_flex align-items_center mb8">
68
+                  <nz-form-label class="label">显示建单并签到按钮</nz-form-label>
69
+                  <nz-checkbox-group [(ngModel)]="bigScanShowCreateBtn"></nz-checkbox-group>
70
+                </div>
71
+
72
+                <!-- 默认扫描标本进入标本扫描页 -->
73
+                <div class="display_flex align-items_center mb8">
74
+                  <nz-form-label class="label">默认扫描标本进入标本扫描页</nz-form-label>
75
+                  <nz-checkbox-group [(ngModel)]="defaultScanSpe"></nz-checkbox-group>
76
+                </div>
48 77
               </div>
49 78
               <!-- 自动建单配置 -->
50 79
               <div *ngIf="tabModalName=='automaticOrderCreation'">

+ 35 - 0
src/app/components/configurationCenter/configuration-specimen/configuration-specimen.component.ts

@@ -31,6 +31,31 @@ export class ConfigurationSpecimenComponent implements OnInit {
31 31
     {label:'是否开启',value: 0}
32 32
   ];
33 33
 
34
+  // 退回标本是否填写交接人
35
+  returnSpecimenWhetherHandover:any[] = [
36
+    {label:'是否开启',value: 0}
37
+  ];
38
+
39
+  // 显示接单签到按钮
40
+  bigScanShowSignBtn:any[] = [
41
+    {label:'是否开启',value: 0}
42
+  ];
43
+
44
+  // 支持待到达非本人
45
+  bigScanArriveNotOwner:any[] = [
46
+    {label:'是否开启',value: 0}
47
+  ];
48
+
49
+  // 显示建单并签到按钮
50
+  bigScanShowCreateBtn:any[] = [
51
+    {label:'是否开启',value: 0}
52
+  ];
53
+
54
+  // 默认扫描标本进入标本扫描页
55
+  defaultScanSpe:any[] = [
56
+    {label:'是否开启',value: 0}
57
+  ];
58
+
34 59
   // 配置
35 60
   configs:any = {};
36 61
   // 任务类型
@@ -121,6 +146,11 @@ export class ConfigurationSpecimenComponent implements OnInit {
121 146
       deptNotAlert: this.deptNotAlert[0].checked ? 1 : 0,
122 147
       arriveScanCode: this.arriveScanCode[0].checked ? 1 : 0,
123 148
       arriveScanDynamicCode: this.arriveScanDynamicCode[0].checked ? 1 : 0,
149
+      returnSpecimenWhetherHandover: this.returnSpecimenWhetherHandover[0].checked ? 1 : 0,
150
+      bigScanShowSignBtn: this.bigScanShowSignBtn[0].checked ? 1 : 0,
151
+      bigScanArriveNotOwner: this.bigScanArriveNotOwner[0].checked ? 1 : 0,
152
+      bigScanShowCreateBtn: this.bigScanShowCreateBtn[0].checked ? 1 : 0,
153
+      defaultScanSpe: this.defaultScanSpe[0].checked ? 1 : 0,
124 154
       deptNotAlertIds: this.deptNotAlertIds.length ? this.deptNotAlertIds.toString() : undefined,
125 155
     };
126 156
     this.btnLoading = true;
@@ -184,6 +214,11 @@ export class ConfigurationSpecimenComponent implements OnInit {
184 214
           this.deptNotAlert[0].checked = this.configs.deptNotAlert == 1;
185 215
           this.arriveScanCode[0].checked = this.configs.arriveScanCode == 1;
186 216
           this.arriveScanDynamicCode[0].checked = this.configs.arriveScanDynamicCode == 1;
217
+          this.returnSpecimenWhetherHandover[0].checked = this.configs.returnSpecimenWhetherHandover == 1;
218
+          this.bigScanShowSignBtn[0].checked = this.configs.bigScanShowSignBtn == 1;
219
+          this.bigScanArriveNotOwner[0].checked = this.configs.bigScanArriveNotOwner == 1;
220
+          this.bigScanShowCreateBtn[0].checked = this.configs.bigScanShowCreateBtn == 1;
221
+          this.defaultScanSpe[0].checked = this.configs.defaultScanSpe == 1;
187 222
           this.deptNotAlertIds = this.configs.deptNotAlertIds ? this.configs.deptNotAlertIds.split(',').map(v => +v) : [];
188 223
           this.deptList = this.configs.deptNotAlertList || [];
189 224
         }

+ 343 - 0
src/app/components/incidentManagement/incident-create/incident-create.component.html

@@ -0,0 +1,343 @@
1
+<!--
2
+ * @Author: seimin
3
+ * @Date: 2024-10-24 13:47:40
4
+ * @LastEditors: seimin
5
+ * @LastEditTime: 2024-10-25 15:47:50
6
+ * @Description: 创建
7
+-->
8
+<!-- 新建工单 -->
9
+<div class="newOrder display_flex justify-content_flex-center align-items_center">
10
+  <div class="modalBody">
11
+    <div class="title" *ngIf="currentTabIndex === '99999'">
12
+      <div class="newTop">
13
+        <div class="name">故障工单编辑</div>
14
+        <div class="newTopItem">
15
+          <span class="grayFont required">院区:</span>
16
+          <nz-select style="width: 160px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzPlaceHolder="请选择院区" [(ngModel)]="incidentModel.hosId" (ngModelChange)="changeApplyHospital($event)" nzAllowClear [nzDisabled]="buildType === '编辑事件'">
17
+            <ng-container *ngFor="let option of applicationHospitalList">
18
+              <nz-option *ngIf="!isLoading" [nzLabel]="option.hosName" [nzValue]="option.id"></nz-option>
19
+            </ng-container>
20
+            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
21
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
22
+            </nz-option>
23
+          </nz-select>
24
+        </div>
25
+        <div class="newTopItem">
26
+          <span class="grayFont required">申请科室:</span>
27
+          <nz-select style="width: 160px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeInp('itsm', $event)" nzPlaceHolder="请选择申请科室" [(ngModel)]="incidentModel.department" (ngModelChange)="changeApplyDept($event)" nzAllowClear (nzOpenChange)="openChangeApplyDept($event)">
28
+            <ng-container *ngFor="let option of applicationDeptList">
29
+              <nz-option *ngIf="!isLoadingApply" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
30
+            </ng-container>
31
+            <nz-option *ngIf="isLoadingApply" nzDisabled nzCustomContent>
32
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
33
+            </nz-option>
34
+          </nz-select>
35
+        </div>
36
+        <div class="newTopItem">
37
+          <span class="grayFont">申请人:</span>
38
+          <ng-container *ngIf="buildType === '报修转事件'">{{incidentMsg.requesterName}}</ng-container>
39
+          <ng-container *ngIf="buildType !== '报修转事件'">
40
+            <nz-select style="width: 160px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeCommonInp('requester', $event)" nzPlaceHolder="请选择申请人" [(ngModel)]="incidentModel.requester" (ngModelChange)="changeApplyRequester($event)" nzAllowClear (nzOpenChange)="openChangeApplyRequester($event)">
41
+              <ng-container *ngFor="let option of applicationRequesterList">
42
+                <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
43
+              </ng-container>
44
+              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
45
+                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
46
+              </nz-option>
47
+            </nz-select>
48
+            <label nz-checkbox [(ngModel)]="isRelatedDepartment" (ngModelChange)="changeApplyRelatedDepartment($event)" class="ml8">关联查</label>
49
+          </ng-container>
50
+        </div>
51
+      </div>
52
+    </div>
53
+    <div nz-row class="content">
54
+      <div nz-col nzSpan="15" class="col left">
55
+        <div class="tabs">
56
+          <div class="tabs__inner" #tab>
57
+            <div class="tabs__wrap" [style.transform]="'translateX(' + disX + 'px)'">
58
+              <ng-container *ngFor="let item of workTypesArrange | keyvalue">
59
+                <div [ngClass]="{ tab: true, checked: currentTabIndex == item.key}" (click)="tabClick(item.key)">
60
+                  {{ item.value[0].associationTypeName }}
61
+                </div>
62
+              </ng-container>
63
+            </div>
64
+          </div>
65
+          <div class="tabs__operate" *ngIf="workTypesFlag && incidentModel.department">
66
+            <i
67
+              class="tabs__Icon--right icon_transport transport-xiangzuo"
68
+              (click)="toLeft()"
69
+            ></i>
70
+            <i
71
+              class="tabs__Icon--left icon_transport transport-xiangzuo"
72
+              (click)="toRight()"
73
+            ></i>
74
+          </div>
75
+        </div>
76
+        <!-- 底部tab页 -->
77
+        <div class="bottomWrap">
78
+          <ng-container *ngFor="let item of workTypesArrange | keyvalue">
79
+            <!-- 故障报修 -->
80
+            <overlay-scrollbars #osComponentRef15 class="bottom_req" *ngIf="currentTabIndex === '99999'">
81
+              <div class="req">
82
+                <div class="row">
83
+                  <div class="col flex4">
84
+                    <span class="name">详细地址:</span>
85
+                    <nz-select class="w100" [(ngModel)]="incidentModel.area" (ngModelChange)="changeApplyBuilding($event)" nzAllowClear nzPlaceHolder="请选择楼栋">
86
+                      <nz-option [nzValue]="item.id" [nzLabel]="item.buildingName" *ngFor="let item of applicationBuildingList"></nz-option>
87
+                    </nz-select>
88
+                  </div>
89
+                  <div class="col flex3">
90
+                    <nz-select class="w100" [(ngModel)]="incidentModel.place" nzAllowClear nzPlaceHolder="请选择楼层">
91
+                      <nz-option [nzValue]="item.id" [nzLabel]="item.floorName" *ngFor="let item of applicationFloorList"></nz-option>
92
+                    </nz-select>
93
+                  </div>
94
+                  <div class="col flex7">
95
+                    <input nz-input placeholder="请填写详细地址" [(ngModel)]="incidentModel.houseNumber" />
96
+                  </div>
97
+                </div>
98
+
99
+                <div class="row gap8">
100
+                  <div class="col">
101
+                    <span class="name">科室电话:</span>
102
+                    <ng-container *ngIf="incidentMsg.deptManyPhone">{{incidentMsg.deptManyPhone|stringToFirstValue}}<em (click)="importPhone(incidentMsg.deptManyPhone, true)">引入</em></ng-container>
103
+                  </div>
104
+                  <div class="col">
105
+                    <span class="name">报修人电话:</span>
106
+                    <ng-container *ngIf="incidentMsg.requesterPhone">{{incidentMsg.requesterPhone}}<em (click)="importPhone(incidentMsg.requesterPhone)">引入</em></ng-container>
107
+                  </div>
108
+                  <div class="col">
109
+
110
+                  </div>
111
+                </div>
112
+
113
+                <div class="row gap8">
114
+                  <div class="col">
115
+                    <span class="name">联系人:</span>
116
+                    <input class="w100" nz-input placeholder="请填写联系人" [(ngModel)]="incidentModel.contacts" />
117
+                  </div>
118
+                  <div class="col">
119
+                    <span class="name required">联系电话:</span>
120
+                    <input class="w100" nz-input placeholder="请填写联系电话" [(ngModel)]="incidentModel.contactsInformation" />
121
+                  </div>
122
+                  <div class="col">
123
+                    <span class="name">责任部门:</span>
124
+                    {{incidentModel.duty ? incidentModel.duty.hosName : ''}}
125
+                  </div>
126
+                </div>
127
+
128
+                <div class="row gap8">
129
+                  <div class="col">
130
+                    <span class="name required">故障现象:</span>
131
+                    <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeCommonInp('category', $event)" nzPlaceHolder="请选择故障现象" [(ngModel)]="incidentModel.category" (ngModelChange)="changeApplyCategory($event)" (nzOpenChange)="openChangeApplyCategory($event)">
132
+                      <ng-container *ngFor="let option of applicationCategoryList">
133
+                        <nz-option *ngIf="!isLoading" [nzLabel]="option.mutiCategory" [nzValue]="option.id"></nz-option>
134
+                      </ng-container>
135
+                      <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
136
+                        <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
137
+                      </nz-option>
138
+                    </nz-select>
139
+                  </div>
140
+                </div>
141
+
142
+                <div class="row gap8">
143
+                  <div class="col alignItemsStart">
144
+                    <span class="name required">故障描述:</span>
145
+                    <nz-input-group [nzSuffix]="suffixTemplate">
146
+                      <textarea class="w100" nz-input rows="4" placeholder="请填写故障描述" [(ngModel)]="incidentModel.description"></textarea>
147
+                    </nz-input-group>
148
+                    <span #suffixTemplate class="ant-input-clear-icon ml8" *ngIf="incidentModel.description" (click)="incidentModel.description = null">清空</span>
149
+                  </div>
150
+                </div>
151
+
152
+                <div class="row gap8">
153
+                  <div class="col">
154
+                    <span class="name required">优先级:</span>
155
+                    <nz-select class="w100" [(ngModel)]="incidentModel.priorityId" nzAllowClear nzPlaceHolder="请选择优先级" [nzDisabled]="buildType === '编辑事件'">
156
+                      <nz-option [nzValue]="item.id" [nzLabel]="item.name" *ngFor="let item of applicationPriorityList"></nz-option>
157
+                    </nz-select>
158
+                  </div>
159
+                  <div class="col">
160
+                    <span class="name">事件来源:</span>
161
+                    <nz-select class="w100" [(ngModel)]="incidentModel.source" nzAllowClear nzPlaceHolder="请选择事件来源">
162
+                      <nz-option [nzValue]="item.id" [nzLabel]="item.name" *ngFor="let item of applicationSourceList"></nz-option>
163
+                    </nz-select>
164
+                  </div>
165
+                  <div class="col">
166
+                    <span class="name">预约时间:</span>
167
+                    <nz-date-picker style="width: 150px;" [(ngModel)]="incidentModel.yyTime" nzShowTime></nz-date-picker>
168
+                  </div>
169
+                </div>
170
+
171
+                <div class="row gap8">
172
+                  <div class="col">
173
+                    <span class="name">报修图片:</span>
174
+                    <div class="value w100 upload">
175
+                      <ng-container *ngIf="repairImgs.length === 0">
176
+                        <nz-upload nzListType="picture-card" [(nzFileList)]="fileList" [nzShowUploadList]="showUploadList" [nzPreview]="handlePreview" nzFileType="image/jpeg,image/png" nzAccept="image/jpeg,image/png" [nzShowButton]="fileList.length < 3" [nzBeforeUpload]="beforeUpload" [nzAction]="temporarilyUrl" [nzSize]="10240">
177
+                          <i nz-icon nzType="plus"></i>
178
+                          <div class="ant-upload-text">上传照片</div>
179
+                        </nz-upload>
180
+                        <nz-modal [nzVisible]="previewVisible" [nzContent]="modalContent" [nzFooter]="null" (nzOnCancel)="previewVisible = false">
181
+                          <ng-template #modalContent>
182
+                            <img [src]="previewImage" [ngStyle]="{ width: '100%' }" />
183
+                          </ng-template>
184
+                        </nz-modal>
185
+                        <div class="tips">(支持JPG/PNG格式图片,单张大小10M以内)</div>
186
+                      </ng-container>
187
+                      <div class="thumbList" *ngIf="repairImgs.length > 0">
188
+                        <div class="thumb" *ngFor="let item of repairImgs;let index = index;" (click)="previewImageHandler(repairImgs, index)"><img [src]="item.thumbFilePath" alt=""></div>
189
+                      </div>
190
+                    </div>
191
+                  </div>
192
+                </div>
193
+
194
+                <div class="row gap8" *ngIf="buildType !== '编辑事件'">
195
+                  <div class="col">
196
+                    <span class="name required">处理组:</span>
197
+                    <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeCommonInp('group', $event)" nzPlaceHolder="请选择处理组" [(ngModel)]="incidentModel.group" (ngModelChange)="changeApplyGroup($event)" (nzOpenChange)="openChangeApplyGroup($event)">
198
+                      <ng-container *ngFor="let option of applicationGroupList">
199
+                        <nz-option *ngIf="!isLoading" [nzLabel]="option.groupName" [nzValue]="option.id"></nz-option>
200
+                      </ng-container>
201
+                      <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
202
+                        <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
203
+                      </nz-option>
204
+                    </nz-select>
205
+                  </div>
206
+                  <div class="col">
207
+                    <span class="name">处理人:</span>
208
+                    <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeCommonInp('user', $event)" nzPlaceHolder="请选择处理人" [(ngModel)]="incidentModel.user" (nzOpenChange)="openChangeApplyUser($event)" nzAllowClear>
209
+                      <ng-container *ngFor="let option of applicationUserList">
210
+                        <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
211
+                      </ng-container>
212
+                      <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
213
+                        <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
214
+                      </nz-option>
215
+                    </nz-select>
216
+                  </div>
217
+                  <div class="col"></div>
218
+                </div>
219
+              </div>
220
+            </overlay-scrollbars>
221
+          </ng-container>
222
+        </div>
223
+      </div>
224
+      <div nz-col nzSpan="9" class="col right">
225
+        <div class="rightTitle">
226
+          <div class="rightTitle_tab" [class.active]="currentRTab == tab.id" *ngFor="let tab of rightTitle_tab;" (click)="rightTitleHandler(tab.id)">{{ tab.name }}</div>
227
+        </div>
228
+        <!-- 近期维修 start -->
229
+        <div class="cots_body weifenpai top185" *ngIf="currentRTab == 2">
230
+          <overlay-scrollbars #osComponentRef16 [ngStyle]="{ height: '100%' }">
231
+            <div *ngIf="itsmOrders.length && !loading6">
232
+              <div class="list listsTypeColor" *ngFor="let data of itsmOrders">
233
+                <div class="left_cots" style="width: 96%;">
234
+                  <!-- 工单 -->
235
+                  <div class="gongdan">
236
+                    <span class="left">{{ data.incidentsign }}</span>
237
+                    <span class="right">
238
+                      <span>{{ data.state?.name }}</span>
239
+                    </span>
240
+                  </div>
241
+                  <!-- 描述 -->
242
+                  <div class="didian">
243
+                    <span class="left">
244
+                      {{ data.description }}
245
+                    </span>
246
+                  </div>
247
+                  <!-- 时间 -->
248
+                  <div class="shijian">
249
+                    <span class="left"></span>
250
+                    <span class="right">
251
+                      {{ data.acceptDate | date: "MM-dd HH:mm" }}
252
+                    </span>
253
+                  </div>
254
+                </div>
255
+              </div>
256
+            </div>
257
+            <div class="no_data" *ngIf="itsmOrders.length == 0 && !loading6">
258
+              暂无数据
259
+            </div>
260
+            <div class="no_data" *ngIf="loading6">
261
+              <div class="loadingFull display_flex justify-content_flex-center align-items_center">
262
+                <div class="loadingFullInner">
263
+                  <img src="../../../assets/images/loading.gif" alt="" />
264
+                  <div>加载中...</div>
265
+                </div>
266
+              </div>
267
+            </div>
268
+          </overlay-scrollbars>
269
+        </div>
270
+        <!-- 近期维修 end -->
271
+        <!-- 知识库 start -->
272
+        <div class="cots_body weifenpai top185" *ngIf="currentRTab == 3">
273
+          <overlay-scrollbars #osComponentRef17 [ngStyle]="{ height: '100%' }">
274
+            <div *ngIf="knowageList.length && !loading7">
275
+              <div class="list listsTypeColor" *ngFor="let data of knowageList" style="height: auto;overflow: hidden;">
276
+                <div class="left_cots" style="width: 96%;height: auto;">
277
+                  <!-- 工单 -->
278
+                  <div class="gongdan" style="font-size: 16px;">
279
+                    <span class="left ellipsis-oneline w100" nz-tooltip [nzTooltipTitle]="data.title">{{data.title}}</span>
280
+                  </div>
281
+                  <!-- 描述 -->
282
+                  <div class="didian" style="font-size: 12px;height: auto;">
283
+                    <span class="left noEllipsis">{{data.content | stripHtml}}</span>
284
+                  </div>
285
+                  <!-- 时间 -->
286
+                  <div class="shijian" style="height: auto;line-height: normal;overflow: hidden;padding-bottom: 16px;">
287
+                    <span class="right">
288
+                      <button nz-button nzType="primary" (click)="importKnowage(data)">引用</button>
289
+                      <button class="ml8" nz-button nzType="primary" (click)="showKnowledgeModal(data)">查看</button>
290
+                    </span>
291
+                  </div>
292
+                </div>
293
+              </div>
294
+            </div>
295
+            <div class="no_data" *ngIf="knowageList.length == 0 && !loading7">
296
+              暂无数据
297
+            </div>
298
+            <div class="no_data" *ngIf="loading7">
299
+              <div class="loadingFull display_flex justify-content_flex-center align-items_center">
300
+                <div class="loadingFullInner">
301
+                  <img src="../../../assets/images/loading.gif" alt="" />
302
+                  <div>加载中...</div>
303
+                </div>
304
+              </div>
305
+            </div>
306
+          </overlay-scrollbars>
307
+        </div>
308
+        <!-- 知识库 end -->
309
+      </div>
310
+    </div>
311
+    <div class="btns display_flex justify-content_flex-center align-items_center">
312
+      <ng-container *ngIf="currentTabIndex === '99999' && buildType !== '编辑事件'">
313
+        <label nz-checkbox [(ngModel)]="isBuildOrderAgagin" *ngIf="buildType !== '报修转事件' && buildType !== '留言转事件'">是否连续建单</label>
314
+        <button nz-button class="btn" nzType="primary" (click)="directOrder()">
315
+          直接解决
316
+        </button>
317
+        <button nz-button class="btn" nzType="primary" (click)="assignOrder()">
318
+          建单并派单
319
+        </button>
320
+        <button nz-button class="btn" nzType="primary" (click)="temporaryStorage()">
321
+          暂存
322
+        </button>
323
+      </ng-container>
324
+      <ng-container *ngIf="currentTabIndex === '99999' && buildType === '编辑事件'">
325
+        <button nz-button class="btn" nzType="primary" (click)="saveOrder()">
326
+          保存
327
+        </button>
328
+      </ng-container>
329
+      <button class="btn cancel" nz-button nzType="default" (click)="newOrderCancel()">
330
+        取消
331
+      </button>
332
+    </div>
333
+  </div>
334
+</div>
335
+
336
+<!-- 遮罩 -->
337
+<app-mask *ngIf="maskFlag"></app-mask>
338
+
339
+<!-- 图片预览 -->
340
+<app-image-viewer [imageUrl]="imgs" hidden *ngIf="isPreview" [isPreviewNow]="true" [initialViewIndex]="initialViewIndex"></app-image-viewer>
341
+
342
+<!-- 知识库查看 -->
343
+<app-knowledge-look (cancelKnowledgeModal)="cancelKnowledgeModal()" *ngIf="isShowKnowledge" [knowledgeData]="coopData"></app-knowledge-look>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 2619 - 0
src/app/components/incidentManagement/incident-create/incident-create.component.less


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1450 - 0
src/app/components/incidentManagement/incident-create/incident-create.component.ts


+ 22 - 0
src/app/components/incidentManagement/incident-create/incident-create.module.ts

@@ -0,0 +1,22 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+
4
+import { IncidentCreateComponent } from './incident-create.component';
5
+import { ShareModule } from 'src/app/share/share.module';
6
+import { KnowledgeLookModule } from '../../knowledge-look/knowledge-look.module';
7
+
8
+
9
+@NgModule({
10
+  declarations: [
11
+    IncidentCreateComponent,
12
+  ],
13
+  imports: [
14
+    CommonModule,
15
+    ShareModule,
16
+    KnowledgeLookModule,
17
+  ],
18
+  exports: [
19
+    IncidentCreateComponent,
20
+  ]
21
+})
22
+export class IncidentCreateModule { }

+ 1 - 1
src/app/components/incidentManagement/incident-substitutio-assign/incident-substitution-assign.component.ts

@@ -94,7 +94,7 @@ export class IncidentSubstitutionAssignComponent implements OnInit {
94 94
     if(id === 1){
95 95
       // 人
96 96
       this.requiredConfigChange('userId', true);
97
-    }else if(id === 2){
97
+    }else{
98 98
       // 组
99 99
       this.requiredConfigChange('userId', false);
100 100
     }

+ 5 - 0
src/app/components/incidentManagement/incident-substitution/incident-substitution.component.ts

@@ -136,8 +136,11 @@ export class IncidentSubstitutionComponent implements OnInit {
136 136
       } else {
137 137
         // 派组
138 138
         postData.incident.candidateGroups = this.redeploy.validateForm.value.groupId;
139
+        delete postData.incident.assignee;
139 140
       }
140 141
 
142
+      postData.incident.candidateGroupId = this.redeploy.validateForm.value.groupId;
143
+
141 144
       this.mainService
142 145
       .flowPost("incident/task/redeploy", postData)
143 146
       .subscribe((result) => {
@@ -175,8 +178,10 @@ export class IncidentSubstitutionComponent implements OnInit {
175 178
       } else {
176 179
         // 派组
177 180
         postData.incident.candidateGroups = this.assign.validateForm.value.groupId;
181
+        delete postData.incident.assignee;
178 182
       }
179 183
 
184
+      postData.incident.candidateGroupId = this.assign.validateForm.value.groupId;
180 185
       postData.incident.duty = { id: this.assign.validateForm.value.dutyId };
181 186
 
182 187
       this.mainService

+ 1 - 1
src/app/components/order-scope/order-scope.component.html

@@ -7,7 +7,7 @@
7 7
     <div class="content">
8 8
       <div class="scopeTab">
9 9
         <div class="scopeTabItem" [ngClass]="{ active: item.value == activeScopeTab.value }" *ngFor="let item of scopeTabs" (click)="activeScopeTab = item">
10
-          <label nz-checkbox [(ngModel)]="item.checked">{{item.name}}</label>
10
+          <label nz-checkbox [(ngModel)]="item.checked" (ngModelChange)="activeScopeTab = item">{{item.name}}</label>
11 11
         </div>
12 12
       </div>
13 13
       <!-- 运维 -->

+ 11 - 56
src/app/share/detail-bx/detail-bx.component.html

@@ -10,13 +10,17 @@
10 10
         </div>
11 11
         <div class="info" nz-row>
12 12
           <div nz-col nzSpan="8">报修类别:{{orderInfo.category?orderInfo.category.category:''}}</div>
13
-          <div nz-col nzSpan="8">报修地址:<ng-container *ngIf="orderInfo.place">{{ orderInfo.place.area.area }} {{ orderInfo.place.place }} {{ orderInfo.houseNumber }}</ng-container></div>
13
+          <div nz-col nzSpan="8">报修地址:<ng-container *ngIf="orderInfo.place">{{ orderInfo.place.building.buildingName }} {{ orderInfo.place.floorName }}层 {{ orderInfo.houseNumber }}</ng-container></div>
14 14
           <div nz-col nzSpan="24">报修内容:{{orderInfo.description}}</div>
15 15
           <div nz-col nzSpan="24">报修图片:
16
-            <app-image-viewer [imageUrl]="imgs_wechatRequesterIncident" *ngIf="imgs_wechatRequesterIncident.length"></app-image-viewer>
16
+            <div class="thumbList" *ngIf="imgs_wechatRequesterIncident.length > 0">
17
+              <div class="thumb" *ngFor="let item of imgs_wechatRequesterIncident;let index = index;" (click)="previewImageHandler(imgs_wechatRequesterIncident, index)"><img [src]="item.thumbFilePath" alt=""></div>
18
+            </div>
17 19
           </div>
18 20
           <div nz-col nzSpan="24">处理图片:
19
-            <app-image-viewer [imageUrl]="imgs_incident" *ngIf="imgs_incident.length"></app-image-viewer>
21
+            <div class="thumbList" *ngIf="imgs_incident.length > 0">
22
+              <div class="thumb" *ngFor="let item of imgs_incident;let index = index;" (click)="previewImageHandler(imgs_incident, index)"><img [src]="item.thumbFilePath" alt=""></div>
23
+            </div>
20 24
           </div>
21 25
           <div nz-col nzSpan="8">维修人:<ng-container *ngIf="orderInfo.handlingPersonnelUser">{{ orderInfo.handlingPersonnelUser.name }}</ng-container></div>
22 26
           <div nz-col nzSpan="8">维修人电话:<ng-container *ngIf="orderInfo.handlingPersonnelUser">{{ orderInfo.handlingPersonnelUser.phone }}</ng-container></div>
@@ -51,66 +55,14 @@
51 55
           <!-- 流程图 end -->
52 56
         </div>
53 57
       </div>
54
-      <div class="bottom" *ngIf="orderInfo.urgentDetails&&showCoop">
55
-        <div class="urgent">
56
-          <div>
57
-            <ng-container *ngIf="amplificationShow&&orderInfo.urgentDetails&&showCoop">
58
-                加急原因:{{orderInfo.urgentDetails.urgentReason}}
59
-              <button *ngIf="orderInfo.urgentDetails.checkStatus.id==329" class=" btn default" nz-button nzType="primary"
60
-                [nzLoading]="urgentLoading" nzGhost (click)="urgent()">确认加急</button>
61
-            </ng-container>
62
-          </div>
63
-          <div class="amplification">
64
-            <button
65
-              nz-button
66
-              nzType="primary"
67
-              class="btn default"
68
-              (click)="amplification()"
69
-            >
70
-              {{ amplificationShow ? "放大" : "还原" }}
71
-            </button>
72
-          </div>
73
-        </div>
74
-      </div>
75 58
     </div>
76 59
   </overlay-scrollbars>
77 60
   <div class="btns display_flex justify-content_flex-center">
78
-    <button nz-button nzType="primary" (click)="goToSummary()" *ngIf="orderInfo.duty && orderInfo.duty.addSummary == 1">汇总单</button>
61
+    <button nz-button nzType="primary" (click)="goToSummary()" *ngIf="orderInfo.state.value == 'close' && itsmSummarySheet.value == 1 && orderInfo.summaryId">汇总单</button>
79 62
     <button class=" btn cancel" nz-button nzType="default" (click)="close()">取消</button>
80 63
   </div>
81 64
 </div>
82 65
 
83
-<!-- 撤回工单 -->
84
-<div class="recallOrder" *ngIf="recallOrderShow">
85
-  <div class="modalBody">
86
-    <div class="title">提示<i class="icon_transport transport-guanbi" (click)="closeRecallOrderModal()"></i></div>
87
-    <div class="content">
88
-      <div class="icon"><i class="icon_transport transport-wenhao"></i></div>
89
-      <div class="defeat">您确认要撤回此工单吗?</div>
90
-    </div>
91
-    <div class="btns display_flex justify-content_flex-center">
92
-      <button nz-button nzType="primary" [nzLoading]='btnLoading' (click)="confirmRec()">确认</button>
93
-      <button nz-button nzType="primary" [nzLoading]='recLoading' nzGhost (click)="recAndDel()">撤回并删除</button>
94
-      <button class=" btn cancel" nz-button nzType="default" (click)="closeRecallOrderModal()">取消</button>
95
-    </div>
96
-  </div>
97
-</div>
98
-
99
-<!-- 删除工单 -->
100
-<div class="recallOrder delModel" *ngIf="delOrderShow">
101
-  <div class="modalBody">
102
-    <div class="title">提示<i class="icon_transport transport-guanbi" (click)="closeDelOrderModal()"></i></div>
103
-    <div class="content">
104
-      <div class="icon"><i class="icon_transport transport-wenhao"></i></div>
105
-      <div class="defeat">您确认要删除此工单吗?</div>
106
-    </div>
107
-    <div class="btns display_flex justify-content_flex-center">
108
-      <button nz-button nzType="primary" [nzLoading]='btnLoading' (click)="confirmDel()">确认</button>
109
-      <button class="btn cancel" nz-button nzType="default" (click)="closeDelOrderModal()">关闭</button>
110
-    </div>
111
-  </div>
112
-</div>
113
-
114 66
 <!-- 操作成功/失败提示框 -->
115 67
 <app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
116 68
   [info]="promptInfo" (closeModel)="close()">
@@ -119,3 +71,6 @@
119 71
 <app-incident-details *ngIf="isShowIncidentDetails" (close)="closeIncidentDetails()" [incidentId]="orderInfo.id"></app-incident-details>
120 72
 <!-- 遮罩 -->
121 73
 <app-mask *ngIf="maskFlag"></app-mask>
74
+
75
+<!-- 图片预览 -->
76
+<app-image-viewer [imageUrl]="imgs" hidden *ngIf="isPreview" [isPreviewNow]="true" [initialViewIndex]="initialViewIndex"></app-image-viewer>

+ 22 - 1
src/app/share/detail-bx/detail-bx.component.less

@@ -13,6 +13,27 @@
13 13
   align-items: center;
14 14
 }
15 15
 
16
+.thumbList{
17
+  display: flex;
18
+  align-items: center;
19
+  flex-wrap: wrap;
20
+  gap: 8px;
21
+  .thumb{
22
+    width: 64px;
23
+    height: 64px;
24
+    padding: 4px;
25
+    border-radius: 4px;
26
+    border: 1px solid rgba(0,0,0,0.15);
27
+    img{
28
+      width: 100%;
29
+      height: 100%;
30
+      object-fit: cover;
31
+      object-position: center;
32
+      cursor: pointer;
33
+    }
34
+  }
35
+}
36
+
16 37
 .detail {
17 38
   width: 1000px;
18 39
   height: calc(100vh - 100px);
@@ -81,7 +102,7 @@
81 102
     margin-left: 3%;
82 103
     font-size: 12px;
83 104
     color: #666666;
84
-    padding: 4px 0;
105
+    padding: 4px 0 20px 0;
85 106
     padding-left: 5%;
86 107
     border-left: 1px #999999 solid;
87 108
     word-break: break-all;

+ 46 - 143
src/app/share/detail-bx/detail-bx.component.ts

@@ -47,7 +47,11 @@ export class DetailBxComponent implements OnInit {
47 47
 
48 48
   isShowIncidentDetails:boolean = false;
49 49
 
50
+  hosId:any;
51
+
50 52
   ngOnInit() {
53
+    this.hosId = this.tool.getCurrentHospital().id;
54
+    this.getHospitalConfig();
51 55
     this.tool.getDeptDisplay().subscribe((result) => {
52 56
       if (result.status == 200) {
53 57
         this.deptDisplay = result.list[0].valueconfig;
@@ -85,22 +89,58 @@ export class DetailBxComponent implements OnInit {
85 89
     this.isShowIncidentDetails = false;
86 90
   }
87 91
 
92
+  // 获取院区配置信息
93
+  itsmSummarySheet:any = {};//是否需要填写汇总单
94
+  getHospitalConfig() {
95
+    let postData = {
96
+      idx: 0,
97
+      sum: 9999,
98
+      hospitalConfig: {
99
+        model: "itsm",
100
+        hosId: this.hosId,
101
+      },
102
+    }
103
+    this.mainService
104
+      .getFetchDataList("simple/data", "hospitalConfig", postData)
105
+      .subscribe((result) => {
106
+        let list = result.list || [];
107
+        this.itsmSummarySheet = list.find(v => v.key == 'itsmSummarySheet') || {};
108
+      });
109
+  }
110
+
88 111
   // 获取图片信息
89 112
   getImgsData(type) {
90 113
     let id = this.orderInfo.id;
91 114
     this.mainService
92
-      .listAttachment(type, id)
115
+      .getPreviewImage(type, id)
93 116
       .subscribe((res:any)=> {
94 117
         // this.imgs = ['https://img2.woyaogexing.com/2022/08/19/1f5e056b1d076920!400x400.jpg','https://img2.woyaogexing.com/2022/08/19/359346943c3c489f!400x400.jpg']
95
-        for (var i = 0; i < res.data.length; i++) {
96
-          this['imgs_' + type].push(location.origin + '/file' + res.data[i].relativeFilePath);
97
-        }
118
+        res.data.forEach(v => {
119
+          v.previewUrl = location.origin + "/file" + v.relativeFilePath;
120
+          v.thumbFilePath = location.origin + "/file" + v.thumbFilePath;
121
+        })
122
+        this['imgs_' + type] = res.data;
98 123
       });
99 124
   }
100 125
 
126
+  // 预览图片
127
+  imgs = [];
128
+  isPreview = false;
129
+  initialViewIndex:number = 0;
130
+  previewImageHandler(data = [], index = 0) {
131
+    this.initialViewIndex = index;
132
+    console.log(index)
133
+    this.isPreview = false;
134
+    data = data || [];
135
+    this.imgs = data.map((v) => location.origin + '/file' + v.relativeFilePath);
136
+    setTimeout(() => {
137
+      this.isPreview = true;
138
+    }, 0)
139
+  }
140
+
101 141
   //获取处理进度
102 142
   getProgressInfo() {
103
-    this.mainService .fetchListBx("incidentLog", {
143
+    this.mainService.getFetchDataList("simple/data", "incidentLog", {
104 144
       "idx": 0,
105 145
       "sum": 9999,
106 146
       "incidentLog": {
@@ -120,31 +160,7 @@ export class DetailBxComponent implements OnInit {
120 160
 
121 161
   // 获取工单详情
122 162
   getDetail() {
123
-    return this.mainService.fetchDataBx("incident", this.id);
124
-  }
125
-
126
-  // 确认加急
127
-  urgent() {
128
-    let that = this;
129
-    that.urgentLoading = true;
130
-    let postData = {
131
-      urgentDetails: {
132
-        workerOrder: this.orderInfo["id"],
133
-        checkStatus: {
134
-          id: 330,
135
-        },
136
-        urgentReason: this.orderInfo["urgentDetails"].urgentReason,
137
-        id: this.orderInfo["urgentDetails"].id,
138
-      },
139
-    };
140
-    that.mainService.coopWorkerOrder("urge", postData).subscribe((data) => {
141
-      that.urgentLoading = false;
142
-      if (data.status == 200) {
143
-        that.showPromptModal("加急", true, "");
144
-      } else {
145
-        that.showPromptModal("加急", false, data.msg);
146
-      }
147
-    });
163
+    return this.mainService.getFetchData("simple/data", "incident", this.id);
148 164
   }
149 165
 
150 166
   // 关闭弹框
@@ -168,117 +184,4 @@ export class DetailBxComponent implements OnInit {
168 184
     // return this.mainService.getWorkOrderLog(this.id);
169 185
     return Promise.resolve(111);
170 186
   }
171
-
172
-  // 派单
173
-  allotWorker() {
174
-    this.router.navigateByUrl(
175
-      "dispatchingDesk/allotWorker/" +
176
-        this.id +
177
-        "/" +
178
-        this.orderInfo["gdState"]["id"]
179
-    );
180
-  }
181
-
182
-  // 撤回
183
-  recallOrderShow: boolean = false;
184
-  openRecallModal(): void {
185
-    this.recallOrderShow = true;
186
-  }
187
-  // 撤回并删除
188
-  recAndDel() {
189
-    let that = this;
190
-    that.recLoading = true;
191
-    that.mainService.delOrder(that.id).subscribe((data) => {
192
-      console.log(data);
193
-      that.recLoading = false;
194
-      that.closeDelOrderModal();
195
-      if (data.status == 200) {
196
-        that.showPromptModal("删除", true, "");
197
-      } else {
198
-        that.showPromptModal("删除", false, data.msg);
199
-      }
200
-    });
201
-  }
202
-  // 确认撤回
203
-  confirmRec() {
204
-    let that = this;
205
-    that.btnLoading = true;
206
-    let postData = {
207
-      workOrder: {
208
-        id: that.id,
209
-      },
210
-    };
211
-    that.mainService
212
-      .coopWorkerOrder("excuteWorkOrder/recall", postData)
213
-      .subscribe((data) => {
214
-        that.btnLoading = false;
215
-        that.closeRecallOrderModal();
216
-        if (data.status == 200) {
217
-          that.showPromptModal("撤回", true, "");
218
-        } else {
219
-          that.showPromptModal("撤回", false, data.msg);
220
-        }
221
-      });
222
-  }
223
-  // 关闭撤回弹框
224
-  closeRecallOrderModal() {
225
-    this.recallOrderShow = false;
226
-  }
227
-
228
-  // 删除
229
-  // 打开模态框
230
-  delOrderShow: boolean = false;
231
-  openDelModal() {
232
-    this.delOrderShow = true;
233
-  }
234
-  // 确认删除
235
-  confirmDel() {
236
-    let that = this;
237
-    that.btnLoading = true;
238
-    that.mainService.delOrder(that.id).subscribe((data) => {
239
-      that.btnLoading = false;
240
-      that.closeDelOrderModal();
241
-      if (data.status == 200) {
242
-        that.showPromptModal("删除", true, "");
243
-      } else {
244
-        that.showPromptModal("删除", false, data.msg);
245
-      }
246
-    });
247
-  }
248
-
249
-  // 关闭模态框
250
-  closeDelOrderModal() {
251
-    this.delOrderShow = false;
252
-  }
253
-
254
-  // 格式化时分秒
255
-  // (时间小于一分钟则显示秒,时间大于一分钟则显示分钟数,如超出一小时则显示小时和分钟。)time单位:秒
256
-  formatTime(time) {
257
-    let timeStr = "";
258
-    if (time >= 0 && time < 60) {
259
-      // 秒
260
-      timeStr = time + "秒";
261
-    } else if (time >= 60 && time < 3600) {
262
-      // 分钟
263
-      timeStr = Math.floor(time / 60) + "分钟";
264
-    } else if (time >= 3600) {
265
-      // 时 + 分
266
-      let h = "";
267
-      let m = "";
268
-      h = Math.floor(time / 3600) + "小时";
269
-      m = time % 3600 >= 60 ? Math.floor((time % 3600) / 60) + "分钟" : "";
270
-      timeStr = h + m;
271
-    }
272
-    return timeStr;
273
-  }
274
-
275
-  // 计算历史记录耗时
276
-  filterTime(step) {
277
-    // step = [{ difTime: 2 }, { difTime: 6 }]
278
-    let num = 0;
279
-    step.forEach((e) => {
280
-      num += e.difTime;
281
-    });
282
-    return this.formatTime(num / 1000);
283
-  }
284 187
 }

+ 2 - 2
src/app/share/dialog-bx/dialog-bx.component.html

@@ -19,11 +19,11 @@
19 19
         <div class="right" nz-col nzSpan="12">
20 20
           <div class="item display_flex  justify-content_space-between align-items_flex-start">
21 21
             <span>楼栋</span>
22
-            <span>{{extraData.place?.area?.area}}</span>
22
+            <span>{{extraData.floor?.building?.buildingName}}</span>
23 23
           </div>
24 24
           <div class="item display_flex  justify-content_space-between align-items_flex-start">
25 25
             <span>楼层</span>
26
-            <span>{{extraData.place?.place}}</span>
26
+            <span>{{extraData.floor?.floorName}}</span>
27 27
           </div>
28 28
         </div>
29 29
       </div>

+ 2 - 0
src/app/share/image-viewer/image-viewer.component.less

@@ -1,5 +1,7 @@
1 1
 .imgViewHelp {
2 2
   img {
3 3
     margin-right: 8px;
4
+    width: 64px;
5
+    height: 64px;
4 6
   }
5 7
 }

+ 1 - 1
src/app/share/incident-details/incident-details.component.ts

@@ -36,7 +36,7 @@ export class IncidentDetailsComponent implements OnInit {
36 36
     this.maskFlag = this.message.loading("正在加载中..", {
37 37
       nzDuration: 0,
38 38
     }).messageId;
39
-    this.mainService.querySummaryDoc({incidentId: this.incidentId}).subscribe((res:any) => {
39
+    this.mainService.querySummaryDocNew({incidentId: this.incidentId}).subscribe((res:any) => {
40 40
       this.message.remove(this.maskFlag);
41 41
       this.maskFlag = false;
42 42
       if(res.status == 200){

+ 28 - 51
src/app/views/fuwutai/fuwutai.component.html

@@ -454,8 +454,9 @@
454 454
                   </div>
455 455
                 </div>
456 456
                 <div class="right_bots display_flex col-flex align-items_center justify-content_flex-center gap8">
457
+                  <input type="button" *ngIf="data.computedEditFlag" class="top_bot" value="编辑" (click)="edit(data.data)" />
457 458
                   <input type="button" *ngIf="data.computedSubstitutionFlag" class="top_bot" value="换人处理" (click)="substitution(data.data)" />
458
-                  <input type="button" *ngIf="data.computedReceiveFlag" class="top_bot" value="接单" (click)="showDelModal($event, data.data,'您确认要接单吗?','接单','receive')" />
459
+                  <!-- <input type="button" *ngIf="data.computedReceiveFlag" class="top_bot" value="接单" (click)="showDelModal($event, data.data,'您确认要接单吗?','接单','receive')" /> -->
459 460
                   <input type="button" *ngIf="coopBtns.del" class="btm_bot" value="删除" (click)="openDelModal(data.data.id, 'itsm')" />
460 461
                 </div>
461 462
                 <div *ngIf="data.data.overtimePercent <= 100" class="slider sgreen" [ngStyle]="{ width: data.data.overtimePercent + '%' }"></div>
@@ -658,8 +659,9 @@
658 659
                   </div>
659 660
                 </div>
660 661
                 <div class="right_bots display_flex col-flex align-items_center justify-content_flex-center gap8">
662
+                  <input type="button" *ngIf="data.computedEditFlag" class="top_bot" value="编辑" (click)="edit(data.data)" />
661 663
                   <input type="button" *ngIf="data.computedSubstitutionFlag" class="top_bot" value="换人处理" (click)="substitution(data.data)" />
662
-                  <input type="button" *ngIf="data.computedHandleFlag" class="top_bot" value="处理" (click)="handle(data.data)" />
664
+                  <!-- <input type="button" *ngIf="data.computedHandleFlag" class="top_bot" value="处理" (click)="handle(data.data)" /> -->
663 665
                   <input type="button" *ngIf="coopBtns.del" class="btm_bot" value="删除" (click)="openDelModal(data.data.id, 'itsm')" />
664 666
                 </div>
665 667
                 <div *ngIf="data.data.overtimePercent <= 100" class="slider sgreen" [ngStyle]="{ width: data.data.overtimePercent + '%' }"></div>
@@ -1166,7 +1168,7 @@
1166 1168
           <div class="name">来电咨询</div>
1167 1169
           <div class="newTopItem">
1168 1170
             <span class="grayFont required">院区:</span>
1169
-            <nz-select style="width: 160px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzPlaceHolder="请选择院区" [(ngModel)]="incidentModel.hosId" (ngModelChange)="changeApplyHospital($event)" nzAllowClear>
1171
+            <nz-select style="width: 160px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzPlaceHolder="请选择院区" [(ngModel)]="incidentModel.hosId" (ngModelChange)="changeApplyHospital($event)" nzAllowClear [nzDisabled]="buildType === '编辑事件'">
1170 1172
               <ng-container *ngFor="let option of applicationHospitalList">
1171 1173
                 <nz-option *ngIf="!isLoading" [nzLabel]="option.hosName" [nzValue]="option.id"></nz-option>
1172 1174
               </ng-container>
@@ -1201,7 +1203,7 @@
1201 1203
               <label nz-checkbox [(ngModel)]="isRelatedDepartment" (ngModelChange)="changeApplyRelatedDepartment($event)" class="ml8">关联查</label>
1202 1204
             </ng-container>
1203 1205
           </div>
1204
-          <div class="newTopItem">
1206
+          <div class="newTopItem" *ngIf="buildType !== '编辑事件'">
1205 1207
             <span class="grayFont">来电电话:{{incidentModel.incomingPhone}}</span>
1206 1208
           </div>
1207 1209
         </div>
@@ -1212,7 +1214,7 @@
1212 1214
             <div class="tabs__inner" #tab>
1213 1215
               <div class="tabs__wrap" [style.transform]="'translateX(' + disX + 'px)'">
1214 1216
                 <ng-container *ngFor="let item of workTypesArrange | keyvalue">
1215
-                  <div [ngClass]="{ tab: true, checked: currentTabIndex == item.key}" (click)="tabClick(item.key)">
1217
+                  <div [ngClass]="{ tab: true, checked: currentTabIndex == item.key}" (click)="tabClick(item.key)" *ngIf="buildType !== '编辑事件' || (buildType === '编辑事件' && item.key == 99999)">
1216 1218
                     {{ item.value[0].associationTypeName }}
1217 1219
                   </div>
1218 1220
                 </ng-container>
@@ -1261,26 +1263,10 @@
1261 1263
                               nzErrorTip="请选择类型!"
1262 1264
                             >
1263 1265
                               <div class="radios">
1264
-                                <overlay-scrollbars
1265
-                                  #osComponentRef10
1266
-                                  [ngStyle]="{ height: '100%' }"
1267
-                                >
1268
-                                  <nz-radio-group
1269
-                                    formControlName="taskType"
1270
-                                    nz-row
1271
-                                    [(ngModel)]="radioValueZy"
1272
-                                    (ngModelChange)="radioChangeZy(radioValueZy)"
1273
-                                  >
1266
+                                <overlay-scrollbars #osComponentRef10 [ngStyle]="{ height: '100%' }">
1267
+                                  <nz-radio-group formControlName="taskType" nz-row [(ngModel)]="radioValueZy" (ngModelChange)="radioChangeZy(radioValueZy)">
1274 1268
                                     <div nz-row>
1275
-                                      <label
1276
-                                        nz-col
1277
-                                        nz-radio
1278
-                                        [nzValue]="item1.id"
1279
-                                        *ngFor="
1280
-                                          let item1 of workTypesArrange[item.key]
1281
-                                        "
1282
-                                        >{{ item1.taskTypeName }}</label
1283
-                                      >
1269
+                                      <label [title]="item1.taskTypeName" nz-col nz-radio [nzValue]="item1.id" *ngFor="let item1 of workTypesArrange[item.key]">{{ item1.taskTypeName }}</label>
1284 1270
                                     </div>
1285 1271
                                   </nz-radio-group>
1286 1272
                                 </overlay-scrollbars>
@@ -1594,26 +1580,10 @@
1594 1580
                               nzErrorTip="请选择类型!"
1595 1581
                             >
1596 1582
                               <div class="radios" style="height: 225px">
1597
-                                <overlay-scrollbars
1598
-                                  #osComponentRef11
1599
-                                  [ngStyle]="{ height: '100%' }"
1600
-                                >
1601
-                                  <nz-radio-group
1602
-                                    formControlName="taskTypeQt"
1603
-                                    nz-row
1604
-                                    [(ngModel)]="radioValueQt"
1605
-                                    (ngModelChange)="radioChangeQt(radioValueQt)"
1606
-                                  >
1583
+                                <overlay-scrollbars #osComponentRef11 [ngStyle]="{ height: '100%' }">
1584
+                                  <nz-radio-group formControlName="taskTypeQt" nz-row [(ngModel)]="radioValueQt" (ngModelChange)="radioChangeQt(radioValueQt)">
1607 1585
                                     <div nz-row>
1608
-                                      <label
1609
-                                        nz-col
1610
-                                        nz-radio
1611
-                                        [nzValue]="item1.id"
1612
-                                        *ngFor="
1613
-                                          let item1 of workTypesArrange[item.key]
1614
-                                        "
1615
-                                        >{{ item1.taskTypeName }}</label
1616
-                                      >
1586
+                                      <label [title]="item1.taskTypeName" nz-col nz-radio [nzValue]="item1.id" *ngFor="let item1 of workTypesArrange[item.key]">{{ item1.taskTypeName }}</label>
1617 1587
                                     </div>
1618 1588
                                   </nz-radio-group>
1619 1589
                                 </overlay-scrollbars>
@@ -1891,8 +1861,10 @@
1891 1861
                       <ng-container *ngIf="incidentMsg.requesterPhone">{{incidentMsg.requesterPhone}}<em (click)="importPhone(incidentMsg.requesterPhone)">引入</em></ng-container>
1892 1862
                     </div>
1893 1863
                     <div class="col">
1894
-                      <span class="name">来电电话:</span>
1895
-                      <ng-container *ngIf="incidentModel.incomingPhone">{{incidentModel.incomingPhone}}<em (click)="importPhone(incidentModel.incomingPhone)">引入</em></ng-container>
1864
+                      <ng-container *ngIf="buildType !== '编辑事件'">
1865
+                        <span class="name">来电电话:</span>
1866
+                        <ng-container *ngIf="incidentModel.incomingPhone">{{incidentModel.incomingPhone}}<em (click)="importPhone(incidentModel.incomingPhone)">引入</em></ng-container>
1867
+                      </ng-container>
1896 1868
                     </div>
1897 1869
                   </div>
1898 1870
 
@@ -1914,7 +1886,7 @@
1914 1886
                   <div class="row gap8">
1915 1887
                     <div class="col">
1916 1888
                       <span class="name required">故障现象:</span>
1917
-                      <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeCommonInp('category', $event)" nzPlaceHolder="请选择故障现象" [(ngModel)]="incidentModel.category" (ngModelChange)="changeApplyCategory($event)" (nzOpenChange)="openChangeApplyCategory($event)">>
1889
+                      <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeCommonInp('category', $event)" nzPlaceHolder="请选择故障现象" [(ngModel)]="incidentModel.category" (ngModelChange)="changeApplyCategory($event)" (nzOpenChange)="openChangeApplyCategory($event)">
1918 1890
                         <ng-container *ngFor="let option of applicationCategoryList">
1919 1891
                           <nz-option *ngIf="!isLoading" [nzLabel]="option.mutiCategory" [nzValue]="option.id"></nz-option>
1920 1892
                         </ng-container>
@@ -1938,7 +1910,7 @@
1938 1910
                   <div class="row gap8">
1939 1911
                     <div class="col">
1940 1912
                       <span class="name required">优先级:</span>
1941
-                      <nz-select class="w100" [(ngModel)]="incidentModel.priorityId" nzAllowClear nzPlaceHolder="请选择优先级">
1913
+                      <nz-select class="w100" [(ngModel)]="incidentModel.priorityId" nzAllowClear nzPlaceHolder="请选择优先级" [nzDisabled]="buildType === '编辑事件'">
1942 1914
                         <nz-option [nzValue]="item.id" [nzLabel]="item.name" *ngFor="let item of applicationPriorityList"></nz-option>
1943 1915
                       </nz-select>
1944 1916
                     </div>
@@ -1977,7 +1949,7 @@
1977 1949
                     </div>
1978 1950
                   </div>
1979 1951
 
1980
-                  <div class="row gap8">
1952
+                  <div class="row gap8" *ngIf="buildType !== '编辑事件'">
1981 1953
                     <div class="col">
1982 1954
                       <span class="name required">处理组:</span>
1983 1955
                       <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeCommonInp('group', $event)" nzPlaceHolder="请选择处理组" [(ngModel)]="incidentModel.group" (ngModelChange)="changeApplyGroup($event)" (nzOpenChange)="openChangeApplyGroup($event)">
@@ -2211,7 +2183,7 @@
2211 2183
                   <div class="left_cots" style="width: 96%;height: auto;">
2212 2184
                     <!-- 工单 -->
2213 2185
                     <div class="gongdan" style="font-size: 16px;">
2214
-                      <span class="left noEllipsis">{{data.title}}</span>
2186
+                      <span class="left ellipsis-oneline w100" nz-tooltip [nzTooltipTitle]="data.title">{{data.title}}</span>
2215 2187
                     </div>
2216 2188
                     <!-- 描述 -->
2217 2189
                     <div class="didian" style="font-size: 12px;height: auto;">
@@ -2252,8 +2224,8 @@
2252 2224
             {{isYyInspect ? '预约建单' :'直接建单'}}
2253 2225
           </button>
2254 2226
         </ng-container>
2255
-        <ng-container *ngIf="currentTabIndex === '99999'">
2256
-          <label nz-checkbox [(ngModel)]="isBuildOrderAgagin" *ngIf="buildType !== '报修转事件' && buildType !== '留言转事件'">是否连续建单</label>
2227
+        <ng-container *ngIf="currentTabIndex === '99999' && buildType !== '编辑事件'">
2228
+          <label nz-checkbox [(ngModel)]="isBuildOrderAgagin" *ngIf="buildType !== '报修转事件' && buildType !== '留言转事件' && buildType !== '继续建单'">是否连续建单</label>
2257 2229
           <button nz-button class="btn" nzType="primary" (click)="directOrder()">
2258 2230
             直接解决
2259 2231
           </button>
@@ -2264,6 +2236,11 @@
2264 2236
             暂存
2265 2237
           </button>
2266 2238
         </ng-container>
2239
+        <ng-container *ngIf="currentTabIndex === '99999' && buildType === '编辑事件'">
2240
+          <button nz-button class="btn" nzType="primary" (click)="saveOrder()">
2241
+            保存
2242
+          </button>
2243
+        </ng-container>
2267 2244
         <button class="btn cancel" nz-button nzType="default" (click)="newOrderCancel()">
2268 2245
           取消
2269 2246
         </button>

+ 6 - 11
src/app/views/fuwutai/fuwutai.component.less

@@ -2374,7 +2374,7 @@
2374 2374
                   height: 267px;
2375 2375
                   width: 100%;
2376 2376
                   overflow-y: auto;
2377
-                  padding: 10px 18px;
2377
+                  padding: 8px;
2378 2378
                   background: #fff;
2379 2379
                   border: 1px solid #e6dede;
2380 2380
                   border-radius: 5px;
@@ -2383,19 +2383,14 @@
2383 2383
                     display: flex;
2384 2384
                     flex-wrap: wrap;
2385 2385
                     .ant-radio-wrapper {
2386
-                      // flex: 1;
2387
-                      // max-width: 100%;
2388
-                      // width: 160px;
2386
+                      width: 16.66%;
2389 2387
                       display: flex;
2390 2388
                       align-items: center;
2389
+                      margin-right: 0;
2391 2390
                       ::ng-deep span.ant-radio + * {
2392
-                        // min-width: 110px;
2393
-                        white-space: normal;
2394
-                        float: left;
2395
-                        padding-right: 0;
2396
-                      }
2397
-                      ::ng-deep span.ant-radio {
2398
-                        float: left;
2391
+                        overflow: hidden;
2392
+                        text-overflow: ellipsis;
2393
+                        white-space: inherit;
2399 2394
                       }
2400 2395
                     }
2401 2396
                   }

+ 192 - 24
src/app/views/fuwutai/fuwutai.component.ts

@@ -831,14 +831,16 @@ export class FuwutaiComponent implements OnInit {
831 831
     let timer = null;
832 832
     TLWSA.onClosed = () => {
833 833
       _this.getState(0);
834
-      console.log('与服务器网络连接中断-----seimin');
835
-      _this.msg.info('与服务器网络连接中断,2分钟后重连')
836
-      console.log('2分钟后自动重连-----seimin')
837 834
       clearTimeout(timer);
838
-      timer = setTimeout(function () {
839
-        //连接
840
-        tlwsa.tlaOpen(_this.incomingService.getSocketUrl());
841
-      }, 120000)
835
+      if(location.hash === '#/dispatchingDesk'){
836
+        console.log('与服务器网络连接中断-----seimin');
837
+        _this.msg.info('与服务器网络连接中断,2分钟后重连')
838
+        console.log('2分钟后自动重连-----seimin')
839
+        timer = setTimeout(function () {
840
+          //连接
841
+          tlwsa.tlaOpen(_this.incomingService.getSocketUrl());
842
+        }, 120000)
843
+      }
842 844
     }
843 845
     //签入回调函数
844 846
     TLWSA.onLoginreturn = function (err) {
@@ -1955,7 +1957,7 @@ export class FuwutaiComponent implements OnInit {
1955 1957
       if(stateId == 1){
1956 1958
         postData.incidentQuery.incident = {
1957 1959
           // "groupIds": this.itsmData.allDuty == 1 ? undefined : (this.itsmData.scopeGroups.map(v => v.id).toString() || undefined),
1958
-          "dutyIds": this.itsmData.allDuty == 1 ? undefined : (this.itsmData.checkedHos.map(v => v.id).toString() || undefined),
1960
+          "acceptDutyIds": this.itsmData.allDuty == 1 ? undefined : (this.itsmData.checkedHos.map(v => v.id).toString() || undefined),
1959 1961
           "urgentType": +this.itsmData.orderScopeRadio + 1,
1960 1962
           "queryTask": "storageAccept",
1961 1963
           "assignee": this.tool.getCurrentUserId(),
@@ -2013,6 +2015,7 @@ export class FuwutaiComponent implements OnInit {
2013 2015
             if(item.type === 'mdv2'){
2014 2016
               item.computedSubstitutionFlag = this.computedSubstitution(item.data)
2015 2017
               item.computedReceiveFlag = this.computedReceive(item.data)
2018
+              item.computedEditFlag = this.computedEdit(item.data)
2016 2019
             }
2017 2020
           });
2018 2021
           this.arriveList = arriveList;
@@ -2027,6 +2030,7 @@ export class FuwutaiComponent implements OnInit {
2027 2030
             if(item.type === 'mdv2'){
2028 2031
               item.computedSubstitutionFlag = this.computedSubstitution(item.data)
2029 2032
               item.computedHandleFlag = this.computedHandle(item.data)
2033
+              item.computedEditFlag = this.computedEdit(item.data)
2030 2034
             }
2031 2035
           });
2032 2036
           this.executionList = executionList;
@@ -2287,6 +2291,12 @@ export class FuwutaiComponent implements OnInit {
2287 2291
     this.isRelatedDepartment = true;
2288 2292
     this.solutionId = undefined;
2289 2293
   }
2294
+  // 重置新建工单数据-继续建单-编辑-报修转事件
2295
+  resetOrderData2(){
2296
+    this.fileList = [];
2297
+    this.repairImgs = [];
2298
+    this.isRelatedDepartment = true;
2299
+  }
2290 2300
   // 打开新建工单
2291 2301
   deathTasktypeId; //获取这个写死的任务类型的id,送病人回病房
2292 2302
   deathTasktypeIdPatient; //获取这个写死的任务类型的id,转出院记录
@@ -2299,7 +2309,11 @@ export class FuwutaiComponent implements OnInit {
2299 2309
     }
2300 2310
     this.buildType = buildType;
2301 2311
     if(this.itsmData.mdv2Switch){
2302
-      this.buildType !== '继续建单' && this.resetOrderData();
2312
+      if(this.buildType !== '继续建单' && this.buildType !== '编辑事件' && this.buildType !== '报修转事件'){
2313
+        this.resetOrderData();
2314
+      }else{
2315
+        this.resetOrderData2();
2316
+      }
2303 2317
       this.searchApplicationHospital();
2304 2318
       this.searchApplicationCategory();
2305 2319
       this.searchApplicationPriority();
@@ -2557,7 +2571,7 @@ export class FuwutaiComponent implements OnInit {
2557 2571
     this.incidentModel.duty = undefined;
2558 2572
 
2559 2573
     // 根据院区和故障现象带出责任部门,优先级,维修人/组
2560
-    if(this.incidentModel.category && e){
2574
+    if(this.incidentModel.category && e && this.buildType !== '编辑事件'){
2561 2575
       let postData = {
2562 2576
         idx: 0,
2563 2577
         sum: 9999,
@@ -2643,12 +2657,18 @@ export class FuwutaiComponent implements OnInit {
2643 2657
   // 故障现象列表
2644 2658
   applicationCategoryList:any[] = [];
2645 2659
   searchApplicationCategory(keyWord?) {
2660
+    let dutyIds;
2661
+    if(this.buildType === '编辑事件'){
2662
+      dutyIds = this.incidentModel.duty.id.toString();
2663
+    }else{
2664
+      dutyIds = this.itsmData.checkedHos.length ? (this.itsmData.checkedHos.map(v => v.id).toString() || undefined) : undefined;
2665
+    }
2646 2666
     let postData = {
2647 2667
       category: {
2648 2668
         category: keyWord,
2649 2669
         selectType: 'mutlQuery',
2650 2670
         hierarchy: 3,//只差有三级的故障现象列表
2651
-        dutyIds: this.itsmData.checkedHos.length ? (this.itsmData.checkedHos.map(v => v.id).toString() || undefined) : undefined,
2671
+        dutyIds,
2652 2672
       },
2653 2673
     };
2654 2674
     console.log(postData);
@@ -2665,11 +2685,11 @@ export class FuwutaiComponent implements OnInit {
2665 2685
   }
2666 2686
   // 修改故障现象
2667 2687
   incidentCategoryConfig:any = {};//当前匹配的故障现象规则
2668
-  changeApplyCategory(e){
2688
+  changeApplyCategory(e, isCoverage = false){
2669 2689
     console.log(e)
2670 2690
     // 知识库
2671 2691
     this.getKnowageList();
2672
-    if(e){
2692
+    if(e && !isCoverage){
2673 2693
       // 根据故障现象带出故障描述
2674 2694
       if(this.incidentModel.description){
2675 2695
         this.incidentModel.description = this.incidentModel.description + ';' + this.applicationCategoryList.find(v => v.id == e).mutiCategory;
@@ -2678,7 +2698,7 @@ export class FuwutaiComponent implements OnInit {
2678 2698
       }
2679 2699
     }
2680 2700
     // 根据院区和故障现象带出责任部门,优先级,维修人/组
2681
-    if(this.incidentModel.hosId && e){
2701
+    if(this.incidentModel.hosId && e && this.buildType !== '编辑事件'){
2682 2702
       let postData = {
2683 2703
         idx: 0,
2684 2704
         sum: 9999,
@@ -2773,7 +2793,11 @@ export class FuwutaiComponent implements OnInit {
2773 2793
       if(this.buildType === '报修转事件'){
2774 2794
         postData.incident.fromWx = true;
2775 2795
       }
2776
-      postData.incident = Object.assign({}, this.editOrder, postData.incident);
2796
+      if(this.buildType !== '继续建单' && this.buildType !== '编辑事件' && this.buildType !== '报修转事件'){
2797
+        postData.incident = Object.assign({}, postData.incident);
2798
+      }else{
2799
+        postData.incident = Object.assign({}, this.editOrder, postData.incident);
2800
+      }
2777 2801
     }
2778 2802
 
2779 2803
     this.mainService
@@ -3034,7 +3058,11 @@ export class FuwutaiComponent implements OnInit {
3034 3058
           this.applicationBuildingList = data.list;
3035 3059
           if(buildingId){
3036 3060
             let hasBuildingId = this.applicationBuildingList.some(v => v.id == buildingId);
3037
-            hasBuildingId && (this.incidentModel.area = buildingId);
3061
+            if(hasBuildingId){
3062
+              this.incidentModel.area = buildingId;
3063
+            }else{
3064
+              this.incidentModel.area = undefined;
3065
+            }
3038 3066
           }
3039 3067
         }
3040 3068
       });
@@ -3047,12 +3075,12 @@ export class FuwutaiComponent implements OnInit {
3047 3075
   }
3048 3076
   // 楼层列表
3049 3077
   applicationFloorList:any[] = [];
3050
-  searchApplicationFloor(keyWord?, floorId?) {
3078
+  searchApplicationFloor(keyWord?, floorId?, buildingId?) {
3051 3079
     let postData = {
3052 3080
       idx: 0,
3053 3081
       sum: 9999,
3054 3082
       floor: {
3055
-        buildId: this.incidentModel.area || undefined,
3083
+        buildId: buildingId || this.incidentModel.area || undefined,
3056 3084
         hosId: this.incidentModel.hosId,
3057 3085
       },
3058 3086
     };
@@ -3065,7 +3093,11 @@ export class FuwutaiComponent implements OnInit {
3065 3093
           this.applicationFloorList = data.list;
3066 3094
           if(floorId){
3067 3095
             let hasFloorId = this.applicationFloorList.some(v => v.id == floorId);
3068
-            hasFloorId && (this.incidentModel.place = floorId);
3096
+            if(hasFloorId){
3097
+              this.incidentModel.place = floorId;
3098
+            }else{
3099
+              this.incidentModel.place = undefined;
3100
+            }
3069 3101
           }
3070 3102
         }
3071 3103
       });
@@ -3235,7 +3267,7 @@ export class FuwutaiComponent implements OnInit {
3235 3267
       let buildingId = deptObj.building ? deptObj.building.id : undefined;
3236 3268
       buildingId && this.searchApplicationBuilding('', buildingId);
3237 3269
       let floorId = deptObj.floor ? deptObj.floor.id : undefined;
3238
-      floorId && this.searchApplicationFloor('', floorId);
3270
+      buildingId && floorId && this.searchApplicationFloor('', floorId, buildingId);
3239 3271
       this.incidentModel.houseNumber = deptObj.address;
3240 3272
     }
3241 3273
 
@@ -3246,7 +3278,7 @@ export class FuwutaiComponent implements OnInit {
3246 3278
     this.searchApplicationRequester();
3247 3279
 
3248 3280
     // 根据院区和故障现象带出责任部门,优先级,维修人/组
3249
-    if(this.incidentModel.category && this.incidentModel.hosId){
3281
+    if(this.incidentModel.category && this.incidentModel.hosId && this.buildType !== '编辑事件'){
3250 3282
       let postData = {
3251 3283
         idx: 0,
3252 3284
         sum: 9999,
@@ -3458,7 +3490,7 @@ export class FuwutaiComponent implements OnInit {
3458 3490
       return;
3459 3491
     }
3460 3492
 
3461
-    if(!this.incidentModel.group){
3493
+    if(!this.incidentModel.group && this.buildType !== '编辑事件'){
3462 3494
       this.msg.warning('请选择处理组!');
3463 3495
       return;
3464 3496
     }
@@ -3499,7 +3531,11 @@ export class FuwutaiComponent implements OnInit {
3499 3531
       if(this.buildType === '报修转事件'){
3500 3532
         postData.incident.fromWx = true;
3501 3533
       }
3502
-      postData.incident = Object.assign({}, this.editOrder, postData.incident);
3534
+      if(this.buildType !== '继续建单' && this.buildType !== '编辑事件' && this.buildType !== '报修转事件'){
3535
+        postData.incident = Object.assign({}, postData.incident);
3536
+      }else{
3537
+        postData.incident = Object.assign({}, this.editOrder, postData.incident);
3538
+      }
3503 3539
     }
3504 3540
     console.log(postData);
3505 3541
     // return;
@@ -3569,7 +3605,12 @@ export class FuwutaiComponent implements OnInit {
3569 3605
       if(this.buildType === '报修转事件'){
3570 3606
         postData.incident.fromWx = true;
3571 3607
       }
3572
-      postData.incident = Object.assign({}, this.editOrder, postData.incident);
3608
+
3609
+      if(this.buildType !== '继续建单' && this.buildType !== '编辑事件' && this.buildType !== '报修转事件'){
3610
+        postData.incident = Object.assign({}, postData.incident);
3611
+      }else{
3612
+        postData.incident = Object.assign({}, this.editOrder, postData.incident);
3613
+      }
3573 3614
     }
3574 3615
     console.log(postData);
3575 3616
     // return;
@@ -3596,6 +3637,96 @@ export class FuwutaiComponent implements OnInit {
3596 3637
       });
3597 3638
   }
3598 3639
 
3640
+  // 运维-保存
3641
+  saveOrder(){
3642
+    if(!this.incidentModel.category){
3643
+      this.msg.warning('请选择故障现象!');
3644
+      return;
3645
+    }
3646
+
3647
+    let category = this.applicationCategoryList.find(v => v.id == this.incidentModel.category);
3648
+    if(!this.incidentModel.duty){
3649
+      this.msg.warning(`故障现象【${category.mutiCategory}】没有设置责任部门!`);
3650
+      return;
3651
+    }
3652
+
3653
+    if(!this.incidentModel.department){
3654
+      this.msg.warning('请选择申请科室!');
3655
+      return;
3656
+    }
3657
+
3658
+    if(!this.incidentModel.contactsInformation){
3659
+      this.msg.warning('请填写联系电话!');
3660
+      return;
3661
+    }
3662
+
3663
+    if(!this.incidentModel.priorityId){
3664
+      this.msg.warning('请选择优先级!');
3665
+      return;
3666
+    }
3667
+
3668
+    if(!this.incidentModel.description){
3669
+      this.msg.warning('请选择故障描述!');
3670
+      return;
3671
+    }
3672
+    this.maskFlag = this.msg.loading("正在加载中..", {
3673
+      nzDuration: 0,
3674
+    }).messageId;
3675
+
3676
+    let postData:any = {
3677
+      solutionId: this.solutionId,
3678
+      "incident": {
3679
+        "id": this.incidentModel.id || undefined,
3680
+        "deleteFlag": 0,
3681
+        "duty": this.incidentModel.duty ? { id: this.incidentModel.duty.id } : undefined,
3682
+        "department": this.incidentModel.department ? { id: this.incidentModel.department } : undefined,
3683
+        "contactsInformation": this.incidentModel.contactsInformation,
3684
+        "contacts": this.incidentModel.contacts,
3685
+        "hosId": this.incidentModel.hosId || undefined,
3686
+        "area": this.incidentModel.area ? { id: this.incidentModel.area } : undefined,
3687
+        "place": this.incidentModel.place ? { id: this.incidentModel.place } : undefined,
3688
+        "houseNumber": this.incidentModel.houseNumber,
3689
+        "category": this.incidentModel.category ? { id: this.incidentModel.category } : undefined,
3690
+        "priorityId": this.incidentModel.priorityId || undefined,
3691
+        "source": this.incidentModel.source ? { id: this.incidentModel.source } : undefined,
3692
+        "title": category ? category.mutiCategory : '',
3693
+        "description": this.incidentModel.description,
3694
+        "yyTime": this.incidentModel.yyTime ? format(new Date(this.incidentModel.yyTime), 'yyyy-MM-dd HH:mm:ss') : undefined,
3695
+        "requester": this.incidentModel.requester ? { id: this.incidentModel.requester } : undefined,
3696
+        "acceptUser": { id: this.tool.getCurrentUserId() },
3697
+        "callID": this.incidentModel.callID || undefined,
3698
+        "incomingPhone": this.incidentModel.incomingPhone || undefined,
3699
+        "hjzxRecordId": this.incidentModel.hjzxRecordId || undefined,
3700
+      }
3701
+    };
3702
+    if(this.buildType){
3703
+      postData.incident = Object.assign({}, this.editOrder, postData.incident);
3704
+    }
3705
+    console.log(postData);
3706
+    // return;
3707
+
3708
+    this.mainService
3709
+      .flowPost("incident/task/edit", postData)
3710
+      .subscribe((result) => {
3711
+        this.msg.remove(this.maskFlag);
3712
+        this.maskFlag = false;
3713
+
3714
+        if (result.state == 200) {
3715
+          // 图片上传
3716
+          if(this.fileList.length){
3717
+            console.log(this.fileList.map(v => v.originFileObj));
3718
+            this.fileList.map(v => v.originFileObj).forEach(async file => {
3719
+              await this.uploadImages(file, result.data.id);
3720
+            })
3721
+          }
3722
+          // this.msg.success('编辑成功');
3723
+          this.isBuildOrderAgaginFn();
3724
+        } else {
3725
+          this.msg.error('编辑失败');
3726
+        }
3727
+      });
3728
+  }
3729
+
3599 3730
   // 是否连续建单
3600 3731
   isBuildOrderAgaginFn(){
3601 3732
     if(this.isBuildOrderAgagin){
@@ -4625,8 +4756,11 @@ export class FuwutaiComponent implements OnInit {
4625 4756
     incidentModel.source && (incidentModel.source = incidentModel.source.id);
4626 4757
     incidentModel.area && (incidentModel.area = incidentModel.area.id);
4627 4758
     incidentModel.place && (incidentModel.place = incidentModel.place.id);
4759
+    incidentModel.category && (this.applicationCategoryList = [cloneDeep(incidentModel.category)]);
4760
+    incidentModel.category && (incidentModel.category = incidentModel.category.id);
4628 4761
     this.incidentModel = incidentModel;
4629 4762
     this.incidentMsg = incidentMsg;
4763
+    this.incidentModel.category && this.changeApplyCategory(this.incidentModel.category, true);
4630 4764
     console.log('this.applicationDeptList:', this.applicationDeptList)
4631 4765
     console.log('incidentModel:', incidentModel)
4632 4766
     this.showNewOrder('', '', true, '报修转事件');
@@ -4734,6 +4868,35 @@ export class FuwutaiComponent implements OnInit {
4734 4868
     });
4735 4869
   }
4736 4870
 
4871
+  // 编辑-弹窗
4872
+  edit(data){
4873
+    this.editOrder = cloneDeep(data);
4874
+    let incidentModel = cloneDeep(data);
4875
+    let incidentMsg:any = {};
4876
+    console.log('data:', data)
4877
+    incidentModel.department && (incidentMsg.deptManyPhone = incidentModel.department.manyPhone);
4878
+    incidentModel.department && (incidentMsg.deptName = incidentModel.department.dept);
4879
+    incidentModel.department && (incidentModel.department = incidentModel.department.id);
4880
+    incidentModel.requester && (this.applicationRequesterList = [cloneDeep(incidentModel.requester)]);
4881
+    incidentModel.requester && (incidentMsg.requesterPhone = incidentModel.requester.phone);
4882
+    incidentModel.requester && (incidentMsg.requesterName = incidentModel.requester.name);
4883
+    incidentModel.requester && (incidentModel.requester = incidentModel.requester.id);
4884
+    incidentModel.source && (incidentModel.source = incidentModel.source.id);
4885
+    incidentModel.area && (incidentModel.area = incidentModel.area.id);
4886
+    incidentModel.place && (incidentModel.place = incidentModel.place.id);
4887
+    incidentModel.category && (this.applicationCategoryList = [cloneDeep(incidentModel.category)]);
4888
+    incidentModel.category && (incidentModel.category = incidentModel.category.id);
4889
+    this.incidentModel = incidentModel;
4890
+    this.incidentMsg = incidentMsg;
4891
+    console.log('this.applicationRequesterList:', this.applicationRequesterList)
4892
+    console.log('this.applicationDeptList:', this.applicationDeptList)
4893
+    console.log('incidentModel:', incidentModel)
4894
+    this.showNewOrder('', '', true, '编辑事件');
4895
+
4896
+    // 查询报修图片
4897
+    this.getRepairImgs(data.id);
4898
+  }
4899
+
4737 4900
   // 换人处理-弹窗
4738 4901
   substitutionModalShow = false; //弹窗开关
4739 4902
   substitution(data) {
@@ -4771,6 +4934,11 @@ export class FuwutaiComponent implements OnInit {
4771 4934
     return (data.state.value === 'pending' || data.state.value === 'handler' || (data.state.value === 'reassign' && this.coopBtns.assign)) && data.deleteFlag !== 1;
4772 4935
   }
4773 4936
 
4937
+  // 是否显示编辑按钮
4938
+  computedEdit(data){
4939
+    return (data.state.value === 'pending' || data.state.value === 'reassign' || data.state.value === 'handler' || data.state.value === 'close') && this.coopBtns.edit && data.deleteFlag !== 1;
4940
+  }
4941
+
4774 4942
   // 是否显示处理按钮
4775 4943
   computedHandle(data){
4776 4944
     return this.coopBtns.handle && data.state.value === 'handler' && data.handlingPersonnelUser && data.handlingPersonnelUser.id == this.tool.getCurrentUserId() && data.deleteFlag !== 1;

+ 0 - 40
src/app/views/hospital-config/hospital-config.component.html

@@ -334,46 +334,6 @@
334 334
                 </nz-form-control>
335 335
               </ng-container>
336 336
             </ng-container>
337
-            <ng-container *ngSwitchCase="'scanCodeSpecimenOrderSign'">
338
-              <nz-form-label
339
-                [nzSpan]="24"
340
-                [nzFor]="config.key"
341
-                class="label"
342
-                [nzRequired]="config.required"
343
-                >{{config.desc}}</nz-form-label
344
-              >
345
-              <nz-form-control
346
-                [nzSpan]="24"
347
-                [nzErrorTip]="'请选择!'"
348
-              >
349
-                <nz-radio-group
350
-                  [formControlName]="config.key"
351
-                >
352
-                  <label nz-radio nzValue="1">是</label>
353
-                  <label nz-radio nzValue="0">否</label>
354
-                </nz-radio-group>
355
-              </nz-form-control>
356
-            </ng-container>
357
-            <ng-container *ngSwitchCase="'returnSpecimenWhetherHandover'">
358
-              <nz-form-label
359
-                [nzSpan]="24"
360
-                [nzFor]="config.key"
361
-                class="label"
362
-                [nzRequired]="config.required"
363
-                >{{config.desc}}</nz-form-label
364
-              >
365
-              <nz-form-control
366
-                [nzSpan]="24"
367
-                [nzErrorTip]="'请选择!'"
368
-              >
369
-                <nz-radio-group
370
-                  [formControlName]="config.key"
371
-                >
372
-                  <label nz-radio nzValue="1">是</label>
373
-                  <label nz-radio nzValue="0">否</label>
374
-                </nz-radio-group>
375
-              </nz-form-control>
376
-            </ng-container>
377 337
             <ng-container *ngSwitchCase="'allowNucleicAcidPrinting'">
378 338
               <nz-form-label
379 339
                 [nzSpan]="24"

+ 19 - 273
src/app/views/hushijiandan/hushijiandan.component.html

@@ -425,7 +425,7 @@
425 425
             </div>
426 426
           </div>
427 427
           <div class="userInfo">
428
-            <div class="wel">欢迎您:</div>
428
+            <div class="wel">欢迎您<strong>{{tool.getCurrentUserInfo().name}}</strong>:</div>
429 429
             <div class="user">
430 430
               <img src="../../assets/images/icon_keshi.png" alt="" />
431 431
               <span *ngIf="deptDisplay" [title]="deptDisplay == 2 ? loginUser.dept.deptalias : loginUser.dept.dept">{{deptDisplay == 2 ? loginUser.dept.deptalias : loginUser.dept.dept}}</span>
@@ -883,9 +883,6 @@
883 883
                         <div *ngIf="coopBtns.historicalMedicineListInquiry && currentDept.typeValue != 'outpatientService'" nz-col nzSpan="3" [ngClass]="{txtC: true, cur: true, checked: checkedTableType == 'historyDrugsbag'}" (click)="checkTable('historyDrugsbag')">
884 884
                           <div class="text">历史药单查询</div>
885 885
                         </div>
886
-                        <div *ngIf="coopBtns.quickReportForRepair && isShowBx" nz-col nzSpan="3" [ngClass]="{txtC: true, cur: true, checked: checkedTableType == 'kjbx'}" (click)="checkTable('kjbx')">
887
-                          <div class="text">快捷报修</div>
888
-                        </div>
889 886
                         <div *ngIf="coopBtns.repairList && isShowBx" nz-col nzSpan="3" [ngClass]="{txtC: true, cur: true, checked: checkedTableType == 'bxlb'}" (click)="checkTable('bxlb')">
890 887
                           <div class="text">
891 888
                             报修列表<strong class="red">&nbsp;({{processing}})</strong>
@@ -1429,56 +1426,21 @@
1429 1426
                               <div class="modalBody_right">
1430 1427
                                 <div class="modalBody_right_head">
1431 1428
                                   <div class="smallTab">
1432
-                                    <div
1433
-                                      class="s_tab"
1434
-                                      *ngFor="let stab of smallTabs"
1435
-                                      (click)="changeSmallTab(stab.id)"
1436
-                                      [ngClass]="{
1437
-                                        active: smallTabId == stab.id
1438
-                                      }"
1439
-                                    >
1429
+                                    <div class="s_tab" *ngFor="let stab of smallTabs" (click)="changeSmallTab(stab.id)" [ngClass]="{ active: smallTabId == stab.id }">
1440 1430
                                       {{ stab.name }}
1441 1431
                                     </div>
1442 1432
                                   </div>
1443 1433
                                   <span>{{ logTime }}秒后自动刷新</span>
1444 1434
                                 </div>
1445
-                                <overlay-scrollbars
1446
-                                  class="modalBody_right_box"
1447
-                                  #osComponentRef9
1448
-                                  style="height: 100%"
1449
-                                  *ngIf="
1450
-                                    (smallTabId == 1 &&
1451
-                                      !rLoading &&
1452
-                                      listDeptOrderRecords.length) ||
1453
-                                    smallTabId == 2
1454
-                                  "
1455
-                                >
1435
+                                <overlay-scrollbars class="modalBody_right_box" #osComponentRef9 style="height: 100%" *ngIf="(smallTabId == 1 && !rLoading && listDeptOrderRecords.length) || smallTabId == 2">
1456 1436
                                   <div class="modalBody_right_box">
1457
-                                    <ng-container
1458
-                                      *ngIf="smallTabId == 1; else elseSmall"
1459
-                                    >
1460
-                                      <div
1461
-                                        class="modalBody_right_list"
1462
-                                        *ngFor="let item of listDeptOrderRecords"
1463
-                                        [innerHTML]="item.msg | htmlTransform"
1464
-                                      ></div>
1437
+                                    <ng-container *ngIf="smallTabId == 1; else elseSmall">
1438
+                                      <div class="modalBody_right_list" *ngFor="let item of listDeptOrderRecords" [innerHTML]="item.msg | htmlTransform"></div>
1465 1439
                                     </ng-container>
1466 1440
                                     <ng-template #elseSmall>
1467
-                                      <nz-table
1468
-                                        class="bxFlex bxTable"
1469
-                                        [nzData]="quickBxlbList"
1470
-                                        nzSize="small"
1471
-                                        [nzShowPagination]="false"
1472
-                                        [nzLoading]="quickBxlbLoading"
1473
-                                      >
1441
+                                      <nz-table class="bxFlex bxTable" [nzData]="quickBxlbList" nzSize="small" [nzShowPagination]="false" [nzLoading]="quickBxlbLoading">
1474 1442
                                         <tbody>
1475
-                                          <tr
1476
-                                            (click)="showBxModal(data)"
1477
-                                            *ngFor="
1478
-                                              let data of quickBxlbList;
1479
-                                              let i = index
1480
-                                            "
1481
-                                          >
1443
+                                          <tr (click)="showBxModal(data)" *ngFor="let data of quickBxlbList;let i = index">
1482 1444
                                             <td>{{ data.content || "无" }}</td>
1483 1445
                                           </tr>
1484 1446
                                           <!-- <tr (click)="checkTable('kjbx')">
@@ -1491,24 +1453,11 @@
1491 1453
                                     </ng-template>
1492 1454
                                   </div>
1493 1455
                                 </overlay-scrollbars>
1494
-                                <div
1495
-                                  class="modalBody_left nLoading w100"
1496
-                                  *ngIf="smallTabId == 1 && rLoading"
1497
-                                >
1498
-                                  <img
1499
-                                    src="../../../assets/images/loading.gif"
1500
-                                    alt=""
1501
-                                  />
1456
+                                <div class="modalBody_left nLoading w100" *ngIf="smallTabId == 1 && rLoading">
1457
+                                  <img src="../../../assets/images/loading.gif" alt="" />
1502 1458
                                   <div>加载中...</div>
1503 1459
                                 </div>
1504
-                                <div
1505
-                                  class="modalBody_left noData w100"
1506
-                                  *ngIf="
1507
-                                    smallTabId == 1 &&
1508
-                                    !rLoading &&
1509
-                                    !listDeptOrderRecords.length
1510
-                                  "
1511
-                                >
1460
+                                <div class="modalBody_left noData w100" *ngIf="smallTabId == 1 && !rLoading && !listDeptOrderRecords.length">
1512 1461
                                   暂无数据
1513 1462
                                 </div>
1514 1463
                               </div>
@@ -1962,194 +1911,6 @@
1962 1911
                   </div>
1963 1912
                 </div>
1964 1913
               </div>
1965
-              <!-- 快捷报修 -->
1966
-              <div
1967
-                *ngIf="checkedTableType == 'kjbx' && isShowBx && coopBtns.quickReportForRepair"
1968
-                style="flex: 1; height: 100%; display: flex"
1969
-              >
1970
-                <div class="otherBox">
1971
-                  <div class="otherBoxInner">
1972
-                    <!-- 故障现象查询 -->
1973
-                    <div class="otherBox-nav" style="width: 30%">
1974
-                      <div class="otherBox-nav__head">
1975
-                        <input
1976
-                          nz-input
1977
-                          placeholder="请输入关键字"
1978
-                          [(ngModel)]="incidentSearch"
1979
-                          (ngModelChange)="incidentSearchChange()"
1980
-                        />
1981
-                      </div>
1982
-                      <overlay-scrollbars
1983
-                        #osComponentRef10
1984
-                        class="otherBox-nav__main"
1985
-                        [ngStyle]="{ height: '100%' }"
1986
-                      >
1987
-                        <div
1988
-                          class="otherBox-nav__mainInner"
1989
-                          *ngIf="!iLoading && incidentList.length > 0"
1990
-                        >
1991
-                          <div class="w100">
1992
-                            <div
1993
-                              class="otherBox-nav__mainItem"
1994
-                              *ngFor="let item of incidentList"
1995
-                              (click)="incidentClick(item)"
1996
-                              [ngClass]="{
1997
-                                active: selectIncidentId == item.id
1998
-                              }"
1999
-                              [title]="item.mutiCategory"
2000
-                            >
2001
-                              {{ item.mutiCategory }}
2002
-                            </div>
2003
-                          </div>
2004
-                        </div>
2005
-                        <div
2006
-                          class="otherBox-nav__mainInner noData"
2007
-                          *ngIf="!iLoading && incidentList.length == 0"
2008
-                        >
2009
-                          暂无数据
2010
-                        </div>
2011
-                        <div
2012
-                          class="otherBox-nav__mainInner oLoading"
2013
-                          *ngIf="iLoading"
2014
-                        >
2015
-                          <img
2016
-                            src="../../../assets/images/loading.gif"
2017
-                            alt=""
2018
-                          />
2019
-                          <div>加载中...</div>
2020
-                        </div>
2021
-                      </overlay-scrollbars>
2022
-                    </div>
2023
-                    <form
2024
-                      nz-form
2025
-                      [formGroup]="bxForm"
2026
-                      (ngSubmit)="submitBxForm()"
2027
-                      class="bxForm bxFlex"
2028
-                    >
2029
-                      <!-- <nz-form-item>
2030
-                        <nz-form-label [nzSpan]="8" nzRequired nzFor="name"
2031
-                          >联系人</nz-form-label
2032
-                        >
2033
-                        <nz-form-control [nzSpan]="12" nzErrorTip="请填写联系人">
2034
-                          <input
2035
-                            type="text"
2036
-                            nz-input
2037
-                            formControlName="name"
2038
-                            placeholder="请填写联系人"
2039
-                          />
2040
-                        </nz-form-control>
2041
-                      </nz-form-item>
2042
-                      <nz-form-item>
2043
-                        <nz-form-label [nzSpan]="8" nzRequired nzFor="phone"
2044
-                          >联系人电话</nz-form-label
2045
-                        >
2046
-                        <nz-form-control
2047
-                          [nzSpan]="12"
2048
-                          nzErrorTip="请填写联系人电话"
2049
-                        >
2050
-                          <input
2051
-                            type="text"
2052
-                            nz-input
2053
-                            formControlName="phone"
2054
-                            placeholder="请填写联系人电话"
2055
-                          />
2056
-                        </nz-form-control>
2057
-                      </nz-form-item>
2058
-                      <nz-form-item>
2059
-                        <nz-form-label [nzSpan]="8" nzFor="hospital" nzRequired
2060
-                          >所属院区</nz-form-label
2061
-                        >
2062
-                        <nz-form-control [nzSpan]="12" nzErrorTip="请选择所属院区!">
2063
-                          <nz-select
2064
-                            formControlName="hospital"
2065
-                            nzPlaceHolder="请选择所属院区"
2066
-                            (ngModelChange)="getPlace($event)"
2067
-                          >
2068
-                            <nz-option
2069
-                              [nzValue]="area.id"
2070
-                              [nzLabel]="area.area"
2071
-                              *ngFor="let area of areas"
2072
-                            ></nz-option>
2073
-                          </nz-select>
2074
-                        </nz-form-control>
2075
-                      </nz-form-item>
2076
-                      <nz-form-item>
2077
-                        <nz-form-label [nzSpan]="8" nzFor="building" nzRequired
2078
-                          >楼栋</nz-form-label
2079
-                        >
2080
-                        <nz-form-control [nzSpan]="12" nzErrorTip="请选择楼栋!">
2081
-                          <nz-select
2082
-                            formControlName="building"
2083
-                            nzPlaceHolder="请选择楼栋"
2084
-                          >
2085
-                            <nz-option
2086
-                              [nzValue]="place.id"
2087
-                              [nzLabel]="place.place"
2088
-                              *ngFor="let place of places"
2089
-                            >
2090
-                            </nz-option>
2091
-                          </nz-select>
2092
-                        </nz-form-control>
2093
-                      </nz-form-item>
2094
-                      <nz-form-item>
2095
-                        <nz-form-label [nzSpan]="8" nzRequired
2096
-                          >详细地址</nz-form-label
2097
-                        >
2098
-                        <nz-form-control [nzSpan]="12" nzErrorTip="请填写详细地址">
2099
-                          <textarea
2100
-                            formControlName="address"
2101
-                            nz-input
2102
-                            rows="2"
2103
-                            placeholder="请填写详细地址"
2104
-                          ></textarea>
2105
-                        </nz-form-control>
2106
-                      </nz-form-item> -->
2107
-                      <nz-form-item>
2108
-                        <nz-form-label [nzSpan]="8" nzRequired
2109
-                          >报修内容</nz-form-label
2110
-                        >
2111
-                        <nz-form-control
2112
-                          [nzSpan]="12"
2113
-                          nzErrorTip="请填写报修内容"
2114
-                        >
2115
-                          <textarea
2116
-                            formControlName="content"
2117
-                            nz-input
2118
-                            rows="2"
2119
-                            placeholder="请填写报修内容"
2120
-                          ></textarea>
2121
-                        </nz-form-control>
2122
-                      </nz-form-item>
2123
-                      <nz-form-item>
2124
-                        <nz-form-label
2125
-                          [nzSpan]="8"
2126
-                          style="visibility: hidden"
2127
-                        ></nz-form-label>
2128
-                        <nz-form-control [nzSpan]="12">
2129
-                          <button
2130
-                            nz-button
2131
-                            nzType="primary"
2132
-                            [nzLoading]="bxLoading"
2133
-                          >
2134
-                            提交
2135
-                          </button>
2136
-                        </nz-form-control>
2137
-                      </nz-form-item>
2138
-                    </form>
2139
-                  </div>
2140
-                </div>
2141
-                <!-- <nz-table class="bxFlex bxTable" [nzData]="quickBxlbList" nzSize="small" [nzShowPagination]="false"
2142
-                  [nzLoading]="quickBxlbLoading">
2143
-                  <tbody>
2144
-                    <tr (click)="showBxModal(data,'您的报修为“'+data.content+'” 是否确认报修?')" *ngFor="
2145
-                            let data of quickBxlbList;
2146
-                            let i = index
2147
-                          ">
2148
-                      <td>{{ data.content||'无' }}</td>
2149
-                    </tr>
2150
-                  </tbody>
2151
-                </nz-table> -->
2152
-              </div>
2153 1914
               <!-- 报修列表 -->
2154 1915
               <div
2155 1916
                 *ngIf="checkedTableType == 'bxlb' && isShowBx && coopBtns.repairList"
@@ -2173,7 +1934,7 @@
2173 1934
                       >
2174 1935
                         <nz-option
2175 1936
                           [nzLabel]="data.name"
2176
-                          [nzValue]="data.id"
1937
+                          [nzValue]="data.value"
2177 1938
                           *ngFor="let data of incidentStateList"
2178 1939
                         ></nz-option>
2179 1940
                       </nz-select>
@@ -2222,7 +1983,7 @@
2222 1983
                           <td>
2223 1984
                             <!-- <button (click)="viewBx(data)">查看</button> -->
2224 1985
                             <button class="btn1 mr8 mb8 mt8" (click)="detailBx(data)">查看</button>
2225
-                            <button class="btn1 mr8 mb8 mt8" (click)="showAppraiseBx(data.id)" *ngIf="data.state && data.state.value == 'close' && !data.wxdegree">评价</button>
1986
+                            <button class="btn1 mr8 mb8 mt8" (click)="showAppraiseBx(data)" *ngIf="data.state && data.state.value == 'close' && !data.wxdegree">评价</button>
2226 1987
                           </td>
2227 1988
                         </tr>
2228 1989
                       </tbody>
@@ -3792,16 +3553,9 @@
3792 3553
   </div>
3793 3554
 </div>
3794 3555
 <!-- 是否确认报修模态框 -->
3795
-<div
3796
-  class="commonModal display_flex justify-content_flex-center align-items_center"
3797
-  *ngIf="bxModal"
3798
->
3556
+<div class="commonModal display_flex justify-content_flex-center align-items_center" *ngIf="bxModal">
3799 3557
   <div class="modalBody">
3800
-    <div class="title">
3801
-      一键报修<i
3802
-        class="icon_transport transport-guanbi"
3803
-        (click)="hideBxModal()"
3804
-      ></i>
3558
+    <div class="title">一键报修<i class="icon_transport transport-guanbi" (click)="hideBxModal()"></i>
3805 3559
     </div>
3806 3560
     <overlay-scrollbars #osComponentRef5 class="content">
3807 3561
       <form nz-form [formGroup]="validateBxForm" class="bxFormAdd" (ngSubmit)="confirmBx()">
@@ -3834,7 +3588,7 @@
3834 3588
             <nz-select [nzDropdownMatchSelectWidth]="false" style="width:120px;" class="mr8" type="building"
3835 3589
               nzShowSearch formControlName="building" nzPlaceHolder="请选择楼栋"
3836 3590
               (ngModelChange)="changeBuilding($event)">
3837
-              <nz-option [nzLabel]="data.area" [nzValue]="data.id" *ngFor="let data of buildings">
3591
+              <nz-option [nzLabel]="data.buildingName" [nzValue]="data.id" *ngFor="let data of buildings">
3838 3592
               </nz-option>
3839 3593
             </nz-select>
3840 3594
           </nz-form-control>
@@ -3842,7 +3596,7 @@
3842 3596
           <nz-form-control style="display: inline-block;">
3843 3597
             <nz-select [nzDropdownMatchSelectWidth]="false" style="width:120px;" class="mr8" type="floor" nzShowSearch
3844 3598
              formControlName="floor" nzPlaceHolder="请选择楼层" [nzLoading]="floorLoading">
3845
-              <nz-option [nzLabel]="data.place" [nzValue]="data.id" *ngFor="let data of floors"></nz-option>
3599
+              <nz-option [nzLabel]="data.floorName" [nzValue]="data.id" *ngFor="let data of floors"></nz-option>
3846 3600
             </nz-select>
3847 3601
           </nz-form-control>
3848 3602
           <nz-form-label [nzSm]="4" [nzXs]="4" nzRequired nzFor="officeAddress" hidden></nz-form-label>
@@ -3855,19 +3609,10 @@
3855 3609
       </form>
3856 3610
     </overlay-scrollbars>
3857 3611
     <div class="display_flex justify-content_flex-center">
3858
-      <button
3859
-        nz-button
3860
-        nzType="primary"
3861
-        (click)="confirmBx()"
3862
-      >
3612
+      <button nz-button nzType="primary" (click)="confirmBx()">
3863 3613
         确认
3864 3614
       </button>
3865
-      <button
3866
-        class="btn cancel"
3867
-        nz-button
3868
-        nzType="default"
3869
-        (click)="hideBxModal()"
3870
-      >
3615
+      <button class="btn cancel" nz-button nzType="default" (click)="hideBxModal()">
3871 3616
         取消
3872 3617
       </button>
3873 3618
     </div>
@@ -3950,6 +3695,7 @@
3950 3695
   </div>
3951 3696
   <div class="dialog-operate">
3952 3697
     <strong class="dialog-refresh" (click)="showNurseCode()">刷新</strong>
3698
+    <strong>{{tool.getCurrentUserInfo().name}}</strong>
3953 3699
     <span>{{ refreshQRCodeTime }}s</span>
3954 3700
   </div>
3955 3701
 </div>

+ 2 - 0
src/app/views/hushijiandan/hushijiandan.component.less

@@ -168,6 +168,8 @@
168 168
         right: 0;
169 169
         bottom: 0;
170 170
         left: 0;
171
+        display: flex;
172
+        align-items: center;
171 173
 
172 174
         img {
173 175
           width: 100%;

+ 122 - 175
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -115,7 +115,6 @@ export class HushijiandanComponent implements OnInit {
115 115
   searchAccountSubject = new Subject(); //查工号防抖
116 116
   searchTabInpSubject = new Subject(); //左侧查患者信息和检查信息防抖
117 117
   otherSearchChangeSubject = new Subject(); //其他建单搜索防抖
118
-  incidentSearchChangeSubject = new Subject(); //故障现象搜索防抖
119 118
   isYyInspect = false; //需要预约检查
120 119
   inspectAndPatientTransportConfig:any = {timeMod: 30};
121 120
   constructor(
@@ -199,11 +198,6 @@ export class HushijiandanComponent implements OnInit {
199 198
     this.otherSearchChangeSubject.pipe(debounceTime(500)).subscribe((v) => {
200 199
       this.getDeptTaskType(v);
201 200
     });
202
-    this.incidentSearchChangeSubject
203
-      .pipe(debounceTime(500))
204
-      .subscribe((v: string) => {
205
-        this.getIncidentcategory(v);
206
-      });
207 201
 
208 202
     this.getTodayNum();
209 203
     this.initLogin();
@@ -297,9 +291,6 @@ export class HushijiandanComponent implements OnInit {
297 291
         case "historicalMedicineListInquiry":
298 292
           coopBtns.historicalMedicineListInquiry = true; //历史药单查询
299 293
           break;
300
-        case "quickReportForRepair":
301
-          coopBtns.quickReportForRepair = true; //快捷报修
302
-          break;
303 294
         case "repairList":
304 295
           coopBtns.repairList = true; //报修列表
305 296
           break;
@@ -501,32 +492,30 @@ export class HushijiandanComponent implements OnInit {
501 492
         if (result.status == 200) {
502 493
           this.isShowBx = result.list.find(v => v.key == 'hos_itsmIncident').value == 1;
503 494
           this.isAssign = result.list.find(v => v.key == 'nurseSendOrder').value == 1;
504
-          if (this.isShowBx && (this.coopBtns.repairList || this.coopBtns.quickReportForRepair) && !this.checkedTableType) {
495
+          if (this.isShowBx && this.coopBtns.repairList && !this.checkedTableType) {
505 496
             // 初始化默认显示第一个
506
-            if(this.tabPermission.length){
507
-              this.checkedTableType = (this.tabPermission[0] && this.tabPermission[0].system) ? 'other' : this.tabPermission[0].id;
508
-            }else if(this.coopBtns.suggestionBox){
509
-              this.checkedTableType = 'advice';
510
-              this.checkTable(this.checkedTableType);
511
-            }else if(this.coopBtns.surgery){
512
-              this.checkedTableType = 'surgery';
513
-              this.checkTable(this.checkedTableType);
514
-            }else if(this.coopBtns.outpatientHelpAppointment){
515
-              this.checkedTableType = 'outpatientHelpAppointment';
516
-              this.checkTable(this.checkedTableType);
517
-            }else if(this.coopBtns.inquiryOfHistoricalSpecimens){
518
-              this.checkedTableType = 'historySpecimen';
519
-              this.checkTable(this.checkedTableType);
520
-            }else if(this.coopBtns.historicalMedicineListInquiry){
521
-              this.checkedTableType = 'historyDrugsbag';
522
-              this.checkTable(this.checkedTableType);
523
-            }else if(this.coopBtns.quickReportForRepair && this.isShowBx){
524
-              this.checkedTableType = 'kjbx';
525
-              this.checkTable(this.checkedTableType);
526
-            }else if(this.coopBtns.repairList && this.isShowBx){
527
-              this.checkedTableType = 'bxlb';
528
-              this.checkTable(this.checkedTableType);
529
-            }
497
+            console.log(this.tabPermission)
498
+            // if(this.tabPermission.length){
499
+            //   this.checkedTableType = (this.tabPermission[0] && this.tabPermission[0].system) ? 'other' : this.tabPermission[0].id;
500
+            // }else if(this.coopBtns.suggestionBox){
501
+            //   this.checkedTableType = 'advice';
502
+            //   this.checkTable(this.checkedTableType);
503
+            // }else if(this.coopBtns.surgery){
504
+            //   this.checkedTableType = 'surgery';
505
+            //   this.checkTable(this.checkedTableType);
506
+            // }else if(this.coopBtns.outpatientHelpAppointment){
507
+            //   this.checkedTableType = 'outpatientHelpAppointment';
508
+            //   this.checkTable(this.checkedTableType);
509
+            // }else if(this.coopBtns.inquiryOfHistoricalSpecimens){
510
+            //   this.checkedTableType = 'historySpecimen';
511
+            //   this.checkTable(this.checkedTableType);
512
+            // }else if(this.coopBtns.historicalMedicineListInquiry){
513
+            //   this.checkedTableType = 'historyDrugsbag';
514
+            //   this.checkTable(this.checkedTableType);
515
+            // }else if(this.coopBtns.repairList && this.isShowBx){
516
+            //   this.checkedTableType = 'bxlb';
517
+            //   this.checkTable(this.checkedTableType);
518
+            // }
530 519
             this.smallTabs = [
531 520
               { id: 1, name: "综合日志" },
532 521
               { id: 2, name: "一键报修" },
@@ -864,12 +853,6 @@ export class HushijiandanComponent implements OnInit {
864 853
   otherSearchChange() {
865 854
     this.otherSearchChangeSubject.next(this.otherSearch);
866 855
   }
867
-  //搜索
868
-  incidentSearch = ""; //搜索的关键词
869
-  incidentNum = 0;
870
-  incidentSearchChange() {
871
-    this.incidentSearchChangeSubject.next(this.incidentSearch);
872
-  }
873 856
   // 切换科室
874 857
   changeKs() {
875 858
     this.hsPromptModalShow = true;
@@ -1165,17 +1148,17 @@ export class HushijiandanComponent implements OnInit {
1165 1148
       contacts: [this.loginUser.name, [Validators.required]],
1166 1149
       contactsInformation: [this.loginUser.phone, [Validators.required]],
1167 1150
     });
1168
-    this.getDeptByCode(this.currentDept.pcode);
1151
+    this.getDeptById(this.currentDept.id);
1169 1152
   }
1170
-  // 根据科室Code获取详情
1153
+  // 根据科室ID获取详情
1171 1154
   deptDto:any = {};
1172
-  getDeptByCode(code){
1155
+  getDeptById(id){
1173 1156
     this.mainService
1174
-      .fetchListBx("department", {
1157
+      .getFetchDataList("simple/data", "department", {
1175 1158
         idx: 0,
1176 1159
         sum: 1,
1177 1160
         department: {
1178
-          eqCode: code,
1161
+          id,
1179 1162
         }
1180 1163
       })
1181 1164
       .subscribe((data:any) => {
@@ -1184,13 +1167,13 @@ export class HushijiandanComponent implements OnInit {
1184 1167
         console.log(this.deptDto);
1185 1168
         this.changeHosp();
1186 1169
         // 回显楼栋
1187
-        if(this.deptDto.place){
1188
-          this.validateBxForm.controls.building.setValue(this.deptDto.place.area.id);
1170
+        if(this.deptDto.building){
1171
+          this.validateBxForm.controls.building.setValue(this.deptDto.building.id);
1189 1172
         }
1190 1173
 
1191 1174
         // 回显楼层
1192
-        if(this.deptDto.place){
1193
-          this.validateBxForm.controls.floor.setValue(this.deptDto.place.id);
1175
+        if(this.deptDto.floor){
1176
+          this.validateBxForm.controls.floor.setValue(this.deptDto.floor.id);
1194 1177
         }
1195 1178
       });
1196 1179
   }
@@ -1202,12 +1185,12 @@ export class HushijiandanComponent implements OnInit {
1202 1185
     let data = {
1203 1186
       idx: 0,
1204 1187
       sum: 9999,
1205
-      area: {
1206
-        branch: this.deptDto.branch,
1188
+      building: {
1189
+        hosId: this.deptDto.hospital.id,
1207 1190
       }
1208 1191
     };
1209 1192
     this.mainService
1210
-      .fetchListBx("area", data)
1193
+      .getFetchDataList("simple/data", "building", data)
1211 1194
       .subscribe((data:any) => {
1212 1195
         this.buildings = data.list || [];
1213 1196
         this.floors = [];
@@ -1230,13 +1213,13 @@ export class HushijiandanComponent implements OnInit {
1230 1213
     let data = {
1231 1214
       idx: 0,
1232 1215
       sum: 9999,
1233
-      place: {
1234
-        area: { id: buildingId },
1216
+      floor: {
1217
+        buildId: buildingId,
1235 1218
       }
1236 1219
     };
1237 1220
     this.floorLoading = true;
1238 1221
     this.mainService
1239
-      .fetchListBx("place", data)
1222
+      .getFetchDataList("simple/data", "floor", data)
1240 1223
       .subscribe((data:any) => {
1241 1224
         this.floorLoading = false;
1242 1225
         this.message.remove(this.maskFlag);
@@ -1286,11 +1269,9 @@ export class HushijiandanComponent implements OnInit {
1286 1269
     }).messageId;
1287 1270
     if(type == 1){
1288 1271
       this.btnLoading = true;
1289
-      let loginUser:any = {
1290
-        account: this.loginUser.account,
1291
-      };
1292
-      if(this.deptDto.branch){
1293
-        loginUser.branch = { id: this.deptDto.branch };
1272
+      let loginUser:any = cloneDeep(this.loginUser);
1273
+      if(this.deptDto.hospital){
1274
+        loginUser.hospital = { id: this.deptDto.hospital.id };
1294 1275
       }
1295 1276
       if(this.deptDto){
1296 1277
         loginUser.dept = {id: this.deptDto.id};
@@ -1298,18 +1279,18 @@ export class HushijiandanComponent implements OnInit {
1298 1279
       if(this.validateBxForm.value.contacts){
1299 1280
         loginUser.name = this.validateBxForm.value.contacts;
1300 1281
       }
1301
-      if(this.validateBxForm.value.floor){
1302
-        loginUser.place = {id: this.validateBxForm.value.floor, area: { id: this.validateBxForm.value.building }};
1303
-      }
1304
-      if(this.validateBxForm.value.officeAddress){
1305
-        loginUser.houseNumber = this.validateBxForm.value.officeAddress;
1306
-      }
1282
+      // if(this.validateBxForm.value.floor){
1283
+      //   loginUser.place = {id: this.validateBxForm.value.floor, area: { id: this.validateBxForm.value.building }};
1284
+      // }
1285
+      // if(this.validateBxForm.value.officeAddress){
1286
+      //   loginUser.houseNumber = this.validateBxForm.value.officeAddress;
1287
+      // }
1307 1288
       if(this.validateBxForm.value.contactsInformation){
1308 1289
         loginUser.phone = this.validateBxForm.value.contactsInformation;
1309 1290
       }
1310
-      let result:any = await this.mainService.saveUser({loginUser}).toPromise();
1291
+      let result:any = await this.mainService.coopData("updData", "user", { user: loginUser }).toPromise();
1311 1292
       console.log(result);
1312
-      if(result.state != 200){
1293
+      if(result.status != 200){
1313 1294
         this.hideReqModal();
1314 1295
         this.btnLoading = false;
1315 1296
         this.message.remove(this.maskFlag);
@@ -1320,38 +1301,34 @@ export class HushijiandanComponent implements OnInit {
1320 1301
     }else{
1321 1302
       this.cancenlLoading = true;
1322 1303
     }
1323
-    this.mainService.getDictionaryByITSM({key: "incident_source", type: "list"}).subscribe((source:any) => {
1324
-      let incidentSourceList = source.data || [];
1304
+    this.mainService.getDictionary("list", "incident_source").subscribe((source:any) => {
1305
+      let incidentSourceList = source || [];
1325 1306
       let im = incidentSourceList.find(v => v.value === 'im');
1326
-      this.mainService.wxbx({}).subscribe((result) => {
1327
-        if ((result as any).status == 200) {
1328
-          let bxcode = (result as any).data; //生成微信报修号
1307
+      this.mainService.getDictionary("list", "repair_incident_type").subscribe((result) => {
1308
+        let repairIncidentTypeList = result || [];
1309
+        let repairIncidentType = repairIncidentTypeList.find(v => v.value === 'dept');
1310
+        if (repairIncidentType) {
1329 1311
           let postData: any = {
1330 1312
             incident: {
1331
-              "incidentsign": bxcode,
1332
-              "deleteFlag": 0,
1333
-              "department": { id: this.deptDto.id },
1334
-              "contactsInformation": this.validateBxForm.value.contactsInformation,
1335
-              "contacts": this.validateBxForm.value.contacts,
1336
-              "branch": this.deptDto.branch,
1337
-              "area": { id: this.validateBxForm.value.building },
1338
-              "place": { id: this.validateBxForm.value.floor },
1339
-              "houseNumber": this.validateBxForm.value.officeAddress,
1340
-              "source": im,
1341
-              "description": this.validateBxForm.value.description,
1342
-              "repairType": 2,
1343
-              "requester": this.loginUser,
1344
-              "acceptUser": this.loginUser,
1313
+              repairIncidentType,
1314
+              place: { id: this.deptDto.floor.id },
1315
+              department: { id: this.deptDto.id},
1316
+              description: this.validateBxForm.value.description,
1317
+              houseNumber: this.validateBxForm.value.officeAddress,
1318
+              contacts: this.validateBxForm.value.contacts,
1319
+              contactsInformation: this.validateBxForm.value.contactsInformation,
1320
+              hosId: this.deptDto.hospital.id,
1321
+              source: im,
1322
+              fromWx: true,
1323
+              requester: this.loginUser,
1324
+              acceptUser: this.loginUser,
1325
+              deleteFlag: 0,
1345 1326
             },
1346
-            loginUser: {
1347
-              account: this.loginUser.account,
1348
-              id: this.loginUser.id,
1349
-            }
1350 1327
           };
1351 1328
           if (this.coopBx.category) {
1352
-            postData.incident.category = this.coopBx.category;
1329
+            postData.incident.category = this.coopBx.categoryDTO;
1353 1330
           }
1354
-          this.mainService.addWxIncident(postData).subscribe((res) => {
1331
+          this.mainService.flowPost("incident/task/request", postData).subscribe((res) => {
1355 1332
             this.btnLoading = false;
1356 1333
             this.cancenlLoading = false;
1357 1334
             this.message.remove(this.maskFlag);
@@ -1367,7 +1344,7 @@ export class HushijiandanComponent implements OnInit {
1367 1344
           });
1368 1345
         } else {
1369 1346
           this.btnLoading = false;
1370
-          this.showPromptModal("提交", false, "");
1347
+          this.showPromptModal("提交", false, "缺少【科室内报修】数据字典");
1371 1348
         }
1372 1349
       });
1373 1350
     })
@@ -1376,38 +1353,13 @@ export class HushijiandanComponent implements OnInit {
1376 1353
   // 获取星级
1377 1354
   degrees = [];
1378 1355
   getDegrees() {
1379
-    let postData = { type: "list", key: "incident_degree" };
1380 1356
     this.iLoading = true;
1381
-    this.mainService.getDictionaryByITSM(postData).subscribe((data: any) => {
1357
+    this.mainService.getDictionary("list", "incident_degree").subscribe((data: any) => {
1382 1358
       this.iLoading = false;
1383
-      if (data.status == 200) {
1384
-        this.degrees = data.data || [];
1385
-      }
1359
+      this.degrees = data || [];
1386 1360
     });
1387 1361
   }
1388
-  // 获取故障现象(三级)
1389
-  incidentList = [];
1390 1362
   iLoading = false;
1391
-  getIncidentcategory(key = "") {
1392
-    let postData = {
1393
-      idx: 0,
1394
-      sum: 9999,
1395
-      incidentcategory: {
1396
-        category: key,
1397
-        selectType: "pinyin_qs",
1398
-        hierarchyQuery: "three",
1399
-      },
1400
-    };
1401
-    this.iLoading = true;
1402
-    this.mainService
1403
-      .fetchListBx("incidentcategory", postData)
1404
-      .subscribe((data: any) => {
1405
-        this.iLoading = false;
1406
-        if (data.status == 200) {
1407
-          this.incidentList = data.list || [];
1408
-        }
1409
-      });
1410
-  }
1411 1363
   // 获取当前登录人科室任务类型信息
1412 1364
   othersList: any = []; // 其他一键建单列表
1413 1365
   bbMsg: any = {}; //标本一键建单
@@ -1508,6 +1460,7 @@ export class HushijiandanComponent implements OnInit {
1508 1460
         }
1509 1461
         // 初始化默认显示第一个
1510 1462
         if(search === undefined && !this.checkedTableType){
1463
+          console.log(this.tabPermission)
1511 1464
           if(this.tabPermission.length){
1512 1465
             this.checkedTableType = (this.tabPermission[0] && this.tabPermission[0].system) ? 'other' : this.tabPermission[0].id;
1513 1466
           }else if(this.coopBtns.suggestionBox){
@@ -1525,9 +1478,6 @@ export class HushijiandanComponent implements OnInit {
1525 1478
           }else if(this.coopBtns.historicalMedicineListInquiry){
1526 1479
             this.checkedTableType = 'historyDrugsbag';
1527 1480
             this.checkTable(this.checkedTableType);
1528
-          }else if(this.coopBtns.quickReportForRepair && this.isShowBx){
1529
-            this.checkedTableType = 'kjbx';
1530
-            this.checkTable(this.checkedTableType);
1531 1481
           }else if(this.coopBtns.repairList && this.isShowBx){
1532 1482
             this.checkedTableType = 'bxlb';
1533 1483
             this.checkTable(this.checkedTableType);
@@ -3648,15 +3598,6 @@ export class HushijiandanComponent implements OnInit {
3648 3598
       this.getBxlb(this.bxlbPageIndex);
3649 3599
       // this.getIncidentState();
3650 3600
       this.getDegrees();
3651
-    } else if (type === "kjbx" && this.isShowBx && this.coopBtns.quickReportForRepair) {
3652
-      // this.getQuickBxlb();
3653
-      this.getIncidentcategory();
3654
-      // 获取报修的区域(所属院区)
3655
-      // this.getArea();
3656
-      // this.bxForm.controls.name.setValue(this.loginUser.name);
3657
-      // this.bxForm.controls.phone.setValue(this.loginUser.phone);
3658
-      // this.bxForm.controls.address.setValue(null);
3659
-      this.bxForm.controls.content.setValue(null);
3660 3601
     }
3661 3602
   }
3662 3603
   //提交报修
@@ -3894,7 +3835,15 @@ export class HushijiandanComponent implements OnInit {
3894 3835
   }
3895 3836
   // 获取事件状态
3896 3837
   incidentStateId = undefined;
3897
-  incidentStateList = [];
3838
+  incidentStateList = [
3839
+    {name: '全部', value: 0},
3840
+    {name: '待受理', value: 'accept,storage'},
3841
+    {name: '处理中', value: 'pending,handler,reassign'},
3842
+    {name: '待评价', value: 'close0', hasWxdegree: 0},
3843
+    {name: '已关闭', value: 'close1', hasWxdegree: 1},
3844
+    {name: '不受理', value: 'reject'},
3845
+    {name: '撤销', value: 'cancel'},
3846
+  ];
3898 3847
   // getIncidentState() {
3899 3848
   //   let postData = { type: "list", key: "wxincident_state" };
3900 3849
   //   this.iLoading = true;
@@ -3914,45 +3863,41 @@ export class HushijiandanComponent implements OnInit {
3914 3863
   bxlbParentSearchInp: string = ""; //患者信息搜索
3915 3864
   processing: number = 0; //处理中的数量
3916 3865
   bxlbLoading = false;
3866
+  repairIncidentTypeList = [];//科室报修或公共报修
3917 3867
   getBxlb(idx, isInitState = false) {
3918 3868
     // 获取事件状态
3919
-    let postData = { type: "list", key: "incident_status" };
3920 3869
     this.iLoading = true;
3921 3870
     this.bxlbLoading = true;
3922
-    this.mainService.getDictionaryByITSM(postData).subscribe((data: any) => {
3871
+    this.mainService.getDictionary('list', 'repair_incident_type').subscribe((data: any) => {
3923 3872
       this.iLoading = false;
3924
-      if (data.status == 200) {
3925
-        let incidentStateList = data.data || [];
3926
-        incidentStateList.unshift({id: 0, name: '全部', value: 0});
3927
-        this.incidentStateList = incidentStateList;
3928
-        if(isInitState){
3929
-          let valueObj2 = this.incidentStateList.find(v => v.value == 0);
3930
-          this.incidentStateId = valueObj2 ? valueObj2.id : undefined;
3931
-        }
3873
+      this.repairIncidentTypeList = data || [];
3874
+      if(isInitState){
3875
+        let valueObj2 = this.incidentStateList.find(v => v.value == 0);
3876
+        this.incidentStateId = valueObj2 ? valueObj2.value : undefined;
3877
+      }
3932 3878
 
3933
-        // 报修列表查询表格数据
3934
-        if (idx) {
3935
-          this.bxlbPageIndex = 1;
3936
-        }
3937
-        let current = JSON.parse(localStorage.getItem("user"));
3938
-        this.mainService
3939
-          .listWxIncident({
3940
-            idx: this.bxlbPageIndex - 1,
3941
-            sum: this.bxlbPageSize,
3942
-            incident: {
3943
-              // assignee: current.user.account,
3944
-              statusId: this.incidentStateId || undefined,
3945
-              department: { pcode: current.user.dept.pcode },
3946
-            }
3947
-          })
3948
-          .subscribe((data: any) => {
3949
-            this.bxlbLoading = false;
3950
-            this.bxlbList = data.list || [];
3951
-            this.bxlbListLength = data.totalNum || 0;
3952
-            this.processing = data.totalNum || 0;
3953
-          });
3879
+      // 报修列表查询表格数据
3880
+      if (idx) {
3881
+        this.bxlbPageIndex = 1;
3954 3882
       }
3955
-    });
3883
+      let current = JSON.parse(localStorage.getItem("user"));
3884
+      this.mainService
3885
+        .getFetchDataList("simple/data", "incident", {
3886
+          idx: this.bxlbPageIndex - 1,
3887
+          sum: this.bxlbPageSize,
3888
+          incident: {
3889
+            repairIncidentType: { id: this.repairIncidentTypeList.find(v => v.value === 'dept').id },
3890
+            statesValues: this.incidentStateId || undefined,
3891
+            department: { id: current.user.dept.id },
3892
+          }
3893
+        })
3894
+        .subscribe((data: any) => {
3895
+          this.bxlbLoading = false;
3896
+          this.bxlbList = data.list || [];
3897
+          this.bxlbListLength = data.totalNum || 0;
3898
+          this.processing = data.totalNum || 0;
3899
+        });
3900
+    })
3956 3901
   }
3957 3902
 
3958 3903
   //快速报修列表
@@ -3961,7 +3906,7 @@ export class HushijiandanComponent implements OnInit {
3961 3906
   getQuickBxlb() {
3962 3907
     this.quickBxlbLoading = true;
3963 3908
     this.mainService
3964
-      .fetchListBx("incidentCategoryContent", { idx: 0, sum: 10 })
3909
+      .getFetchDataList("simple/data", "incidentCategoryContent", { idx: 0, sum: 10 })
3965 3910
       .subscribe((data: any) => {
3966 3911
         this.quickBxlbLoading = false;
3967 3912
         if (data.status == 200) {
@@ -4117,7 +4062,7 @@ export class HushijiandanComponent implements OnInit {
4117 4062
   reqModal: boolean = false;
4118 4063
   extraData:any = {};
4119 4064
   showReqModal() {
4120
-    this.extraData.place = this.floors.find(v => v.id == this.validateBxForm.value.floor);
4065
+    this.extraData.floor = this.floors.find(v => v.id == this.validateBxForm.value.floor);
4121 4066
     // this.reqModal = true;
4122 4067
     this.confirmBxNext(0);
4123 4068
   }
@@ -4331,9 +4276,9 @@ export class HushijiandanComponent implements OnInit {
4331 4276
   appraiseModalBx: boolean = false;
4332 4277
   starNumBx: number = 5; //评价星
4333 4278
   appraiseContentBx: string = ""; //评级
4334
-  appraiseIdBx: number;
4335
-  showAppraiseBx(id) {
4336
-    this.appraiseIdBx = id;
4279
+  appraiseDataBx: any;
4280
+  showAppraiseBx(data) {
4281
+    this.appraiseDataBx = data;
4337 4282
     this.appraiseModalBx = true;
4338 4283
     this.starNumBx = 5;
4339 4284
     this.appraiseContentBx = "";
@@ -4345,12 +4290,14 @@ export class HushijiandanComponent implements OnInit {
4345 4290
     this.btnLoading = true;
4346 4291
     let id = this.degrees.find(v=>v.value == this.starNumBx).id;
4347 4292
     let postData = {
4348
-      degree: id,
4349
-      degreeRemark: this.appraiseContentBx,
4350
-      id: this.appraiseIdBx,
4293
+      incident: {
4294
+        ...this.appraiseDataBx,
4295
+        wxdegree: { id },
4296
+        wxdegreeremark: this.appraiseContentBx,
4297
+      }
4351 4298
     };
4352 4299
     this.mainService
4353
-      .degree(postData)
4300
+      .flowPost("incident/task/resolve", postData)
4354 4301
       .subscribe((data:any) => {
4355 4302
         this.hideAppraiseBx();
4356 4303
         if (data.state == 200) {

+ 4 - 0
src/app/views/incident-config/incident-config.component.html

@@ -36,6 +36,10 @@
36 36
   <ng-container *ngIf="activeTagLink === 'incidentConfigHospital'">
37 37
     <app-configuration-hospital></app-configuration-hospital>
38 38
   </ng-container>
39
+  <!-- 常见故障 -->
40
+	<ng-container *ngIf="activeTagLink === 'incidentConfigCommonFaults'">
41
+	  <app-configuration-commonFaults></app-configuration-commonFaults>
42
+	</ng-container>
39 43
 </div>
40 44
 
41 45
 

+ 6 - 4
src/app/views/incident-config/incident-config.component.ts

@@ -36,10 +36,12 @@ export class IncidentConfigComponent implements OnInit, AfterViewInit {
36 36
   ngOnInit(): void {}
37 37
 
38 38
   ngAfterViewInit(){
39
-    let menus = JSON.parse(localStorage.getItem("menu"));
40
-    let incidentConfig = menus.find(item => item.link == 'incidentConfig');
41
-    this.tagList = incidentConfig ? (incidentConfig.childrens || []) : [];
42
-    this.tagList.length && this.clickTag(this.tagList[0]);
39
+    setTimeout(() => {
40
+      let menus = JSON.parse(localStorage.getItem("menu"));
41
+      let incidentConfig = menus.find(item => item.link == 'incidentConfig');
42
+      this.tagList = incidentConfig ? (incidentConfig.childrens || []) : [];
43
+      this.tagList.length && this.clickTag(this.tagList[0]);
44
+    }, 0)
43 45
   }
44 46
 
45 47
   // 点击tab

+ 2 - 0
src/app/views/incident-config/incident-config.module.ts

@@ -11,6 +11,7 @@ import { ConfigurationDeptUserComponent } from 'src/app/components/configuration
11 11
 import { ConfigurationMessageComponent } from 'src/app/components/configurationCenter/configuration-message/configuration-message.component';
12 12
 import { ConfigurationHospitalComponent } from 'src/app/components/configurationCenter/configuration-hospital/configuration-hospital.component';
13 13
 import { ConfigurationDictionaryModule } from 'src/app/components/configurationCenter/configuration-dictionary/configuration-dictionary.module';
14
+import { ConfigurationCommonFaultsComponent } from 'src/app/components/configurationCenter/configuration-commonFaults/configuration-commonFaults.component';
14 15
 
15 16
 
16 17
 @NgModule({
@@ -22,6 +23,7 @@ import { ConfigurationDictionaryModule } from 'src/app/components/configurationC
22 23
 		ConfigurationDeptUserComponent,
23 24
     ConfigurationMessageComponent,
24 25
     ConfigurationHospitalComponent,
26
+    ConfigurationCommonFaultsComponent,
25 27
   ],
26 28
   imports: [
27 29
     CommonModule,

+ 4 - 0
src/app/views/incident-management/incident-management.component.html

@@ -98,6 +98,7 @@
98 98
             <td>
99 99
               <div class="coop">
100 100
                 <span *ngIf="coopBtns.look" (click)="detail($event,data)">查看</span>
101
+                <span *ngIf="data.computedEditFlag" (click)="edit($event,data)">编辑</span>
101 102
                 <span *ngIf="data.computedVisitFlag" (click)="visit($event,data)">回访</span>
102 103
                 <span *ngIf="data.computedReceiveFlag" (click)="showDelModal($event, data,'您确认要接单吗?','接单','receive')">接单</span>
103 104
                 <span *ngIf="data.computedHandleFlag" (click)="handle($event,data)">处理</span>
@@ -194,3 +195,6 @@
194 195
 
195 196
 <!-- 详情 -->
196 197
 <app-incident-detail [id]="coopData.id" *ngIf="detailModalShow" (closeModelHs)="closeDetailModelOrder($event)" (confirmModelHs)="confirmDetailModelOrder($event)"></app-incident-detail>
198
+
199
+<!-- 编辑/新增 -->
200
+<app-incident-create [id]="coopData.id" *ngIf="editModalShow" (closeModelHs)="closeEditModelOrder($event)" (confirmModelHs)="confirmEditModelOrder($event)"></app-incident-create>

+ 24 - 0
src/app/views/incident-management/incident-management.component.ts

@@ -269,6 +269,11 @@ export class IncidentManagementComponent implements OnInit {
269 269
     return this.coopBtns.visit && data.state.value == 'close' && data.deleteFlag !== 1;
270 270
   }
271 271
 
272
+  // 是否显示编辑按钮
273
+  computedEdit(data){
274
+    return (data.state.value === 'pending' || data.state.value === 'reassign' || data.state.value === 'handler' || data.state.value === 'close') && this.coopBtns.edit && data.deleteFlag !== 1;
275
+  }
276
+
272 277
   // 表格数据
273 278
   loading1 = false;
274 279
   getList(isInit = false) {
@@ -320,6 +325,7 @@ export class IncidentManagementComponent implements OnInit {
320 325
         let list = result.list || [];
321 326
         list.forEach((item) => {
322 327
           item.endDeptsName = item.endDepts ? item.endDepts.map(v => v.dept).toString() : '';
328
+          item.computedEditFlag = this.computedEdit(item);
323 329
           item.computedVisitFlag = this.computedVisit(item);
324 330
           item.computedReceiveFlag = this.computedReceive(item);
325 331
           item.computedHandleFlag = this.computedHandle(item);
@@ -445,6 +451,24 @@ export class IncidentManagementComponent implements OnInit {
445 451
     this.getList(true);
446 452
   }
447 453
 
454
+  // 编辑-弹窗
455
+  editModalShow = false; //弹窗开关
456
+  edit(e, data) {
457
+    e.stopPropagation();
458
+    this.coopData = data;
459
+    this.editModalShow = true;
460
+  }
461
+  // 关闭弹窗
462
+  closeEditModelOrder(e) {
463
+    this.editModalShow = JSON.parse(e).show;
464
+  }
465
+  // 弹窗确定
466
+  confirmEditModelOrder(e){
467
+    console.log(e);
468
+    this.editModalShow = false;
469
+    this.getList(true);
470
+  }
471
+
448 472
   // 回访-弹窗
449 473
   visitModalShow = false; //弹窗开关
450 474
   visit(e, data) {

+ 2 - 0
src/app/views/incident-management/incident-management.module.ts

@@ -10,6 +10,7 @@ import { IncidentSetdutyModule } from 'src/app/components/incidentManagement/inc
10 10
 import { IncidentPostponeModule } from 'src/app/components/incidentManagement/incident-postpone/incident-postpone.module';
11 11
 import { IncidentVisitModule } from 'src/app/components/incidentManagement/incident-visit/incident-visit.module';
12 12
 import { IncidentDetailModule } from 'src/app/components/incidentManagement/incident-detail/incident-detail.module';
13
+import { IncidentCreateModule } from 'src/app/components/incidentManagement/incident-create/incident-create.module';
13 14
 
14 15
 
15 16
 @NgModule({
@@ -26,6 +27,7 @@ import { IncidentDetailModule } from 'src/app/components/incidentManagement/inci
26 27
     IncidentPostponeModule,
27 28
     IncidentVisitModule,
28 29
     IncidentDetailModule,
30
+    IncidentCreateModule,
29 31
   ]
30 32
 })
31 33
 export class IncidentManagementModule { }

+ 4 - 4
src/app/views/main/main.component.html

@@ -9,18 +9,18 @@
9 9
     <ul id="ds-menu">
10 10
       <li class="mainMenuOne" (click)="totoMenu('首页')" [ngClass]="{mainMenuSelected:indexFlag}">
11 11
         <i nz-icon nzType="home"></i>
12
-        <span nz-tooltip nzTooltipTitle="首页">首页</span>
12
+        <span nzTooltipPlacement="right" nz-tooltip nzTooltipTitle="首页">首页</span>
13 13
       </li>
14 14
       <li *ngFor="let data of menus" class="mainMenuWrap">
15 15
         <div class="mainMenuOne" (click)="clickMenuOne(data)" [ngClass]="{mainMenuSelected:data.flagBg}">
16 16
           <i class="icon_transport" [ngClass]="data.icon" *ngIf="isTransportIcon(data.icon)"></i>
17 17
           <i nz-icon [nzType]="data.icon" *ngIf="!isTransportIcon(data.icon)"></i>
18
-          <span nz-tooltip nzTooltipTitle="{{data.title}}">{{data.title}}</span>
18
+          <span nzTooltipPlacement="right" nz-tooltip nzTooltipTitle="{{data.title}}">{{data.title}}</span>
19 19
           <span class="icon_transport transport-xialajiantou" [ngStyle]="{transform:data.flag?'rotate(180deg)':'rotate(0deg)',color:data.flag?'#fff':'#999'}"></span>
20 20
         </div>
21 21
         <ul>
22
-          <li *ngFor="let item of data.childrens" class="mainMenu" (click)="totoMenu(item.title,item,data)" [ngStyle]="{height:data.flag?'44px':0}" [ngClass]="{menuTwoSelected:item.flag}" nz-tooltip nzTooltipTitle="{{item.title}}">
23
-            {{item.title}}
22
+          <li *ngFor="let item of data.childrens" class="mainMenu" (click)="totoMenu(item.title,item,data)" [ngStyle]="{height:data.flag?'44px':0}" [ngClass]="{menuTwoSelected:item.flag}">
23
+            <span nzTooltipPlacement="right" nz-tooltip nzTooltipTitle="{{item.title}}">{{item.title}}</span>
24 24
           </li>
25 25
         </ul>
26 26
       </li>

+ 6 - 5
src/app/views/other-config/other-config.component.ts

@@ -26,11 +26,12 @@ export class OtherConfigComponent implements OnInit, AfterViewInit {
26 26
   ngOnInit(): void {}
27 27
 
28 28
   ngAfterViewInit(){
29
-    let menus = JSON.parse(localStorage.getItem("menu"));
30
-    let otherConfig = menus.find(item => item.link == 'otherConfig');
31
-    this.tagList = otherConfig ? (otherConfig.childrens || []) : [];
32
-    this.tagList.length && this.clickTag(this.tagList[0]);
33
-    this.tagList.length && this.clickTag(this.tagList[0]);
29
+    setTimeout(() => {
30
+      let menus = JSON.parse(localStorage.getItem("menu"));
31
+      let otherConfig = menus.find(item => item.link == 'otherConfig');
32
+      this.tagList = otherConfig ? (otherConfig.childrens || []) : [];
33
+      this.tagList.length && this.clickTag(this.tagList[0]);
34
+    }, 0)
34 35
   }
35 36
 
36 37
   // 点击tab

+ 6 - 4
src/app/views/page-config/page-config.component.ts

@@ -19,10 +19,12 @@ export class PageConfigComponent implements OnInit, AfterViewInit {
19 19
   ngOnInit(): void {}
20 20
 
21 21
   ngAfterViewInit(){
22
-    let menus = JSON.parse(localStorage.getItem("menu"));
23
-    let pageConfig = menus.find(item => item.link == 'pageConfig');
24
-    this.tagList = pageConfig ? (pageConfig.childrens || []) : [];
25
-    this.tagList.length && this.clickTag(this.tagList[0]);
22
+    setTimeout(() => {
23
+      let menus = JSON.parse(localStorage.getItem("menu"));
24
+      let pageConfig = menus.find(item => item.link == 'pageConfig');
25
+      this.tagList = pageConfig ? (pageConfig.childrens || []) : [];
26
+      this.tagList.length && this.clickTag(this.tagList[0]);
27
+    }, 0)
26 28
   }
27 29
 
28 30
   // 点击tab