mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 12:26:47 +08:00
文章报表
This commit is contained in:
@@ -23,6 +23,15 @@
|
|||||||
>
|
>
|
||||||
</a-input>
|
</a-input>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="select">
|
||||||
|
<a-range-picker
|
||||||
|
v-model:value="publishTime"
|
||||||
|
type="date"
|
||||||
|
valueFormat="YYYY-MM-DD"
|
||||||
|
:placeholder="['发布开始时间','结束时间']"
|
||||||
|
style="width: 100%; margin-right: 0px"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<div style="display: flex; margin-bottom: 20px">
|
<div style="display: flex; margin-bottom: 20px">
|
||||||
<div class="btnzx btnzx1" @click="searchData">
|
<div class="btnzx btnzx1" @click="searchData">
|
||||||
<div class="search"></div>
|
<div class="search"></div>
|
||||||
@@ -127,6 +136,7 @@ export default {
|
|||||||
pageSize: 10, // 每页条数
|
pageSize: 10, // 每页条数
|
||||||
pageNo: 1, //当前页码
|
pageNo: 1, //当前页码
|
||||||
createName: "", //创建者名称
|
createName: "", //创建者名称
|
||||||
|
publishTime: "", // 发布时间
|
||||||
title: "", // 文章名称
|
title: "", // 文章名称
|
||||||
selectedRowKeys: [], // 选中的列
|
selectedRowKeys: [], // 选中的列
|
||||||
});
|
});
|
||||||
@@ -157,6 +167,11 @@ export default {
|
|||||||
if (state.createName) {
|
if (state.createName) {
|
||||||
params.createName = 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({
|
axios({
|
||||||
method: "post",
|
method: "post",
|
||||||
url: "/report/boeu/article/exportAll",
|
url: "/report/boeu/article/exportAll",
|
||||||
@@ -183,19 +198,31 @@ export default {
|
|||||||
}
|
}
|
||||||
const getTableData = async () => {
|
const getTableData = async () => {
|
||||||
state.tableLoading = true;
|
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) {
|
if (state.title) {
|
||||||
params.title = state.title;
|
params.title = state.title;
|
||||||
}
|
}
|
||||||
if (state.createName) {
|
if (state.createName) {
|
||||||
params.createName = 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);
|
const res = await api.boeuArticlePageList(params);
|
||||||
if (res) {
|
if (res) {
|
||||||
state.tableLoading = false;
|
state.tableLoading = false;
|
||||||
state.tableDataTotal = res.data.total;
|
state.tableDataTotal = res.data.result.total;
|
||||||
const list = res.data.rows?.map((item) => {
|
const list = res.data.result.rows?.map((item) => {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
key: item.id,
|
key: item.id,
|
||||||
@@ -207,6 +234,7 @@ export default {
|
|||||||
const resetClick = () => {
|
const resetClick = () => {
|
||||||
state.selectedRowKeys = [];
|
state.selectedRowKeys = [];
|
||||||
state.createName = "";
|
state.createName = "";
|
||||||
|
state.publishTime = [];
|
||||||
state.title = "";
|
state.title = "";
|
||||||
getTableData();
|
getTableData();
|
||||||
};
|
};
|
||||||
@@ -228,12 +256,19 @@ export default {
|
|||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "浏览量",
|
title: "浏览数",
|
||||||
dataIndex: "views",
|
dataIndex: "views",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
key: "views",
|
key: "views",
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: "点赞数",
|
||||||
|
dataIndex: "praises",
|
||||||
|
ellipsis: true,
|
||||||
|
key: "praises",
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "评论数",
|
title: "评论数",
|
||||||
dataIndex: "comments",
|
dataIndex: "comments",
|
||||||
@@ -242,19 +277,12 @@ export default {
|
|||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "分享量",
|
title: "分享数",
|
||||||
dataIndex: "shares",
|
dataIndex: "shares",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
key: "shares",
|
key: "shares",
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: "点赞量",
|
|
||||||
dataIndex: "praises",
|
|
||||||
ellipsis: true,
|
|
||||||
key: "praises",
|
|
||||||
align: "center",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: "收藏数",
|
title: "收藏数",
|
||||||
dataIndex: "favorites",
|
dataIndex: "favorites",
|
||||||
@@ -269,13 +297,13 @@ export default {
|
|||||||
key: "publishTime",
|
key: "publishTime",
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
title: "文章状态",
|
// title: "文章状态",
|
||||||
dataIndex: "status",
|
// dataIndex: "status",
|
||||||
ellipsis: true,
|
// ellipsis: true,
|
||||||
key: "status",
|
// key: "status",
|
||||||
align: "center",
|
// align: "center",
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
title: "创建人",
|
title: "创建人",
|
||||||
dataIndex: "sysCreateBy",
|
dataIndex: "sysCreateBy",
|
||||||
@@ -327,7 +355,7 @@ export default {
|
|||||||
.select {
|
.select {
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
width: calc((100% - 76px - 200px) / 2);
|
width: calc((100% - 76px - 220px) / 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btnz {
|
.btnz {
|
||||||
|
|||||||
Reference in New Issue
Block a user