权限菜单控制及系统管理操作优化
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve --proxy-config proxy.conf.json",
|
"start": "ng serve --port 8080 --proxy-config proxy.conf.json",
|
||||||
"build": "ng build",
|
"build": "ng build",
|
||||||
"test": "ng test",
|
"test": "ng test",
|
||||||
"lint": "ng lint",
|
"lint": "ng lint",
|
||||||
|
|||||||
@@ -126,34 +126,34 @@ export class MainComponent implements OnInit {
|
|||||||
this.calcVisibleCount();
|
this.calcVisibleCount();
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
|
|
||||||
//订阅航班更新
|
// 订阅航班更新
|
||||||
// this.websocketService.dynamicsMessage().subscribe(
|
this.websocketService.dynamicsMessage().subscribe(
|
||||||
// event => {
|
event => {
|
||||||
// setInterval(() => {
|
setInterval(() => {
|
||||||
// let msg = { "topic": "heart-beat", "message": "" };
|
let msg = { "topic": "heart-beat", "message": "" };
|
||||||
// this.websocketService.websocket.send(JSON.stringify(msg));
|
this.websocketService.websocket.send(JSON.stringify(msg));
|
||||||
// }, 30000);
|
}, 30000);
|
||||||
// let data = JSON.parse(event as string);
|
let data = JSON.parse(event as string);
|
||||||
// if (data.topic === 'schd') {
|
if (data.topic === 'schd') {
|
||||||
// let message = JSON.parse(data.message);
|
let message = JSON.parse(data.message);
|
||||||
// // console.log(message);
|
// console.log(message);
|
||||||
// //是否可以开始处理动态消息
|
//是否可以开始处理动态消息
|
||||||
// if (this.canHandleDynamicMessage) {
|
if (this.canHandleDynamicMessage) {
|
||||||
// this.dynamicMessageHandle(message);
|
this.dynamicMessageHandle(message);
|
||||||
// } else {
|
} else {
|
||||||
// this.dynamicMessageArray.push(message);
|
this.dynamicMessageArray.push(message);
|
||||||
// }
|
}
|
||||||
// } else if (data.topic === 'msg') {
|
} else if (data.topic === 'msg') {
|
||||||
// let message = JSON.parse(data.message);
|
let message = JSON.parse(data.message);
|
||||||
// // console.log(message);
|
// console.log(message);
|
||||||
// if (this.canHandleDynamicAlert) {
|
if (this.canHandleDynamicAlert) {
|
||||||
// this.dynamicAlertHandle(message);
|
this.dynamicAlertHandle(message);
|
||||||
// } else {
|
} else {
|
||||||
// this.dynamicAlertArray.push(message);
|
this.dynamicAlertArray.push(message);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// )
|
)
|
||||||
|
|
||||||
this.httpCilent.get('/adminapi/settings/uisettings').subscribe(
|
this.httpCilent.get('/adminapi/settings/uisettings').subscribe(
|
||||||
data => {
|
data => {
|
||||||
|
|||||||
@@ -19,175 +19,7 @@ export class PagesComponent implements OnInit {
|
|||||||
public role_type: string;
|
public role_type: string;
|
||||||
public menuClose: boolean = false;
|
public menuClose: boolean = false;
|
||||||
public isSpinning: any = false;
|
public isSpinning: any = false;
|
||||||
menuData = [
|
menuData = []
|
||||||
{
|
|
||||||
"name": "航班动态",
|
|
||||||
"icon": 'fa-plane',
|
|
||||||
"isExpend": false,
|
|
||||||
"isActive": true,
|
|
||||||
"path": "/app/main"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "季度计划",
|
|
||||||
"icon": 'fa-cube',
|
|
||||||
"isExpend": false,
|
|
||||||
"isActive": false,
|
|
||||||
"path": "/app/season"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "历史数据",
|
|
||||||
"icon": 'fa-history',
|
|
||||||
"isExpend": false,
|
|
||||||
"isActive": false,
|
|
||||||
"path": "/app/history"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "基础数据",
|
|
||||||
"icon": 'fa-database',
|
|
||||||
"isExpend": false,
|
|
||||||
"children": [
|
|
||||||
{
|
|
||||||
"name": "值机岛",
|
|
||||||
"icon": "fa-eercast",
|
|
||||||
"isExpend": false,
|
|
||||||
"isActive": false,
|
|
||||||
"path": "/app/basic/checkingroup"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "登机门",
|
|
||||||
"icon": "fa-h-square",
|
|
||||||
"isExpend": false,
|
|
||||||
"isActive": false,
|
|
||||||
"path": "/app/basic/gate"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "航站楼",
|
|
||||||
"icon": "fa-wpexplorer",
|
|
||||||
"isExpend": false,
|
|
||||||
"isActive": false,
|
|
||||||
"path": "/app/basic/terminal"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "行李传送带",
|
|
||||||
"icon": "fa-ils",
|
|
||||||
"isExpend": false,
|
|
||||||
"isActive": false,
|
|
||||||
"path": "/app/basic/chut"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "行李转盘",
|
|
||||||
"icon": "fa-connectdevelop",
|
|
||||||
"isExpend": false,
|
|
||||||
"isActive": false,
|
|
||||||
"path": "/app/basic/carousel"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "机位",
|
|
||||||
"icon": "fa-exchange",
|
|
||||||
"isExpend": false,
|
|
||||||
"isActive": false,
|
|
||||||
"path": "/app/basic/stand"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "值机柜台",
|
|
||||||
"icon": "fa-desktop",
|
|
||||||
"isExpend": false,
|
|
||||||
"isActive": false,
|
|
||||||
"path": "/app/basic/checkindesk"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "机场",
|
|
||||||
"icon": "fa-fighter-jet",
|
|
||||||
"isExpend": false,
|
|
||||||
"isActive": false,
|
|
||||||
"path": "/app/basic/airport"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "城市",
|
|
||||||
"icon": "fa-globe",
|
|
||||||
"isExpend": false,
|
|
||||||
"isActive": false,
|
|
||||||
"path": "/app/basic/city"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "机型",
|
|
||||||
"icon": "fa-file-text-o",
|
|
||||||
"isExpend": false,
|
|
||||||
"isActive": false,
|
|
||||||
"path": "/app/basic/aircrafttype"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "飞机",
|
|
||||||
"icon": "fa-plane",
|
|
||||||
"isExpend": false,
|
|
||||||
"isActive": false,
|
|
||||||
"path": "/app/basic/aircraft"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "航站楼区域",
|
|
||||||
"icon": "fa-area-chart",
|
|
||||||
"isExpend": false,
|
|
||||||
"isActive": false,
|
|
||||||
"path": "/app/basic/terminalarea"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "航空公司",
|
|
||||||
"icon": "fa-building-o",
|
|
||||||
"isExpend": false,
|
|
||||||
"isActive": false,
|
|
||||||
"path": "/app/basic/airline"
|
|
||||||
},
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "系统管理",
|
|
||||||
"icon": "fa-window-restore",
|
|
||||||
"isExpend": false,
|
|
||||||
"children": [
|
|
||||||
{
|
|
||||||
"name": "个人设置",
|
|
||||||
"icon": "fa-cog",
|
|
||||||
"isExpend": false,
|
|
||||||
"isActive": false,
|
|
||||||
"path": "/app/system/settings"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "角色管理",
|
|
||||||
"icon": "fa-users",
|
|
||||||
"isExpend": false,
|
|
||||||
"isActive": false,
|
|
||||||
"path": "/app/system/roles"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "用户管理",
|
|
||||||
"icon": "fa-user",
|
|
||||||
"isExpend": false,
|
|
||||||
"isActive": false,
|
|
||||||
"path": "/app/system/users"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "部门管理",
|
|
||||||
"icon": "fa-street-view",
|
|
||||||
"isExpend": false,
|
|
||||||
"isActive": false,
|
|
||||||
"path": "/app/system/departments"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "操作日志",
|
|
||||||
"icon": "fa-sticky-note",
|
|
||||||
"isExpend": false,
|
|
||||||
"isActive": false,
|
|
||||||
"path": "/app/system/logs"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "数据同步",
|
|
||||||
"icon": "fa-refresh",
|
|
||||||
"isExpend": false,
|
|
||||||
"isActive": false,
|
|
||||||
"path": "/app/system/synchronization"
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}]
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private router: Router,
|
private router: Router,
|
||||||
@@ -202,7 +34,31 @@ export class PagesComponent implements OnInit {
|
|||||||
this.basicDataService.loadBasicData();
|
this.basicDataService.loadBasicData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
menuDataHandle(menu) {
|
||||||
|
menu['name'] = menu.data.menu.title;
|
||||||
|
menu['icon'] = menu.data.menu.icon;
|
||||||
|
menu['isExpend'] = false;
|
||||||
|
menu['isActive'] = false;
|
||||||
|
delete menu.data;
|
||||||
|
if (menu.children && menu.children.length > 0) {
|
||||||
|
menu.children.forEach(menu => {
|
||||||
|
this.menuDataHandle(menu);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.httpClient.get('/sysapi/common/menu/list', { sysid: 1 }).subscribe(
|
||||||
|
res => {
|
||||||
|
let menuList = res.body.children[0].children;
|
||||||
|
menuList.forEach(menu => {
|
||||||
|
this.menuDataHandle(menu);
|
||||||
|
})
|
||||||
|
// console.log(menuList);
|
||||||
|
this.menuData = menuList;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
if (sessionStorage.getItem('userInfo')) {
|
if (sessionStorage.getItem('userInfo')) {
|
||||||
this.user_name = JSON.parse(sessionStorage.getItem('userInfo')).login_name;
|
this.user_name = JSON.parse(sessionStorage.getItem('userInfo')).login_name;
|
||||||
this.role_type = JSON.parse(sessionStorage.getItem('userInfo')).real_name;
|
this.role_type = JSON.parse(sessionStorage.getItem('userInfo')).real_name;
|
||||||
|
|||||||
+15
-4
@@ -94,7 +94,16 @@ export class DepartmentManagementComponent implements OnInit {
|
|||||||
if(type==1){
|
if(type==1){
|
||||||
|
|
||||||
}else if(type==2){
|
}else if(type==2){
|
||||||
let item=this.orgDetail;
|
let item=this.orgDetail;
|
||||||
|
// console.log(item);
|
||||||
|
this.zNodesChild=this.zNodes.concat();
|
||||||
|
for(let i = 0;i<this.zNodesChild.length;i++){
|
||||||
|
if(this.zNodesChild[i].id===item.id){
|
||||||
|
this.zNodesChild.splice(i,1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$.fn.zTree.init($("#treeDemoChild"), this.settingChild, this.zNodesChild);
|
||||||
this.validateForm.patchValue({
|
this.validateForm.patchValue({
|
||||||
organization:item.organization,
|
organization:item.organization,
|
||||||
shortName:item.shortName,
|
shortName:item.shortName,
|
||||||
@@ -182,7 +191,8 @@ export class DepartmentManagementComponent implements OnInit {
|
|||||||
//保存选择机构
|
//保存选择机构
|
||||||
treeSave(){
|
treeSave(){
|
||||||
if(this.treeSelectedChild){
|
if(this.treeSelectedChild){
|
||||||
this.orgSeleted=this.treeSelectedChild;
|
this.orgSeleted=this.treeSelectedChild;
|
||||||
|
this.close();
|
||||||
// this.visible = false;
|
// this.visible = false;
|
||||||
// this.orgSeletedBtn=false;
|
// this.orgSeletedBtn=false;
|
||||||
}else{
|
}else{
|
||||||
@@ -338,9 +348,10 @@ export class DepartmentManagementComponent implements OnInit {
|
|||||||
this.statusParamsTree.status=0;
|
this.statusParamsTree.status=0;
|
||||||
}
|
}
|
||||||
this.zNodes=json.body;
|
this.zNodes=json.body;
|
||||||
this.zNodesChild=json.body;
|
|
||||||
|
// console.log(this.zNodes);
|
||||||
$.fn.zTree.init($("#treeDemo"), this.setting, this.zNodes);
|
$.fn.zTree.init($("#treeDemo"), this.setting, this.zNodes);
|
||||||
$.fn.zTree.init($("#treeDemoChild"), this.settingChild, this.zNodesChild);
|
|
||||||
var zTree = $.fn.zTree.getZTreeObj("treeDemo");
|
var zTree = $.fn.zTree.getZTreeObj("treeDemo");
|
||||||
let node = zTree.getNodes();
|
let node = zTree.getNodes();
|
||||||
if(json.body.length>0){
|
if(json.body.length>0){
|
||||||
|
|||||||
+2
-2
@@ -107,16 +107,15 @@ export class RoleManagementModifyComponent implements OnInit {
|
|||||||
this.isLoadingSave = true;
|
this.isLoadingSave = true;
|
||||||
if (this.modifyType == 1) {
|
if (this.modifyType == 1) {
|
||||||
this.http.post('/sysapi/setting/role/add/', this.validateForm.value).subscribe((json) => {
|
this.http.post('/sysapi/setting/role/add/', this.validateForm.value).subscribe((json) => {
|
||||||
this.isLoadingSave = true;
|
|
||||||
if (json.is_success) {
|
if (json.is_success) {
|
||||||
this.message.success(`新增成功!`);
|
this.message.success(`新增成功!`);
|
||||||
this.router.navigate(['app/system/roles'])
|
this.router.navigate(['app/system/roles'])
|
||||||
} else {
|
} else {
|
||||||
this.message.error(`新增失败!`);
|
this.message.error(`新增失败!`);
|
||||||
}
|
}
|
||||||
|
this.isLoadingSave = false;
|
||||||
})
|
})
|
||||||
} else if (this.modifyType == 2) {
|
} else if (this.modifyType == 2) {
|
||||||
this.isLoadingSave = true;
|
|
||||||
this.http.put('/sysapi/setting/role/update/' + this.roleId, this.validateForm.value).subscribe((json) => {
|
this.http.put('/sysapi/setting/role/update/' + this.roleId, this.validateForm.value).subscribe((json) => {
|
||||||
if (json.is_success) {
|
if (json.is_success) {
|
||||||
this.message.success(`修改成功!`);
|
this.message.success(`修改成功!`);
|
||||||
@@ -124,6 +123,7 @@ export class RoleManagementModifyComponent implements OnInit {
|
|||||||
} else {
|
} else {
|
||||||
this.message.error(`修改失败!`);
|
this.message.error(`修改失败!`);
|
||||||
}
|
}
|
||||||
|
this.isLoadingSave = false;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -116,7 +116,7 @@
|
|||||||
</form>
|
</form>
|
||||||
<div class="user-footer">
|
<div class="user-footer">
|
||||||
<button (click)='submitForm()' [nzLoading]="isLoadingSave" nz-button nzType="primary" class="mr10"
|
<button (click)='submitForm()' [nzLoading]="isLoadingSave" nz-button nzType="primary" class="mr10"
|
||||||
[disabled]='!this.validateForm.valid||!this.orgDetail||this.roleList.length<=0||!this.nameOnly'>保存</button>
|
[disabled]='!this.validateForm.valid||!this.orgDetail||!this.nameOnly'>保存</button>
|
||||||
<button (click)='cancel()' nz-button nzType="default">取消</button>
|
<button (click)='cancel()' nz-button nzType="default">取消</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+1
-1
@@ -62,7 +62,7 @@ export class UserManagementModifyComponent implements OnInit {
|
|||||||
mobile: [''],
|
mobile: [''],
|
||||||
sex: ['m'],
|
sex: ['m'],
|
||||||
status: ['1'],
|
status: ['1'],
|
||||||
roleList: [''],
|
roleList: ['', [Validators.required]],
|
||||||
remark: ['']
|
remark: ['']
|
||||||
});
|
});
|
||||||
//取路由参数
|
//取路由参数
|
||||||
|
|||||||
Reference in New Issue
Block a user