|
@@ -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,
|