租户邀请人加入改成采用手机号
parent
7bfd40ae04
commit
0b53292cfa
|
@ -0,0 +1,63 @@
|
||||||
|
<template>
|
||||||
|
<BasicModal @register="registerModal" :width="500" :title="title" @ok="handleSubmit">
|
||||||
|
<BasicForm @register="registerForm" />
|
||||||
|
</BasicModal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import { BasicModal, useModalInner } from '/@/components/Modal';
|
||||||
|
import { BasicForm, useForm } from '/@/components/Form/index';
|
||||||
|
import { defineComponent, ref } from 'vue';
|
||||||
|
export default defineComponent({
|
||||||
|
name: 'TenantInviteUserModal',
|
||||||
|
components: {
|
||||||
|
BasicModal,
|
||||||
|
BasicForm,
|
||||||
|
},
|
||||||
|
setup(props, { emit }) {
|
||||||
|
const title = ref<string>('邀请成员');
|
||||||
|
const [registerForm, { resetFields, validate }] = useForm({
|
||||||
|
schemas: [
|
||||||
|
{
|
||||||
|
label: '手机号',
|
||||||
|
field: 'phone',
|
||||||
|
component: 'Input',
|
||||||
|
dynamicRules: () => {
|
||||||
|
return [
|
||||||
|
{ required: true, message: '请填写手机号' },
|
||||||
|
{ pattern: /^1[3456789]\d{9}$/, message: '手机号码格式有误' },
|
||||||
|
];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
showActionButtonGroup: false,
|
||||||
|
labelCol: { span: 24 },
|
||||||
|
wrapperCol: { span: 24 },
|
||||||
|
});
|
||||||
|
//表单赋值
|
||||||
|
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
|
||||||
|
//重置表单
|
||||||
|
await resetFields();
|
||||||
|
setModalProps({ minHeight: 100 });
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交,返回给租户list页面
|
||||||
|
*/
|
||||||
|
async function handleSubmit() {
|
||||||
|
let values = await validate();
|
||||||
|
emit('inviteOk',values.phone);
|
||||||
|
closeModal();
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
title,
|
||||||
|
registerModal,
|
||||||
|
registerForm,
|
||||||
|
handleSubmit,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
|
@ -40,7 +40,7 @@
|
||||||
</template>
|
</template>
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
<TenantModal @register="registerModal" @success="reload" />
|
<TenantModal @register="registerModal" @success="reload" />
|
||||||
<UserSelectModal rowKey="id" @register="registerSelUserModal" @getSelectResult="onSelectOk" />
|
<TenantInviteUserModal @register="registerSelUserModal" @inviteOk="handleInviteUserOk"/>
|
||||||
<TenantUserModal @register="registerTenUserModal" />
|
<TenantUserModal @register="registerTenUserModal" />
|
||||||
<!-- 产品包 -->
|
<!-- 产品包 -->
|
||||||
<TenantPackModal @register="registerPackModal" />
|
<TenantPackModal @register="registerPackModal" />
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
import TenantModal from './TenantModal.vue';
|
import TenantModal from './TenantModal.vue';
|
||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
import { useListPage } from '/@/hooks/system/useListPage';
|
||||||
import UserSelectModal from '/@/components/Form/src/jeecg/components/modal/UserSelectModal.vue';
|
import TenantInviteUserModal from './TenantInviteUserModal.vue';
|
||||||
import TenantUserModal from './TenantUserModal.vue';
|
import TenantUserModal from './TenantUserModal.vue';
|
||||||
import TenantPackModal from './TenantPackModal.vue';
|
import TenantPackModal from './TenantPackModal.vue';
|
||||||
import TenantRecycleBinModal from './TenantRecycleBinModal.vue';
|
import TenantRecycleBinModal from './TenantRecycleBinModal.vue';
|
||||||
|
@ -156,14 +156,14 @@
|
||||||
/**
|
/**
|
||||||
* 用户选择回调事件
|
* 用户选择回调事件
|
||||||
* @param options
|
* @param options
|
||||||
* @param values
|
* @param value
|
||||||
*/
|
*/
|
||||||
async function onSelectOk(options, values) {
|
async function handleInviteUserOk(value) {
|
||||||
if (values && values.length > 0) {
|
//update-begin---author:wangshuai ---date:20230314 for:【QQYUN-4605】后台的邀请谁加入租户,没办法选不是租户下的用户------------
|
||||||
await invitationUserJoin({ ids: selectedRowKeys.value.join(','), userIds: values.join(',') });
|
if (value) {
|
||||||
} else {
|
await invitationUserJoin({ ids: selectedRowKeys.value.join(','), phone: value });
|
||||||
createMessage.warn('请选择用户!');
|
|
||||||
}
|
}
|
||||||
|
//update-end---author:wangshuai ---date:20230314 for:【QQYUN-4605】后台的邀请谁加入租户,没办法选不是租户下的用户------------
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue