seimin 1 rok temu
rodzic
commit
c691a7b240

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

@@ -1134,6 +1134,18 @@
1134 1134
                 </td>
1135 1135
               </tr>
1136 1136
               <tr>
1137
+                <td>科室追加分</td>
1138
+                <td>
1139
+                  {{ orderInfo.grade ? orderInfo.grade.estimateDeptGrade : "-" }}
1140
+                </td>
1141
+                <td>
1142
+                  {{ orderInfo.grade ? orderInfo.grade.deptDetails : "-" }}
1143
+                </td>
1144
+                <td>
1145
+                  {{ orderInfo.grade ? orderInfo.grade.deptGrade : "-" }}
1146
+                </td>
1147
+              </tr>
1148
+              <tr>
1137 1149
                 <td>最终得分</td>
1138 1150
                 <td>
1139 1151
                   {{

+ 15 - 0
src/app/views/department-distance/department-distance-routing.module.ts

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

+ 122 - 0
src/app/views/department-distance/department-distance.component.html

@@ -0,0 +1,122 @@
1
+<div class="list-template">
2
+  <div class="list-template__content">
3
+    <div class="list-template__top" nz-row>
4
+      <div nz-col nzXl='6' class="list-template__searchBox">
5
+      </div>
6
+      <div nz-col nzXl='18' 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="16%">科室名称</th>
17
+            <th nzWidth="16%">关联任务类型</th>
18
+            <th nzWidth="16%">是否起点科室追加</th>
19
+            <th nzWidth="16%">是否终点科室追加</th>
20
+            <th nzWidth="16%">追加分</th>
21
+            <th nzWidth="20%">操作</th>
22
+          </tr>
23
+        </thead>
24
+        <tbody>
25
+          <tr *ngFor="let data of listOfData;let index=index;">
26
+            <td>{{ data.deptDTO ? data.deptDTO.dept : '' }}</td>
27
+            <td>{{ data.taskNames }}</td>
28
+            <td>{{ data.start == 1 ? '是' : '否' }}</td>
29
+            <td>{{ data.end == 1 ? '是' : '否' }}</td>
30
+            <td>{{ data.grade }}</td>
31
+            <td>
32
+              <div class="coop">
33
+                <span *ngIf="coopBtns.edit" (click)="edit(data)">编辑</span>
34
+                <span *ngIf="coopBtns.del" (click)="del(data)">删除</span>
35
+              </div>
36
+            </td>
37
+          </tr>
38
+        </tbody>
39
+      </nz-table>
40
+      <div class="list-template__pagination">
41
+        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
42
+          (nzPageIndexChange)="getList()" (nzPageSizeChange)="getList()">
43
+        </nz-pagination>
44
+      </div>
45
+    </div>
46
+  </div>
47
+</div>
48
+<!-- 新增/编辑模态框 -->
49
+<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="modal">
50
+  <div class="modalBody">
51
+    <div class="title">{{add?"新增":"编辑"}}<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
52
+    </div>
53
+    <overlay-scrollbars #osComponentRef1 class="content">
54
+      <form nz-form [formGroup]="validateForm" class="addForm" (ngSubmit)="submitForm()">
55
+        <nz-form-item>
56
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="deptId">科室名称</nz-form-label>
57
+          <nz-form-control nzErrorTip="请选择科室名称!">
58
+            <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="deptId" nzShowSearch nzAllowClear nzPlaceHolder="请选择科室名称" nzServerSearch (nzOnSearch)="changeSchedule($event)" (nzOpenChange)="openSchedule($event)">
59
+              <ng-container *ngFor="let data of deptList">
60
+                <nz-option *ngIf="!isLoading" [nzLabel]="data.dept" [nzValue]="data.id">
61
+                </nz-option>
62
+              </ng-container>
63
+              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
64
+                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
65
+              </nz-option>
66
+            </nz-select>
67
+          </nz-form-control>
68
+        </nz-form-item>
69
+        <nz-form-item>
70
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="taskTypeIds">关联任务类型</nz-form-label>
71
+          <nz-form-control nzErrorTip="请选择关联任务类型!">
72
+            <nz-select nzMode="multiple" [nzDropdownMatchSelectWidth]="false" formControlName="taskTypeIds" nzShowSearch nzAllowClear nzPlaceHolder="请选择关联任务类型" nzServerSearch (nzOnSearch)="changeInp($event)" (nzOpenChange)="openOtherTasktype($event)">
73
+              <ng-container *ngFor="let data of taskTypeList">
74
+                <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id">
75
+                </nz-option>
76
+              </ng-container>
77
+              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
78
+                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
79
+              </nz-option>
80
+            </nz-select>
81
+          </nz-form-control>
82
+        </nz-form-item>
83
+        <nz-form-item>
84
+          <nz-form-label style="line-height:40px;" [nzSm]="8" [nzXs]="24" nzRequired nzFor="start">是否起点科室追加</nz-form-label>
85
+          <nz-form-control nzErrorTip="请选择是否起点科室追加!">
86
+            <nz-radio-group formControlName="start">
87
+              <label nz-radio [nzValue]="true">是</label>
88
+              <label nz-radio [nzValue]="false">否</label>
89
+            </nz-radio-group>
90
+          </nz-form-control>
91
+        </nz-form-item>
92
+        <nz-form-item>
93
+          <nz-form-label style="line-height:40px;" [nzSm]="8" [nzXs]="24" nzRequired nzFor="end">是否终点科室追加</nz-form-label>
94
+          <nz-form-control nzErrorTip="请选择是否终点科室追加!">
95
+            <nz-radio-group formControlName="end">
96
+              <label nz-radio [nzValue]="true">是</label>
97
+              <label nz-radio [nzValue]="false">否</label>
98
+            </nz-radio-group>
99
+          </nz-form-control>
100
+        </nz-form-item>
101
+        <nz-form-item>
102
+          <nz-form-label [nzSm]="4" [nzXs]="24" nzRequired nzFor="grade">追加分</nz-form-label>
103
+          <nz-form-control nzErrorTip="请填写追加分!">
104
+            <nz-input-number class="w100" formControlName="grade" [nzMin]="0" [nzStep]="1" nzPlaceHolder="请填写追加分"></nz-input-number>
105
+          </nz-form-control>
106
+        </nz-form-item>
107
+      </form>
108
+    </overlay-scrollbars>
109
+    <div class="display_flex justify-content_flex-center">
110
+      <button nzType="primary" nz-button (click)="submitForm()" [nzLoading]="btnLoading">确认</button>
111
+      <button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
112
+    </div>
113
+  </div>
114
+</div>
115
+<!-- 删除模态框 -->
116
+<app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading" (confirmDelEvent)="confirmDel()" content="是否确认删除?"></app-dialog-delete>
117
+
118
+<!-- 操作成功/失败提示框 -->
119
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow" [info]="promptInfo"></app-prompt-modal>
120
+
121
+<!-- 遮罩 -->
122
+<app-mask *ngIf="maskFlag"></app-mask>

+ 126 - 0
src/app/views/department-distance/department-distance.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
+}

+ 295 - 0
src/app/views/department-distance/department-distance.component.ts

@@ -0,0 +1,295 @@
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 { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
6
+import { ToolService } from "../../services/tool.service";
7
+import { Subject } from "rxjs";
8
+import { debounceTime } from "rxjs/operators";
9
+import { DepartmentDistanceService } from './department-distance.service';
10
+
11
+@Component({
12
+  selector: "app-department-distance",
13
+  templateUrl: "./department-distance.component.html",
14
+  styleUrls: ["./department-distance.component.less"],
15
+})
16
+export class DepartmentDistanceComponent implements OnInit {
17
+  @ViewChild("osComponentRef1", {
18
+    read: OverlayScrollbarsComponent,
19
+    static: false,
20
+  })
21
+  osComponentRef1: OverlayScrollbarsComponent;
22
+  constructor(
23
+    private fb: FormBuilder,
24
+    private route: ActivatedRoute,
25
+    private tool: ToolService,
26
+    private departmentDistanceService: DepartmentDistanceService,
27
+  ) {}
28
+
29
+  listOfData: any[] = []; //表格数据
30
+
31
+  modal: boolean = false; //新增/编辑模态框
32
+  add: boolean; //true:新增;false:编辑
33
+  validateForm: FormGroup; //新增/编辑表单
34
+  coopId: number; //表格中执行操作的id
35
+  department: any; //所属科室
36
+  hosId: any; //院区(搜索)
37
+  deptList: Array<any>; //所有班次
38
+  taskTypeList: Array<any>; //所有其他临床服务
39
+  pageIndex: number = 1; //页码
40
+  listLength: number = 10; //总条数
41
+  pageSize: number = 10; //每页条数
42
+
43
+  promptContent: string; //操作提示框提示信息
44
+  ifSuccess: boolean; //操作成功/失败
45
+  promptInfo: string; //操作结果提示信息
46
+  promptModalShow: boolean; //操作提示框是否展示
47
+
48
+  btnLoading: boolean = false; //提交按钮loading状态
49
+  changeInpSubject = new Subject(); //防抖
50
+  changeScheduleSubject = new Subject(); //防抖
51
+
52
+  // 初始化增删改按钮
53
+  coopBtns: any = {};
54
+
55
+  ngOnInit() {
56
+    //防抖
57
+    this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
58
+      this.getOtherTasktype(v[0]);
59
+    });
60
+    //防抖
61
+    this.changeScheduleSubject.pipe(debounceTime(500)).subscribe((v) => {
62
+      this.getDeptList(v[0]);
63
+    });
64
+    this.coopBtns = this.tool.initCoopBtns(this.route);
65
+    this.initForm();
66
+    this.hosId = this.tool.getCurrentHospital().id;
67
+    this.getList(true);
68
+  }
69
+
70
+  // 搜索
71
+  search() {
72
+    this.getList(true);
73
+  }
74
+  // 表格数据
75
+  loading1 = false;
76
+  getList(isResetPageIndex = false) {
77
+    isResetPageIndex && (this.pageIndex = 1);
78
+    let data = {
79
+      pageIndex: this.pageIndex,
80
+      pageSize: this.pageSize,
81
+      hosId: this.hosId,
82
+    };
83
+    this.loading1 = true;
84
+    this.departmentDistanceService
85
+      .query(data)
86
+      .subscribe((result) => {
87
+        this.loading1 = false;
88
+        result.list = result.list || [];
89
+        result.list.forEach(v => {
90
+          v.taskNames = v.taskTypeList.map(v => v.taskName).toString();
91
+        })
92
+        this.listOfData = result.list;
93
+        this.listLength = result.totalNum;
94
+      });
95
+  }
96
+
97
+  // 获取任务类型列表-其他临床服务
98
+  getOtherTasktype(keywords = '') {
99
+    let hosId = this.tool.getCurrentHospital().id;
100
+    this.isLoading = true;
101
+    this.departmentDistanceService.queryOtherTasktype({
102
+      hosId,
103
+      keywords,
104
+    }).subscribe((res) => {
105
+      this.isLoading = false;
106
+      this.taskTypeList = res.list || [];
107
+    });
108
+  }
109
+
110
+  // 获取科室
111
+  getDeptList(keywords = '') {
112
+    let hosId = this.tool.getCurrentHospital().id;
113
+    this.isLoading = true;
114
+    let postData = {
115
+      idx: 0,
116
+      sum: 9999,
117
+      department: {
118
+        searchType: 1,// 简单查询
119
+        dept: keywords,
120
+        hospital: { id: hosId },
121
+      }
122
+    };
123
+    this.departmentDistanceService.getDepartments(postData).subscribe((res) => {
124
+      this.isLoading = false;
125
+      this.deptList = res.list || [];
126
+    });
127
+  }
128
+
129
+  // 新增弹框
130
+  showModal() {
131
+    this.add = true;
132
+    this.modal = true;
133
+    this.initForm();
134
+    this.validateForm.controls.start.setValue(false);
135
+    this.validateForm.controls.end.setValue(false);
136
+  }
137
+  hideModal() {
138
+    this.modal = false;
139
+    this.initForm();
140
+  }
141
+
142
+  // 初始化新增form表单
143
+  initForm() {
144
+    if (this.add) {
145
+      this.deptList = [];
146
+      this.taskTypeList = [];
147
+    }
148
+    this.validateForm = this.fb.group({
149
+      grade: [0, [Validators.required]],
150
+      deptId: [null, [Validators.required]],
151
+      taskTypeIds: [null, [Validators.required]],
152
+      start: [null, [Validators.required]],
153
+      end: [null, [Validators.required]],
154
+    });
155
+  }
156
+  // 表单提交
157
+  submitForm(): void {
158
+    for (const i in this.validateForm.controls) {
159
+      this.validateForm.controls[i].markAsDirty({ onlySelf: true });
160
+      this.validateForm.controls[i].updateValueAndValidity();
161
+    }
162
+    if (this.validateForm.invalid) return;
163
+    this.btnLoading = true;
164
+    if(this.add){
165
+      this.departmentDistanceService
166
+      .add({
167
+        grade: this.validateForm.value.grade,
168
+        deptId: this.validateForm.value.deptId,
169
+        taskTypeIds: this.validateForm.value.taskTypeIds.toString(),
170
+        start: this.validateForm.value.start,
171
+        end: this.validateForm.value.end,
172
+        hosId: this.hosId,
173
+      })
174
+      .subscribe((data) => {
175
+        this.btnLoading = false;
176
+        this.hideModal();
177
+        this.initForm();
178
+        if (data.status == 200) {
179
+          this.showPromptModal(this.add ? "新增" : "编辑", true, "");
180
+        } else {
181
+          this.showPromptModal(this.add ? "新增" : "编辑", false, data.msg);
182
+        }
183
+      });
184
+    }else{
185
+      this.departmentDistanceService
186
+      .update({
187
+        ...this.coopData,
188
+        grade: this.validateForm.value.grade,
189
+        deptId: this.validateForm.value.deptId,
190
+        taskTypeIds: this.validateForm.value.taskTypeIds.toString(),
191
+        start: this.validateForm.value.start,
192
+        end: this.validateForm.value.end,
193
+      })
194
+      .subscribe((data) => {
195
+        this.btnLoading = false;
196
+        this.hideModal();
197
+        this.initForm();
198
+        if (data.status == 200) {
199
+          this.showPromptModal(this.add ? "新增" : "编辑", true, "");
200
+        } else {
201
+          this.showPromptModal(this.add ? "新增" : "编辑", false, data.msg);
202
+        }
203
+      });
204
+    }
205
+  }
206
+
207
+  // 编辑
208
+  maskFlag: any = false;
209
+  coopData = {};
210
+  edit(data) {
211
+    this.validateForm.controls.grade.setValue(data.grade);
212
+    this.validateForm.controls.deptId.setValue(data.deptId);
213
+    this.validateForm.controls.taskTypeIds.setValue(data.taskTypeList ? data.taskTypeList.map(v => v.id) : null);
214
+    this.validateForm.controls.start.setValue(data.start);
215
+    this.validateForm.controls.end.setValue(data.end);
216
+    this.modal = true;
217
+    this.add = false;
218
+    this.coopId = data.id;
219
+    this.coopData = data;
220
+    this.getOtherTasktype();
221
+    this.getDeptList();
222
+  }
223
+
224
+  // 删除
225
+  delModal: boolean = false; //删除模态框
226
+  del(data) {
227
+    this.coopId = data.id;
228
+    this.delModal = true;
229
+  }
230
+  // 确认删除
231
+  confirmDel() {
232
+    this.btnLoading = true;
233
+    this.departmentDistanceService
234
+      .delete({
235
+        id: this.coopId
236
+      })
237
+      .subscribe((data) => {
238
+        this.btnLoading = false;
239
+        this.hideDelModal();
240
+        if (data.status == 200) {
241
+          if (this.listOfData.length == 1 && this.pageIndex == Math.ceil(this.listLength / this.pageSize)) {
242
+            this.listLength--;
243
+            this.pageIndex = Math.ceil(this.listLength / this.pageSize);
244
+          }
245
+          this.showPromptModal("删除", true, "");
246
+        } else {
247
+          this.showPromptModal("删除", false, data.msg);
248
+        }
249
+      });
250
+  }
251
+
252
+  // 关闭删除模态框
253
+  hideDelModal() {
254
+    this.delModal = false;
255
+  }
256
+
257
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
258
+  showPromptModal(con, success, promptInfo?) {
259
+    this.promptModalShow = false;
260
+    this.promptContent = con;
261
+    this.ifSuccess = success;
262
+    this.promptInfo = promptInfo;
263
+    setTimeout(() => {
264
+      this.promptModalShow = true;
265
+    }, 100);
266
+    this.getList(true);
267
+  }
268
+
269
+  // 边输边搜节流阀
270
+  isLoading = false;
271
+  changeInp(e) {
272
+    this.changeInpSubject.next([e]);
273
+  }
274
+
275
+  // 边输边搜节流阀
276
+  changeSchedule(e) {
277
+    this.changeScheduleSubject.next([e]);
278
+  }
279
+
280
+  // 打开任务类型
281
+  openOtherTasktype(e){
282
+    if(e){
283
+      this.getOtherTasktype();
284
+    }
285
+  }
286
+
287
+  // 打开班次
288
+  openSchedule(e){
289
+    if(e){
290
+      this.getDeptList();
291
+    }
292
+  }
293
+}
294
+
295
+

+ 19 - 0
src/app/views/department-distance/department-distance.module.ts

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

+ 75 - 0
src/app/views/department-distance/department-distance.service.ts

@@ -0,0 +1,75 @@
1
+import { Injectable } from '@angular/core';
2
+import { MainService } from 'src/app/services/main.service';
3
+import { map } from 'rxjs/operators';
4
+
5
+@Injectable({
6
+  providedIn: 'root'
7
+})
8
+export class DepartmentDistanceService {
9
+  constructor(
10
+    private mainService: MainService,
11
+  ) { }
12
+
13
+  // 列表-查
14
+  query({pageIndex, pageSize, hosId}) {
15
+    let data = {
16
+      idx: pageIndex - 1,
17
+      sum: pageSize,
18
+      workOrderGradeDept: {
19
+        hosId,
20
+      },
21
+    };
22
+    return this.mainService.getFetchDataList("simple/data", "workOrderGradeDept", data);
23
+  }
24
+
25
+  // 列表-删
26
+  delete({id}) {
27
+    return this.mainService.simplePost("rmvData", "workOrderGradeDept", [id]);
28
+  }
29
+
30
+  // 列表-增
31
+  add(postData) {
32
+    return this.mainService.simplePost("addData", "workOrderGradeDept", postData);
33
+  }
34
+
35
+  // 列表-改
36
+  update(postData) {
37
+    return this.mainService.simplePost("addData", "workOrderGradeDept", postData);
38
+  }
39
+
40
+  // 查询任务类型
41
+  queryOtherTasktype({hosId, keywords}){
42
+    let postData = {
43
+      taskType: {
44
+        simpleQuery: true,
45
+        hosId: {id: hosId},
46
+        taskName: keywords,
47
+      },
48
+      idx: 0,
49
+      sum: 9999,
50
+    };
51
+    return this.mainService.getFetchDataList("configuration", "taskType", postData).pipe(map((v:any) => {
52
+      if(Array.isArray(v.list)){
53
+        v.list = v.list.map(vv => ({id: vv.id, name: vv.taskName}));
54
+      }else{
55
+        v.list = [];
56
+      }
57
+      return v;
58
+    }));
59
+  }
60
+
61
+  // 获取科室列表
62
+  getDepartments(postData) {
63
+    return this.mainService.getFetchDataList("simple/data", "department", postData).pipe(map((v:any) => {
64
+      if(Array.isArray(v.list)){
65
+        v.list = v.list.map(vv => ({id: vv.id, dept: vv.dept}));
66
+      }else{
67
+        v.list = [];
68
+      }
69
+      return v;
70
+    }));
71
+  }
72
+
73
+}
74
+
75
+

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

@@ -278,6 +278,11 @@ const routes: Routes = [
278 278
         path: "inspectionDistance",
279 279
         loadChildren: () => import("../inspection-distance/inspection-distance.module").then((m) => m.InspectionDistanceModule),
280 280
       },
281
+      // 科室绩效
282
+      {
283
+        path: "departmentDistance",
284
+        loadChildren: () => import("../department-distance/department-distance.module").then((m) => m.DepartmentDistanceModule),
285
+      },
281 286
       // 检查类型配置
282 287
       {
283 288
         path: "inspectTypeConfig",