zhangwencui
16 小时以前 67e7a7a7440ad764afd43fa27187c09b899245da
规程资质15天标红
已修改1个文件
29 ■■■■■ 文件已修改
src/pages/safeProduction/safeQualifications/index.vue 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/safeProduction/safeQualifications/index.vue
@@ -26,7 +26,8 @@
          v-if="visitList.length > 0">
      <view v-for="(item, index) in visitList"
            :key="index">
        <view class="ledger-item">
        <view class="ledger-item"
              :class="{ 'expiring-soon': isExpiringSoon(item.effectiveTime) }">
          <view class="item-header">
            <view class="item-left">
              <view class="document-icon">
@@ -127,6 +128,17 @@
  import dayjs from "dayjs";
  const userStore = useUserStore();
  // 检查资质是否即将到期(到期前15天)
  const isExpiringSoon = effectiveTime => {
    if (!effectiveTime) return false;
    const today = dayjs();
    const expireDate = dayjs(effectiveTime);
    const daysDiff = expireDate.diff(today, "day");
    return daysDiff >= 0 && daysDiff <= 15;
  };
  // 搜索关键词
  const customerName = ref("");
@@ -259,5 +271,20 @@
    background: #667eea; // 保持页面特有的背景色
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3); // 保持页面特有的阴影效果
  }
  // 即将到期的资质卡片样式
  .expiring-soon {
    border: 2rpx solid #ff4d4f;
    box-shadow: 0 2rpx 16rpx rgba(255, 77, 79, 0.2);
  }
  .expiring-soon .item-header {
    background-color: rgba(255, 77, 79, 0.05);
  }
  .expiring-soon .detail-row:last-child .detail-value {
    color: #ff4d4f;
    font-weight: 500;
  }
</style>