revert 0e2d64fc5ede50aec2f0e3e1733385f09cc34845
revert 实现平台动态
This commit is contained in:
parent
0e2d64fc5e
commit
e73b3928af
@ -73,7 +73,7 @@
|
||||
"eslint-plugin-vue": "7.2.0",
|
||||
"lint-staged": "10.5.3",
|
||||
"runjs": "4.4.2",
|
||||
"sass": "1.32.0",
|
||||
"sass": "3.32.0",
|
||||
"sass-loader": "10.1.0",
|
||||
"script-ext-html-webpack-plugin": "2.1.5",
|
||||
"svg-sprite-loader": "5.1.1",
|
||||
|
@ -1,9 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function listInformation(query) {
|
||||
return request({
|
||||
url: '/bid/information/front/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
@ -1,94 +1,25 @@
|
||||
<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>
|
||||
|
||||
<script>
|
||||
import { listInformation } from "@/api/bid/information";
|
||||
import { parseTime } from "@/utils/neu";
|
||||
|
||||
export default {
|
||||
name: "list",
|
||||
data () {
|
||||
data() {
|
||||
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: '王小虎',
|
||||
}]
|
||||
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.getlist();
|
||||
},
|
||||
mounted () {
|
||||
window.onresize = () => this.isShowWindows = document.body.clientWidth > 765;
|
||||
mounted() {
|
||||
|
||||
},
|
||||
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>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
|
Loading…
x
Reference in New Issue
Block a user