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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
| <template>
| <div>
| <div class="content-bg">
| <div class="main-content">
| <ReturnBtn></ReturnBtn>
|
| <el-row class="mt-6">
| <el-text class="text-title">通知公告</el-text>
| </el-row>
|
| <el-row class="mt-5">
| <el-input
| v-model="filter.keyword"
| style="width: 739px;height: 70px;"
| placeholder="输入关键字搜索"
| >
| <template #append>
| <el-button class="append-btn" type="primary">
| <el-text class="text-white text-xl">搜 索</el-text>
| </el-button>
| </template>
| </el-input>
| </el-row>
| </div>
| </div>
| <div class="main-content py-4">
| <el-row class="mb-6">
| <el-select v-model="filter.area" placeholder="筛选所属地区" style="width: 240px">
| <el-option
| v-for="item in areaItems"
| :key="item.value"
| :label="item.label"
| :value="item.value"
| />
| </el-select>
| </el-row>
|
| <el-card
| v-for="(notice,index) in filterNoticeList"
| :key="`notice${index}`"
| class="mt-3 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 justify="end" class="my-7" v-if="noticeList.length > 0">
| <el-text class="mr-4 text-note">共{{ totalCount }}项数据</el-text>
| <el-pagination
| v-model:current-page="filter.pageNo"
| v-model:page-size="filter.pageSize"
| background
| layout="prev, pager, next"
| :total="totalCount"
| />
| </el-row>
|
| <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 {
| page: 1,
| size: 5,
| filter: {
| pageNo: 1,
| pageSize: 5,
| keyword: '',
| area: '',
| },
| areaItems: [
| { label: '广东省', value: '' },
| { label: '广州市', value: '广州市' },
| { label: '深圳市', value: '深圳市' }
| ],
| noticeList: [],
| }
| },
| computed: {
| filterNoticeList() {
| return this.noticeList.slice((this.filter.pageNo-1)*this.filter.pageSize, this.filter.pageNo*this.filter.pageSize)
| }
| },
| created() {
| this.getNoticeList()
| },
| methods: {
| getNoticeList() {
| setTimeout(() => {
| this.noticeList =
| [
| {
| id: '1',
| title: "关于公布2024年广东省产教评技能生态链链主培育单位入选名单的通知1",
| publishTime: '2024-07-12 14:24:33',
| area: '广东省',
| },
| {
| id: '2',
| title: "关于公布2024年广东省产教评技能生态链链主培育单位入选名单的通知2",
| publishTime: '2024-07-12 14:24:33',
| area: '广东省',
| },
| {
| id: '3',
| title: "关于公布2024年广东省产教评技能生态链链主培育单位入选名单的通知3",
| publishTime: '2024-07-12 14:24:33',
| area: '广东省',
| },
| {
| id: '4',
| title: "关于公布2024年广东省产教评技能生态链链主培育单位入选名单的通知4",
| publishTime: '2024-07-12 14:24:33',
| area: '广东省',
| },
| {
| id: '5',
| title: "关于公布2024年广东省产教评技能生态链链主培育单位入选名单的通知5",
| publishTime: '2024-07-12 14:24:33',
| area: '广东省',
| },
| {
| id: '6',
| title: "关于公布2024年广东省产教评技能生态链链主培育单位入选名单的通知6",
| publishTime: '2024-07-12 14:24:33',
| area: '广东省',
| },
| {
| id: '7',
| title: "关于公布2024年广东省产教评技能生态链链主培育单位入选名单的通知7",
| publishTime: '2024-07-12 14:24:33',
| area: '广东省',
| },
| {
| id: '8',
| title: "关于公布2024年广东省产教评技能生态链链主培育单位入选名单的通知8",
| publishTime: '2024-07-12 14:24:33',
| area: '广东省',
| },
| {
| id: '9',
| title: "关于公布2024年广东省产教评技能生态链链主培育单位入选名单的通知9",
| publishTime: '2024-07-12 14:24:33',
| area: '广东省',
| },
| {
| id: '10',
| title: "关于公布2024年广东省产教评技能生态链链主培育单位入选名单的通知10",
| publishTime: '2024-07-12 14:24:33',
| area: '广东省',
| },
| ]
| this.totalCount = 10
| }, 400)
| },
| goNoticeDetail(id) {
| this.$router.push(`/main/noticeDetail/${id}`)
| },
| }
| }
|
| </script>
| <style scoped>
| .content-bg {
| height: 240px;
| background-image: url('@/assets/images/contentBg.png');
| background-repeat: no-repeat, no-repeat, repeat; /* 分别设置 */
| background-size: cover;
| }
| :deep(.el-input__inner) {
| padding-left: 10px;
| font-size: 18px;
| }
| .append-btn {
| width: 114px;
| height: 100%;
| background-color: var(--el-color-primary) !important;
| }
| </style>
|
|