소스 검색

拉取代码

maotao 7 달 전
부모
커밋
f313966965
2개의 변경된 파일67개의 추가작업 그리고 1개의 파일을 삭제
  1. 19 0
      src/app/views/sys-config/sys-config.component.html
  2. 48 1
      src/app/views/sys-config/sys-config.component.ts

+ 19 - 0
src/app/views/sys-config/sys-config.component.html

@@ -189,6 +189,25 @@
189 189
             <nz-input-number class="w100" formControlName="refreshNurseWorkOrderTime" [nzMin]="15" [nzStep]="1" [nzPrecision]="0" [nzFormatter]="formatterSecond" [nzParser]="parserSecond"></nz-input-number>
190 190
           </nz-form-control>
191 191
         </nz-form-item>
192
+				<nz-form-item class="formItem">
193
+				  <nz-form-label [nzSpan]="10" nzFor="repairs" nzRequired class="label">报修方式支持
194
+				  </nz-form-label>
195
+				  <nz-form-control [nzSpan]="14" nzErrorTip="报修方式支持是必填项!">
196
+						<nz-checkbox-group formControlName="repairs" [(ngModel)]="checkOptionsOne" ></nz-checkbox-group>
197
+						<!-- <label nz-checkbox formControlName="deptRepair" [(ngModel)]="deptRepair">科内报修</label> -->
198
+						<!-- <label nz-checkbox formControlName="publicRepair" [(ngModel)]="publicRepair">公共报修</label> -->
199
+					</nz-form-control>
200
+				</nz-form-item>
201
+				<nz-form-item class="formItem">
202
+				  <nz-form-label [nzSpan]="10" nzFor="cmdbRepair" nzRequired class="label">是否支持资产报修
203
+				  </nz-form-label>
204
+				  <nz-form-control [nzSpan]="14" nzErrorTip="是否支持资产报修是必填项!">
205
+						<nz-radio-group formControlName="cmdbRepair">
206
+						  <label nz-radio nzValue="1">是</label>
207
+						  <label nz-radio nzValue="0">否</label>
208
+						</nz-radio-group>
209
+				  </nz-form-control>
210
+				</nz-form-item>
192 211
       </div>
193 212
     </form>
194 213
   </overlay-scrollbars>

+ 48 - 1
src/app/views/sys-config/sys-config.component.ts

@@ -26,6 +26,10 @@ export class SysConfigComponent implements OnInit {
26 26
   promptInfo: string; //操作结果提示信息
27 27
   promptModalShow: boolean; //操作提示框是否展示
28 28
   coopBtns = {};
29
+	checkOptionsOne = [
30
+		{ label: '科内报修', value: 'deptRepair', checked:false},
31
+		{ label: '公共报修', value: 'publicRepair', checked:false },
32
+	];
29 33
   formatterSecond = (value: number) => `${value} 秒`;
30 34
   parserSecond = (value: string) => value.replace(' 秒', '');
31 35
   menu = JSON.parse(localStorage.getItem("menu")) || []; //菜单
@@ -68,6 +72,8 @@ export class SysConfigComponent implements OnInit {
68 72
       cachePath: [{ value: null, disabled: true }, [Validators.required]],
69 73
       cachePort: [{ value: null, disabled: true }, [Validators.required]],
70 74
       busiViewDeptId: [null, [Validators.required]],
75
+			repairs: [null, [Validators.required]],
76
+			cmdbRepair: [null, [Validators.required]],
71 77
     });
72 78
     this.getDeptType();
73 79
     this.coopBtns = this.tool.initCoopBtns(this.route);
@@ -143,8 +149,12 @@ export class SysConfigComponent implements OnInit {
143 149
         item.keyconfig === "systemName" ||
144 150
         item.keyconfig === "largeScreenName" ||
145 151
         item.keyconfig === "defaultRoleOfNurse" ||
146
-        item.keyconfig === "busiViewDeptId"
152
+        item.keyconfig === "busiViewDeptId" ||
153
+				item.keyconfig === "deptRepair" ||
154
+				item.keyconfig === "publicRepair" ||
155
+				item.keyconfig === "cmdbRepair" 
147 156
     );
157
+		console.log(7777,this.validateForm.controls.repairs.value)
148 158
     filterData.forEach((item) => {
149 159
       if (item.keyconfig === "pwd") {
150 160
         item.valueconfig = this.validateForm.controls.defaultPwd.value;
@@ -178,6 +188,24 @@ export class SysConfigComponent implements OnInit {
178 188
         item.valueconfig = this.validateForm.controls.defaultRoleOfNurse.value;
179 189
       } else if (item.keyconfig === "busiViewDeptId") {
180 190
         item.valueconfig = this.validateForm.controls.busiViewDeptId.value;
191
+      } else if (item.keyconfig === "deptRepair") {
192
+				let value = null
193
+				if(this.validateForm.controls.repairs.value[0].checked){
194
+					value = '1'
195
+				}else{
196
+					value = '0'
197
+				}
198
+        item.valueconfig = value;
199
+      } else if (item.keyconfig === "publicRepair") {
200
+			  let value = null
201
+			  if(this.validateForm.controls.repairs.value[1].checked){
202
+			  	value = '1'
203
+			  }else{
204
+			  	value = '0'
205
+			  }
206
+			  item.valueconfig = value;
207
+			}else if (item.keyconfig === "cmdbRepair") {
208
+        item.valueconfig = this.validateForm.controls.cmdbRepair.value;
181 209
       }
182 210
     });
183 211
     const postData = filterData;
@@ -287,6 +315,25 @@ export class SysConfigComponent implements OnInit {
287 315
                 case "busiViewDeptId":
288 316
                   this.validateForm.controls.busiViewDeptId.setValue(c[1] + "");
289 317
                   break;
318
+								case "deptRepair":
319
+									if(c[1]=='1'){
320
+										this.checkOptionsOne[0].checked = true
321
+									}else{
322
+										this.checkOptionsOne[0].checked = false
323
+									}
324
+								  this.validateForm.controls.repairs.setValue(this.checkOptionsOne + "");
325
+								  break;
326
+								case "publicRepair":
327
+									if(c[1]=='1'){
328
+										this.checkOptionsOne[1].checked = true
329
+									}else{
330
+										this.checkOptionsOne[1].checked = false
331
+									}
332
+								  this.validateForm.controls.repairs.setValue(this.checkOptionsOne + "");
333
+								  break;	
334
+								case "cmdbRepair":
335
+								  this.validateForm.controls.cmdbRepair.setValue(c[1] + "");
336
+								  break;
290 337
               }
291 338
             });
292 339
           } else {