@@ -23,10 +23,10 @@ const FastGPTAppsTab = () => {
2323 try {
2424 const response = await getFastgptAppList ( token , page , pageSize ) ;
2525 if ( response . data ?. code === 0 || response . data ?. code === 200 ) {
26- setFastgptApps ( response . data . data ?. list || [ ] ) ;
26+ setFastgptApps ( response . data . data ?. apps || [ ] ) ;
2727 setPagination ( {
28- current : response . data . data ?. page || page ,
29- pageSize : response . data . data ?. pageSize || pageSize ,
28+ current : page ,
29+ pageSize : pageSize ,
3030 total : response . data . data ?. total || 0 ,
3131 } ) ;
3232 }
@@ -47,12 +47,10 @@ const FastGPTAppsTab = () => {
4747 id : editingFastgptApp . id ,
4848 appName : values . appName ,
4949 apiKey : values . apiKey ,
50- description : values . description ,
51- status : values . status
50+ description : values . description
5251 } , token ) ;
5352 } else {
5453 response = await createFastgptApp ( {
55- appId : values . appId ,
5654 appName : values . appName ,
5755 apiKey : values . apiKey ,
5856 description : values . description
@@ -99,11 +97,9 @@ const FastGPTAppsTab = () => {
9997 const openEditModal = ( record ) => {
10098 setEditingFastgptApp ( record ) ;
10199 form . setFieldsValue ( {
102- appId : record . appId ,
103100 appName : record . appName ,
104101 apiKey : record . apiKey ,
105- description : record . description ,
106- status : record . status
102+ description : record . description
107103 } ) ;
108104 setModalVisible ( true ) ;
109105 } ;
@@ -113,10 +109,9 @@ const FastGPTAppsTab = () => {
113109 } ;
114110
115111 const columns = [
116- { title : 'App ID' , dataIndex : 'appId' , key : 'appId' } ,
117- { title : '应用名称' , dataIndex : 'appName' , key : 'appName' } ,
112+ { title : '学科名称' , dataIndex : 'appName' , key : 'appName' } ,
118113 {
119- title : 'API Key ' ,
114+ title : '密钥 ' ,
120115 dataIndex : 'apiKey' ,
121116 key : 'apiKey' ,
122117 render : ( text ) => (
@@ -126,16 +121,6 @@ const FastGPTAppsTab = () => {
126121 )
127122 } ,
128123 { title : '描述' , dataIndex : 'description' , key : 'description' , ellipsis : true } ,
129- {
130- title : '状态' ,
131- dataIndex : 'status' ,
132- key : 'status' ,
133- render : ( status ) => (
134- < Tag color = { status === 1 ? 'success' : 'error' } >
135- { status === 1 ? '启用' : '禁用' }
136- </ Tag >
137- )
138- } ,
139124 {
140125 title : '操作' ,
141126 key : 'action' ,
@@ -153,13 +138,13 @@ const FastGPTAppsTab = () => {
153138 return (
154139 < div >
155140 < div style = { { display : 'flex' , justifyContent : 'space-between' , marginBottom : 16 } } >
156- < Title level = { 4 } style = { { margin : 0 } } > FastGPT 应用管理 </ Title >
141+ < Title level = { 4 } style = { { margin : 0 } } > 学科管理 </ Title >
157142 < Button
158143 type = "primary"
159144 icon = { < PlusOutlined /> }
160145 onClick = { openAddModal }
161146 >
162- 添加应用
147+ 添加学科
163148 </ Button >
164149 </ div >
165150
@@ -173,7 +158,7 @@ const FastGPTAppsTab = () => {
173158 />
174159
175160 < Modal
176- title = { editingFastgptApp ? "编辑应用 " : "添加应用 " }
161+ title = { editingFastgptApp ? "编辑学科 " : "添加学科 " }
177162 open = { modalVisible }
178163 onCancel = { ( ) => {
179164 setModalVisible ( false ) ;
@@ -186,49 +171,27 @@ const FastGPTAppsTab = () => {
186171 form = { form }
187172 layout = "vertical"
188173 onFinish = { handleAddOrUpdateFastgptApp }
189- initialValues = { { status : 1 } }
190174 >
191- < Form . Item
192- name = "appId"
193- label = "App ID"
194- rules = { [ { required : true , message : '请输入 App ID' } ] }
195- >
196- < Input placeholder = "FastGPT 应用 ID" disabled = { ! ! editingFastgptApp } />
197- </ Form . Item >
198175 < Form . Item
199176 name = "appName"
200- label = "应用名称 "
201- rules = { [ { required : true , message : '请输入应用名称 ' } ] }
177+ label = "学科名称 "
178+ rules = { [ { required : true , message : '请输入学科名称 ' } ] }
202179 >
203- < Input placeholder = "给应用起个名字 " />
180+ < Input placeholder = "给学科起个名字 " />
204181 </ Form . Item >
205182 < Form . Item
206183 name = "apiKey"
207- label = "API Key "
208- rules = { [ { required : true , message : '请输入 API Key ' } ] }
184+ label = "密钥 "
185+ rules = { [ { required : true , message : '请输入密钥 ' } ] }
209186 >
210187 < Input . Password placeholder = "FastGPT API Key" />
211188 </ Form . Item >
212189 < Form . Item
213190 name = "description"
214191 label = "描述"
215192 >
216- < Input . TextArea placeholder = "应用描述 " />
193+ < Input . TextArea placeholder = "学科描述 " />
217194 </ Form . Item >
218-
219- { editingFastgptApp && (
220- < Form . Item
221- name = "status"
222- label = "状态"
223- rules = { [ { required : true , message : '请选择状态' } ] }
224- >
225- < Radio . Group >
226- < Radio value = { 1 } > 启用</ Radio >
227- < Radio value = { 0 } > 禁用</ Radio >
228- </ Radio . Group >
229- </ Form . Item >
230- ) }
231-
232195 < Form . Item >
233196 < Space style = { { width : '100%' , justifyContent : 'flex-end' } } >
234197 < Button onClick = { ( ) => {
0 commit comments