From c91ff667cb42a5e831c0e56581125cb83ed7f1d6 Mon Sep 17 00:00:00 2001 From: songwc Date: Thu, 3 Nov 2022 11:54:13 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E6=B7=BB=E5=8A=A0=E7=9B=B4?= =?UTF-8?q?=E6=92=AD=E5=90=8E=E5=8A=A0=E8=BD=BD=E5=88=B0=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/drawers/AddLive.vue | 42 +++--- src/views/projectcenter/TaskAdd.vue | 212 ++++++++++++++++------------ 2 files changed, 142 insertions(+), 112 deletions(-) diff --git a/src/components/drawers/AddLive.vue b/src/components/drawers/AddLive.vue index 05430945..c75feeb4 100644 --- a/src/components/drawers/AddLive.vue +++ b/src/components/drawers/AddLive.vue @@ -290,7 +290,7 @@ import { message } from "ant-design-vue"; import * as api from "../../api/indexLiveBroadcast"; import * as apiTask from "../../api/indexTaskadd"; import { toDate } from "@/api/method"; - +// import { useRouter } from "vue-router"; function getBase64(img, callback) { const reader = new FileReader(); reader.addEventListener("load", () => callback(reader.result)); @@ -373,6 +373,7 @@ export default { }, }, setup(props, ctx) { + // const router = useRouter(); const state = reactive({ tableData1: [ { @@ -611,29 +612,32 @@ export default { message.success("提交成功"); closeDrawer(); + apiTask + .addTask({ + courseId: 0, + duration: 0, + flag: true, + name: "", + projectId: 28, + projectTaskId: 0, + stageId: 3, + type: 0, + }) + .then((res) => { + console.log("调用项目添加接口后", res.data); + //重新获取任务列表 + // apiTask.getTask({ projectId: 28 }); + // router.push("/taskadd"); + }) + .catch((err) => { + console.log(err); + }); + // state = {} }) .catch((err) => { console.log(err, 2222); }); - - apiTask - .addTask({ - courseId: 0, - duration: 0, - flag: true, - name: "", - projectId: 22, - projectTaskId: 0, - stageId: 0, - type: 0, - }) - .then((res) => { - console.log("调用项目添加接口后", res.data); - }) - .catch((err) => { - console.log(err); - }); }; //添加任务到数据库 diff --git a/src/views/projectcenter/TaskAdd.vue b/src/views/projectcenter/TaskAdd.vue index 23f3f026..393f92f2 100644 --- a/src/views/projectcenter/TaskAdd.vue +++ b/src/views/projectcenter/TaskAdd.vue @@ -522,7 +522,7 @@