mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-13 14:30:08 +08:00
update 推送高德权限修改为只有管理员才可以进行推送
This commit is contained in:
@@ -195,13 +195,14 @@
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否对接高德" align="center" prop="amapFlag">
|
||||
<el-table-column label="是否对接高德" align="center" prop="amapFlag" >
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.amapFlag"
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
@change="changeAmapFlag(scope.row)"
|
||||
:disabled="!hasRole(['admin', 'common'])"
|
||||
>
|
||||
</el-switch>
|
||||
</template>
|
||||
@@ -421,6 +422,10 @@ export default {
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
hasRole(roles) {
|
||||
const currentRoles = this.$store.getters.roles;
|
||||
return currentRoles.some(role => roles.includes(role));
|
||||
},
|
||||
changeAmapFlag(info) {
|
||||
console.log("info", info)
|
||||
const params = {
|
||||
|
||||
Reference in New Issue
Block a user