|
@@ -65,14 +65,17 @@
|
|
created() {
|
|
created() {
|
|
if (localStorage.userInfo != null) {
|
|
if (localStorage.userInfo != null) {
|
|
var user = JSON.parse(localStorage.userInfo);
|
|
var user = JSON.parse(localStorage.userInfo);
|
|
- if (user.role == 3 ) {
|
|
|
|
- //公司高层
|
|
|
|
- this.$router.push({ path: '/cost' });
|
|
|
|
- } else if (user.role == 4) {
|
|
|
|
- //财务管理员
|
|
|
|
- this.$router.push({ path: '/team' });
|
|
|
|
- } else {
|
|
|
|
- this.$router.push({ path: '/daily' });
|
|
|
|
|
|
+ // if (user.role == 3 ) {
|
|
|
|
+ // //公司高层
|
|
|
|
+ // this.$router.push({ path: '/cost' });
|
|
|
|
+ // } else if (user.role == 4) {
|
|
|
|
+ // //财务管理员
|
|
|
|
+ // this.$router.push({ path: '/team' });
|
|
|
|
+ // } else {
|
|
|
|
+ // this.$router.push({ path: '/daily' });
|
|
|
|
+ // }
|
|
|
|
+ if(user.moduleList.length > 0) {
|
|
|
|
+ this.$router.push({ path: user.moduleList[0].path })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -83,14 +86,17 @@
|
|
}
|
|
}
|
|
if (localStorage.userInfo != null) {
|
|
if (localStorage.userInfo != null) {
|
|
var user = JSON.parse(localStorage.userInfo);
|
|
var user = JSON.parse(localStorage.userInfo);
|
|
- if (user.role == 3) {
|
|
|
|
- //公司高层
|
|
|
|
- this.$router.push({ path: '/cost' });
|
|
|
|
- } else if (user.role == 4) {
|
|
|
|
- //财务管理员
|
|
|
|
- this.$router.push({ path: '/team' });
|
|
|
|
- } else {
|
|
|
|
- this.$router.push({ path: '/daily' });
|
|
|
|
|
|
+ // if (user.role == 3) {
|
|
|
|
+ // //公司高层
|
|
|
|
+ // this.$router.push({ path: '/cost' });
|
|
|
|
+ // } else if (user.role == 4) {
|
|
|
|
+ // //财务管理员
|
|
|
|
+ // this.$router.push({ path: '/team' });
|
|
|
|
+ // } else {
|
|
|
|
+ // this.$router.push({ path: '/daily' });
|
|
|
|
+ // }
|
|
|
|
+ if(user.moduleList.length > 0) {
|
|
|
|
+ this.$router.push({ path: user.moduleList[0].path })
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
if (this.isCorpWX) {
|
|
if (this.isCorpWX) {
|
|
@@ -192,14 +198,17 @@
|
|
var user = res.data;
|
|
var user = res.data;
|
|
localStorage.user = JSON.stringify(res.data);
|
|
localStorage.user = JSON.stringify(res.data);
|
|
sessionStorage.setItem('user', JSON.stringify(res.data));
|
|
sessionStorage.setItem('user', JSON.stringify(res.data));
|
|
- if (user.role == 3) {
|
|
|
|
- //公司高层
|
|
|
|
- this.$router.push({ path: '/cost' });
|
|
|
|
- } else if (user.role == 4) {
|
|
|
|
- //财务管理员
|
|
|
|
- this.$router.push({ path: '/team' });
|
|
|
|
- } else {
|
|
|
|
- this.$router.push({ path: '/daily' });
|
|
|
|
|
|
+ // if (user.role == 3) {
|
|
|
|
+ // //公司高层
|
|
|
|
+ // this.$router.push({ path: '/cost' });
|
|
|
|
+ // } else if (user.role == 4) {
|
|
|
|
+ // //财务管理员
|
|
|
|
+ // this.$router.push({ path: '/team' });
|
|
|
|
+ // } else {
|
|
|
|
+ // this.$router.push({ path: '/daily' });
|
|
|
|
+ // }
|
|
|
|
+ if(user.moduleList.length > 0) {
|
|
|
|
+ this.$router.push({ path: user.moduleList[0].path })
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
this.$message({
|
|
this.$message({
|
|
@@ -220,14 +229,17 @@
|
|
var user = res.data;
|
|
var user = res.data;
|
|
localStorage.user = JSON.stringify(res.data);
|
|
localStorage.user = JSON.stringify(res.data);
|
|
sessionStorage.setItem('user', JSON.stringify(res.data));
|
|
sessionStorage.setItem('user', JSON.stringify(res.data));
|
|
- if (user.role == 3) {
|
|
|
|
- //公司高层
|
|
|
|
- this.$router.push({ path: '/cost' });
|
|
|
|
- } else if (user.role == 4) {
|
|
|
|
- //财务管理员
|
|
|
|
- this.$router.push({ path: '/team' });
|
|
|
|
- } else {
|
|
|
|
- this.$router.push({ path: '/daily' });
|
|
|
|
|
|
+ // if (user.role == 3) {
|
|
|
|
+ // //公司高层
|
|
|
|
+ // this.$router.push({ path: '/cost' });
|
|
|
|
+ // } else if (user.role == 4) {
|
|
|
|
+ // //财务管理员
|
|
|
|
+ // this.$router.push({ path: '/team' });
|
|
|
|
+ // } else {
|
|
|
|
+ // this.$router.push({ path: '/daily' });
|
|
|
|
+ // }
|
|
|
|
+ if(user.moduleList.length > 0) {
|
|
|
|
+ this.$router.push({ path: user.moduleList[0].path })
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
this.$message({
|
|
this.$message({
|
|
@@ -262,17 +274,20 @@
|
|
var user = res.data;
|
|
var user = res.data;
|
|
sessionStorage.setItem('user', JSON.stringify(res.data));
|
|
sessionStorage.setItem('user', JSON.stringify(res.data));
|
|
this.permissionsList(res.data)
|
|
this.permissionsList(res.data)
|
|
- if (user.company.packageSimple == 1) {
|
|
|
|
- //简易模式,直接进入工时统计表
|
|
|
|
- this.$router.push({ path: '/simple' });
|
|
|
|
- } else if (user.role == 3) {
|
|
|
|
- //公司高层
|
|
|
|
- this.$router.push({ path: '/cost' });
|
|
|
|
- } else if (user.role == 4) {
|
|
|
|
- //财务管理员
|
|
|
|
- this.$router.push({ path: '/team' });
|
|
|
|
- } else {
|
|
|
|
- this.$router.push({ path: '/daily' });
|
|
|
|
|
|
+ // if (user.company.packageSimple == 1) {
|
|
|
|
+ // //简易模式,直接进入工时统计表
|
|
|
|
+ // this.$router.push({ path: '/simple' });
|
|
|
|
+ // } else if (user.role == 3) {
|
|
|
|
+ // //公司高层
|
|
|
|
+ // this.$router.push({ path: '/cost' });
|
|
|
|
+ // } else if (user.role == 4) {
|
|
|
|
+ // //财务管理员
|
|
|
|
+ // this.$router.push({ path: '/team' });
|
|
|
|
+ // } else {
|
|
|
|
+ // this.$router.push({ path: '/daily' });
|
|
|
|
+ // }
|
|
|
|
+ if(user.moduleList.length > 0) {
|
|
|
|
+ this.$router.push({ path: user.moduleList[0].path })
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
this.$message({
|
|
this.$message({
|