diff --git a/config/routes.js b/config/routes.js index 0614436..b2e1d63 100644 --- a/config/routes.js +++ b/config/routes.js @@ -24,6 +24,12 @@ export default [ name: 'business', component: './nav_system_content/SystemContentList', routes: [ + // 基础信息管理 + { + path: '/topnavbar00/business/basic', + name: 'basic', + component: './business_basic/basic', + }, // 安全管理基础信息 { path: '/topnavbar00/business/basicinformation', diff --git a/src/assets/business_basic/Frame.png b/src/assets/business_basic/Frame.png new file mode 100644 index 0000000..04c3628 Binary files /dev/null and b/src/assets/business_basic/Frame.png differ diff --git a/src/pages/business_basic/basic.js b/src/pages/business_basic/basic.js new file mode 100644 index 0000000..db6ea83 --- /dev/null +++ b/src/pages/business_basic/basic.js @@ -0,0 +1,66 @@ +import React, { useState } from 'react'; +import { Card, Row, Col, Statistic, Progress, Button, Space } from 'antd'; +import styles from './basic.less'; +import ResponsibilityImplementation from './module/ResponsibilityImplementation'; //责任落实 +import OnlineMonitoring from './module/OnlineMonitoring'; //在线监测预警 +import RiskAssessment from './module/RiskAssessment'; //风险管控 +import EvaluationReport from './module/EvaluationReport'; //评估报告 + + + +const SafeMajorHazardList = () => { + const [activeModule, setActiveModule] = useState('organization'); + + const handleModuleClick = (module) => { + setActiveModule(module) + } + + + const renderModule = () => { + switch (activeModule) { + case 'organization': + return ; + case 'equipment': + return ; + case 'firefighting': + return ; + case 'other': + return ; + default: + return ; + } + }; + + + return ( +
+
+ + + + +
+
+ {renderModule()} +
+
+ ); +}; + +export default SafeMajorHazardList; diff --git a/src/pages/business_basic/basic.less b/src/pages/business_basic/basic.less new file mode 100644 index 0000000..b479169 --- /dev/null +++ b/src/pages/business_basic/basic.less @@ -0,0 +1,66 @@ +.container { + background-color: transparent; + width: 100%; + height: 89vh; + overflow: hidden; + display: flex; + flex-direction: column; + + .TopButton { + background-color: white; + width: 100%; + padding: 10px 30px; + display: flex; + gap: 24px; + margin-left: 6px; + + .TopButtonItem { + background-color: transparent !important; + color: #333333 !important; + font-family: 'PingFang SC', sans-serif !important; + font-weight: 500 !important; + font-size: 14px !important; + line-height: 100% !important; + border-radius: 8px !important; + padding: 6px 10px !important; + height: auto !important; + border: none !important; + box-shadow: none !important; + position: relative !important; + + &:hover { + color: #333333 !important; + border: none !important; + } + + &:focus { + color: #2E4CD4 !important; + border: none !important; + } + + &.active { + color: #2E4CD4 !important; + + &::after { + content: ''; + position: absolute; + bottom: -10px; + left: 0; + right: 0; + width: 100%; + height: 4px; + background-color: #2E4CD4; + border-radius: 0; + opacity: 1; + } + } + } + } + + .content { + // ======== 内容区域样式 ======== + flex: 1; // ======== 占据剩余空间 ======== + overflow-y: auto; // ======== 允许垂直滚动 ======== + padding: 0; // ======== 无内边距 ======== + } +} \ No newline at end of file diff --git a/src/pages/business_basic/form/StaffSheetCreateForm.js b/src/pages/business_basic/form/StaffSheetCreateForm.js new file mode 100644 index 0000000..6bdce8d --- /dev/null +++ b/src/pages/business_basic/form/StaffSheetCreateForm.js @@ -0,0 +1,271 @@ +import { useState, useEffect } from 'react' +import { Col, DatePicker, Form, Input, Modal, Row, Select } from 'antd' +import SelectDeptTree from '@/components/SelectDeptTree' +import SelectOrganTree from '@/components/SelectOrganTree' +import datadictionary from '@/utils/dataDictionary' +import { formatDictOptions, verifyPhone } from '@/utils/globalCommon' +import { NumberInput } from '@/components/NumberInput' +import styles from '../StaffSheetList.less' +import style from '@/global.less' +import dayjs from 'dayjs' +import { formatDate } from '@/utils/formatUtils' + +const { Item: FormItem } = Form +const { TextArea } = Input +const dictData = datadictionary + +//新增表单 +let getDeptTreeBySelectTree +let getOrganTreeBySelectTree + +const StaffSheetCreateForm = (props => { + const [form] = Form.useForm() + const [jobStatus, setJobStatus] = useState('1') + + const { + modalVisible, + handleAdd, + handleModalVisible, + loading, + dispatch, + selectDeptTree, + selectOrganTree + } = props + + useEffect(() => { + form.setFieldsValue({ + user_type: 'employee', + job_status: '1', + mgr_type: '0' + }) + }, []) + + const selectedDeptTreeValue = (deptRecord) => { + getDeptTreeBySelectTree = deptRecord + } + + const selectedOrganTreeValue = (orgRecord) => { + getOrganTreeBySelectTree = orgRecord + } + + const parentDeptTreeMethod = { + dispatch: dispatch, + selectDeptTree: selectDeptTree, + selectedDeptTreeValue: selectedDeptTreeValue, + } + + const parentOrganTreeMethod = { + dispatch: dispatch, + selectOrganTree: selectOrganTree, + selectedOrganTreeValue: selectedOrganTreeValue + } + + const okHandle = () => { + form.validateFields() + .then(fieldsValue => { + form.resetFields() + fieldsValue.birthday = formatDate(fieldsValue.birthday, 'YYYY-MM-DD') + fieldsValue.hiredate = formatDate(fieldsValue.hiredate, 'YYYY-MM-DD') + fieldsValue.departure_time = formatDate(fieldsValue.departure_time, 'YYYY-MM-DD') + fieldsValue.posts = fieldsValue.posts ? JSON.stringify(fieldsValue.posts) : null + + // if (getDeptTreeBySelectTree) { + // fieldsValue.dept_code = getDeptTreeBySelectTree.dept_code + // fieldsValue.dept_name = getDeptTreeBySelectTree.title + // } + + if (getOrganTreeBySelectTree) { + fieldsValue.org_code = getOrganTreeBySelectTree.org_code + fieldsValue.org_name = getOrganTreeBySelectTree.title + } + + handleAdd(fieldsValue) + }) + .catch(errInfo => {}) + } + + const afterClose = () =>{ + form.resetFields(); + } + + const handleJobStatusChange = (value) => { + setJobStatus(value) + } + + return ( + handleModalVisible()} + afterClose={() => afterClose()} + confirmLoading={loading} + > +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {/**/} + {/* */} + {/* */} + {/* */} + {/**/} + + + + + + */} + + + + + + + + + + + + + + + + + + + + + + + +