diff --git a/src/views/report/ReportArticle.vue b/src/views/report/ReportArticle.vue index e7fce52e..0c3fb423 100644 --- a/src/views/report/ReportArticle.vue +++ b/src/views/report/ReportArticle.vue @@ -23,6 +23,15 @@ > +
+ +
@@ -127,6 +136,7 @@ export default { pageSize: 10, // 每页条数 pageNo: 1, //当前页码 createName: "", //创建者名称 + publishTime: "", // 发布时间 title: "", // 文章名称 selectedRowKeys: [], // 选中的列 }); @@ -157,6 +167,11 @@ export default { if (state.createName) { params.createName = state.createName; } + if (state.publishTime.length>0) { + // params.publishTime = state.publishTime; + params.startTime = state.publishTime[0]; + params.endTime = state.publishTime[1]; + } axios({ method: "post", url: "/report/boeu/article/exportAll", @@ -183,19 +198,31 @@ export default { } const getTableData = async () => { state.tableLoading = true; - const params = { page: state.pageNo, size: state.pageSize }; + const params = { + title: state.title, + createName: state.createName, + // publishTime: state.publishTime, + startTime: state.publishTime[0], + endTime: state.publishTime[1], + page: state.pageNo, + size: state.pageSize + }; if (state.title) { params.title = state.title; } if (state.createName) { params.createName = state.createName; } - + if (state.publishTime.length>0) { + // params.publishTime = state.publishTime; + params.startTime = state.publishTime[0]; + params.endTime = state.publishTime[1]; + } const res = await api.boeuArticlePageList(params); if (res) { state.tableLoading = false; - state.tableDataTotal = res.data.total; - const list = res.data.rows?.map((item) => { + state.tableDataTotal = res.data.result.total; + const list = res.data.result.rows?.map((item) => { return { ...item, key: item.id, @@ -207,6 +234,7 @@ export default { const resetClick = () => { state.selectedRowKeys = []; state.createName = ""; + state.publishTime = []; state.title = ""; getTableData(); }; @@ -228,12 +256,19 @@ export default { align: "center", }, { - title: "浏览量", + title: "浏览数", dataIndex: "views", ellipsis: true, key: "views", align: "center", }, + { + title: "点赞数", + dataIndex: "praises", + ellipsis: true, + key: "praises", + align: "center", + }, { title: "评论数", dataIndex: "comments", @@ -242,19 +277,12 @@ export default { align: "center", }, { - title: "分享量", + title: "分享数", dataIndex: "shares", ellipsis: true, key: "shares", align: "center", }, - { - title: "点赞量", - dataIndex: "praises", - ellipsis: true, - key: "praises", - align: "center", - }, { title: "收藏数", dataIndex: "favorites", @@ -269,13 +297,13 @@ export default { key: "publishTime", align: "center", }, - { - title: "文章状态", - dataIndex: "status", - ellipsis: true, - key: "status", - align: "center", - }, + // { + // title: "文章状态", + // dataIndex: "status", + // ellipsis: true, + // key: "status", + // align: "center", + // }, { title: "创建人", dataIndex: "sysCreateBy", @@ -327,7 +355,7 @@ export default { .select { margin-right: 20px; margin-bottom: 20px; - width: calc((100% - 76px - 200px) / 2); + width: calc((100% - 76px - 220px) / 3); } .btnz {