From e7f99f757c1eb68c6e9d0cc1f7386ad5b7c07777 Mon Sep 17 00:00:00 2001 From: wyw <571921741@qq.com> Date: Tue, 5 Mar 2024 14:25:42 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=90=8C=E6=AD=A5=20SPS?= =?UTF-8?q?=3D>=20SMS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/baseComponents/EditBaseComponent/index.js | 29 ++++ .../CustomPages/BS/BS006ShowPrint.js | 4 +- .../CustomPages/BS/BS042ShowPrint.js | 50 ++++-- src/components/CustomPages/BS/BS044Check.js | 2 + .../CustomPages/BS/BS072ShowPrint.js | 99 ++++++++++++ .../CustomPages/BS/BS073ShowPrint.js | 153 ++++++++++++++++++ .../CustomPages/BS/BS074ShowPrint.js | 138 ++++++++++++++++ src/files/edit/BS006.js | 1 - src/files/edit/BS057.js | 2 +- src/files/edit/BS072.js | 10 ++ src/files/edit/BS073.js | 10 ++ src/files/edit/BS074.js | 10 ++ src/utils/customConfig.js | 3 + src/utils/customConfig1.js | 3 + 14 files changed, 500 insertions(+), 14 deletions(-) create mode 100644 src/components/CustomPages/BS/BS072ShowPrint.js create mode 100644 src/components/CustomPages/BS/BS073ShowPrint.js create mode 100644 src/components/CustomPages/BS/BS074ShowPrint.js create mode 100644 src/files/edit/BS072.js create mode 100644 src/files/edit/BS073.js create mode 100644 src/files/edit/BS074.js diff --git a/src/baseComponents/EditBaseComponent/index.js b/src/baseComponents/EditBaseComponent/index.js index 7152b09..cadafde 100644 --- a/src/baseComponents/EditBaseComponent/index.js +++ b/src/baseComponents/EditBaseComponent/index.js @@ -648,6 +648,35 @@ params【字段属性】=值 const rulesMethod = []; if (isRequire) { + debugger + if (!errVerifyMsg) { + switch (col.controlType) { + case 25: errVerifyMsg = "请上传" + label + break; + case 2: + case 3: + case 4: + case 5: + case 8: + case 9: + case 10: + case 11: + case 12: + case 14: + case 15: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: errVerifyMsg = "请选择" + label + break; + default:errVerifyMsg = "请输入" + label + break; + } + } rulesMethod.push({ required: !!isRequire, message: errVerifyMsg ? errVerifyMsg : '请输入' + label, diff --git a/src/components/CustomPages/BS/BS006ShowPrint.js b/src/components/CustomPages/BS/BS006ShowPrint.js index e764f4b..df292c5 100644 --- a/src/components/CustomPages/BS/BS006ShowPrint.js +++ b/src/components/CustomPages/BS/BS006ShowPrint.js @@ -155,9 +155,9 @@ class BS006ShowPrint extends React.Component { data ? - + @@ -172,8 +172,8 @@ class BS006ShowPrint extends React.Component { {data.Nav_ListRiskSubmitContent.map((item, i) => { console.log(item) return - + : null } + { + //验收人确定 + isDealUserCheck ? : null + }
问题等级 检查问题 整改建议与措施问题等级 隐患原因 隐患地点 附件
{this.props.app.enums.BSQuestionLevelEnum.enums[item.QUESTION_LEVEL]} {item.DESCREPTION}{item.DEMAND}{this.props.app.enums.BSQuestionLevelEnum.enums[item.QUESTION_LEVEL]} { item.Nav_ListRiskQuestionReason && item.Nav_ListRiskQuestionReason.map((item2, i) => { diff --git a/src/components/CustomPages/BS/BS042ShowPrint.js b/src/components/CustomPages/BS/BS042ShowPrint.js index 50f635c..b746a6c 100644 --- a/src/components/CustomPages/BS/BS042ShowPrint.js +++ b/src/components/CustomPages/BS/BS042ShowPrint.js @@ -107,7 +107,7 @@ class BS042ShowPrint extends React.Component { isActualDealCheck = false } - + if (isCheckerCheck) isCheckerCheck = (this.state.loginid == ret.Nav_ListRiskSubmitContent[0].DEAL_USER_ID && ret.Nav_ListRiskSubmitContent[0].RiskContentState == 15) ? true : false//CHECK_USER_ID if (isDealUserCheck) @@ -143,7 +143,6 @@ class BS042ShowPrint extends React.Component { this.state.DEALOPINION = val } sureCheck = (val) => { - debugger var tmpData = this.props.data if (val == 1 || val == 2) { //整改责任人 同意 @@ -194,6 +193,33 @@ class BS042ShowPrint extends React.Component { } } + //新版验收人确认 + CheckerCheckToActual = (val) => { + var tmpData = this.props.data + //验收人 同意 + if (val == 20 && (this.state.DEALOPINION == undefined || this.state.DEALOPINION == null || this.state.DEALOPINION == '')) { + // message.success('请填写驳回意见!') + message.error('请填写驳回意见!') + return false; + } + this.setState({ + // data: tmpData, + isOKLoad: val == 20 ? false : true, + isRejectLoad: val == 20 ? true : false, + }, () => { + let json = initFilter(this.props.login.OrgId, this.props.data.id, null, null, null, this.props.data.TaskID, val, this.state.DEALOPINION); + this.props.dispatch({ + type: 'app/getDataByPost', + payload: json, + url: 'BS/BSRiskSubmit/CheckerCheckToActual', + onComplete: (ret) => { + this.BtnClose() + } + }); + }) + + } + sureCheckActualDeal = () => { let json = initFilter(this.props.login.OrgId, this.props.data.id, null, null, null, this.props.data.TaskID); // extendRule(json, 'ID', 1, this.props.data.id); @@ -221,6 +247,10 @@ class BS042ShowPrint extends React.Component { //整改落实人确定 isActualDealCheck ?
@@ -287,11 +317,11 @@ class BS042ShowPrint extends React.Component { {/* {isActualDealCheck ? item.Nav_UserActualDeal?.NAME : ( {item.Nav_UserActualDeal?.NAME} )} */} {(isActualDealCheck || data.Nav_ListRiskSubmitContent[0].Nav_UserActualDeal != null) ? (isActualDealCheck ? { {item.Nav_UserActualDeal?.NAME} } : {item.Nav_UserActualDeal?.NAME}) : null} - + { - item.Nav_Files && item.Nav_Files.map((item, i) => { - return {item.Nav_ImgFile.FILE_NAME} - }) + item.Nav_Files && item.Nav_Files.map((item, i) => { + return {item.Nav_ImgFile.FILE_NAME} + }) } })} @@ -300,7 +330,7 @@ class BS042ShowPrint extends React.Component { : null } - { + {/* { // 验收人验收 // (riskContentState == 15 || riskContentState == 17) ? ((isCheckerCheck || isDealUserCheck) && !isActualDealCheck) ? @@ -316,13 +346,13 @@ class BS042ShowPrint extends React.Component { - {/*10 : 1 */} - {/* 20 : 2 */} + + : null - } + } */} diff --git a/src/components/CustomPages/BS/BS044Check.js b/src/components/CustomPages/BS/BS044Check.js index 72fc443..015439b 100644 --- a/src/components/CustomPages/BS/BS044Check.js +++ b/src/components/CustomPages/BS/BS044Check.js @@ -163,6 +163,7 @@ class BS044Check extends React.Component { {data.Nav_SubmitContent.DEMAND} {data.DEALDESCRIBE} {data.Nav_SubmitContent.ADDRESS} + {/*
*/} { data.Nav_Files && data.Nav_Files.map((item, i) => { return {item.Nav_ImgFile.FILE_NAME} @@ -174,6 +175,7 @@ class BS044Check extends React.Component { return {item.Nav_ImgFile.FILE_NAME} }) } + {/*
*/} {data.Nav_SubmitContent.RiskContentState > 36 ? showUserSign(data.Nav_UserDeal, config.picServerHost) : null} {data.Nav_SubmitContent.RiskContentState >= 38 ? showUserSign(data.Nav_UserCheck, config.picServerHost) : null} diff --git a/src/components/CustomPages/BS/BS072ShowPrint.js b/src/components/CustomPages/BS/BS072ShowPrint.js new file mode 100644 index 0000000..f986a91 --- /dev/null +++ b/src/components/CustomPages/BS/BS072ShowPrint.js @@ -0,0 +1,99 @@ +import { Button, Descriptions, Badge, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd'; +import React from 'react'; +import { initFilter, extendRule, extendInclude, setDataFieldValue, showApprove, guid, initQueryFilter, ShowDateTime, ShowPrintClose, showFiles } from '../../../utils/common'; +import ReactToPrint from 'react-to-print'; +import { ExportToExcel } from '@woowalker/feui' +import XLSX from 'xlsx'; +import { connect } from 'dva'; +import moment from 'moment'; +import { message } from 'antd/lib/index'; +import styles from '../../../components/CustomPages/HI/StepForm.css'; +import config from '../../../config.js'; +import FormPage from '../../FormPage' +class BS072ShowPrint extends React.Component { + constructor(props) { + super(props); + this.state = { + data: null, + btndisplay: 'none', + isCheck: false, //是否待办 审批 + } + } + + componentDidMount() { + if (this.props.data?.id) + this.loadData(this.props.data?.id); + } + + componentWillReceiveProps(NextProps) { + if (NextProps.data?.id && this.props.data?.id != NextProps.data?.id) { + this.loadData(NextProps.data?.id); + } + } + + onTableBtnExport() { + let TableWrap = document.getElementById('table1'); + let Table = TableWrap.getElementsByTagName('table1')[0]; + const wb = XLSX.utils.table_to_book(Table); + XLSX.writeFile(wb, this.props.record.Nav_Department.NAME + '.xlsx') + + } + + onClickApprove = (appVisible) => { + const newtmpData = { + data: { id: this.props.data.id, isShow: true, key: guid(), param: this.props.data.param, appVisible: appVisible, BtnAgreeDisplay: 'none' }, + formCode: 'PF123', + } + this.setState({ + tmpData: newtmpData, + }); + } + loadData = (id) => { + var isCheck = (this.props.data.tableKey != undefined && this.props.data.tableKey == '1') ? true : false + var orgId = this.props.login ? this.props.login.OrgId : ''; + let json = initFilter(orgId); + extendRule(json, 'ID', 1, id); + extendInclude(json, 'Nav_RiskArea') + extendInclude(json, 'Nav_Files.Nav_ImgFile.Nav_File') + this.props.dispatch({ + type: 'app/getDataByPost', + payload: json, + url: 'BS/RiskSubmitContent/Get', + onComplete: (ret) => { + if (ret) { + this.setState({ + data: ret, + }) + } + } + }); + } + render() { + const { data } = this.state; + return
+
+ + + + + +
} content={() => this.componentRef} />
+
+ +
(this.componentRef = el)} style={{ padding: '20px', paddingTop: '20px' }} id={'tableId' + this.props.data.id}> +

隐患上报明细

+ { + data ?
+ + {data.Nav_RiskArea.NAME} + {data.ADDRESS} + {data.DESCRIBE} + {showFiles(data.Nav_Files, config.picServerHost)} + +
: null + } +
+
+ } +} +export default connect(({ login }) => ({ login }))(BS072ShowPrint) diff --git a/src/components/CustomPages/BS/BS073ShowPrint.js b/src/components/CustomPages/BS/BS073ShowPrint.js new file mode 100644 index 0000000..5233e69 --- /dev/null +++ b/src/components/CustomPages/BS/BS073ShowPrint.js @@ -0,0 +1,153 @@ +import { Button, Descriptions, Badge, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd'; +import React from 'react'; +import { initFilter, extendRule, extendInclude, extendIgnoreDataRule, setDataFieldValue, showApprove, guid, initQueryFilter, showFiles } from "../../../utils/common"; +import ReactToPrint from "react-to-print"; +import { ExportToExcel } from '@woowalker/feui' +import XLSX from 'xlsx'; +import { connect } from 'dva'; +import moment from 'moment'; +import { message } from "antd/lib/index"; +import styles from '../HI/StepForm.css'; +import config from "../../../config.js"; +import FormPage from '../../../components/FormPage' + +// 隐患上报查看 +class BS073ShowPrint extends React.Component { + constructor(props) { + super(props); + this.state = { + data: null, + listReason: '', + BtnAgreeDisplay: 'none', + }; + }; + + componentDidMount() { + if (this.props.data?.id) + this.loadData(this.props.data?.id); + } + + componentWillReceiveProps(NextProps) { + if (NextProps.data?.id && this.props.data?.id != NextProps.data?.id) { + this.loadData(NextProps.data?.id); + } + } + + + + BtnClose = () => { + if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function') + this.props.data.onCancel(); + } + + loadData = () => { + let json = initFilter(this.props.login.OrgId); + extendRule(json, 'ID', 1, this.props.data.id); + extendInclude(json, 'Nav_Submit.Nav_CheckType'); + extendInclude(json, 'Nav_Submit.Nav_CheckTypeLevel.Nav_Enums'); + extendInclude(json, 'Nav_Submit.Nav_User'); + extendInclude(json, 'Nav_Submit'); + extendInclude(json, 'Nav_Files.Nav_ImgFile.Nav_File'); + extendInclude(json, 'Nav_CheckProject'); + extendInclude(json, 'Nav_CheckProjectCategory'); + extendInclude(json, 'Nav_RiskArea'); + extendInclude(json, 'Nav_ListRiskQuestionReason.Nav_RiskReason'); + extendInclude(json, 'Nav_ListRiskQuestionReason'); + extendInclude(json, 'Nav_DepartmentDeal'); + extendInclude(json, 'Nav_UserDeal'); + extendInclude(json, 'Nav_UserCheck'); + extendIgnoreDataRule(json) + + this.props.dispatch({ + type: 'app/getDataByPost', + payload: json, + url: 'BS/RiskSubmitContent/Get', + onComplete: (ret) => { + if (ret) { + // 制表审核 + // 检查结果审核 + var listReason = '' + ret.Nav_ListRiskQuestionReason.forEach(element => { + listReason += ' ' + element.Nav_RiskReason.NAME + }); + + this.setState({ //设置setState全局变量 + data: ret, //将ret对象赋值给data, data供页面调用 + listReason: listReason + }) + } + } + }); + } + + onClickApprove = (appVisible) => { + const newtmpData = { + data: { id: this.props.data.id, isShow: true, key: guid(), PARAM2: this.props.data.PARAM2, appVisible: appVisible, BtnAgreeDisplay: 'none' }, + formCode: "PF123", + } + this.setState({ + tmpData: newtmpData, + }); + } + onTableBtnExport() { + let TableWrap = document.getElementById('tableId' + this.props.data.id); + let Table = TableWrap.getElementsByTagName('table')[0]; + const wb = XLSX.utils.table_to_book(Table); + XLSX.writeFile(wb, "手动上报完善.xlsx") + } + + render() { + const { data, listReason } = this.state; + const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums; + return
+
+ + + + + + + + +
} content={() => this.componentRef} pageStyle={"#tableId" + this.props.data.id + " { padding:0 40px;} img{width :120px}"} />
+
+ + + {/* 检查表制定 */} +
(this.componentRef = el)} style={{ padding: '20px', paddingTop: '20px' }} id={'tableId' + this.props.data.id}> +

手动上报-指定责任单位

+ { + data ?
+ + {data.Nav_Submit?.Nav_CheckType?.NAME} + {data.Nav_Submit?.Nav_CheckTypeLevel?.Nav_Enums?.NAME} + {data.Nav_Submit?.Nav_User?.NAME} + {data.Nav_Submit.CHECKTIME}{/*CHECKTIME */} + {data.DESCRIBE} + { + showFiles(data?.Nav_Files, config.picServerHost) + } + {data.Nav_CheckProject?.NAME} + {data.Nav_CheckProjectCategory?.NAME} + {data.Nav_RiskArea?.NAME} + {data.ADDRESS} + {data.CHECKCONTENT} + {data.DESCREPTION} + {enums.BSQuestionLevelEnum.enums[data.QUESTION_LEVEL]} + {data.DEMAND} + {data.LastDateSystem?.split(' ')[0]} + {data.LastDateUser?.split(' ')[0]} + {listReason} + {data.Nav_DepartmentDeal?.NAME} + {data.Nav_UserDeal?.NAME} + {data.Nav_UserCheck?.NAME} + + +
: null + } +
+
+ } +} + +export default connect(({ login, app }) => ({ login, app }))(BS073ShowPrint) \ No newline at end of file diff --git a/src/components/CustomPages/BS/BS074ShowPrint.js b/src/components/CustomPages/BS/BS074ShowPrint.js new file mode 100644 index 0000000..48400f2 --- /dev/null +++ b/src/components/CustomPages/BS/BS074ShowPrint.js @@ -0,0 +1,138 @@ +import { Button, Descriptions, Badge, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd'; +import React from 'react'; +import { initFilter, extendRule, extendInclude, setDataFieldValue, showApprove, guid, initQueryFilter, ShowDateTime, ShowPrintClose, showFiles } from '../../../utils/common'; +import ReactToPrint from 'react-to-print'; +import { ExportToExcel } from '@woowalker/feui' +import XLSX from 'xlsx'; +import { connect } from 'dva'; +import moment from 'moment'; +import { message } from 'antd/lib/index'; +import styles from '../../../components/CustomPages/HI/StepForm.css'; +import config from '../../../config.js'; +import FormPage from '../../FormPage' +class BS074ShowPrint extends React.Component { + constructor(props) { + super(props); + this.state = { + data: null, + btndisplay: 'none', + isCheck: false, //是否待办 审批 + } + } + + componentDidMount() { + if (this.props.data?.id) + this.loadData(this.props.data?.id); + } + + componentWillReceiveProps(NextProps) { + if (NextProps.data?.id && this.props.data?.id != NextProps.data?.id) { + this.loadData(NextProps.data?.id); + } + } + + onTableBtnExport() { + let TableWrap = document.getElementById('table1'); + let Table = TableWrap.getElementsByTagName('table1')[0]; + const wb = XLSX.utils.table_to_book(Table); + XLSX.writeFile(wb, this.props.record.Nav_Department.NAME + '.xlsx') + + } + + onClickApprove = (appVisible) => { + const newtmpData = { + data: { id: this.props.data.id, isShow: true, key: guid(), param: this.props.data.param, appVisible: appVisible, BtnAgreeDisplay: 'none' }, + formCode: 'PF123', + } + this.setState({ + tmpData: newtmpData, + }); + } + loadData = (id) => { + var isCheck = (this.props.data.tableKey != undefined && this.props.data.tableKey == '1') ? true : false + var orgId = this.props.login ? this.props.login.OrgId : ''; + let json = initFilter(orgId); + extendRule(json, 'ID', 1, id); + extendInclude(json, 'Nav_ListRiskSubmitContent.Nav_RiskArea') + extendInclude(json, 'Nav_ListRiskSubmitContent.Nav_DepartmentDeal') + extendInclude(json, 'Nav_ListRiskSubmitContent.Nav_UserDeal') + extendInclude(json, 'Nav_ListRiskSubmitContent.Nav_UserCheck') + extendInclude(json, 'Nav_ListRiskSubmitContent.Nav_UserActualDeal') + this.props.dispatch({ + type: 'app/getDataByPost', + payload: json, + url: 'BS/BSRiskSubmitNoticePerson/GetNoticePeson', + onComplete: (ret) => { + if (ret) { + this.setState({ + data: ret, + }) + } + } + }); + } + render() { + const { data } = this.state; + const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums; + return
+
+ + + + + + +
} content={() => this.componentRef} />
+
+ +
(this.componentRef = el)} style={{ padding: '20px', paddingTop: '20px' }} id={'tableId' + this.props.data.id}> +

隐患通知

+ { + data ?
+ + {data.CODE} + {data.NAME} + {enums.BSQuestionLevelEnum.enums[data.QUESTION_LEVEL]} + +
: null + } + { + (data?.Nav_ListRiskSubmitContent && data?.Nav_ListRiskSubmitContent.length > 0) ? + + + + + + + + + + + + + + + + + {data?.Nav_ListRiskSubmitContent?.map((item, i) => { + return + + + + + + + + + + + })} + +
隐患上报明细
检查问题整改建议与措施检查区域隐患地点整改期限整改实施单位整改责任人验收人整改落实人
{item.DESCREPTION} {item.DEMAND} {item.Nav_RiskArea.NAME} {item.ADDRESS} {item.LastDateUser} {item.Nav_DepartmentDeal.NAME} {item.Nav_UserDeal.NAME} {item.Nav_UserCheck.NAME} {item.Nav_UserActualDeal.NAME}
+ : null + } +
+
+ } +} +export default connect(({ login, app }) => ({ login, app }))(BS074ShowPrint) diff --git a/src/files/edit/BS006.js b/src/files/edit/BS006.js index 0bab807..99fc858 100644 --- a/src/files/edit/BS006.js +++ b/src/files/edit/BS006.js @@ -8,7 +8,6 @@ export default { params.record.SUBMIT_STATUS = params.customParams; }, onBeforeEdit: ({ isNew, setFieldValue, stateData, data, setFieldEditable, getFieldValue, dispatch, ListCheckRiskArea, setFieldValueByBatch, setFieldVisible }) => { - debugger // BS006.js if (stateData.SUBMIT_TYPE == undefined || stateData.SUBMIT_TYPE == 10 || (stateData.Nav_ListRiskSubmitContent.length > 0 && stateData.Nav_ListRiskSubmitContent[0].CHECK_PROJECT_ID != null)) { //检查上报 隐藏 属性: 检查类型 检查层级 子表:检查项目 检查项目分类 diff --git a/src/files/edit/BS057.js b/src/files/edit/BS057.js index 07ced0a..7abfe35 100644 --- a/src/files/edit/BS057.js +++ b/src/files/edit/BS057.js @@ -308,7 +308,7 @@ export default { stateData.Nav_ListSafeCheckDetail[i].QUESTION_LEVEL = null stateData.Nav_ListSafeCheckDetail[i].CHECK_MAIN_ID = null stateData.Nav_ListSafeCheckDetail[i].DEMANDS = '' - message.error("请选择检查问题描述!") + // message.error("请选择检查问题描述!") return } } diff --git a/src/files/edit/BS072.js b/src/files/edit/BS072.js new file mode 100644 index 0000000..e0a3b1c --- /dev/null +++ b/src/files/edit/BS072.js @@ -0,0 +1,10 @@ +import { message } from 'antd' +import moment from 'moment'; +import styles from '../../components/CustomPages/HI/StepForm.css'; +import { extendInclude, extendRule, getDataFieldValue, initFilter, empty, extendOrder, guid, getSubTableData, auditOptionShow2 } from "../../utils/common"; +export default { + onBeforeSaveHandleRecord(params) { + params.record.TaskID = params.data.TaskID //TaskID传递消息表ID + params.record.RiskContentState = params.customParams;//实际并不是这个值 + }, +} diff --git a/src/files/edit/BS073.js b/src/files/edit/BS073.js new file mode 100644 index 0000000..603cd43 --- /dev/null +++ b/src/files/edit/BS073.js @@ -0,0 +1,10 @@ +import { message } from 'antd' +import moment from 'moment'; +import styles from '../../components/CustomPages/HI/StepForm.css'; +import { extendInclude, extendRule, getDataFieldValue, initFilter, empty, extendOrder, guid, getSubTableData, auditOptionShow2 } from "../../utils/common"; +export default { + onBeforeSaveHandleRecord(params) { + params.record.TaskID = params.data.TaskID //TaskID传递消息表ID + params.record.SUBMIT_STATUS = params.customParams; + } +} diff --git a/src/files/edit/BS074.js b/src/files/edit/BS074.js new file mode 100644 index 0000000..d863f88 --- /dev/null +++ b/src/files/edit/BS074.js @@ -0,0 +1,10 @@ +import { message } from 'antd' +import moment from 'moment'; +import styles from '../../components/CustomPages/HI/StepForm.css'; +import { extendInclude, extendRule, getDataFieldValue, initFilter, empty, extendOrder, guid, getSubTableData, auditOptionShow2 } from "../../utils/common"; +export default { + onBeforeSaveHandleRecord(params) { + params.record.TaskID = params.data.TaskID //TaskID传递消息表ID + params.record.OPERATETYPE = params.customParams; + } +} diff --git a/src/utils/customConfig.js b/src/utils/customConfig.js index d6ae7ba..95e127f 100644 --- a/src/utils/customConfig.js +++ b/src/utils/customConfig.js @@ -1704,6 +1704,9 @@ export default function (componentName, formId, formParam, data, formCode, formD BS064ShowPrint: , BS069ShowPrint: , BS070ShowPrint: , + BS072ShowPrint: , + BS074ShowPrint: , + BS073ShowPrint: , PreMeetingTask: , PreOperSchTask: , diff --git a/src/utils/customConfig1.js b/src/utils/customConfig1.js index 91ab826..852a168 100644 --- a/src/utils/customConfig1.js +++ b/src/utils/customConfig1.js @@ -262,6 +262,9 @@ export default function (componentName, formId, formParam, data, formCode, formD BS032ShowPrint: , BS064ShowPrint: , BS070ShowPrint: , + BS073ShowPrint: , + BS072ShowPrint: , + BS074ShowPrint: , PFCommonApprove: , From 050ac3fecfd054d7051adca3ec4fdad567bbbdb9 Mon Sep 17 00:00:00 2001 From: wyw <571921741@qq.com> Date: Tue, 5 Mar 2024 14:53:45 +0800 Subject: [PATCH 2/6] 34 --- src/components/CustomPages/CM/CM041LibShow.js | 384 ++++++++++++++++++ src/utils/customConfig.js | 6 + src/utils/customConfig1.js | 6 + 3 files changed, 396 insertions(+) create mode 100644 src/components/CustomPages/CM/CM041LibShow.js diff --git a/src/components/CustomPages/CM/CM041LibShow.js b/src/components/CustomPages/CM/CM041LibShow.js new file mode 100644 index 0000000..cec527a --- /dev/null +++ b/src/components/CustomPages/CM/CM041LibShow.js @@ -0,0 +1,384 @@ +import React, { useState, useEffect, useRef, Component } from "react"; +import { connect } from "dva"; +import { + initFilter, + addRuleAndGroups, + guid, + extendInclude, + extendRule, + extendOrder, + extend, + initQueryFilter, +} from "../../../utils/common"; +import { LocalSearch, LayoutCard } from '@woowalker/feui' +import { + Form, + Table, + Row, + Col, + Button, + Input, + Select, + Pagination, + DatePicker, +} from "antd"; +import echarts from "echarts"; +import moment from "moment"; +const { Option } = Select; + +const RangePicker = DatePicker.RangePicker +class CM041LibShow extends React.Component { + constructor(props) { + super(props); + this.state = { + pagination: {}, + retData: [], + columns: [ + { + title: '序号', + render: (value, record, index) => { + const obj = { + children: `${index + 1}`, + props: {}, + }; + + let arr = this.state.retData.filter((res) => { + return res.URGENT_EVENT_ID == record.URGENT_EVENT_ID; + }); + + if (index == 0 || this.state.retData[index - 1].URGENT_EVENT_ID != record.URGENT_EVENT_ID) { + obj.props.rowSpan = arr.length; + } else { + obj.props.rowSpan = 0; + } + + return obj; + }, + }, + { + title: "事件类型", + dataIndex: "Nav_UrgentEvent.Nav_EventType.NAME", + render: (value, record, index) => { + const obj = { + children: value, + props: {}, + }; + + let arr = this.state.retData.filter((res) => { + return res.URGENT_EVENT_ID == record.URGENT_EVENT_ID; + }); + + if (index == 0 || this.state.retData[index - 1].URGENT_EVENT_ID != record.URGENT_EVENT_ID) { + obj.props.rowSpan = arr.length; + } else { + obj.props.rowSpan = 0; + } + + return obj; + }, + }, + { + title: "预计影响范围", + dataIndex: "Nav_UrgentEvent.Nav_ListArearInfluence", + render: (value, record, index) => { + + var show = '' + value.forEach(e => { + show += ' ' + e.Nav_CoverageInfluence.NAME + }); + + const obj = { + children: show, + props: {}, + }; + + let arr = this.state.retData.filter((res) => { + return res.URGENT_EVENT_ID == record.URGENT_EVENT_ID; + }); + + if (index == 0 || this.state.retData[index - 1].URGENT_EVENT_ID != record.URGENT_EVENT_ID) { + obj.props.rowSpan = arr.length; + } else { + obj.props.rowSpan = 0; + } + + return obj; + + }, + }, + { + title: "影响范围描述", + dataIndex: "Nav_UrgentEvent.AREAR_INFLUENCE", + render: (value, record, index) => { + const obj = { + children: value, + props: {}, + }; + + let arr = this.state.retData.filter((res) => { + return res.URGENT_EVENT_ID == record.URGENT_EVENT_ID; + }); + + if (index == 0 || this.state.retData[index - 1].URGENT_EVENT_ID != record.URGENT_EVENT_ID) { + obj.props.rowSpan = arr.length; + } else { + obj.props.rowSpan = 0; + } + + return obj; + }, + + }, + { + title: "事故的后果", + dataIndex: "Nav_UrgentEvent.ACCIDENT_CONSEQUENCE", + render: (value, record, index) => { + const obj = { + children: value, + props: {}, + }; + + let arr = this.state.retData.filter((res) => { + return res.URGENT_EVENT_ID == record.URGENT_EVENT_ID; + }); + + if (index == 0 || this.state.retData[index - 1].URGENT_EVENT_ID != record.URGENT_EVENT_ID) { + obj.props.rowSpan = arr.length; + } else { + obj.props.rowSpan = 0; + } + + return obj; + }, + }, + { + title: "关联风险类型", + dataIndex: "Nav_UrgentEvent.Nav_ListEventRiskType", + render: (value, record, index) => { + var show = '' + value.forEach(e => { + show += ' ' + e.Nav_RiskType.NAME + }); + const obj = { + children: show, + props: {}, + }; + let arr = this.state.retData.filter((res) => { + return res.URGENT_EVENT_ID == record.URGENT_EVENT_ID; + }); + if (index == 0 || this.state.retData[index - 1].URGENT_EVENT_ID != record.URGENT_EVENT_ID) { + obj.props.rowSpan = arr.length; + } else { + obj.props.rowSpan = 0; + } + return obj; + }, + }, + { + title: "预案类型", + dataIndex: "Nav_ContingencyType.NAME", + }, + { + title: "是否编制", + dataIndex: "IS_DRAW_UP",// 是 = 10, 否 20 + render: (value) => { + debugger + return (value == null || value == undefined) ? '' : (value == 10 ? '是' : '否'); + }, + }, + { + title: "预案编制责任部门", + dataIndex: "Nav_Department.NAME" + }, + { + title: "责任人员", + dataIndex: "Nav_User.NAME" + }, + { + title: "要求完成时间", + dataIndex: "COMPLETE_TIME", + render: (value, record, index) => { + return (value != null && value.length > 0) ? value.split(' ')[0] : ''; + }, + }, + ], + loadParam: { + PageIndex: 1, + Limit: 10 + }, + showLoading: false, + TotalCount: 0, + PageIndex: 1, + search: { + EventTypeNAME: '',//"事件类型" "Nav_UrgentEvent.Nav_EventType.NAME", + CoverageInfluenceNAME: '',//"预计影响范围" "Nav_UrgentEvent.Nav_ListArearInfluence.Nav_CoverageInfluence.NAME", + AREAR_INFLUENCE: '',//"影响范围描述" Nav_UrgentEvent.AREAR_INFLUENCE + ACCIDENTCONSEQUENCE: '',//"事故的后果" Nav_UrgentEvent.ACCIDENT_CONSEQUENCE + ContingencyTypeNAME: '',//"预案类型" Nav_ContingencyType.NAME + DepartmentNAME: '',//"预案编制责任部门" "Nav_Department.NAME" + UserNAME: '',//"责任人员" Nav_User.NAME + COMPLETETIMES: '',//"要求完成时间" "COMPLETE_TIME" + COMPLETETIMEE: '',//"要求完成时间" "COMPLETE_TIME" + } + }; + } + + componentDidMount() { + this.loadData(); + } + renderSpeedColumn = () => { + return { className: 'redTableCell' } + } + handleSearch = () => { + this.loadData() + } + loadData = (pageIndex, limit) => { + + var orgId = this.props.login ? this.props.login.OrgId : ''; + let json = initFilter(orgId); + json.PageIndex = pageIndex ? pageIndex : 1 + json.Limit = limit ? limit : 10 + + extendInclude(json, 'Nav_UrgentEvent.Nav_EventType') + extendInclude(json, 'Nav_UrgentEvent.Nav_Department') + extendInclude(json, 'Nav_UrgentEvent.Nav_ListEventRiskType.Nav_RiskType') + extendInclude(json, 'Nav_UrgentEvent.Nav_ListArearInfluence.Nav_CoverageInfluence') + extendInclude(json, 'Nav_UrgentEvent.Nav_User') + extendInclude(json, 'Nav_User') + extendInclude(json, 'Nav_Department') + extendInclude(json, 'Nav_ContingencyType') + json.Sort = 'Nav_UrgentEvent.Nav_EventType.NAME' + extendRule(json, 'ENABLE_STATUS', 1, 0); + + if (this.state.search.EventTypeNAME != null && this.state.search.EventTypeNAME.length > 0) + extendRule(json, 'Nav_UrgentEvent.Nav_EventType.NAME', 9, this.state.search.EventTypeNAME); + if (this.state.search.CoverageInfluenceNAME != null && this.state.search.CoverageInfluenceNAME.length > 0) + extendRule(json, 'Nav_UrgentEvent.Nav_ListArearInfluence.Nav_CoverageInfluence.NAME', 9, this.state.search.CoverageInfluenceNAME); + if (this.state.search.AREAR_INFLUENCE != null && this.state.search.AREAR_INFLUENCE.length > 0) + extendRule(json, 'Nav_UrgentEvent.AREAR_INFLUENCE', 9, this.state.search.AREAR_INFLUENCE); + if (this.state.search.ACCIDENTCONSEQUENCE != null && this.state.search.ACCIDENTCONSEQUENCE.length > 0) + extendRule(json, 'Nav_UrgentEvent.ACCIDENT_CONSEQUENCE', 9, this.state.search.ACCIDENTCONSEQUENCE); + if (this.state.search.ContingencyTypeNAME != null && this.state.search.ContingencyTypeNAME.length > 0) + extendRule(json, 'Nav_ContingencyType.NAME', 9, this.state.search.ContingencyTypeNAME); + if (this.state.search.DepartmentNAME != null && this.state.search.DepartmentNAME.length > 0) + extendRule(json, 'Nav_Department.NAME', 9, this.state.search.DepartmentNAME); + if (this.state.search.UserNAME != null && this.state.search.UserNAME.length > 0) + extendRule(json, 'Nav_User.NAME', 9, this.state.search.UserNAME); + if (this.state.search.COMPLETETIMES != null && this.state.search.COMPLETETIMES.length > 0) { + extendRule(json, 'COMPLETE_TIME', 6, this.state.search.COMPLETETIMES); + extendRule(json, 'COMPLETE_TIME', 4, this.state.search.COMPLETETIMEE); + } + this.props.dispatch({ + type: 'app/getDataByPost', + payload: json, + onlyData: false, + url: 'CM/UrgentEventContingencyPlan/OrderPaged', + onComplete: (ret) => { + if (ret && ret.IsSuccessful) { + this.setState({ + retData: ret.Data, + TotalCount: ret.TotalCount, + loadParam: { + PageIndex: json.PageIndex, + Limit: json.Limit + }, + }) + } else { + this.setState({ + retData: [], + TotalCount: 0, + loadParam: { + PageIndex: json.PageIndex, + Limit: json.Limit + }, + }) + } + } + }); + } + + showTotal = () => { + return `共 ${this.state ? this.state.TotalCount : 0} 条`; + } + + onChangeEventTypeNAME = (val) => { + this.state.search.EventTypeNAME = val.trim() + } + onChangeAREAR_INFLUENCE = (val) => { + this.state.search.AREAR_INFLUENCE = val.trim() + } + onChangeACCIDENTCONSEQUENCE = (val) => { + this.state.search.ACCIDENTCONSEQUENCE = val.trim() + } + onChangeContingencyTypeNAME = (val) => { + this.state.search.ContingencyTypeNAME = val.trim() + } + onChangeDepartmentNAME = (val) => { + this.state.search.DepartmentNAME = val.trim() + } + onChangeUserNAME = (val) => { + this.state.search.UserNAME = val.trim() + } + onChangeCOMPLETETIME = (val) => { + if (val.length == 2) { + this.state.search.COMPLETETIMES = new Date(val[0]._d).Format('yyyy-MM-dd') + this.state.search.COMPLETETIMEE = new Date(val[1]._d).Format('yyyy-MM-dd') + } else { + this.state.search.COMPLETETIMES = '' + this.state.search.COMPLETETIMEE = '' + } + } + + render() { + return ( + +
+
+ + {/*
*/} + this.onChangeEventTypeNAME(evt.target.value)} /> + {/* */} + this.onChangeAREAR_INFLUENCE(evt.target.value)} /> + this.onChangeACCIDENTCONSEQUENCE(evt.target.value)} /> + this.onChangeContingencyTypeNAME(evt.target.value)} /> + this.onChangeDepartmentNAME(evt.target.value)} /> + this.onChangeUserNAME(evt.target.value)} /> + + this.onChangeCOMPLETETIME(evt)} /> {/**/} + + {/*
+
{iconEle}
+
*/} +
+
+ +
+ + +
+ + +
+ this.showTotal()} total={this.state.TotalCount} showSizeChanger showQuickJumper + current={this.state.loadParam ? this.state.loadParam.PageIndex : 0} + onChange={(pageIndex, pageSize) => this.loadData(pageIndex, pageSize)} + onShowSizeChange={(pageIndex, pageSize) => this.loadData(pageIndex, pageSize)} /> +
+ + + +
+ + + ); + } +} +export default connect(({ login, app }) => ({ login, app }))(CM041LibShow); diff --git a/src/utils/customConfig.js b/src/utils/customConfig.js index 95e127f..c2de257 100644 --- a/src/utils/customConfig.js +++ b/src/utils/customConfig.js @@ -1293,6 +1293,10 @@ const CM036ShowPrint = Loadable({ loader: () => import('../components/CustomPages/CM/CM036ShowPrint'), loading: () =>
}) +const CM041LibShow = Loadable({ + loader: () => import('../components/CustomPages/CM/CM041LibShow'), + loading: () =>
+}) const DM019ShowPrint = Loadable({ loader: () => import('../components/CustomPages/DM/DM019ShowPrint'), loading: () =>
@@ -1748,6 +1752,8 @@ export default function (componentName, formId, formParam, data, formCode, formD CM034ShowPrint: , CM036Edit: , CM036ShowPrint: , + CM041LibShow: , + DM019ShowPrint: , DM021ShowPrint: , diff --git a/src/utils/customConfig1.js b/src/utils/customConfig1.js index 852a168..c1fd330 100644 --- a/src/utils/customConfig1.js +++ b/src/utils/customConfig1.js @@ -201,6 +201,10 @@ const CM036ShowPrint = Loadable({ loader: () => import('../components/CustomPages/CM/CM036ShowPrint'), loading: () =>
}) +const CM041LibShow = Loadable({ + loader: () => import('../components/CustomPages/CM/CM041LibShow'), + loading: () =>
+}) const DM010ShowPrint = Loadable({ loader: () => import('../components/CustomPages/DM/DM010ShowPrint'), @@ -282,6 +286,8 @@ export default function (componentName, formId, formParam, data, formCode, formD CM034ShowPrint: , CM036Edit: , CM036ShowPrint: , + CM041LibShow: , + DM010ShowPrint: , DM032ShowPrint: , From c92e3c49080ce492daeed0f3242e30b3f531a989 Mon Sep 17 00:00:00 2001 From: wyw <571921741@qq.com> Date: Wed, 6 Mar 2024 09:51:23 +0800 Subject: [PATCH 3/6] 1324 --- src/utils/customConfig.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/utils/customConfig.js b/src/utils/customConfig.js index c2de257..de03313 100644 --- a/src/utils/customConfig.js +++ b/src/utils/customConfig.js @@ -1097,6 +1097,18 @@ const BS070ShowPrint = Loadable({ loader: () => import('../components/CustomPages/BS/BS070ShowPrint'), loading: () =>
}) +const BS072ShowPrint = Loadable({ + loader: () => import('../components/CustomPages/BS/BS072ShowPrint'), + loading: () =>
+}) +const BS073ShowPrint = Loadable({ + loader: () => import('../components/CustomPages/BS/BS073ShowPrint'), + loading: () =>
+}) +const BS074ShowPrint = Loadable({ + loader: () => import('../components/CustomPages/BS/BS074ShowPrint'), + loading: () =>
+}) const FO017ShowPrint = Loadable({ loader: () => import('../components/CustomPages/FO/FO017ShowPrint'), loading: () =>
From 3664a902b2e7451512ccc5a3a224e3cf6a925677 Mon Sep 17 00:00:00 2001 From: wyw <571921741@qq.com> Date: Wed, 6 Mar 2024 09:52:55 +0800 Subject: [PATCH 4/6] 12 --- src/utils/customConfig1.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/utils/customConfig1.js b/src/utils/customConfig1.js index c1fd330..bef7405 100644 --- a/src/utils/customConfig1.js +++ b/src/utils/customConfig1.js @@ -139,6 +139,18 @@ const BS064ShowPrint = Loadable({ loader: () => import('../components/CustomPages/BS/BS064ShowPrint'), loading: () =>
}) +const BS072ShowPrint = Loadable({ + loader: () => import('../components/CustomPages/BS/BS072ShowPrint'), + loading: () =>
+}) +const BS073ShowPrint = Loadable({ + loader: () => import('../components/CustomPages/BS/BS073ShowPrint'), + loading: () =>
+}) +const BS074ShowPrint = Loadable({ + loader: () => import('../components/CustomPages/BS/BS074ShowPrint'), + loading: () =>
+}) const BS070ShowPrint = Loadable({ loader: () => import('../components/CustomPages/BS/BS070ShowPrint'), loading: () =>
From dea4e4d83a4eca59108855eb5343eb2484215b6a Mon Sep 17 00:00:00 2001 From: wyw <571921741@qq.com> Date: Wed, 6 Mar 2024 09:53:45 +0800 Subject: [PATCH 5/6] 23 --- src/components/Custom/CustomPage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Custom/CustomPage.js b/src/components/Custom/CustomPage.js index 1fb6309..04c8fe2 100644 --- a/src/components/Custom/CustomPage.js +++ b/src/components/Custom/CustomPage.js @@ -2,8 +2,8 @@ import React from 'react' import { connect } from 'dva' import { initFilter, getCustomParams } from "../../utils/common" //import loadPage from '../../utils/customConfigwjn'//便捷开发 请勿提交 -import loadPage from '../../utils/customConfig1' -// import loadPage from '../../utils/customConfig' +// import loadPage from '../../utils/customConfig1' +import loadPage from '../../utils/customConfig' class CustomPage extends React.Component { constructor(props) { From 76f041cfe01793136082b3b21b930690993b7813 Mon Sep 17 00:00:00 2001 From: wjn Date: Tue, 12 Mar 2024 16:01:41 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E6=9B=B4=E6=8D=A2=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config.js b/src/config.js index d17defe..730edc7 100644 --- a/src/config.js +++ b/src/config.js @@ -24,7 +24,7 @@ const config = { flowServiceHost: "http://120.25.146.51:7188/", hmiUrl: "http://localhost:8060/", webSocketHost: 'ws://localhost:7140/', - picServerHost: 'http://47.122.43.22:7199', + picServerHost: 'http://47.122.43.22:3199', dataVUrl: "http://localhost:8062/home", version:version, guideSeverHost:"http://47.122.43.22/apk/", @@ -39,7 +39,7 @@ const config = { cookieDomain: "", hmiUrl: "http://120.25.146.51:8098/", webSocketHost: 'ws://120.25.146.51:7140/', - picServerHost: 'http://120.25.146.51:7199', + picServerHost: 'http://120.25.146.51:3199', dataVUrl: "http://120.25.146.51:7167/home", version:version, guideSeverHost:"http://www.xmmhe.com/apk/", @@ -54,7 +54,7 @@ const config = { cookieDomain: "", hmiUrl: "http://47.122.43.22:8098/", webSocketHost: 'ws://47.122.43.22:7140/', - picServerHost: 'http://47.122.43.22:7199', + picServerHost: 'http://47.122.43.22:3199', dataVUrl: "http://47.122.43.22:7167/home", version:version, guideSeverHost:"http://47.122.43.22/apk/",