|
|
|
@ -1,7 +1,7 @@ |
|
|
|
<template> |
|
|
|
<div v-if="visible" class="van-overlay"></div> |
|
|
|
<div v-if="visible" class="popup"> |
|
|
|
<div class="popup-title">部门查询</div> |
|
|
|
<div class="popup-title">人员查询</div> |
|
|
|
<!-- 返回按钮 --> |
|
|
|
<label class="btn-goback"><van-icon name="arrow-left" @click="next"/></label> |
|
|
|
<!-- 关闭按钮 --> |
|
|
|
@ -10,11 +10,11 @@ |
|
|
|
<!-- 弹窗的内容 --> |
|
|
|
<div class="popup-content"> |
|
|
|
<div class="subsearch"> |
|
|
|
<input class="searchbox" v-model="searchParam.deptName" placeholder="请输入部门名称"/> |
|
|
|
<input class="searchbox" v-model="searchKey" placeholder="请输入人员姓名"/> |
|
|
|
</div> |
|
|
|
<div class="btnbox"> |
|
|
|
<button class='btn-reset' @click="cancel()">重置</button> |
|
|
|
<button class='btn-search' @click="queryList()">搜索</button> |
|
|
|
<button class='btn-search' @click="queryUserList()">搜索</button> |
|
|
|
<button class='btn-search' @click="selectData()">确定</button> |
|
|
|
</div> |
|
|
|
|
|
|
|
@ -69,7 +69,7 @@ |
|
|
|
<script> |
|
|
|
import {ref} from 'vue' |
|
|
|
import {queryDepts, nextDeptByparentId, queryUsersNoPermission} from '../../api/user' |
|
|
|
import {Icon} from 'vant'; |
|
|
|
import {Icon, showSuccessToast} from 'vant'; |
|
|
|
|
|
|
|
const {useCommon} = $globalStore |
|
|
|
const router = useRouter(); |
|
|
|
@ -92,6 +92,7 @@ |
|
|
|
deptName: '', |
|
|
|
parentId: '0', |
|
|
|
}, |
|
|
|
searchKey: "", |
|
|
|
dataList: [], |
|
|
|
checked: ref([]), |
|
|
|
checkboxRefs: ref([]), |
|
|
|
@ -140,6 +141,17 @@ |
|
|
|
}, error => { |
|
|
|
}) |
|
|
|
}, |
|
|
|
queryUserList() { |
|
|
|
if (null == this.searchKey || "" == this.searchKey) { |
|
|
|
showSuccessToast('人员过多, 请输入关键字!'); |
|
|
|
return; |
|
|
|
} |
|
|
|
queryUsersNoPermission({"userName": this.searchKey}, success => { |
|
|
|
this.dataList = []; |
|
|
|
this.userList = success.data; |
|
|
|
}, error => { |
|
|
|
}); |
|
|
|
}, |
|
|
|
cancel() { |
|
|
|
this.searchParam.deptName = ''; |
|
|
|
this.queryList() |
|
|
|
|