update 推送高德权限修改为只有管理员才可以进行推送

This commit is contained in:
Lemon
2025-03-18 15:26:37 +08:00
parent 8d769352ae
commit 1cad083624
5 changed files with 72 additions and 1 deletions

View File

@@ -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 = {