seimin 1 anno fa
parent
commit
d2611641f5

+ 62 - 8
src/app/views/disinfection-supply/disinfection-supply.component.html

@@ -87,21 +87,21 @@
87 87
   <!-- 内容 -->
88 88
   <div class="screen_body swiper" id="mySwiper" *ngIf="buildings.length">
89 89
     <div class="swiper-wrapper display_flex">
90
-      <div class="screen_wrap swiper-slide" *ngFor="let screen of buildings">
91
-        <div class="screen_list" *ngFor="let building of screen">
90
+      <div class="screen_wrap swiper-slide" *ngFor="let screen of buildings;let screentIndex = index;" (mouseenter)="swiperEnter()" (mouseleave)="swiperLeave()">
91
+        <div class="screen_list" *ngFor="let building of screen;let buildingIndex = index;">
92 92
           <div class="screen_list_head">
93 93
             <div class="screen_list_title">{{building.name}}</div>
94 94
             <div class="screen_list_column">
95 95
               <div class="column" *ngIf="building.name">科室名称</div>
96
-              <div class="column" *ngIf="building.name">{{taskTypeName}}工单状态</div>
96
+              <div class="column" *ngIf="building.name"><span [title]="taskTypeName + '工单状态'">{{taskTypeName}}工单状态</span></div>
97 97
             </div>
98 98
           </div>
99 99
           <div class="screen_list_body">
100
-            <div class="screen_list_item" *ngFor="let department of building.departments">
101
-              <div class="item_name">{{department.name}}</div>
102
-              <div class="item_description">
103
-                <div class="item_orderInfo" *ngIf="department.orders[0]">{{department.orders[0][11].slice(-4)}}-{{department.orders[0][7]}} {{department.orders[0][8]}}</div>
104
-                <div class="item_remarks" *ngIf="department.orders[0]">{{department.orders[0][13]}}</div>
100
+            <div class="screen_list_item" *ngFor="let department of building.departments" [attr.data-id]="department.id" [attr.data-screentIndex]="screentIndex" [attr.data-buildingIndex]="buildingIndex">
101
+              <div class="item_name" [attr.data-id]="department.id" [attr.data-screentIndex]="screentIndex" [attr.data-buildingIndex]="buildingIndex"><span [title]="department.name" [attr.data-id]="department.id" [attr.data-screentIndex]="screentIndex" [attr.data-buildingIndex]="buildingIndex">{{department.name}}</span></div>
102
+              <div class="item_description" [attr.data-id]="department.id" [attr.data-screentIndex]="screentIndex" [attr.data-buildingIndex]="buildingIndex">
103
+                <div class="item_orderInfo" [attr.data-id]="department.id" [attr.data-screentIndex]="screentIndex" [attr.data-buildingIndex]="buildingIndex" *ngIf="department.orders[0]">{{department.orders[0][11].slice(-4)}}-{{department.orders[0][7]}} {{department.orders[0][8]}}</div>
104
+                <div class="item_remarks" [attr.data-id]="department.id" [attr.data-screentIndex]="screentIndex" [attr.data-buildingIndex]="buildingIndex" *ngIf="department.orders[0]"><span [attr.data-id]="department.id" [attr.data-screentIndex]="screentIndex" [attr.data-buildingIndex]="buildingIndex" [title]="department.orders[0][13]">{{department.orders[0][13]}}</span></div>
105 105
               </div>
106 106
             </div>
107 107
           </div>
@@ -114,3 +114,57 @@
114 114
     </div>
115 115
   </div>
116 116
 </div>
117
+<!-- 详情 -->
118
+<div class="detail" *ngIf="detailModel">
119
+  <div class="detail_head">
120
+    <h2>详细信息</h2>
121
+    <img (click)="closeDetail()" src="./../../../assets/images/screen/close.png" alt="">
122
+  </div>
123
+  <div class="detail_body">
124
+    <div class="detail_body_item">
125
+      <div class="detail_body_left">
126
+        <div class="detail_body_title">楼栋:</div>
127
+        <div class="detail_body_title_content">{{order[3]}}</div>
128
+      </div>
129
+    </div>
130
+    <div class="detail_body_item">
131
+      <div class="detail_body_left">
132
+        <div class="detail_body_title">科室:</div>
133
+        <div class="detail_body_title_content">{{order[6]}}</div>
134
+      </div>
135
+    </div>
136
+    <div class="detail_body_item">
137
+      <div class="detail_body_left">
138
+        <div class="detail_body_title">配送人员:</div>
139
+        <div class="detail_body_title_content">{{order[8]}}</div>
140
+      </div>
141
+    </div>
142
+    <div class="detail_body_item">
143
+      <div class="detail_body_left">
144
+        <div class="detail_body_title">工单号:</div>
145
+        <div class="detail_body_title_content">{{order[11]}}</div>
146
+      </div>
147
+    </div>
148
+    <div class="detail_body_item">
149
+      <div class="detail_body_left">
150
+        <div class="detail_body_title">任务类型:</div>
151
+        <div class="detail_body_title_content">{{taskTypeName}}</div>
152
+      </div>
153
+    </div>
154
+    <div class="detail_body_item">
155
+      <div class="detail_body_left">
156
+        <div class="detail_body_title">工单状态:</div>
157
+        <div class="detail_body_title_content">{{order[7]}}</div>
158
+      </div>
159
+    </div>
160
+    <div class="detail_body_item">
161
+      <div class="detail_body_left">
162
+        <div class="detail_body_title">备注信息:</div>
163
+        <div class="detail_body_title_content">{{order[13]}}</div>
164
+      </div>
165
+    </div>
166
+  </div>
167
+  <div class="detail_foot">
168
+    <div class="detail_btn" (click)="closeDetail()">知道了</div>
169
+  </div>
170
+</div>

+ 82 - 2
src/app/views/disinfection-supply/disinfection-supply.component.less

@@ -300,8 +300,8 @@
300 300
         display: flex;
301 301
         align-items: center;
302 302
         .dit{
303
-          width: 28px;
304
-          height: 28px;
303
+          width: 24px;
304
+          height: 24px;
305 305
           background: #FFFFFF;
306 306
           border-radius: 50%;
307 307
           margin-right: 14px;
@@ -382,6 +382,7 @@
382 382
             .screen_list_item{
383 383
               height: 80px;
384 384
               display: flex;
385
+              cursor: pointer;
385 386
               &:nth-of-type(2n + 1){
386 387
                 background-color: #043144;
387 388
               }
@@ -432,4 +433,83 @@
432 433
       }
433 434
     }
434 435
   }
436
+
437
+  // 详情
438
+  .detail{
439
+    position: fixed;
440
+    left: 50%;
441
+    top: 50%;
442
+    z-index: 9999;
443
+    transform: translate(-50%, -50%);
444
+    width: 620px;
445
+    background: #FFFFFF;
446
+    box-shadow: 0px 3px 6px 1px rgba(0,0,0,0.16);
447
+    border-radius: 12px;
448
+
449
+    .detail_head{
450
+      padding: 33px 15px 19px 15px;
451
+      display: flex;
452
+      align-items: center;
453
+      justify-content: space-between;
454
+      h2{
455
+        font-size: 23px;
456
+        font-weight: bold;
457
+        color: #0A3D74;
458
+        line-height: 30px;
459
+        margin: 0;
460
+      }
461
+      img{
462
+        width: 19px;
463
+        height: 19px;
464
+        cursor: pointer;
465
+      }
466
+    }
467
+    .detail_body{
468
+      margin: 0 12px;
469
+      border-radius: 8px 8px 8px 8px;
470
+      border: 1px solid #DCDCDC;
471
+      padding: 9px 15px;
472
+      .detail_body_item{
473
+        display: flex;
474
+        font-size: 18px;
475
+        font-weight: 400;
476
+        color: #02356D;
477
+        padding: 6px 0;
478
+        .detail_body_left{
479
+          display: flex;
480
+          align-items: center;
481
+          text-align: justify;
482
+          .detail_body_title{
483
+            width: 94px;
484
+            flex-shrink: 0;
485
+            line-height: normal;
486
+            height: 100%;
487
+          }
488
+          .detail_body_title_content{
489
+            line-height: normal;
490
+          }
491
+        }
492
+      }
493
+    }
494
+
495
+    .detail_foot{
496
+      height: 91px;
497
+      padding-top: 24px;
498
+      display: flex;
499
+      justify-content: center;
500
+      .detail_btn{
501
+        cursor: pointer;
502
+        width: 139px;
503
+        height: 41px;
504
+        background: #0A3D74;
505
+        font-size: 20px;
506
+        font-weight: 400;
507
+        color: #FFFFFF;
508
+        display: flex;
509
+        justify-content: center;
510
+        align-items: center;
511
+        border-radius: 8px;
512
+      }
513
+    }
514
+  }
435 515
 }

+ 30 - 3
src/app/views/disinfection-supply/disinfection-supply.component.ts

@@ -21,8 +21,8 @@ export class DisinfectionSupplyComponent implements OnInit, OnDestroy {
21 21
   ) { }
22 22
 
23 23
   tasktype = null; //任务类型
24
-  refreshTime: number = 6000; //刷新时间
25
-  screenCuttingTime: number = 1000; //切屏时间
24
+  refreshTime: number = 60; //刷新时间
25
+  screenCuttingTime: number = 10; //切屏时间
26 26
 
27 27
   taskTypeName:string = '';
28 28
   buildings: any[] = [];
@@ -71,6 +71,26 @@ export class DisinfectionSupplyComponent implements OnInit, OnDestroy {
71 71
     });
72 72
   }
73 73
 
74
+  // 详情
75
+  detailModel:boolean = false;
76
+  order = {};
77
+  toDetail(department){
78
+    this.detailModel = true;
79
+    this.order = department.orders ? department.orders[0] : {};
80
+  }
81
+
82
+  closeDetail(){
83
+    this.detailModel = false;
84
+  }
85
+
86
+  swiperEnter(){
87
+    this.mySwiper && this.mySwiper.autoplay.stop();
88
+  }
89
+
90
+  swiperLeave(){
91
+    this.mySwiper && this.mySwiper.autoplay.start();
92
+  }
93
+
74 94
   setActiveIndex(i:number){
75 95
     this.activeIndex = i;
76 96
     this.mySwiper.slideToLoop(i, 1000, false);
@@ -109,8 +129,15 @@ export class DisinfectionSupplyComponent implements OnInit, OnDestroy {
109 129
         on: {
110 130
           slideChangeTransitionEnd: function(swiper) {
111 131
             _this.activeIndex = swiper.realIndex;
112
-            console.log(swiper, _this.activeIndex)
113 132
           },
133
+          click: function(swiper, event){
134
+            console.log(swiper, event.target)
135
+            const id = (event as any).target.getAttribute('data-id');
136
+            const screentIndex = (event as any).target.getAttribute('data-screentIndex');
137
+            const buildingIndex = (event as any).target.getAttribute('data-buildingIndex');
138
+            let department = _this.buildings[screentIndex][buildingIndex].departments.find(v => v.id == id);
139
+            _this.toDetail(department);
140
+          }
114 141
         },
115 142
       });
116 143
     }, 0)

+ 8 - 0
src/app/views/main/main-routing.module.ts

@@ -156,6 +156,14 @@ const routes: Routes = [
156 156
           ),
157 157
       },
158 158
       {
159
+        // TAB自定义
160
+        path: "tabCustom",
161
+        loadChildren: () =>
162
+          import("../tab-custom/tab-custom.module").then(
163
+            (m) => m.TabCustomModule
164
+          ),
165
+      },
166
+      {
159 167
         // 权限管理
160 168
         path: "jurisdictionManagement",
161 169
         loadChildren: () =>

+ 15 - 0
src/app/views/tab-custom/tab-custom-routing.module.ts

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

+ 99 - 0
src/app/views/tab-custom/tab-custom.component.html

@@ -0,0 +1,99 @@
1
+<div class="list-template">
2
+  <div class="list-template__content">
3
+    <div class="list-template__top" nz-row>
4
+      <div nz-col nzXl='18' class="list-template__searchBox">
5
+      </div>
6
+      <div nz-col nzXl='6' class="list-template__btns">
7
+        <button nz-button class="btn default" (click)='search()'>搜索</button>
8
+        <button nz-button *ngIf="coopBtns.add" class="btn ml8 default" (click)="showModal()">新增</button>
9
+      </div>
10
+    </div>
11
+    <div class="list-template__bottom">
12
+      <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
13
+        [nzLoading]="loading1">
14
+        <thead>
15
+          <tr class="thead">
16
+            <th nzWidth="10%">TAB名称</th>
17
+            <th nzWidth="10%">排序号</th>
18
+            <th nzWidth="5%">关联任务类型</th>
19
+            <th nzWidth="20%">操作</th>
20
+          </tr>
21
+        </thead>
22
+        <tbody>
23
+          <tr *ngFor="let data of listOfData;let index=index;">
24
+            <td>{{ data.title || '-' }}</td>
25
+            <td>{{ data.orders || '-' }}</td>
26
+            <td>{{data.taskTypeList.length ? data.taskTypeList : '-'}}</td>
27
+            <td>
28
+              <div class="coop">
29
+                <span *ngIf="coopBtns.edit" (click)="edit(data)">编辑</span>
30
+                <span *ngIf="coopBtns.del" (click)="del(data)">删除</span>
31
+              </div>
32
+            </td>
33
+          </tr>
34
+        </tbody>
35
+      </nz-table>
36
+      <div class="list-template__pagination">
37
+        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
38
+          (nzPageIndexChange)="getList()" (nzPageSizeChange)="getList()">
39
+        </nz-pagination>
40
+      </div>
41
+    </div>
42
+  </div>
43
+</div>
44
+<!-- 新增/编辑模态框 -->
45
+<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="modal">
46
+  <div class="modalBody">
47
+    <div class="title">{{add?"新增":"编辑"}}<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
48
+    </div>
49
+    <overlay-scrollbars #osComponentRef1 class="content">
50
+      <form nz-form [formGroup]="validateForm" class="addForm" (ngSubmit)="submitForm()">
51
+        <nz-form-item>
52
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="title">TAB名称</nz-form-label>
53
+          <nz-form-control nzErrorTip="请填写TAB名称!">
54
+            <nz-input-group>
55
+              <input type="text" nz-input formControlName="title" placeholder="请填写TAB名称" />
56
+            </nz-input-group>
57
+          </nz-form-control>
58
+        </nz-form-item>
59
+        <nz-form-item>
60
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="orders">排序号</nz-form-label>
61
+          <nz-form-control nzErrorTip="请选择排序号!">
62
+            <nz-input-group>
63
+              <input type="number" nz-input formControlName="orders" placeholder="请填写排序号" />
64
+            </nz-input-group>
65
+          </nz-form-control>
66
+        </nz-form-item>
67
+        <nz-form-item>
68
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="taskTypeList">关联任务类型</nz-form-label>
69
+          <nz-form-control nzErrorTip="请选择关联任务类型!">
70
+            <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="taskTypeList" nzShowSearch nzAllowClear nzMode="multiple" nzPlaceHolder="请选择关联任务类型" nzServerSearch (nzOnSearch)="changeInp($event)" (nzOpenChange)="openOtherTasktype($event)">
71
+              <ng-container *ngFor="let data of otherTasktypeList">
72
+                <nz-option *ngIf="!isLoading" [nzLabel]="data.taskName" [nzValue]="data.id">
73
+                </nz-option>
74
+              </ng-container>
75
+              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
76
+                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
77
+              </nz-option>
78
+            </nz-select>
79
+          </nz-form-control>
80
+        </nz-form-item>
81
+      </form>
82
+    </overlay-scrollbars>
83
+    <div class="display_flex justify-content_flex-center">
84
+      <button nzType="primary" nz-button (click)="submitForm()" [nzLoading]="btnLoading">确认</button>
85
+      <button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
86
+    </div>
87
+  </div>
88
+</div>
89
+<!-- 删除模态框 -->
90
+<app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
91
+  (confirmDelEvent)="confirmDel()" content="是否确认删除?">
92
+</app-dialog-delete>
93
+
94
+<!-- 操作成功/失败提示框 -->
95
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
96
+  [info]="promptInfo"></app-prompt-modal>
97
+
98
+<!-- 遮罩 -->
99
+<app-mask *ngIf="maskFlag"></app-mask>

+ 126 - 0
src/app/views/tab-custom/tab-custom.component.less

@@ -0,0 +1,126 @@
1
+@import "../../../../src/theme.less";
2
+.save {
3
+  position: fixed;
4
+  left: 0;
5
+  top: 0;
6
+  width: 100%;
7
+  height: 100%;
8
+  background: rgba(0, 0, 0, 0.4);
9
+  z-index: 99;
10
+
11
+  .modalBody {
12
+    width: 350px;
13
+    background: #fff;
14
+    border-radius: 5px;
15
+    padding: 10px 20px;
16
+    color: #333;
17
+
18
+    .title {
19
+      width: 100%;
20
+      text-align: center;
21
+      font-size: 18px;
22
+      position: relative;
23
+
24
+      i {
25
+        position: absolute;
26
+        right: 0;
27
+        top: 0;
28
+        font-size: 20px;
29
+        color: #666;
30
+        cursor: pointer;
31
+        padding: 0 5px;
32
+      }
33
+    }
34
+
35
+    .content {
36
+      width: 100%;
37
+      height: 117px;
38
+      background: #f9fafb;
39
+      border: 1px solid #e5e9ed;
40
+      border-radius: 5px;
41
+      overflow: hidden;
42
+      margin-top: 12px;
43
+
44
+      div {
45
+        text-align: center;
46
+        margin: 0;
47
+
48
+        &.icon {
49
+          margin-top: 17px;
50
+
51
+          i {
52
+            color: #34b349;
53
+            font-size: 30px !important;
54
+
55
+            &.transport-wenhao {
56
+              color: #f5a523;
57
+            }
58
+
59
+            &.transport-shibai {
60
+              color: #ff3a52;
61
+            }
62
+          }
63
+        }
64
+
65
+        &.defeat {
66
+          color: #333;
67
+          font-size: 18px;
68
+        }
69
+
70
+        &:nth-child(3) {
71
+          font-size: 14px;
72
+          color: #666;
73
+        }
74
+      }
75
+    }
76
+
77
+    button {
78
+      margin-top: 10px;
79
+
80
+      &.btn {
81
+        margin-left: 8px;
82
+      }
83
+    }
84
+  }
85
+
86
+  // 新增
87
+  &.add {
88
+    .modalBody {
89
+      width: 480px;
90
+      height: auto;
91
+
92
+      .content {
93
+        width: 100%;
94
+        height: auto;
95
+        padding: 19px 14px 0 14px;
96
+        max-height: 500px;
97
+        overflow-y: auto;
98
+
99
+        .addForm {
100
+          .ant-form-item {
101
+            margin-bottom: 8px;
102
+
103
+            .ant-form-item-label {
104
+              line-height: 14px;
105
+              text-align: left;
106
+            }
107
+          }
108
+        }
109
+
110
+        .editForm {
111
+          .ant-form-item {
112
+            margin-bottom: 14px;
113
+
114
+            .ant-form-item-label {
115
+              line-height: 0;
116
+            }
117
+          }
118
+        }
119
+      }
120
+
121
+      button:nth-child(1) {
122
+        margin-right: 20px;
123
+      }
124
+    }
125
+  }
126
+}

+ 255 - 0
src/app/views/tab-custom/tab-custom.component.ts

@@ -0,0 +1,255 @@
1
+import { Component, OnInit, ViewChild } from "@angular/core";
2
+import { ActivatedRoute, Router } from "@angular/router";
3
+import { FormBuilder, Validators, FormGroup } from "@angular/forms";
4
+
5
+import { MainService } from "../../services/main.service";
6
+import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
7
+import { ToolService } from "../../services/tool.service";
8
+import { forkJoin, Subject } from "rxjs";
9
+import { debounceTime } from "rxjs/operators";
10
+import { NzMessageService } from "ng-zorro-antd";
11
+import { isThisISOWeek } from 'date-fns';
12
+
13
+@Component({
14
+  selector: "app-tab-custom",
15
+  templateUrl: "./tab-custom.component.html",
16
+  styleUrls: ["./tab-custom.component.less"],
17
+})
18
+export class TabCustomComponent implements OnInit {
19
+  @ViewChild("osComponentRef1", {
20
+    read: OverlayScrollbarsComponent,
21
+    static: false,
22
+  })
23
+  osComponentRef1: OverlayScrollbarsComponent;
24
+  constructor(
25
+    private message: NzMessageService,
26
+    private fb: FormBuilder,
27
+    private route: ActivatedRoute,
28
+    private router: Router,
29
+    private mainService: MainService,
30
+    private tool: ToolService
31
+  ) {}
32
+
33
+  listOfData: any[] = []; //表格数据
34
+
35
+  modal: boolean = false; //新增/编辑模态框
36
+  add: boolean; //true:新增;false:编辑
37
+  validateForm: FormGroup; //新增/编辑表单
38
+  coopId: number; //表格中执行操作的id
39
+  department: any; //所属科室
40
+  num; //工号
41
+  name; //姓名
42
+  userType: any; //用户类型
43
+  hosId: any; //院区(搜索)
44
+  userGroup; //所属组
45
+  userGroup1; //所属组(搜索)
46
+  userTypes: Array<any>; //所有用户类型
47
+  alldepart: any = []; //所有所属科室
48
+  alldepart1: any = []; //所有所属科室(搜索)
49
+  hospitals1: any = []; //院区列表(搜索)
50
+  otherTasktypeList: Array<any>; //所有其他临床服务任务类型
51
+  allUserRole: Array<any>; //所有角色
52
+  pageIndex: number = 1; //页码
53
+  listLength: number = 10; //总条数
54
+  pageSize: number = 10; //每页条数
55
+
56
+  promptContent: string; //操作提示框提示信息
57
+  ifSuccess: boolean; //操作成功/失败
58
+  promptInfo: string; //操作结果提示信息
59
+  promptModalShow: boolean; //操作提示框是否展示
60
+
61
+  btnLoading: boolean = false; //提交按钮loading状态
62
+  wxRequired = false; //新增或编辑用户的时候,微信号是否必填
63
+  changeInpSubject = new Subject(); //防抖
64
+
65
+  ngOnInit() {
66
+    //防抖
67
+    this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
68
+      this.getOtherTasktype(v[0]);
69
+    });
70
+    this.coopBtns = this.tool.initCoopBtns(this.route);
71
+    this.initForm();
72
+    this.hosId = this.tool.getCurrentHospital().id;
73
+    this.getList();
74
+  }
75
+
76
+  // 初始化增删改按钮
77
+  coopBtns: any = {};
78
+  // 搜索
79
+  search() {
80
+    this.pageIndex = 1;
81
+    this.getList();
82
+  }
83
+  // 表格数据
84
+  loading1 = false;
85
+  getList() {
86
+    let data = {
87
+      idx: this.pageIndex - 1,
88
+      sum: this.pageSize,
89
+      tabPermission: {
90
+        hosId: this.hosId,
91
+      },
92
+    };
93
+    this.loading1 = true;
94
+    this.mainService
95
+      .getFetchDataList("simple/data", "tabPermission", data)
96
+      .subscribe((data) => {
97
+        this.loading1 = false;
98
+        this.listOfData = data.list;
99
+        this.listLength = data.totalNum;
100
+      });
101
+  }
102
+
103
+  // 获取任务类型列表-其他临床服务
104
+  getOtherTasktype(keywords = '') {
105
+    let hid = this.tool.getCurrentHospital().id;
106
+    let postData = {
107
+      taskType: {
108
+        hosIds: hid,
109
+        taskName: keywords,
110
+        simpleQuery: true,
111
+        associationType: {
112
+          key: 'association_types',
113
+          value: 'other',
114
+        }
115
+      },
116
+      idx: 0,
117
+      sum: 10,
118
+    };
119
+    this.isLoading = true;
120
+    this.mainService.getFetchDataList("configuration", "taskType", postData).subscribe((res) => {
121
+      this.isLoading = false;
122
+      this.otherTasktypeList = res.list || [];
123
+    });
124
+  }
125
+
126
+  // 新增弹框
127
+  showModal() {
128
+    this.add = true;
129
+    this.modal = true;
130
+    this.initForm();
131
+  }
132
+  hideModal() {
133
+    this.modal = false;
134
+    this.initForm();
135
+  }
136
+
137
+  // 初始化新增form表单
138
+  initForm() {
139
+    if (this.add) {
140
+      this.otherTasktypeList = [];
141
+    }
142
+    this.validateForm = this.fb.group({
143
+      title: ['', [Validators.required]],
144
+      orders: [0, [Validators.required]],
145
+      taskTypeList: [null],
146
+    });
147
+  }
148
+  // 表单提交
149
+  submitForm(): void {
150
+    for (const i in this.validateForm.controls) {
151
+      this.validateForm.controls[i].markAsDirty({ onlySelf: true });
152
+      this.validateForm.controls[i].updateValueAndValidity();
153
+    }
154
+    if (this.validateForm.invalid) return;
155
+    this.btnLoading = true;
156
+    let data = {
157
+      tabPermission: {
158
+        title: this.validateForm.value.title,
159
+        orders: this.validateForm.value.orders,
160
+        hosId: this.hosId,
161
+        deleteFlag: 0,
162
+        // taskTypeList: this.validateForm.value.taskTypeList
163
+      },
164
+    };
165
+    if (!this.add) {
166
+      data.tabPermission["id"] = this.coopId;
167
+    }
168
+    console.log(data);
169
+    return;
170
+    this.mainService
171
+      .coopData("addData", "tabPermission", data)
172
+      .subscribe((data) => {
173
+        this.btnLoading = false;
174
+        this.hideModal();
175
+        this.initForm();
176
+        if (data.status == 200) {
177
+          this.showPromptModal(this.add ? "新增" : "编辑", true, "");
178
+        } else {
179
+          this.showPromptModal(this.add ? "新增" : "编辑", false, data.msg);
180
+        }
181
+      });
182
+  }
183
+
184
+  // 编辑
185
+  maskFlag: any = false;
186
+  edit(data) {
187
+    this.validateForm.controls.title.setValue(data.title);
188
+    this.validateForm.controls.orders.setValue(data.orders);
189
+    this.modal = true;
190
+    this.add = false;
191
+    this.coopId = data.id;
192
+  }
193
+
194
+  // 删除
195
+  delModal: boolean = false; //删除模态框
196
+  del(data) {
197
+    this.coopId = data.id;
198
+    this.delModal = true;
199
+  }
200
+  // 确认删除
201
+  confirmDel() {
202
+    return;
203
+    this.btnLoading = true;
204
+    this.mainService
205
+      .rmvDataAndWeChatNum([this.coopId], true)
206
+      .subscribe((data) => {
207
+        this.btnLoading = false;
208
+        this.hideDelModal();
209
+        if (data["status"] == 200) {
210
+          if (
211
+            this.listOfData.length == 1 &&
212
+            this.pageIndex == Math.ceil(this.listLength / this.pageSize)
213
+          ) {
214
+            this.listLength--;
215
+            this.pageIndex = Math.ceil(this.listLength / this.pageSize);
216
+          }
217
+          this.showPromptModal("删除", true, "");
218
+        } else {
219
+          this.showPromptModal("删除", false, data["msg"]);
220
+        }
221
+      });
222
+  }
223
+
224
+  // 关闭删除模态框
225
+  hideDelModal() {
226
+    this.delModal = false;
227
+  }
228
+
229
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
230
+  showPromptModal(con, success, promptInfo?) {
231
+    this.promptModalShow = false;
232
+    this.promptContent = con;
233
+    this.ifSuccess = success;
234
+    this.promptInfo = promptInfo;
235
+    setTimeout(() => {
236
+      this.promptModalShow = true;
237
+    }, 100);
238
+    this.getList();
239
+  }
240
+
241
+  // 边输边搜节流阀
242
+  isLoading = false;
243
+  changeInp(e) {
244
+    this.changeInpSubject.next([e]);
245
+  }
246
+
247
+  // 打开任务类型
248
+  openOtherTasktype(e){
249
+    if(e){
250
+      this.getOtherTasktype();
251
+    }
252
+  }
253
+}
254
+
255
+

+ 19 - 0
src/app/views/tab-custom/tab-custom.module.ts

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

BIN
src/assets/images/screen/close.png