|
@@ -336,14 +336,33 @@ export default {
|
|
|
dept: this.dept_selected_list
|
|
|
})
|
|
|
this.close()
|
|
|
- },
|
|
|
- //获取员工详情
|
|
|
- get_user_list() {
|
|
|
- this.table_loading = true;
|
|
|
- var that=this;
|
|
|
- var employee_selected_list=this.employee_selected_list;
|
|
|
- if (this.employee_list.length > 0||this.isCreatorSelect) {
|
|
|
- let list = this.employee_list
|
|
|
+ },
|
|
|
+ filtration(){//获取员工列表,限制已禁用的员工
|
|
|
+ this.$axios('get','/api/employee/index',{ dept_id: 0, page: 0,page_size: 2000}).then((res) => {
|
|
|
+ if(res.data.code == 1){
|
|
|
+ let list = res.data.data.list
|
|
|
+ let data = []
|
|
|
+ list.forEach((item,index)=>{
|
|
|
+ if(item.is_official == 1){
|
|
|
+ data.push(item)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.userdatars(data)
|
|
|
+ }else{
|
|
|
+ this.userdatars()
|
|
|
+ }
|
|
|
+ }).catch(()=>{
|
|
|
+ this.userdatars()
|
|
|
+ }).finally(()=>{
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+ userdatars(userlist){
|
|
|
+ var employee_selected_list=this.employee_selected_list;
|
|
|
+ let list = this.employee_list
|
|
|
+ if(userlist){
|
|
|
+ list = [...list].filter(x => [...userlist].some(y => y.id === x.id))
|
|
|
+ }
|
|
|
list.map((item)=>{
|
|
|
item['checked'] = false;
|
|
|
for(var i in employee_selected_list){//判断传进来的员工是否是员工集合里的,是就设为已点击状态
|
|
@@ -354,6 +373,25 @@ export default {
|
|
|
})
|
|
|
this.list=list;
|
|
|
this.table_loading = false;
|
|
|
+ },
|
|
|
+ //获取员工详情
|
|
|
+ get_user_list() {
|
|
|
+ this.table_loading = true;
|
|
|
+ var that=this;
|
|
|
+ var employee_selected_list=this.employee_selected_list;
|
|
|
+ if (this.employee_list.length > 0||this.isCreatorSelect) {
|
|
|
+ this.filtration()
|
|
|
+ // let list = this.employee_list
|
|
|
+ // list.map((item)=>{
|
|
|
+ // item['checked'] = false;
|
|
|
+ // for(var i in employee_selected_list){//判断传进来的员工是否是员工集合里的,是就设为已点击状态
|
|
|
+ // if(employee_selected_list[i].id==item.id){
|
|
|
+ // item['checked'] = true;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // this.list=list;
|
|
|
+ // this.table_loading = false;
|
|
|
return false
|
|
|
}
|
|
|
this.list = []
|