实现平台动态
This commit is contained in:
parent
c81e3cffcf
commit
0e2d64fc5e
@ -73,7 +73,7 @@
|
|||||||
"eslint-plugin-vue": "7.2.0",
|
"eslint-plugin-vue": "7.2.0",
|
||||||
"lint-staged": "10.5.3",
|
"lint-staged": "10.5.3",
|
||||||
"runjs": "4.4.2",
|
"runjs": "4.4.2",
|
||||||
"sass": "3.32.0",
|
"sass": "1.32.0",
|
||||||
"sass-loader": "10.1.0",
|
"sass-loader": "10.1.0",
|
||||||
"script-ext-html-webpack-plugin": "2.1.5",
|
"script-ext-html-webpack-plugin": "2.1.5",
|
||||||
"svg-sprite-loader": "5.1.1",
|
"svg-sprite-loader": "5.1.1",
|
||||||
|
|||||||
9
src/api/bid/information.js
Normal file
9
src/api/bid/information.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function listInformation(query) {
|
||||||
|
return request({
|
||||||
|
url: '/bid/information/front/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -1,25 +1,94 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-breadcrumb separator="/" style="margin-left: 20px;">
|
||||||
|
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
||||||
|
<el-breadcrumb-item><a href="/">动态列表页</a></el-breadcrumb-item>
|
||||||
|
</el-breadcrumb>
|
||||||
|
|
||||||
|
<div style="padding: 20px; background: #fff; margin: 10px;">
|
||||||
|
<el-table :data="tableData" style="width: 100%;" v-if="isShowWindows">
|
||||||
|
<el-table-column type="index" label="序号" width="300">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="title" label="标题" width="800">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="publishDatetime" label="日期">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<el-table :data="tableData" style="width: 100%" :show-header="false" v-if="!isShowWindows">
|
||||||
|
<el-table-column label="标题">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div>
|
||||||
|
<b>{{ scope.row.title }}</b>
|
||||||
|
</div>
|
||||||
|
{{ parseTime(scope.row.publishDatetime, '{y}-{m}-{d}') }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <el-table-column prop="publishDatetime" label="日期">
|
||||||
|
</el-table-column> -->
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="margin-top: 40px;">
|
||||||
|
<el-pagination :page-sizes="[20, 30, 50, 100]" :page-size="query.pageSize"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper" :total="query.total" @size-change="handleSizeChange"
|
||||||
|
@current-change="handleCurrentChange" :current-page="query.pageNum">
|
||||||
|
</el-pagination>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { listInformation } from "@/api/bid/information";
|
||||||
|
import { parseTime } from "@/utils/neu";
|
||||||
export default {
|
export default {
|
||||||
name: "list",
|
name: "list",
|
||||||
data() {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
isShowWindows: true,
|
||||||
|
query: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
total: null
|
||||||
|
},
|
||||||
|
tableData: [{
|
||||||
|
publishDatetime: '2016-05-02',
|
||||||
|
title: '王小虎',
|
||||||
|
}, {
|
||||||
|
publishDatetime: '2016-05-04',
|
||||||
|
title: '王小虎',
|
||||||
|
}, {
|
||||||
|
publishDatetime: '2016-05-01',
|
||||||
|
title: '王小虎',
|
||||||
|
}, {
|
||||||
|
publishDatetime: '2016-05-03',
|
||||||
|
title: '王小虎',
|
||||||
|
}]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
created () {
|
||||||
|
this.getlist();
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
|
window.onresize = () => this.isShowWindows = document.body.clientWidth > 765;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getlist () {
|
||||||
|
listInformation(this.query).then(res => {
|
||||||
|
this.tableData = res.rows;
|
||||||
|
this.query.total = res.total;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleCurrentChange (value) {
|
||||||
|
this.query.pageNum = value;
|
||||||
|
this.getlist();
|
||||||
|
},
|
||||||
|
handleSizeChange (value) {
|
||||||
|
this.query.pageSize = value;
|
||||||
|
this.getlist();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped></style>
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user