pyt
2025-03-24 596771d8646f2aac091c3c8e17955fe4325d506b
feat
1个文件已修改
58 ■■■■■ 已修改文件
src/views/index.vue 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/index.vue
@@ -7,27 +7,21 @@
          <div class="calendar-header">
            <span>日历</span>
            <div class="calendar-controls">
              <el-date-picker
                v-model="selectedMonth"
                type="month"
                :format="'yyyy年MM月'"
                placeholder="选择月份"
                @change="handleMonthChange"
              />
              <el-date-picker v-model="selectedMonth" type="month" :format="'yyyy年MM月'" placeholder="选择月份"
                @change="handleMonthChange" />
            </div>
          </div>
          <el-calendar v-model="currentDate" @change="handleCalendarChange"/>
          <el-calendar v-model="currentDate"  />
        </el-card>
      </el-col>
      <!-- 右侧预警通知 -->
      <el-col :span="12">
        <el-card class="notification-card">
          <div class="notification-header">预警通知</div>
          <div class="notification-list">
            <div v-for="(notification, index) in alwaysMessages"
                 :key="index"
                 class="notification-item">
            <div v-for="(notification, index) in alwaysMessages" :key="index" class="notification-item"
              @click="handleNotificationClick(notification)">
              <div class="notification-item-header">
                <div class="notification-dot"></div>
                <span class="notification-time">{{ notification.createTime }}</span>
@@ -37,9 +31,8 @@
                <div v-if="notification.createBy" class="notification-submitter">提交人:{{ notification.createBy }}</div>
              </div>
            </div>
            <div v-for="(notification, index) in noticeMessage"
                 :key="index"
                 class="notification-item">
            <div v-for="(notification, index) in noticeMessage" :key="index" class="notification-item"
              @click="handleNotificationClick(notification)">
              <div class="notification-item-header">
                <div class="notification-dot"></div>
                <span class="notification-time">{{ notification.createTime }}</span>
@@ -91,10 +84,29 @@
        this.currentDate = new Date(date);
      }
    },
    // 添加通知点击处理
    // 处理通知点击
    handleNotificationClick(notification) {
      notification.isRead = true;
      // 这里可以添加具体的业务逻辑
      // 根据id类型进行不同的路由跳转
      const id = notification.noticeId;
      switch (id) {
        case 1:
          // 自主购房安置申请批次表
          this.$router.push('/applicationBatchList/list');
          break;
        case 2:
          // 自主购房安置申请批次表
          this.$router.push('/applicationBatchList/list');
          break;
        case 3:
          // 付款明细
          this.$router.push('/payment-details/list');
          break;
        default:
          if (id > 4) {
            // 付款明细
            this.$router.push('/payment-details/list');
          }
      }
    }
  }
};
@@ -103,7 +115,7 @@
<style scoped lang="scss">
.app-container {
  padding: 20px;
  .calendar-card,
  .notification-card {
    min-height: 600px;
@@ -137,11 +149,11 @@
      padding: 12px 16px;
      border-bottom: 1px solid #ebeef5;
      cursor: pointer;
      &:hover {
        background-color: #f5f7fa;
      }
      &:last-child {
        border-bottom: none;
      }
@@ -167,7 +179,7 @@
      .notification-content {
        padding-left: 16px;
        .notification-text {
          color: #333;
          margin: 4px 0;
@@ -180,11 +192,13 @@
        }
      }
    }
    &.unread {
      .notification-dot {
        display: block;
      }
    }
    &.read {
      .notification-dot {
        display: none;