edit
This commit is contained in:
@ -24,8 +24,8 @@
|
||||
</ng-container>
|
||||
<ng-container *ngSwitchCase="2">
|
||||
<nz-radio-group [(ngModel)]="item.itemValue" class="mr-xl">
|
||||
<label nz-radio nzValue="0" class="ml-xl">{{item.remark?.[0] || '否'}}</label>
|
||||
<label nz-radio nzValue="1" class="ml-xl">{{item.remark?.[1] || '是'}}</label>
|
||||
<label nz-radio [nzValue]="0" class="ml-xl">{{item.remark?.[0] || '否'}}</label>
|
||||
<label nz-radio [nzValue]="1" class="ml-xl">{{item.remark?.[1] || '是'}}</label>
|
||||
</nz-radio-group>
|
||||
</ng-container>
|
||||
<ng-container *ngSwitchCase="3">
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { Component, OnInit, EventEmitter, Input, Output } from '@angular/core';
|
||||
import { BaseService } from '@shared';
|
||||
|
||||
const JSONTYPE = new Set([5]);
|
||||
@Component({
|
||||
selector: 'app-dynamic-setting-h5',
|
||||
templateUrl: './dynamic-setting-h5.component.html',
|
||||
@ -39,12 +40,18 @@ export class DynamicSettingH5Component implements OnInit {
|
||||
if (this.configList?.length < 0) {
|
||||
return;
|
||||
}
|
||||
const params = this.configList.map((item: any) => ({
|
||||
...item,
|
||||
remark: item.remark ? JSON.stringify(item.remark) : null,
|
||||
itemData: item.itemData ? JSON.stringify(item.itemData) : null,
|
||||
itemValue: item.itemValue ? JSON.stringify(item.itemValue) : null
|
||||
}));
|
||||
|
||||
let params = [...this.configList];
|
||||
params = params.map((item: any) => {
|
||||
if (JSONTYPE.has(item.itemType)) {
|
||||
item.itemValue = item.itemValue ? JSON.stringify(item.itemValue) : null;
|
||||
}
|
||||
return {
|
||||
...item,
|
||||
remark: item.remark ? JSON.stringify(item.remark) : null,
|
||||
itemData: item.itemData ? JSON.stringify(item.itemData) : null
|
||||
};
|
||||
});
|
||||
this.saveEvent.emit(params);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user