From 50e95b985a72fcec4a93a2470e9efdfb2620148a Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期四, 02 四月 2026 15:46:09 +0800
Subject: [PATCH] #i18n
---
rsf-design/src/views/basic-info/companys/modules/companys-dialog.vue | 74 +++++++++++++++++++-----------------
1 files changed, 39 insertions(+), 35 deletions(-)
diff --git a/rsf-design/src/views/basic-info/companys/modules/companys-dialog.vue b/rsf-design/src/views/basic-info/companys/modules/companys-dialog.vue
index 02459c0..37ea9aa 100644
--- a/rsf-design/src/views/basic-info/companys/modules/companys-dialog.vue
+++ b/rsf-design/src/views/basic-info/companys/modules/companys-dialog.vue
@@ -22,8 +22,8 @@
<template #footer>
<span class="dialog-footer">
- <ElButton @click="handleCancel">鍙栨秷</ElButton>
- <ElButton type="primary" @click="handleSubmit">纭畾</ElButton>
+ <ElButton @click="handleCancel">{{ t('common.cancel') }}</ElButton>
+ <ElButton type="primary" @click="handleSubmit">{{ t('common.confirm') }}</ElButton>
</span>
</template>
</ElDialog>
@@ -31,6 +31,7 @@
<script setup>
import { computed, nextTick, reactive, ref, watch } from 'vue'
+ import { useI18n } from 'vue-i18n'
import ArtForm from '@/components/core/forms/art-form/index.vue'
import {
buildCompanysDialogModel,
@@ -48,148 +49,151 @@
const emit = defineEmits(['update:visible', 'submit'])
const formRef = ref()
const form = reactive(createCompanysFormState())
+ const { t } = useI18n()
const isEdit = computed(() => props.dialogType === 'edit')
- const dialogTitle = computed(() => (isEdit.value ? '缂栬緫寰�鏉ヤ紒涓�' : '鏂板寰�鏉ヤ紒涓�'))
+ const dialogTitle = computed(() =>
+ isEdit.value ? t('pages.basicInfo.companys.dialog.titleEdit') : t('pages.basicInfo.companys.dialog.titleCreate')
+ )
const rules = computed(() => ({
- name: [{ required: true, message: '璇疯緭鍏ヤ紒涓氬悕绉�', trigger: 'blur' }],
- breifCode: [{ required: true, message: '璇疯緭鍏ュ姪璁扮爜', trigger: 'blur' }],
- type: [{ required: true, message: '璇烽�夋嫨浼佷笟绫诲瀷', trigger: 'change' }]
+ name: [{ required: true, message: t('pages.basicInfo.companys.validation.name'), trigger: 'blur' }],
+ breifCode: [{ required: true, message: t('pages.basicInfo.companys.validation.briefCode'), trigger: 'blur' }],
+ type: [{ required: true, message: t('pages.basicInfo.companys.validation.type'), trigger: 'change' }]
}))
const formItems = computed(() => [
{
- label: '浼佷笟缂栫爜',
+ label: t('pages.basicInfo.companys.table.code'),
key: 'code',
type: 'input',
props: {
- placeholder: '鐣欑┖灏嗚嚜鍔ㄧ敓鎴�',
+ placeholder: t('pages.basicInfo.companys.placeholders.code'),
clearable: true,
disabled: isEdit.value
}
},
{
- label: '浼佷笟鍚嶇О',
+ label: t('pages.basicInfo.companys.table.name'),
key: 'name',
type: 'input',
props: {
- placeholder: '璇疯緭鍏ヤ紒涓氬悕绉�',
+ placeholder: t('pages.basicInfo.companys.placeholders.name'),
clearable: true
}
},
{
- label: '鑻辨枃鍒悕',
+ label: t('pages.basicInfo.companys.table.nameEn'),
key: 'nameEn',
type: 'input',
props: {
- placeholder: '璇疯緭鍏ヨ嫳鏂囧埆鍚�',
+ placeholder: t('pages.basicInfo.companys.placeholders.nameEn'),
clearable: true
}
},
{
- label: '鍔╄鐮�',
+ label: t('pages.basicInfo.companys.table.briefCode'),
key: 'breifCode',
type: 'input',
props: {
- placeholder: '璇疯緭鍏ュ姪璁扮爜',
+ placeholder: t('pages.basicInfo.companys.placeholders.briefCode'),
clearable: true
}
},
{
- label: '浼佷笟绫诲瀷',
+ label: t('pages.basicInfo.companys.table.type'),
key: 'type',
type: 'select',
props: {
- placeholder: '璇烽�夋嫨浼佷笟绫诲瀷',
+ placeholder: t('pages.basicInfo.companys.placeholders.type'),
clearable: true,
filterable: true,
options: props.typeOptions
}
},
{
- label: '鑱旂郴浜�',
+ label: t('pages.basicInfo.companys.table.contact'),
key: 'contact',
type: 'input',
props: {
- placeholder: '璇疯緭鍏ヨ仈绯讳汉',
+ placeholder: t('pages.basicInfo.companys.placeholders.contact'),
clearable: true
}
},
{
- label: '鑱旂郴鐢佃瘽',
+ label: t('pages.basicInfo.companys.table.tel'),
key: 'tel',
type: 'input',
props: {
- placeholder: '璇疯緭鍏ヨ仈绯荤數璇�',
+ placeholder: t('pages.basicInfo.companys.placeholders.tel'),
clearable: true
}
},
{
- label: '閭',
+ label: t('pages.basicInfo.companys.table.email'),
key: 'email',
type: 'input',
props: {
- placeholder: '璇疯緭鍏ラ偖绠�',
+ placeholder: t('pages.basicInfo.companys.placeholders.email'),
clearable: true
}
},
{
- label: '閭紪',
+ label: t('pages.basicInfo.companys.table.postCode'),
key: 'pcode',
type: 'input',
props: {
- placeholder: '璇疯緭鍏ラ偖缂�',
+ placeholder: t('pages.basicInfo.companys.placeholders.postCode'),
clearable: true
}
},
{
- label: '鐪佷唤',
+ label: t('pages.basicInfo.companys.table.province'),
key: 'province',
type: 'input',
props: {
- placeholder: '璇疯緭鍏ョ渷浠�',
+ placeholder: t('pages.basicInfo.companys.placeholders.province'),
clearable: true
}
},
{
- label: '鍩庡競',
+ label: t('pages.basicInfo.companys.table.city'),
key: 'city',
type: 'input',
props: {
- placeholder: '璇疯緭鍏ュ煄甯�',
+ placeholder: t('pages.basicInfo.companys.placeholders.city'),
clearable: true
}
},
{
- label: '鍦板潃',
+ label: t('pages.basicInfo.companys.table.address'),
key: 'address',
type: 'input',
span: 24,
props: {
- placeholder: '璇疯緭鍏ュ湴鍧�',
+ placeholder: t('pages.basicInfo.companys.placeholders.address'),
clearable: true
}
},
{
- label: '鐘舵��',
+ label: t('table.status'),
key: 'status',
type: 'select',
props: {
- placeholder: '璇烽�夋嫨鐘舵��',
+ placeholder: t('pages.basicInfo.companys.placeholders.status'),
clearable: true,
- options: getCompanysStatusOptions()
+ options: getCompanysStatusOptions(t)
}
},
{
- label: '澶囨敞',
+ label: t('table.remark'),
key: 'memo',
type: 'input',
span: 24,
props: {
type: 'textarea',
rows: 3,
- placeholder: '璇疯緭鍏ュ娉�',
+ placeholder: t('pages.basicInfo.companys.placeholders.memo'),
clearable: true
}
}
--
Gitblit v1.9.1