鲁班七号
2023-05-22 83d52c58d6717a2233e1b04e22769f58afcbf20b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<template>
  <a-card title="近期通知" class="projecting">
    <a slot="extra" href="#" style="color: rgb(19, 194, 194)">全部通知</a>
    <a-card-grid style="width:33.33%;text-align:center" v-for="(item, index) in lists" :key="'projecting' + index">
      <div class="title">
        <img :src="item.img" :alt="item.title">
        <span>{{ item.title }}</span>
      </div>
      <p>{{ item.content }}</p>
      <div class="project-item">
        <b>{{ item.name }}</b>
        <span>{{ item.created | filterTime }}</span>
      </div>
    </a-card-grid>
  </a-card>
</template>
 
<script>
export default {
  name: 'projecting',
  data () {
    return {
      lists: [
        { 
          img: require('@/assets/user.png'),
          title: '气象 红色预警',//显示灾害种类和对应颜色级别
          content: '根据中央气象台消息,全疆近日气温将……',
          name: '自治区',
          created: '2020-10-12 12:12:12'
        },
        { 
          img: require('@/assets/user.png'),
          title: '气象 红色预警',
          content: '今日阿勒泰地区将持续低温,请各单位……',
          name: '阿勒泰地区',
          created: '2021-08-21 12:12:12'
        },
        { 
          img: require('@/assets/user.png'),
          title: '气象 黄色预警',
          content: '根据中央气象台消息,全疆近日气温将……',
          name: '自治区',
          created: '2022-10-12 12:12:12'
        },
        { 
          img: require('@/assets/user.png'),
          title: '气象 红色预警',
          content: '根据中央气象台消息,全疆近日气温将……',
          name: '自治区',
          created: '2022-08-21 12:12:12'
        },
        { 
          img: require('@/assets/user.png'),
          title: '气象 红色预警',
          content: '根据中央气象台消息,全疆近日气温将……',
          name: '自治区',
          created: '2022-10-12 12:12:12'
        },
        { 
          img: require('@/assets/user.png'),
          title: '气象 红色预警',
          content: '根据中央气象台消息,全疆近日气温将……',
          name: '自治区',
          created: '2022-08-25 12:12:12'
        }
      ]
    }
  }
}
</script>
 
<style lang="less" scoped>
.projecting {
  .title {
    text-align: left;
    margin-bottom: 10px;
    img {
      width: 32px;
      height: 32px;
      margin-right: 16px;
    }
    span {
      color: rgba(0, 0, 0, 0.85);
      font-weight: 500;
      font-size: 16px;
    }
  }
  p {
    text-align: left;
    height: 44px;
    line-height: 22px;
    overflow: hidden;
    color: rgba(0, 0, 0, 0.45);
  }
  .project-item {
    display: flex;
    justify-content: space-between;
    span {
      &:first-child {
        &:hover {
          color: rgb(19, 194, 194);
          cursor: pointer;
        }
      }
    }
  }
}
</style>