mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 11:19:56 +00:00
perf: 导出数据支持搜索离职会员
This commit is contained in:
parent
06795ca32c
commit
1cf5a24c26
@ -450,7 +450,7 @@ class UsersController extends AbstractController
|
||||
*
|
||||
* @apiParam {Object} keys 搜索条件
|
||||
* - keys.key 昵称、拼音、邮箱关键字
|
||||
* - keys.disable 0-排除禁止(默认),1-仅禁止,2-含禁止
|
||||
* - keys.disable 0-排除离职(默认),1-仅离职,2-含离职
|
||||
* - keys.bot 0-排除机器人(默认),1-仅机器人,2-含机器人
|
||||
* - keys.project_id 在指定项目ID
|
||||
* - keys.no_project_id 不在指定项目ID
|
||||
@ -527,8 +527,13 @@ class UsersController extends AbstractController
|
||||
if (in_array($sorts['az'], ['asc', 'desc'])) {
|
||||
$builder->orderBy('az', $sorts['az']);
|
||||
} else {
|
||||
if (intval($keys['disable']) == 2) {
|
||||
$builder->orderBy('disable_at');
|
||||
}
|
||||
if (intval($keys['bot']) == 2) {
|
||||
$builder->orderBy('bot');
|
||||
}
|
||||
}
|
||||
//
|
||||
if (Request::exists('page')) {
|
||||
$list = $builder->orderBy('userid')->paginate(Base::getPaginate(100, 10));
|
||||
|
||||
@ -37,6 +37,7 @@
|
||||
<div class="user-input-option">
|
||||
<div class="user-input-avatar"><EAvatar class="avatar" :src="item.userimg"/></div>
|
||||
<div v-if="item.bot" class="taskfont user-input-bot"></div>
|
||||
<div v-if="item.disable_at" class="user-input-disable">[{{$L('离职')}}]</div>
|
||||
<div class="user-input-nickname">{{ item.nickname }}</div>
|
||||
<div class="user-input-userid">ID: {{ item.userid }}</div>
|
||||
</div>
|
||||
@ -105,6 +106,10 @@
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
showDisable: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -190,7 +195,8 @@
|
||||
project_id: this.projectId,
|
||||
no_project_id: this.noProjectId,
|
||||
dialog_id: this.dialogId,
|
||||
bot: this.showBot ? 2 : 0,
|
||||
bot: this.showBot && key ? 2 : 0,
|
||||
disable: this.showDisable && key ? 2 : 0,
|
||||
},
|
||||
take: 50
|
||||
},
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
:mask-closable="false">
|
||||
<Form ref="export" :model="formData" label-width="auto" @submit.native.prevent>
|
||||
<FormItem :label="$L('导出成员')">
|
||||
<UserInput v-model="formData.userid" :multiple-max="100" :placeholder="$L('请选择成员')"/>
|
||||
<UserInput v-model="formData.userid" :multiple-max="100" show-disable :placeholder="$L('请选择成员')"/>
|
||||
<div class="form-tip">{{$L('每次最多选择导出100个成员')}}</div>
|
||||
</FormItem>
|
||||
<FormItem :label="$L('签到日期')">
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
:mask-closable="false">
|
||||
<Form ref="exportTask" :model="formData" label-width="auto" @submit.native.prevent>
|
||||
<FormItem :label="$L('导出成员')">
|
||||
<UserInput v-model="formData.userid" :multiple-max="100" :placeholder="$L('请选择成员')"/>
|
||||
<UserInput v-model="formData.userid" :multiple-max="100" show-disable :placeholder="$L('请选择成员')"/>
|
||||
<div class="form-tip">{{$L('每次最多选择导出100个成员')}}</div>
|
||||
</FormItem>
|
||||
<FormItem :label="$L('时间范围')">
|
||||
|
||||
@ -41,6 +41,12 @@
|
||||
margin-right: -6px;
|
||||
color: $primary-color;
|
||||
}
|
||||
.user-input-disable {
|
||||
font-size: 12px;
|
||||
margin-left: 10px;
|
||||
margin-right: -6px;
|
||||
color: #ff0000;
|
||||
}
|
||||
.user-input-nickname {
|
||||
margin-left: 10px;
|
||||
flex: 1;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user