推荐案例

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