优化混炼示方日志记录逻辑,直接从入参构建快照以减少数据库查询,提高性能与效率。

This commit is contained in:
geht
2026-05-27 17:38:55 +08:00
parent d2c1d4443b
commit f3e0ffca4c
5 changed files with 56 additions and 20 deletions

View File

@@ -103,6 +103,14 @@ export const formSchema: FormSchema[] = [
{ label: '', field: 'id', component: 'Input', show: false },
sectionDivider('基本信息', 'dividerBasic'),
{
label: '标题',
field: 'title',
component: 'Input',
colProps: { span: 24 },
componentProps: { placeholder: '请输入标题', allowClear: true },
dynamicRules: () => [{ required: true, message: '请输入标题' }],
},
{
label: 'PS编码',
field: 'psCode',
@@ -136,6 +144,7 @@ export const formSchema: FormSchema[] = [
field: 'status',
component: 'JDictSelectTag',
defaultValue: 'compile',
show: false,
componentProps: { dictCode: 'xslmes_mixer_ps_status', disabled: true },
colProps: colHalf,
},
@@ -143,6 +152,7 @@ export const formSchema: FormSchema[] = [
label: '编制人',
field: 'compileBy',
component: 'Input',
show: false,
componentProps: { disabled: true, bordered: false, placeholder: '保存后按创建人显示' },
colProps: colHalf,
},
@@ -153,14 +163,6 @@ export const formSchema: FormSchema[] = [
colProps: colHalf,
componentProps: { placeholder: '请输入担当', allowClear: true },
},
{
label: '标题',
field: 'title',
component: 'Input',
colProps: { span: 24 },
componentProps: { placeholder: '请输入标题', allowClear: true },
dynamicRules: () => [{ required: true, message: '请输入标题' }],
},
sectionDivider('组织与部门', 'dividerDept'),
{

View File

@@ -32,7 +32,7 @@
const statusDictCode = ref('xslmes_mixer_ps_status');
const [registerForm, { setProps, resetFields, setFieldsValue, validate, scrollToField, updateSchema }] = useForm({
labelWidth: 96,
labelWidth: 88,
schemas: formSchema,
showActionButtonGroup: false,
baseColProps: { span: 24 },
@@ -166,7 +166,25 @@
margin-bottom: 14px;
}
:deep(#MesXslMixerPsCompileForm_compileBy),
:deep(.ant-form-item-label) {
flex: 0 0 88px !important;
min-width: 88px !important;
max-width: 88px !important;
width: 88px !important;
padding-right: 8px !important;
box-sizing: border-box !important;
text-align: right;
overflow: hidden;
white-space: nowrap;
}
:deep(.ant-form-item-control) {
flex: 1 1 0% !important;
min-width: 0 !important;
max-width: 100% !important;
width: auto !important;
}
:deep(#MesXslMixerPsCompileForm_proofreadBy),
:deep(#MesXslMixerPsCompileForm_proofreadTime),
:deep(#MesXslMixerPsCompileForm_auditBy),

View File

@@ -1039,8 +1039,7 @@ async function applyMixingSpecPageData(row: Recordable, mode: 'edit' | 'referenc
} else {
refreshSignDisplay(pageData || {});
}
await loadMachineEffectiveVolume(sheetForm.machineId);
await loadMixerStepOptions(sheetForm.machineId);
await Promise.all([loadMachineEffectiveVolume(sheetForm.machineId), loadMixerStepOptions(sheetForm.machineId)]);
await syncSheetToForm();
materialData.value = ensureMixingDetailRows(pageData?.materialList || [], DEFAULT_MIXING_MATERIAL_ROW_COUNT);
convertFactorApplying.value = true;