交办、整改责任人修改
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)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -72,6 +72,10 @@
|
||||
<view class="card-body">
|
||||
<!-- 提交 -->
|
||||
<block v-if="item.type === 'submit'">
|
||||
<view class="detail-row">
|
||||
<text class="label">隐患编号</text>
|
||||
<text class="value">{{ item.content.code }}</text>
|
||||
</view>
|
||||
<view class="detail-row">
|
||||
<text class="label">隐患标题</text>
|
||||
<text class="value">{{ item.content.title }}</text>
|
||||
@@ -80,6 +84,10 @@
|
||||
<text class="label">检查形式</text>
|
||||
<text class="value">{{ item.content.source }}</text>
|
||||
</view>
|
||||
<view class="detail-row">
|
||||
<text class="label">隐患来源</text>
|
||||
<text class="value">{{ item.content.hazardSourceName }}</text>
|
||||
</view>
|
||||
<view class="detail-row">
|
||||
<text class="label">隐患区域</text>
|
||||
<view class="value value--inline">
|
||||
|
||||
@@ -80,6 +80,10 @@
|
||||
<view class="card-body">
|
||||
<!-- 提交 -->
|
||||
<block v-if="item.type === 'submit'">
|
||||
<view class="detail-row-v2">
|
||||
<text class="label">隐患编号</text>
|
||||
<text class="value">{{ item.content.code }}</text>
|
||||
</view>
|
||||
<view class="detail-row-v2">
|
||||
<text class="label">隐患标题</text>
|
||||
<text class="value">{{ item.content.title }}</text>
|
||||
@@ -88,6 +92,10 @@
|
||||
<text class="label">检查形式</text>
|
||||
<text class="value">{{ item.content.source }}</text>
|
||||
</view>
|
||||
<view class="detail-row-v2">
|
||||
<text class="label">隐患来源</text>
|
||||
<text class="value">{{ item.content.hazardSourceName }}</text>
|
||||
</view>
|
||||
<view class="detail-row-v2">
|
||||
<text class="label">隐患区域</text>
|
||||
<view class="value value--inline">
|
||||
|
||||
@@ -180,8 +180,10 @@ export function generateHazardHistory(data) {
|
||||
operator: data.reporterName || '-',
|
||||
time: data.createdAt || '-',
|
||||
content: {
|
||||
code: data.code || '-',
|
||||
title: data.title || '-',
|
||||
source: data.source || '-',
|
||||
hazardSourceName: data.hazardSourceName || '-',
|
||||
areaName: data.areaName || '-',
|
||||
areaColor: data.areaColor || '',
|
||||
address: data.address || '-',
|
||||
@@ -260,10 +262,13 @@ export const MOCK_HAZARD_DETAIL = {
|
||||
reporterPhone: '13800138000',
|
||||
reportDeptName: '安全管理部',
|
||||
createdAt: '2026-06-01 09:30:00',
|
||||
code: '2026U1SL',
|
||||
title: '消防通道堆放杂物',
|
||||
level: 2,
|
||||
levelName: '一般隐患',
|
||||
source: '部门检查',
|
||||
hazardSource: 1,
|
||||
hazardSourceName: '本单位检查发现',
|
||||
areaName: '生产车间A区',
|
||||
areaColor: '#409EFF',
|
||||
address: '办公楼3层东侧消防通道',
|
||||
|
||||
Reference in New Issue
Block a user