fix(缺陷管理): 修复缺陷管理转存不更新&菜单管理缺陷状态错误问题

This commit is contained in:
xinxin.wu 2024-04-12 14:24:27 +08:00 committed by 刘瑞斌
parent 269ab99ac5
commit a36044ee16
4 changed files with 19 additions and 4 deletions

View File

@ -127,7 +127,7 @@
:is-platform-default-template="isPlatformDefaultTemplate" :is-platform-default-template="isPlatformDefaultTemplate"
:platform-system-fields="platformSystemFields" :platform-system-fields="platformSystemFields"
:current-platform="props.currentPlatform" :current-platform="props.currentPlatform"
@update-success="updateSuccess" @update-success="detailDrawerRef?.initDetail()"
/> />
<BugCaseTab <BugCaseTab

View File

@ -104,11 +104,19 @@
} }
} }
async function initFileTree() {
try {
transCategory.value = await getTransferFileTree(currentProjectId.value);
} catch (error) {
console.log(error);
}
}
watch( watch(
() => props.visible, () => props.visible,
async (val) => { async (val) => {
if (val) { if (val) {
transCategory.value = await getTransferFileTree(currentProjectId.value); initFileTree();
} }
} }
); );

View File

@ -187,6 +187,7 @@
const emit = defineEmits<{ const emit = defineEmits<{
(e: 'cancel', shouldSearch: boolean): void; (e: 'cancel', shouldSearch: boolean): void;
(e: 'ok');
}>(); }>();
const resetForm = () => { const resetForm = () => {
@ -232,6 +233,7 @@
await postSaveDefectSync({ ...form, BUG_PLATFORM_CONFIG: JSON.stringify(formData) }, currentProjectId.value); await postSaveDefectSync({ ...form, BUG_PLATFORM_CONFIG: JSON.stringify(formData) }, currentProjectId.value);
Message.success(t('common.createSuccess')); Message.success(t('common.createSuccess'));
handleCancel(true); handleCancel(true);
emit('ok');
} catch (error) { } catch (error) {
// eslint-disable-next-line no-console // eslint-disable-next-line no-console
console.error(error); console.error(error);

View File

@ -389,7 +389,7 @@
/> />
</template> </template>
</MsBaseTable> </MsBaseTable>
<DefectSync v-model:visible="defectDrawerVisible" @cancel="defectDrawerVisible = false" /> <DefectSync v-model:visible="defectDrawerVisible" @cancel="defectDrawerVisible = false" @ok="initMenuData()" />
<RelatedCase v-model:visible="relatedCaseDrawerVisible" @cancel="relatedCaseDrawerVisible = false" /> <RelatedCase v-model:visible="relatedCaseDrawerVisible" @cancel="relatedCaseDrawerVisible = false" />
</template> </template>
@ -835,14 +835,19 @@
} }
}; };
onMounted(() => { function initMenuData() {
setLoadListParams({ projectId: currentProjectId.value }); setLoadListParams({ projectId: currentProjectId.value });
fetchData(); fetchData();
initExpendKeys(); initExpendKeys();
}
onMounted(() => {
initMenuData();
}); });
watch(currentProjectId, () => { watch(currentProjectId, () => {
fetchData(); fetchData();
}); });
watch( watch(
() => expandedKeys.value.length, () => expandedKeys.value.length,
(val) => { (val) => {