|
|
|
@ -23,11 +23,13 @@ import {
|
|
|
|
|
createTenant, |
|
|
|
|
updateTenant |
|
|
|
|
} from '@/service/modules/tenants' |
|
|
|
|
import { useI18n } from 'vue-i18n' |
|
|
|
|
|
|
|
|
|
export function useModalData( |
|
|
|
|
props: any, |
|
|
|
|
ctx: SetupContext<('cancelModal' | 'confirmModal')[]> |
|
|
|
|
) { |
|
|
|
|
const { t } = useI18n() |
|
|
|
|
const variables = reactive({ |
|
|
|
|
tenantFormRef: ref(), |
|
|
|
|
model: { |
|
|
|
@ -40,7 +42,12 @@ export function useModalData(
|
|
|
|
|
saving: false, |
|
|
|
|
rules: { |
|
|
|
|
tenantCode: { |
|
|
|
|
required: true |
|
|
|
|
required: true, |
|
|
|
|
validator() { |
|
|
|
|
if (!variables.model.tenantCode) { |
|
|
|
|
return new Error(t('security.tenant.tenant_code_tips')) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
queueId: { |
|
|
|
|
required: true |
|
|
|
|