推荐案例

This commit is contained in:
NiSen
2023-06-23 20:47:46 +08:00
parent fe58d1558b
commit 3dbfa6592c
2 changed files with 34 additions and 16 deletions

View File

@@ -10,6 +10,8 @@ export const isTopList = (data) => http.post('/xboe/m/boe/cases/isTopList', data
})
//下载失败数据
export const downloadErrorData = (params) => http.get('/xboe/m/boe/cases/recommend/download', { params })
//导入失败或成功返回的数据
export const downloadErrorRecords = (params) => http.get('/xboe/m/boe/cases/recommend/import-info', { params })
//案例推荐导入
// export const uploadCaseData = (data, config) => http({
// method: 'POST',
@@ -26,3 +28,5 @@ export const deleteResearch = (params) => http.get("xboe/m/boe/cases/recommend/d
export const caseInfoDownload = (params) => http.get('xboe/m/boe/cases/recommend/info_download', { params })
// 案例撤回接口
export const rePushOrWithdraw = (data) => http.post('xboe/m/boe/cases/recommend/rePushOrWithdraw', data)
// 案例推荐
export const caseRecommend = (data) => http.post('/xboe/m/boe/cases/recommend/launch', data)

View File

@@ -299,12 +299,11 @@ import {
USER_LIST_PAGE,
AUDIENCE_LIST,
} from "@/api/ThirdApi";
import {
recommendLaunch,
} from "@/api/case";
import dialog from "@/utils/dialog";
import BaseTable from "@/components/common/BaseTable";
import { STUDENT_LIST } from "@/api/apis";
// 推荐接口
import { caseRecommend } from '@/api/case'
const emit = defineEmits({});
const props = defineProps({
@@ -362,6 +361,7 @@ const props = defineProps({
},
});
const projectSelectKeys = ref([]);
const projectSelectRows = ref([]);
const stuSelectRows = ref([]);
@@ -575,6 +575,10 @@ const closeChangeModal = () => {
stageVisible.value = false;
};
const openDrawer = () => {
if (!props.id.length) {
message.warning('请选择最少一个案例推送!!!')
return
}
visiable.value = true;
};
@@ -626,7 +630,7 @@ const resetAudienceInfo = () => {
auditTableRef.value.reset({ keyword: "" });
};
//推荐
//推荐按钮
const submitAuth = () => {
if (props.type === 2) {
stageVisible.value = true;
@@ -636,10 +640,15 @@ const submitAuth = () => {
};
function handleDialogOk() {
if (auditSelectRowKeys.value.length || deptList.value.length) {
dialog({ content: "您选择了组织或受众,此添加为异步添加,请稍后手动刷新学员!", ok: handleStageOk });
return;
}
// if (auditSelectRowKeys.value.length || deptList.value.length) {
// dialog({ content: "您选择了组织或受众,此添加为异步添加,请稍后手动刷新学员!", ok: handleStageOk });
// return;
// }
console.log(props.id);
console.log(auditSelectRowKeys.value);
console.log(deptList.value);
handleStageOk();
}
@@ -651,10 +660,15 @@ function handleStageOk() {
visiable.value = false;
emit("finash", false);
nameSearch.value.keyword = "";
// recommendLaunch().then(() => {
// deleteDepSelect();
// emit("finash", true);
// })
caseRecommend({
importId: props.id,
recommendOrgName:''
}).then(() => {
deleteDepSelect();
emit("finash", true);
}).catch(() => {
message.error("推荐失败");
})
// saveStu({
// targetId: props.id,
// type: props.type,