|
@@ -6,6 +6,9 @@ import DepartmentField from './DepartmentField';
|
|
|
import DDMultiSelectField from './DDMultiSelectField';
|
|
|
import NumberField from './NumberField';
|
|
|
import DDPhotoField from './DDPhotoField';
|
|
|
+import DDSelectField from './DDSelectField';
|
|
|
+import DDDateField from './DDDateField';
|
|
|
+import DDDateRangeField from './DDDateRangeField';
|
|
|
|
|
|
const { Option } = Select;
|
|
|
const { RangePicker } = DatePicker;
|
|
@@ -54,33 +57,20 @@ export default function DDComponents(props) {
|
|
|
component = <NumberField disabled={disabled} unit={unit} />;
|
|
|
break;
|
|
|
case 'DDSelectField': //单选框
|
|
|
- component = (
|
|
|
- <Select style={{ width: '100%' }} onChange={onChange}>
|
|
|
- {options?.map(cur => {
|
|
|
- if (typeof cur == 'string') {
|
|
|
- cur = JSON.parse(cur);
|
|
|
- }
|
|
|
-
|
|
|
- return (
|
|
|
- <Option key={cur.key} value={cur.value}>
|
|
|
- {cur.value}
|
|
|
- </Option>
|
|
|
- );
|
|
|
- })}
|
|
|
- </Select>
|
|
|
- );
|
|
|
+ component = <DDSelectField options={options} onChange={onChange} disabled={disabled} />;
|
|
|
break;
|
|
|
case 'DDMultiSelectField': //多选框
|
|
|
component = <DDMultiSelectField disabled={disabled} options={options} />;
|
|
|
break;
|
|
|
case 'DDDateField': //日期控件
|
|
|
- component = <DatePicker format={format} onChange={onChange} />;
|
|
|
+ component = <DDDateField format={format} disabled={disabled} />;
|
|
|
break;
|
|
|
case 'DDDateRangeField': //时间区间控件
|
|
|
- component = <RangePicker format={format} onChange={onChange} />;
|
|
|
+ component = <DDDateRangeField format={format} disabled={disabled} />;
|
|
|
break;
|
|
|
case 'TextNote': //文本说明控件
|
|
|
- // component = <p style={{textAlign: align}}></p>
|
|
|
+ console.info('文本说明控件!');
|
|
|
+ console.log(item);
|
|
|
break;
|
|
|
case 'PhoneField': //电话控件
|
|
|
component = <PhoneField onChange={onChange} />;
|
|
@@ -100,6 +90,8 @@ export default function DDComponents(props) {
|
|
|
// <Button icon={<PlusOutlined />}>添加附件</Button>
|
|
|
// </Upload>
|
|
|
// );
|
|
|
+ console.info('附件控件未渲染!');
|
|
|
+ console.log(item);
|
|
|
break;
|
|
|
case 'InnerContactField': //联系人控件
|
|
|
component = <InnerContactField onChange={onChange}></InnerContactField>;
|
|
@@ -108,12 +100,20 @@ export default function DDComponents(props) {
|
|
|
component = <DepartmentField />;
|
|
|
break;
|
|
|
case 'RelateField': //关联审批单
|
|
|
+ console.info('关联审批单控件未渲染!');
|
|
|
+ console.log(item);
|
|
|
break;
|
|
|
case 'AddressField': //省市区控件
|
|
|
+ console.info('省市区控件未渲染!');
|
|
|
+ console.log(item);
|
|
|
break;
|
|
|
case 'StarRatingField': //评分控件
|
|
|
+ console.info('评分控件未渲染!');
|
|
|
+ console.log(item);
|
|
|
break;
|
|
|
case 'FormRelateField': //关联控件
|
|
|
+ console.info('关联控件未渲染!');
|
|
|
+ console.log(item);
|
|
|
break;
|
|
|
}
|
|
|
|