From 4156fed8a32e81a61b706b8a17876f7a1fdcabb7 Mon Sep 17 00:00:00 2001 From: xufenglei <xufenglei> Date: Wed, 27 Dec 2017 15:45:16 +0800 Subject: [PATCH] 安装 用户更新 --- src/app/routes/users/installer/installer.component.ts | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/app/routes/users/installer/installer.component.ts b/src/app/routes/users/installer/installer.component.ts index 99bf082..2f52de4 100644 --- a/src/app/routes/users/installer/installer.component.ts +++ b/src/app/routes/users/installer/installer.component.ts @@ -15,7 +15,7 @@ q: any = { pi: 1, - ps: 10, + ps: 1, sorter: '', u_name: '', u_mobile: '' @@ -43,7 +43,7 @@ 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; // @@ -68,8 +68,10 @@ // 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); + }); } @@ -89,7 +91,7 @@ } 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); }); @@ -100,8 +102,7 @@ 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); }); } @@ -129,7 +130,7 @@ 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); } -- Gitblit v1.8.0