From dd20ee17b995da38d9577d387e94826cc9222dd7 Mon Sep 17 00:00:00 2001 From: bunny <1319900154@qq.com> Date: Thu, 24 Oct 2024 10:42:44 +0800 Subject: [PATCH] =?UTF-8?q?completepage:=20=F0=9F=8D=BB=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=89=8D=E7=AB=AF=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/v1/configuration.ts | 12 ++ src/api/v1/system.ts | 5 - src/components/AnimateSelector/src/index.vue | 4 +- src/components/Error/403.vue | 4 +- src/components/Error/404.vue | 4 +- src/components/Error/500.vue | 4 +- src/config/index.ts | 4 +- src/layout/components/lay-notice/data.ts | 178 +++++++++--------- .../configuration/emailTemplate/index.vue | 2 +- .../emailTemplate/utils/hooks.ts | 10 +- src/views/configuration/emailUsers/index.vue | 2 +- .../configuration/emailUsers/utils/hooks.ts | 10 +- src/views/configuration/menuIcon/index.vue | 2 +- .../configuration/menuIcon/utils/hooks.ts | 10 +- src/views/configuration/webConifg/index.vue | 76 +++++--- .../configuration/webConifg/utils/columns.ts | 70 +++++++ .../configuration/webConifg/utils/hooks.ts | 36 +++- src/views/i18n/i18n-setting/index.vue | 6 +- src/views/i18n/i18n-setting/utils/hooks.tsx | 10 +- src/views/i18n/i18n-type-setting/index.vue | 2 +- src/views/monitor/files/index.vue | 2 +- src/views/monitor/files/utils/hooks.ts | 10 +- .../schedulerExecuteLog/utils/hooks.ts | 8 +- src/views/monitor/userLoginLog/utils/hooks.ts | 8 +- src/views/scheduler/schedulers/index.vue | 2 +- src/views/scheduler/schedulers/utils/hooks.ts | 6 +- src/views/scheduler/schedulersGroup/index.vue | 4 +- .../scheduler/schedulersGroup/utils/hooks.ts | 10 +- src/views/system/adminUser/index.vue | 2 +- src/views/system/adminUser/utils/hooks.tsx | 10 +- src/views/system/dept/index.vue | 4 +- src/views/system/dept/utils/hooks.ts | 10 +- src/views/system/menu/index.vue | 4 +- src/views/system/power/index.vue | 4 +- src/views/system/power/utils/hooks.tsx | 10 +- src/views/system/role/index.vue | 2 +- src/views/system/role/utils/hooks.ts | 10 +- 37 files changed, 342 insertions(+), 215 deletions(-) create mode 100644 src/api/v1/configuration.ts diff --git a/src/api/v1/configuration.ts b/src/api/v1/configuration.ts new file mode 100644 index 0000000..efe5373 --- /dev/null +++ b/src/api/v1/configuration.ts @@ -0,0 +1,12 @@ +import { http } from '@/api/service/request'; +import type { BaseResult } from '@/api/service/types'; + +/** 获取修改前端配置文件 */ +export const fetchGetWebConfig = () => { + return http.request>('get', '/config/getWebConfig'); +}; + +/** 更新web配置文件 */ +export const fetchUpdateWebConfiguration = (data: any) => { + return http.request>('put', '/config/updateWebConfiguration', { data }); +}; diff --git a/src/api/v1/system.ts b/src/api/v1/system.ts index f1696d6..58465a3 100644 --- a/src/api/v1/system.ts +++ b/src/api/v1/system.ts @@ -10,8 +10,3 @@ export const getRouterAsync = () => { export const fetchUploadFile = (data: any) => { return http.request>('post', '/files/upload', { data }, { headers: { 'Content-Type': 'multipart/form-data' } }); }; - -/** 获取前端配置文件 */ -export const fetchPlatformConfig = () => { - return http.request('get', '/files/noManage/resourceFiles/platform-config.json'); -}; diff --git a/src/components/AnimateSelector/src/index.vue b/src/components/AnimateSelector/src/index.vue index ef247f0..f8a2350 100644 --- a/src/components/AnimateSelector/src/index.vue +++ b/src/components/AnimateSelector/src/index.vue @@ -11,7 +11,7 @@ defineOptions({ defineProps({ placeholder: { type: String, - default: $t('please_select_animation'), + default: $t('pleaseSelectAnimation'), }, }); @@ -85,7 +85,7 @@ function onMouseleave() { - + diff --git a/src/components/Error/403.vue b/src/components/Error/403.vue index 051f492..bd5c65f 100644 --- a/src/components/Error/403.vue +++ b/src/components/Error/403.vue @@ -16,10 +16,10 @@ const router = useRouter();

403

- {{ $t('sorry_no_access') }} + {{ $t('sorryNoAccess') }}

- {{ $t('return_to_homepage') }} + {{ $t('returnToHomepage') }}
diff --git a/src/components/Error/404.vue b/src/components/Error/404.vue index 11190bc..e212447 100644 --- a/src/components/Error/404.vue +++ b/src/components/Error/404.vue @@ -16,7 +16,7 @@ const router = useRouter();

404

- {{ $t('sorry_page_not_found') }} + {{ $t('sorryPageNotFound') }}

- {{ $t('return_to_homepage') }} + {{ $t('returnToHomepage') }}
diff --git a/src/components/Error/500.vue b/src/components/Error/500.vue index 38cbf67..1ddd869 100644 --- a/src/components/Error/500.vue +++ b/src/components/Error/500.vue @@ -16,10 +16,10 @@ const router = useRouter();

500

- {{ $t('sorry_server_error') }} + {{ $t('sorryServerError') }}

- {{ $t('return_to_homepage') }} + {{ $t('returnToHomepage') }}
diff --git a/src/config/index.ts b/src/config/index.ts index 3132b8c..f98e0bb 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -2,7 +2,7 @@ import axios from 'axios'; import type { App } from 'vue'; let config: object = {}; -const { VITE_PUBLIC_PATH, VITE_BASE_API } = import.meta.env; +const { VITE_BASE_API } = import.meta.env; const setConfig = (cfg?: unknown) => { config = Object.assign(config, cfg); @@ -31,7 +31,7 @@ export const getPlatformConfig = async (app: App): Promise => { app.config.globalProperties.$config = getConfig(); return axios({ method: 'get', - url: `${VITE_BASE_API}/files/noManage/resourceFiles/platform-config.json`, + url: `${VITE_BASE_API}/config/noAuth/webConfig`, }) .then(({ data: config }) => { let $config = app.config.globalProperties.$config; diff --git a/src/layout/components/lay-notice/data.ts b/src/layout/components/lay-notice/data.ts index bd49f5e..5d05243 100644 --- a/src/layout/components/lay-notice/data.ts +++ b/src/layout/components/lay-notice/data.ts @@ -1,99 +1,97 @@ -import { $t } from "@/plugins/i18n"; +import { $t } from '@/plugins/i18n'; export interface ListItem { - avatar: string; - title: string; - datetime: string; - type: string; - description: string; - status?: "primary" | "success" | "warning" | "info" | "danger"; - extra?: string; + avatar: string; + title: string; + datetime: string; + type: string; + description: string; + status?: 'primary' | 'success' | 'warning' | 'info' | 'danger'; + extra?: string; } export interface TabItem { - key: string; - name: string; - list: ListItem[]; - emptyText: string; + key: string; + name: string; + list: ListItem[]; + emptyText: string; } export const noticesData: TabItem[] = [ - { - key: "1", - name: $t("status.pureNotify"), - list: [], - emptyText: $t("status.pureNoNotify") - }, - { - key: "2", - name: $t("status.pureMessage"), - list: [ - { - avatar: "https://xiaoxian521.github.io/hyperlink/svg/smile1.svg", - title: "小铭 评论了你", - description: "诚在于心,信在于行,诚信在于心行合一。", - datetime: "今天", - type: "2" - }, - { - avatar: "https://xiaoxian521.github.io/hyperlink/svg/smile2.svg", - title: "李白 回复了你", - description: "长风破浪会有时,直挂云帆济沧海。", - datetime: "昨天", - type: "2" - }, - { - avatar: "https://xiaoxian521.github.io/hyperlink/svg/smile5.svg", - title: "标题", - description: - "请将鼠标移动到此处,以便测试超长的消息在此处将如何处理。本例中设置的描述最大行数为2,超过2行的描述内容将被省略并且可以通过tooltip查看完整内容", - datetime: "时间", - type: "2" - } - ], - emptyText: $t("status.pureNoMessage") - }, - { - key: "3", - name: $t("status.pureTodo"), - list: [ - { - avatar: "", - title: "第三方紧急代码变更", - description: - "小林提交于 2024-05-10,需在 2024-05-11 前完成代码变更任务", - datetime: "", - extra: "马上到期", - status: "danger", - type: "3" - }, - { - avatar: "", - title: "版本发布", - description: "指派小铭于 2024-06-18 前完成更新并发布", - datetime: "", - extra: "已耗时 8 天", - status: "warning", - type: "3" - }, - { - avatar: "", - title: "新功能开发", - description: "开发多租户管理", - datetime: "", - extra: "进行中", - type: "3" - }, - { - avatar: "", - title: "任务名称", - description: "任务需要在 2030-10-30 10:00 前启动", - datetime: "", - extra: "未开始", - status: "info", - type: "3" - } - ], - emptyText: $t("status.pureNoTodo") - } + { + key: '1', + name: $t('status.pureNotify'), + list: [], + emptyText: $t('status.pureNoNotify'), + }, + { + key: '2', + name: $t('status.pureMessage'), + list: [ + { + avatar: 'https://xiaoxian521.github.io/hyperlink/svg/smile1.svg', + title: '小铭 评论了你', + description: '诚在于心,信在于行,诚信在于心行合一。', + datetime: '今天', + type: '2', + }, + { + avatar: 'https://xiaoxian521.github.io/hyperlink/svg/smile2.svg', + title: '李白 回复了你', + description: '长风破浪会有时,直挂云帆济沧海。', + datetime: '昨天', + type: '2', + }, + { + avatar: 'https://xiaoxian521.github.io/hyperlink/svg/smile5.svg', + title: '标题', + description: '请将鼠标移动到此处,以便测试超长的消息在此处将如何处理。本例中设置的描述最大行数为2,超过2行的描述内容将被省略并且可以通过tooltip查看完整内容', + datetime: '时间', + type: '2', + }, + ], + emptyText: $t('status.pureNoMessage'), + }, + { + key: '3', + name: $t('status.pureTodo'), + list: [ + { + avatar: '', + title: '第三方紧急代码变更', + description: '小林提交于 2024-05-10,需在 2024-05-11 前完成代码变更任务', + datetime: '', + extra: '马上到期', + status: 'danger', + type: '3', + }, + { + avatar: '', + title: '版本发布', + description: '指派小铭于 2024-06-18 前完成更新并发布', + datetime: '', + extra: '已耗时 8 天', + status: 'warning', + type: '3', + }, + { + avatar: '', + title: '新功能开发', + description: '开发多租户管理', + datetime: '', + extra: '进行中', + type: '3', + }, + { + avatar: '', + title: '任务名称', + description: '任务需要在 2030-10-30 10:00 前启动', + datetime: '', + extra: '未开始', + status: 'info', + type: '3', + }, + ], + emptyText: $t('status.pureNoTodo'), + }, ]; diff --git a/src/views/configuration/emailTemplate/index.vue b/src/views/configuration/emailTemplate/index.vue index 8fd8e46..c302e6f 100644 --- a/src/views/configuration/emailTemplate/index.vue +++ b/src/views/configuration/emailTemplate/index.vue @@ -78,7 +78,7 @@ onMounted(() => {