소스 검색

其他临床服务多动作签到

seimin 1 년 전
부모
커밋
f1ff4afeea

+ 1 - 1
proxy.conf.json

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "/service": {
3
-    "target": "http://192.168.4.170",
3
+    "target": "http://192.168.3.108",
4 4
     "logLevel": "debug",
5 5
     "changeOrigin": true,
6 6
     "pathRewrite": {

+ 2 - 1
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -472,7 +472,8 @@ export class HushijiandanComponent implements OnInit {
472 472
       .getFetchDataList("simple/data", "taskTypeConfig", postData)
473 473
       .subscribe((result) => {
474 474
         if (result.status == 200) {
475
-          this.inspectAndPatientTransportConfig = result.list[0] || {};
475
+          let inspectAndPatientTransportConfig = result.list[0] || {};
476
+          this.inspectAndPatientTransportConfig = {...this.inspectAndPatientTransportConfig, inspectAndPatientTransportConfig};
476 477
 
477 478
           // 是否显示排队信息
478 479
           if(this.inspectAndPatientTransportConfig.queuingInformation == 1){

+ 63 - 0
src/app/views/task-type-management/task-type-management.component.html

@@ -695,6 +695,33 @@
695 695
           <div class="turnoff">
696 696
             <label nz-checkbox [(ngModel)]="carryingCourses[indexs].handoverSwitch">是否必填交接人信息</label>
697 697
           </div>
698
+          <!-- 是否支持拍照签到 -->
699
+          <div class="turnoff" *ngIf="currentChoice.associationType.value == 'other'&&indexs==0">
700
+            <label nz-checkbox [(ngModel)]="carryingCourses[indexs].photoSwitch">是否支持拍照签到</label>
701
+          </div>
702
+          <!-- 是否支持多动作签到 -->
703
+          <div class="turnoff" *ngIf="currentChoice.associationType.value == 'other'&&indexs==1">
704
+            <label nz-checkbox [(ngModel)]="carryingCourses[indexs].actionsSwitch">是否支持多动作签到</label>
705
+          </div>
706
+          <!-- 确认动作 -->
707
+          <div class="turnoff" *ngIf="carryingCourses[indexs].actionsSwitch">
708
+            <label nz-checkbox [(ngModel)]="carryingCourses[indexs].actionConfirmSwitch">确认动作</label>
709
+            <ng-container *ngIf="carryingCourses[indexs].actionConfirmSwitch">
710
+              <button nz-button nzType="dashed" (click)="addActions()" *ngIf="!carryingCourses[indexs].actionRemarks">
711
+                <i nz-icon nzType="plus"></i>
712
+                添加动作
713
+              </button>
714
+              <span class="mr8" *ngIf="carryingCourses[indexs].actionRemarks">{{carryingCourses[indexs].actionRemarks.split('$').join(',')}}</span>
715
+              <button *ngIf="carryingCourses[indexs].actionRemarks" nz-button nzType="dashed" (click)="editActions()">
716
+                <i nz-icon nzType="plus"></i>
717
+                编辑动作
718
+              </button>
719
+            </ng-container>
720
+          </div>
721
+          <!-- 拍照动作 -->
722
+          <div class="turnoff" *ngIf="carryingCourses[indexs].actionsSwitch">
723
+            <label nz-checkbox [(ngModel)]="carryingCourses[indexs].actionPhotoSwitch">拍照动作</label>
724
+          </div>
698 725
           <!-- 静配自动建单 -->
699 726
           <div class="turnoff" *ngIf="currentChoice.associationType.value == 'jPBag'&&indexs==0">
700 727
             <label nz-checkbox [(ngModel)]="bagOrderSwitch">根据对接数据自动建单</label>
@@ -1185,3 +1212,39 @@
1185 1212
     </div>
1186 1213
   </div>
1187 1214
 </div>
1215
+
1216
+<!-- 新增/编辑动作模态框 -->
1217
+<div class="save display_flex justify-content_flex-center align-items_center add" *ngIf="actionsModal">
1218
+  <div class="modalBody">
1219
+    <div class="title">{{actionsAdd?"新增":"编辑"}}动作<i class="icon_transport transport-guanbi"
1220
+        (click)="hideActionsModal()"></i>
1221
+    </div>
1222
+    <div class="content">
1223
+      <form nz-form [formGroup]="validateActionForm" class="addForm">
1224
+        <nz-form-item>
1225
+          <nz-form-label style="line-height: normal;" [nzSm]="6" [nzXs]="24" nzFor="actions">备注快捷输入</nz-form-label>
1226
+          <nz-form-control nzErrorTip="请输入备注快捷输入!">
1227
+            <nz-input-group>
1228
+              <input (ngModelChange)="actionsChange()" nz-input formControlName="actions"
1229
+                placeholder="请填写备注快捷输入" />
1230
+            </nz-input-group>
1231
+            <nz-input-group *ngFor="let action of actionses;let index = index" class="dynamic">
1232
+              <input nz-input [ngModel]="action.content" [ngModelOptions]="{standalone: true}"
1233
+                placeholder="请填写备注快捷输入" (ngModelChange)="actionsChange($event,action)" />
1234
+              <i nz-icon nzType="minus-circle-o" (click)="removeActions(index, $event)"></i>
1235
+            </nz-input-group>
1236
+            <button nz-button nzType="dashed" [disabled]="isAddActions" *ngIf="actionses.length < 9"
1237
+              class="add-button" (click)="addAction($event)">
1238
+              <i nz-icon nzType="plus"></i>
1239
+              添加备注快捷输入
1240
+            </button>
1241
+          </nz-form-control>
1242
+        </nz-form-item>
1243
+      </form>
1244
+    </div>
1245
+    <div class=" display_flex justify-content_flex-center">
1246
+      <button nzType="primary" nz-button (click)="submitFormActions()">保存</button>
1247
+      <button class="btn cancel" nz-button nzType="default" (click)="hideActionsModal()">取消</button>
1248
+    </div>
1249
+  </div>
1250
+</div>

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

@@ -120,6 +120,14 @@ export class TaskTypeManagementComponent implements OnInit {
120 120
   isAddQRemarks = true; //添加新的备注快捷选择输入是否禁用
121 121
   qRemarksId = 1; //备注快捷选择输入自增id
122 122
   leadTime: any = 20; //提前生效时间,默认20分钟
123
+
124
+  actionsModal = false; //动作弹窗
125
+  actionsAdd = false; //动作弹窗新增还是编辑
126
+  validateActionForm: FormGroup; //新增/编辑动作
127
+  actionses = []; //动作第二条-第N条(其他类型)
128
+  isAddActions = true; //添加新的动作是否禁用
129
+  actionsId = 1; //动作自增id
130
+
123 131
   formatterDollar = (value) => Number(value);
124 132
   // 护士端是否允许预约建单,选中
125 133
   appointmentBuildClick() {
@@ -397,6 +405,86 @@ export class TaskTypeManagementComponent implements OnInit {
397 405
   }
398 406
   // 备注快速选择输入---------------------------------------------------------------------
399 407
 
408
+  // 动作------------------------------------------------------------------start
409
+  // 新添加动作快速选择输入
410
+  addAction(e: MouseEvent) {
411
+    e.preventDefault();
412
+    this.actionses.push({ id: ++this.actionsId, content: "" });
413
+    this.actionsChange();
414
+  }
415
+  // 删除新添加动作快速选择输入
416
+  removeActions(index: number, e: MouseEvent) {
417
+    e.preventDefault();
418
+    this.actionses.splice(index, 1);
419
+    this.actionsChange();
420
+  }
421
+  //监听动作快速选择输入输入事件
422
+  actionsChange(e?, action?) {
423
+    if (e !== undefined && action !== undefined) {
424
+      action.content = e;
425
+    }
426
+    // -------------判断添加按钮是否禁用 start
427
+    this.isAddActions = !this.validateActionForm.value.actions;
428
+    if (!this.isAddActions) {
429
+      //如果没禁用
430
+      this.isAddActions = this.actionses.some(
431
+        (item) => item.content === ""
432
+      );
433
+    }
434
+    // -------------判断添加按钮是否禁用 end
435
+  }
436
+  //动作快速选择输入-新增
437
+  addActions() {
438
+    this.actionsAdd = true;
439
+    this.actionsModal = true;
440
+    this.actionses = [];
441
+    this.initActionForm();
442
+  }
443
+  hideActionsModal() {
444
+    this.actionsModal = false;
445
+  }
446
+  // 初始化新增form表单
447
+  initActionForm() {
448
+    this.validateActionForm = this.fb.group({
449
+      actions: [null],
450
+    });
451
+  }
452
+
453
+  // 新增/编辑表单提交
454
+  submitFormActions(): void {
455
+    for (const i in this.validateActionForm.controls) {
456
+      this.validateActionForm.controls[i].markAsDirty();
457
+      this.validateActionForm.controls[i].updateValueAndValidity();
458
+    }
459
+    if (this.validateActionForm.invalid) {
460
+      return;
461
+    }
462
+    this.hideActionsModal();
463
+    let arr = this.actionses.map((item) => item.content);
464
+    if (this.validateActionForm.value.actions) {
465
+      arr.unshift(this.validateActionForm.value.actions);
466
+    }
467
+    this.carryingCourses[this.indexs].actionRemarks = arr.join("$");
468
+  }
469
+
470
+  // 编辑
471
+  editActions() {
472
+    this.initActionForm();
473
+    this.isAddActions = false;
474
+    this.actionsAdd = false;
475
+    this.actionsModal = true;
476
+    let arr = this.carryingCourses[this.indexs].actionRemarks.split("$");
477
+    if (arr.length === 1) {
478
+      this.validateActionForm.controls.actions.setValue(arr[0]);
479
+    } else {
480
+      this.validateActionForm.controls.actions.setValue(arr[0]);
481
+      this.actionses = arr.slice(1).map((item) => {
482
+        return { id: ++this.actionsId, content: item };
483
+      });
484
+    }
485
+  }
486
+  // 动作---------------------------------------------------------------------end
487
+
400 488
   // 初始化增删改按钮
401 489
   coopBtns: any = {};
402 490
   // 获取所有院区
@@ -1141,6 +1229,11 @@ export class TaskTypeManagementComponent implements OnInit {
1141 1229
       this.taskData.taskType.carryingCourses[0].autoAddDeptSwitch = 0; //自动建单追加终点科室开关
1142 1230
       this.taskData.taskType.carryingCourses[0].handAddDeptSwitch = 0; //手动建单追加终点科室开关
1143 1231
     }
1232
+    // 其他临床服务,多动作开启后,必须配置至少一个动作
1233
+    if(this.taskData.taskType.associationType.value === 'other' && this.taskData.taskType.carryingCourses[1].actionConfirmSwitch && !this.taskData.taskType.carryingCourses[1].actionRemarks){
1234
+      this.showPromptModal("提示", false, "确认动作开启后,至少配置一个动作!");
1235
+      return;
1236
+    }
1144 1237
     console.log(this.taskData);
1145 1238
     // return;
1146 1239
     this.loading5 = true;