交办、整改责任人修改
This commit is contained in:
1431
components/hazard/HazardFormPanel.vue
Normal file
1431
components/hazard/HazardFormPanel.vue
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -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)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user