|
@@ -37,21 +37,7 @@
|
|
require('../../assets/img/index/banner4.jpeg'),
|
|
require('../../assets/img/index/banner4.jpeg'),
|
|
// require('../../assets/img/index/banner_3.png'),
|
|
// require('../../assets/img/index/banner_3.png'),
|
|
],
|
|
],
|
|
- routers: [
|
|
|
|
- {
|
|
|
|
- name: '查看日报',
|
|
|
|
- url: '/calendar',
|
|
|
|
- icon: 'description'
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- {
|
|
|
|
- name: '填写日报',
|
|
|
|
- url: '/edit',
|
|
|
|
- icon: 'edit'
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- ],
|
|
|
|
|
|
+ routers: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -74,90 +60,114 @@
|
|
icon: 'todo-list-o'
|
|
icon: 'todo-list-o'
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- if (this.user.role == 0) {
|
|
|
|
- //普通员工
|
|
|
|
- if (this.user.manageDeptId != 0 && this.user.company.packageEngineering == 1) {
|
|
|
|
- this.routers.push(
|
|
|
|
- {
|
|
|
|
- name: '部门审核',
|
|
|
|
- url: '/department_review',
|
|
|
|
- icon: 'todo-list-o'
|
|
|
|
- });
|
|
|
|
|
|
+ var list = this.user.moduleList
|
|
|
|
+ for (var i in list) {
|
|
|
|
+ if(list[i].name == '工时报告') {
|
|
|
|
+ this.routers.push({name: '查看日报',url: '/calendar',icon: 'description'})
|
|
|
|
+ this.routers.push({name: '填写日报',url: '/edit',icon: 'edit'})
|
|
}
|
|
}
|
|
- if (this.user.leader) {
|
|
|
|
- this.routers.push({
|
|
|
|
- name: '项目报告审核',
|
|
|
|
- url: '/review',
|
|
|
|
- icon: 'todo-list-o'
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- } else if (this.user.role == 1 || this.user.role == 2 || this.user.role == 5){
|
|
|
|
- // } else if (this.user.role == 1 || this.user.role == 2){
|
|
|
|
- if (this.user.company.packageEngineering == 1) {
|
|
|
|
- this.routers.push(
|
|
|
|
- {
|
|
|
|
- name: '部门审核',
|
|
|
|
- url: '/department_review',
|
|
|
|
- icon: 'todo-list-o'
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- this.routers.push({
|
|
|
|
- name: '项目报告审核',
|
|
|
|
- url: '/review',
|
|
|
|
- icon: 'todo-list-o'
|
|
|
|
- });
|
|
|
|
- this.routers.push({
|
|
|
|
- name: '项目管理',
|
|
|
|
- url: '/project',
|
|
|
|
- icon: 'label-o'
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- // 自己加的
|
|
|
|
- // this.routers.push({
|
|
|
|
- // name: '导入日报审核',
|
|
|
|
- // url: '/audit',
|
|
|
|
- // icon: 'label-o'
|
|
|
|
- // });
|
|
|
|
- } else {
|
|
|
|
- if (this.user.manageDeptId != 0 && this.user.company.packageEngineering == 1) {
|
|
|
|
- this.routers.push(
|
|
|
|
- {
|
|
|
|
- name: '部门审核',
|
|
|
|
- url: '/department_review',
|
|
|
|
- icon: 'todo-list-o'
|
|
|
|
- });
|
|
|
|
|
|
+ if(list[i].name == '项目报告审核') {
|
|
|
|
+ this.routers.push({name: '项目报告审核',url: '/review',icon: 'todo-list-o'})
|
|
}
|
|
}
|
|
- if (this.user.role == 3||this.user.role == 5||this.user.role == 6) {//项目管理员,公司领导,公司高层
|
|
|
|
- this.routers.push({
|
|
|
|
- name: '项目管理',
|
|
|
|
- url: '/project',
|
|
|
|
- icon: 'label-o'
|
|
|
|
- });
|
|
|
|
|
|
+ if(list[i].name == '项目管理') {
|
|
|
|
+ this.routers.push({name: '项目管理',url: '/project',icon: 'label-o'})
|
|
}
|
|
}
|
|
- if (this.user.leader) {
|
|
|
|
- this.routers.push({
|
|
|
|
- name: '项目报告审核',
|
|
|
|
- url: '/review',
|
|
|
|
- icon: 'todo-list-o'
|
|
|
|
- });
|
|
|
|
|
|
+ if(list[i].name == '导入日报审核') {
|
|
|
|
+ this.routers.push({name: '导入日报审核',url: '/audit',icon: 'label-o'})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if(this.user.role == 1 || this.user.role == 2) {
|
|
|
|
- this.routers.push({
|
|
|
|
- name: '导入日报审核',
|
|
|
|
- url: '/audit',
|
|
|
|
- icon: 'label-o'
|
|
|
|
|
|
+ if (this.user.manageDeptId != 0 && this.user.company.packageEngineering == 1) {
|
|
|
|
+ this.routers.push(
|
|
|
|
+ {
|
|
|
|
+ name: '部门审核',
|
|
|
|
+ url: '/department_review',
|
|
|
|
+ icon: 'todo-list-o'
|
|
});
|
|
});
|
|
- } else {
|
|
|
|
- if(this.user.role == 6 && this.user.timeType.needDeptAudit == 1) {
|
|
|
|
- this.routers.push({
|
|
|
|
- name: '导入日报审核',
|
|
|
|
- url: '/audit',
|
|
|
|
- icon: 'label-o'
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
|
|
+ // if (this.user.role == 0) {
|
|
|
|
+ // //普通员工
|
|
|
|
+ // if (this.user.manageDeptId != 0 && this.user.company.packageEngineering == 1) {
|
|
|
|
+ // this.routers.push(
|
|
|
|
+ // {
|
|
|
|
+ // name: '部门审核',
|
|
|
|
+ // url: '/department_review',
|
|
|
|
+ // icon: 'todo-list-o'
|
|
|
|
+ // });
|
|
|
|
+ // }
|
|
|
|
+ // if (this.user.leader) {
|
|
|
|
+ // this.routers.push({
|
|
|
|
+ // name: '项目报告审核',
|
|
|
|
+ // url: '/review',
|
|
|
|
+ // icon: 'todo-list-o'
|
|
|
|
+ // });
|
|
|
|
+ // }
|
|
|
|
+ // } else if (this.user.role == 1 || this.user.role == 2 || this.user.role == 5){
|
|
|
|
+ // // } else if (this.user.role == 1 || this.user.role == 2){
|
|
|
|
+ // if (this.user.company.packageEngineering == 1) {
|
|
|
|
+ // this.routers.push(
|
|
|
|
+ // {
|
|
|
|
+ // name: '部门审核',
|
|
|
|
+ // url: '/department_review',
|
|
|
|
+ // icon: 'todo-list-o'
|
|
|
|
+ // });
|
|
|
|
+ // }
|
|
|
|
+
|
|
|
|
+ // this.routers.push({
|
|
|
|
+ // name: '项目报告审核',
|
|
|
|
+ // url: '/review',
|
|
|
|
+ // icon: 'todo-list-o'
|
|
|
|
+ // });
|
|
|
|
+ // this.routers.push({
|
|
|
|
+ // name: '项目管理',
|
|
|
|
+ // url: '/project',
|
|
|
|
+ // icon: 'label-o'
|
|
|
|
+ // });
|
|
|
|
+
|
|
|
|
+ // // 自己加的
|
|
|
|
+ // // this.routers.push({
|
|
|
|
+ // // name: '导入日报审核',
|
|
|
|
+ // // url: '/audit',
|
|
|
|
+ // // icon: 'label-o'
|
|
|
|
+ // // });
|
|
|
|
+ // } else {
|
|
|
|
+ // if (this.user.manageDeptId != 0 && this.user.company.packageEngineering == 1) {
|
|
|
|
+ // this.routers.push(
|
|
|
|
+ // {
|
|
|
|
+ // name: '部门审核',
|
|
|
|
+ // url: '/department_review',
|
|
|
|
+ // icon: 'todo-list-o'
|
|
|
|
+ // });
|
|
|
|
+ // }
|
|
|
|
+ // if (this.user.role == 3||this.user.role == 5||this.user.role == 6) {//项目管理员,公司领导,公司高层
|
|
|
|
+ // this.routers.push({
|
|
|
|
+ // name: '项目管理',
|
|
|
|
+ // url: '/project',
|
|
|
|
+ // icon: 'label-o'
|
|
|
|
+ // });
|
|
|
|
+ // }
|
|
|
|
+ // if (this.user.leader) {
|
|
|
|
+ // this.routers.push({
|
|
|
|
+ // name: '项目报告审核',
|
|
|
|
+ // url: '/review',
|
|
|
|
+ // icon: 'todo-list-o'
|
|
|
|
+ // });
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // if(this.user.role == 1 || this.user.role == 2) {
|
|
|
|
+ // this.routers.push({
|
|
|
|
+ // name: '导入日报审核',
|
|
|
|
+ // url: '/audit',
|
|
|
|
+ // icon: 'label-o'
|
|
|
|
+ // });
|
|
|
|
+ // } else {
|
|
|
|
+ // if(this.user.role == 6 && this.user.timeType.needDeptAudit == 1) {
|
|
|
|
+ // this.routers.push({
|
|
|
|
+ // name: '导入日报审核',
|
|
|
|
+ // url: '/audit',
|
|
|
|
+ // icon: 'label-o'
|
|
|
|
+ // });
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
this.routers.push({
|
|
this.routers.push({
|
|
name: '消息记录',
|
|
name: '消息记录',
|
|
url: '/msg',
|
|
url: '/msg',
|