diff --git a/novalon-manage-web/src/pages/config/config/index.tsx b/novalon-manage-web/src/pages/config/config/index.tsx index 171c954..b41c798 100644 --- a/novalon-manage-web/src/pages/config/config/index.tsx +++ b/novalon-manage-web/src/pages/config/config/index.tsx @@ -45,7 +45,7 @@ export default function ConfigManagement() { if (editingConfig) { await configApi.update(editingConfig.id, values as UpdateConfigRequest); message.success('更新成功') } else { await configApi.create(values as CreateConfigRequest); message.success('创建成功') } setModalOpen(false); loadConfigs() - } catch {} + } catch { /* ignored */ } } const columns: ColumnsType = [ @@ -72,7 +72,7 @@ export default function ConfigManagement() { rowKey="id" columns={columns} dataSource={configs} loading={loading} pagination={{ ...pagination, showSizeChanger: true, showTotal: (t) => `共 ${t} 条`, onChange: (p, ps) => { setPagination((prev) => ({ ...prev, current: p, pageSize: ps })); setTimeout(loadConfigs, 0) } }} /> - setModalOpen(false)} destroyOnClose> + setModalOpen(false)} destroyOnHidden>
diff --git a/novalon-manage-web/src/pages/config/dict/index.tsx b/novalon-manage-web/src/pages/config/dict/index.tsx index 38b4edf..679d522 100644 --- a/novalon-manage-web/src/pages/config/dict/index.tsx +++ b/novalon-manage-web/src/pages/config/dict/index.tsx @@ -20,11 +20,11 @@ export default function DictManagement() { useEffect(() => { loadDictTypes() }, []) async function loadDictTypes() { - try { const res = await dictApi.getTypes(); setDictTypes(Array.isArray(res) ? res : []) } catch {} + try { const res = await dictApi.getTypes(); setDictTypes(Array.isArray(res) ? res : []) } catch { /* ignored */ } } async function loadDictData(dictType: string) { setLoading(true) - try { const res = await dictApi.getDataByType(dictType); setDictData(Array.isArray(res) ? res : []) } catch {} + try { const res = await dictApi.getDataByType(dictType); setDictData(Array.isArray(res) ? res : []) } catch { /* ignored */ } finally { setLoading(false) } } @@ -36,7 +36,7 @@ export default function DictManagement() { if (editingType) { await dictApi.updateType(editingType.id, values as UpdateDictTypeRequest); message.success('更新成功') } else { await dictApi.createType(values as CreateDictTypeRequest); message.success('创建成功') } setTypeModalOpen(false); loadDictTypes() - } catch {} + } catch { /* ignored */ } } async function handleDataSubmit() { try { @@ -44,7 +44,7 @@ export default function DictManagement() { if (editingData) { await dictApi.updateData(editingData.id, { ...values, dictType: selectedType } as UpdateDictDataRequest); message.success('更新成功') } else { await dictApi.createData({ ...values, dictType: selectedType } as CreateDictDataRequest); message.success('创建成功') } setDataModalOpen(false); loadDictData(selectedType) - } catch {} + } catch { /* ignored */ } } const typeColumns: ColumnsType = [ @@ -86,7 +86,7 @@ export default function DictManagement() { - setTypeModalOpen(false)} destroyOnClose> + setTypeModalOpen(false)} destroyOnHidden> @@ -94,7 +94,7 @@ export default function DictManagement() { - setDataModalOpen(false)} destroyOnClose> + setDataModalOpen(false)} destroyOnHidden>
diff --git a/novalon-manage-web/src/pages/notify/index.tsx b/novalon-manage-web/src/pages/notify/index.tsx index 0eef29c..ada8581 100644 --- a/novalon-manage-web/src/pages/notify/index.tsx +++ b/novalon-manage-web/src/pages/notify/index.tsx @@ -33,7 +33,7 @@ export default function NoticeManagement() { function handleAdd() { setEditingNotice(null); form.resetFields(); setModalOpen(true) } function handleEdit(record: Notice) { setEditingNotice(record) - form.setFieldsValue({ title: record.title, content: record.content, type: record.type, status: record.status }) + form.setFieldsValue({ noticeTitle: record.noticeTitle, noticeContent: record.noticeContent, noticeType: record.noticeType, status: record.status }) setModalOpen(true) } async function handleDelete(id: number) { @@ -46,14 +46,14 @@ export default function NoticeManagement() { if (editingNotice) { await noticeApi.update(editingNotice.id, values); message.success('更新成功') } else { await noticeApi.create(values); message.success('创建成功') } setModalOpen(false); loadNotices() - } catch {} + } catch { /* ignored */ } } const columns: ColumnsType = [ - { title: '标题', dataIndex: 'title', key: 'title' }, - { title: '类型', dataIndex: 'type', key: 'type', render: (v: string) => {v} }, + { title: '标题', dataIndex: 'noticeTitle', key: 'noticeTitle' }, + { title: '类型', dataIndex: 'noticeType', key: 'noticeType', render: (v: string) => {v === '1' ? '通知' : v === '2' ? '公告' : v} }, { title: '状态', dataIndex: 'status', key: 'status', render: (s: NoticeStatus) => { const info = noticeStatusMap[s]; return {info?.label || s} } }, - { title: '创建者', dataIndex: 'createdBy', key: 'createdBy' }, + { title: '创建者', dataIndex: 'createBy', key: 'createBy' }, { title: '创建时间', dataIndex: 'createdAt', key: 'createdAt' }, { title: '操作', key: 'action', render: (_, record) => ( @@ -73,11 +73,11 @@ export default function NoticeManagement() { rowKey="id" columns={columns} dataSource={notices} loading={loading} pagination={{ ...pagination, showSizeChanger: true, showTotal: (t) => `共 ${t} 条`, onChange: (p, ps) => { setPagination((prev) => ({ ...prev, current: p, pageSize: ps })); setTimeout(loadNotices, 0) } }} /> - setModalOpen(false)} destroyOnClose width={640}> + setModalOpen(false)} destroyOnHidden width={640}> - - + ({ label: info.label, value: v }))} /> diff --git a/novalon-manage-web/src/pages/system/menu/index.tsx b/novalon-manage-web/src/pages/system/menu/index.tsx index 6576973..7e30986 100644 --- a/novalon-manage-web/src/pages/system/menu/index.tsx +++ b/novalon-manage-web/src/pages/system/menu/index.tsx @@ -78,7 +78,7 @@ export default function MenuManagement() { } setModalOpen(false) loadMenus() - } catch {} + } catch { /* ignored */ } } const columns: ColumnsType = [ @@ -153,7 +153,7 @@ export default function MenuManagement() { open={modalOpen} onOk={handleSubmit} onCancel={() => setModalOpen(false)} - destroyOnClose + destroyOnHidden width={600} >
diff --git a/novalon-manage-web/src/pages/system/user/index.tsx b/novalon-manage-web/src/pages/system/user/index.tsx index f0c72a8..e9aeccf 100644 --- a/novalon-manage-web/src/pages/system/user/index.tsx +++ b/novalon-manage-web/src/pages/system/user/index.tsx @@ -43,7 +43,7 @@ export default function UserManagement() { try { const res = await roleApi.getAll() setRoles(Array.isArray(res) ? res : []) - } catch {} + } catch { /* ignored */ } } function handleAdd() { @@ -88,7 +88,7 @@ export default function UserManagement() { } setModalOpen(false) loadUsers() - } catch {} + } catch { /* ignored */ } } const columns: ColumnsType = [ @@ -161,7 +161,7 @@ export default function UserManagement() { open={modalOpen} onOk={handleSubmit} onCancel={() => setModalOpen(false)} - destroyOnClose + destroyOnHidden > {!editingUser && (