| | |
| | | if (reload) { |
| | | this.q.pi = 1; |
| | | } |
| | | this.http.get(environment.SERVER_BASH_URL + '/user/operate_user', this.q).subscribe((res: any) => { |
| | | this.http.get(environment.SERVER_BASH_URL + '/operateUser/list', {params: this.q}).subscribe((res: any) => { |
| | | // let data = res.data; |
| | | // const total = res.total; |
| | | // |
| | |
| | | // this.data = data.slice(start, start + this.q.ps); |
| | | // this.total = total; |
| | | |
| | | this.data = res.data; |
| | | this.total = res.total; |
| | | this.data = res.data.data; |
| | | this.total = res.data.total; |
| | | this.dataChange(this.data); |
| | | |
| | | }); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | delete(user) { |
| | | this.http.delete(environment.SERVER_BASH_URL + '/user/operate_user/' + user.id).subscribe((res: any) => { |
| | | this.http.post(environment.SERVER_BASH_URL + '/operateUser/operateUser/id',user).subscribe((res: any) => { |
| | | this.msgSrv.success('安装用户删除成功!'); |
| | | this.load(true); |
| | | }); |
| | |
| | | this.selectedRows.forEach(i => { |
| | | ids.push(i.id); |
| | | }); |
| | | console.log(ids); |
| | | this.http.post(environment.SERVER_BASH_URL + '/user/operate_user/deleteList', ids).subscribe((res: any) => { |
| | | this.http.post(environment.SERVER_BASH_URL + '/operateUser/operateUsers/ids', ids).subscribe((res: any) => { |
| | | this.load(true); |
| | | }); |
| | | } |
| | | |
| | | checkAll(value: boolean) { |
| | | this.curRows.forEach(i => { |
| | | i.checked = value; |
| | | if (i.isDelete == '1') { |
| | | i.checked = false; |
| | | } else { |
| | | i.checked = value; |
| | | } |
| | | }); |
| | | this.refreshStatus(); |
| | | } |
| | |
| | | sort(field: string, value: any) { |
| | | this.sortMap = {}; |
| | | this.sortMap[field] = value; |
| | | this.q.sorter = value ? `${field}_${value}` : ''; |
| | | this.q.sorter = value ? `${field} ${value}` : ''; |
| | | this.load(true); |
| | | } |
| | | |