ソースを参照

临床其他建单接口联调

seimin 1 年間 前
コミット
436851740a
共有4 個のファイルを変更した69 個の追加38 個の削除を含む
  1. 1 1
      proxy.conf.json
  2. 26 15
      src/app/views/other-auto/other-auto.component.html
  3. 25 11
      src/app/views/other-auto/other-auto.component.ts
  4. 17 11
      src/app/views/other-auto/other-auto.service.ts

+ 1 - 1
proxy.conf.json

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

+ 26 - 15
src/app/views/other-auto/other-auto.component.html

@@ -14,18 +14,20 @@
14 14
         <thead>
15 15
           <tr class="thead">
16 16
             <th nzWidth="20%">自动建单名称</th>
17
-            <th nzWidth="20%">班次</th>
18
-            <th nzWidth="20%">任务类型</th>
19
-            <th nzWidth="20%">是否起始建单</th>
17
+            <th nzWidth="10%">班次</th>
18
+            <th nzWidth="30%">任务类型</th>
19
+            <th nzWidth="10%">是否起始建单</th>
20
+            <th nzWidth="10%">是否自动建单</th>
20 21
             <th nzWidth="20%">操作</th>
21 22
           </tr>
22 23
         </thead>
23 24
         <tbody>
24 25
           <tr *ngFor="let data of listOfData;let index=index;">
25
-            <td>{{ data.name || '' }}</td>
26
-            <td>{{ data.deptDTO ? data.deptDTO.dept : '' }}</td>
27
-            <td>{{ data.code || '' }}</td>
28
-            <td>{{ data.code || '' }}</td>
26
+            <td>{{ data.title || '' }}</td>
27
+            <td>{{ data.classDTO ? data.classDTO.name : '' }}</td>
28
+            <td>{{ data.taskNames || '' }}</td>
29
+            <td>{{ data.startCreated == 1 ? '是' : '否' }}</td>
30
+            <td>{{ data.autoCreate == 1 ? '是' : '否' }}</td>
29 31
             <td>
30 32
               <div class="coop">
31 33
                 <span *ngIf="coopBtns.edit" (click)="edit(data)">编辑</span>
@@ -51,17 +53,17 @@
51 53
     <overlay-scrollbars #osComponentRef1 class="content">
52 54
       <form nz-form [formGroup]="validateForm" class="addForm" (ngSubmit)="submitForm()">
53 55
         <nz-form-item>
54
-          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="name">自动建单名称</nz-form-label>
56
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="title">自动建单名称</nz-form-label>
55 57
           <nz-form-control nzErrorTip="请填写自动建单名称!">
56 58
             <nz-input-group>
57
-              <input type="text" nz-input formControlName="name" placeholder="请填写自动建单名称" />
59
+              <input type="text" nz-input formControlName="title" placeholder="请填写自动建单名称" />
58 60
             </nz-input-group>
59 61
           </nz-form-control>
60 62
         </nz-form-item>
61 63
         <nz-form-item>
62
-          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="deptId">班次</nz-form-label>
64
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="classesId">班次</nz-form-label>
63 65
           <nz-form-control nzErrorTip="请选择班次!">
64
-            <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="deptId" nzShowSearch nzAllowClear nzPlaceHolder="请选择班次" nzServerSearch (nzOnSearch)="changeSchedule($event)" (nzOpenChange)="openSchedule($event)">
66
+            <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="classesId" nzShowSearch nzAllowClear nzPlaceHolder="请选择班次" nzServerSearch (nzOnSearch)="changeSchedule($event)" (nzOpenChange)="openSchedule($event)">
65 67
               <ng-container *ngFor="let data of scheduleList">
66 68
                 <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id">
67 69
                 </nz-option>
@@ -73,9 +75,9 @@
73 75
           </nz-form-control>
74 76
         </nz-form-item>
75 77
         <nz-form-item>
76
-          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="taskTypes">任务类型</nz-form-label>
78
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="taskTypeIds">任务类型</nz-form-label>
77 79
           <nz-form-control nzErrorTip="请选择任务类型!">
78
-            <nz-select nzMode="multiple" [nzDropdownMatchSelectWidth]="false" formControlName="taskTypes" nzShowSearch nzAllowClear nzPlaceHolder="请选择任务类型" nzServerSearch (nzOnSearch)="changeInp($event)" (nzOpenChange)="openOtherTasktype($event)">
80
+            <nz-select nzMode="multiple" [nzDropdownMatchSelectWidth]="false" formControlName="taskTypeIds" nzShowSearch nzAllowClear nzPlaceHolder="请选择任务类型" nzServerSearch (nzOnSearch)="changeInp($event)" (nzOpenChange)="openOtherTasktype($event)">
79 81
               <ng-container *ngFor="let data of taskTypeList">
80 82
                 <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id">
81 83
                 </nz-option>
@@ -87,9 +89,18 @@
87 89
           </nz-form-control>
88 90
         </nz-form-item>
89 91
         <nz-form-item>
90
-          <nz-form-label style="line-height:40px;" [nzSm]="6" [nzXs]="24" nzRequired nzFor="gender">是否起始建单</nz-form-label>
92
+          <nz-form-label style="line-height:40px;" [nzSm]="6" [nzXs]="24" nzRequired nzFor="startCreated">是否起始建单</nz-form-label>
91 93
           <nz-form-control nzErrorTip="请选择是否起始建单!">
92
-            <nz-radio-group type="gender" formControlName="gender">
94
+            <nz-radio-group formControlName="startCreated">
95
+              <label nz-radio [nzValue]="1">是</label>
96
+              <label nz-radio [nzValue]="0">否</label>
97
+            </nz-radio-group>
98
+          </nz-form-control>
99
+        </nz-form-item>
100
+        <nz-form-item>
101
+          <nz-form-label style="line-height:40px;" [nzSm]="6" [nzXs]="24" nzRequired nzFor="autoCreate">是否自动建单</nz-form-label>
102
+          <nz-form-control nzErrorTip="请选择是否自动建单!">
103
+            <nz-radio-group formControlName="autoCreate">
93 104
               <label nz-radio [nzValue]="1">是</label>
94 105
               <label nz-radio [nzValue]="0">否</label>
95 106
             </nz-radio-group>

+ 25 - 11
src/app/views/other-auto/other-auto.component.ts

@@ -86,6 +86,9 @@ export class OtherAutoComponent implements OnInit {
86 86
       .subscribe((result) => {
87 87
         this.loading1 = false;
88 88
         result.list = result.list || [];
89
+        result.list.forEach(v => {
90
+          v.taskNames = v.taskTypeList.map(v => v.taskName).toString();
91
+        })
89 92
         this.listOfData = result.list;
90 93
         this.listLength = result.totalNum;
91 94
       });
@@ -122,7 +125,8 @@ export class OtherAutoComponent implements OnInit {
122 125
     this.add = true;
123 126
     this.modal = true;
124 127
     this.initForm();
125
-    this.validateForm.controls.gender.setValue(0);
128
+    this.validateForm.controls.startCreated.setValue(0);
129
+    this.validateForm.controls.autoCreate.setValue(0);
126 130
   }
127 131
   hideModal() {
128 132
     this.modal = false;
@@ -136,10 +140,11 @@ export class OtherAutoComponent implements OnInit {
136 140
       this.taskTypeList = [];
137 141
     }
138 142
     this.validateForm = this.fb.group({
139
-      name: ['', [Validators.required]],
140
-      deptId: [null, [Validators.required]],
141
-      taskTypes: [null, [Validators.required]],
142
-      gender: [null, [Validators.required]],
143
+      title: ['', [Validators.required]],
144
+      classesId: [null, [Validators.required]],
145
+      taskTypeIds: [null, [Validators.required]],
146
+      startCreated: [null, [Validators.required]],
147
+      autoCreate: [null, [Validators.required]],
143 148
     });
144 149
   }
145 150
   // 表单提交
@@ -153,8 +158,11 @@ export class OtherAutoComponent implements OnInit {
153 158
     if(this.add){
154 159
       this.otherAutoService
155 160
       .add({
156
-        name: this.validateForm.value.name,
157
-        deptId: this.validateForm.value.deptId,
161
+        title: this.validateForm.value.title,
162
+        classesId: this.validateForm.value.classesId,
163
+        taskTypeIds: this.validateForm.value.taskTypeIds,
164
+        startCreated: this.validateForm.value.startCreated,
165
+        autoCreate: this.validateForm.value.autoCreate,
158 166
         hosId: this.hosId,
159 167
       })
160 168
       .subscribe((data) => {
@@ -170,8 +178,11 @@ export class OtherAutoComponent implements OnInit {
170 178
     }else{
171 179
       this.otherAutoService
172 180
       .update({
173
-        name: this.validateForm.value.name,
174
-        deptId: this.validateForm.value.deptId,
181
+        title: this.validateForm.value.title,
182
+        classesId: this.validateForm.value.classesId,
183
+        taskTypeIds: this.validateForm.value.taskTypeIds,
184
+        startCreated: this.validateForm.value.startCreated,
185
+        autoCreate: this.validateForm.value.autoCreate,
175 186
         coopData: this.coopData,
176 187
       })
177 188
       .subscribe((data) => {
@@ -191,8 +202,11 @@ export class OtherAutoComponent implements OnInit {
191 202
   maskFlag: any = false;
192 203
   coopData = {};
193 204
   edit(data) {
194
-    this.validateForm.controls.name.setValue(data.name);
195
-    this.validateForm.controls.deptId.setValue(data.deptId);
205
+    this.validateForm.controls.title.setValue(data.title);
206
+    this.validateForm.controls.classesId.setValue(data.classesId);
207
+    this.validateForm.controls.taskTypeIds.setValue(data.taskTypeList ? data.taskTypeList.map(v => v.id) : null);
208
+    this.validateForm.controls.startCreated.setValue(data.startCreated);
209
+    this.validateForm.controls.autoCreate.setValue(data.autoCreate);
196 210
     this.modal = true;
197 211
     this.add = false;
198 212
     this.coopId = data.id;

+ 17 - 11
src/app/views/other-auto/other-auto.service.ts

@@ -15,37 +15,43 @@ export class OtherAutoService {
15 15
     let data = {
16 16
       idx: pageIndex - 1,
17 17
       sum: pageSize,
18
-      qrCode: {
18
+      otherCreateOrderRule: {
19 19
         hosId,
20 20
       },
21 21
     };
22
-    return this.mainService.getFetchDataList("simple/data", "qrCode", data);
22
+    return this.mainService.getFetchDataList("simple/data", "otherCreateOrderRule", data);
23 23
   }
24 24
 
25 25
   // 列表-删
26 26
   delete({id}) {
27
-    return this.mainService.simplePost("rmvData", "qrCode", [id]);
27
+    return this.mainService.simplePost("rmvData", "otherCreateOrderRule", [id]);
28 28
   }
29 29
 
30 30
   // 列表-增
31
-  add({name, deptId, hosId}) {
31
+  add({title, classesId, taskTypeIds, startCreated, autoCreate, hosId}) {
32 32
     let data = {
33
-      name,
34
-      deptId,
33
+      title,
34
+      classesId,
35
+      taskTypeIds: taskTypeIds.toString(),
36
+      startCreated,
37
+      autoCreate,
35 38
       hosId,
36 39
     };
37 40
 
38
-    return this.mainService.simplePost("addData", "qrCode", data);
41
+    return this.mainService.simplePost("addData", "otherCreateOrderRule", data);
39 42
   }
40 43
 
41 44
   // 列表-改
42
-  update({name, deptId, coopData}) {
45
+  update({title, classesId, taskTypeIds, startCreated, autoCreate, coopData}) {
43 46
     let data = {
44
-      name,
45
-      deptId,
47
+      title,
48
+      classesId,
49
+      taskTypeIds: taskTypeIds.toString(),
50
+      startCreated,
51
+      autoCreate,
46 52
     };
47 53
     data = {...coopData, ...data};
48
-    return this.mainService.simplePost("addData", "qrCode", data);
54
+    return this.mainService.simplePost("addData", "otherCreateOrderRule", data);
49 55
   }
50 56
 
51 57
   // 查询任务类型-其他临床服务