diff --git a/src/pages/DCSDevice/DeviceList/components/CreateForm.tsx b/src/pages/DCSDevice/DeviceList/components/CreateForm.tsx index f4d8289..0e34875 100644 --- a/src/pages/DCSDevice/DeviceList/components/CreateForm.tsx +++ b/src/pages/DCSDevice/DeviceList/components/CreateForm.tsx @@ -142,7 +142,7 @@ const CreateForm: React.FC<CreateFormProps> = (props) => { /> } /> - <ProFormText + {/* <ProFormText width={proFormItemStyleProps.column2Width} name="position" label={<FormattedMessage id="device.device.table.list.position" defaultMessage="$$$" />} @@ -205,7 +205,7 @@ const CreateForm: React.FC<CreateFormProps> = (props) => { }; }); }} - /> + /> */} <ProFormText width={proFormItemStyleProps.column2Width} diff --git a/src/pages/DCSDevice/DeviceList/components/UpdateForm.tsx b/src/pages/DCSDevice/DeviceList/components/UpdateForm.tsx index c386ae9..908cd2c 100644 --- a/src/pages/DCSDevice/DeviceList/components/UpdateForm.tsx +++ b/src/pages/DCSDevice/DeviceList/components/UpdateForm.tsx @@ -114,7 +114,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => { }, ]} /> - <ProFormText + {/* <ProFormText width={proFormItemStyleProps.column2Width} name="position" label={<FormattedMessage id="device.device.table.list.position" defaultMessage="$$$" />} @@ -211,7 +211,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => { }; }); }} - /> + /> */} <ProFormText width={proFormItemStyleProps.column2Width} @@ -228,14 +228,14 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => { initialValue={props.values.remark} disabled={false} /> - <ProFormSwitch + {/* <ProFormSwitch width={proFormItemStyleProps.column2Width} name="isEnable" label={<FormattedMessage id="device.device.table.list.isEnable" defaultMessage="$$$" />} initialValue={props.values.isEnable} disabled={false} - /> - <ProFormDateTimePicker + /> */} + {/* <ProFormDateTimePicker width={proFormItemStyleProps.column2Width} name="createTime" label={<FormattedMessage id="device.device.table.list.createTime" defaultMessage="$$$" />} @@ -264,7 +264,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => { required={false} initialValue={props.values.updateTime} disabled={true} - /> + /> */} </ProForm.Group> </ModalForm> ); diff --git a/src/pages/DCSDevice/DeviceList/index.tsx b/src/pages/DCSDevice/DeviceList/index.tsx index e81eb39..6645968 100644 --- a/src/pages/DCSDevice/DeviceList/index.tsx +++ b/src/pages/DCSDevice/DeviceList/index.tsx @@ -244,140 +244,140 @@ const DeviceList: React.FC = () => { hideInSearch: true, }, - { - title: <FormattedMessage id="DCSDeviceList.device.table.list.position" defaultMessage="$$$" />, - dataIndex: 'position', - hideInSearch: true, - }, + // { + // title: <FormattedMessage id="DCSDeviceList.device.table.list.position" defaultMessage="$$$" />, + // dataIndex: 'position', + // hideInSearch: true, + // }, - { - title: <FormattedMessage id="DCSDeviceList.device.table.list.param" defaultMessage="$$$" />, - dataIndex: 'param', - hideInSearch: true, - }, + // { + // title: <FormattedMessage id="DCSDeviceList.device.table.list.param" defaultMessage="$$$" />, + // dataIndex: 'param', + // hideInSearch: true, + // }, - { - title: <FormattedMessage id="DCSDeviceList.device.table.list.spec" defaultMessage="$$$" />, - dataIndex: 'spec', - hideInSearch: true, - }, + // { + // title: <FormattedMessage id="DCSDeviceList.device.table.list.spec" defaultMessage="$$$" />, + // dataIndex: 'spec', + // hideInSearch: true, + // }, - { - title: <FormattedMessage id="DCSDeviceList.device.table.list.categoryFkId" defaultMessage="$$$" />, - dataIndex: 'categoryFkId', - hideInSearch: true, - render: (text, record) => { - if (category_fk_id_column_open) { - return ( - <a - onClick={() => { - handle_category_fk_id(record.categoryFkId); - }} - > - {record?.categoryFkId ? categoryFkIdMap[record.categoryFkId] : undefined} - </a> - ); - } else { - return ( - <a - onClick={() => { - handle_category_fk_id(record.categoryFkId); - }} - > - {record.categoryFkId} - </a> - ); - } - }, - renderFormItem: () => { - return ( - // value 和 onchange 会通过 form 自动注入。 - <ProFormSelect - placeholder={`${intl.formatMessage({ - id: 'common.please_select', - defaultMessage: '$$$', - })}`} - required={false} - showSearch - debounceTime={1000} - request={async (keyWord) => { - const resp = await postDeviceCategoryGetDeviceCategoryFkSelect({ - keyword: keyWord?.keyWords || '', - }); - return resp.data.list.map((v: any) => { - return { - label: v.name, - value: v.id, - }; - }); - }} - /> - ); - }, - }, + // { + // title: <FormattedMessage id="DCSDeviceList.device.table.list.categoryFkId" defaultMessage="$$$" />, + // dataIndex: 'categoryFkId', + // hideInSearch: true, + // render: (text, record) => { + // if (category_fk_id_column_open) { + // return ( + // <a + // onClick={() => { + // handle_category_fk_id(record.categoryFkId); + // }} + // > + // {record?.categoryFkId ? categoryFkIdMap[record.categoryFkId] : undefined} + // </a> + // ); + // } else { + // return ( + // <a + // onClick={() => { + // handle_category_fk_id(record.categoryFkId); + // }} + // > + // {record.categoryFkId} + // </a> + // ); + // } + // }, + // renderFormItem: () => { + // return ( + // // value 和 onchange 会通过 form 自动注入。 + // <ProFormSelect + // placeholder={`${intl.formatMessage({ + // id: 'common.please_select', + // defaultMessage: '$$$', + // })}`} + // required={false} + // showSearch + // debounceTime={1000} + // request={async (keyWord) => { + // const resp = await postDeviceCategoryGetDeviceCategoryFkSelect({ + // keyword: keyWord?.keyWords || '', + // }); + // return resp.data.list.map((v: any) => { + // return { + // label: v.name, + // value: v.id, + // }; + // }); + // }} + // /> + // ); + // }, + // }, - { - title: <FormattedMessage id="DCSDeviceList.device.table.list.groupFkId" defaultMessage="$$$" />, - dataIndex: 'groupFkId', - hideInSearch: true, - render: (text, record) => { - if (group_fk_id_column_open) { - return ( - <a - onClick={() => { - handle_group_fk_id(record.groupFkId); - }} - > - {record?.groupFkId ? groupFkIdMap[record.groupFkId] : undefined} - </a> - ); - } else { - return ( - <a - onClick={() => { - handle_group_fk_id(record.groupFkId); - }} - > - {record.groupFkId} - </a> - ); - } - }, - renderFormItem: () => { - return ( - // value 和 onchange 会通过 form 自动注入。 - <ProFormSelect - placeholder={`${intl.formatMessage({ - id: 'common.please_select', - defaultMessage: '$$$', - })}`} - required={false} - showSearch - debounceTime={1000} - request={async (keyWord) => { - const resp = await postDeviceGroupGetDeviceGroupFkSelect({ - keyword: keyWord?.keyWords || '', - }); - return resp.data.list.map((v: any) => { - return { - label: v.name, - value: v.id, - }; - }); - }} - /> - ); - }, - }, + // { + // title: <FormattedMessage id="DCSDeviceList.device.table.list.groupFkId" defaultMessage="$$$" />, + // dataIndex: 'groupFkId', + // hideInSearch: true, + // render: (text, record) => { + // if (group_fk_id_column_open) { + // return ( + // <a + // onClick={() => { + // handle_group_fk_id(record.groupFkId); + // }} + // > + // {record?.groupFkId ? groupFkIdMap[record.groupFkId] : undefined} + // </a> + // ); + // } else { + // return ( + // <a + // onClick={() => { + // handle_group_fk_id(record.groupFkId); + // }} + // > + // {record.groupFkId} + // </a> + // ); + // } + // }, + // renderFormItem: () => { + // return ( + // // value 和 onchange 会通过 form 自动注入。 + // <ProFormSelect + // placeholder={`${intl.formatMessage({ + // id: 'common.please_select', + // defaultMessage: '$$$', + // })}`} + // required={false} + // showSearch + // debounceTime={1000} + // request={async (keyWord) => { + // const resp = await postDeviceGroupGetDeviceGroupFkSelect({ + // keyword: keyWord?.keyWords || '', + // }); + // return resp.data.list.map((v: any) => { + // return { + // label: v.name, + // value: v.id, + // }; + // }); + // }} + // /> + // ); + // }, + // }, - { - title: <FormattedMessage id="DCSDeviceList.device.table.list.isEnable" defaultMessage="$$$" />, - dataIndex: 'isEnable', - filters: true, - onFilter: true, - hideInSearch: true, - valueType: 'switch', - }, + // { + // title: <FormattedMessage id="DCSDeviceList.device.table.list.isEnable" defaultMessage="$$$" />, + // dataIndex: 'isEnable', + // filters: true, + // onFilter: true, + // hideInSearch: true, + // valueType: 'switch', + // }, { title: <FormattedMessage id="DCSDeviceList.device.table.list.remark" defaultMessage="$$$" />, @@ -579,7 +579,7 @@ const DeviceList: React.FC = () => { accessible={access.canUpdate(history.location.pathname)} key={`${history.location.pathname}-add`} > - <Button + {/* <Button type="primary" key="category_fk_id_show" onClick={() => { @@ -610,7 +610,7 @@ const DeviceList: React.FC = () => { <FormattedMessage id="common.show" defaultMessage="$$$" /> )} <FormattedMessage id="DCSDeviceList.device.table.list.groupFkId" defaultMessage="$$$" /> - </Button> + </Button> */} <Button type="primary"