浏览代码

半程陪检及其他功能

seimin 3 年之前
父节点
当前提交
104f367412
共有 20 个文件被更改,包括 1835 次插入96 次删除
  1. 12 0
      src/app/services/main.service.ts
  2. 2 0
      src/app/share/order-detail/order-detail.component.html
  3. 11 0
      src/app/views/check-dept-exception/check-dept-exception-routing.module.ts
  4. 111 0
      src/app/views/check-dept-exception/check-dept-exception.component.html
  5. 176 0
      src/app/views/check-dept-exception/check-dept-exception.component.less
  6. 480 0
      src/app/views/check-dept-exception/check-dept-exception.component.ts
  7. 12 0
      src/app/views/check-dept-exception/check-dept-exception.module.ts
  8. 6 3
      src/app/views/fuwutai/fuwutai.component.html
  9. 117 83
      src/app/views/hospital-config/hospital-config.component.html
  10. 6 4
      src/app/views/hospital-config/hospital-config.component.ts
  11. 6 3
      src/app/views/hushijiandan/hushijiandan.component.html
  12. 8 0
      src/app/views/hushijiandan/hushijiandan.component.ts
  13. 12 0
      src/app/views/inspect-type-config/inspect-type-config-routing.module.ts
  14. 129 0
      src/app/views/inspect-type-config/inspect-type-config.component.html
  15. 282 0
      src/app/views/inspect-type-config/inspect-type-config.component.less
  16. 396 0
      src/app/views/inspect-type-config/inspect-type-config.component.ts
  17. 12 0
      src/app/views/inspect-type-config/inspect-type-config.module.ts
  18. 16 0
      src/app/views/main/main-routing.module.ts
  19. 17 3
      src/app/views/task-type-management/task-type-management.component.html
  20. 24 0
      src/app/views/task-type-management/task-type-management.component.ts

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

@@ -518,4 +518,16 @@ export class MainService {
518 518
       headers: this.headers,
519 519
     });
520 520
   }
521
+  // 获取检查科室异常配置列表
522
+  getUnusualDept(data) {
523
+    return this.http.post(host.host + "/dept/unusualDept", data, {
524
+      headers: this.headers,
525
+    });
526
+  }
527
+  // 修改,删除检查科室异常配置
528
+  upDictionary(data) {
529
+    return this.http.post(host.host + "/common/common/upDictionary", data, {
530
+      headers: this.headers,
531
+    });
532
+  }
521 533
 }

+ 2 - 0
src/app/share/order-detail/order-detail.component.html

@@ -392,6 +392,8 @@
392 392
               陪同情况:{{orderInfo.isAccompany==1?'需要医护陪同':'无需医护陪同'}}</div>
393 393
             <div nz-col nzSpan="6" *ngIf="orderInfo.yyjdTime">
394 394
               预约时间:{{orderInfo.yyjdTime|date:'MM-dd HH:mm'}}</div>
395
+            <div nz-col nzSpan="6" *ngIf="orderInfo.taskType">
396
+              是否半程陪检:{{orderInfo.taskType.isHalfInspect===1?'是':'否'}}</div>
395 397
           </div>
396 398
           <div class="info" nz-row *ngIf="orderInfo.urgentDetails">
397 399
             <div nz-col nzSpan="24" class="jiaji">加急原因:{{orderInfo.urgentDetails.urgentReason}}</div>

+ 11 - 0
src/app/views/check-dept-exception/check-dept-exception-routing.module.ts

@@ -0,0 +1,11 @@
1
+import { NgModule } from "@angular/core";
2
+import { Routes, RouterModule } from "@angular/router";
3
+import { CheckDeptExceptionComponent } from "./check-dept-exception.component";
4
+
5
+const routes: Routes = [{ path: "", component: CheckDeptExceptionComponent }];
6
+
7
+@NgModule({
8
+  imports: [RouterModule.forChild(routes)],
9
+  exports: [RouterModule],
10
+})
11
+export class CheckDeptExceptionRoutingModule {}

+ 111 - 0
src/app/views/check-dept-exception/check-dept-exception.component.html

@@ -0,0 +1,111 @@
1
+<div class="list-template">
2
+  <div class="list-template__content">
3
+    <div class="list-template__top" nz-row>
4
+      <div nz-col nzXl='12' class="list-template__searchBox">
5
+      </div>
6
+      <div nz-col nzXl="12" class="list-template__btns">
7
+        <!-- <button nz-button *ngIf="coopBtns.add" class="btn default ml8" (click)="addModal()">新增</button> -->
8
+      </div>
9
+    </div>
10
+    <div class="list-template__bottom">
11
+      <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
12
+        [nzLoading]="loading1">
13
+        <thead>
14
+          <tr class="thead">
15
+            <th nzWidth="5%">序号</th>
16
+            <th nzWidth="25%">检查原科室</th>
17
+            <th nzWidth="25%">关键字</th>
18
+            <th nzWidth="25%">匹配的科室</th>
19
+            <th nzWidth="25%">操作</th>
20
+          </tr>
21
+        </thead>
22
+        <tbody>
23
+          <tr *ngFor="let data of listOfData;let i = index" (click)="selectedListData(data[4])">
24
+            <td>{{ i+1 }}</td>
25
+            <td>{{ data[0] }}</td>
26
+            <td>{{ data[2] }}</td>
27
+            <td>{{ data[3] }}</td>
28
+            <td>
29
+              <div class="coop">
30
+                <span *ngIf="coopBtns.edit" (click)="edit($event,data)">修改</span>
31
+                <span *ngIf="coopBtns.del" (click)="showDelModal($event,data[4],'您确认要删除吗?','删除','del')">删除</span>
32
+              </div>
33
+            </td>
34
+          </tr>
35
+        </tbody>
36
+      </nz-table>
37
+      <div class="list-template__pagination">
38
+        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize"
39
+          (nzPageIndexChange)="getList(0)" (nzPageSizeChange)="getList(0)">
40
+        </nz-pagination>
41
+      </div>
42
+    </div>
43
+  </div>
44
+
45
+  <!-- 新增/编辑模态框 -->
46
+  <div class="save display_flex justify-content_flex-center align-items_center add" *ngIf="modal">
47
+    <div class="modalBody">
48
+      <div class="title">{{add?"新增":"编辑"}}<i class="icon_transport transport-guanbi" (click)="hideAddModal()"></i>
49
+      </div>
50
+      <div class="content">
51
+        <form nz-form [formGroup]="validateForm" class="addForm" (ngSubmit)="submitForm()">
52
+          <nz-form-item>
53
+            <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="startDepartment">检查原科室</nz-form-label>
54
+            <nz-form-control nzErrorTip="请选择检查原科室!">
55
+              <nz-select [nzDisabled]="!add" [nzDropdownMatchSelectWidth]="false" formControlName="startDepartment"
56
+                nzShowSearch nzAllowClear nzPlaceHolder="请选择检查原科室" nzServerSearch
57
+                (nzOnSearch)="changeInp($event,'form')" (nzOpenChange)="changeForm($event)">
58
+                <ng-container *ngFor="let data of department">
59
+                  <nz-option *ngIf="!isLoading" nzLabel="{{data.dept}}" nzValue="{{data.id}}"></nz-option>
60
+                </ng-container>
61
+                <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
62
+                  <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
63
+                </nz-option>
64
+              </nz-select>
65
+            </nz-form-control>
66
+          </nz-form-item>
67
+          <nz-form-item>
68
+            <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="keyword">关键字</nz-form-label>
69
+            <nz-form-control nzErrorTip="请输入关键字!">
70
+              <nz-input-group>
71
+                <input nz-input formControlName="keyword" placeholder="请输入关键字" [disabled]="!add" />
72
+              </nz-input-group>
73
+            </nz-form-control>
74
+          </nz-form-item>
75
+          <nz-form-item>
76
+            <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="endDepartment">匹配的科室</nz-form-label>
77
+            <nz-form-control nzErrorTip="请选择匹配的科室!">
78
+              <!-- <nz-select [nzMode]="'multiple'" [nzDropdownMatchSelectWidth]="false" formControlName="endDepartment"
79
+                nzShowSearch nzAllowClear nzPlaceHolder="请选择匹配的科室" nzServerSearch
80
+                (nzOnSearch)="changeInp($event,'formEnd')" (nzOpenChange)="changeFormEnd($event)">
81
+                <ng-container *ngFor="let data of department1">
82
+                  <nz-option *ngIf="!isLoading" nzLabel="{{data.dept}}" nzValue="{{data.id}}"></nz-option>
83
+                </ng-container>
84
+                <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
85
+                  <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
86
+                </nz-option>
87
+              </nz-select> -->
88
+              <nz-input-group>
89
+                <input nz-input formControlName="endDepartment" placeholder="请输入匹配的科室" />
90
+              </nz-input-group>
91
+            </nz-form-control>
92
+          </nz-form-item>
93
+        </form>
94
+      </div>
95
+      <div class=" display_flex justify-content_flex-center">
96
+        <button nzType="primary" nz-button (click)="submitForm()" [nzLoading]="btnLoading">保存</button>
97
+        <button class="btn cancel" nz-button nzType="default" (click)="hideAddModal()">取消</button>
98
+      </div>
99
+    </div>
100
+  </div>
101
+
102
+  <!-- 删除模态框 -->
103
+  <app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
104
+    (confirmDelEvent)="confirmDel()" [content]="tipsMsg1"></app-dialog-delete>
105
+</div>
106
+<!-- 操作成功/失败提示框 -->
107
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
108
+  [info]="promptInfo">
109
+</app-prompt-modal>
110
+<!-- 遮罩 -->
111
+<app-mask *ngIf="maskFlag"></app-mask>

+ 176 - 0
src/app/views/check-dept-exception/check-dept-exception.component.less

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

+ 480 - 0
src/app/views/check-dept-exception/check-dept-exception.component.ts

@@ -0,0 +1,480 @@
1
+import { Component, OnInit } 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 { ToolService } from "../../services/tool.service";
7
+import { forkJoin, Subject } from "rxjs";
8
+import { debounceTime } from "rxjs/operators";
9
+import { NzMessageService } from "ng-zorro-antd";
10
+@Component({
11
+  selector: "app-check-dept-exception",
12
+  templateUrl: "./check-dept-exception.component.html",
13
+  styleUrls: ["./check-dept-exception.component.less"],
14
+})
15
+export class CheckDeptExceptionComponent implements OnInit {
16
+  constructor(
17
+    private message: NzMessageService,
18
+    private fb: FormBuilder,
19
+    private mainService: MainService,
20
+    private route: ActivatedRoute,
21
+    private router: Router,
22
+    private tool: ToolService
23
+  ) {}
24
+
25
+  userInfo: any = JSON.parse(localStorage.getItem("user")) || {}; //登录用户信息
26
+
27
+  searchCriteria = {
28
+    //搜索条件
29
+    hospital: null,
30
+    startDepartment: null,
31
+  };
32
+  department = []; // 院区下的科室列表(分类型)
33
+  department1 = []; // 院区下的科室列表
34
+  departmentSearch = []; // 院区下的科室列表(搜索框)
35
+  allHospital: any = []; //院区下拉框
36
+  hosId: any; //当前选中院区
37
+  listOfData: any[] = []; //表格数据
38
+  pageIndex: number = 1; //表格当前页码
39
+  pageSize: number = 10; //表格每页展示条数
40
+  listLength: number = 10; //表格总数据量
41
+  tableHeight: number; //表格动态高
42
+  modal: boolean = false; //新增/编辑模态框
43
+  add: boolean; //true:新增;false:编辑
44
+  validateForm: FormGroup; //新增/编辑表单
45
+  coopId: number; //当前操作列id
46
+
47
+  hospitalList: Array<object> = []; //院区列表
48
+  btnLoading: boolean = false; //提交按钮loading状态
49
+  printLoading: boolean = false; //批量打印按钮loading状态
50
+
51
+  promptContent: string; //操作提示框提示信息
52
+  ifSuccess: boolean; //操作成功/失败
53
+  promptInfo: string; //操作结果提示信息
54
+  promptModalShow: boolean; //操作提示框是否展示
55
+  demoValue: number = 0;
56
+  changeInpSubject = new Subject();
57
+  ngOnInit() {
58
+    this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
59
+      this.searchDepartment(v[0], v[1]);
60
+    });
61
+    this.coopBtns = this.tool.initCoopBtns(this.route);
62
+    this.getAllHospital();
63
+    this.initForm();
64
+    this.getHospitalList();
65
+  }
66
+  // 选中表格中快捷建单
67
+  mapOfCheckedId = {};
68
+  checkedDepIds = []; //已选中快捷建单id
69
+  refreshStatus(): void {
70
+    let arr = [];
71
+    for (var k in this.mapOfCheckedId) {
72
+      if (this.mapOfCheckedId[k]) {
73
+        arr.push(Number(k));
74
+      }
75
+    }
76
+    this.checkedDepIds = arr;
77
+    console.log(this.checkedDepIds);
78
+  }
79
+  // 整行操作
80
+  selectedListData(id) {
81
+    this.mapOfCheckedId[id] = !this.mapOfCheckedId[id];
82
+    this.refreshStatus();
83
+  }
84
+
85
+  // 选择院区
86
+  changeHospital(id, type) {
87
+    if (type === "search") {
88
+      this.searchCriteria.startDepartment = null;
89
+    } else {
90
+      if (
91
+        this.validateForm &&
92
+        this.validateForm.value &&
93
+        this.validateForm.value.endDepartment
94
+      ) {
95
+        this.validateForm.controls.startDepartment.setValue(null);
96
+        this.validateForm.controls.endDepartment.setValue(null);
97
+      }
98
+    }
99
+    // 1,请求指定科室类型的科室列表
100
+    let data = {
101
+      department: {
102
+        hospital: { id },
103
+      },
104
+      idx: 0,
105
+      sum: 10,
106
+    };
107
+    this.mainService
108
+      .getFetchDataList("data", "department", data)
109
+      .subscribe((data) => {
110
+        if (data.status == 200) {
111
+          if (type === "search") {
112
+            this.departmentSearch = data.list;
113
+          } else {
114
+            this.department = data.list;
115
+          }
116
+        }
117
+      });
118
+    if (type === "search") {
119
+      return;
120
+    }
121
+    // 2,请求科室类型为检验科的科室列表
122
+    let data2 = {
123
+      department: {
124
+        hospital: { id },
125
+      },
126
+      idx: 0,
127
+      sum: 10,
128
+    };
129
+    this.mainService
130
+      .getFetchDataList("data", "department", data2)
131
+      .subscribe((data) => {
132
+        if (data.status == 200) {
133
+          this.department1 = data.list;
134
+        }
135
+      });
136
+  }
137
+  // 打开搜索框
138
+  changeSearch(flag) {
139
+    if (flag) {
140
+      this.changeInp("no", "search");
141
+    }
142
+  }
143
+  changeForm(flag) {
144
+    if (flag) {
145
+      this.changeInp("no", "form");
146
+    }
147
+  }
148
+  changeFormEnd(flag) {
149
+    if (flag) {
150
+      this.changeInp("no", "formEnd");
151
+    }
152
+  }
153
+  // 边输边搜节流阀
154
+  isLoading = false;
155
+  changeInp(dept, type) {
156
+    if (dept === "no") {
157
+      dept = "";
158
+    }
159
+    if (type === "form" || type === "formEnd") {
160
+      if (!this.hosId) {
161
+        this.department = [];
162
+        return;
163
+      }
164
+    }
165
+    this.isLoading = true;
166
+    this.changeInpSubject.next([dept, type]);
167
+  }
168
+  // 搜索科室
169
+  snum = 0;
170
+  searchDepartment(dept, type) {
171
+    let data = {
172
+      department: {
173
+        dept,
174
+        hospital: {
175
+          id: this.hosId,
176
+        },
177
+      },
178
+      idx: 0,
179
+      sum: 10,
180
+    };
181
+    this.snum++;
182
+    this.mainService
183
+      .getFetchDataList("data", "department", data)
184
+      .subscribe((data) => {
185
+        this.snum--;
186
+        if (data.status == 200) {
187
+          if (type === "search") {
188
+            if (this.snum === 0) {
189
+              this.isLoading = false;
190
+            }
191
+            this.departmentSearch = data.list;
192
+          } else if (type === "form") {
193
+            if (this.snum === 0) {
194
+              this.isLoading = false;
195
+            }
196
+            this.department = data.list;
197
+          } else if (type === "formEnd") {
198
+            if (this.snum === 0) {
199
+              this.isLoading = false;
200
+            }
201
+            this.department1 = data.list;
202
+          }
203
+        }
204
+      });
205
+  }
206
+
207
+  // 初始化增删改按钮
208
+  coopBtns: any = {};
209
+
210
+  // 获取所有院区
211
+  /**
212
+   *
213
+   *
214
+   * @memberof RoundRobinComponent
215
+   */
216
+  getAllHospital() {
217
+    this.allHospital = [this.tool.getCurrentHospital()];
218
+    this.hosId = this.tool.getCurrentHospital().id;
219
+    this.searchCriteria.hospital = this.tool.getCurrentHospital().id + "";
220
+    this.getList(1);
221
+    this.changeHospital(this.searchCriteria.hospital, "search");
222
+  }
223
+
224
+  // 表格数据
225
+  loading1 = false;
226
+  getList(type) {
227
+    if (type == 1) {
228
+      this.pageIndex = 1;
229
+    }
230
+    let postData = {
231
+      idx: this.pageIndex - 1,
232
+      sum: this.pageSize,
233
+    };
234
+    this.mapOfCheckedId = {};
235
+    this.checkedDepIds = [];
236
+    this.loading1 = true;
237
+    this.mainService.getUnusualDept(postData).subscribe((result: any) => {
238
+      this.loading1 = false;
239
+      if (result.status == 200) {
240
+        this.listOfData = result.list;
241
+        this.listLength = result.totalNum;
242
+      }
243
+    });
244
+  }
245
+
246
+  // 新增/编辑弹框
247
+  addModal() {
248
+    this.add = true; //新增
249
+    this.modal = true;
250
+    this.initForm();
251
+  }
252
+  //关闭新增/编辑弹框
253
+  hideAddModal() {
254
+    this.modal = false;
255
+    this.initForm();
256
+  }
257
+  // 初始化新增form表单
258
+  initForm() {
259
+    this.validateForm = this.fb.group({
260
+      keyword: [null, [Validators.required]],
261
+      startDepartment: [null, [Validators.required]],
262
+      endDepartment: [null, [Validators.required]],
263
+    });
264
+    this.timeSelectedValue = [];
265
+  }
266
+
267
+  // 新增/编辑表单提交
268
+  submitForm(): void {
269
+    this.btnLoading = true;
270
+    for (const i in this.validateForm.controls) {
271
+      this.validateForm.controls[i].markAsDirty();
272
+      this.validateForm.controls[i].updateValueAndValidity();
273
+    }
274
+    if (this.validateForm.invalid) {
275
+      this.btnLoading = false;
276
+      return;
277
+    }
278
+    let data = {};
279
+
280
+    if (this.add) {
281
+      //新增
282
+    } else {
283
+      //编辑
284
+      data = {
285
+        id: this.coopId,
286
+        deleted: false,
287
+        desc: this.validateForm.controls.endDepartment.value,
288
+      };
289
+    }
290
+    this.mainService.upDictionary(data).subscribe((result: any) => {
291
+      this.btnLoading = false;
292
+      this.hideAddModal();
293
+      this.initForm();
294
+      if (result.status == 200) {
295
+        this.listLength++;
296
+        this.showPromptModal(this.add ? "新增" : "修改", true, "");
297
+      } else {
298
+        this.showPromptModal(this.add ? "新增" : "修改", false, "");
299
+      }
300
+    });
301
+  }
302
+
303
+  // 编辑
304
+  maskFlag: any = false;
305
+  edit(e, data) {
306
+    e.stopPropagation();
307
+    this.add = false;
308
+    this.coopId = data[4];
309
+    this.validateForm.controls.keyword.setValue(data[2]); //关键字
310
+    this.validateForm.controls.endDepartment.setValue(data[3]); //匹配的科室
311
+    // --------检查原科室---
312
+    let startDeptArr = []; //临时检查原科室数组
313
+    let startDept = data[1]; //科室id
314
+    let startDeptShow = data[0]; //科室名称
315
+    startDeptArr.push({ id: startDept, dept: startDeptShow });
316
+    let startDept$ = this.mainService.getFetchDataList("data", "department", {
317
+      department: {
318
+        hospital: { id: data.hospital },
319
+      },
320
+      idx: 0,
321
+      sum: 10,
322
+    });
323
+    // --------/检查原科室---
324
+    // --------匹配的科室---
325
+    // let targetDeptArr = []; //临时匹配的科室数组
326
+    // let targetDept = data.targetDept.split(","); //科室id
327
+    // let targetDeptShow = data.targetDeptShow.split(","); //科室名称
328
+    // targetDept.forEach((item, index) => {
329
+    //   targetDeptArr.push({ id: item, dept: targetDeptShow[index] });
330
+    // });
331
+    // let targetDept$ = this.mainService.getFetchDataList("data", "department", {
332
+    //   department: {
333
+    //     hospital: { id: data.hospital },
334
+    //     type: { id: 282 },
335
+    //   },
336
+    //   idx: 0,
337
+    //   sum: 20,
338
+    // });
339
+    // --------/匹配的科室---
340
+    this.maskFlag = this.message.loading("正在加载中..", {
341
+      nzDuration: 0,
342
+    }).messageId;
343
+    forkJoin(startDept$).subscribe((res) => {
344
+      this.message.remove(this.maskFlag);
345
+      this.maskFlag = false;
346
+      this.modal = true;
347
+      //检查原科室
348
+      if (res[0]["status"] == 200) {
349
+        let add = startDeptArr.filter(
350
+          (item) => !res[0]["list"].some((ele) => ele.id == item.id)
351
+        ); //过滤掉已有的选项
352
+        this.department = add.concat(res[0]["list"]); //拼接数组
353
+        this.validateForm.controls.startDepartment.setValue(data[1] + ""); //检查原科室
354
+      }
355
+      //匹配的科室
356
+      // if (res[2]["status"] == 200) {
357
+      //   let add = targetDeptArr.filter(
358
+      //     (item) => !res[2]["list"].some((ele) => ele.id == item.id)
359
+      //   ); //过滤掉已有的选项
360
+      //   this.department1 = add.concat(res[2]["list"]); //拼接数组
361
+      //   this.validateForm.controls.endDepartment.setValue(targetDept); //匹配的科室
362
+      // }
363
+    });
364
+  }
365
+
366
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
367
+  showPromptModal(con, success, promptInfo?) {
368
+    this.promptModalShow = false;
369
+    this.promptContent = con;
370
+    this.ifSuccess = success;
371
+    this.promptInfo = promptInfo;
372
+    setTimeout(() => {
373
+      this.promptModalShow = true;
374
+    }, 100);
375
+    this.getList(0);
376
+  }
377
+
378
+  // 删除快捷建单
379
+  delModal: boolean = false; //删除模态框
380
+  tipsMsg1: string; //提示框信息
381
+  tipsMsg2: string; //操作后信息
382
+  confirmDelType: string; //确认的类型(启用/停用,删除)
383
+  confirmDelIsSwitch: boolean; //启用/停用
384
+  showDelModal(
385
+    e,
386
+    id: number,
387
+    tipsMsg1: string,
388
+    tipsMsg2: string,
389
+    type: string,
390
+    isSwitch?: boolean
391
+  ) {
392
+    e.stopPropagation();
393
+    this.confirmDelIsSwitch = isSwitch;
394
+    this.confirmDelType = type;
395
+    this.delModal = true;
396
+    this.coopId = id;
397
+    this.tipsMsg1 = tipsMsg1;
398
+    this.tipsMsg2 = tipsMsg2;
399
+  }
400
+  // 隐藏删除框
401
+  hideDelModal() {
402
+    this.delModal = false;
403
+  }
404
+  // 确认删除
405
+  confirmDel() {
406
+    this.btnLoading = true;
407
+    if (this.confirmDelType === "del") {
408
+      //删除
409
+      this.mainService
410
+        .upDictionary({ id: this.coopId, deleted: true })
411
+        .subscribe((data: any) => {
412
+          this.btnLoading = false;
413
+          this.delModal = false;
414
+          if (data.status == 200) {
415
+            if (
416
+              this.listOfData.length == 1 &&
417
+              this.pageIndex == Math.ceil(this.listLength / this.pageSize)
418
+            ) {
419
+              this.listLength--;
420
+              if (this.listLength === 0) {
421
+                this.pageIndex = 1;
422
+              } else {
423
+                this.pageIndex = Math.ceil(this.listLength / this.pageSize);
424
+              }
425
+            }
426
+            this.showPromptModal(this.tipsMsg2, true, "");
427
+          } else {
428
+            this.showPromptModal(this.tipsMsg2, false, data.msg);
429
+          }
430
+        });
431
+    } else if (this.confirmDelType === "switch") {
432
+      //启用/停用
433
+      this.mainService
434
+        .switchRoundRobin(
435
+          this.confirmDelIsSwitch ? "stop" : "active",
436
+          this.coopId
437
+        )
438
+        .subscribe((data) => {
439
+          this.btnLoading = false;
440
+          this.delModal = false;
441
+          if (data.status == 200) {
442
+            this.showPromptModal(this.tipsMsg2, true, "");
443
+          } else {
444
+            this.showPromptModal(this.tipsMsg2, false, data.msg);
445
+          }
446
+        });
447
+    }
448
+  }
449
+
450
+  // 院区列表
451
+  getHospitalList() {
452
+    this.hospitalList = [this.tool.getCurrentHospital()];
453
+  }
454
+  //时间选择框相关
455
+  timeSelectedValue = [];
456
+  defaultSelectTimesOption = [];
457
+
458
+  time: Date | null = null;
459
+  defaultTimePickerOpenValue = new Date();
460
+  timePickerOpen = false;
461
+  timeSelectFocus() {
462
+    this.timePickerOpen = true;
463
+  }
464
+  timePickerClick() {
465
+    this.timePickerOpen = false;
466
+    this.time = this.time || new Date();
467
+    let hour = (this.time.getHours() + "").padStart(2, "0");
468
+    let minute = (this.time.getMinutes() + "").padStart(2, "0");
469
+    let str = `${hour}:${minute}`;
470
+    if (!this.timeSelectedValue.includes(str)) {
471
+      this.defaultSelectTimesOption.push(str);
472
+      this.timeSelectedValue.push(str);
473
+    }
474
+  }
475
+  timePickerChange() {
476
+    if (this.timePickerOpen) {
477
+      this.timePickerOpen = false;
478
+    }
479
+  }
480
+}

+ 12 - 0
src/app/views/check-dept-exception/check-dept-exception.module.ts

@@ -0,0 +1,12 @@
1
+import { NgModule } from "@angular/core";
2
+import { CommonModule } from "@angular/common";
3
+
4
+import { CheckDeptExceptionRoutingModule } from "./check-dept-exception-routing.module";
5
+import { ShareModule } from "src/app/share/share.module";
6
+import { CheckDeptExceptionComponent } from "./check-dept-exception.component";
7
+
8
+@NgModule({
9
+  declarations: [CheckDeptExceptionComponent],
10
+  imports: [CommonModule, CheckDeptExceptionRoutingModule, ShareModule],
11
+})
12
+export class CheckDeptExceptionModule {}

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

@@ -108,7 +108,8 @@
108 108
                   <span class="left mr8"><label nz-checkbox [ngModel]="data.checked"
109 109
                       (ngModelChange)="batchDispatchSelect($event,data.id)"></label></span>
110 110
                   <span class="left gongdan_name" nz-tooltip
111
-                    [nzTooltipTitle]="data.taskType.taskName+'('+data.gdcode+')'">{{data.taskType.taskName}}({{data.gdcode}})</span>
111
+                    [nzTooltipTitle]="data.taskType.taskName+'('+data.gdcode+')'">{{data.taskType.isHalfInspect ===
112
+                    1?'半程陪检':data.taskType.taskName}}({{data.gdcode}})</span>
112 113
                   <span>{{data.worker?data.worker.name:''}}</span>
113 114
                   <span class="right">
114 115
                     <span [ngClass]="{'colorRed':data.timeOut==true}">{{data.gdState.name}}</span>
@@ -273,7 +274,8 @@
273 274
                   <span class="left mr8"><label nz-checkbox [ngModel]="data.checked"
274 275
                       (ngModelChange)="batchWithdrawalSelect($event,data.id)"></label></span>
275 276
                   <span class="left gongdan_name" nz-tooltip
276
-                    [nzTooltipTitle]="data.taskType.taskName+'('+data.gdcode+')'">{{data.taskType.taskName}}({{data.gdcode}})</span>
277
+                    [nzTooltipTitle]="data.taskType.taskName+'('+data.gdcode+')'">{{data.taskType.isHalfInspect ===
278
+                    1?'半程陪检':data.taskType.taskName}}({{data.gdcode}})</span>
277 279
                   <span>{{data.worker?data.worker.name:''}}</span>
278 280
                   <span class="right">
279 281
                     <span [ngClass]="{'colorRed':data.timeOut==true}">{{data.gdState.name}}</span>
@@ -436,7 +438,8 @@
436 438
                 <!-- 工单 -->
437 439
                 <div class="gongdan">
438 440
                   <span class="left gongdan_name" nz-tooltip
439
-                    [nzTooltipTitle]="data.taskType.taskName+'('+data.gdcode+')'">{{data.taskType.taskName}}({{data.gdcode}})</span>
441
+                    [nzTooltipTitle]="data.taskType.taskName+'('+data.gdcode+')'">{{data.taskType.isHalfInspect ===
442
+                    1?'半程陪检':data.taskType.taskName}}({{data.gdcode}})</span>
440 443
                   <span>{{data.worker?data.worker.name:''}}</span>
441 444
                   <span class="right">
442 445
                     <span [ngClass]="{'colorRed':data.timeOut==true}">{{data.gdState.name}}</span>

+ 117 - 83
src/app/views/hospital-config/hospital-config.component.html

@@ -4,90 +4,124 @@
4 4
     <form nz-form [formGroup]="validateForm" class="forms">
5 5
       <div class="form">
6 6
         <nz-form-item class="formItem" *ngFor="let config of hospitalConfigList">
7
-          <ng-container *ngIf="config.key === 'autoCreateUserRoleId'">
8
-            <nz-form-label [nzSpan]="24" [nzFor]="config.key" nzRequired class="label">{{config.desc}}</nz-form-label>
9
-            <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
10
-              <nz-select [formControlName]="config.key" [nzPlaceHolder]="'请选择'+config.desc" nzShowSearch nzServerSearch>
11
-                <ng-container *ngFor="let o of roleList">
12
-                  <nz-option *ngIf="true" [nzValue]="o.id" [nzLabel]="o.role"></nz-option>
13
-                </ng-container>
14
-                <nz-option *ngIf="false" nzDisabled nzCustomContent>
15
-                  <i nz-icon nzType="loading" class="loading-icon"></i> 正在加载中...
16
-                </nz-option>
17
-              </nz-select>
18
-            </nz-form-control>
19
-          </ng-container>
20
-          <ng-container *ngIf="config.key === 'autoCreateUserDeptId'">
21
-            <nz-form-label [nzSpan]="24" [nzFor]="config.key" nzRequired class="label">{{config.desc}}</nz-form-label>
22
-            <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
23
-              <nz-select [formControlName]="config.key" [nzPlaceHolder]="'请选择'+config.desc" nzShowSearch nzServerSearch
24
-                (nzOnSearch)="onSearch($event)">
25
-                <ng-container *ngFor="let o of deptList">
26
-                  <nz-option *ngIf="!searchLoading" [nzValue]="o.id" [nzLabel]="o.dept"></nz-option>
27
-                </ng-container>
28
-                <nz-option *ngIf="searchLoading" nzDisabled nzCustomContent>
29
-                  <i nz-icon nzType="loading" class="loading-icon"></i> 正在加载中...
30
-                </nz-option>
31
-              </nz-select>
32
-            </nz-form-control>
33
-          </ng-container>
34
-          <ng-container *ngIf="config.key === 'autoCreateUserGroupId'">
35
-            <nz-form-label [nzSpan]="24" [nzFor]="config.key" nzRequired class="label">{{config.desc}}</nz-form-label>
36
-            <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
37
-              <nz-select [formControlName]="config.key" [nzPlaceHolder]="'请选择'+config.desc" nzShowSearch nzServerSearch>
38
-                <ng-container *ngFor="let o of groupList">
39
-                  <nz-option *ngIf="true" [nzValue]="o.id" [nzLabel]="o.groupName"></nz-option>
40
-                </ng-container>
41
-                <nz-option *ngIf="false" nzDisabled nzCustomContent>
42
-                  <i nz-icon nzType="loading" class="loading-icon"></i> 正在加载中...
43
-                </nz-option>
44
-              </nz-select>
45
-            </nz-form-control>
46
-          </ng-container>
47
-          <ng-container
48
-            *ngIf="(config.key === 'phone_num_port'||config.key === 'phone_num_port1'||config.key === 'phone_num_port2'||config.key === 'phone_num_port3')">
49
-            <nz-form-label [nzSpan]="24" [nzFor]="config.key" class="label">
50
-              {{config.desc}}</nz-form-label>
51
-            <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
52
-              <div class="phone">
7
+          <ng-container [ngSwitch]="config.key">
8
+            <ng-container *ngSwitchCase="'autoCreateUserRoleId'">
9
+              <nz-form-label [nzSpan]="24" [nzFor]="config.key" nzRequired class="label">{{config.desc}}</nz-form-label>
10
+              <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
11
+                <nz-select [formControlName]="config.key" [nzPlaceHolder]="'请选择'+config.desc" nzShowSearch
12
+                  nzServerSearch>
13
+                  <ng-container *ngFor="let o of roleList">
14
+                    <nz-option *ngIf="true" [nzValue]="o.id" [nzLabel]="o.role"></nz-option>
15
+                  </ng-container>
16
+                  <nz-option *ngIf="false" nzDisabled nzCustomContent>
17
+                    <i nz-icon nzType="loading" class="loading-icon"></i> 正在加载中...
18
+                  </nz-option>
19
+                </nz-select>
20
+              </nz-form-control>
21
+            </ng-container>
22
+            <ng-container *ngSwitchCase="'autoCreateUserDeptId'">
23
+              <nz-form-label [nzSpan]="24" [nzFor]="config.key" nzRequired class="label">{{config.desc}}</nz-form-label>
24
+              <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
25
+                <nz-select [formControlName]="config.key" [nzPlaceHolder]="'请选择'+config.desc" nzShowSearch
26
+                  nzServerSearch (nzOnSearch)="onSearch($event)">
27
+                  <ng-container *ngFor="let o of deptList">
28
+                    <nz-option *ngIf="!searchLoading" [nzValue]="o.id" [nzLabel]="o.dept"></nz-option>
29
+                  </ng-container>
30
+                  <nz-option *ngIf="searchLoading" nzDisabled nzCustomContent>
31
+                    <i nz-icon nzType="loading" class="loading-icon"></i> 正在加载中...
32
+                  </nz-option>
33
+                </nz-select>
34
+              </nz-form-control>
35
+            </ng-container>
36
+            <ng-container *ngSwitchCase="'autoCreateUserGroupId'">
37
+              <nz-form-label [nzSpan]="24" [nzFor]="config.key" nzRequired class="label">{{config.desc}}</nz-form-label>
38
+              <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
39
+                <nz-select [formControlName]="config.key" [nzPlaceHolder]="'请选择'+config.desc" nzShowSearch
40
+                  nzServerSearch>
41
+                  <ng-container *ngFor="let o of groupList">
42
+                    <nz-option *ngIf="true" [nzValue]="o.id" [nzLabel]="o.groupName"></nz-option>
43
+                  </ng-container>
44
+                  <nz-option *ngIf="false" nzDisabled nzCustomContent>
45
+                    <i nz-icon nzType="loading" class="loading-icon"></i> 正在加载中...
46
+                  </nz-option>
47
+                </nz-select>
48
+              </nz-form-control>
49
+            </ng-container>
50
+            <ng-container *ngSwitchCase="'phone_num_port'">
51
+              <nz-form-label [nzSpan]="24" [nzFor]="config.key" class="label">
52
+                {{config.desc}}</nz-form-label>
53
+              <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
54
+                <div class="phone">
55
+                  <input [formControlName]="config.key" nz-input [placeholder]="'请选择'+config.desc" />
56
+                  <input nz-input [value]="config.value2" disabled />
57
+                </div>
58
+              </nz-form-control>
59
+            </ng-container>
60
+            <ng-container *ngSwitchCase="'phone_num_port1'">
61
+              <nz-form-label [nzSpan]="24" [nzFor]="config.key" class="label">
62
+                {{config.desc}}</nz-form-label>
63
+              <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
64
+                <div class="phone">
65
+                  <input [formControlName]="config.key" nz-input [placeholder]="'请选择'+config.desc" />
66
+                  <input nz-input [value]="config.value2" disabled />
67
+                </div>
68
+              </nz-form-control>
69
+            </ng-container>
70
+            <ng-container *ngSwitchCase="'phone_num_port2'">
71
+              <nz-form-label [nzSpan]="24" [nzFor]="config.key" class="label">
72
+                {{config.desc}}</nz-form-label>
73
+              <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
74
+                <div class="phone">
75
+                  <input [formControlName]="config.key" nz-input [placeholder]="'请选择'+config.desc" />
76
+                  <input nz-input [value]="config.value2" disabled />
77
+                </div>
78
+              </nz-form-control>
79
+            </ng-container>
80
+            <ng-container *ngSwitchCase="'phone_num_port3'">
81
+              <nz-form-label [nzSpan]="24" [nzFor]="config.key" class="label">
82
+                {{config.desc}}</nz-form-label>
83
+              <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
84
+                <div class="phone">
85
+                  <input [formControlName]="config.key" nz-input [placeholder]="'请选择'+config.desc" />
86
+                  <input nz-input [value]="config.value2" disabled />
87
+                </div>
88
+              </nz-form-control>
89
+            </ng-container>
90
+            <ng-container *ngSwitchCase="'rebackPatientTypeId'">
91
+              <nz-form-label [nzSpan]="24" [nzFor]="config.key" nzRequired class="label">{{config.desc}}</nz-form-label>
92
+              <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
93
+                <nz-select [formControlName]="config.key" [nzPlaceHolder]="'请选择'+config.desc" nzShowSearch
94
+                  nzServerSearch>
95
+                  <ng-container *ngFor="let o of taskTypeList">
96
+                    <nz-option *ngIf="true" [nzValue]="o.id" [nzLabel]="o.taskName"></nz-option>
97
+                  </ng-container>
98
+                  <nz-option *ngIf="false" nzDisabled nzCustomContent>
99
+                    <i nz-icon nzType="loading" class="loading-icon"></i> 正在加载中...
100
+                  </nz-option>
101
+                </nz-select>
102
+              </nz-form-control>
103
+            </ng-container>
104
+            <ng-container *ngSwitchCase="'transDeptTypeId'">
105
+              <nz-form-label [nzSpan]="24" [nzFor]="config.key" nzRequired class="label">{{config.desc}}</nz-form-label>
106
+              <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
107
+                <nz-select [formControlName]="config.key" [nzPlaceHolder]="'请选择'+config.desc" nzShowSearch
108
+                  nzServerSearch>
109
+                  <ng-container *ngFor="let o of taskTypeList">
110
+                    <nz-option *ngIf="true" [nzValue]="o.id" [nzLabel]="o.taskName"></nz-option>
111
+                  </ng-container>
112
+                  <nz-option *ngIf="false" nzDisabled nzCustomContent>
113
+                    <i nz-icon nzType="loading" class="loading-icon"></i> 正在加载中...
114
+                  </nz-option>
115
+                </nz-select>
116
+              </nz-form-control>
117
+            </ng-container>
118
+            <ng-container *ngSwitchDefault>
119
+              <nz-form-label [nzSpan]="24" [nzFor]="config.key" [nzRequired]="config.required" class="label">
120
+                {{config.desc}}</nz-form-label>
121
+              <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
53 122
                 <input [formControlName]="config.key" nz-input [placeholder]="'请选择'+config.desc" />
54
-                <input nz-input [value]="config.value2" disabled />
55
-              </div>
56
-            </nz-form-control>
57
-          </ng-container>
58
-          <ng-container *ngIf="config.key === 'rebackPatientTypeId'">
59
-            <nz-form-label [nzSpan]="24" [nzFor]="config.key" nzRequired class="label">{{config.desc}}</nz-form-label>
60
-            <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
61
-              <nz-select [formControlName]="config.key" [nzPlaceHolder]="'请选择'+config.desc" nzShowSearch nzServerSearch>
62
-                <ng-container *ngFor="let o of taskTypeList">
63
-                  <nz-option *ngIf="true" [nzValue]="o.id" [nzLabel]="o.taskName"></nz-option>
64
-                </ng-container>
65
-                <nz-option *ngIf="false" nzDisabled nzCustomContent>
66
-                  <i nz-icon nzType="loading" class="loading-icon"></i> 正在加载中...
67
-                </nz-option>
68
-              </nz-select>
69
-            </nz-form-control>
70
-          </ng-container>
71
-          <ng-container *ngIf="config.key === 'transDeptTypeId'">
72
-            <nz-form-label [nzSpan]="24" [nzFor]="config.key" nzRequired class="label">{{config.desc}}</nz-form-label>
73
-            <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
74
-              <nz-select [formControlName]="config.key" [nzPlaceHolder]="'请选择'+config.desc" nzShowSearch nzServerSearch>
75
-                <ng-container *ngFor="let o of taskTypeList">
76
-                  <nz-option *ngIf="true" [nzValue]="o.id" [nzLabel]="o.taskName"></nz-option>
77
-                </ng-container>
78
-                <nz-option *ngIf="false" nzDisabled nzCustomContent>
79
-                  <i nz-icon nzType="loading" class="loading-icon"></i> 正在加载中...
80
-                </nz-option>
81
-              </nz-select>
82
-            </nz-form-control>
83
-          </ng-container>
84
-          <ng-container
85
-            *ngIf="(config.key !== 'autoCreateUserRoleId'&&config.key !== 'autoCreateUserDeptId'&&config.key !== 'autoCreateUserGroupId'&&config.key !== 'phone_num_port'&&config.key !== 'phone_num_port1'&&config.key !== 'phone_num_port2'&&config.key !== 'phone_num_port3'&&config.key !== 'rebackPatientTypeId'&&config.key !== 'transDeptTypeId')">
86
-            <nz-form-label [nzSpan]="24" [nzFor]="config.key" [nzRequired]="config.required" class="label">
87
-              {{config.desc}}</nz-form-label>
88
-            <nz-form-control [nzSpan]="24" [nzErrorTip]="'请选择'+config.desc+'!'">
89
-              <input [formControlName]="config.key" nz-input [placeholder]="'请选择'+config.desc" />
90
-            </nz-form-control>
123
+              </nz-form-control>
124
+            </ng-container>
91 125
           </ng-container>
92 126
         </nz-form-item>
93 127
       </div>

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

@@ -57,7 +57,7 @@ export class HospitalConfigComponent implements OnInit {
57 57
       this.getRoleList(),
58 58
       this.getDeptList(this.hosId),
59 59
       this.getGroupList(this.hosId),
60
-      this.getTaskTypeList(),
60
+      this.getTaskTypeList([255]),
61 61
     ])
62 62
       .then((result) => {
63 63
         if (result[0].status == 200) {
@@ -152,16 +152,18 @@ export class HospitalConfigComponent implements OnInit {
152 152
       .toPromise();
153 153
   }
154 154
   // 获取任务类型列表(患者其他服务)
155
-  getTaskTypeList() {
156
-    let postData = {
155
+  getTaskTypeList(associationTypeIds?) {
156
+    let postData: any = {
157 157
       idx: 0,
158 158
       sum: 999,
159 159
       taskType: {
160 160
         hosIds: this.hosId,
161 161
         simpleQuery: true,
162
-        associationType: { id: 255 },
163 162
       },
164 163
     };
164
+    if (associationTypeIds) {
165
+      postData.taskType.associationTypeIds = associationTypeIds.toString();
166
+    }
165 167
     return this.mainService
166 168
       .getFetchDataList("configuration", "taskType", postData)
167 169
       .toPromise();

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

@@ -649,7 +649,8 @@
649 649
                         <div class="info">
650 650
                           <div class="row" nz-row>
651 651
                             <div nz-col nzSpan="12" class="col txtL">
652
-                              {{item.taskType.taskName}}
652
+                              {{item.taskType.isHalfInspect ===
653
+                              1?'半程陪检':item.taskType.taskName}}
653 654
                               <span
654 655
                                 *ngIf="item.patient&&(item.taskType.associationType.value=='patientTransport'||item.taskType.associationType.value=='inspect')">
655 656
                                 ({{item.patient.patientName}})
@@ -803,6 +804,8 @@
803 804
                     </div>
804 805
                   </div>
805 806
                 </nz-checkbox-wrapper>
807
+                <div class="red" style="line-height: normal;font-weight: bold;"
808
+                  *ngIf="currentTasktype.isMoreDept === 0&&isInspects">您选择的检查包含了多个科室,请您只包好一个科室。</div>
806 809
               </nz-form-control>
807 810
               <div *ngIf="!linkCheckLis.length">暂无关联的检查</div>
808 811
             </nz-form-item>
@@ -934,11 +937,11 @@
934 937
     </overlay-scrollbars>
935 938
     <div class="btns display_flex justify-content_flex-center">
936 939
       <button nz-button nzType="primary" [nzLoading]="btnLoading1" (click)="confirmPatient1('patient-yuyue')"
937
-        *ngIf="currentTasktype.associationType.value === 'inspect'&&isYyInspect">预约建单</button>
940
+        *ngIf="currentTasktype.associationType.value === 'inspect'&&isYyInspect&&!(currentTasktype.isMoreDept === 0&&isInspects)">预约建单</button>
938 941
       <button nz-button nzType="primary" [nzLoading]="btnLoading1" (click)="confirmPatient1('patient-zy-yuyue')"
939 942
         *ngIf="currentTasktype.associationType.value === 'patientTransport'&&isYyInspect">预约建单</button>
940 943
       <button nz-button nzType="default" [nzLoading]="btnLoading" (click)="confirmPatient()" class="orderThis"
941
-        *ngIf="(!isYyInspect&&currentTasktype.associationType.value === 'inspect'&&linkCheckLisTrue)||(!isYyInspect&&currentTasktype.associationType.value === 'patientTransport')">直接建单</button>
944
+        *ngIf="((!isYyInspect&&currentTasktype.associationType.value === 'inspect'&&linkCheckLisTrue)||(!isYyInspect&&currentTasktype.associationType.value === 'patientTransport'))&&!(currentTasktype.isMoreDept === 0&&isInspects)">直接建单</button>
942 945
       <button class="btn cancel" nz-button nzType="default" (click)="hidePatientOrder()">取消</button>
943 946
     </div>
944 947
   </div>

+ 8 - 0
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -1461,6 +1461,7 @@ export class HushijiandanComponent implements OnInit {
1461 1461
           let arr = [];
1462 1462
           data.data.forEach((e) => {
1463 1463
             arr.push({
1464
+              execDeptId: e.execDept.id,
1464 1465
               yyTime: e.yyTime,
1465 1466
               priority: e.priority,
1466 1467
               label:
@@ -1527,9 +1528,16 @@ export class HushijiandanComponent implements OnInit {
1527 1528
   linkCheckLisTrue = false; //是否有已选择(患者)
1528 1529
   isInspectPriority = false; //选择的检查是否紧急(患者)
1529 1530
   filterLinkCheckLis = []; //有预约时间并且选中的
1531
+  isInspects = false; //勾选检车的时候是否多个检查多个检查科室
1530 1532
   linkCheckLisChange(e) {
1531 1533
     let flag = false; //检查是否紧急
1532 1534
     let arr = []; //选中的索引
1535
+    // 是否检查生成工单允许多个科室,1是,0否
1536
+    if (this.currentTasktype.isMoreDept === 0) {
1537
+      let arr = e.map((item) => item.execDeptId);
1538
+      arr = Array.from(new Set(arr));
1539
+      this.isInspects = arr.length > 1;
1540
+    }
1533 1541
     this.linkCheckLis.forEach((item, index) => {
1534 1542
       if (e.length) {
1535 1543
         //有选中的检查

+ 12 - 0
src/app/views/inspect-type-config/inspect-type-config-routing.module.ts

@@ -0,0 +1,12 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+import { InspectTypeConfigComponent } from './inspect-type-config.component';
4
+
5
+
6
+const routes: Routes = [{ path: "", component: InspectTypeConfigComponent }];
7
+
8
+@NgModule({
9
+  imports: [RouterModule.forChild(routes)],
10
+  exports: [RouterModule]
11
+})
12
+export class InspectTypeConfigRoutingModule { }

+ 129 - 0
src/app/views/inspect-type-config/inspect-type-config.component.html

@@ -0,0 +1,129 @@
1
+<div class="groupManagement">
2
+  <div class="groupInfo">
3
+    <div class="title">检查类型</div>
4
+    <div class="operate">
5
+      <div *ngIf="coopBtns.add" class="add item" (click)="showCoopModal('add')">新增</div>
6
+      <div *ngIf="coopBtns.edit" class="edit item" (click)="showCoopModal('edit')">编辑</div>
7
+      <div *ngIf="coopBtns.del" class="del item" (click)="showDelModal()">删除</div>
8
+    </div>
9
+    <div class="groups" [ngStyle]="{display:!buildingsLoading?'block':'none'}">
10
+      <overlay-scrollbars #osComponentRef1 [ngStyle]="{ height:'100%' }">
11
+        <div [ngClass]="{'item':true,'checked':data.id==checkedBuilding.id}" *ngFor="let data of inspectTypeList"
12
+          (click)="checkBuilding(data)" [title]="data.name">{{data.name}}</div>
13
+      </overlay-scrollbars>
14
+    </div>
15
+    <div class="groups" *ngIf="buildingsLoading">
16
+      <div class="loadingFull display_flex justify-content_flex-center align-items_center">
17
+        <div class="loadingFullInner">
18
+          <img src="../../../assets/images/loading.gif" alt="">
19
+          <div>加载中...</div>
20
+        </div>
21
+      </div>
22
+    </div>
23
+  </div>
24
+  <div class="userInfo">
25
+    <div class="top display_flex justify-content_flex-end align-items_center">
26
+      <div class="display_flex align-items_center">
27
+        <span>已选择 {{selectedFloor.length}} 个关键字</span>
28
+        <button class="btn default" *ngIf="coopBtns.add&&inspectTypeList.length" nzType="primary" nz-button
29
+          (click)="showFloorModal($event,'add')">新增</button>
30
+        <button class="btn default" *ngIf="coopBtns.del&&inspectTypeList.length" nzType="primary" nz-button
31
+          (click)="showDelFloorModal($event)" [disabled]="allFloorList.length===0">批量删除</button>
32
+      </div>
33
+    </div>
34
+    <div class="table" *ngIf="!buildingsLoading">
35
+      <nz-table class="groupManagementTable" #rowSelectionTable [nzPageSize]="9999" [nzData]="allFloorList"
36
+        [nzShowPagination]="false" [nzScroll]="{ y: tableHeight+'px' }" [nzLoading]="floorsLoading">
37
+        <thead>
38
+          <tr class="thead">
39
+            <th nzWidth="5%" nzShowCheckbox [(nzChecked)]="isAllDisplayDataChecked"
40
+              (nzCheckedChange)="checkAll($event)"></th>
41
+            <th nzWidth="75%">关键字</th>
42
+            <th nzWidth="20%">操作</th>
43
+          </tr>
44
+        </thead>
45
+        <tbody>
46
+          <tr *ngFor="let data of rowSelectionTable.data" (click)="selectedUser(data)">
47
+            <td nzShowCheckbox [(nzDisabled)]="!coopBtns.edit" [(nzChecked)]="mapOfCheckedId[data.id]"
48
+              (nzCheckedChange)="refreshStatus()"></td>
49
+            <td>{{ data.floorName }}</td>
50
+            <td>
51
+              <button nz-button nzType="primary" nzSize="small" (click)="showFloorModal($event,'edit',data)">编辑</button>
52
+              <button nz-button nzType="primary" nzSize="small" class="ml8"
53
+                (click)="showDelFloorModal($event,data)">删除</button>
54
+            </td>
55
+          </tr>
56
+        </tbody>
57
+      </nz-table>
58
+    </div>
59
+  </div>
60
+
61
+  <!-- 新增/编辑检查类型模态框 -->
62
+  <div class="save display_flex justify-content_flex-center align-items_center add" *ngIf="coopModal">
63
+    <div class="modalBody">
64
+      <div class="title">{{add?'新增':'编辑'}}检查类型信息<i class="icon_transport transport-guanbi"
65
+          (click)="hideCoopModal()"></i>
66
+      </div>
67
+      <div class="content">
68
+        <form nz-form [formGroup]="validateForm" class="addForm" (ngSubmit)="submitForm()">
69
+          <nz-form-item>
70
+            <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="buildingName">检查类型名称</nz-form-label>
71
+            <nz-form-control nzErrorTip="请输入检查类型名称!">
72
+              <nz-input-group>
73
+                <input nz-input formControlName="buildingName" placeholder="请输入楼栋名称" />
74
+              </nz-input-group>
75
+            </nz-form-control>
76
+          </nz-form-item>
77
+        </form>
78
+      </div>
79
+      <div class=" display_flex justify-content_flex-center">
80
+        <button nzType="primary" [nzLoading]="btnLoading" nz-button (click)="submitForm()">确认</button>
81
+        <button class="btn cancel" nz-button nzType="default" (click)="hideCoopModal()">取消</button>
82
+      </div>
83
+    </div>
84
+  </div>
85
+  <!-- 新增/编辑关键字模态框 -->
86
+  <div class="save display_flex justify-content_flex-center align-items_center add" *ngIf="floorModal">
87
+    <div class="modalBody">
88
+      <div class="title">{{add?'新增':'编辑'}}关键字信息<i class="icon_transport transport-guanbi"
89
+          (click)="hideFloorModal()"></i>
90
+      </div>
91
+      <div class="content">
92
+        <form nz-form [formGroup]="validateFloorForm" class="addForm" (ngSubmit)="submitFormFloor()">
93
+          <nz-form-item>
94
+            <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="buildId">检查类型</nz-form-label>
95
+            <nz-form-control nzErrorTip="请选择检查类型!">
96
+              <nz-select formControlName="buildId" nzPlaceHolder="请选择检查类型" nzDisabled>
97
+                <nz-option *ngFor="let option of inspectTypeList" [nzLabel]="option.value" [nzValue]="option.id">
98
+                </nz-option>
99
+              </nz-select>
100
+            </nz-form-control>
101
+          </nz-form-item>
102
+          <nz-form-item>
103
+            <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="floorName">关键字名称</nz-form-label>
104
+            <nz-form-control nzErrorTip="请输入关键字名称!">
105
+              <nz-input-group>
106
+                <input nz-input formControlName="floorName" placeholder="请输入关键字名称" />
107
+              </nz-input-group>
108
+            </nz-form-control>
109
+          </nz-form-item>
110
+        </form>
111
+      </div>
112
+      <div class="display_flex justify-content_flex-center">
113
+        <button nzType="primary" [nzLoading]="btnLoading" nz-button (click)="submitFormFloor()">确认</button>
114
+        <button class="btn cancel" nz-button nzType="default" (click)="hideFloorModal()">取消</button>
115
+      </div>
116
+    </div>
117
+  </div>
118
+  <!-- 删除检查类型模态框 -->
119
+  <app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
120
+    (confirmDelEvent)="confirmDel()" content="您确认要删除检查类型吗?" tips="删除后对应的检查类型积分配置也会删除"></app-dialog-delete>
121
+  <!-- 删除关键字模态框 -->
122
+  <app-dialog-delete [delModal]="delFloorModal" (hideDelModalEvent)="hideDelFloorModal()" [btnLoading]="btnLoading"
123
+    (confirmDelEvent)="confirmFloorDel()" content="您确认要删除关键字吗?"></app-dialog-delete>
124
+</div>
125
+
126
+<!-- 操作成功/失败提示框 -->
127
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
128
+  [info]="promptInfo">
129
+</app-prompt-modal>

+ 282 - 0
src/app/views/inspect-type-config/inspect-type-config.component.less

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

+ 396 - 0
src/app/views/inspect-type-config/inspect-type-config.component.ts

@@ -0,0 +1,396 @@
1
+import { Component, OnInit, ViewChild } from "@angular/core";
2
+import { ActivatedRoute } 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 { GenerateFloorComponent } from "src/app/share/generate-floor/generate-floor.component";
9
+import { NzMessageService } from "ng-zorro-antd";
10
+
11
+@Component({
12
+  selector: "app-inspect-type-config",
13
+  templateUrl: "./inspect-type-config.component.html",
14
+  styleUrls: ["./inspect-type-config.component.less"],
15
+})
16
+export class InspectTypeConfigComponent implements OnInit {
17
+  tableHeight;
18
+  validateForm: FormGroup;
19
+  validateFloorForm: FormGroup;
20
+  allFloorList: any[] = []; //当前选中的检查类型包含的所有关键字
21
+  mapOfCheckedId: { [key: string]: boolean } = {};
22
+  checkedBuilding: any = {}; //选中检查类型
23
+  inspectTypeList: Array<any> = []; //检查类型信息
24
+  hosId: any; //当前选择的院区id
25
+  promptContent: string; //操作提示框提示信息
26
+  ifSuccess: boolean; //操作成功/失败
27
+  promptInfo: string; //操作结果提示信息
28
+  promptModalShow: boolean; //是否展示提示框
29
+  btnLoading: boolean = false; //确认按钮loading状态
30
+  coopBtns: any = {}; // 初始化增删改按钮
31
+  buildingsLoading = false; //获取检查类型列表的loading
32
+  floorsLoading = false; //获取关键字列表的loading
33
+  positionY = 0; //记录Y轴滚动距离
34
+  selectedFloor = []; //选中的关键字
35
+  coopModal: boolean = false; //检查类型模态框是否展示
36
+  add: boolean = true; //检查类型新增的标识,true:新增;false:编辑
37
+  floorModal: boolean = false; //关键字模态框是否展示
38
+  addFloor: boolean = true; //关键字,true:新增;false:编辑
39
+  floorDataEdit; //正在编辑的关键字
40
+  delModal: boolean = false; //删除检查类型,模态框是否显示
41
+  delFloorModal: boolean = false; //删除关键字,模态框是否显示
42
+  isDelSingle: boolean = false; //是否单个删除关键字
43
+  isAllDisplayDataChecked = false; //当前页是否全选
44
+
45
+  constructor(
46
+    private fb: FormBuilder,
47
+    private route: ActivatedRoute,
48
+    private mainService: MainService,
49
+    private msg: NzMessageService,
50
+    private tool: ToolService
51
+  ) {}
52
+
53
+  @ViewChild("osComponentRef1", {
54
+    read: OverlayScrollbarsComponent,
55
+    static: false,
56
+  })
57
+  osComponentRef1: OverlayScrollbarsComponent;
58
+  @ViewChild(GenerateFloorComponent, { static: false })
59
+  generate1: GenerateFloorComponent;
60
+
61
+  ngOnInit() {
62
+    this.coopBtns = this.tool.initCoopBtns(this.route);
63
+    this.hosId = this.tool.getCurrentHospital().id;
64
+    this.getBuildingList();
65
+    this.tableHeight = document.body.clientHeight - 267;
66
+  }
67
+  // 检查类型列表
68
+  getBuildingList() {
69
+    this.buildingsLoading = true;
70
+    this.mainService
71
+      .getDictionary("list", "inspect_check_type")
72
+      .subscribe((result) => {
73
+        this.buildingsLoading = false;
74
+        this.inspectTypeList = result;
75
+        if (Object.keys(this.checkedBuilding).length) {
76
+          result.list.forEach((item) => {
77
+            if (item.id == this.checkedBuilding.id) {
78
+              this.checkBuilding(item);
79
+            }
80
+          });
81
+        } else {
82
+          this.checkBuilding(result[0]);
83
+        }
84
+      });
85
+  }
86
+
87
+  // 获取选中检查类型下关键字列表
88
+  getAllFloor() {
89
+    // 初始化的时候搜索一次,然后前端过滤
90
+    let postData = {
91
+      idx: 0,
92
+      sum: 9999,
93
+      floor: { hosId: this.hosId, buildId: this.checkedBuilding.id },
94
+    };
95
+    this.floorsLoading = true;
96
+    this.mainService
97
+      .getFetchDataList("simple/data", "floor", postData)
98
+      .subscribe((result) => {
99
+        this.floorsLoading = false;
100
+        if (result.status == 200) {
101
+          this.allFloorList = result.list;
102
+          this.refreshStatus();
103
+        }
104
+      });
105
+  }
106
+
107
+  // 选中检查类型
108
+  checkBuilding(data) {
109
+    this.positionY = this.osComponentRef1.osInstance().scroll().position.y; //内容滚动的距离
110
+    this.checkedBuilding = data ? data : {};
111
+    this.mapOfCheckedId = {};
112
+    this.getAllFloor();
113
+  }
114
+
115
+  selectedUser(data) {
116
+    this.mapOfCheckedId[data.id] = !this.mapOfCheckedId[data.id];
117
+    this.refreshStatus();
118
+  }
119
+  // 选中列表中关键字
120
+  refreshStatus(): void {
121
+    let arr = [];
122
+    if (this.allFloorList.length) {
123
+      this.isAllDisplayDataChecked = this.allFloorList.every(
124
+        (item) => this.mapOfCheckedId[item.id]
125
+      );
126
+    } else {
127
+      this.isAllDisplayDataChecked = false;
128
+    }
129
+
130
+    for (var m in this.mapOfCheckedId) {
131
+      if (this.mapOfCheckedId[m]) {
132
+        arr.push({ id: m });
133
+      }
134
+    }
135
+    this.selectedFloor = arr;
136
+  }
137
+
138
+  // 新增/编辑检查类型模态框
139
+  showCoopModal(type) {
140
+    if (type == "edit" && !this.checkedBuilding.id) {
141
+      this.msg.create("warning", "请选择需要编辑的检查类型!");
142
+      return;
143
+    }
144
+    this.coopModal = true;
145
+    this.add = type == "add";
146
+    if (type == "edit") {
147
+      this.initForm();
148
+      this.validateForm.controls.buildingName.setValue(
149
+        this.checkedBuilding.name
150
+      );
151
+    } else {
152
+      this.initForm();
153
+    }
154
+  }
155
+
156
+  // 新增/编辑关键字模态框
157
+  showFloorModal(e, type, data?) {
158
+    this.floorModal = true;
159
+    this.addFloor = type == "add";
160
+    if (type == "edit") {
161
+      this.initFormFloor();
162
+      this.floorDataEdit = data;
163
+      this.validateFloorForm.controls.buildId.setValue(data.buildId);
164
+      this.validateFloorForm.controls.floorName.setValue(data.floorName);
165
+    } else {
166
+      this.initFormFloor();
167
+    }
168
+    e.stopPropagation();
169
+  }
170
+
171
+  // 隐藏检查类型模态框
172
+  hideCoopModal() {
173
+    this.coopModal = false;
174
+  }
175
+
176
+  // 隐藏关键字模态框
177
+  hideFloorModal() {
178
+    this.floorModal = false;
179
+  }
180
+
181
+  // 初始化新增form表单
182
+  initForm() {
183
+    this.validateForm = this.fb.group({
184
+      buildingName: [null, [Validators.required]],
185
+    });
186
+  }
187
+
188
+  // 初始化新增form表单floor
189
+  initFormFloor() {
190
+    this.validateFloorForm = this.fb.group({
191
+      buildId: [this.checkedBuilding.id, [Validators.required]],
192
+      floorName: [null, [Validators.required]],
193
+    });
194
+  }
195
+
196
+  // 新增/编辑检查类型提交
197
+  submitForm(): void {
198
+    for (const i in this.validateForm.controls) {
199
+      this.validateForm.controls[i].markAsDirty();
200
+      this.validateForm.controls[i].updateValueAndValidity();
201
+    }
202
+    if (this.validateForm.invalid) return;
203
+    this.btnLoading = true;
204
+    let postData;
205
+    let arr = this.inspectTypeList.filter(
206
+      (item) => item.value == this.validateForm.value.buildingName
207
+    );
208
+    //有重复名称
209
+    if (arr.length > 0) {
210
+      this.btnLoading = false;
211
+      this.showPromptModal(
212
+        "新增",
213
+        false,
214
+        `存在重复的检查类型名称【${this.validateForm.value.buildingName}】请修改后再保存!`
215
+      );
216
+      return;
217
+    }
218
+    if (this.add) {
219
+      postData = {
220
+        buildingName: this.validateForm.value.buildingName,
221
+        deleted: false,
222
+        hosId: this.hosId,
223
+      };
224
+    } else {
225
+      postData = {
226
+        buildingName: this.validateForm.value.buildingName,
227
+        deleted: false,
228
+        hosId: this.hosId,
229
+        id: this.checkedBuilding.id,
230
+      };
231
+    }
232
+    this.mainService
233
+      .simplePost("addData", "building", postData)
234
+      .subscribe((result) => {
235
+        this.hideCoopModal();
236
+        this.btnLoading = false;
237
+        if (result["status"] == 200) {
238
+          this.showPromptModal(this.add ? "新增" : "编辑", true, "");
239
+        } else {
240
+          this.showPromptModal(
241
+            this.add ? "新增" : "编辑",
242
+            false,
243
+            result["msg"]
244
+          );
245
+        }
246
+      });
247
+  }
248
+
249
+  // 新增/编辑关键字提交
250
+  submitFormFloor(): void {
251
+    for (const i in this.validateFloorForm.controls) {
252
+      this.validateFloorForm.controls[i].markAsDirty();
253
+      this.validateFloorForm.controls[i].updateValueAndValidity();
254
+    }
255
+    if (this.validateFloorForm.invalid) return;
256
+    this.btnLoading = true;
257
+    let postData;
258
+    let arr = this.allFloorList.filter(
259
+      (item) => item.floorName == this.validateFloorForm.value.floorName
260
+    );
261
+    //有重复名称
262
+    if (arr.length > 0) {
263
+      this.btnLoading = false;
264
+      this.showPromptModal(
265
+        "新增",
266
+        false,
267
+        `同一个检查类型存在重复的关键字名称【${this.validateFloorForm.value.floorName}】请修改后再保存!`
268
+      );
269
+      return;
270
+    }
271
+    if (this.addFloor) {
272
+      postData = {
273
+        buildId: this.validateFloorForm.value.buildId,
274
+        floorName: this.validateFloorForm.value.floorName,
275
+        deleted: false,
276
+        hosId: this.hosId,
277
+      };
278
+    } else {
279
+      postData = {
280
+        buildId: this.validateFloorForm.value.buildId,
281
+        floorName: this.validateFloorForm.value.floorName,
282
+        deleted: false,
283
+        hosId: this.hosId,
284
+        id: this.floorDataEdit.id,
285
+      };
286
+    }
287
+    this.addFloorHandler(postData, false);
288
+  }
289
+
290
+  //新增关键字
291
+  addFloorHandler(postData, flag) {
292
+    this.mainService
293
+      .simplePost(flag ? "addListData" : "addData", "floor", postData)
294
+      .subscribe((result) => {
295
+        this.hideFloorModal();
296
+        this.generate1 && (this.generate1.delModal = false);
297
+        this.btnLoading = false;
298
+        if (result["status"] == 200) {
299
+          this.showPromptModal(this.addFloor ? "新增" : "编辑", true, "");
300
+        } else {
301
+          this.showPromptModal(
302
+            this.addFloor ? "新增" : "编辑",
303
+            false,
304
+            result["msg"]
305
+          );
306
+        }
307
+      });
308
+  }
309
+
310
+  //删除检查类型
311
+  showDelModal() {
312
+    if (!this.checkedBuilding.id) {
313
+      this.msg.create("warning", "请选择需要删除的检查类型!");
314
+      return;
315
+    }
316
+    this.delModal = true;
317
+  }
318
+  hideDelModal() {
319
+    this.delModal = false;
320
+  }
321
+  // 确认删除
322
+  confirmDel() {
323
+    this.btnLoading = true;
324
+    let postData = [this.checkedBuilding["id"]];
325
+    this.mainService.delBuildingList(postData).subscribe((result) => {
326
+      this.hideDelModal();
327
+      this.btnLoading = false;
328
+      if (result["status"] == 200 && !result["data"][0].msg) {
329
+        this.showPromptModal("删除", true, "");
330
+        this.checkedBuilding = {};
331
+      } else {
332
+        this.showPromptModal("删除", false, result["data"][0].msg);
333
+      }
334
+    });
335
+  }
336
+  /**
337
+   * 删除关键字
338
+   * @param e 事件对象
339
+   * @param data 有值就是单个删除,无值就是批量删除
340
+   */
341
+  showDelFloorModal(e, data?) {
342
+    if (data) {
343
+      this.isDelSingle = true;
344
+      this.floorDataEdit = data;
345
+    } else {
346
+      this.isDelSingle = false;
347
+    }
348
+    this.delFloorModal = true;
349
+    e.stopPropagation();
350
+  }
351
+  hideDelFloorModal() {
352
+    this.delFloorModal = false;
353
+  }
354
+  // 确认删除
355
+  confirmFloorDel() {
356
+    this.btnLoading = true;
357
+    let selectedFloor = this.selectedFloor.map((item) => item.id);
358
+    let postData = this.isDelSingle ? [this.floorDataEdit.id] : selectedFloor;
359
+    this.mainService.delFloorList(postData).subscribe((result) => {
360
+      this.hideDelFloorModal();
361
+      this.btnLoading = false;
362
+      if (result["status"] == 200 && !result["data"][0].msg) {
363
+        this.showPromptModal("删除", true, "");
364
+      } else {
365
+        this.showPromptModal("删除", false, result["data"][0].msg);
366
+      }
367
+    });
368
+  }
369
+  // 全选
370
+  checkAll(value: boolean): void {
371
+    console.log(this.allFloorList);
372
+    this.allFloorList.forEach((item) => {
373
+      this.mapOfCheckedId[item.id] = value;
374
+    });
375
+    this.refreshStatus();
376
+  }
377
+
378
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
379
+  showPromptModal(con, success, promptInfo) {
380
+    this.promptModalShow = false;
381
+    this.promptContent = con;
382
+    this.ifSuccess = success;
383
+    this.promptInfo = promptInfo;
384
+    this.osComponentRef1.osInstance().scroll({ x: 0, y: this.positionY });
385
+    if (success) {
386
+      setTimeout(() => {
387
+        this.promptModalShow = true;
388
+        this.getBuildingList();
389
+      }, 100);
390
+    } else {
391
+      setTimeout(() => {
392
+        this.promptModalShow = true;
393
+      }, 100);
394
+    }
395
+  }
396
+}

+ 12 - 0
src/app/views/inspect-type-config/inspect-type-config.module.ts

@@ -0,0 +1,12 @@
1
+import { NgModule } from "@angular/core";
2
+import { CommonModule } from "@angular/common";
3
+
4
+import { InspectTypeConfigRoutingModule } from "./inspect-type-config-routing.module";
5
+import { ShareModule } from "src/app/share/share.module";
6
+import { InspectTypeConfigComponent } from "./inspect-type-config.component";
7
+
8
+@NgModule({
9
+  declarations: [InspectTypeConfigComponent],
10
+  imports: [CommonModule, InspectTypeConfigRoutingModule, ShareModule],
11
+})
12
+export class InspectTypeConfigModule {}

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

@@ -288,6 +288,22 @@ const routes: Routes = [
288 288
           ),
289 289
       },
290 290
       {
291
+        // 检查类型配置
292
+        path: "inspectTypeConfig",
293
+        loadChildren: () =>
294
+          import("../inspect-type-config/inspect-type-config.module").then(
295
+            (m) => m.InspectTypeConfigModule
296
+          ),
297
+      },
298
+      {
299
+        // 检查科室异常设置
300
+        path: "checkDeptException",
301
+        loadChildren: () =>
302
+          import("../check-dept-exception/check-dept-exception.module").then(
303
+            (m) => m.CheckDeptExceptionModule
304
+          ),
305
+      },
306
+      {
291 307
         // 工单消息设置
292 308
         path: "workorderMessage",
293 309
         loadChildren: () =>

+ 17 - 3
src/app/views/task-type-management/task-type-management.component.html

@@ -165,9 +165,9 @@
165 165
         </div>
166 166
         <div class="mb8 w100" *ngIf="isRemand == '1'">
167 167
           <nz-form-label class="label" nzRequired>选择自动送回的任务类型</nz-form-label>
168
-          <nz-select (nzOpenChange)="openSearchTaskList($event)" [ngClass]="{remandTypeId:!remandTypeId}" style="width:146px;" [nzDropdownMatchSelectWidth]="false"
169
-            nzServerSearch nzShowSearch (nzOnSearch)="changeSearchTaskList($event)" nzPlaceHolder="请选择任务类型"
170
-            [(ngModel)]="remandTypeId">
168
+          <nz-select (nzOpenChange)="openSearchTaskList($event)" [ngClass]="{remandTypeId:!remandTypeId}"
169
+            style="width:146px;" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
170
+            (nzOnSearch)="changeSearchTaskList($event)" nzPlaceHolder="请选择任务类型" [(ngModel)]="remandTypeId">
171 171
             <ng-container *ngFor="let option of searchTaskList">
172 172
               <nz-option *ngIf="!searchTaskLoading" [nzLabel]="option.taskName" [nzValue]="option.id">
173 173
               </nz-option>
@@ -191,6 +191,20 @@
191 191
             <label nz-radio nzValue='0'>否</label>
192 192
           </nz-radio-group>
193 193
         </div>
194
+        <div class="mb8 w100" *ngIf="association['id'] == 260">
195
+          <nz-form-label class="label" nzRequired>是否半陪检</nz-form-label>
196
+          <nz-radio-group class="handlerType" [ngModel]="isHalfInspect" (ngModelChange)="isHalfInspectChange($event)">
197
+            <label nz-radio nzValue='1'>是</label>
198
+            <label nz-radio nzValue='0'>否</label>
199
+          </nz-radio-group>
200
+        </div>
201
+        <div class="mb8 w100" *ngIf="association['id'] == 260">
202
+          <nz-form-label class="label" nzRequired>关联检查是否允许多个科室</nz-form-label>
203
+          <nz-radio-group class="handlerType" [ngModel]="isMoreDept" (ngModelChange)="isMoreDeptChange($event)">
204
+            <label nz-radio nzValue='1'>是</label>
205
+            <label nz-radio nzValue='0'>否</label>
206
+          </nz-radio-group>
207
+        </div>
194 208
         <div nz-row *ngIf='carryShow&&(association.id == 260 || association.id == 255)'>
195 209
           <div nz-col nzSpan="5" class="label ml8">携带设备:</div>
196 210
           <div nz-col nzSpan="18">

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

@@ -96,6 +96,8 @@ export class TaskTypeManagementComponent implements OnInit {
96 96
   appointmentBuildFlagZy = "0"; //护士端是否允许预约建单,患者其他服务
97 97
   followFlag = "0"; //护士端是否能标记重点关注
98 98
   isAccompany = "0"; //是否需要医护陪同检查
99
+  isHalfInspect = "0"; //是否半陪检
100
+  isMoreDept = "0"; //关联检查是否允许多个科室
99 101
   wechatFocusSwitch = "0"; //支助中心端是否能标记重点关注
100 102
   isRemarks: any = "0"; //是否需要备注信息(其他类型)
101 103
   remarks = ""; //备注信息提示用语(其他类型)
@@ -737,6 +739,10 @@ export class TaskTypeManagementComponent implements OnInit {
737 739
       data.focusSwitch === undefined ? "0" : data.focusSwitch + ""; //护士端是否能标记重点关注
738 740
     this.isAccompany =
739 741
       data.isAccompany === undefined ? "0" : data.isAccompany + ""; //是否需要医护陪同检查
742
+    this.isHalfInspect =
743
+      data.isHalfInspect === undefined ? "0" : data.isHalfInspect + ""; //是否半陪检
744
+    this.isMoreDept =
745
+      data.isMoreDept === undefined ? "0" : data.isMoreDept + ""; //关联检查是否允许多个科室
740 746
     this.wechatFocusSwitch =
741 747
       data.wechatFocusSwitch === undefined ? "0" : data.wechatFocusSwitch + ""; //支助中心端是否能标记重点关注
742 748
     this.leadTime =
@@ -1033,6 +1039,8 @@ export class TaskTypeManagementComponent implements OnInit {
1033 1039
       this.appointmentBuildFlag === "1" ? Number(this.leadTime) : 0; //生效时间
1034 1040
     this.taskData.taskType.focusSwitch = this.followFlag === "1" ? 1 : 0; //护士端重点关注开关
1035 1041
     this.taskData.taskType.isAccompany = this.isAccompany === "1" ? 1 : 0; //是否需要医护陪同检查
1042
+    this.taskData.taskType.isHalfInspect = this.isHalfInspect === "1" ? 1 : 0; //是否半陪检
1043
+    this.taskData.taskType.isMoreDept = this.isMoreDept === "1" ? 1 : 0; //关联检查是否允许多个科室
1036 1044
     this.taskData.taskType.wechatFocusSwitch =
1037 1045
       this.wechatFocusSwitch === "1" ? 1 : 0; //支助中心端重点关注开关
1038 1046
     this.taskData.taskType.remarksSwitch = this.isRemarks === "1" ? 1 : 0; //是否需要备注信息
@@ -2285,6 +2293,22 @@ export class TaskTypeManagementComponent implements OnInit {
2285 2293
   confirmDel() {
2286 2294
     this.showDelModal();
2287 2295
   }
2296
+  // 选择是否半陪检
2297
+  isHalfInspectChange(e) {
2298
+    this.isHalfInspect = e;
2299
+    //半陪检,则关联检查不允许多个科室
2300
+    if (e === "1") {
2301
+      this.isMoreDept = "0";
2302
+    }
2303
+  }
2304
+  // 关联检查是否允许多个科室
2305
+  isMoreDeptChange(e) {
2306
+    this.isMoreDept = e;
2307
+    //关联检查允许多个科室,则不允许半陪检
2308
+    if (e === "1") {
2309
+      this.isHalfInspect = "0";
2310
+    }
2311
+  }
2288 2312
 
2289 2313
   // 展示信息提示框
2290 2314
   showPromptModal(con, success, errorInfo?) {