| | |
| | | identitySummary: string |
| | | changesSummary: string | null |
| | | reason: string |
| | | overrides: Array<{ |
| | | overrides?: Array<{ |
| | | stableIdentity: string |
| | | fieldValues: string | null |
| | | deleted: boolean |
| | |
| | | const physicalIds = ids |
| | | let result: { value: string } |
| | | try { |
| | | result = await ElMessageBox.prompt(`确认从当前有效视图移除 ${ids.length} 条${activeTab.value}数据?原始设备数据仍会保留。`, '移除数据', { inputPlaceholder: '请输入移除原因', inputValidator: value => (value.trim() ? true : '移除原因不能为空') }) |
| | | result = await ElMessageBox.prompt(`确认物理删除 ${ids.length} 条${activeTab.value}数据?删除前内容会写入数据修订记录。`, '物理删除数据', { inputPlaceholder: '请输入删除原因', inputValidator: value => (value.trim() ? true : '删除原因不能为空') }) |
| | | } catch { |
| | | return |
| | | } |
| | | try { |
| | | await submitConsoleDataAction(props.testId, { dataType: dataType.value, operationType: 'DELETE', scopeSummary: `从当前有效视图移除${ids.length}条${activeTab.value}数据`, identitySummary: JSON.stringify(physicalIds), changesSummary: null, reason: result.value.trim(), overrides: physicalIds.map(stableIdentity => ({ stableIdentity, fieldValues: null, deleted: true })) }) |
| | | await submitConsoleDataAction(props.testId, { dataType: dataType.value, operationType: 'DELETE', scopeSummary: `物理删除${ids.length}条${activeTab.value}数据`, identitySummary: JSON.stringify(physicalIds), changesSummary: null, reason: result.value.trim() }) |
| | | if (activeTab.value === 'realtime') rows.value = rows.value.filter(row => !ids.includes(row.id)) |
| | | else if (activeTab.value === 'step') stepRows.value = stepRows.value.filter(row => !physicalIds.includes(row.id)) |
| | | else cycleRows.value = cycleRows.value.filter(row => !ids.includes(row.id)) |