Browse Source

feat: 面板控制

feature-v1.0.0
邱伟洋 1 month ago
parent
commit
fca0d1c6ec
  1. 34
      src/views/Main/index.vue
  2. 13
      src/views/RegionSelect/index.vue

34
src/views/Main/index.vue

@ -1,6 +1,6 @@
<template> <template>
<LeftPanel> <LeftPanel>
<Drawer style="width: 458px"> <Drawer style="width: 458px" v-if="showLeftDrawer">
<ProjectCountCard /> <ProjectCountCard />
<MonitoringCard /> <MonitoringCard />
<InspectionCard /> <InspectionCard />
@ -12,11 +12,11 @@
<div class="top"></div> <div class="top"></div>
<div class="bottom"></div> <div class="bottom"></div>
</div> </div>
<Drawer style="width: 460px"> <Drawer style="width: 460px" v-if="showRightDrawer">
<SafetyOverviewCard /> <SafetyOverviewCard />
</Drawer> </Drawer>
</RightPanel> </RightPanel>
<BottomPanel></BottomPanel> <BottomPanel v-if="showBottomPanel"></BottomPanel>
<Map></Map> <Map></Map>
</template> </template>
@ -32,9 +32,37 @@ import SafetyOverviewCard from "./SafetyOverviewCard/index.vue";
import Map from "./Map/index.vue"; import Map from "./Map/index.vue";
import RegionSelect from "../RegionSelect/index.vue"; import RegionSelect from "../RegionSelect/index.vue";
import { onBeforeUnmount, onMounted, ref } from "vue";
defineOptions({ defineOptions({
name: "main", name: "main",
}); });
const showLeftDrawer = ref(true);
const showRightDrawer = ref(true);
const showBottomPanel = ref(true);
onMounted(() => {
window.$bus.$on("open-left-panel", () => {
showLeftDrawer.value = true;
});
window.$bus.$on("close-left-panel", () => {
showLeftDrawer.value = false;
});
window.$bus.$on("open-right-panel", () => {
showRightDrawer.value = true;
});
window.$bus.$on("close-right-panel", () => {
showRightDrawer.value = false;
});
window.$bus.$on("open-bottom-panel", () => {
showBottomPanel.value = true;
});
window.$bus.$on("close-bottom-panel", () => {
showBottomPanel.value = false;
});
});
onBeforeUnmount(() => {
window.$bus.$all_off();
});
</script> </script>
<style scoped></style> <style scoped></style>

13
src/views/RegionSelect/index.vue

@ -38,6 +38,19 @@ defineOptions({
/* 文字&图标/Font Wh1 */ /* 文字&图标/Font Wh1 */
color: rgba(255, 255, 255, 0.9); color: rgba(255, 255, 255, 0.9);
} }
:deep(.sy-region-select) {
width: 194px;
background: rgba(255, 255, 255, 0.8); background: rgba(255, 255, 255, 0.8);
color: rgba(0, 0, 0, 0.9);
.sy-input--small .sy-input__wrapper {
.sy-select__caret {
color: rgba(0, 0, 0, 0.9);
}
}
::-webkit-input-placeholder {
color: rgba(0, 0, 0, 0.9);
}
}
} }
</style> </style>

Loading…
Cancel
Save