File tree Expand file tree Collapse file tree
dinky-web/src/pages/RegCenter/Document/components/DocumentProTable Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,6 +43,10 @@ import { ProTable } from '@ant-design/pro-components';
4343import type { ActionType , ProColumns } from '@ant-design/pro-table' ;
4444import TextArea from 'antd/es/input/TextArea' ;
4545import React , { useRef , useState } from 'react' ;
46+ import { Select } from 'antd' ;
47+ import { JOB_TYPE } from '@/pages/DataStudio/Toolbar/Project/constants' ;
48+
49+ const FUNCTION_TYPES = Object . values ( DOCUMENT_FUNCTION_TYPE_ENUMS ) . map ( item => ( { label : item . text , value : item . value } ) ) ;
4650
4751const DocumentTableList : React . FC = ( ) => {
4852 const [ documentState , setDocumentState ] = useState < DocumentState > ( InitDocumentState ) ;
@@ -123,7 +127,14 @@ const DocumentTableList: React.FC = () => {
123127 dataIndex : 'subtype' ,
124128 filters : true ,
125129 filterMultiple : true ,
126- valueEnum : DOCUMENT_FUNCTION_TYPE_ENUMS
130+ valueEnum : DOCUMENT_FUNCTION_TYPE_ENUMS ,
131+ renderFormItem : ( item , { type } , form ) => {
132+ const currentType = form . getFieldValue ( 'type' ) ;
133+ let options = currentType === DOCUMENT_TYPE_ENUMS . FUN_UDF . value ? FUNCTION_TYPES : JOB_TYPE ;
134+ return (
135+ < Select allowClear options = { options } />
136+ ) ;
137+ } ,
127138 } ,
128139 {
129140 title : l ( 'rc.doc.category' ) ,
You can’t perform that action at this time.
0 commit comments