src/app/routes/users/installer/edit/edit.component.ts | ●●●●● patch | view | raw | blame | history | |
src/app/routes/users/installer/installer.component.html | ●●●●● patch | view | raw | blame | history | |
src/app/routes/users/installer/installer.component.ts | ●●●●● patch | view | raw | blame | history |
src/app/routes/users/installer/edit/edit.component.ts
@@ -27,8 +27,7 @@ } save() { this.http.get('./assets/pois.json').subscribe(() => { this.msgSrv.success('保存成功,只是模拟,实际未变更'); this.http.post('http://localhost:8001/user/operate_user/save', this.user).subscribe(() => { this.subject.next('true'); this.close(); }); src/app/routes/users/installer/installer.component.html
@@ -83,7 +83,7 @@ <td nz-td> <a (click)="edit(i)">编辑</a> <span nz-table-divider></span> <nz-popconfirm [nzTitle]="'确定要删除该用户吗?'" [nzOkText]="'Yes'" [nzCancelText]="'No'" (nzOnConfirm)="popConfirm(i)" (nzOnCancel)="popCancel()"> <nz-popconfirm [nzTitle]="'确定要删除该用户吗?'" [nzOkText]="'Yes'" [nzCancelText]="'No'" (nzOnConfirm)="delete(i)" > <a nz-popconfirm>删除</a> </nz-popconfirm> </td> src/app/routes/users/installer/installer.component.ts
@@ -72,17 +72,23 @@ edit(user) { this.modalHelper.static(UserInstallerEditComponent, { user }).subscribe(() => { this.load(true); this.msgSrv.info('回调,重新发起列表刷新'); this.msgSrv.success('安装用户修改成功!'); }); } add() { const user = {}; this.modalHelper.static(UserInstallerEditComponent, { user }); this.modalHelper.static(UserInstallerEditComponent, { user }).subscribe(() => { this.load(true); this.msgSrv.success('安装用户保存成功!'); }); } save() { delete(user) { this.http.delete('http://localhost:8001/user/operate_user/' + user.id).subscribe((res: any) => { this.msgSrv.success('安装用户删除成功!'); this.load(true); }); } remove() { @@ -115,14 +121,5 @@ reset(ls: any[]) { for (const item of ls) item.value = false; this.load(true); } // Popconfirm popConfirm(i) { this.msgSrv.success('Next step.'); } popCancel() { this.msgSrv.error('Click on No'); } }