推荐案例

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

@@ -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([]);
@@ -377,9 +377,9 @@ const projectParams = ref({ pid: props.infoId, type: props.infoType, studentName
const getProjectStu = () => projectStuTableRef.value.fetch();
const resetProjectStu = () => {
console.log(111);
console.log(props.id);
projectParams.value.studentName = "";
projectStuTableRef.value.reset();
};
@@ -575,12 +575,16 @@ const closeChangeModal = () => {
stageVisible.value = false;
};
const openDrawer = () => {
if (!props.id.length) {
message.warning('请选择最少一个案例推送!!!')
return
}
visiable.value = true;
};
function onSearchStu() {
console.log(props.id);
stuTableRef.value.reset(nameSearch.value);
}
@@ -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,