|
@@ -2,10 +2,12 @@ import { ref } from 'vue';
|
|
|
// import { Timer } from '@/utils/timer';
|
|
|
import { ElMessage } from 'element-plus'
|
|
|
import usePermissionStore from './permission';
|
|
|
+import useUserStore from './user';
|
|
|
|
|
|
const useVoiceStore = defineStore('voice', () => {
|
|
|
|
|
|
const usePermission = usePermissionStore();
|
|
|
+ const userStore = useUserStore();
|
|
|
|
|
|
let HS_CTI = null;
|
|
|
|
|
@@ -38,7 +40,12 @@ const useVoiceStore = defineStore('voice', () => {
|
|
|
const sessionId = ref(null);
|
|
|
|
|
|
// 是否有拨打电话权限
|
|
|
- const isAuthPane = computed(() => usePermission.routes.findIndex(({ name }) => name === 'Console') !== -1);
|
|
|
+ const isAuthPane = computed(() => {
|
|
|
+ if ( userStore.roles.includes('admin') ) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return usePermission.routes.findIndex(({ name }) => name === 'Console') !== -1
|
|
|
+ });
|
|
|
|
|
|
// 重置
|
|
|
const reset = () => {
|