fix(系统设置): 修改成员和插件细节bug

This commit is contained in:
xinxin.wu 2023-08-28 19:01:54 +08:00 committed by fit2-zhao
parent 893656a506
commit 7b0127a5ea
7 changed files with 18 additions and 7 deletions

View File

@ -7,7 +7,11 @@
:cancel-text="t('organization.member.Cancel')" :cancel-text="t('organization.member.Cancel')"
> >
<template #title> <template #title>
{{ type === 'add' ? t('organization.member.addMember') : t('organization.member.updateMember') }} {{
type === 'add'
? t('organization.member.addMember')
: t('organization.member.updateMember', { name: memberName })
}}
</template> </template>
<div class="form"> <div class="form">
<a-form ref="memberFormRef" :model="form" size="large" layout="vertical"> <a-form ref="memberFormRef" :model="form" size="large" layout="vertical">
@ -102,11 +106,15 @@
form.value = { ...initFormValue }; form.value = { ...initFormValue };
dialogVisible.value = false; dialogVisible.value = false;
}; };
const memberName = ref<string>('');
const edit = (record: MemberItem) => { const edit = (record: MemberItem) => {
const { userRoleIdNameMap, projectIdNameMap } = record; const { userRoleIdNameMap, projectIdNameMap } = record;
form.value.memberIds = [record.id as string]; form.value.memberIds = [record.id as string];
form.value.userRoleIds = (userRoleIdNameMap || []).map((item) => item.id); form.value.userRoleIds = (userRoleIdNameMap || []).map((item) => item.id);
form.value.projectIds = (projectIdNameMap || []).map((item) => item.id); form.value.projectIds = (projectIdNameMap || []).map((item) => item.id);
memberName.value = record.name;
}; };
const handleOK = () => { const handleOK = () => {
memberFormRef.value?.validate(async (errors: undefined | Record<string, ValidatedError>) => { memberFormRef.value?.validate(async (errors: undefined | Record<string, ValidatedError>) => {

View File

@ -9,6 +9,7 @@
<a-input-search <a-input-search
v-model="keyword" v-model="keyword"
:max-length="250" :max-length="250"
allow-clear
:placeholder="t('organization.member.searchMember')" :placeholder="t('organization.member.searchMember')"
class="w-[230px]" class="w-[230px]"
@search="searchHandler" @search="searchHandler"
@ -304,7 +305,7 @@
}, },
]; ];
// //
const addProjectOrAddUserGroup = (target: string[], type: string) => { const addProjectOrAddUserGroup = async (target: string[], type: string) => {
const currentType = batchList.find((item) => item.type === type); const currentType = batchList.find((item) => item.type === type);
const params: BatchAddProjectModel = { const params: BatchAddProjectModel = {
organizationId: lastOrganizationId, organizationId: lastOrganizationId,
@ -315,7 +316,8 @@
} else { } else {
params.userRoleIds = target; params.userRoleIds = target;
} }
if (currentType) batchModalRef.value.batchRequestFun(currentType.request, params); if (currentType) await batchModalRef.value.batchRequestFun(currentType.request, params);
loadList();
}; };
// //
const handleTableBatch = (actionItem: any) => { const handleTableBatch = (actionItem: any) => {

View File

@ -1,6 +1,6 @@
export default { export default {
'organization.member.addMember': 'Add Member', 'organization.member.addMember': 'Add Member',
'organization.member.updateMember': 'Update Member', 'organization.member.updateMember': 'Update Member{name}',
'organization.member.searchMember': 'Search by name or email address', 'organization.member.searchMember': 'Search by name or email address',
'organization.member.remove': 'Remove', 'organization.member.remove': 'Remove',
'organization.member.edit': 'Edit', 'organization.member.edit': 'Edit',

View File

@ -1,6 +1,6 @@
export default { export default {
'organization.member.addMember': '添加成员', 'organization.member.addMember': '添加成员',
'organization.member.updateMember': '更新成员', 'organization.member.updateMember': '更新成员{name}',
'organization.member.searchMember': '通过名称或邮箱搜索搜索', 'organization.member.searchMember': '通过名称或邮箱搜索搜索',
'organization.member.remove': '移除', 'organization.member.remove': '移除',
'organization.member.edit': '编辑', 'organization.member.edit': '编辑',

View File

@ -8,6 +8,7 @@
v-model="keyword" v-model="keyword"
:placeholder="t('organization.service.searchService')" :placeholder="t('organization.service.searchService')"
:max-length="250" :max-length="250"
allow-clear
@search="searchHandler" @search="searchHandler"
@press-enter="searchHandler" @press-enter="searchHandler"
/> />

View File

@ -6,7 +6,7 @@
<a-button class="mr-3" type="primary" @click="uploadPlugin">{{ t('system.plugin.uploadPlugin') }}</a-button> <a-button class="mr-3" type="primary" @click="uploadPlugin">{{ t('system.plugin.uploadPlugin') }}</a-button>
</a-col> </a-col>
<a-col :span="5" :offset="9"> <a-col :span="5" :offset="9">
<a-select v-model="searchKeys.scene"> <a-select v-model="searchKeys.scene" @change="searchHandler">
<a-option v-for="item of sceneList" :key="item.value" :value="item.value">{{ t(item.label) }}</a-option> <a-option v-for="item of sceneList" :key="item.value" :value="item.value">{{ t(item.label) }}</a-option>
</a-select> </a-select>
</a-col> </a-col>

View File

@ -109,7 +109,7 @@
const { id, name, organizationIds, global, description } = form.value; const { id, name, organizationIds, global, description } = form.value;
const params = { const params = {
id, id,
name, name: name || title.value,
organizationIds, organizationIds,
global, global,
description, description,