多租户首页添加smsc-cdr

This commit is contained in:
lai
2024-10-16 10:33:40 +08:00
parent 879499b595
commit cf3103db46
3 changed files with 107 additions and 43 deletions

View File

@@ -8,40 +8,20 @@ import { getConfigKey } from '@/api/system/config';
import { defineAsyncComponent, onMounted, shallowRef } from 'vue';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useUserStore from '@/store/modules/user';
import useLayoutStore from '@/store/modules/layout';
const currentComponent = shallowRef(
defineAsyncComponent(() => import('@/views/index/defaultIndex.vue'))
);
// function loadComponent(sysValue: String) {
// //PS:import不允许变量形式 也有人说左右都穿插字符串即可---经测试不行
// // currentComponent.value = defineAsyncComponent(
// // () => import(`@/views/${selectedComponent.value}.vue`)
// // );
// switch (sysValue) {
// case 'Index':
// currentComponent.value = Index;
// break;
// case 'Gold':
// currentComponent.value = Gold;
// break;
// case 'Dash':
// currentComponent.value = Dash;
// break;
// }
// }
onMounted(() => {
// getConfigKey('sys.indexModule').then(res => {
// if (res.code === RESULT_CODE_SUCCESS && res.data) {
// loadComponent(res.data);
// }
// });
if (useUserStore().roles.includes('tenant')) {
currentComponent.value = Index;
useLayoutStore().changeConf('layout', 'top');
useLayoutStore().changeConf('menuTheme', 'light');
useLayoutStore().changeConf('tabRender', false);
} else {
useLayoutStore().changeConf('layout', 'mix');
}
});
</script>