From a5a4a42a969c28aa73723e3d8ca1f600970a1dde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=81=9A=E7=A0=81=E5=86=9C?= <599854767@qq.com> Date: Wed, 2 Aug 2023 18:45:36 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=E5=A4=9A=E8=AF=AD=E8=A8=80=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=AF=BC=E5=85=A5=E3=80=81=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/commonlang.js | 23 +++++++--- src/views/system/commonLang/index.vue | 66 +++++++++++++++++++++++---- 2 files changed, 73 insertions(+), 16 deletions(-) diff --git a/src/api/system/commonlang.js b/src/api/system/commonlang.js index 28b5b34..d1e6628 100644 --- a/src/api/system/commonlang.js +++ b/src/api/system/commonlang.js @@ -8,7 +8,7 @@ export function listCommonLang(query) { return request({ url: 'system/CommonLang/list', method: 'get', - params: query, + params: query }) } /** @@ -18,7 +18,7 @@ export function listCommonLang(query) { export function listLangByLocale(locale) { return request({ url: 'system/CommonLang/list/' + locale, - method: 'get', + method: 'get' }) } @@ -30,7 +30,7 @@ export function addCommonLang(data) { return request({ url: 'system/CommonLang', method: 'post', - data: data, + data: data }) } @@ -42,7 +42,7 @@ export function updateCommonLang(data) { return request({ url: 'system/CommonLang', method: 'PUT', - data: data, + data: data }) } @@ -67,7 +67,6 @@ export function getCommonLangByKey(key) { }) } - /** * 删除多语言配置 * @param {主键} pid @@ -79,6 +78,18 @@ export function delCommonLang(pid) { }) } +/** + * 删除多语言配置 + * @param {key} langkey + */ +export function delCommonLangByKey(langkey) { + return request({ + url: 'system/CommonLang/ByKey', + method: 'delete', + params: { langkey } + }) +} + // 导出多语言配置 export function exportCommonLang(query) { return request({ @@ -86,4 +97,4 @@ export function exportCommonLang(query) { method: 'get', params: query }) -} \ No newline at end of file +} diff --git a/src/views/system/commonLang/index.vue b/src/views/system/commonLang/index.vue index 08d9f1d..719ff71 100644 --- a/src/views/system/commonLang/index.vue +++ b/src/views/system/commonLang/index.vue @@ -58,6 +58,23 @@ {{ $t('btn.delete') }} + + + + {{ $t('btn.import') }} + + + + {{ $t('btn.export') }} @@ -115,19 +132,14 @@ {{ $t('btn.edit') }} - + + {{ $t('btn.delete') }} + - + @@ -174,8 +186,17 @@