This commit is contained in:
wangshiming
2022-03-24 18:19:56 +08:00
parent 28cf54a525
commit 87bb6a731d
3 changed files with 20 additions and 17 deletions

View File

@ -71,15 +71,13 @@ export class OrderManagementComplaintComponent implements OnInit {
if(this.selectedMainTabStatus) { if(this.selectedMainTabStatus) {
a.complaintType = this.selectedMainTabStatus a.complaintType = this.selectedMainTabStatus
} }
console.log( this.sf?.value);
const params: any = Object.assign({}, this.sf?.value || {}); const params: any = Object.assign({}, this.sf?.value || {});
delete params._$expand; delete params._$expand;
return { return {
...a, ...a,
...params, ...params,
complainantTime: {
start: this.sf?.value?.complainantTime?.[0] || '',
end: this.sf?.value?.complainantTime?.[1] || ''
}
}; };
} }
get selectedRows() { get selectedRows() {
@ -110,19 +108,12 @@ export class OrderManagementComplaintComponent implements OnInit {
widget: 'dict-select', widget: 'dict-select',
params: { dictKey: 'complaint:cause' }, params: { dictKey: 'complaint:cause' },
containsAllLabel: true, containsAllLabel: true,
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
complainantTime: { complainantTime: {
title: '投诉时间',
type: 'string', type: 'string',
ui: { title: '投诉时间',
widget: 'date', ui: { widget: 'sl-from-to', type: 'date', format: 'yyyy-MM-dd' } as SFDateWidgetSchema,
mode: 'range',
format: 'yyyy-MM-dd',
} as SFDateWidgetSchema,
}, },
}, },
}; };
@ -255,7 +246,6 @@ export class OrderManagementComplaintComponent implements OnInit {
*/ */
resetSF(): void { resetSF(): void {
this.sf.reset(); this.sf.reset();
this._$expand = false;
} }
selectChange(e: number) { selectChange(e: number) {
this.resourceStatus = e; this.resourceStatus = e;

View File

@ -61,13 +61,12 @@ export class EAFromToWidget extends ControlWidget implements OnInit {
} }
onChange(result: Array<any>): void { onChange(result: Array<any>): void {
console.log('onChange: ', result); // console.log('onChange: ', result);
if (this.type === 'date') { if (this.type === 'date') {
if (JSON.stringify(result) !== '[]') { if (JSON.stringify(result) !== '[]') {
this.setValue({ start: format(result[0], this.format), end: format(result[1], this.format) }); this.setValue({ start: format(result[0], this.format), end: format(result[1], this.format) });
} else { } else {
this.setValue(null); this.setValue({ start: '', end: '' });
} }
} else if (this.type === 'number') { } else if (this.type === 'number') {
} else { } else {
@ -82,4 +81,8 @@ export class EAFromToWidget extends ControlWidget implements OnInit {
_change(value: string): void { _change(value: string): void {
this.setValue(value); this.setValue(value);
} }
reset(value: string) {
this.date = [];
}
} }

View File

@ -1,3 +1,13 @@
/*
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2021-11-29 10:04:12
* @LastEditors : Shiming
* @LastEditTime : 2022-03-24 18:18:00
* @FilePath : \\tms-obc-web\\src\\app\\shared\\widget\\tinymce\\tinymce.widget.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { ControlWidget } from '@delon/form'; import { ControlWidget } from '@delon/form';