|
|
|
@ -84,11 +84,11 @@ |
|
|
|
|
{{ stateKeys[scope.row.state] }} |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="操作" align="center"> |
|
|
|
|
<el-table-column label="操作"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-button type="text" @click="edit(scope.row,'0',queryData.founder)">查看</el-button> |
|
|
|
|
<el-button v-if="scope.row.founder != 0" type="text" @click="edit(scope.row,'1',queryData.founder)">编辑</el-button> |
|
|
|
|
<el-button v-if="scope.row.founder != 0" type="text" @click="handleDelete(scope.row.projectId)">删除</el-button> |
|
|
|
|
<el-button v-if="scope.row.founder && (isSuper || roleName === scope.row.roleName || (roleName === '管理员' && !scope.row.roleName.includes('超级')))" type="text" @click="edit(scope.row,'1',queryData.founder)">编辑</el-button> |
|
|
|
|
<el-button v-if="scope.row.founder && (isSuper || roleName === scope.row.roleName || (roleName === '管理员' && !scope.row.roleName.includes('超级')))" type="text" @click="handleDelete(scope.row.projectId)">删除</el-button> |
|
|
|
|
<el-button v-if="auth('复制')" type="text" @click="copyData(scope.row.projectId)">复制</el-button> |
|
|
|
|
<el-switch |
|
|
|
|
v-if="auth('禁用')" |
|
|
|
@ -123,6 +123,7 @@ |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import Setting from "@/setting"; |
|
|
|
|
import { mapState, mapActions, mapMutations } from "vuex"; |
|
|
|
|
import util from "@/libs/util"; |
|
|
|
|
|
|
|
|
@ -201,7 +202,10 @@ export default { |
|
|
|
|
copyVisible: false, |
|
|
|
|
projectName: "", |
|
|
|
|
currentRow: {}, // 复制之后,提交到后台的数据 |
|
|
|
|
listDataAll: [] |
|
|
|
|
listDataAll: [], |
|
|
|
|
isSuper: false, // 是否是超管 |
|
|
|
|
isAdmin: false, // 是否是管理员 |
|
|
|
|
roleName: '' // 当前用户角色名称 |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
@ -232,7 +236,7 @@ export default { |
|
|
|
|
// this.queryData = this.queryDataStatus |
|
|
|
|
// }, |
|
|
|
|
mounted() { |
|
|
|
|
this.getSystemData(); |
|
|
|
|
this.getRole() |
|
|
|
|
if(this.queryDataStatus.platformId) { |
|
|
|
|
this.queryData = this.queryDataStatus |
|
|
|
|
} |
|
|
|
@ -263,6 +267,16 @@ export default { |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 获取当前用户角色 |
|
|
|
|
getRole() { |
|
|
|
|
this.$post(`${this.api.getUserAllRoleByToken}?platformId=${Setting.platformId}`).then(res => { |
|
|
|
|
this.isSuper = res.includes('超级管理员') |
|
|
|
|
this.isAdmin = res === '管理员' |
|
|
|
|
this.roleName = res |
|
|
|
|
this.getSystemData(); |
|
|
|
|
}).catch(err => { |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getData() { |
|
|
|
|
this.setSystemId(this.systemId); |
|
|
|
|
let data = { |
|
|
|
|