Przeglądaj źródła

临床服务页面控制

seimin 1 rok temu
rodzic
commit
f6bb5ce5db

+ 4 - 4
src/app/share/detail-others/detail-others.component.html

@@ -20,10 +20,10 @@
20 20
           </div>
21 21
           <div nz-col nzSpan="8">目标科室:{{endDepts}}</div>
22 22
           <div nz-col nzSpan="8" *ngIf="orderInfo.worker">支助人员信息:{{orderInfo.worker.name}}</div>
23
-          <div nz-col nzSpan="24" *ngIf="orderInfo.workOrderRemark">备注信息:{{orderInfo.workOrderRemark}}
24
-          </div>
25
-          <div nz-col nzSpan="24" *ngIf="orderInfo.specialCloseReason">特殊情况关闭原因:{{orderInfo.specialCloseReason}}
26
-          </div>
23
+          <div nz-col nzSpan="8" *ngIf="orderInfo.inspectUsers">执行人员:{{orderInfo.inspectUsers}}</div>
24
+          <div nz-col nzSpan="8" *ngIf="orderInfo.inspectUsersNum">执行人数:{{orderInfo.inspectUsersNum}}</div>
25
+          <div nz-col nzSpan="24" *ngIf="orderInfo.workOrderRemark">备注信息:{{orderInfo.workOrderRemark}}</div>
26
+          <div nz-col nzSpan="24" *ngIf="orderInfo.specialCloseReason">特殊情况关闭原因:{{orderInfo.specialCloseReason}}</div>
27 27
         </div>
28 28
       </div>
29 29
       <div class="center" *ngIf="amplificationShow">

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

@@ -78,6 +78,14 @@
78 78
               加急状态:{{ orderInfo.urgentDetails.checkStatus.name }}
79 79
             </div>
80 80
           </div>
81
+          <div class="info" nz-row>
82
+            <div nz-col nzSpan="6" *ngIf="orderInfo.inspectScore">
83
+              陪检方式:{{ orderInfo.inspectScore.inspectMode }}
84
+            </div>
85
+            <div nz-col nzSpan="6" *ngIf="orderInfo.inspectUsers">
86
+              陪检人员:{{ orderInfo.inspectUsers }}
87
+            </div>
88
+          </div>
81 89
           <div class="info" nz-row *ngIf="orderInfo.urgentDetails">
82 90
             <div nz-col nzSpan="24" class="jiaji">
83 91
               加急原因:{{ orderInfo.urgentDetails.urgentReason }}

+ 6 - 3
src/app/views/clinical-users-management/clinical-users-management.component.ts

@@ -97,7 +97,8 @@ export class ClinicalUsersManagementComponent implements OnInit {
97 97
     this.hosId = this.tool.getCurrentHospital().id;
98 98
     this.name = "";
99 99
     this.num = "";
100
-    this.userType = this.userTypes.length ? this.userTypes[0].id : null;
100
+    let userType = this.userTypes.find(v => v.value == 1);
101
+    this.userType = userType ? userType.id: null;
101 102
     this.department = null;
102 103
     this.userGroup1 = null;
103 104
     this.changeHosp1(this.hosId);
@@ -143,7 +144,9 @@ export class ClinicalUsersManagementComponent implements OnInit {
143 144
   // 获取所有用户类型
144 145
   getUserTypes() {
145 146
     this.mainService.getDictionary("list", "usertype").subscribe((data) => {
146
-      this.userTypes = data;
147
+      this.userTypes = data || [];
148
+      let userType = this.userTypes.find(v => v.value == 1);
149
+      this.userType = userType ? userType.id: null;
147 150
       this.getAllHospital();
148 151
     });
149 152
   }
@@ -274,7 +277,7 @@ export class ClinicalUsersManagementComponent implements OnInit {
274 277
     this.validateForm = this.fb.group({
275 278
       name: [null, [Validators.required]],
276 279
       account: [null, [Validators.required]],
277
-      usertype: [null, [Validators.required]],
280
+      usertype: [this.userType + '', [Validators.required]],
278 281
       dept: [null, [Validators.required]],
279 282
       deptPhone: [null, [Validators.required]],
280 283
       gender: [null, [Validators.required]],

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

@@ -88,6 +88,11 @@ const routes: Routes = [
88 88
         path: "drugPageControl",
89 89
         loadChildren: () => import("../drug-page-control/drug-page-control.module").then((m) => m.DrugPageControlModule),
90 90
       },
91
+      // 药品页面控制
92
+      {
93
+        path: "otherPageControl",
94
+        loadChildren: () => import("../other-page-control/other-page-control.module").then((m) => m.OtherPageControlModule),
95
+      },
91 96
       // 工作分配方案列表
92 97
       {
93 98
         path: "workAssignment",

+ 14 - 0
src/app/views/other-page-control/other-page-control-routing.module.ts

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

+ 61 - 0
src/app/views/other-page-control/other-page-control.component.html

@@ -0,0 +1,61 @@
1
+<div class="TaskTypeManagement">
2
+  <div class="taskTypeInfo">
3
+    <div class="top">
4
+      <div class="item" (click)="tabModal('characteristics')" [ngClass]="{'items':tabModalName=='characteristics'}">
5
+        特性配置
6
+      </div>
7
+      <div class="item" (click)="tabModal('automaticOrderCreation')" [ngClass]="{'items':tabModalName=='automaticOrderCreation'}">
8
+        自动建单配置
9
+      </div>
10
+    </div>
11
+    <div class="list" *ngIf="!loading">
12
+      <!-- 特性配置 -->
13
+      <div *ngIf="tabModalName=='characteristics'">
14
+        <!-- 多人模式支持 -->
15
+        <div class="display_flex align-items_center mb8">
16
+          <nz-form-label class="label">多人模式支持</nz-form-label>
17
+          <nz-checkbox-group [(ngModel)]="clinicalMultiplayerMode" (ngModelChange)="changeMultiplayerMode($event)"></nz-checkbox-group>
18
+        </div>
19
+        <!-- 积分计算方式 -->
20
+        <div class="display_flex align-items_center mb8" *ngIf="clinicalMultiplayerMode[0].checked">
21
+          <nz-form-label class="label" nzRequired>积分计算方式</nz-form-label>
22
+          <nz-select class="w320px" [nzDropdownMatchSelectWidth]="false" nzPlaceHolder="请选择" [(ngModel)]="clinicalIntegralCalculationMethod">
23
+            <ng-container *ngFor="let data of clinicalIntegralCalculationMethods">
24
+              <nz-option *ngIf="!dLoading" nzLabel="{{data.name}}" nzValue="{{data.id}}"></nz-option>
25
+            </ng-container>
26
+            <nz-option *ngIf="dLoading" nzDisabled nzCustomContent>
27
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
28
+            </nz-option>
29
+          </nz-select>
30
+        </div>
31
+        <!-- 关联任务类型 -->
32
+        <div class="display_flex align-items_center mb8" *ngIf="clinicalMultiplayerMode[0].checked">
33
+          <nz-form-label class="label" nzRequired>关联任务类型</nz-form-label>
34
+          <nz-select nzMode="multiple" class="w320px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzAllowClear
35
+            (nzOnSearch)="changeTasktype($event)" nzPlaceHolder="请选择关联任务类型" [(ngModel)]="clinicalTaskIds">
36
+            <ng-container *ngFor="let option of taskTypes">
37
+              <nz-option *ngIf="!isLoading" [nzLabel]="option.taskName" [nzValue]="option.id"></nz-option>
38
+            </ng-container>
39
+            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
40
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
41
+            </nz-option>
42
+          </nz-select>
43
+        </div>
44
+      </div>
45
+      <!-- 自动建单配置 -->
46
+      <div *ngIf="tabModalName=='automaticOrderCreation'">
47
+      </div>
48
+      <div class="bottom">
49
+        <button class="login-form-button" nzType="primary" [nzLoading]="btnLoading" nz-button (click)="submitForm()">保存</button>
50
+      </div>
51
+    </div>
52
+    <div class="list" *ngIf="loading">
53
+      <div class="loadingFull display_flex justify-content_flex-center align-items_center">
54
+        <div class="loadingFullInner">
55
+          <img src="../../../assets/images/loading.gif" alt="">
56
+          <div>加载中...</div>
57
+        </div>
58
+      </div>
59
+    </div>
60
+  </div>
61
+</div>

Plik diff jest za duży
+ 1251 - 0
src/app/views/other-page-control/other-page-control.component.less


+ 179 - 0
src/app/views/other-page-control/other-page-control.component.ts

@@ -0,0 +1,179 @@
1
+import { Component, OnInit } from "@angular/core";
2
+import { ToolService } from 'src/app/services/tool.service';
3
+import { NzMessageService } from 'ng-zorro-antd';
4
+import { Subject } from 'rxjs';
5
+import { debounceTime } from 'rxjs/operators';
6
+import { OtherPageControlService } from './other-page-control.service';
7
+
8
+@Component({
9
+  selector: "app-other-page-control",
10
+  templateUrl: "./other-page-control.component.html",
11
+  styleUrls: ["./other-page-control.component.less"],
12
+})
13
+export class OtherPageControlComponent implements OnInit {
14
+  loading:boolean = false; //页面加载的loading
15
+  btnLoading:boolean = false; //提交按钮的loading
16
+  tabModalName:string = 'characteristics'; //当前选中的tab
17
+  hosId = this.tool.getCurrentHospital().id; //当前院区
18
+
19
+  // 多人模式支持
20
+  clinicalMultiplayerMode:any[] = [
21
+    {label:'是否开启',value: 0}
22
+  ];
23
+  // 积分计算方式
24
+  clinicalIntegralCalculationMethod:any = null;
25
+  // 配置
26
+  configs:any = {};
27
+  searchTimerSubject = new Subject();
28
+  constructor(private otherPageControlService: OtherPageControlService, private tool: ToolService, private msg: NzMessageService) {}
29
+
30
+  ngOnInit():void {
31
+    // todo
32
+    this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
33
+      let fun = v[0];
34
+      fun.call(this, v[1]);
35
+    });
36
+    this.getAssociationType();
37
+    this.getTaskTypes();
38
+  }
39
+
40
+  // 修改是否多人模式支持
41
+  changeMultiplayerMode(e){
42
+    console.log(e);
43
+    if(!e[0].checked){
44
+      this.clinicalIntegralCalculationMethod = null;
45
+      this.clinicalTaskIds = [];
46
+    }
47
+  }
48
+
49
+
50
+  // 边输入边搜索节流阀
51
+  searchTimer(fun, e) {
52
+    this.isLoading = true;
53
+    this.searchTimerSubject.next([fun, e]);
54
+  }
55
+
56
+  // 用户输入搜索任务类型
57
+  isLoading: boolean = false;
58
+  clinicalTaskIds:any[] = [];
59
+  taskTypes:any[] = [];
60
+  changeTasktype(e) {
61
+    this.searchTimer(this.getTaskTypes, e);
62
+  }
63
+
64
+  //获取业务类型
65
+  associationType = null;
66
+  getAssociationType() {
67
+    this.loading = true;
68
+    this.otherPageControlService.getDictionary("association_types").subscribe((data) => {
69
+      this.associationType = data.find(v => v.value === 'other');
70
+      this.associationType && this.getIntegralCalculationMethod();
71
+    });
72
+  }
73
+
74
+  //获取其他临床服务任务类型
75
+  getTaskTypes(e:string = '') {
76
+    let postData:any = {
77
+      idx: 0,
78
+      sum: 10,
79
+      taskType: {
80
+        taskName: e,
81
+        simpleQuery: true,
82
+        hosId: {
83
+          id: this.hosId
84
+        },
85
+        associationType: {
86
+          key: 'association_types',
87
+          value: 'other'
88
+        }
89
+      }
90
+    };
91
+    this.isLoading = true;
92
+    this.otherPageControlService
93
+      .getTaskTypes(postData)
94
+      .subscribe((result) => {
95
+        this.isLoading = false;
96
+        if (result.status == 200) {
97
+          this.taskTypes = result.list || [];
98
+        }
99
+      });
100
+  }
101
+
102
+  //获取积分计算方式
103
+  clinicalIntegralCalculationMethods:any = [];
104
+  dLoading = false;
105
+  getIntegralCalculationMethod() {
106
+    this.dLoading = true;
107
+    this.otherPageControlService
108
+      .getDictionary("clinical_integral_calculation_method")
109
+      .subscribe((data) => {
110
+        this.dLoading = false;
111
+        this.clinicalIntegralCalculationMethods = data;
112
+        this.getConfig();
113
+      });
114
+  }
115
+  // 切换tab
116
+  tabModal(tabModalName:string){
117
+    this.tabModalName = tabModalName;
118
+  }
119
+
120
+  // 保存
121
+  submitForm() {
122
+    if(!this.associationType){
123
+      this.msg.create("warning", "请先配置其他临床服务的业务类型!");
124
+      return;
125
+    }
126
+    if(this.clinicalMultiplayerMode[0].checked && !this.clinicalIntegralCalculationMethod){
127
+      this.msg.create("warning", "请选择积分计算方式!");
128
+      return;
129
+    }
130
+    if(this.clinicalMultiplayerMode[0].checked && !this.clinicalTaskIds.length){
131
+      this.msg.create("warning", "请选择关联任务类型!");
132
+      return;
133
+    }
134
+    let postData:any = {
135
+      id: this.configs.id,
136
+      associationType: this.associationType.id,
137
+      clinicalTaskIds: this.clinicalTaskIds.length ? this.clinicalTaskIds.toString() : undefined,
138
+      hosId: this.hosId,
139
+      clinicalMultiplayerMode: this.clinicalMultiplayerMode[0].checked ? 1 : 0,
140
+      clinicalIntegralCalculationMethod: this.clinicalMultiplayerMode[0].checked ? this.clinicalIntegralCalculationMethod : undefined,
141
+    };
142
+    this.btnLoading = true;
143
+    this.otherPageControlService
144
+      .simplePost("addData", "taskTypeConfig", postData)
145
+      .subscribe((result) => {
146
+        this.btnLoading = false;
147
+        if (result.status == 200) {
148
+          this.getConfig();
149
+        }
150
+      });
151
+  }
152
+
153
+  // 获取配置
154
+  getConfig() {
155
+    this.loading = true;
156
+    let postData = {
157
+      idx: 0,
158
+      sum: 10,
159
+      taskTypeConfig: {
160
+        hosId: this.hosId,
161
+        associationType: this.associationType.id,
162
+      }
163
+    };
164
+    this.otherPageControlService
165
+      .getConfig(postData)
166
+      .subscribe((result) => {
167
+        this.loading = false;
168
+        if (result.status == 200) {
169
+          this.configs = result.list[0] || {};
170
+          this.clinicalMultiplayerMode[0].checked = this.configs.clinicalMultiplayerMode == 1;
171
+          this.clinicalIntegralCalculationMethod = this.configs.clinicalIntegralCalculationMethod;
172
+          this.clinicalTaskIds = this.configs.clinicalTaskIds ? this.configs.clinicalTaskIds.split(',').map(v => +v) : [];
173
+        }
174
+      });
175
+  }
176
+}
177
+
178
+
179
+

+ 19 - 0
src/app/views/other-page-control/other-page-control.module.ts

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

+ 40 - 0
src/app/views/other-page-control/other-page-control.service.ts

@@ -0,0 +1,40 @@
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 OtherPageControlService {
9
+
10
+  constructor(
11
+    private mainService: MainService,
12
+  ) { }
13
+
14
+  // 字典
15
+  getDictionary(type) {
16
+    return this.mainService.getDictionary("list", type);
17
+  }
18
+
19
+  // 获取配置列表
20
+  getConfig(postData) {
21
+    return this.mainService.getFetchDataList("simple/data", "taskTypeConfig", postData);
22
+  }
23
+
24
+  // 获取其他临床服务任务类型列表
25
+  getTaskTypes(postData) {
26
+    return this.mainService.getFetchDataList("simple/data", "taskType", postData).pipe(map((v:any) => {
27
+      if(Array.isArray(v.list)){
28
+        v.list = v.list.map(vv => ({id: vv.id, taskName: vv.taskName}));
29
+      }else{
30
+        v.list = [];
31
+      }
32
+      return v;
33
+    }));
34
+  }
35
+
36
+  // simple增删改
37
+  simplePost(type, model, postData) {
38
+    return this.mainService.simplePost(type, model, postData);
39
+  }
40
+}

+ 1 - 1
src/main.ts

@@ -8,7 +8,7 @@ if (environment.production) {
8 8
   enableProdMode();
9 9
   if (window) {
10 10
     window.console.log = function () { };
11
-    console.info('v2.4.34');
11
+    console.info('v2.4.35');
12 12
   }
13 13
 }
14 14
 platformBrowserDynamic().bootstrapModule(AppModule)