交办、整改责任人修改

This commit is contained in:
王利强
2026-06-30 09:47:10 +08:00
parent d4897284e8
commit 455fd4fc07
638 changed files with 5153 additions and 2572 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -27,6 +27,8 @@ export function createEmptyHazardPayload() {
title: '',
level: 0,
source: 0,
hazardSourceCode: null,
hazardSourceName: '',
description: '',
tagIndex: 0,
tagId: null,
@@ -56,6 +58,7 @@ export function buildHiddenDangerParams(payload, extra = {}) {
areaId: areaId || null,
description: formData.description || '',
source: SOURCE_OPTIONS[formData.source]?.title || '',
hazardSource: formData.hazardSourceCode ?? null,
tagId,
attachments: (fileList || [])
.filter((f) => f.status === 'success')
@@ -70,3 +73,21 @@ export function hasValidHazardPayload(payload) {
const { formData, fileList } = payload;
return !!(formData?.title && fileList?.length > 0);
}
export function hasHazardFormContent(payload) {
if (!payload) return false;
const data = payload.formData || {};
const files = payload.fileList || [];
return !!(
data.title ||
data.description ||
data.regulationName ||
data.regulationId ||
data.hazardSourceCode != null ||
data.hazardSourceName ||
payload.address ||
payload.areaId ||
payload.areaName ||
(files.length > 0)
);
}