mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-07 01:46:43 +08:00
解绑
This commit is contained in:
@@ -18,11 +18,11 @@ export const changeTagPublic = (id = {}) => http.post(`/admin/courseTag/changePu
|
|||||||
export const changeTagHot = (id = {}) => http.post(`/admin/courseTag/changeHotStatus`, id);
|
export const changeTagHot = (id = {}) => http.post(`/admin/courseTag/changeHotStatus`, id);
|
||||||
|
|
||||||
//查询指定id的标签关联的所有课程
|
//查询指定id的标签关联的所有课程
|
||||||
export const showCourseByTag = (obj = {}) => http.post(`/admin/courseTag/showCourseByTag`, {params: obj});
|
export const showCourseByTag = (obj = {}) => http.get(`/admin/courseTag/showCourseByTag`, {params: obj});
|
||||||
|
|
||||||
|
|
||||||
//解除指定id的课程和某个标签之间的关联关系
|
//解除指定id的课程和某个标签之间的关联关系
|
||||||
export const unbindCourseTagRelation = (params = {}) => http.post(`/admin/courseTag/unbind`, params);
|
export const unbindCourseTagRelation = (id = {}) => http.post(`/admin/courseTag/unbind`, id);
|
||||||
|
|
||||||
//编辑课程:标签模糊查询
|
//编辑课程:标签模糊查询
|
||||||
export const searchTags = (params = {}) => http.post(`/admin/courseTag/searchTags`, params);
|
export const searchTags = (params = {}) => http.post(`/admin/courseTag/searchTags`, params);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<!-- 搜索框及按钮 -->
|
<!-- 搜索框及按钮 -->
|
||||||
<div class="filter">
|
<div class="filter">
|
||||||
<div class="filterItems">
|
<div class="filterItems">
|
||||||
<div class="select">
|
<!-- <div class="select">
|
||||||
<a-input
|
<a-input
|
||||||
v-model:value="searchParam.id"
|
v-model:value="searchParam.id"
|
||||||
style="width: 270px; height: 40px; border-radius: 8px"
|
style="width: 270px; height: 40px; border-radius: 8px"
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
showSearch
|
showSearch
|
||||||
>
|
>
|
||||||
</a-input>
|
</a-input>
|
||||||
</div>
|
</div>-->
|
||||||
<div class="select">
|
<div class="select">
|
||||||
<a-input
|
<a-input
|
||||||
v-model:value="searchParam.tagName"
|
v-model:value="searchParam.tagName"
|
||||||
@@ -210,7 +210,8 @@ export default {
|
|||||||
id: null,
|
id: null,
|
||||||
tagName: null,
|
tagName: null,
|
||||||
isHot: null,
|
isHot: null,
|
||||||
isPublic: null
|
isPublic: null,
|
||||||
|
order: null
|
||||||
},
|
},
|
||||||
|
|
||||||
courseSearchParam: {
|
courseSearchParam: {
|
||||||
@@ -362,7 +363,8 @@ export default {
|
|||||||
id: state.searchParam.id || null,
|
id: state.searchParam.id || null,
|
||||||
tagName: state.searchParam.tagName || null,
|
tagName: state.searchParam.tagName || null,
|
||||||
isHot: state.searchParam.isHot || null,
|
isHot: state.searchParam.isHot || null,
|
||||||
isPublic: state.searchParam.isPublic || null
|
isPublic: state.searchParam.isPublic || null,
|
||||||
|
orders: state.searchParam.order || null
|
||||||
};
|
};
|
||||||
console.log("获取标签列表 参数 : ",params);
|
console.log("获取标签列表 参数 : ",params);
|
||||||
// const res = await portalPageList(params);
|
// const res = await portalPageList(params);
|
||||||
@@ -420,6 +422,14 @@ export default {
|
|||||||
if (sorter.field === 'useCount') {
|
if (sorter.field === 'useCount') {
|
||||||
// 处理排序逻辑
|
// 处理排序逻辑
|
||||||
console.log('排序字段:', sorter.field, '排序方式:', sorter.order);
|
console.log('排序字段:', 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;
|
||||||
|
}
|
||||||
|
getTagList();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -502,8 +512,8 @@ export default {
|
|||||||
showCourseByTag(params).then ((res) => {
|
showCourseByTag(params).then ((res) => {
|
||||||
console.log("showCourseByTag 结果 : ",res);
|
console.log("showCourseByTag 结果 : ",res);
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
state.courseTableData = res.result?.list || [];
|
state.courseTableData = res.data.data.records || [];
|
||||||
state.courseTableTotal = res.result?.count || 0;
|
state.courseTableTotal = res.data.data.total || 0;
|
||||||
if (state.courseTableTotal === 0) {
|
if (state.courseTableTotal === 0) {
|
||||||
state.courseDialogVisible = false;
|
state.courseDialogVisible = false;
|
||||||
getTagList();
|
getTagList();
|
||||||
@@ -533,11 +543,11 @@ export default {
|
|||||||
// 解绑标签
|
// 解绑标签
|
||||||
const unbindCurrentTag = async (record) => {
|
const unbindCurrentTag = async (record) => {
|
||||||
try {
|
try {
|
||||||
const params = {
|
/* const params = {
|
||||||
id: record.id,
|
id: record.id,
|
||||||
tagId: state.courseSearchParam.id,
|
tagId: state.courseSearchParam.id,
|
||||||
courseId: record.courseId
|
courseId: record.courseId
|
||||||
};
|
};*/
|
||||||
|
|
||||||
/*const res = await apiCourseTag.unbindCourseTagRelation(params);
|
/*const res = await apiCourseTag.unbindCourseTagRelation(params);
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
@@ -545,7 +555,7 @@ export default {
|
|||||||
getCourseListByTag();
|
getCourseListByTag();
|
||||||
getTagList(); // 刷新主列表
|
getTagList(); // 刷新主列表
|
||||||
}*/
|
}*/
|
||||||
unbindCourseTagRelation(params).then ((res) => {
|
unbindCourseTagRelation(record.id).then ((res) => {
|
||||||
console.log("解绑 结果 : ",res);
|
console.log("解绑 结果 : ",res);
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
message.success('解绑成功');
|
message.success('解绑成功');
|
||||||
|
|||||||
Reference in New Issue
Block a user