mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-15 22:06:45 +08:00
fix: 模板库没有阶段时默认查询阶段0的任务数据
This commit is contained in:
@@ -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) )
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -281,7 +281,7 @@
|
||||
|
||||
<div class="footbtn">
|
||||
<div class="btnbox">
|
||||
<a-button class="btn btn2" @click="submitStorage" :loading="templateLoading">确定</a-button>
|
||||
<a-button class="btn btn2" @click="submitStorage" :loading="templateLoading">确定11</a-button>
|
||||
<a-button class="btn btn1" @click="cancelStorage" :loading="cancleLoading">取消</a-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -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
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user