Compare commits
No commits in common. "51bea3ca02a39fb315f64f88607d8ffe0dffc3cf" and "0a11ae9c80ff21c453f4979706ea1993673e3af4" have entirely different histories.
51bea3ca02
...
0a11ae9c80
|
|
@ -10,7 +10,7 @@ module.exports = {
|
||||||
javaGitBranch: "<branch-name>",
|
javaGitBranch: "<branch-name>",
|
||||||
// 本地联调 safety-eval-service(context-path: /safety-eval,默认端口 8095)
|
// 本地联调 safety-eval-service(context-path: /safety-eval,默认端口 8095)
|
||||||
// 可通过环境变量覆盖: SAFETY_EVAL_API_HOST=http://192.168.x.x:8095
|
// 可通过环境变量覆盖: SAFETY_EVAL_API_HOST=http://192.168.x.x:8095
|
||||||
API_HOST: "http://192.168.0.149:8095",
|
API_HOST: process.env.SAFETY_EVAL_API_HOST || "http://127.0.0.1:8095",
|
||||||
},
|
},
|
||||||
production: {
|
production: {
|
||||||
// 应用后端分支名称,部署上线需要
|
// 应用后端分支名称,部署上线需要
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import {
|
||||||
Col,
|
Col,
|
||||||
DatePicker,
|
DatePicker,
|
||||||
Form,
|
Form,
|
||||||
Image,
|
|
||||||
Input,
|
Input,
|
||||||
InputNumber,
|
InputNumber,
|
||||||
message,
|
message,
|
||||||
|
|
@ -13,8 +12,6 @@ import {
|
||||||
Space,
|
Space,
|
||||||
Upload,
|
Upload,
|
||||||
} from "antd";
|
} from "antd";
|
||||||
import { PlusOutlined } from "@ant-design/icons";
|
|
||||||
|
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
|
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
|
||||||
|
|
@ -44,7 +41,6 @@ function OrgInfoPage(props) {
|
||||||
const [editing, setEditing] = useState(true);
|
const [editing, setEditing] = useState(true);
|
||||||
const [submitting, setSubmitting] = useState(false);
|
const [submitting, setSubmitting] = useState(false);
|
||||||
const [detail, setDetail] = useState({});
|
const [detail, setDetail] = useState({});
|
||||||
const [previewImage, setPreviewImage] = useState("");
|
|
||||||
/** 是否已存在机构数据(有 id 视为已入库,只能修改) */
|
/** 是否已存在机构数据(有 id 视为已入库,只能修改) */
|
||||||
const [hasExistingData, setHasExistingData] = useState(false);
|
const [hasExistingData, setHasExistingData] = useState(false);
|
||||||
|
|
||||||
|
|
@ -63,6 +59,7 @@ function OrgInfoPage(props) {
|
||||||
productionDate: res.data.productionDate
|
productionDate: res.data.productionDate
|
||||||
? dayjs(res.data.productionDate)
|
? dayjs(res.data.productionDate)
|
||||||
: undefined,
|
: undefined,
|
||||||
|
|
||||||
});
|
});
|
||||||
setHasExistingData(true);
|
setHasExistingData(true);
|
||||||
setEditing(false);
|
setEditing(false);
|
||||||
|
|
@ -148,22 +145,24 @@ function OrgInfoPage(props) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const subTitleText =
|
||||||
|
"新成立或首次使用系统的安全评价机构,可通过系统提供的引导页面,详细填写机构的基本信息。";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PageLayout
|
<PageLayout
|
||||||
title="机构信息管理"
|
title="机构信息管理"
|
||||||
extra={
|
extra={
|
||||||
hasExistingData &&
|
hasExistingData &&
|
||||||
!editing && (
|
!editing && (
|
||||||
<Button
|
<Button type="primary" loading={orgInfoLoading} onClick={() => setEditing(true)}>
|
||||||
type="primary"
|
|
||||||
loading={orgInfoLoading}
|
|
||||||
onClick={() => setEditing(true)}
|
|
||||||
>
|
|
||||||
修改
|
修改
|
||||||
</Button>
|
</Button>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
<p style={{ margin: 0, marginBottom: 24, color: "rgba(0, 0, 0, 0.45)" }}>
|
||||||
|
{subTitleText}
|
||||||
|
</p>
|
||||||
<Form form={form} labelCol={{ span: 10 }} disabled={!editing}>
|
<Form form={form} labelCol={{ span: 10 }} disabled={!editing}>
|
||||||
<Row gutter={[16, 16]}>
|
<Row gutter={[16, 16]}>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
|
|
@ -201,11 +200,7 @@ function OrgInfoPage(props) {
|
||||||
label="属地"
|
label="属地"
|
||||||
rules={[{ required: true, message: "请选择属地" }]}
|
rules={[{ required: true, message: "请选择属地" }]}
|
||||||
>
|
>
|
||||||
<Select
|
<Select options={selectDistrictOptions} placeholder="请选择属地" allowClear />
|
||||||
options={selectDistrictOptions}
|
|
||||||
placeholder="请选择属地"
|
|
||||||
allowClear
|
|
||||||
/>
|
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
|
|
@ -330,10 +325,7 @@ function OrgInfoPage(props) {
|
||||||
label="安全管理部门负责人联系电话"
|
label="安全管理部门负责人联系电话"
|
||||||
rules={[phoneRule("安全管理部门负责人联系电话", false)]}
|
rules={[phoneRule("安全管理部门负责人联系电话", false)]}
|
||||||
>
|
>
|
||||||
<Input
|
<Input placeholder="请输入安全管理部门负责人联系电话" allowClear />
|
||||||
placeholder="请输入安全管理部门负责人联系电话"
|
|
||||||
allowClear
|
|
||||||
/>
|
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
|
|
@ -352,10 +344,7 @@ function OrgInfoPage(props) {
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item name="productionDate" label="投产日期">
|
<Form.Item name="productionDate" label="投产日期">
|
||||||
<DatePicker
|
<DatePicker style={{ width: "100%" }} placeholder="请选择投产日期" />
|
||||||
style={{ width: "100%" }}
|
|
||||||
placeholder="请选择投产日期"
|
|
||||||
/>
|
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
|
|
@ -378,12 +367,7 @@ function OrgInfoPage(props) {
|
||||||
label="工作场所建筑面积"
|
label="工作场所建筑面积"
|
||||||
rules={[positiveNumberRule("工作场所建筑面积", false)]}
|
rules={[positiveNumberRule("工作场所建筑面积", false)]}
|
||||||
>
|
>
|
||||||
<InputNumber
|
<InputNumber style={{ width: "100%" }} min={0} precision={2} placeholder="请输入工作场所建筑面积" />
|
||||||
style={{ width: "100%" }}
|
|
||||||
min={0}
|
|
||||||
precision={2}
|
|
||||||
placeholder="请输入工作场所建筑面积"
|
|
||||||
/>
|
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
|
|
@ -392,12 +376,7 @@ function OrgInfoPage(props) {
|
||||||
label="档案室面积"
|
label="档案室面积"
|
||||||
rules={[positiveNumberRule("档案室面积", false)]}
|
rules={[positiveNumberRule("档案室面积", false)]}
|
||||||
>
|
>
|
||||||
<InputNumber
|
<InputNumber style={{ width: "100%" }} min={0} precision={2} placeholder="请输入档案室面积" />
|
||||||
style={{ width: "100%" }}
|
|
||||||
min={0}
|
|
||||||
precision={2}
|
|
||||||
placeholder="请输入档案室面积"
|
|
||||||
/>
|
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
|
|
@ -406,12 +385,7 @@ function OrgInfoPage(props) {
|
||||||
label="专职安全评价师数量"
|
label="专职安全评价师数量"
|
||||||
rules={[nonNegativeIntegerRule("专职安全评价师数量", false)]}
|
rules={[nonNegativeIntegerRule("专职安全评价师数量", false)]}
|
||||||
>
|
>
|
||||||
<InputNumber
|
<InputNumber style={{ width: "100%" }} min={0} precision={0} placeholder="请输入专职安全评价师数量" />
|
||||||
style={{ width: "100%" }}
|
|
||||||
min={0}
|
|
||||||
precision={0}
|
|
||||||
placeholder="请输入专职安全评价师数量"
|
|
||||||
/>
|
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
|
|
@ -420,48 +394,27 @@ function OrgInfoPage(props) {
|
||||||
label="注册安全工程师数量"
|
label="注册安全工程师数量"
|
||||||
rules={[nonNegativeIntegerRule("注册安全工程师数量", false)]}
|
rules={[nonNegativeIntegerRule("注册安全工程师数量", false)]}
|
||||||
>
|
>
|
||||||
<InputNumber
|
<InputNumber style={{ width: "100%" }} min={0} precision={0} placeholder="请输入注册安全工程师数量" />
|
||||||
style={{ width: "100%" }}
|
|
||||||
min={0}
|
|
||||||
precision={0}
|
|
||||||
placeholder="请输入注册安全工程师数量"
|
|
||||||
/>
|
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item name="enterpriseStatus" label="企业状态">
|
<Form.Item name="enterpriseStatus" label="企业状态">
|
||||||
<Select
|
<Select options={ENTERPRISE_STATUS_OPTIONS} placeholder="请选择企业状态" allowClear />
|
||||||
options={ENTERPRISE_STATUS_OPTIONS}
|
|
||||||
placeholder="请选择企业状态"
|
|
||||||
allowClear
|
|
||||||
/>
|
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item name="enterpriseScale" label="企业规模">
|
<Form.Item name="enterpriseScale" label="企业规模">
|
||||||
<Select
|
<Select options={ENTERPRISE_SCALE_OPTIONS} placeholder="请选择企业规模" allowClear />
|
||||||
options={ENTERPRISE_SCALE_OPTIONS}
|
|
||||||
placeholder="请选择企业规模"
|
|
||||||
allowClear
|
|
||||||
/>
|
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item name="filingType" label="备案类型">
|
<Form.Item name="filingType" label="备案类型">
|
||||||
<Select
|
<Select options={FILING_TYPE_OPTIONS} placeholder="请选择备案类型" allowClear />
|
||||||
options={FILING_TYPE_OPTIONS}
|
|
||||||
placeholder="请选择备案类型"
|
|
||||||
allowClear
|
|
||||||
/>
|
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item name="filingRecordStatus" label="备案状态">
|
<Form.Item name="filingRecordStatus" label="备案状态">
|
||||||
<Select
|
<Select options={FILING_RECORD_STATUS_OPTIONS} placeholder="请选择备案状态" allowClear />
|
||||||
options={FILING_RECORD_STATUS_OPTIONS}
|
|
||||||
placeholder="请选择备案状态"
|
|
||||||
allowClear
|
|
||||||
/>
|
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
|
|
@ -469,35 +422,9 @@ function OrgInfoPage(props) {
|
||||||
name="attachments"
|
name="attachments"
|
||||||
label="上传附件"
|
label="上传附件"
|
||||||
valuePropName="fileList"
|
valuePropName="fileList"
|
||||||
getValueFromEvent={({ fileList }) => {
|
|
||||||
return (
|
|
||||||
fileList?.map((file) => {
|
|
||||||
return {
|
|
||||||
url: file.response?.data.url || file.url,
|
|
||||||
uid: file.uid,
|
|
||||||
name: file.name,
|
|
||||||
};
|
|
||||||
}) || []
|
|
||||||
);
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<Upload
|
<Upload maxCount={5} listType="picture-card">
|
||||||
maxCount={5}
|
<Button>上传附件</Button>
|
||||||
onPreview={(file) => {
|
|
||||||
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`}
|
|
||||||
>
|
|
||||||
<button style={{ border: 0, background: "none" }} type="button">
|
|
||||||
<PlusOutlined />
|
|
||||||
<div style={{ marginTop: 8 }}>上传附件</div>
|
|
||||||
</button>
|
|
||||||
</Upload>
|
</Upload>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
@ -522,16 +449,6 @@ function OrgInfoPage(props) {
|
||||||
</Space>
|
</Space>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<Image
|
|
||||||
style={{ display: "none" }}
|
|
||||||
preview={{
|
|
||||||
visible: !!previewImage,
|
|
||||||
src: previewImage,
|
|
||||||
onVisibleChange: (visible) => {
|
|
||||||
if (!visible) setPreviewImage("");
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</PageLayout>
|
</PageLayout>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
function PersonnelInfo(props) {
|
function PersonnelInfo(props) {
|
||||||
return (
|
return (
|
||||||
props.children
|
<div>
|
||||||
|
{props.children}
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@ import React from "react";
|
||||||
|
|
||||||
export default (props)=>{
|
export default (props)=>{
|
||||||
return (
|
return (
|
||||||
props.children
|
<div style={{height: "100%"}}>
|
||||||
|
{props.children}
|
||||||
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue