修改活动分组
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<ele-modal
|
||||
width="70%"
|
||||
:visible="visible"
|
||||
title="添加用户"
|
||||
title="添加分组用户"
|
||||
@update:visible="updateVisible"
|
||||
>
|
||||
<div class="ele-body" style="padding: 0px">
|
||||
@@ -20,8 +20,8 @@
|
||||
layout="total, prev, pager, next, jumper"
|
||||
>
|
||||
<template v-slot:toolkit>
|
||||
<el-row>
|
||||
<el-col style="width: 50%; padding-right: 5px">
|
||||
<el-row :gutter="15">
|
||||
<el-col style="width: 45%; padding-right: 5px">
|
||||
<ele-tree-select
|
||||
v-show="userFrom == 0 ? true : false"
|
||||
:data="organizationList"
|
||||
@@ -49,11 +49,11 @@
|
||||
:check-strictly="false"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col style="width: 20%; padding-right: 5px">
|
||||
<el-col style="width: 25%; padding-right: 5px">
|
||||
<el-input
|
||||
:maxlength="20"
|
||||
clearable
|
||||
v-model="keyword"
|
||||
placeholder="请输入姓名"
|
||||
placeholder="搜姓名或手机"
|
||||
size="small"
|
||||
/>
|
||||
</el-col>
|
||||
@@ -91,7 +91,6 @@
|
||||
height="535px"
|
||||
emptyText="未选择用户"
|
||||
:toolkit="[]"
|
||||
:tool-style="{ lineHeight: '40px' }"
|
||||
layout="total, prev, pager, next, jumper"
|
||||
>
|
||||
<template v-slot:toolkit>
|
||||
@@ -186,10 +185,14 @@
|
||||
/* 获取机构用户 */
|
||||
query() {
|
||||
if (this.organizationIds.length <= 0 && !this.keyword) {
|
||||
this.$message.error('请选择机构或输入姓名');
|
||||
this.$message.error('请选择机构/搜姓名或手机');
|
||||
return;
|
||||
}
|
||||
if (this.keyword) {
|
||||
this.organizationIds = [];
|
||||
}
|
||||
listUsers({
|
||||
activityId: this.activityId,
|
||||
organizationIds: this.organizationIds,
|
||||
keyword: this.keyword
|
||||
})
|
||||
@@ -218,10 +221,14 @@
|
||||
/* 获取团队用户 */
|
||||
queryTeam() {
|
||||
if (this.teamIds.length <= 0 && !this.keyword) {
|
||||
this.$message.error('请选择团队或输入姓名');
|
||||
this.$message.error('请选择团队/搜姓名或手机');
|
||||
return;
|
||||
}
|
||||
if (this.keyword) {
|
||||
this.teamIds = [];
|
||||
}
|
||||
listTeamUser({
|
||||
activityId: this.activityId,
|
||||
teamIds: this.teamIds,
|
||||
keyword: this.keyword
|
||||
})
|
||||
@@ -249,6 +256,10 @@
|
||||
},
|
||||
/* 添加 */
|
||||
add(row) {
|
||||
if (row.groups == 1) {
|
||||
this.$message.error('此用户已添加过分组了');
|
||||
return;
|
||||
}
|
||||
this.chooseUsers.push(row);
|
||||
},
|
||||
/* 移除 */
|
||||
@@ -258,7 +269,9 @@
|
||||
/* 添加全部 */
|
||||
addAll() {
|
||||
this.unChooseUsers.forEach((d) => {
|
||||
this.chooseUsers.push(d);
|
||||
if (d.groups == 0) {
|
||||
this.chooseUsers.push(d);
|
||||
}
|
||||
});
|
||||
},
|
||||
/* 移除所有 */
|
||||
@@ -306,19 +319,19 @@
|
||||
prop: 'uname',
|
||||
label: '姓名',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 110
|
||||
minWidth: 100
|
||||
},
|
||||
{
|
||||
prop: 'mobile',
|
||||
label: '手机号',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 110
|
||||
minWidth: 100
|
||||
},
|
||||
{
|
||||
prop: this.userFrom == 0 ? 'organizationName' : 'teamName',
|
||||
label: this.userFrom == 0 ? '机构' : '团队',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 110
|
||||
minWidth: 150
|
||||
}
|
||||
];
|
||||
if (visible) {
|
||||
|
||||
Reference in New Issue
Block a user