From 2441594f1c37bbe0917fe17e7818713cb6d48cc2 Mon Sep 17 00:00:00 2001 From: zhang zhuo Date: Thu, 4 Dec 2025 14:51:07 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/model/system.ts | 14 +++ src/assets/icons/Language.vue | 3 + src/components/piSelect/index.vue | 4 + src/pi.ts | 2 + src/views/system/translation/index.vue | 149 +++++++++++++++++++++++++ src/views/system/translation/save.vue | 97 ++++++++++++++++ 6 files changed, 269 insertions(+) create mode 100644 src/assets/icons/Language.vue create mode 100644 src/views/system/translation/index.vue create mode 100644 src/views/system/translation/save.vue diff --git a/src/api/model/system.ts b/src/api/model/system.ts index 7e205b8..f6b924b 100644 --- a/src/api/model/system.ts +++ b/src/api/model/system.ts @@ -218,4 +218,18 @@ export default { return await http.get("dict_data/option", data); }, }, + translation: { + list: async function (data = {}) { + return await http.get("translation/list", data); + }, + add: async function (data = {}) { + return await http.post("translation/add", data); + }, + edit: async function (data = {}) { + return await http.put("translation/edit", data); + }, + del: async function (data = {}) { + return await http.delete("translation/del", data); + }, + }, } diff --git a/src/assets/icons/Language.vue b/src/assets/icons/Language.vue new file mode 100644 index 0000000..dbb49cc --- /dev/null +++ b/src/assets/icons/Language.vue @@ -0,0 +1,3 @@ + diff --git a/src/components/piSelect/index.vue b/src/components/piSelect/index.vue index bba354b..c57ab10 100644 --- a/src/components/piSelect/index.vue +++ b/src/components/piSelect/index.vue @@ -46,6 +46,10 @@ let defaultProps = ref({ }) let tableData = ref([]) +watch(() => props.modelValue, (val) => { + defaultValue.value = val +}, {deep: true, immediate: true}) + watch(defaultValue, () => { emit('update:modelValue', defaultValue.value) emit('change', defaultValue.value) diff --git a/src/pi.ts b/src/pi.ts index 05171d4..4807402 100644 --- a/src/pi.ts +++ b/src/pi.ts @@ -12,6 +12,7 @@ import errorHandler from "@/utils/errorHandler"; import piDialog from "@/components/piDialog" import piTable from "@/components/piTable" import piUpload from "@/components/piUpload" +import piSelect from "@/components/piSelect" export default { install(app: App) { @@ -19,6 +20,7 @@ export default { app.component('piDialog', piDialog) app.component('piTable', piTable) app.component('piUpload', piUpload) + app.component('piSelect', piSelect) //注册全局指令 app.directive('auth', auth) diff --git a/src/views/system/translation/index.vue b/src/views/system/translation/index.vue new file mode 100644 index 0000000..d9bc001 --- /dev/null +++ b/src/views/system/translation/index.vue @@ -0,0 +1,149 @@ + + + diff --git a/src/views/system/translation/save.vue b/src/views/system/translation/save.vue new file mode 100644 index 0000000..4bb0b09 --- /dev/null +++ b/src/views/system/translation/save.vue @@ -0,0 +1,97 @@ + + +