Commit 3d887bdf authored by wangqinghua's avatar wangqinghua

update

parent 78038505
...@@ -22,7 +22,8 @@ export class AuthInterceptor implements HttpInterceptor { ...@@ -22,7 +22,8 @@ export class AuthInterceptor implements HttpInterceptor {
if (!!token) { if (!!token) {
request = request.clone({ request = request.clone({
setHeaders: { setHeaders: {
accessToken: token accessToken: token,
moduleId:this.localStorage.retrieve("moduleId")
} }
}); });
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<span title><i class="icon iconfont icon-{{item.imageUrl}}"></i>{{item.name}}</span> <span title><i class="icon iconfont icon-{{item.imageUrl}}"></i>{{item.name}}</span>
<ul> <ul>
<ng-container *ngFor="let child of item.children" > <ng-container *ngFor="let child of item.children" >
<li nz-menu-item routerLink="{{child.url}}">{{child.name}}</li> <li nz-menu-item (click)="goToRoute(child)">{{child.name}}</li>
</ng-container> </ng-container>
</ul> </ul>
</li> </li>
......
...@@ -297,4 +297,10 @@ export class SidebarComponent implements OnInit { ...@@ -297,4 +297,10 @@ export class SidebarComponent implements OnInit {
goTo(route) { goTo(route) {
this.router.navigate([route]); this.router.navigate([route]);
} }
goToRoute(node){
console.log(node);
this.$localStorage.store("moduleId",node.id);
this.router.navigate(["app/main/"+ node.url]);
}
} }
...@@ -699,15 +699,15 @@ export class BasicDetailComponent implements OnInit, AfterViewInit { ...@@ -699,15 +699,15 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
nzOkType: 'danger', nzOkType: 'danger',
nzOnOk: () => { nzOnOk: () => {
const data = { const data = {
params:[item.itemid] itemIds:[item.itemid]
}; };
this.overAllSer.deleteItem(data).subscribe( this.overAllSer.deleteItem(data).subscribe(
(res) => { (res) => {
if (res.errCode == 10000) { if (res.errCode == 10000) {
this.message.info('删除成功'); this.message.success('删除成功');
this.getCheckList(null); this.getCheckList(null);
} else { } else {
this.message.info(res.errMsg); this.message.error(res.errMsg);
} }
} }
); );
......
...@@ -16,7 +16,6 @@ export class AuthServerProvider { ...@@ -16,7 +16,6 @@ export class AuthServerProvider {
) {} ) {}
getToken() { getToken() {
return this.$localStorage.retrieve('authenticationToken') || this.$sessionStorage.retrieve('authenticationToken'); return this.$localStorage.retrieve('authenticationToken') || this.$sessionStorage.retrieve('authenticationToken');
} }
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<span class="custom-node" draggable="true" aria-grabbed="true" [class.active]="node.isSelected"> <span class="custom-node" draggable="true" aria-grabbed="true" [class.active]="node.isSelected">
<span> <span>
{{node.title}} {{node.title}}
<i (click)="editGroup(node)" style="margin-left: 20px;" class="anticon anticon-edit"></i> <i (click)="editGroup(node)" style="margin:0 10px 0 20px;" class="anticon anticon-form"></i>
<i (click)="deleteGroup(node)" class="anticon anticon-close-circle-o"></i> <i (click)="deleteGroup(node)" class="anticon anticon-close-circle-o"></i>
</span> </span>
</span> </span>
......
...@@ -61,9 +61,11 @@ export class GroupComponent implements OnInit { ...@@ -61,9 +61,11 @@ export class GroupComponent implements OnInit {
getUser() { getUser() {
const data = { const data = {
'name': '', 'userBo': {
'orgId': '', search:null,
'pageNumber': '1', organizationId:null
},
'pageNum': '1',
'pageSize': '10' 'pageSize': '10'
}; };
this.systemSer.user(data).subscribe( this.systemSer.user(data).subscribe(
......
...@@ -2,12 +2,23 @@ ...@@ -2,12 +2,23 @@
<div style="position: absolute;left:20%;top: 15px;"> <div style="position: absolute;left:20%;top: 15px;">
<nz-switch [(ngModel)]="first.check" (ngModelChange)="changeValue('1')"></nz-switch> <nz-switch [(ngModel)]="first.check" (ngModelChange)="changeValue('1')"></nz-switch>
</div> </div>
<form nz-form> <!--<div disabled="{{isDisabled}}">-->
<nz-form-item *ngFor="let item of list;let i = index;"> <form nz-form>
<nz-form-label [nzSm]="8" [nzXs]="24" [ngModelOptions]="{standalone: true}">{{item.comment}}</nz-form-label> <nz-form-item >
<nz-form-control [nzSm]="14" [nzXs]="24"> <nz-form-label [nzSm]="8" [nzXs]="24" [ngModelOptions]="{standalone: true}">{{second?.comment}}</nz-form-label>
<nz-switch [(ngModel)]="item.check" [ngModelOptions]="{standalone: true}" (ngModelChange)="changeValue(i+2)"></nz-switch> <nz-form-control [nzSm]="14" [nzXs]="24">
</nz-form-control> <nz-switch [(ngModel)]="second.check" [ngModelOptions]="{standalone: true}" (ngModelChange)="changeValue('2')"></nz-switch>
</nz-form-item> </nz-form-control>
</form> </nz-form-item>
</form>
<form nz-form>
<nz-form-item >
<nz-form-label [nzSm]="8" [nzXs]="24" [ngModelOptions]="{standalone: true}">{{third?.comment}}</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<nz-switch [(ngModel)]="third.check" [ngModelOptions]="{standalone: true}" (ngModelChange)="changeValue('3')"></nz-switch>
</nz-form-control>
</nz-form-item>
</form>
<!--</div>-->
</nz-modal> </nz-modal>
...@@ -10,6 +10,7 @@ import {NzMessageService} from 'ng-zorro-antd'; ...@@ -10,6 +10,7 @@ import {NzMessageService} from 'ng-zorro-antd';
export class SeparationComponent implements OnInit { export class SeparationComponent implements OnInit {
isVisible = false; isVisible = false;
isDisabled = false;
title; title;
list = []; list = [];
value = 0; value = 0;
...@@ -18,6 +19,16 @@ export class SeparationComponent implements OnInit { ...@@ -18,6 +19,16 @@ export class SeparationComponent implements OnInit {
scValue:null, scValue:null,
check:null check:null
}; };
second = {
id:"",
scValue:null,
check:null
};
third = {
id:"",
scValue:null,
check:null
};
constructor(private systemSer: SystemService,private message:NzMessageService) { constructor(private systemSer: SystemService,private message:NzMessageService) {
} }
...@@ -30,20 +41,11 @@ export class SeparationComponent implements OnInit { ...@@ -30,20 +41,11 @@ export class SeparationComponent implements OnInit {
(res) => { (res) => {
if (res.errCode == 10000) { if (res.errCode == 10000) {
this.first = res.data[0]; this.first = res.data[0];
if(this.first.scValue == 1){ this.second = res.data[1];
this.first.check = true; this.third = res.data[2];
}else{ this.first.check = this.first.scValue == 1 ? true : false;
this.first.check = false; this.second.check = this.second.scValue == 1 ? true : false;
} this.third.check = this.third.scValue == 1 ? true : false;
res.data.splice(0, 1);
this.list = res.data;
this.list.forEach(e=>{
if(e.scValue == 1){
e.check = true;
}else{
e.check = false;
}
})
} }
} }
); );
...@@ -60,44 +62,86 @@ export class SeparationComponent implements OnInit { ...@@ -60,44 +62,86 @@ export class SeparationComponent implements OnInit {
} }
changeValue(type) { changeValue(type) {
let arr = { switch (type) {
check:"", case "1":{
scValue:null, if(this.first.check){
id:"" this.systemSer.separationConfigOpen().subscribe(
}; (res) => {
if (type == "1") { if (res.data == 1) {
arr = this.first; this.message.success("已开启三员分立功能");
} } else {
if (type == "2") { this.message.error(res.errMsg);
arr = this.list[0]; }
} this.separationPowerStatus();
if (type == "3") { }
arr = this.list[1]; )
} }else{
this.systemSer.separationConfigClose().subscribe(
if (arr.check) { (res) => {
arr.scValue = 1; if (res.data == 1) {
} else { this.message.success("已关闭三员分立功能");
arr.scValue = 0; } else {
} this.message.error(res.errMsg);
const data = { }
id: arr.id, this.separationPowerStatus();
scValue: arr.scValue, }
}; )
}
this.systemSer.updateValue(data).subscribe( break;
(res) => { }
if (res.errCode == 10000) { case "3":{
if (this.first.check) { if(this.third.check){
this.message.success("已开启三员分立功能"); this.systemSer.openSystem().subscribe(
} else { (res) => {
this.message.success("已关闭三员分立功能"); if (res.data == 1) {
} this.message.success("已开启组织用户管理");
} else { } else {
this.message.error(res.errMsg); this.message.error(res.errMsg);
}
this.separationPowerStatus();
}
)
}else{
this.systemSer.closeSystem().subscribe(
(res) => {
if (res.data == 1) {
this.message.success("已关闭组织用户管理");
} else {
this.message.error(res.errMsg);
}
this.separationPowerStatus();
}
)
} }
break;
} }
) case "2":{
if(this.second.check){
this.systemSer.openAuth().subscribe(
(res) => {
if (res.data == 1) {
this.message.success("已开启角色与权限");
} else {
this.message.error(res.errMsg);
}
this.separationPowerStatus();
}
)
}else{
this.systemSer.closeAuth().subscribe(
(res) => {
if (res.data == 1) {
this.message.success("已关闭角色与权限");
} else {
this.message.error(res.errMsg);
}
this.separationPowerStatus();
}
)
}
break;
}
}
} }
//保存 //保存
......
...@@ -37,12 +37,12 @@ export class SystemService { ...@@ -37,12 +37,12 @@ export class SystemService {
//用户列表 //用户列表
user(data): Observable<any>{ user(data): Observable<any>{
return this.http.post(SERVER_API_URL_coms + '/user/findUsers',data); return this.http.post(SERVER_API_URL_coms + '/user/getUserList?',data);
} }
//新增用户 //新增用户
adduser(data): Observable<any>{ adduser(data): Observable<any>{
return this.http.post(SERVER_API_URL_coms + '/user',data); return this.http.post(SERVER_API_URL_coms + '/user/createUser',data);
} }
//删除用户 //删除用户
...@@ -152,4 +152,34 @@ export class SystemService { ...@@ -152,4 +152,34 @@ export class SystemService {
modifyPassword(data): Observable<any>{ modifyPassword(data): Observable<any>{
return this.http.post(SERVER_API_URL_coms + '/modifyPassword',data ); return this.http.post(SERVER_API_URL_coms + '/modifyPassword',data );
} }
//三员分立总开
separationConfigOpen(): Observable<any>{
return this.http.get(SERVER_API_URL_coms + '/separationConfig/open' );
}
//三员分立总关
separationConfigClose(): Observable<any>{
return this.http.get(SERVER_API_URL_coms + '/separationConfig/close' );
}
//组织系统用户 -关
closeSystem(): Observable<any>{
return this.http.get(SERVER_API_URL_coms + '/separationConfig/closeSystem' );
}
//组织系统用户 -开
openSystem(): Observable<any>{
return this.http.get(SERVER_API_URL_coms + '/separationConfig/openSystem' );
}
//角色与权限--开
openAuth(): Observable<any>{
return this.http.get(SERVER_API_URL_coms + '/separationConfig/openAuth' );
}
//角色与权限--关
closeAuth(): Observable<any>{
return this.http.get(SERVER_API_URL_coms + '/separationConfig/closeAuth' );
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment