From 81a627e9ea47d0434715506bc44f17ef1463b170 Mon Sep 17 00:00:00 2001 From: caozc Date: Sun, 26 Feb 2023 12:36:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=A8=A1=E6=9D=BF=E5=BA=93=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E9=98=B6=E6=AE=B5=E6=97=B6=E9=BB=98=E8=AE=A4=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E9=98=B6=E6=AE=B50=E7=9A=84=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/projectcenter/TaskAdd.vue | 1 + src/views/projectcenter/temTask.vue | 22 +++++++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/views/projectcenter/TaskAdd.vue b/src/views/projectcenter/TaskAdd.vue index 63ac1f9b..001d836e 100644 --- a/src/views/projectcenter/TaskAdd.vue +++ b/src/views/projectcenter/TaskAdd.vue @@ -442,6 +442,7 @@ function changeStageIndex(index) { const getTask = async () => { await api.getDraftTask({projectId: route.query.projectId}).then((res) => { projectInfo.value = res.data.data + console.log("获取任务列表:" + JSON.stringify(projectInfo.value) ) }); }; diff --git a/src/views/projectcenter/temTask.vue b/src/views/projectcenter/temTask.vue index 4cf30df3..9cfd488f 100644 --- a/src/views/projectcenter/temTask.vue +++ b/src/views/projectcenter/temTask.vue @@ -281,7 +281,7 @@
- 确定 + 确定11 取消
@@ -541,7 +541,16 @@ const cancelModal = ref(false); const deleteStageModal = ref(false); const templateLoading = ref(false); const cancleLoading = ref(false); -const projectInfo = ref({stageList: [{taskTemplateList: [{}]}], projectTemplateInfo: {}}); +const projectInfo = ref({ + stageList: [{ + "id":"0", + taskTemplateList: [{ + }] + }], + projectTemplateInfo: { + + } +}); const activeIndex = ref(0); const moveChapterIndex = ref(0); const deleteIndex = ref(0); @@ -576,6 +585,13 @@ function changeStageIndex(index) { const getTask = async () => { await api.templateEditDetail(route.query.projectId).then((res) => { projectInfo.value = res.data.data + if(projectInfo.value.stageList.length == 0){ + projectInfo.value.stageList = [{ + "id":"0", + taskTemplateList: [] + }] + } + console.log("获取任务列表信息:" + JSON.stringify(projectInfo.value)); }); }; @@ -721,7 +737,7 @@ const closeDeAll = () => { const submitStorage = async () => { templateLoading.value = true await request(PROJECT_TEMPLATE_DETAIL_MODIFY, projectInfo.value) - await getTask() + // await getTask() message.success("保存成功"); templateLoading.value = false };