添加前台公共显示筛选

This commit is contained in:
670788339
2025-10-24 16:01:50 +08:00
parent 701c26fd33
commit e3c46c339f

View File

@@ -32,6 +32,15 @@
allowClear allowClear
></a-select> ></a-select>
</div> </div>
<div class="select">
<a-select
v-model:value="searchParam.isPublic"
style="width: 270px"
placeholder="请选择前台公共显示状态"
:options="hotOptions"
allowClear
></a-select>
</div>
<div style="display: flex; margin-bottom: 20px"> <div style="display: flex; margin-bottom: 20px">
<div class="btnn btn1" @click="searchSubmit"> <div class="btnn btn1" @click="searchSubmit">
<div class="search"></div> <div class="search"></div>
@@ -42,6 +51,9 @@
<div class="btnText">重置</div> <div class="btnText">重置</div>
</div> </div>
</div> </div>
<div class="btn btn2" @click="exportTag">
<div class="wz">导出</div>
</div>
</div> </div>
</div> </div>
@@ -196,7 +208,8 @@ export default {
pageSize: 10, pageSize: 10,
id: "", id: "",
tagName: "", tagName: "",
isHot: undefined isHot: undefined,
isPublic: undefined
}, },
courseSearchParam: { courseSearchParam: {
@@ -254,6 +267,34 @@ export default {
key: "isHot", key: "isHot",
width: 220, width: 220,
align: "center" align: "center"
},
{
title: "创建人",
dataIndex: "sysCreateBy",
key: "sysCreateBy",
width: 220,
align: "center"
},
{
title: "创建时间",
dataIndex: "sysCreateTime",
key: "sysCreateTime",
width: 220,
align: "center"
},
{
title: "更新人",
dataIndex: "sysUpdateBy",
key: "sysUpdateBy",
width: 220,
align: "center"
},
{
title: "更新时间",
dataIndex: "sysUpdateTime",
key: "sysUpdateTime",
width: 220,
align: "center"
} }
]); ]);
@@ -311,6 +352,7 @@ export default {
// 获取标签列表 // 获取标签列表
const getTagList = async () => { const getTagList = async () => {
console.log("获取标签列表");
state.tableLoading = true; state.tableLoading = true;
try { try {
const params = { const params = {
@@ -318,10 +360,12 @@ export default {
pageSize: state.searchParam.pageSize, pageSize: state.searchParam.pageSize,
id: state.searchParam.id || undefined, id: state.searchParam.id || undefined,
tagName: state.searchParam.tagName || undefined, tagName: state.searchParam.tagName || undefined,
isHot: state.searchParam.isHot || undefined isHot: state.searchParam.isHot || undefined,
isPublic: state.searchParam.isPublic || undefined
}; };
console.log("获取标签列表 参数 : ",params);
const res = await apiCourseTag.portalPageList(params); const res = await apiCourseTag.portalPageList(params);
console.log("获取标签列表 结果 : ",res);
if (res.status === 200) { if (res.status === 200) {
state.tableData = res.result?.list || []; state.tableData = res.result?.list || [];
state.tableDataTotal = res.result?.count || 0; state.tableDataTotal = res.result?.count || 0;
@@ -462,6 +506,18 @@ export default {
} }
}; };
const exportTag = async () => {
console.log("调用导出标签接口");
try {
// const res = await apiCourseTag.exportTag();
// if (res.status === 200) {
// console.log("导出标签成功", res.data.data);
// }
} catch (error) {
message.error('导出标签失败');
}
};
// 日期格式化 // 日期格式化
const formatDate = (date) => { const formatDate = (date) => {
return date ? moment(date).format('YYYY-MM-DD') : ''; return date ? moment(date).format('YYYY-MM-DD') : '';
@@ -484,7 +540,8 @@ export default {
closeCourseDialog, closeCourseDialog,
changeCoursePagination, changeCoursePagination,
unbindCurrentTag, unbindCurrentTag,
formatDate formatDate,
exportTag
}; };
} }
}; };