From 09999716dc654f6be1991ddea1696b0b86af1243 Mon Sep 17 00:00:00 2001 From: wangyunfei <1224056307@qq,com> Date: Tue, 23 Sep 2025 15:38:36 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E5=A4=A7=E5=8D=B1=E9=99=A9=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../safe_majorHazard/SafeMajorHazardList.js | 871 +----------------- .../safe_majorHazard/SafeMajorHazardList.less | 37 + .../safe_majorHazard/StaffSheetList.less | 128 --- .../module/EvaluationReport.js | 1 + .../module/OnlineMonitoring.js | 1 + .../module/ResponsibilityImplementation.js | 1 + .../safe_majorHazard/module/RiskAssessment.js | 1 + 7 files changed, 60 insertions(+), 980 deletions(-) create mode 100644 src/pages/safe_majorHazard/SafeMajorHazardList.less delete mode 100644 src/pages/safe_majorHazard/StaffSheetList.less create mode 100644 src/pages/safe_majorHazard/module/EvaluationReport.js create mode 100644 src/pages/safe_majorHazard/module/OnlineMonitoring.js create mode 100644 src/pages/safe_majorHazard/module/ResponsibilityImplementation.js create mode 100644 src/pages/safe_majorHazard/module/RiskAssessment.js diff --git a/src/pages/safe_majorHazard/SafeMajorHazardList.js b/src/pages/safe_majorHazard/SafeMajorHazardList.js index 149e30c..b21c6fa 100644 --- a/src/pages/safe_majorHazard/SafeMajorHazardList.js +++ b/src/pages/safe_majorHazard/SafeMajorHazardList.js @@ -1,860 +1,27 @@ -import React, {Fragment, PureComponent} from 'react'; -import { - DeleteOutlined, - EditOutlined, - PlusOutlined, - SearchOutlined, - RedoOutlined, - DownOutlined, - ExclamationCircleFilled, - UpOutlined, -} from '@ant-design/icons'; -import {connect, history} from '@umijs/max'; -import {Button, Card, Divider, Dropdown, message, Modal, Popconfirm, Space, Switch, Tag,Row,Col} from 'antd'; -import StandardTable from '@/components/StandardTable'; +import React from 'react'; +import { Card, Row, Col, Statistic, Progress, Button, Space } from 'antd'; -import { MyIcon } from "@/components/Icon" -import style from "@/global.less"; -import StaffSheetCreateForm from './form/StaffSheetCreateForm'; //新增表单 -import StaffSheetUpdateForm from './form/StaffSheetUpdateForm'; //修改表单 -import StaffSheetViewForm from './form/StaffSheetViewForm'; //查看表单 -import StaffSheetRenderSimpleForm from './form/StaffSheetRenderSimpleForm'; //简单查询表单 -import StaffSheetRenderAdvancedForm from './form/StaffSheetRenderAdvancedForm'; //高级查询表单 -import styles from './StaffSheetList.less'; -import datadictionary from "@/utils/dataDictionary"; -import {formatDate} from "@/utils/formatUtils"; -import { formatDictText, checkButtonAuthority } from "@/utils/globalCommon"; +import styles from './SafeMajorHazardList.less'; -const { confirm } = Modal; +const SafeMajorHazardList = () => { -//预约类型 -const sex_type = datadictionary.sex -const user_status = datadictionary.user_status -const sys_user_post = datadictionary.sys_user_post - -const mockData = { - list: [ - { - gx: "--", - gslx: "排班", - ks: "中医科", - lc: "11", - kssj: "08:00", - jssj: "18:00", - cxsc: "8", - sjly: "" - }, - { - gx: "--", - gslx: "考勤", - ks: "中医科", - lc: "11", - kssj: "07:00", - jssj: "20:00", - cxsc: "11", - sjly: "" - }, - { - gx: "照顾A", - gslx: "照顾", - ks: "中医科", - lc: "11", - kssj: "09:00", - jssj: "10:00", - cxsc: "1", - sjly: "人工上传" - }, - { - gx: "照顾B", - gslx: "照顾", - ks: "中医科", - lc: "11", - kssj: "10:00", - jssj: "11:00", - cxsc: "1", - sjly: "人工上传" - }, - { - gx: "照顾C", - gslx: "照顾", - ks: "中医科", - lc: "11", - kssj: "11:00", - jssj: "13:00", - cxsc: "2", - sjly: "人工上传" - }, - { - gx: "接病人D", - gslx: "接送", - ks: "急诊", - lc: "1", - kssj: "14:00", - jssj: "16:00", - cxsc: "2", - sjly: "his" - }, - { - gx: "照顾A", - gslx: "照顾", - ks: "心脏内科", - lc: "9", - kssj: "16:00", - jssj: "18:00", - cxsc: "2", - sjly: "his" - }, - { - gx: "送病人B", - gslx: "接送", - ks: "急诊", - lc: "1", - kssj: "18:00", - jssj: "20:00", - cxsc: "2", - sjly: "his" - }, - { - gx: "照顾C", - gslx: "照顾", - ks: "中医科", - lc: "11", - kssj: "20:00", - jssj: "21:00", - cxsc: "1", - sjly: "系统采集" - }, - ], - pagination: {}, -} -@connect(({ staffsheet, loading }) => ({ - staffsheet, - loading: loading.models.staffsheet, -})) -class StaffSheetList extends PureComponent { - state = { - modalVisible: false, - updateModalVisible: false, - viewModalVisible: false, - expandForm: false, - selectedRows: [], - formValues: {}, - updateFormValues: {}, - viewFormValues: {}, - toggleExpand: false, - } - columns = [ - { - title: '工序', - dataIndex: 'gx', - key: 'gx', - width: 80, - fixed: 'left', - }, { - title: '工时类型', - dataIndex: 'gslx', - key: 'gslx', - width: 100, - fixed: 'left', - },{ - title: '科室', - dataIndex: 'ks', - key: 'ks', - width: 80, - }, { - title: '楼层', - dataIndex: 'lc', - key: 'lc', - width: 80, - },{ - title: '开始时间', - dataIndex: 'kssj', - key: 'kssj', - width: 100, - }, { - title: '结束时间', - dataIndex: 'jssj', - key: 'jssj', - width: 100, - }, { - title: '持续时长(小时)', - dataIndex: 'cxsc', - key: 'cxsc', - width: 100, - }, - { - title:
- 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 - 21 - 22 - 23 - 0 - 1 - 2 - 3 - 4 - 5 -
, - dataIndex: 'tj', - key: 'tj', - width: 750, - render: (text, record,index) => { - console.log(record,77777) - if(index == 0) { - return ( - -
-
-
- ) - } else if(index == 1) { - return ( - -
-
-
- ) - } else if(index == 2) { - return ( - -
-
-
- ) - } else if(index == 3) { - return ( - -
-
- ) - } else if(index == 4) { - return ( - -
-
- ) - } else if(index == 5) { - return ( - -
-
- ) - } else if(index == 6) { - return ( - -
-
- ) - } else if(index == 7) { - return ( - -
-
- ) - } else if(index == 8) { - return ( - -
-
- ) - } - } - }, - { - title: '数据来源', - dataIndex: 'sjly', - key: 'sjly', - width: 100, - }, - { - title: '操作', - fixed: 'right', - width: 100, - render: (text, record) => { - return ( - - 修改 - - ) - } - }, - ] - - componentDidMount() { - // const { dispatch, staffsheet: { params } } = this.props + return ( +
+
+ + + + +
- // dispatch({ - // type: 'timesheet/query_page_for_prouser', - // }) +
+ - // this.setState({ - // expandForm: params?.expandForm || false, - // }) - } +
+
+ ); +}; - handleStandardTableChange = (pagination, sorter) => { - const { dispatch } = this.props - const { formValues } = this.state - - const params = { - currentPage: pagination.current, - pageSize: pagination.pageSize, - ...formValues - } - - sorter.field && (params.sorter = `${sorter.field}_${sorter.order}`) - - // dispatch({ - // type: 'prouser/query_page_for_prouser', - // payload: params - // }) - } - - handleFormReset = () => { - const { dispatch } = this.props - this.setState({ - formValues: {} - }) - - // dispatch({ - // type: 'prouser/query_page_for_prouser', - // payload: { - // resetFlag: true - // } - // }) - } - - toggleForm = () => { - const { expandForm } = this.state - this.setState({ - expandForm: !expandForm - }) - } - - handleSelectRows = rows => { - this.setState({ - selectedRows: rows - }) - } - - handleSearch = values => { - const { dispatch } = this.props - const { expandForm } = this.state - - this.setState({ - formValues: values - }) - - // dispatch({ - // type: 'prouser/query_page_for_prouser', - // payload: { - // ...values, - // resetFlag: true, - // expandForm - // } - // }) - } - - handleModalVisible = flag => { - this.setState({ - modalVisible: !!flag - }) - } - - handleUpdateModalVisible = (flag, record) => { - this.setState({ - updateModalVisible: !!flag, - updateFormValues: record || {} - }) - } - - handleViewModalVisible = (flag, record) => { - this.setState({ - viewModalVisible: !!flag, - viewFormValues: record || {} - }) - } - - handleAdd = fields => { - const { dispatch } = this.props - - dispatch({ - type: 'prouser/insert_for_prouser', - payload: { - user_id: fields.user_id, - user_name: fields.user_name, - user_name_cn: fields.user_name_cn, - user_name_en: fields.user_name_en, - password: fields.password, - email: fields.email, - phone: fields.phone, - landline: fields.landline, - sex: fields.sex, - avatar: fields.avatar, - sign: fields.sign, - tags: fields.tags, - id_card: fields.id_card, - birthday: fields.birthday, - job_status: fields.job_status, - hiredate: fields.hiredate, - departure_time: fields.departure_time, - user_type: fields.user_type, - emp_no: fields.emp_no, - access_card_no: fields.access_card_no, - country: fields.country, - province: fields.province, - city: fields.city, - address: fields.address, - work_addr: fields.work_addr, - floor: fields.floor, - inprovince: fields.inprovince, - // dept_code: fields.dept_code, - // dept_name: fields.dept_name, - inner_dept_code: fields.inner_dept_code, - org_code: fields.org_code, - org_name: fields.org_name, - inner_org_code: fields.inner_org_code, - posts: fields.posts, - wx_openid: fields.wx_openid, - wx_mpopenid: fields.wx_mpopenid, - wx_miniopenid: fields.wx_miniopenid, - wx_unionid: fields.wx_unionid, - mobile_imei: fields.mobile_imei, - device_num: fields.device_num, - al_taobao: fields.al_taobao, - al_alipay: fields.al_alipay, - al_dingding: fields.al_dingding, - is_system_user: fields.is_system_user, - mgr_type: fields.mgr_type, - pwd_security_level: fields.pwd_security_level, - pwd_update_date: fields.pwd_update_date, - last_login_ip: fields.last_login_ip, - last_login_date: fields.last_login_date, - freeze_date: fields.freeze_date, - freeze_cause: fields.freeze_cause, - zindex: fields.zindex, - wx_msg: fields.wx_msg, - email_msg: fields.email_msg, - system_msg: fields.system_msg, - remarks: fields.remarks, - status: fields.status, - creator: fields.creator, - create_date: fields.create_date, - updater: fields.updater, - update_date: fields.update_date - }, - callback: (res) => { - if(res.success == true) { - message.success('添加成功') - this.handleModalVisible() - } - } - }) - } - - handleDeleteRecord = record => { - const { dispatch } = this.props - - dispatch({ - type: 'prouser/delete_by_primarykey_for_prouser', - payload: { - recordid: record.user_id - }, - callback: res => { - if (res.success) { - message.success('删除成功') - - this.setState({ - selectedRows: [] - }) - } - } - }) - } - - handleUpdate = fields => { - const { dispatch } = this.props - - dispatch({ - type: 'prouser/update_for_prouser', - payload: { - user_id: fields.user_id, - user_name: fields.user_name, - user_name_cn: fields.user_name_cn, - user_name_en: fields.user_name_en, - password: fields.password, - email: fields.email, - phone: fields.phone, - landline: fields.landline, - sex: fields.sex, - avatar: fields.avatar, - sign: fields.sign, - tags: fields.tags, - id_card: fields.id_card, - birthday: fields.birthday, - job_status: fields.job_status, - hiredate: fields.hiredate, - departure_time: fields.departure_time, - user_type: fields.user_type, - emp_no: fields.emp_no, - access_card_no: fields.access_card_no, - country: fields.country, - province: fields.province, - city: fields.city, - address: fields.address, - work_addr: fields.work_addr, - floor: fields.floor, - inprovince: fields.inprovince, - // dept_code: fields.dept_code, - // dept_name: fields.dept_name, - inner_dept_code: fields.inner_dept_code, - org_code: fields.org_code, - org_name: fields.org_name, - inner_org_code: fields.inner_org_code, - posts: fields.posts, - wx_openid: fields.wx_openid, - wx_mpopenid: fields.wx_mpopenid, - wx_miniopenid: fields.wx_miniopenid, - wx_unionid: fields.wx_unionid, - mobile_imei: fields.mobile_imei, - device_num: fields.device_num, - al_taobao: fields.al_taobao, - al_alipay: fields.al_alipay, - al_dingding: fields.al_dingding, - is_system_user: fields.is_system_user, - mgr_type: fields.mgr_type, - pwd_security_level: fields.pwd_security_level, - pwd_update_date: fields.pwd_update_date, - last_login_ip: fields.last_login_ip, - last_login_date: fields.last_login_date, - freeze_date: fields.freeze_date, - freeze_cause: fields.freeze_cause, - zindex: fields.zindex, - wx_msg: fields.wx_msg, - email_msg: fields.email_msg, - system_msg: fields.system_msg, - remarks: fields.remarks, - status: fields.status, - creator: fields.creator, - create_date: fields.create_date, - updater: fields.updater, - update_date: fields.update_date - }, - callback: (res) => { - if(res.success === true) { - message.success('修改成功') - this.handleUpdateModalVisible() - } - } - }) - } - - // 修改用户状态 - handleUpdateUserStatus = (fields, status, msg) => { - const { dispatch } = this.props - - confirm({ - title: `确定要 ${ msg } 当前用户的吗?`, - icon: , - onOk() { - dispatch({ - type: 'prouser/update_for_prouser', - payload: { - user_id: fields.user_id, - status: status, - }, - callback: (res) => { - if(res.success === true) { - message.success('修改成功') - } - } - }) - } - }) - } - - // 修改用户密码 - handleUpdateUserPassword = fields => { - const { dispatch } = this.props - confirm({ - title: '确定要重置当前用户的密码吗?', - icon: , - onOk() { - dispatch({ - type: 'prouser/resetpwd_for_prouser', - payload: { - user_id: fields.user_id - }, - callback: (res) => { - if(res.success === true) { - message.success('重置成功') - } - } - }) - } - }) - } - - renderSimpleForm() { - const { staffsheet: { params } } = this.props - const parentMethods = { - handleSearch: this.handleSearch, - handleFormReset: this.handleFormReset, - toggleForm: this.toggleForm, - params - } - - return - } - - renderAdvancedForm() { - const { dispatch, prouser: { selectDeptTree, selectOrganTree, params } } = this.props - const parentMethods = { - handleSearch: this.handleSearch, - handleFormReset: this.handleFormReset, - toggleForm: this.toggleForm, - dispatch: dispatch, - selectDeptTree: selectDeptTree, - selectOrganTree: selectOrganTree, - params - } - - return - } - - renderForm() { - const { expandForm } = this.state - return expandForm ? this.renderAdvancedForm() : this.renderSimpleForm() - } - - handleCollapse = () => { - const { toggleExpand } = this.state - this.setState({ - toggleExpand: !toggleExpand - }) - } - - render() { - const { - staffsheet: { - data, - selectDeptTree, - selectOrganTree - }, - loading, - dispatch - } = this.props - const { - selectedRows, - modalVisible, - updateModalVisible, - viewModalVisible, - updateFormValues, - viewFormValues, - toggleExpand - } = this.state - - const parentMethods = { - handleAdd: this.handleAdd, - handleModalVisible: this.handleModalVisible, - dispatch: dispatch, - loading, - selectDeptTree: selectDeptTree, - selectOrganTree: selectOrganTree - } - - const updateMethods = { - handleUpdateModalVisible: this.handleUpdateModalVisible, - handleUpdate: this.handleUpdate, - dispatch: dispatch, - loading, - selectDeptTree: selectDeptTree, - selectOrganTree: selectOrganTree - } - - const viewMethods = { - handleViewModalVisible: this.handleViewModalVisible - } - - return ( - <> - -
-
{this.renderForm()}
- -
this.handleCollapse()}> - {toggleExpand ? <> 收起 : <> 展开} -
-
-
-
-
-
名称
-
张三
-
-
-
考勤类型
-
排班制
-
-
-
出勤人效(件/小时)
-
10000
-
-
-
作业人效(件/小时)
-
12000
-
-
-
人效出勤工时(小时)
-
8
-
-
-
出勤工时占比(%)
-
100%
-
-
-
-
-
工号
-
123456
-
-
-
在职时长(小时)
-
1200
-
-
-
外出就餐时长(小时)
-
0
-
-
-
直接作业工时(小时)
-
7
-
-
-
间接作业工时(小时)
-
1
-
-
-
闲置工时(小时)
-
0
-
-
-
-
-
工作性质
-
外包
-
-
-
总件数(件)
-
9000
-
-
-
离岗休息时长(小时)
-
0
-
-
-
直接作业工时占比(%)
-
84
-
-
-
闲置工时占比(%)
-
0
-
-
-
闲置工时(小时)
-
0
-
-
-
-
-
- - -
-
-
-
- 排班时间 -
-
-
- 考勤时间 -
-
-
- 修改状态 -
-
-
- 闲置工时 -
-
-
- 直接工时 -
-
-
- 离岗休息 -
-
-
-
-
共20项
-
- total} - /> -
-
- - {modalVisible && } - - {updateFormValues && Object.keys(updateFormValues).length ? ( - - ) : null} - - {viewFormValues && Object.keys(viewFormValues).length ? ( - - ) : null} - - ) - } -} - -export default StaffSheetList +export default SafeMajorHazardList; diff --git a/src/pages/safe_majorHazard/SafeMajorHazardList.less b/src/pages/safe_majorHazard/SafeMajorHazardList.less new file mode 100644 index 0000000..d353ec3 --- /dev/null +++ b/src/pages/safe_majorHazard/SafeMajorHazardList.less @@ -0,0 +1,37 @@ +.container { + background-color: pink; + // background-color: transparent; + width: 100%; + height: 89vh; + overflow: hidden; + + .TopButton { + display: flex; + gap: 24px; + margin-left: 6px; + background-color: red; + + .TopButtonItem { + background-color: transparent !important; + color: #333333 !important; + font-size: 14px !important; + border-radius: 8px !important; + padding: 6px 10px !important; + height: auto !important; + border: none !important; + line-height: 1.2 !important; + + &:hover { + color: #333333 !important; + border: none !important; + } + + &:active, + &:focus { + background-color: #2E4CD4 !important; + color: #fff !important; + } + } + } + +} \ No newline at end of file diff --git a/src/pages/safe_majorHazard/StaffSheetList.less b/src/pages/safe_majorHazard/StaffSheetList.less deleted file mode 100644 index c786cb9..0000000 --- a/src/pages/safe_majorHazard/StaffSheetList.less +++ /dev/null @@ -1,128 +0,0 @@ -@import '~@/utils/utils.less'; - -.proUsertableList { - .proUsertableListOperator { - margin-bottom: 16px; - button { - margin-right: 8px; - } - } - - .editColumn { - > div:last-child { - display: none; - } - } -} - -.proUsertableListForm { - height: 45px; - :global { - .ant-form-item { - display: flex; - margin-right: 0; - margin-bottom: 24px; - - .ant-form-item-label { - // width: 80px; - // padding-right: 8px; - line-height: 32px; - text-align: left; - } - - .ant-form-item-control { - line-height: 32px; - width: calc(100% - 80px); - - .ant-form-item-control-input-content { - height: 32px; - } - } - - > .ant-row { - flex-wrap: nowrap; - } - } - - .ant-form-item-control-wrapper { - flex: 1; - } - } -} - -.summaryButton { - width: 80px; - height: 30px; - line-height: 30px; - font-size: 12px; - background-color: #eff1f3; - border-radius: 20px; - cursor: pointer; -} - -.summaryContent { - display: flex; - margin-top: 10px; - > div { - flex: 2; - height: 60px; - border-right: 2px solid #eeeeee; - padding-left: 10px; - // background-color: #1890FF - } - .titleLabel { - color: #b2b2b2; - font-weight: 500; - margin-bottom: 10px; - } - .titleVal { - font-weight: 500; - } -} - -.operateContent { - display: flex; - margin: 20px 0; - justify-content: space-between; - .workClass { - display: inline-block; - width: 10px; - height: 10px; - margin-left: 10px; - } -} - -.pbsjStyle { - display: inline-block; - width: 120px; - height: 40px; - margin-left: 56px; - background-color: #faf07a; -} -.kqsjStyle { - display: inline-block; - width: 180px; - height: 40px; - margin-left: 29px; - background-color: #9cc5fc; -} -.xzStyle { - display: inline-block; - width: 60px; - height: 40px; - margin-left: 29px; - background-color: #454545; -} - -.zjgsStyle { - display: inline-block; - width: 30px; - height: 40px; - background-color: #8ddd15; -} - -.timeGraphic { - span { - padding: 0 10px; - } -} diff --git a/src/pages/safe_majorHazard/module/EvaluationReport.js b/src/pages/safe_majorHazard/module/EvaluationReport.js new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/src/pages/safe_majorHazard/module/EvaluationReport.js @@ -0,0 +1 @@ + diff --git a/src/pages/safe_majorHazard/module/OnlineMonitoring.js b/src/pages/safe_majorHazard/module/OnlineMonitoring.js new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/src/pages/safe_majorHazard/module/OnlineMonitoring.js @@ -0,0 +1 @@ + diff --git a/src/pages/safe_majorHazard/module/ResponsibilityImplementation.js b/src/pages/safe_majorHazard/module/ResponsibilityImplementation.js new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/src/pages/safe_majorHazard/module/ResponsibilityImplementation.js @@ -0,0 +1 @@ + diff --git a/src/pages/safe_majorHazard/module/RiskAssessment.js b/src/pages/safe_majorHazard/module/RiskAssessment.js new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/src/pages/safe_majorHazard/module/RiskAssessment.js @@ -0,0 +1 @@ +