|
@@ -15,6 +15,7 @@ import type { SchemaBaseModelState } from '@/pages/Schema/Base/model'
|
|
import { BaseMenuEnum } from '@/pages/Schema/Base'
|
|
import { BaseMenuEnum } from '@/pages/Schema/Base'
|
|
import { generateColumns } from '@/utils/util'
|
|
import { generateColumns } from '@/utils/util'
|
|
import DetailModal from './components/DetailModal'
|
|
import DetailModal from './components/DetailModal'
|
|
|
|
+import AnimateContent from '@/components/AnimateContent'
|
|
|
|
|
|
type ListProps = ConnectProps & {
|
|
type ListProps = ConnectProps & {
|
|
pTypeList: { label: string; value: string }[]
|
|
pTypeList: { label: string; value: string }[]
|
|
@@ -65,7 +66,7 @@ const List: React.FC<ListProps> = ({ schema, dispatch, pTypeList }) => {
|
|
onClick={() => {
|
|
onClick={() => {
|
|
setState({
|
|
setState({
|
|
...state,
|
|
...state,
|
|
- visibles: true,
|
|
|
|
|
|
+ visible: true,
|
|
readOnly: true,
|
|
readOnly: true,
|
|
defaultFormData: {
|
|
defaultFormData: {
|
|
ID: record.ID,
|
|
ID: record.ID,
|
|
@@ -124,7 +125,7 @@ const List: React.FC<ListProps> = ({ schema, dispatch, pTypeList }) => {
|
|
onClick={() => {
|
|
onClick={() => {
|
|
setState({
|
|
setState({
|
|
...state,
|
|
...state,
|
|
- visible: true,
|
|
|
|
|
|
+ visibles: true,
|
|
currentModalType: ModalType.UPDATE,
|
|
currentModalType: ModalType.UPDATE,
|
|
defaultFormData: {
|
|
defaultFormData: {
|
|
ID: record.ID,
|
|
ID: record.ID,
|
|
@@ -176,7 +177,7 @@ const List: React.FC<ListProps> = ({ schema, dispatch, pTypeList }) => {
|
|
<Button
|
|
<Button
|
|
type="primary"
|
|
type="primary"
|
|
onClick={() =>
|
|
onClick={() =>
|
|
- setState({ ...state, visible: true, currentModalType: ModalType.ADD })
|
|
|
|
|
|
+ setState({ ...state, visibles: true, currentModalType: ModalType.ADD })
|
|
}>
|
|
}>
|
|
新建项目
|
|
新建项目
|
|
</Button>
|
|
</Button>
|
|
@@ -189,19 +190,30 @@ const List: React.FC<ListProps> = ({ schema, dispatch, pTypeList }) => {
|
|
type={state.currentModalType}
|
|
type={state.currentModalType}
|
|
defaultFormData={state.defaultFormData}
|
|
defaultFormData={state.defaultFormData}
|
|
pTypeList={pTypeList}
|
|
pTypeList={pTypeList}
|
|
- visible={state.visible}
|
|
|
|
|
|
+ visibles={state.visibles}
|
|
reloadTable={() => tRef.current?.reload()}
|
|
reloadTable={() => tRef.current?.reload()}
|
|
- setVisible={(visible: boolean) => setState({ ...state, visible })}
|
|
|
|
|
|
+ setVisible={(visibles: boolean) => setState({ ...state, visibles })}
|
|
/>
|
|
/>
|
|
|
|
|
|
- <DetailModal
|
|
|
|
|
|
+ <AnimateContent
|
|
|
|
+ visible={state.visible}
|
|
|
|
+ onVisibleChange={visible => setState({ ...state, visible })}>
|
|
|
|
+ <DetailModal
|
|
|
|
+ defaultFormData={state.defaultFormData}
|
|
|
|
+ pTypeList={pTypeList}
|
|
|
|
+ readOnly={state.readOnly}
|
|
|
|
+ reloadTable={() => tRef.current?.reload()}
|
|
|
|
+ />
|
|
|
|
+ </AnimateContent>
|
|
|
|
+
|
|
|
|
+ {/* <DetailModal
|
|
defaultFormData={state.defaultFormData}
|
|
defaultFormData={state.defaultFormData}
|
|
pTypeList={pTypeList}
|
|
pTypeList={pTypeList}
|
|
visibles={state.visibles}
|
|
visibles={state.visibles}
|
|
readOnly={state.readOnly}
|
|
readOnly={state.readOnly}
|
|
reloadTable={() => tRef.current?.reload()}
|
|
reloadTable={() => tRef.current?.reload()}
|
|
setVisible={(visibles: boolean) => setState({ ...state, visibles })}
|
|
setVisible={(visibles: boolean) => setState({ ...state, visibles })}
|
|
- />
|
|
|
|
|
|
+ /> */}
|
|
</PageContainer>
|
|
</PageContainer>
|
|
)
|
|
)
|
|
}
|
|
}
|