fix:只能支持跳转有权限的项目

This commit is contained in:
wenyann 2021-07-13 15:38:18 +08:00 committed by 刘瑞斌
parent c743e3599b
commit a47dd86b84
4 changed files with 30 additions and 4 deletions

View File

@ -15,9 +15,14 @@
@sort-change="sort"
@filter-change="filter"
:height="screenHeight"
@row-click="jumpPage"
>
<el-table-column prop="name" :label="$t('commons.name')" min-width="100" show-overflow-tooltip/>
<el-table-column prop="name" :label="$t('commons.name')" min-width="100" show-overflow-tooltip>
<template v-slot:default="scope">
<el-link type="primary" class="member-size" @click="jumpPage(scope.row)">
{{ scope.row.name }}
</el-link>
</template>
</el-table-column>
<el-table-column prop="description" :label="$t('commons.description')" show-overflow-tooltip>
<template v-slot:default="scope">
<pre>{{ scope.row.description }}</pre>
@ -349,8 +354,26 @@ export default {
},
methods: {
jumpPage(row) {
window.sessionStorage.setItem(PROJECT_ID, row.id);
this.$router.push('/track/home');
this.currentWorkspaceRow = row;
this.currentProjectId = row.id;
let param = {
name: '',
projectId: row.id
};
this.wsId = row.id;
let path = "/user/project/member/list";
this.result = this.$post(this.buildPagePath(path), param, res => {
let data = res.data;
this.memberLineData = data.listObject;
let arr = this.memberLineData.filter(item => item.id == getCurrentUserId());
if (arr.length > 0) {
window.sessionStorage.setItem(PROJECT_ID, row.id);
this.$router.push('/track/home');
} else {
this.$message(this.$t("commons.project_permission"));
}
});
},
getMaintainerOptions() {
let workspaceId = getCurrentWorkspaceId();

View File

@ -1,5 +1,6 @@
export default {
commons: {
project_permission: 'Please add the project permission first',
failure_continues: "Failure continues",
full_screen_editing: "Full screen editing",
yes: "yes",

View File

@ -1,5 +1,6 @@
export default {
commons: {
project_permission: '请先添加该项目权限',
failure_continues: "失败继续",
full_screen_editing: "全屏编辑",
yes: "是",

View File

@ -1,5 +1,6 @@
export default {
commons: {
project_permission: '請先添加該項目許可權',
failure_continues: "失敗繼續",
full_screen_editing: "全屏編輯",
yes: "是",