notice.vue
3.23 KB
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
<template>
<v-layout>
<template slot="breadcrumb">
<el-breadcrumb-item>系统公告</el-breadcrumb-item>
</template>
<template slot="main">
<div class="ibox">
<div class="ibox-title">
<h3 class="pull-left">系统介绍</h3>
</div>
<div class="ibox-content">
<div class="info-box" v-for="item in infoList" :key="item.id">
<a :href="item.pdfUrl" target="_blank">
<img src="../assets/images/usage.png"/>
<h5>{{item.bulletinName}}</h5>
</a>
</div>
</div>
</div>
<div class="ibox">
<div class="ibox-title">
<h3 class="pull-left">系统更新动态</h3>
</div>
<div class="ibox-content">
<div class="update-box" v-for="item in updateList" :key="item.id">
<a :href="item.pdfUrl" target="_blank">
<h4>{{item.bulletinName}}</h4>
<span>{{item.updateTime}}</span>
</a>
</div>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
layout="prev, pager, next"
:total="updateListTotal">
</el-pagination>
</div>
</div>
</template>
</v-layout>
</template>
<script>
import {services} from '../api'
const SYSTEM_SERVICE = services.system;
export default{
data(){
return {
infoList: [],
updateList: [],
updateListTotal: 0,
currentPage: 1,
pageSize: 10
}
},
created(){
this.init()
},
methods: {
init(){
SYSTEM_SERVICE.getSystemInfo().then((result)=>{
if(result.returnCode == 0){
this.infoList = result.data;
}
});
this.getUpdateData()
},
getUpdateData(curr=this.currentPage, size=this.pageSize){
let params = {};
params.currentPage = curr;
params.pageSize = size;
SYSTEM_SERVICE.getSystemUpdating(params).then((response)=>{
if(Array.isArray(response.data)){
this.updateList = response.data;
this.updateListTotal = response.recordsTotal;
}else{
this.updateList = [];
this.updateListTotal = 0;
}
})
},
handleSizeChange(val) {
this.pageSize = val;
this.getUpdateData(this.currentPage,this.pageSize)
},
handleCurrentChange(val) {
this.currentPage = val;
this.getUpdateData(val)
},
},
components:{
}
}
</script>
<style scoped>
.info-box{
float: left;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 240px;
height: 140px;
border-right: 1px solid #eee;
text-align: center;
}
.info-box a{
color: inherit;
text-decoration: none;
}
.info-box h5{
margin-top: 10px;
font-size: 14px;
color: #333;
}
.update-box{
max-width: 600px;
border-bottom: 1px solid #eee;
padding: 10px;
line-height: 1.5;
}
.update-box:last-child{
border-bottom: none;
}
.update-box a{
color: inherit;
text-decoration: none;
}
.update-box h4{
color: #333;
font-size: 14px;
}
.update-box span{
color: #999;
}
</style>