Hwf il y a 3 semaines
Parent
commit
b5e373c2a7
2 fichiers modifiés avec 19 ajouts et 7 suppressions
  1. 15 3
      src/views/duty/index.vue
  2. 4 4
      src/views/duty/rota.vue

+ 15 - 3
src/views/duty/index.vue

@@ -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>

+ 4 - 4
src/views/duty/rota.vue

@@ -25,9 +25,9 @@
         </div>
       </div>
     </div>
-    <div class="footer">
-      <div class="confirm-btn" @click="handleShowUpload">上传值班表</div>
-    </div>
+<!--    <div class="footer">-->
+<!--      <div class="confirm-btn" @click="handleShowUpload">上传值班表</div>-->
+<!--    </div>-->
     <van-popup v-model:show="showPicker" round position="bottom">
       <van-picker
           :columns="columns"
@@ -36,7 +36,7 @@
       />
     </van-popup>
     <!--上传值班表-->
-    <upload-rota v-model:show="showPicker2" />
+<!--    <upload-rota v-model:show="showPicker2" />-->
   </div>
 </template>