From 5454bbe86b1a22e9f05b6bc43f7ed7e9d6c4dc14 Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期五, 03 四月 2026 09:34:15 +0800
Subject: [PATCH] #版权 PROJECT_COPYRIGHT logo PROJECT_LOGO 配置项和页面优化
---
rsf-design/src/views/system/config/index.vue | 46 ++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 44 insertions(+), 2 deletions(-)
diff --git a/rsf-design/src/views/system/config/index.vue b/rsf-design/src/views/system/config/index.vue
index 9d591b9..ae6527c 100644
--- a/rsf-design/src/views/system/config/index.vue
+++ b/rsf-design/src/views/system/config/index.vue
@@ -77,7 +77,9 @@
createConfigSearchState,
getConfigPaginationKey,
getConfigTypeOptions,
- normalizeConfigListRow
+ normalizeConfigListRow,
+ PROJECT_COPYRIGHT_FLAG,
+ PROJECT_LOGO_FLAG
} from './configPage.helpers'
defineOptions({ name: 'Config' })
@@ -202,7 +204,7 @@
selectedRows,
handleSelectionChange,
showDialog,
- handleDialogSubmit,
+ closeDialog,
handleDelete,
handleBatchDelete
} = useCrudPage({
@@ -220,6 +222,46 @@
})
handleDeleteAction = handleDelete
+ function notifyProjectLogoUpdated(payload) {
+ if (payload?.flag !== PROJECT_LOGO_FLAG) {
+ return
+ }
+ window.dispatchEvent(new CustomEvent('project-logo-updated', { detail: { url: payload.val } }))
+ }
+
+ function notifyProjectCopyrightUpdated(payload) {
+ if (payload?.flag !== PROJECT_COPYRIGHT_FLAG) {
+ return
+ }
+ window.dispatchEvent(
+ new CustomEvent('project-copyright-updated', { detail: { text: payload.val } })
+ )
+ }
+
+ async function handleDialogSubmit(formData) {
+ const payload = buildConfigSavePayload(formData)
+ try {
+ if (dialogType.value === 'edit') {
+ await fetchUpdateConfig(payload)
+ ElMessage.success(t('crud.messages.updateSuccess'))
+ closeDialog()
+ notifyProjectLogoUpdated(payload)
+ notifyProjectCopyrightUpdated(payload)
+ await refreshUpdate?.()
+ return
+ }
+
+ await fetchSaveConfig(payload)
+ ElMessage.success(t('crud.messages.createSuccess'))
+ closeDialog()
+ notifyProjectLogoUpdated(payload)
+ notifyProjectCopyrightUpdated(payload)
+ await refreshCreate?.()
+ } catch (error) {
+ ElMessage.error(error?.message || t('crud.messages.submitFailed'))
+ }
+ }
+
function handleSearch(params) {
replaceSearchParams(buildConfigSearchParams(params))
getData()
--
Gitblit v1.9.1