|
|
@ -87,8 +87,8 @@ |
|
|
|
<el-table-column label="操作"> |
|
|
|
<el-table-column label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="text" @click="edit(scope.row,'0',queryData.founder)">查看</el-button> |
|
|
|
<el-button type="text" @click="edit(scope.row,'0',queryData.founder)">查看</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 && (roleName.includes('超级') || 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="scope.row.founder && (roleName.includes('超级') || 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-button v-if="auth('复制')" type="text" @click="copyData(scope.row.projectId)">复制</el-button> |
|
|
|
<el-switch |
|
|
|
<el-switch |
|
|
|
v-if="auth('禁用')" |
|
|
|
v-if="auth('禁用')" |
|
|
@ -123,10 +123,8 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import Setting from "@/setting"; |
|
|
|
|
|
|
|
import { mapState, mapActions, mapMutations } from "vuex"; |
|
|
|
import { mapState, mapActions, mapMutations } from "vuex"; |
|
|
|
import util from "@/libs/util"; |
|
|
|
import util from "@/libs/util"; |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
@ -202,15 +200,12 @@ export default { |
|
|
|
copyVisible: false, |
|
|
|
copyVisible: false, |
|
|
|
projectName: "", |
|
|
|
projectName: "", |
|
|
|
currentRow: {}, // 复制之后,提交到后台的数据 |
|
|
|
currentRow: {}, // 复制之后,提交到后台的数据 |
|
|
|
listDataAll: [], |
|
|
|
listDataAll: [] |
|
|
|
isSuper: false, // 是否是超管 |
|
|
|
|
|
|
|
isAdmin: false, // 是否是管理员 |
|
|
|
|
|
|
|
roleName: '' // 当前用户角色名称 |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
computed: { |
|
|
|
...mapState("user", [ |
|
|
|
...mapState("user", [ |
|
|
|
"userId", "roleId" |
|
|
|
"userId", "roleId", 'roleName' |
|
|
|
]), |
|
|
|
]), |
|
|
|
...mapState("project", [ |
|
|
|
...mapState("project", [ |
|
|
|
"lastSystemId", |
|
|
|
"lastSystemId", |
|
|
@ -232,11 +227,8 @@ export default { |
|
|
|
deep: true |
|
|
|
deep: true |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// created() { |
|
|
|
|
|
|
|
// this.queryData = this.queryDataStatus |
|
|
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
mounted() { |
|
|
|
mounted() { |
|
|
|
this.getRole() |
|
|
|
this.getSystemData() |
|
|
|
if(this.queryDataStatus.platformId) { |
|
|
|
if(this.queryDataStatus.platformId) { |
|
|
|
this.queryData = this.queryDataStatus |
|
|
|
this.queryData = this.queryDataStatus |
|
|
|
} |
|
|
|
} |
|
|
@ -267,16 +259,6 @@ 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() { |
|
|
|
getData() { |
|
|
|
this.setSystemId(this.systemId); |
|
|
|
this.setSystemId(this.systemId); |
|
|
|
let data = { |
|
|
|
let data = { |
|
|
|