Newer
Older
import { HttpClient } from "@angular/common/http";
import {Observable} from "rxjs/Rx";
import { Injectable } from '@angular/core';
import {CommonService} from '../shared/common/common.service';
constructor(private http: HttpClient,private commonSer:CommonService) {
return this.http.post(SERVER_API_URL_COMS + '/role/updateRole',data);
return this.http.post(SERVER_API_URL_COMS + '/role/createRole',data);
return this.http.get(SERVER_API_URL_COMS + '/role/deleteRoleById?' +this.commonSer.toQuery(params));
return this.http.post(SERVER_API_URL_COMS + '/user/getUserList?',data);
return this.http.post(SERVER_API_URL_COMS + '/user/createUser',data);
return this.http.post(SERVER_API_URL_COMS + '/user/updateUser',data);
return this.http.get(SERVER_API_URL_COMS + '/user/getUserById/'+params);
}
//查找用户角色
getRoleByUserId(data): Observable<any>{
return this.http.get(SERVER_API_URL_COMS + '/user/getRoleByUserId?'+ this.commonSer.toQuery(data) );
return this.http.get(SERVER_API_URL_COMS + '/user/deleteUser?' + this.commonSer.toQuery(data) );
return this.http.post(SERVER_API_URL_COMS + '/user/batchDeleteUser' ,data);
return this.http.get(SERVER_API_URL_COMS + '/organization/getAll',);
return this.http.get(SERVER_API_URL_COMS + '/organization/updateOrganization',);
return this.http.post(SERVER_API_URL_COMS + '/organization/createOrganization',data);
return this.http.get(SERVER_API_URL_COMS + '/separationConfig/getSeparationConfig',);
return this.http.get(SERVER_API_URL_COMS + '/log?'+this.commonSer.toQuery(data));
batchAuthRoleToUser(data): Observable<any>{
return this.http.post(SERVER_API_URL_COMS + '/role/batchAuthRoleToUser',data);
aloneUserToAuth(data): Observable<any>{
return this.http.post(SERVER_API_URL_COMS + '/user/auth',data);
}
//对多个用户 批量授权角色
batchUserToAuth(data): Observable<any>{
return this.http.post(SERVER_API_URL_COMS + '/user/batchAuth',data);
}
//根据部门查询角色
getUserByOrgIdAboutRole(data): Observable<any>{
return this.http.get(SERVER_API_URL_COMS + '/user/getUserByOrgIdAboutRole?'+this.commonSer.toQuery(data) );
return this.http.get(SERVER_API_URL_COMS + '/approval/separationPowerStatus');
return this.http.post(SERVER_API_URL_COMS + '/separationConfig/updateValue',data);
return this.http.get(SERVER_API_URL_COMS + '/role/currentUserRoles');
return this.http.get(SERVER_API_URL_COMS + '/user/roleList?'+this.commonSer.toQuery(data) );
//获取当前安全管理员已审批记录
approveListSafeManager(data): Observable<any>{
return this.http.get(SERVER_API_URL_COMS + '/approval/approveListSafeManager?'+this.commonSer.toQuery(data) );
}
//获取当前安全管理员未审批记录
unapproveListSafeManager(data): Observable<any>{
return this.http.get(SERVER_API_URL_COMS + '/approval/unapproveListSafeManager?'+this.commonSer.toQuery(data) );
}
//获取当前系统管理员的已审批记录
approveListSystemManager(data): Observable<any>{
return this.http.get(SERVER_API_URL_COMS + '/approval/approveListSystemManager?'+this.commonSer.toQuery(data) );
}
//获取当前系统管理员的未审批记录
unApproveListSystemManager(data): Observable<any>{
return this.http.get(SERVER_API_URL_COMS + '/approval/unApproveListSystemManager?'+this.commonSer.toQuery(data) );
return this.http.post(SERVER_API_URL_COMS + '/approval/pass', data);
return this.http.post(SERVER_API_URL_COMS + '/approval/reject', data);
return this.http.post(SERVER_API_URL_COMS + '/approval/remove', data);
return this.http.get(SERVER_API_URL_COMS + '/approval/approveList');
return this.http.get(SERVER_API_URL_COMS + '/approval/unApproveList' );
return this.http.post(SERVER_API_URL_COMS + '/modifyPassword',data );
return this.http.get(SERVER_API_URL_COMS + '/separationConfig/open' );
return this.http.get(SERVER_API_URL_COMS + '/separationConfig/close' );
return this.http.get(SERVER_API_URL_COMS + '/separationConfig/closeSystem' );
return this.http.get(SERVER_API_URL_COMS + '/separationConfig/openSystem' );
return this.http.get(SERVER_API_URL_COMS + '/separationConfig/openAuth' );
return this.http.get(SERVER_API_URL_COMS + '/separationConfig/closeAuth' );