UPDATE: 1、优化

This commit is contained in:
贾同学
2025-10-22 15:02:49 +08:00
parent 5ec688a659
commit d5a2db5cd0
2 changed files with 27 additions and 21 deletions

View File

@@ -684,9 +684,11 @@ const exportPlan = async () => {
const params = { const params = {
id: subPlanFormContent.id id: subPlanFormContent.id
} }
ElMessageBox.confirm(`确认导出${subPlanFormContent.name}子计划元信息?`, '温馨提示', { type: 'warning' }).then(() => ElMessageBox.confirm(`确认导出${subPlanFormContent.name}子计划元信息?`, '温馨提示', {
useDownload(exportSubPlan, `${subPlanFormContent.name}_子计划元信息`, params, false, '.zip') type: 'warning',
) confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(() => useDownload(exportSubPlan, `${subPlanFormContent.name}_子计划元信息`, params, false, '.zip'))
} }
const exportPlanCheckResultData = async (selectedListIds: string[]) => { const exportPlanCheckResultData = async (selectedListIds: string[]) => {

View File

@@ -7,7 +7,6 @@
align-center align-center
v-bind="dialogBig" v-bind="dialogBig"
@close="close" @close="close"
> >
<el-form ref="dialogFormRef" :model="formContent" :rules="rules"> <el-form ref="dialogFormRef" :model="formContent" :rules="rules">
<el-row :gutter="24"> <el-row :gutter="24">
@@ -366,7 +365,6 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-collapse-item> </el-collapse-item>
</el-collapse> </el-collapse>
@@ -672,15 +670,24 @@ const save = () => {
if (planType.value == 1) { if (planType.value == 1) {
formContent.fatherPlanId = formContent.id formContent.fatherPlanId = formContent.id
formContent.id = '' formContent.id = ''
formContent.memberIds = formContent.memberIds ? [formContent.memberIds?.toString()] : [] formContent.memberIds =
formContent.memberIds && formContent.memberIds.length > 0
? typeof formContent.memberIds === 'string'
? [formContent.memberIds]
: formContent.memberIds.map(id => id.toString())
: []
await addPlan(formContent) await addPlan(formContent)
emit('update:tab') emit('update:tab')
// 编辑子计划 // 编辑子计划
} else if (planType.value == 2) { } else if (planType.value == 2) {
formContent.memberIds = formContent.memberIds ? [formContent.memberIds?.toString()] : [] formContent.memberIds =
formContent.memberIds && formContent.memberIds.length > 0
? typeof formContent.memberIds === 'string'
? [formContent.memberIds]
: formContent.memberIds.map(id => id.toString())
: []
await updatePlan(formContent) await updatePlan(formContent)
emit('update:tab') emit('update:tab')
} else { } else {
formContent.sourceIds = null formContent.sourceIds = null
await updatePlan(formContent) await updatePlan(formContent)
@@ -754,7 +761,7 @@ const open = async (sign: string, data: Plan.ReqPlan, currentMode: string, plan:
user_Result: any user_Result: any
if (mode.value === '比对式') { if (mode.value === '比对式') {
[ ;[
PqErrSys_Result, PqErrSys_Result,
pqDevList_Result, pqDevList_Result,
pqReportName_Result, pqReportName_Result,
@@ -794,7 +801,7 @@ const open = async (sign: string, data: Plan.ReqPlan, currentMode: string, plan:
} }
} }
} else { } else {
[pqSource_Result, PqScript_Result, PqErrSys_Result, pqDevList_Result, pqReportName_Result] = ;[pqSource_Result, PqScript_Result, PqErrSys_Result, pqDevList_Result, pqReportName_Result] =
await Promise.all([ await Promise.all([
getTestSourceList(data), getTestSourceList(data),
getPqScriptList(data), getPqScriptList(data),
@@ -907,7 +914,7 @@ const open = async (sign: string, data: Plan.ReqPlan, currentMode: string, plan:
} }
} }
} else { } else {
[ ;[
pqSource_Result, pqSource_Result,
PqScript_Result, PqScript_Result,
PqErrSys_Result, PqErrSys_Result,
@@ -1235,7 +1242,6 @@ const props = defineProps<{
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
// :deep(.dialog-small .el-dialog__body){ // :deep(.dialog-small .el-dialog__body){
// max-height: 330px !important; // max-height: 330px !important;
// } // }
@@ -1254,6 +1260,4 @@ const props = defineProps<{
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
</style> </style>