From 9d40688f4e501fe989b905e3786977d5a5d5f279 Mon Sep 17 00:00:00 2001 From: tangjie <122778500@qq.com> Date: Tue, 30 Jun 2026 17:43:05 +0800 Subject: [PATCH] feat --- jjb.config.js | 2 +- .../Container/EnterpriseInfo/OrgInfo/index.js | 125 +++++++++++++++--- .../EnterpriseInfo/PersonnelInfo/index.js | 4 +- .../Container/QualificationReview/index.js | 4 +- 4 files changed, 107 insertions(+), 28 deletions(-) diff --git a/jjb.config.js b/jjb.config.js index 0cb15c8..8fb3e3c 100644 --- a/jjb.config.js +++ b/jjb.config.js @@ -10,7 +10,7 @@ module.exports = { javaGitBranch: "", // 本地联调 safety-eval-service(context-path: /safety-eval,默认端口 8095) // 可通过环境变量覆盖: SAFETY_EVAL_API_HOST=http://192.168.x.x:8095 - API_HOST: "http://192.168.0.124:8095", + API_HOST: "http://192.168.0.149:8095", }, production: { // 应用后端分支名称,部署上线需要 diff --git a/src/pages/Container/EnterpriseInfo/OrgInfo/index.js b/src/pages/Container/EnterpriseInfo/OrgInfo/index.js index 86ff3ad..5999cc6 100644 --- a/src/pages/Container/EnterpriseInfo/OrgInfo/index.js +++ b/src/pages/Container/EnterpriseInfo/OrgInfo/index.js @@ -4,6 +4,7 @@ import { Col, DatePicker, Form, + Image, Input, InputNumber, message, @@ -12,6 +13,8 @@ import { Space, Upload, } from "antd"; +import { PlusOutlined } from "@ant-design/icons"; + import dayjs from "dayjs"; import { useEffect, useState } from "react"; import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout"; @@ -41,6 +44,7 @@ function OrgInfoPage(props) { const [editing, setEditing] = useState(true); const [submitting, setSubmitting] = useState(false); const [detail, setDetail] = useState({}); + const [previewImage, setPreviewImage] = useState(""); /** 是否已存在机构数据(有 id 视为已入库,只能修改) */ const [hasExistingData, setHasExistingData] = useState(false); @@ -59,7 +63,6 @@ function OrgInfoPage(props) { productionDate: res.data.productionDate ? dayjs(res.data.productionDate) : undefined, - }); setHasExistingData(true); setEditing(false); @@ -145,24 +148,22 @@ function OrgInfoPage(props) { } }; - const subTitleText = - "新成立或首次使用系统的安全评价机构,可通过系统提供的引导页面,详细填写机构的基本信息。"; - return ( setEditing(true)}> + ) } > -

- {subTitleText} -

@@ -200,7 +201,11 @@ function OrgInfoPage(props) { label="属地" rules={[{ required: true, message: "请选择属地" }]} > - @@ -325,7 +330,10 @@ function OrgInfoPage(props) { label="安全管理部门负责人联系电话" rules={[phoneRule("安全管理部门负责人联系电话", false)]} > - + @@ -344,7 +352,10 @@ function OrgInfoPage(props) { - + @@ -367,7 +378,12 @@ function OrgInfoPage(props) { label="工作场所建筑面积" rules={[positiveNumberRule("工作场所建筑面积", false)]} > - + @@ -376,7 +392,12 @@ function OrgInfoPage(props) { label="档案室面积" rules={[positiveNumberRule("档案室面积", false)]} > - + @@ -385,7 +406,12 @@ function OrgInfoPage(props) { label="专职安全评价师数量" rules={[nonNegativeIntegerRule("专职安全评价师数量", false)]} > - + @@ -394,27 +420,48 @@ function OrgInfoPage(props) { label="注册安全工程师数量" rules={[nonNegativeIntegerRule("注册安全工程师数量", false)]} > - + - - - - @@ -422,9 +469,35 @@ function OrgInfoPage(props) { name="attachments" label="上传附件" valuePropName="fileList" + getValueFromEvent={({ fileList }) => { + return ( + fileList?.map((file) => { + return { + url: file.response?.data.url || file.url, + uid: file.uid, + name: file.name, + }; + }) || [] + ); + }} > - - + { + const isImage = /\.(png|jpe?g|gif|bmp|webp|svg)(\?.*)?$/i.test(file.name || file.url || ""); + if (isImage) { + setPreviewImage(file.url || file.thumbUrl); + } else { + window.open(file.url || file.thumbUrl); + } + }} + listType="picture-card" + action={`${window.process.env.app.API_HOST}/safety-eval/file/upload`} + > + @@ -449,6 +522,16 @@ function OrgInfoPage(props) { )} + { + if (!visible) setPreviewImage(""); + }, + }} + /> ); } diff --git a/src/pages/Container/EnterpriseInfo/PersonnelInfo/index.js b/src/pages/Container/EnterpriseInfo/PersonnelInfo/index.js index 0d7ddc7..bda4487 100644 --- a/src/pages/Container/EnterpriseInfo/PersonnelInfo/index.js +++ b/src/pages/Container/EnterpriseInfo/PersonnelInfo/index.js @@ -1,8 +1,6 @@ function PersonnelInfo(props) { return ( -
- {props.children} -
+ props.children ); } diff --git a/src/pages/Container/QualificationReview/index.js b/src/pages/Container/QualificationReview/index.js index 34a568d..e4e4094 100644 --- a/src/pages/Container/QualificationReview/index.js +++ b/src/pages/Container/QualificationReview/index.js @@ -2,8 +2,6 @@ import React from "react"; export default (props)=>{ return ( -
- {props.children} -
+ props.children ) }