|
@@ -6,7 +6,7 @@
|
|
|
<div :class="activeIndex === item.id ? 'tab-text text-active' : 'tab-text'">{{ item.name }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="content" :style="{ height: activeIndex === 'event' ? 'calc(100vh)' : 'calc(100vh - 230px)' }">
|
|
|
+ <div class="content" :class="getClass()">
|
|
|
<DutyCalendar v-if="activeIndex === 'calendar'" @changIndex="handleClickTab" />
|
|
|
<ShiftChange v-else-if="activeIndex === 'shiftChange'" />
|
|
|
<Rota v-else-if="activeIndex === 'rota'" />
|
|
@@ -34,6 +34,14 @@ let tabs = ref([
|
|
|
const handleClickTab = (id) => {
|
|
|
activeIndex.value = id;
|
|
|
};
|
|
|
+
|
|
|
+const getClass = () => {
|
|
|
+ let res = 'height'
|
|
|
+ if (['event', 'rota'].includes(activeIndex.value)) {
|
|
|
+ res = 'height2';
|
|
|
+ }
|
|
|
+ return res;
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
@@ -100,6 +108,10 @@ const handleClickTab = (id) => {
|
|
|
background-size: 100% 100%;
|
|
|
}
|
|
|
}
|
|
|
+.height {
|
|
|
+ height: calc(100vh - 230px);
|
|
|
+}
|
|
|
+.height2 {
|
|
|
+ height: 100%;
|
|
|
+}
|
|
|
</style>
|
|
|
-<script setup lang="ts">
|
|
|
-</script>
|