Commit 88e73649 authored by shiziyuan9527's avatar shiziyuan9527 Committed by 刘瑞斌
Browse files

refactor(权限管理): 去掉hasRoles判断

parent 3cf57c48
Showing with 16 additions and 22 deletions
+16 -22
......@@ -49,16 +49,14 @@ export default {
methods: {
recent() {
if (hasRoles(ROLE_TEST_VIEWER, ROLE_TEST_USER, ROLE_TEST_MANAGER)) {
if (this.options.condition) {
this.result = this.$post(this.options.url, this.options.condition, (response) => {
this.items = response.data;
});
} else {
this.result = this.$get(this.options.url, (response) => {
this.items = response.data;
});
}
if (this.options.condition) {
this.result = this.$post(this.options.url, this.options.condition, (response) => {
this.items = response.data;
});
} else {
this.result = this.$get(this.options.url, (response) => {
this.items = response.data;
});
}
}
}
......
......@@ -511,12 +511,10 @@ export default {
this.initTableData();
},
refreshTestPlanRecent() {
if (hasRoles(ROLE_TEST_USER, ROLE_TEST_MANAGER)) {
let param = {};
param.id = this.planId;
param.updateTime = Date.now();
this.$post('/test/plan/edit', param);
}
let param = {};
param.id = this.planId;
param.updateTime = Date.now();
this.$post('/test/plan/edit', param);
},
search() {
this.initTableData();
......
......@@ -387,12 +387,10 @@ export default {
this.initTableData();
},
refreshTestReviewRecent() {
if (hasRoles(ROLE_TEST_USER, ROLE_TEST_MANAGER)) {
let param = {};
param.id = this.reviewId;
param.updateTime = Date.now();
// this.$post('/test/case/review/edit', param);
}
let param = {};
param.id = this.reviewId;
param.updateTime = Date.now();
// this.$post('/test/case/review/edit', param);
},
search() {
this.initTableData();
......
Supports Markdown
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