|
|
@@ -21,12 +21,8 @@
|
|
|
import { useTargetTenantIdSetting } from '@/utils/useTargetTenantIdSetting';
|
|
|
import { replaceParams } from '@/utils/helper/treeHelper';
|
|
|
import { useRoute } from 'vue-router';
|
|
|
- import useMiniMap from '@/views/map-config/mini-map/use-mini-map.ts';
|
|
|
import router from '@/router';
|
|
|
|
|
|
- const miniMap = useMiniMap();
|
|
|
- const { isInConfigEditor } = miniMap;
|
|
|
-
|
|
|
interface TenantOption {
|
|
|
label: string;
|
|
|
value: string;
|
|
|
@@ -40,7 +36,8 @@
|
|
|
});
|
|
|
const currentTenant = ref(localTId ? Number(localTId) : Number(tenantId.value));
|
|
|
const options = ref<TenantOption[]>([]);
|
|
|
- const MESSAGE_ALARM_CONFIG_PAGE = 'MessageAlarmConfig';
|
|
|
+ const PAGE_MESSAGE_ALARM_CONFIG = 'MessageAlarmConfig';
|
|
|
+ const PAGE_LAYOUT_CONFIG = ['LayoutSceneConfig', 'LayoutCameraConfig'];
|
|
|
|
|
|
onMounted(() => {
|
|
|
queryListTenant().then((res) => {
|
|
|
@@ -64,10 +61,10 @@
|
|
|
/**
|
|
|
* 如果处于小地图编辑状态,切换租户时候,返回布局列表
|
|
|
*/
|
|
|
- if (isInConfigEditor(route.name)) {
|
|
|
+ if (PAGE_LAYOUT_CONFIG.includes(route.name as string)) {
|
|
|
sessionStorage.removeItem('selectCompanyId'); //切换租户的时候,下拉公司列表清空
|
|
|
router.back();
|
|
|
- } else if (route.name === MESSAGE_ALARM_CONFIG_PAGE) {
|
|
|
+ } else if (route.name === PAGE_MESSAGE_ALARM_CONFIG) {
|
|
|
/* 当页面为报警推送详情,切换租户,返回列表页面 */
|
|
|
router.push({
|
|
|
name: 'MessageAlarm',
|