|
|
@ -84,11 +84,11 @@ |
|
|
|
{{ stateKeys[scope.row.state] }} |
|
|
|
{{ stateKeys[scope.row.state] }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" align="center"> |
|
|
|
<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 != 0" type="text" @click="edit(scope.row,'1',queryData.founder)">编辑</el-button> |
|
|
|
<el-button v-if="scope.row.founder && (isSuper || roleName === scope.row.roleName)" 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)" 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,6 +123,7 @@ |
|
|
|
</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"; |
|
|
|
|
|
|
|
|
|
|
@ -201,7 +202,10 @@ export default { |
|
|
|
copyVisible: false, |
|
|
|
copyVisible: false, |
|
|
|
projectName: "", |
|
|
|
projectName: "", |
|
|
|
currentRow: {}, // 复制之后,提交到后台的数据 |
|
|
|
currentRow: {}, // 复制之后,提交到后台的数据 |
|
|
|
listDataAll: [] |
|
|
|
listDataAll: [], |
|
|
|
|
|
|
|
isSuper: false, // 是否是超管 |
|
|
|
|
|
|
|
isAdmin: false, // 是否是管理员 |
|
|
|
|
|
|
|
roleName: '' // 当前用户角色名称 |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
computed: { |
|
|
@ -232,7 +236,7 @@ export default { |
|
|
|
// this.queryData = this.queryDataStatus |
|
|
|
// this.queryData = this.queryDataStatus |
|
|
|
// }, |
|
|
|
// }, |
|
|
|
mounted() { |
|
|
|
mounted() { |
|
|
|
this.getSystemData(); |
|
|
|
this.getRole() |
|
|
|
if(this.queryDataStatus.platformId) { |
|
|
|
if(this.queryDataStatus.platformId) { |
|
|
|
this.queryData = this.queryDataStatus |
|
|
|
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() { |
|
|
|
getData() { |
|
|
|
this.setSystemId(this.systemId); |
|
|
|
this.setSystemId(this.systemId); |
|
|
|
let data = { |
|
|
|
let data = { |
|
|
|