mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 11:56:46 +08:00
日志
This commit is contained in:
@@ -155,11 +155,22 @@
|
|||||||
:pagination="false"
|
:pagination="false"
|
||||||
:scroll="{ x: 'max-content' }"
|
:scroll="{ x: 'max-content' }"
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
|
@change="handleRelTableChange"
|
||||||
>
|
>
|
||||||
<template #bodyCell="{ record, column }">
|
<template #bodyCell="{ record, column }">
|
||||||
<!-- 关联时间格式化 -->
|
<!-- 关联时间格式化 -->
|
||||||
<template v-if="column.key === 'sysCreateTime'">
|
<!-- <template v-if="column.key === 'sysCreateTime'">
|
||||||
{{ formatDate(record.sysCreateTime) }}
|
{{ formatDate(record.sysCreateTime) }}
|
||||||
|
</template>-->
|
||||||
|
<template v-if="column.key === 'sysCreateTime'">
|
||||||
|
<a
|
||||||
|
v-if="record.sysCreateTime > 0"
|
||||||
|
@click="showCourseByTagg(record.id)"
|
||||||
|
style="color: #4ea6ff; text-decoration: underline; cursor: pointer;"
|
||||||
|
>
|
||||||
|
{{ formatDate(record.sysCreateTime) }}
|
||||||
|
</a>
|
||||||
|
<span v-else style="color: #999;">0</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 操作列 -->
|
<!-- 操作列 -->
|
||||||
@@ -367,14 +378,6 @@ export default {
|
|||||||
orders: state.searchParam.order || null
|
orders: state.searchParam.order || null
|
||||||
};
|
};
|
||||||
console.log("获取标签列表 参数 : ",params);
|
console.log("获取标签列表 参数 : ",params);
|
||||||
// const res = await portalPageList(params);
|
|
||||||
// console.log("获取标签列表 结果 : ",res);
|
|
||||||
// if (res.status === 200) {
|
|
||||||
// state.tableData = res.result?.list || [];
|
|
||||||
// state.tableDataTotal = res.result?.count || 0;
|
|
||||||
// } else {
|
|
||||||
// message.error('获取数据失败1');
|
|
||||||
// }
|
|
||||||
portalPageList(params).then ((res) => {
|
portalPageList(params).then ((res) => {
|
||||||
console.log("获取标签列表 结果 : ",res);
|
console.log("获取标签列表 结果 : ",res);
|
||||||
console.log("获取标签列表 结果 : ",res.status);
|
console.log("获取标签列表 结果 : ",res.status);
|
||||||
@@ -433,6 +436,22 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleRelTableChange = (pagination, filters, sorter) => {
|
||||||
|
if (sorter.field === 'useCount') {
|
||||||
|
// 处理排序逻辑
|
||||||
|
console.log('REL排序字段:', sorter.field, '排序方式:', sorter.order);
|
||||||
|
if (sorter.order === 'ascend') {
|
||||||
|
state.searchParam.order = 'asc';
|
||||||
|
} else if (sorter.order === 'descend') {
|
||||||
|
state.searchParam.order = 'desc';
|
||||||
|
} else {
|
||||||
|
state.searchParam.order = null;
|
||||||
|
}
|
||||||
|
getCourseListByTag();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// 改变公共显示状态
|
// 改变公共显示状态
|
||||||
const handlePublicChange = async (record) => {
|
const handlePublicChange = async (record) => {
|
||||||
const originalStatus = record.isPublic;
|
const originalStatus = record.isPublic;
|
||||||
@@ -443,7 +462,8 @@ export default {
|
|||||||
changeTagPublic(record.id).then ((res) => {
|
changeTagPublic(record.id).then ((res) => {
|
||||||
console.log("更新公共显示 结果 : ",res);
|
console.log("更新公共显示 结果 : ",res);
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
message.success('更新成功');
|
console.log("更新成功");
|
||||||
|
// message.success('更新成功');
|
||||||
}else {
|
}else {
|
||||||
message.success('更新失败');
|
message.success('更新失败');
|
||||||
}
|
}
|
||||||
@@ -458,18 +478,12 @@ export default {
|
|||||||
const handleHotChange = async (record) => {
|
const handleHotChange = async (record) => {
|
||||||
const originalStatus = record.isHot;
|
const originalStatus = record.isHot;
|
||||||
try {
|
try {
|
||||||
/*const res = await apiCourseTag.changeTagHot(record);
|
|
||||||
if (res.status === 200) {
|
|
||||||
message.success(res.message);
|
|
||||||
} else {
|
|
||||||
record.isHot = false;
|
|
||||||
message.warning(res.message);
|
|
||||||
}*/
|
|
||||||
console.log("修改热点 参数 : ",record);
|
console.log("修改热点 参数 : ",record);
|
||||||
changeTagHot(record.id).then ((res) => {
|
changeTagHot(record.id).then ((res) => {
|
||||||
console.log("修改热点 结果 : ",res);
|
console.log("修改热点 结果 : ",res);
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
message.success(res.message);
|
// message.success(res.message);
|
||||||
|
console.log("更新成功");
|
||||||
}else {
|
}else {
|
||||||
record.isHot = false;
|
record.isHot = false;
|
||||||
message.warning(res.message);
|
message.warning(res.message);
|
||||||
@@ -483,6 +497,7 @@ export default {
|
|||||||
|
|
||||||
// 显示关联课程
|
// 显示关联课程
|
||||||
const showCourseByTagg = async (tagId) => {
|
const showCourseByTagg = async (tagId) => {
|
||||||
|
console.log("--- showCourseByTagg tagId : ",tagId);
|
||||||
state.courseDialogVisible = true;
|
state.courseDialogVisible = true;
|
||||||
state.courseSearchParam.id = tagId;
|
state.courseSearchParam.id = tagId;
|
||||||
state.courseSearchParam.pageNo = 1;
|
state.courseSearchParam.pageNo = 1;
|
||||||
@@ -491,24 +506,16 @@ export default {
|
|||||||
|
|
||||||
// 获取关联课程列表
|
// 获取关联课程列表
|
||||||
const getCourseListByTag = async () => {
|
const getCourseListByTag = async () => {
|
||||||
|
console.log("--- getCourseListByTag --");
|
||||||
state.courseTableLoading = true;
|
state.courseTableLoading = true;
|
||||||
try {
|
try {
|
||||||
const params = {
|
const params = {
|
||||||
pageNo: state.courseSearchParam.pageNo,
|
pageNo: state.courseSearchParam.pageNo,
|
||||||
pageSize: state.courseSearchParam.pageSize,
|
pageSize: state.courseSearchParam.pageSize,
|
||||||
id: state.courseSearchParam.id
|
id: state.courseSearchParam.id,
|
||||||
|
orders: state.searchParam.order || null
|
||||||
};
|
};
|
||||||
|
|
||||||
/*const res = await apiCourseTag.showCourseByTag(params);
|
|
||||||
if (res.status === 200) {
|
|
||||||
state.courseTableData = res.result?.list || [];
|
|
||||||
state.courseTableTotal = res.result?.count || 0;
|
|
||||||
|
|
||||||
if (state.courseTableTotal === 0) {
|
|
||||||
state.courseDialogVisible = false;
|
|
||||||
getTagList();
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
showCourseByTag(params).then ((res) => {
|
showCourseByTag(params).then ((res) => {
|
||||||
console.log("showCourseByTag 结果 : ",res);
|
console.log("showCourseByTag 结果 : ",res);
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
@@ -516,6 +523,7 @@ export default {
|
|||||||
state.courseTableTotal = res.data.data.total || 0;
|
state.courseTableTotal = res.data.data.total || 0;
|
||||||
if (state.courseTableTotal === 0) {
|
if (state.courseTableTotal === 0) {
|
||||||
state.courseDialogVisible = false;
|
state.courseDialogVisible = false;
|
||||||
|
console.log("--- showCourseByTag 调用 getTagList --");
|
||||||
getTagList();
|
getTagList();
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
@@ -543,18 +551,6 @@ export default {
|
|||||||
// 解绑标签
|
// 解绑标签
|
||||||
const unbindCurrentTag = async (record) => {
|
const unbindCurrentTag = async (record) => {
|
||||||
try {
|
try {
|
||||||
/* const params = {
|
|
||||||
id: record.id,
|
|
||||||
tagId: state.courseSearchParam.id,
|
|
||||||
courseId: record.courseId
|
|
||||||
};*/
|
|
||||||
|
|
||||||
/*const res = await apiCourseTag.unbindCourseTagRelation(params);
|
|
||||||
if (res.status === 200) {
|
|
||||||
message.success('解绑成功');
|
|
||||||
getCourseListByTag();
|
|
||||||
getTagList(); // 刷新主列表
|
|
||||||
}*/
|
|
||||||
unbindCourseTagRelation(record.id).then ((res) => {
|
unbindCourseTagRelation(record.id).then ((res) => {
|
||||||
console.log("解绑 结果 : ",res);
|
console.log("解绑 结果 : ",res);
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
@@ -618,6 +614,7 @@ export default {
|
|||||||
searchReset,
|
searchReset,
|
||||||
changePagination,
|
changePagination,
|
||||||
handleTableChange,
|
handleTableChange,
|
||||||
|
handleRelTableChange,
|
||||||
handlePublicChange,
|
handlePublicChange,
|
||||||
handleHotChange,
|
handleHotChange,
|
||||||
showCourseByTag,
|
showCourseByTag,
|
||||||
|
|||||||
Reference in New Issue
Block a user