Compare commits
No commits in common. "81d563036ffe17c4f793ccd9ca8164ea6a0fbce7" and "7352e0ee9c2eb156bfe5d87c49b4bd51300a49db" have entirely different histories.
81d563036f
...
7352e0ee9c
|
|
@ -17,23 +17,16 @@ export default function AttachmentUpload({ name, label, disabled = false, maxCou
|
||||||
if (Array.isArray(value)) {
|
if (Array.isArray(value)) {
|
||||||
return { fileList: value };
|
return { fileList: value };
|
||||||
}
|
}
|
||||||
if (typeof value === "string" && value) {
|
return {
|
||||||
try {
|
fileList: value
|
||||||
const parsed = JSON.parse(value);
|
? value.split(",").map((item) => ({
|
||||||
if (Array.isArray(parsed)) {
|
url: item,
|
||||||
return { fileList: parsed };
|
uid: item,
|
||||||
}
|
status: "done",
|
||||||
} catch {}
|
name: "附件",
|
||||||
return {
|
}))
|
||||||
fileList: value.split(",").map((item) => ({
|
: [],
|
||||||
url: item,
|
};
|
||||||
uid: item,
|
|
||||||
status: "done",
|
|
||||||
name: "附件",
|
|
||||||
})),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return { fileList: [] };
|
|
||||||
}}
|
}}
|
||||||
getValueFromEvent={({ fileList }) => {
|
getValueFromEvent={({ fileList }) => {
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -341,7 +341,11 @@ function OrgInfoPage(props) {
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
|
<Col span={12}>
|
||||||
|
<Form.Item name="safetyDeputyManager" label="主管安全副总">
|
||||||
|
<Input placeholder="请输入主管安全副总" allowClear />
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="safetyDeputyPhone"
|
name="safetyDeputyPhone"
|
||||||
|
|
|
||||||
|
|
@ -35,9 +35,8 @@ export default function FilingListTable({
|
||||||
const statusOptions = getFilingStatusOptions(mode);
|
const statusOptions = getFilingStatusOptions(mode);
|
||||||
|
|
||||||
const canEditRow = (record) => {
|
const canEditRow = (record) => {
|
||||||
|
|
||||||
if (mode === FILING_FORM_MODE.FILED) {
|
if (mode === FILING_FORM_MODE.FILED) {
|
||||||
return record.filingStatusCode === 1;
|
return Number(record.filingStatusCode) === 3;
|
||||||
}
|
}
|
||||||
return isQualFilingEditable(record.filingStatusCode);
|
return isQualFilingEditable(record.filingStatusCode);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -276,14 +276,14 @@ export function mergeDetailFromForms(detail, { basicValues, commitmentValues })
|
||||||
return {
|
return {
|
||||||
...detail,
|
...detail,
|
||||||
...basicValues,
|
...basicValues,
|
||||||
attachmentUrl: Array.isArray(basicValues?.attachmentUrl) ? JSON.stringify(basicValues?.attachmentUrl) : basicValues?.attachmentUrl,
|
attachmentUrl: Array.isArray(basicValues?.attachmentUrl) ? basicValues?.attachmentUrl?.map((file) => file.url).join(",") : basicValues?.attachmentUrl,
|
||||||
materials: detail.materials,
|
materials: detail.materials,
|
||||||
personnelList: detail.personnelList,
|
personnelList: detail.personnelList,
|
||||||
equipmentList: detail.equipmentList,
|
equipmentList: detail.equipmentList,
|
||||||
commitment: {
|
commitment: {
|
||||||
...detail.commitment,
|
...detail.commitment,
|
||||||
...commitmentValues,
|
...commitmentValues,
|
||||||
legalRepSignatureUrl: Array.isArray(commitmentValues?.legalRepSignatureUrl) ? commitmentValues?.legalRepSignatureUrl[0]?.url : commitmentValues?.legalRepSignatureUrl,
|
legalRepSignatureUrl: Array.isArray(commitmentValues?.legalRepSignatureUrl) ? commitmentValues?.legalRepSignatureUrl?.map((file) => file.url).join(",") : commitmentValues?.legalRepSignatureUrl,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import React, { useState, useEffect, useMemo } from "react";
|
import React, { useState, useEffect } from "react";
|
||||||
import { Button, Descriptions, Table, Tag, Tabs, Select, Modal, Space, Image } from "antd";
|
import { Button, Descriptions, Table, Tag, Tabs, Select, Modal, Space, Image } from "antd";
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { NS_QUAL_REVIEW } from "~/enumerate/namespace";
|
import { NS_QUAL_REVIEW } from "~/enumerate/namespace";
|
||||||
|
|
@ -26,17 +26,6 @@ const FilingTabs = ({
|
||||||
|
|
||||||
const [viewId, setViewId] = useState("");
|
const [viewId, setViewId] = useState("");
|
||||||
|
|
||||||
const attachmentList = useMemo(() => {
|
|
||||||
const v = detail.attachmentUrl;
|
|
||||||
if (!v) return [];
|
|
||||||
try {
|
|
||||||
const p = JSON.parse(v);
|
|
||||||
return Array.isArray(p) ? p : [];
|
|
||||||
} catch {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
}, [detail.attachmentUrl]);
|
|
||||||
|
|
||||||
|
|
||||||
const baseCols = [
|
const baseCols = [
|
||||||
{ title: "序号", width: 60, render: (_, __, i) => i + 1 },
|
{ title: "序号", width: 60, render: (_, __, i) => i + 1 },
|
||||||
|
|
@ -98,20 +87,6 @@ const FilingTabs = ({
|
||||||
<Descriptions.Item label="专职安全评价师数量">{detail.fulltimeEvaluatorCount}人</Descriptions.Item>
|
<Descriptions.Item label="专职安全评价师数量">{detail.fulltimeEvaluatorCount}人</Descriptions.Item>
|
||||||
<Descriptions.Item label="注册安全工程师数量">{detail.registeredEngineerCount}人</Descriptions.Item>
|
<Descriptions.Item label="注册安全工程师数量">{detail.registeredEngineerCount}人</Descriptions.Item>
|
||||||
<Descriptions.Item label="单位基本情况介绍" span={2}>{detail.unitIntro}</Descriptions.Item>
|
<Descriptions.Item label="单位基本情况介绍" span={2}>{detail.unitIntro}</Descriptions.Item>
|
||||||
<Descriptions.Item label="附件" span={2}>
|
|
||||||
{attachmentList.length
|
|
||||||
? attachmentList.map((item, i) => {
|
|
||||||
const isImg = /\.(png|jpe?g|gif|bmp|webp|svg)(\?.*)?$/i.test(item.url || "");
|
|
||||||
return isImg ? (
|
|
||||||
<Image key={item.url || i} src={item.url} style={{ width: 100, height: 100, objectFit: "cover", marginRight: 8 }} />
|
|
||||||
) : (
|
|
||||||
<PreviewUrlButton key={item.url || i} url={item.url}>
|
|
||||||
{item.name || `附件${i + 1}`}
|
|
||||||
</PreviewUrlButton>
|
|
||||||
);
|
|
||||||
})
|
|
||||||
: "-"}
|
|
||||||
</Descriptions.Item>
|
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue