Selaa lähdekoodia

feat(core): update some translate

gemercheung 3 vuotta sitten
vanhempi
commit
87fe8190af

+ 9 - 0
src/locales/lang/ja/routes/corporation.ts

@@ -29,4 +29,13 @@ export default {
   activeTime: 'アクティベーション時間',
   unBind: '解放する',
   isUnBind: 'バインドを解除するかどうか?',
+  reject: '拒絶',
+  allow: '許可する',
+  name: '情報タイトル ',
+  area: 'それが属するエリア',
+  address: '住所',
+  website: 'Webサイト',
+  introduce: '会社概要',
+  companyLogo: '会社LOGO',
+  qualification: '資格',
 };

+ 9 - 0
src/locales/lang/zh-CN/routes/corporation.ts

@@ -29,4 +29,13 @@ export default {
   activeTime: '激活时间',
   unBind: '解除绑定',
   isUnBind: '是否解除绑定?',
+  reject: '拒绝',
+  allow: '同意',
+  name: '信息标题',
+  area: '所属区域',
+  address: '详细地址',
+  website: '企业官网',
+  introduce: '企业简介',
+  companyLogo: '企业LOGO',
+  qualification: '企业资质',
 };

+ 27 - 23
src/views/corporation/detailsModal.vue

@@ -3,24 +3,26 @@
     v-bind="$attrs"
     @register="register"
     :title="t('routes.corporation.businessAuth')"
-    cancelText="拒绝"
-    okText="通过"
+    :cancelText="t('routes.corporation.reject')"
+    :okText="t('routes.corporation.allow')"
     @cancel="closeModal"
     @visible-change="handleVisibleChange"
   >
     <template #footer>
       <div>
-        <a-button type="primary" danger @click="submitMolad(false)">拒绝</a-button>
-        <a-button type="primary" @click="submitMolad(true)">同意</a-button>
+        <a-button type="primary" danger @click="submitModal(false)">{{
+          t('routes.corporation.reject')
+        }}</a-button>
+        <a-button type="primary" @click="submitModal(true)">{{
+          t('routes.corporation.allow')
+        }}</a-button>
       </div>
     </template>
     <div class="pt-3px pr-3px">
       <BasicForm @register="registerForm">
-        <template #text="{ model, field }">
-          {{ model[field] }}
-        </template>
+        <template #text="{ model, field }"> {{ `: ${model[field]}` }} </template>
         <template #link="{ model, field }">
-          <a :href="model[field]" target="_blank">{{ model[field] }}</a>
+          <a :href="model[field]" target="_blank">{{ `: ${model[field]}` }}</a>
         </template>
         <template #image="{ model, field }">
           <div v-if="model[field]">
@@ -32,13 +34,15 @@
   </BasicModal>
 </template>
 <script lang="ts">
-  import { defineComponent, ref, nextTick } from 'vue';
+  import { defineComponent, ref, nextTick, computed } from 'vue';
   import { TableImg } from '/@/components/Table';
   import { BasicModal, useModalInner } from '/@/components/Modal';
   import { BasicForm, FormSchema, useForm } from '/@/components/Form/index';
   import { useMessage } from '/@/hooks/web/useMessage';
   import { checkDevice, selectCompanyById, auditCompany } from '/@/api/corporation/modal';
   import { useI18n } from '/@/hooks/web/useI18n';
+  import { useLocaleStore } from '/@/store/modules/locale';
+  const localeStore = useLocaleStore();
 
   export default defineComponent({
     components: { BasicModal, BasicForm, TableImg },
@@ -55,7 +59,7 @@
       const [register, { closeModal }] = useModalInner((data) => {
         data && onDataReceive(data);
       });
-
+      const isJA = computed(() => localeStore.getLocale === 'ja');
       const handlevalidator = async (_, value) => {
         console.log('handlevalidator', value);
         if (!value) {
@@ -77,7 +81,7 @@
       const schemas: FormSchema[] = [
         {
           field: 'name',
-          label: '信息标题',
+          label: t('routes.corporation.name'),
           slot: 'text',
           component: 'Input',
         },
@@ -89,43 +93,43 @@
         },
         {
           field: 'phone',
-          label: '手机号',
+          label: t('routes.corporation.phone'),
           slot: 'text',
           component: 'Input',
         },
         {
           field: 'area',
-          label: '所属区域',
+          label: t('routes.corporation.area'),
           slot: 'text',
           component: 'Input',
         },
         {
           field: 'address',
-          label: '详细地址',
+          label: t('routes.corporation.address'),
           slot: 'text',
           component: 'Input',
         },
         {
           field: 'website',
-          label: '企业官网',
+          label: t('routes.corporation.website'),
           slot: 'text',
           component: 'Input',
         },
         {
-          field: 'name',
-          label: '企业简介',
+          field: 'introduce',
+          label: `${t('routes.corporation.introduce')} :`,
           slot: 'name',
           component: 'Input',
         },
         {
           field: 'logo',
-          label: '企业LOGO',
+          label: `${t('routes.corporation.companyLogo')} :`,
           slot: 'image',
           component: 'Input',
         },
         {
           field: 'qualification',
-          label: '企业资质',
+          label: `${t('routes.corporation.qualification')} :`,
           slot: 'image',
           component: 'Input',
         },
@@ -135,15 +139,15 @@
         registerForm,
         { setFieldsValue, resetFields, appendSchemaByField, removeSchemaByFiled },
       ] = useForm({
-        labelWidth: 120,
+        labelWidth: isJA.value ? 150 : 120,
         schemas,
         showActionButtonGroup: false,
         actionColOptions: {
           span: 24,
         },
       });
-      async function submitMolad(val) {
-        console.log('submitMolad', val);
+      async function submitModal(val) {
+        console.log('submitModal', val);
         let res = await auditCompany({
           id: modelRef.value.id,
           state: val ? 1 : 2,
@@ -219,7 +223,7 @@
       }
       return {
         register,
-        submitMolad,
+        submitModal,
         schemas,
         registerForm,
         numOnChange,

+ 1 - 1
src/views/corporation/index.vue

@@ -109,8 +109,8 @@
   import { Tag } from 'ant-design-vue';
   import type { Result } from '/#/axios';
   import { useLocaleStore } from '/@/store/modules/locale';
-
   const localeStore = useLocaleStore();
+
   export default defineComponent({
     components: {
       BasicTable,