feat:项目管理-取证单-优化取证单生成、取证单项目名称
This commit is contained in:
@@ -343,7 +343,7 @@
|
||||
// 直接将后端返回的数据映射到表单字段
|
||||
form.caseIndex =
|
||||
props.baseInfo?.caseIndex || props.project?.caseIndex || form.caseIndex || '';
|
||||
form.projectName = evidenceData.projectName || form.projectName || '';
|
||||
form.projectName = props.project?.code || evidenceData.projectName || form.projectName || '';
|
||||
form.auditedTarget =
|
||||
evidenceData.auditedTarget || form.auditedTarget || '';
|
||||
form.auditMatter = evidenceData.auditMatter || form.auditMatter || '';
|
||||
|
||||
@@ -945,9 +945,22 @@
|
||||
// 获取当前表格的生成数据
|
||||
const generationData = getTableGenerationData(tableKey);
|
||||
|
||||
// 构建history参数,使用当前表格的responseData内容
|
||||
// 检查是否有选中的行,如果有则只使用选中行的数据
|
||||
const selectedRows = selectedRowsMap[sectionIndex] || [];
|
||||
|
||||
// 构建history参数
|
||||
let historyData = '';
|
||||
if (generationData && generationData.responseData) {
|
||||
if (selectedRows.length > 0) {
|
||||
// 有选中行时,只传入选中行的数据
|
||||
const selectedData = {
|
||||
success: true,
|
||||
data: selectedRows,
|
||||
total: selectedRows.length,
|
||||
message: `已选择${selectedRows.length}条记录生成取证单`
|
||||
};
|
||||
historyData = JSON.stringify(selectedData, null, 2);
|
||||
} else if (generationData && generationData.responseData) {
|
||||
// 没有选中行时,使用原有逻辑(整个表格数据)
|
||||
historyData = JSON.stringify(generationData.responseData, null, 2);
|
||||
} else if (section.data && section.data.length > 0) {
|
||||
// 如果没有生成数据,使用当前表格数据
|
||||
|
||||
Reference in New Issue
Block a user