zongjl 2 years ago
parent
commit
13f8c41c95
4 changed files with 15 additions and 5 deletions
  1. +1
    -1
      src/config/setting.js
  2. +2
    -1
      src/views/login/login.vue
  3. +7
    -3
      src/views/second/search.vue
  4. +5
    -0
      src/views/second/taskSummary/basicTable.vue

+ 1
- 1
src/config/setting.js View File

@@ -13,7 +13,7 @@ export default {
parseMenuItem: null, // 自定义解析接口菜单每一个数据格式
userUrl: '/index/getUserInfo', // 用户信息接口
parseUser: (res) => { // 自定义解析接口用户信息
res.data.roles = res.data.roles.map(d => d.roleCode);
res.data.roles = res.data.roles.map(d => d.code);
res.data.authorities = res.data.authorities.map(d => d.authority);
return res;
},

+ 2
- 1
src/views/login/login.vue View File

@@ -69,8 +69,9 @@ export default {
this.$message({type: 'success', message: '登录成功'});
this.$store.dispatch('user/setToken', res.data.data.access_token).then(() => {
this.$router.push(this.$route.query.from || '/').catch(() => {
});
});
});
window.location.reload();
} else {
this.$message.error(res.data.msg);
}

+ 7
- 3
src/views/second/search.vue View File

@@ -117,7 +117,7 @@
>导出</el-button
>
<el-button
v-if="baseUrl"
v-if="baseUrl&&!getRole()"
size="small"
type="success"
@click="setPoint"
@@ -192,6 +192,10 @@ export default {
getDepartment: "base/getDepartment",
getQuotaList: "base/getQuotaList",
}),
getRole(){
let roles=this.user.user.roles;
return roles.every((item)=>item=="roleA")
},
clear() {
this.searchParams = {
quota1: "",
@@ -229,7 +233,7 @@ export default {
}
},
computed: {
...mapGetters(["quota1", "quota2", "formatDep", "quota"]),
...mapGetters(["quota1", "quota2", "formatDep", "quota","user"]),
},
watch: {
"searchParams.quota1"(val) {
@@ -246,4 +250,4 @@ export default {
.action >>> .el-form-item__content{
width:280px
}
</style>
</style>

+ 5
- 0
src/views/second/taskSummary/basicTable.vue View File

@@ -154,6 +154,7 @@
@click="showPointsDialog(row)"
type="warning"
icon="el-icon-edit-outline"
v-if="!getRole(row)"
>评分</el-link
>
</template>
@@ -515,6 +516,10 @@ export default {
},
},
methods: {
getRole(){
let roles=this.user.user.roles;
return roles.every((item)=>item=="roleA")
},
formatFirstList(data, type) {
let arr = [];
for (let key in data[type + "DeptList"]) {

Loading…
Cancel
Save