Pārlūkot izejas kodu

工作分配方案增加示忙原因

seimin 1 gadu atpakaļ
vecāks
revīzija
306e0e5781

+ 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.240",
4 4
     "logLevel": "debug",
5 5
     "changeOrigin": true,
6 6
     "pathRewrite": {

+ 15 - 0
src/app/views/work-assignment/work-assignment.component.html

@@ -80,6 +80,21 @@
80 80
               </nz-input-group>
81 81
             </nz-form-control>
82 82
           </nz-form-item>
83
+          <nz-form-item>
84
+            <nz-form-label [nzSpan]="8" nzRequired nzFor="showBusy">是否支持上班示忙</nz-form-label>
85
+            <nz-form-control [nzSpan]="16" nzErrorTip="请输入是否支持上班示忙!">
86
+              <nz-radio-group formControlName="showBusy" (ngModelChange)="changeShowBusy()">
87
+                <label nz-radio [nzValue]="1">是</label>
88
+                <label nz-radio [nzValue]="0">否</label>
89
+              </nz-radio-group>
90
+            </nz-form-control>
91
+          </nz-form-item>
92
+          <ng-container *ngIf="validateForm.value.showBusy == 1">
93
+            <div *ngFor="let busy of busyList;let index = index" class="busyList">
94
+              <input class="busyContent" nz-input [(ngModel)]="busy.busyContent" [ngModelOptions]="{standalone: true}" placeholder="请填写示忙原因" />
95
+              <nz-input-number [(ngModel)]="busy.busyMinute" [ngModelOptions]="{standalone: true}" [nzMin]="1" [nzStep]="1" [nzPrecision]="0"></nz-input-number>分钟
96
+            </div>
97
+          </ng-container>
83 98
         </form>
84 99
       </div>
85 100
       <div class=" display_flex justify-content_flex-center">

+ 9 - 0
src/app/views/work-assignment/work-assignment.component.less

@@ -47,6 +47,15 @@
47 47
       margin-top: 12px;
48 48
       padding: 16px 0;
49 49
 
50
+      .busyList{
51
+        display: flex;
52
+        margin-bottom: 8px;
53
+        .busyContent{
54
+          margin-right: 8px;
55
+          flex: 1;
56
+        }
57
+      }
58
+
50 59
       & > div {
51 60
         text-align: center;
52 61
         margin: 0;

+ 84 - 1
src/app/views/work-assignment/work-assignment.component.ts

@@ -46,6 +46,34 @@ export class WorkAssignmentComponent implements OnInit {
46 46
   nextSchemeName = ""; //下一个开启的方案名称
47 47
   modelName = ""; //模态框名称
48 48
 
49
+  busyList:any[] = [
50
+    {
51
+      id: 1,
52
+      busyContent: '',
53
+      busyMinute: 1,
54
+    },
55
+    {
56
+      id: 2,
57
+      busyContent: '',
58
+      busyMinute: 1,
59
+    },
60
+    {
61
+      id: 3,
62
+      busyContent: '',
63
+      busyMinute: 1,
64
+    },
65
+    {
66
+      id: 4,
67
+      busyContent: '',
68
+      busyMinute: 1,
69
+    },
70
+    {
71
+      id: 5,
72
+      busyContent: '',
73
+      busyMinute: 1,
74
+    },
75
+  ]
76
+
49 77
   ngOnInit() {
50 78
     this.currentHospital = this.tool.getCurrentHospital();
51 79
     this.coopBtns = this.tool.initCoopBtns(this.route);
@@ -124,6 +152,7 @@ export class WorkAssignmentComponent implements OnInit {
124 152
     this.validateForm = this.fb.group({
125 153
       workAssignmentName: [null, [Validators.required]],
126 154
       workAssignmentType: ["1", [Validators.required]],
155
+      showBusy: [0, [Validators.required]],
127 156
       workAssignmentDescribe: [null, [Validators.required]],
128 157
     });
129 158
   }
@@ -134,6 +163,36 @@ export class WorkAssignmentComponent implements OnInit {
134 163
     });
135 164
   }
136 165
 
166
+  changeShowBusy(){
167
+    this.busyList = [
168
+      {
169
+        id: 1,
170
+        busyContent: '',
171
+        busyMinute: 1,
172
+      },
173
+      {
174
+        id: 2,
175
+        busyContent: '',
176
+        busyMinute: 1,
177
+      },
178
+      {
179
+        id: 3,
180
+        busyContent: '',
181
+        busyMinute: 1,
182
+      },
183
+      {
184
+        id: 4,
185
+        busyContent: '',
186
+        busyMinute: 1,
187
+      },
188
+      {
189
+        id: 5,
190
+        busyContent: '',
191
+        busyMinute: 1,
192
+      },
193
+    ];
194
+  }
195
+
137 196
   // 新增/编辑表单提交
138 197
   btnLoading1 = false; //完成
139 198
   submitForm(noGoTo?): void {
@@ -149,7 +208,7 @@ export class WorkAssignmentComponent implements OnInit {
149 208
     } else {
150 209
       this.btnLoading = true;
151 210
     }
152
-    let data = {};
211
+    let data:any = {};
153 212
 
154 213
     if (this.add) {
155 214
       //增加
@@ -157,6 +216,7 @@ export class WorkAssignmentComponent implements OnInit {
157 216
         workScheme: {
158 217
           name: this.validateForm.value.workAssignmentName,
159 218
           workType: this.validateForm.value.workAssignmentType,
219
+          showBusy: this.validateForm.value.showBusy,
160 220
           describe: this.validateForm.value.workAssignmentDescribe,
161 221
           status: 0,
162 222
           hosId: this.currentHospital.id,
@@ -169,6 +229,7 @@ export class WorkAssignmentComponent implements OnInit {
169 229
           id: this.coopId.id,
170 230
           name: this.validateForm.value.workAssignmentName,
171 231
           workType: this.validateForm.value.workAssignmentType,
232
+          showBusy: this.validateForm.value.showBusy,
172 233
           describe: this.validateForm.value.workAssignmentDescribe,
173 234
           hosId: this.currentHospital.id,
174 235
         },
@@ -180,6 +241,7 @@ export class WorkAssignmentComponent implements OnInit {
180 241
         workScheme: {
181 242
           name: this.validateForm.value.workAssignmentName,
182 243
           workType: this.validateForm.value.workAssignmentType,
244
+          showBusy: this.validateForm.value.showBusy,
183 245
           describe: this.validateForm.value.workAssignmentDescribe,
184 246
           status: 0,
185 247
           copy: 1,
@@ -188,6 +250,13 @@ export class WorkAssignmentComponent implements OnInit {
188 250
         },
189 251
       };
190 252
     }
253
+    // 示忙原因
254
+    this.busyList.forEach(v => {
255
+      if(v.busyContent.trim()){
256
+        data.workScheme['busyContent' + v.id] = v.busyContent.trim();
257
+        data.workScheme['busyMinute' + v.id] = v.busyMinute;
258
+      }
259
+    })
191 260
     this.mainService
192 261
       .coopTypeConfig("addData", "workScheme", data)
193 262
       .subscribe((result) => {
@@ -307,6 +376,13 @@ export class WorkAssignmentComponent implements OnInit {
307 376
     this.copyModel = false;
308 377
     this.validateForm.controls.workAssignmentName.setValue(data.name); //名称
309 378
     this.validateForm.controls.workAssignmentType.setValue(data.workType + ""); //类型
379
+    this.validateForm.controls.showBusy.setValue(data.showBusy || 0);
380
+    if(this.validateForm.value.showBusy == 1){
381
+      this.busyList.forEach(v => {
382
+        v.busyContent = data['busyContent' + v.id];
383
+        v.busyMinute = data['busyMinute' + v.id] || 0;
384
+      })
385
+    }
310 386
     this.validateForm.controls.workAssignmentDescribe.setValue(data.describe); //描述
311 387
   }
312 388
   //复制
@@ -318,6 +394,13 @@ export class WorkAssignmentComponent implements OnInit {
318 394
     this.coopId = data;
319 395
     this.validateForm.controls.workAssignmentName.setValue(data.name); //名称
320 396
     this.validateForm.controls.workAssignmentType.setValue(data.workType + ""); //类型
397
+    this.validateForm.controls.showBusy.setValue(data.showBusy || 0);
398
+    if(this.validateForm.value.showBusy == 1){
399
+      this.busyList.forEach(v => {
400
+        v.busyContent = data['busyContent' + v.id];
401
+        v.busyMinute = data['busyMinute' + v.id] || 0;
402
+      })
403
+    }
321 404
     this.validateForm.controls.workAssignmentDescribe.setValue(data.describe); //描述
322 405
   }
323 406
 

+ 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.54');
11
+    console.info('v2.4.55');
12 12
   }
13 13
 }
14 14
 platformBrowserDynamic().bootstrapModule(AppModule)