From 360b31142a56517e94b8f5100cf60823b48f7008 Mon Sep 17 00:00:00 2001 From: Pengxiansen <2422914688@qq.com> Date: Thu, 27 Feb 2025 14:46:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../growthpath/GrowthFaceTaskManage.vue | 25 ++++++++++++------- .../growthpath/GrowthOnlineManage.vue | 23 +++++++++++------ 2 files changed, 31 insertions(+), 17 deletions(-) diff --git a/src/components/growthpath/GrowthFaceTaskManage.vue b/src/components/growthpath/GrowthFaceTaskManage.vue index 09ebcfe1..e0f0ec33 100644 --- a/src/components/growthpath/GrowthFaceTaskManage.vue +++ b/src/components/growthpath/GrowthFaceTaskManage.vue @@ -556,18 +556,25 @@ function exportTaskStu() { } const hasten = () => { - if(!tableRef.value.data || !tableRef.value.data.length){ + if (!tableRef.value.data || !tableRef.value.data.length) { message.warning("当前课程没有可催促的学员"); - return + return; } - batchSendMessage({ - // courseId: props.datasource.courseId,//任务的Id - courseId: data.value[coursePlanIndex.value].id, //任务的Id - courseName: props.datasource.taskName, //任务的名称 - logo: 3, //项目或径的标识 1-项目 2-路径图 3面授课 - taskType: props.datasource.taskType, //催促的任务的类型 + dialog({ + content: "是否催促全部未完成学习任务的学员进行学习?", + ok: async () => { + batchSendMessage({ + // courseId: props.datasource.courseId,//任务的Id + courseId: data.value[coursePlanIndex.value].id, //任务的Id + courseName: props.datasource.taskName, //任务的名称 + logo: 3, //项目或径的标识 1-项目 2-路径图 3面授课 + taskType: props.datasource.taskType, //催促的任务的类型 + }).then((res) => { + console.log(res); + message.success("催促成功"); + }); + }, }); - message.success("催促成功"); }; function afterVisibleChange(bool) { diff --git a/src/components/growthpath/GrowthOnlineManage.vue b/src/components/growthpath/GrowthOnlineManage.vue index 6c180db5..96843df5 100644 --- a/src/components/growthpath/GrowthOnlineManage.vue +++ b/src/components/growthpath/GrowthOnlineManage.vue @@ -158,6 +158,7 @@ import { } from "@/api/growthpath"; import * as api from "@/api/index1"; +import dialog from "@/utils/dialog"; import { TASK_TYPE } from "@/utils/constGrown"; import PostSelectNew from "@/components/growthpath/PostSelect"; import OfficeSelect from "@/components/growthpath/OfficeSelect"; @@ -480,6 +481,7 @@ export default { message.warning("当前学习任务没有可催促的学员"); return; } + var obj = { courseId: props.datasource.taskId ? props.datasource.taskId @@ -489,14 +491,19 @@ export default { taskType: props.datasource.taskType, //催促的任务的类型 growthId: props.datasource.growthId, }; - batchSendMessage(obj) - .then((res) => { - console.log(res); - message.success("催促学员成功"); - }) - .catch((err) => { - console.log(err); - }); + dialog({ + content: "是否催促全部未完成学习任务的学员进行学习?", + ok: async () => { + batchSendMessage(obj) + .then((res) => { + console.log(res); + message.success("催促学员成功"); + }) + .catch((err) => { + console.log(err); + }); + }, + }); }; const onChange = (pageNumber) => { console.log("Page: ", pageNumber);