From b9f342941fb97eacae745767aeed47d9ae705195 Mon Sep 17 00:00:00 2001
From: huwei <3313749341@qq.com>
Date: Tue, 4 Aug 2026 15:56:14 +0800
Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jjb.config.js | 4 +-
.../PersonnelInfo/List/index.js | 4 +-
.../EvalReportLibrary/index.js | 116 ++++++++++++++++++
.../Supervision/EvalReportDatabase/index.js | 72 ++++++++++-
4 files changed, 191 insertions(+), 5 deletions(-)
diff --git a/jjb.config.js b/jjb.config.js
index a347480..8de27c5 100644
--- a/jjb.config.js
+++ b/jjb.config.js
@@ -13,9 +13,9 @@ module.exports = {
// API_HOST: "https://gbs-gateway.qhdsafety.com",
// API_HOST: "http://192.168.0.134",
- API_HOST: "http://192.168.0.150", //太浅
+ // API_HOST: "http://192.168.0.150", //太浅
// API_HOST: "http://192.168.0.152",
- //API_HOST: "http://192.168.0.103", //huwei
+ API_HOST: "http://192.168.0.103", //huwei
},
production: {
// 应用后端分支名称,部署上线需要
diff --git a/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js b/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js
index 860fa49..9ee559b 100644
--- a/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js
+++ b/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js
@@ -224,10 +224,10 @@ function PersonnelInfoPage(props) {
},
{
title: "能力",
- width: 80,
+ width: 260,
dataIndex: "abilityNames",
ellipsis: true,
- render: (text) => '暂无',
+ render: (text) => text || '暂无',
},
{
title: "操作",
diff --git a/src/pages/Container/SafetyEvalBusiness/EvalReportLibrary/index.js b/src/pages/Container/SafetyEvalBusiness/EvalReportLibrary/index.js
index 7c0d67a..935bc0e 100644
--- a/src/pages/Container/SafetyEvalBusiness/EvalReportLibrary/index.js
+++ b/src/pages/Container/SafetyEvalBusiness/EvalReportLibrary/index.js
@@ -15,6 +15,8 @@ import {
DatePicker,
Space,
ConfigProvider,
+ Tag,
+ Tooltip,
} from "antd";
import {
PlusOutlined,
@@ -101,6 +103,30 @@ const getFileExt = (name = "") => {
return parts.length > 1 ? parts.pop().toUpperCase() : "PDF";
};
+/** 解析 JSON 文件列表,渲染为可下载链接列表 */
+const renderFileLinks = (jsonStr) => {
+ if (!jsonStr) return "-";
+ try {
+ const files = JSON.parse(jsonStr);
+ if (!Array.isArray(files) || files.length === 0) return "-";
+ return files.map((f, i) => (
+
+ ));
+ } catch {
+ return jsonStr;
+ }
+};
+
const getOptionLabel = (options, value) =>
options.find((item) => item.value === value)?.label || value || "-";
@@ -131,6 +157,8 @@ const EvalReportLibrary = (props) => {
const [rectifyVisible, setRectifyVisible] = useState(false);
const [rectifyRecord, setRectifyRecord] = useState(null);
const [uploadedFile, setUploadedFile] = useState(null);
+ const [contractFiles, setContractFiles] = useState([]);
+ const [processDocFiles, setProcessDocFiles] = useState([]);
const {
evalReportPageLoading,
@@ -188,6 +216,8 @@ const EvalReportLibrary = (props) => {
const handleOpenAdd = () => {
setUploadedFile(null);
+ setContractFiles([]);
+ setProcessDocFiles([]);
uploadForm.resetFields();
uploadForm.setFieldsValue({
reportYear: dayjs().year(),
@@ -225,6 +255,40 @@ const EvalReportLibrary = (props) => {
}
};
+ // 合同文件上传
+ const handleContractUploadChange = (info) => {
+ if (info.file.status === "error") {
+ message.error(`${info.file.name} 上传失败`);
+ return;
+ }
+ const doneFiles = info.fileList
+ .filter((f) => f.status === "done" && f.response?.data)
+ .map((f) => ({
+ uid: f.uid,
+ url: f.response.data.url || f.response.data.fileUrl || "",
+ name: f.response.data.name || f.response.data.fileName || f.name,
+ }))
+ .filter((f) => f.url);
+ setContractFiles(doneFiles);
+ };
+
+ // 其他过程文档上传
+ const handleProcessDocUploadChange = (info) => {
+ if (info.file.status === "error") {
+ message.error(`${info.file.name} 上传失败`);
+ return;
+ }
+ const doneFiles = info.fileList
+ .filter((f) => f.status === "done" && f.response?.data)
+ .map((f) => ({
+ uid: f.uid,
+ url: f.response.data.url || f.response.data.fileUrl || "",
+ name: f.response.data.name || f.response.data.fileName || f.name,
+ }))
+ .filter((f) => f.url);
+ setProcessDocFiles(doneFiles);
+ };
+
const handleAddOk = async () => {
const values = await uploadForm.validateFields().catch(() => null);
if (!values) return;
@@ -252,6 +316,8 @@ const EvalReportLibrary = (props) => {
SECRET_LEVEL_OPTIONS,
values.secretLevelCode,
),
+ contractFileUrls: contractFiles.length > 0 ? JSON.stringify(contractFiles) : undefined,
+ processDocUrls: processDocFiles.length > 0 ? JSON.stringify(processDocFiles) : undefined,
remarks: values.remarks,
submitToRegulator: values.submitToRegulator === 1,
};
@@ -838,6 +904,50 @@ const EvalReportLibrary = (props) => {
+
+
+ {
+ const isLt100M = file.size / 1024 / 1024 <= 100;
+ if (!isLt100M) {
+ message.error("单个文件不超过 100MB");
+ return Upload.LIST_IGNORE;
+ }
+ return true;
+ }}
+ >
+ }>选择合同文件
+
+
+
+
+
+ {
+ const isLt100M = file.size / 1024 / 1024 <= 100;
+ if (!isLt100M) {
+ message.error("单个文件不超过 100MB");
+ return Upload.LIST_IGNORE;
+ }
+ return true;
+ }}
+ >
+ }>选择过程文档
+
+
+