wwf
昨天 34f5733bc1f126c572580fa849b9403dfcddd84b
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<template>
  <div>
    <el-image
      :src="$getImageUrl('/home/banner1.png')"
      style="width: 100%;max-height: 430px;"
    >
    </el-image>
    <div class="main-content">
      <el-row justify="space-between">
        <div 
          v-for="(item,index) in operationList"
          :key="`operation${index}`"
          class="cursor-p my-4 p-0"
          @click="goOperationPage(item)"
        >
          <el-image style="max-width: 270px;" :src="$getImageUrl(`/home/${item.value}.png`)">
          </el-image>
        </div>
      </el-row>
 
      <el-row justify="space-between" class="py-2" style="border-bottom: 2px solid var(--el-color-primary);">
        <el-text class="text-xl font-bold">
          <span style="color: var(--el-color-primary);">通知</span>
          <span>公告</span>
        </el-text>
        <el-button text type="primary" @click="goNoticeList()">查看全部>></el-button>
      </el-row>
      
      <el-card 
        v-for="(notice,index) in noticeList" 
        :key="`notice${index}`"
        class="mt-2 p-4 py-3"
        shadow="never"
      >
        <el-row justify="space-between" align="middle">
          <div>
            <el-row><el-text class="text-lg text-black font-medium">{{ notice.title }}</el-text></el-row>
            <el-row class="mt-2">
              <el-text style="margin-right: 40px;">发布时间:{{ notice.publishTime }}</el-text>
              <el-text>所属地区:{{ notice.area }}</el-text>
            </el-row>
          </div>
          <div>
            <el-button text type="primary" @click="goNoticeDetail(notice.id)">点击查看详情>></el-button>
          </div>
        </el-row>
      </el-card>
 
      <el-row class="mt-5" v-if="noticeList.length == 0" justify="center">
        <el-text>暂无公告~</el-text>
      </el-row>
    </div>
  </div>
</template>
 
<script>
export default {
  data() {
    return {
      operationList: [
        { name: "评价计划", value: 'appraisalPlan' },
        { name: "准考证查询", value: 'examTicket' },
        { name: "成绩查询", value: 'score' },
        { name: "证书查询", value: 'certificate' },
      ],
      noticeList: [],
    }
  },
  created() {
    this.getNoticeList()
  },
  methods: {
    getNoticeList() {
      setTimeout(() => {
        this.noticeList = 
        [
          {
            id: '1',
            title: "关于公布2024年广东省产教评技能生态链链主培育单位入选名单的通知",
            publishTime: '2024-07-12 14:24:33',
            area: '广东省',
          },
          {
            id: '2',
            title: "关于公布2024年广东省产教评技能生态链链主培育单位入选名单的通知",
            publishTime: '2024-07-12 14:24:33',
            area: '广东省',
          },
          {
            id: '3',
            title: "关于公布2024年广东省产教评技能生态链链主培育单位入选名单的通知",
            publishTime: '2024-07-12 14:24:33',
            area: '广东省',
          },
          {
            id: '4',
            title: "关于公布2024年广东省产教评技能生态链链主培育单位入选名单的通知",
            publishTime: '2024-07-12 14:24:33',
            area: '广东省',
          },
          {
            id: '5',
            title: "关于公布2024年广东省产教评技能生态链链主培育单位入选名单的通知",
            publishTime: '2024-07-12 14:24:33',
            area: '广东省',
          },
        ]
      }, 400)
    },
    goNoticeDetail(id) {
      this.$router.push(`/main/noticeDetail/${id}`)
    },
    goNoticeList() {
      this.$router.push('/main/noticeList')
    },
    goOperationPage(item) {
      this.$router.push(`/main/${item.value}`)
    }
  }
}
 
</script>