gaoluyang
2 天以前 acf3f93cccb1bc31da45a16a823ed6a91ae9d232
style(hrm): 排班表格列宽与班次字号调整

- 员工列固定 160px,不再吃掉表格剩余宽度
- 周视图日期列均分剩余宽度,班次名完整显示;月视图保持 52px
- 班次文字放大到 12px

Co-Authored-By: Claude Code <noreply@anthropic.com>
已修改1个文件
20 ■■■■■ 文件已修改
src/views/hrm/schedule/index.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/hrm/schedule/index.vue
@@ -522,7 +522,18 @@
        "
        class="py-20"
      />
      <table v-else class="schedule-table w-full text-sm">
      <table v-else class="schedule-table text-sm">
        <!-- 勾选列 40px、员工列 160px 固定;日期列按视图模式定宽 -->
        <colgroup>
          <col style="width: 40px" />
          <col style="width: 160px" />
          <!-- 周视图:日期列均分剩余宽度(保证班次名完整显示);月视图:固定 52px 横向滚动 -->
          <col
            v-for="vd in viewDays"
            :key="vd.date"
            :style="viewMode === 'month' ? 'width: 52px' : undefined"
          />
        </colgroup>
        <thead>
          <tr>
            <th class="schedule-check-col bg-gray-100">
@@ -679,6 +690,7 @@
  min-width: max-content;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  th,
  td {
@@ -687,7 +699,6 @@
  }
  .schedule-date-col {
    width: 52px;
    min-width: 52px;
  }
@@ -708,7 +719,8 @@
  .schedule-name-col {
    left: 40px;
    min-width: 180px;
    width: 160px;
    min-width: 160px;
    padding: 0 12px;
    line-height: 1.3;
  }
@@ -734,7 +746,7 @@
    padding: 1px 6px;
    overflow: hidden;
    color: #fff;
    font-size: 11px;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-radius: 3px;