Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	jjb.config.js
dev
huwei 2026-07-10 10:03:10 +08:00
commit 85120fcf75
5 changed files with 124 additions and 34 deletions

View File

@ -10,7 +10,7 @@ module.exports = {
javaGitBranch: "dev", javaGitBranch: "dev",
// 本地联调 safetyEval-servicecontext-path: /safetyEval默认端口 8095 // 本地联调 safetyEval-servicecontext-path: /safetyEval默认端口 8095
// 可通过环境变量覆盖: SAFETY_EVAL_API_HOST=http://192.168.x.x:8095 // 可通过环境变量覆盖: SAFETY_EVAL_API_HOST=http://192.168.x.x:8095
API_HOST: "http://127.0.0.1", API_HOST: "http://192.168.0.152",
}, },
production: { production: {
// 应用后端分支名称,部署上线需要 // 应用后端分支名称,部署上线需要

View File

@ -59,9 +59,17 @@ export default function AttachmentUpload({ name, label, disabled = false, maxCou
action={`${window.process.env.app.API_HOST}/safetyEval/file/upload`} action={`${window.process.env.app.API_HOST}/safetyEval/file/upload`}
beforeUpload={(file) => { beforeUpload={(file) => {
if (!accept) return true; if (!accept) return true;
const exts = accept.split(",").map((e) => e.trim().toLowerCase()); const rules = accept.split(",").map((e) => e.trim().toLowerCase());
const ext = "." + file.name.split(".").pop().toLowerCase(); const ext = "." + file.name.split(".").pop().toLowerCase();
if (!exts.includes(ext)) { const matchExt = rules.includes(ext);
const matchMime = rules.some((r) => {
if (r.endsWith("/*")) {
const prefix = r.slice(0, -1);
return file.type && file.type.toLowerCase().startsWith(prefix);
}
return false;
});
if (!matchExt && !matchMime) {
message.error(`仅支持 ${accept} 格式文件`); message.error(`仅支持 ${accept} 格式文件`);
return Upload.LIST_IGNORE; return Upload.LIST_IGNORE;
} }

View File

@ -116,6 +116,7 @@ function EquipInfoPage(props) {
label="设备名称" label="设备名称"
placeholder="请输入" placeholder="请输入"
allowClear allowClear
maxLength={30}
/> />
</Form.Item>, </Form.Item>,
<Form.Item key="instrumentType" name="instrumentType"> <Form.Item key="instrumentType" name="instrumentType">
@ -161,7 +162,7 @@ function EquipInfoPage(props) {
width: 200, width: 200,
ellipsis: true, ellipsis: true,
}, },
{ title: "设备型号", dataIndex: "deviceModel" }, { title: "设备型号", dataIndex: "deviceModel", ellipsis: true, },
{ title: "仪器类型", dataIndex: "instrumentTypeName" }, { title: "仪器类型", dataIndex: "instrumentTypeName" },
{ title: "设备类型", dataIndex: "deviceTypeName" }, { title: "设备类型", dataIndex: "deviceTypeName" },
{ {
@ -353,7 +354,7 @@ function EquipFormModal({
label="设备名称" label="设备名称"
rules={[{ required: true, message: "请输入设备名称" }]} rules={[{ required: true, message: "请输入设备名称" }]}
> >
<Input placeholder="请输入设备名称" /> <Input placeholder="请输入设备名称" maxLength={30} showCount />
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={12}> <Col span={12}>
@ -362,7 +363,7 @@ function EquipFormModal({
label="型号" label="型号"
rules={[{ required: true, message: "请输入型号" }]} rules={[{ required: true, message: "请输入型号" }]}
> >
<Input placeholder="请输入型号" /> <Input placeholder="请输入型号" maxLength={50} showCount />
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={12}> <Col span={12}>
@ -397,12 +398,12 @@ function EquipFormModal({
label="厂家" label="厂家"
rules={[{ required: true, message: "请输入厂家" }]} rules={[{ required: true, message: "请输入厂家" }]}
> >
<Input placeholder="请输入厂家" /> <Input placeholder="请输入厂家" maxLength={50} showCount />
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={12}> <Col span={12}>
<Form.Item name="flowDesc" label="设备流量说明"> <Form.Item name="flowDesc" label="设备流量说明">
<Input placeholder="请输入设备流量说明" /> <Input placeholder="请输入设备流量说明" maxLength={100} showCount />
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={12}> <Col span={12}>
@ -431,7 +432,7 @@ function EquipFormModal({
</Col> </Col>
<Col span={12}> <Col span={12}>
<Form.Item name="calibrationUnit" label="校准单位"> <Form.Item name="calibrationUnit" label="校准单位">
<Input placeholder="请输入校准单位" /> <Input placeholder="请输入校准单位" maxLength={30} showCount />
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={12}> <Col span={12}>

View File

@ -38,7 +38,7 @@ export default function BasicInfoStep({ form, disabled }) {
</Col> </Col>
<Col span={12}> <Col span={12}>
<Form.Item name="filingUnitName" label="备案单位"> <Form.Item name="filingUnitName" label="备案单位">
<Input placeholder="备案单位" /> <Input placeholder="备案单位" maxLength={64} />
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={12}> <Col span={12}>
@ -48,81 +48,146 @@ export default function BasicInfoStep({ form, disabled }) {
</Col> </Col>
<Col span={12}> <Col span={12}>
<Form.Item name="creditCode" label="统一社会信用代码"> <Form.Item name="creditCode" label="统一社会信用代码">
<Input placeholder="统一社会信用代码" /> <Input placeholder="统一社会信用代码" maxLength={18} />
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={24}> <Col span={24}>
<Form.Item name="officeAddress" label="办公地址"> <Form.Item name="officeAddress" label="办公地址">
<Input placeholder="办公地址" /> <Input placeholder="办公地址" maxLength={128} />
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={24}> <Col span={24}>
<Form.Item name="registerAddress" label="注册地址"> <Form.Item name="registerAddress" label="注册地址">
<Input placeholder="注册地址" /> <Input placeholder="注册地址" maxLength={128} />
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={12}> <Col span={12}>
<Form.Item name="qualCertNo" label="资质证书编号"> <Form.Item name="qualCertNo" label="资质证书编号">
<Input placeholder="资质证书编号" /> <Input placeholder="资质证书编号" maxLength={32} />
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={12}> <Col span={12}>
<Form.Item name="infoDisclosureUrl" label="信息公开网址"> <Form.Item
<Input placeholder="信息公开网址" /> name="infoDisclosureUrl"
label="信息公开网址"
rules={[
{
pattern: /^https?:\/\/[^\s]+$/,
message: "请输入正确的网址,需以 http:// 或 https:// 开头",
},
]}
>
<Input placeholder="信息公开网址" maxLength={128} />
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={12}> <Col span={12}>
<Form.Item name="legalPersonPhone" label="法人代表及电话"> <Form.Item name="legalPersonPhone" label="法人代表及电话">
<Input placeholder="姓名 / 电话" /> <Input placeholder="姓名 / 电话" maxLength={32} />
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={12}> <Col span={12}>
<Form.Item name="contactPhone" label="联系人及电话"> <Form.Item name="contactPhone" label="联系人及电话">
<Input placeholder="姓名 / 电话" /> <Input placeholder="姓名 / 电话" maxLength={32} />
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={12}> <Col span={12}>
<Form.Item <Form.Item
name="fixedAssetAmount" name="fixedAssetAmount"
label="固定资产总值(万元)" label="固定资产总值(万元)"
rules={[{ required: !disabled, message: "请输入固定资产总值" }]} rules={[
{ required: !disabled, message: "请输入固定资产总值" },
{ type: "number", max: 100000000, min: 0, message: "请输入0-100000000之间的数字最多9位整数" },
{
validator: (_, value) =>
value === undefined || value === null || value === ""
? Promise.resolve()
: /^\d{1,9}(\.\d{1,2})?$/.test(String(value))
? Promise.resolve()
: Promise.reject(new Error("整数最多9位小数最多2位")),
},
]}
> >
<InputNumber style={{ width: "100%" }} min={0} placeholder="万元" /> <InputNumber
style={{ width: "100%" }}
min={0}
max={100000000}
precision={2}
placeholder="万元"
/>
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={12}> <Col span={12}>
<Form.Item <Form.Item
name="workplaceArea" name="workplaceArea"
label="工作场所建筑面积(㎡)" label="工作场所建筑面积(㎡)"
rules={[{ required: !disabled, message: "请输入工作场所建筑面积" }]} rules={[
{ required: !disabled, message: "请输入工作场所建筑面积" },
{ type: "number", max: 100000000, min: 0, message: "请输入0-100000000之间的数字最多9位整数" },
{
validator: (_, value) =>
value === undefined || value === null || value === ""
? Promise.resolve()
: /^\d{1,9}(\.\d{1,2})?$/.test(String(value))
? Promise.resolve()
: Promise.reject(new Error("整数最多9位小数最多2位")),
},
]}
> >
<InputNumber style={{ width: "100%" }} min={0} placeholder="㎡" /> <InputNumber
style={{ width: "100%" }}
min={0}
max={100000000}
precision={2}
placeholder="㎡"
/>
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={12}> <Col span={12}>
<Form.Item name="archiveRoomArea" label="档案室面积(㎡)"> <Form.Item
<InputNumber style={{ width: "100%" }} min={0} placeholder="㎡" /> name="archiveRoomArea"
label="档案室面积(㎡)"
rules={[
{ type: "number", max: 100000000, min: 0, message: "请输入0-100000000之间的数字最多9位整数" },
{
validator: (_, value) =>
value === undefined || value === null || value === ""
? Promise.resolve()
: /^\d{1,9}(\.\d{1,2})?$/.test(String(value))
? Promise.resolve()
: Promise.reject(new Error("整数最多9位小数最多2位")),
},
]}
>
<InputNumber
style={{ width: "100%" }}
min={0}
max={100000000}
precision={2}
placeholder="㎡"
/>
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={12}> <Col span={12}>
<Form.Item <Form.Item
name="fulltimeEvaluatorCount" name="fulltimeEvaluatorCount"
label="专职安全评价师数量(人)" label="专职安全评价师数量(人)"
rules={[{ type: "number", max: 100000000, min: 0, message: "请输入0-100000000之间的数字最多9位" }]}
> >
<InputNumber style={{ width: "100%" }} min={0} placeholder="人" /> <InputNumber style={{ width: "100%" }} min={0} max={100000000} maxLength={9} placeholder="人" />
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={12}> <Col span={12}>
<Form.Item <Form.Item
name="registeredEngineerCount" name="registeredEngineerCount"
label="注册安全工程师数量(人)" label="注册安全工程师数量(人)"
rules={[{ type: "number", max: 100000000, min: 0, message: "请输入0-100000000之间的数字最多9位" }]}
> >
<InputNumber style={{ width: "100%" }} min={0} placeholder="人" /> <InputNumber style={{ width: "100%" }} min={0} max={100000000} maxLength={9} placeholder="人" />
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={24}> <Col span={24}>
<Form.Item name="unitIntro" label="单位基本情况介绍"> <Form.Item name="unitIntro" label="单位基本情况介绍">
<Input.TextArea rows={3} placeholder="请输入单位基本情况介绍" /> <Input.TextArea rows={3} placeholder="请输入单位基本情况介绍" maxLength={500} showCount />
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={24}> <Col span={24}>

View File

@ -316,16 +316,22 @@ const ExperManage = (props) => {
<Form.Item <Form.Item
name="userName" name="userName"
label="姓名" label="姓名"
rules={[{ required: true, message: "请输入姓名" }]} rules={[
{ required: true, message: "请输入姓名" },
{ max: 32, message: "姓名最多输入32个字符" },
]}
> >
<Input placeholder="请输入" allowClear /> <Input placeholder="请输入" allowClear maxLength={32} />
</Form.Item> </Form.Item>
<Form.Item <Form.Item
name="account" name="account"
label="账号" label="账号"
rules={[{ required: true, message: "请输入账号" }]} rules={[
{ required: true, message: "请输入账号" },
{ max: 32, message: "账号最多输入32个字符" },
]}
> >
<Input placeholder="请输入" allowClear /> <Input placeholder="请输入" allowClear maxLength={32} />
</Form.Item> </Form.Item>
<Form.Item name="genderCode" label="性别"> <Form.Item name="genderCode" label="性别">
<Select placeholder="请选择" allowClear style={{ width: "100%" }}> <Select placeholder="请选择" allowClear style={{ width: "100%" }}>
@ -336,10 +342,20 @@ const ExperManage = (props) => {
))} ))}
</Select> </Select>
</Form.Item> </Form.Item>
<Form.Item name="idCardNo" label="身份证号" rules={[idCardRule()]}> <Form.Item
<Input placeholder="请输入" allowClear /> name="idCardNo"
label="身份证号"
rules={[idCardRule(), { max: 20, message: "身份证号最多输入20个字符" }]}
>
<Input placeholder="请输入" allowClear maxLength={20} />
</Form.Item> </Form.Item>
<AttachmentUpload name="certificate" maxCount={1} label="证书" /> <AttachmentUpload
name="certificate"
label="证书"
maxCount={10}
accept="image/*,.pdf"
extra="支持上传图片和PDF文件最多10个"
/>
</Form> </Form>
</Modal> </Modal>
</PageLayout> </PageLayout>