Merge branch 'master' of http://121.41.2.71:3000/wyw/mh_jy_safe_web
This commit is contained in:
commit
504b23f7bb
158
src/components/CustomPages/FO/FO035ShowPrint.js
Normal file
158
src/components/CustomPages/FO/FO035ShowPrint.js
Normal file
@ -0,0 +1,158 @@
|
||||
import { message } from "antd/lib/index";
|
||||
import { Button,Descriptions, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd';
|
||||
import React from 'react';
|
||||
import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter,showUserSign } from "../../../utils/common";
|
||||
import ReactToPrint from "react-to-print";
|
||||
import stylesStep from '../HI/StepForm.css';
|
||||
import config from "../../../config";
|
||||
import XLSX from 'xlsx';
|
||||
import { connect } from 'dva';
|
||||
import moment from 'moment';
|
||||
class FO035ShowPrint extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
data: null,
|
||||
enumData: null,
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onTableBtnAgree() {
|
||||
this.props.dispatch({
|
||||
type: 'app/getDataByPost',
|
||||
url: 'FO/FOTechDisclosureFromTech/PersonalAgree',
|
||||
payload: {
|
||||
ID: this.props.data.id,
|
||||
TaskID: this.props.data.TaskID,
|
||||
},
|
||||
onComplete: (ret) => {
|
||||
if (ret) {
|
||||
message.success('确认成功!');
|
||||
this.setState({ BtnAgreeDisplay: 'none' })
|
||||
this.BtnClose();
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
BtnClose = () => {
|
||||
if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function')
|
||||
this.props.data.onCancel();
|
||||
}
|
||||
|
||||
loadData = (dataId) => {
|
||||
let json = initFilter(this.props.login.OrgId);
|
||||
extendRule(json, 'ID', 1, dataId);
|
||||
extendIgnoreDataRule(json)
|
||||
this.props.dispatch({
|
||||
type: 'app/getDataByPost',
|
||||
payload: json,
|
||||
url: 'FO/FOTechDisclosureFromTech/GetEdit',
|
||||
onComplete: (ret) => {
|
||||
if (ret) {
|
||||
if(this.props.data && this.props.data.loadDataDeal)
|
||||
{
|
||||
this.props.data.loadDataDeal(1);
|
||||
}
|
||||
this.setState({ data: ret })
|
||||
if (this.props.data.tableKey=="2" ||this.props.data.tableKey==undefined) {
|
||||
this.setState({ BtnAgreeDisplay: 'none' })
|
||||
}else{
|
||||
this.setState({ BtnAgreeDisplay: 'inline' })
|
||||
}
|
||||
}
|
||||
else
|
||||
{ message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
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 } = this.state;
|
||||
return <div>
|
||||
<div style={{ padding: '10px' }}>
|
||||
<ReactToPrint
|
||||
trigger={() => <Button type={'default'} icon={'printer'} style={{ marginLeft: '8px',display: data && data.FORM_STATUS === 2?"inline":"none" }}>打印</Button>}
|
||||
content={() => this.componentRef}
|
||||
pageStyle=".printDIV { padding:0 40px;} img{width :120px}"
|
||||
/>
|
||||
<Button style={{ marginLeft: '8px',display: data && data.FORM_STATUS === 2?"inline":"none" }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button>
|
||||
<Button type="primary" style={{ marginLeft: '8px', display: this.state.BtnAgreeDisplay }} onClick={() => this.onTableBtnAgree()} icon="check" >确认</Button>
|
||||
</div>
|
||||
|
||||
|
||||
{/* */}
|
||||
<div ref={el => (this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id} className="printDIV">
|
||||
|
||||
<h1 style={{ textAlign: 'center', margin: '15px' }}>技术交底表</h1>
|
||||
{
|
||||
data ?
|
||||
<div>
|
||||
<Descriptions size="middle" bordered className={stylesStep.description}>
|
||||
<Descriptions.Item label="编号">{data.CODE}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底事项">{data.NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底时间">{data.DISCLOSURE_DATE}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底地点">{data.JOB_LOCATION}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底人">{data.Nav_User ? data.Nav_User.NAME : ''}</Descriptions.Item>
|
||||
<Descriptions.Item label="被交底人">{
|
||||
data.Nav_Person && data.Nav_Person.map((item, i) => {
|
||||
if (i == (data.Nav_Person.length - 1)) {
|
||||
if (item.DEAL_STATUS == 0)
|
||||
return <label style={{ color: 'red' }} title='未签到'> {item.Nav_User?.NAME}</label>
|
||||
else
|
||||
return item.Nav_User?.NAME
|
||||
} else {
|
||||
if (item.DEAL_STATUS == 0)
|
||||
return <label style={{ color: 'red' }} title='未签到'>{item.Nav_User?.NAME + ' '}</label>
|
||||
else
|
||||
return item.Nav_User?.NAME + ' '
|
||||
}
|
||||
})
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底内容">{data.DisclosureContent}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底人签字">{
|
||||
(data.Nav_User && data.Nav_User.FILE_PATH)?
|
||||
showUserSign(data.Nav_User, config.picServerHost):null
|
||||
// <img style={{ margin: "0 0 0 15px",width:'150px' }} alt={data.Nav_User?.NAME} src={config.picServerHost + data.Nav_User.FILE_PATH} />
|
||||
// :data.Nav_User?.NAME
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="被交底人签字">{
|
||||
data.Nav_Person && data.Nav_Person.map((item, i) => {
|
||||
if (item.DEAL_STATUS == 1) {
|
||||
showUserSign(item.Nav_User, config.picServerHost)
|
||||
// if (item.Nav_User != null && item.Nav_User.FILE_PATH != null)
|
||||
// return <img style={{ margin: "0 0 0 15px",width:'150px' }} alt={item.Nav_User?.NAME} src={config.picServerHost + item.Nav_User.FILE_PATH} />
|
||||
// else
|
||||
// return <img style={{ margin: "0 0 0 15px",width:'150px' }} title={item.Nav_User?.NAME} />
|
||||
}
|
||||
})
|
||||
}</Descriptions.Item>
|
||||
</Descriptions>
|
||||
</div> : null
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
}
|
||||
export default connect(({ login }) => ({ login }))(FO035ShowPrint)
|
||||
158
src/components/CustomPages/FO/FO037ShowPrint.js
Normal file
158
src/components/CustomPages/FO/FO037ShowPrint.js
Normal file
@ -0,0 +1,158 @@
|
||||
import { message } from "antd/lib/index";
|
||||
import { Button,Descriptions, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd';
|
||||
import React from 'react';
|
||||
import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter,showUserSign } from "../../../utils/common";
|
||||
import ReactToPrint from "react-to-print";
|
||||
import stylesStep from '../HI/StepForm.css';
|
||||
import config from "../../../config";
|
||||
import XLSX from 'xlsx';
|
||||
import { connect } from 'dva';
|
||||
import moment from 'moment';
|
||||
class FO037ShowPrint extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
data: null,
|
||||
enumData: null,
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onTableBtnAgree() {
|
||||
this.props.dispatch({
|
||||
type: 'app/getDataByPost',
|
||||
url: 'FO/FOTechDisclosureFromSafe/PersonalAgree',
|
||||
payload: {
|
||||
ID: this.props.data.id,
|
||||
TaskID: this.props.data.TaskID,
|
||||
},
|
||||
onComplete: (ret) => {
|
||||
if (ret) {
|
||||
message.success('确认成功!');
|
||||
this.setState({ BtnAgreeDisplay: 'none' })
|
||||
this.BtnClose();
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
BtnClose = () => {
|
||||
if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function')
|
||||
this.props.data.onCancel();
|
||||
}
|
||||
|
||||
loadData = (dataId) => {
|
||||
let json = initFilter(this.props.login.OrgId);
|
||||
extendRule(json, 'ID', 1, dataId);
|
||||
extendIgnoreDataRule(json)
|
||||
this.props.dispatch({
|
||||
type: 'app/getDataByPost',
|
||||
payload: json,
|
||||
url: 'FO/FOTechDisclosureFromSafe/GetEdit',
|
||||
onComplete: (ret) => {
|
||||
if (ret) {
|
||||
if(this.props.data && this.props.data.loadDataDeal)
|
||||
{
|
||||
this.props.data.loadDataDeal(1);
|
||||
}
|
||||
this.setState({ data: ret })
|
||||
if (this.props.data.tableKey=="2" ||this.props.data.tableKey==undefined) {
|
||||
this.setState({ BtnAgreeDisplay: 'none' })
|
||||
}else{
|
||||
this.setState({ BtnAgreeDisplay: 'inline' })
|
||||
}
|
||||
}
|
||||
else
|
||||
{ message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
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 } = this.state;
|
||||
return <div>
|
||||
<div style={{ padding: '10px' }}>
|
||||
<ReactToPrint
|
||||
trigger={() => <Button type={'default'} icon={'printer'} style={{ marginLeft: '8px',display: data && data.FORM_STATUS === 2?"inline":"none" }}>打印</Button>}
|
||||
content={() => this.componentRef}
|
||||
pageStyle=".printDIV { padding:0 40px;} img{width :120px}"
|
||||
/>
|
||||
<Button style={{ marginLeft: '8px',display: data && data.FORM_STATUS === 2?"inline":"none" }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button>
|
||||
<Button type="primary" style={{ marginLeft: '8px', display: this.state.BtnAgreeDisplay }} onClick={() => this.onTableBtnAgree()} icon="check" >确认</Button>
|
||||
</div>
|
||||
|
||||
|
||||
{/* */}
|
||||
<div ref={el => (this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id} className="printDIV">
|
||||
|
||||
<h1 style={{ textAlign: 'center', margin: '15px' }}>安全交底表</h1>
|
||||
{
|
||||
data ?
|
||||
<div>
|
||||
<Descriptions size="middle" bordered className={stylesStep.description}>
|
||||
<Descriptions.Item label="编号">{data.CODE}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底事项">{data.NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底时间">{data.DISCLOSURE_DATE}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底地点">{data.JOB_LOCATION}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底人">{data.Nav_User ? data.Nav_User.NAME : ''}</Descriptions.Item>
|
||||
<Descriptions.Item label="被交底人">{
|
||||
data.Nav_Person && data.Nav_Person.map((item, i) => {
|
||||
if (i == (data.Nav_Person.length - 1)) {
|
||||
if (item.DEAL_STATUS == 0)
|
||||
return <label style={{ color: 'red' }} title='未签到'> {item.Nav_User?.NAME}</label>
|
||||
else
|
||||
return item.Nav_User?.NAME
|
||||
} else {
|
||||
if (item.DEAL_STATUS == 0)
|
||||
return <label style={{ color: 'red' }} title='未签到'>{item.Nav_User?.NAME + ' '}</label>
|
||||
else
|
||||
return item.Nav_User?.NAME + ' '
|
||||
}
|
||||
})
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底内容">{data.DisclosureContent}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底人签字">{
|
||||
(data.Nav_User && data.Nav_User.FILE_PATH)?
|
||||
showUserSign(data.Nav_User, config.picServerHost):null
|
||||
// <img style={{ margin: "0 0 0 15px",width:'150px' }} alt={data.Nav_User?.NAME} src={config.picServerHost + data.Nav_User.FILE_PATH} />
|
||||
// :data.Nav_User?.NAME
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="被交底人签字">{
|
||||
data.Nav_Person && data.Nav_Person.map((item, i) => {
|
||||
if (item.DEAL_STATUS == 1) {
|
||||
showUserSign(item.Nav_User, config.picServerHost)
|
||||
// if (item.Nav_User != null && item.Nav_User.FILE_PATH != null)
|
||||
// return <img style={{ margin: "0 0 0 15px",width:'150px' }} alt={item.Nav_User?.NAME} src={config.picServerHost + item.Nav_User.FILE_PATH} />
|
||||
// else
|
||||
// return <img style={{ margin: "0 0 0 15px",width:'150px' }} title={item.Nav_User?.NAME} />
|
||||
}
|
||||
})
|
||||
}</Descriptions.Item>
|
||||
</Descriptions>
|
||||
</div> : null
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
}
|
||||
export default connect(({ login }) => ({ login }))(FO037ShowPrint)
|
||||
153
src/components/CustomPages/FO/FO041ShowPrint.js
Normal file
153
src/components/CustomPages/FO/FO041ShowPrint.js
Normal file
@ -0,0 +1,153 @@
|
||||
import { message } from "antd/lib/index";
|
||||
import { Button,Descriptions, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd';
|
||||
import React from 'react';
|
||||
import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter,showFiles, GetFileModel,showUserSign } from "../../../utils/common";
|
||||
import ReactToPrint from "react-to-print";
|
||||
import stylesStep from '../HI/StepForm.css';
|
||||
import config from "../../../config";
|
||||
import XLSX from 'xlsx';
|
||||
import { connect } from 'dva';
|
||||
import moment from 'moment';
|
||||
class FO041ShowPrint extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
data: null,
|
||||
enumData: null,
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onTableBtnAgree() {
|
||||
this.props.dispatch({
|
||||
type: 'app/getDataByPost',
|
||||
url: 'FO/FOLeaderWellRecord/PersonalAgree',
|
||||
payload: {
|
||||
ID: this.props.data.id,
|
||||
TaskID: this.props.data.TaskID,
|
||||
},
|
||||
onComplete: (ret) => {
|
||||
if (ret) {
|
||||
message.success('确认成功!');
|
||||
this.setState({ BtnAgreeDisplay: 'none' })
|
||||
this.BtnClose();
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
BtnClose = () => {
|
||||
if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function')
|
||||
this.props.data.onCancel();
|
||||
}
|
||||
|
||||
loadData = (dataId) => {
|
||||
let json = initFilter(this.props.login.OrgId);
|
||||
extendRule(json, 'ID', 1, dataId);
|
||||
extendIgnoreDataRule(json)
|
||||
this.props.dispatch({
|
||||
type: 'app/getDataByPost',
|
||||
payload: json,
|
||||
url: 'FO/FOLeaderWellRecord/GetEdit',
|
||||
onComplete: (ret) => {
|
||||
if (ret) {
|
||||
if(this.props.data && this.props.data.loadDataDeal)
|
||||
{
|
||||
this.props.data.loadDataDeal(1);
|
||||
}
|
||||
this.setState({ data: ret })
|
||||
if (this.props.data.tableKey=="2" ||this.props.data.tableKey==undefined) {
|
||||
this.setState({ BtnAgreeDisplay: 'none' })
|
||||
}else{
|
||||
this.setState({ BtnAgreeDisplay: 'inline' })
|
||||
}
|
||||
}
|
||||
else
|
||||
{ message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
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 } = this.state;
|
||||
return <div>
|
||||
<div style={{ padding: '10px' }}>
|
||||
<ReactToPrint
|
||||
trigger={() => <Button type={'default'} icon={'printer'} style={{ marginLeft: '8px',display: data && data.FORM_STATUS === 2?"inline":"none" }}>打印</Button>}
|
||||
content={() => this.componentRef}
|
||||
pageStyle=".printDIV { padding:0 40px;} img{width :120px}"
|
||||
/>
|
||||
<Button style={{ marginLeft: '8px',display: data && data.FORM_STATUS === 2?"inline":"none" }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button>
|
||||
<Button type="primary" style={{ marginLeft: '8px', display: this.state.BtnAgreeDisplay }} onClick={() => this.onTableBtnAgree()} icon="check" >确认</Button>
|
||||
</div>
|
||||
|
||||
|
||||
{/* */}
|
||||
<div ref={el => (this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id} className="printDIV">
|
||||
|
||||
<h1 style={{ textAlign: 'center', margin: '15px' }}>领导带班下井记录</h1>
|
||||
{
|
||||
data ?
|
||||
<div>
|
||||
<Descriptions size="middle" bordered className={stylesStep.description}>
|
||||
<Descriptions.Item label="编号">{data.CODE}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底事项">{data.NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底时间">{data.DISCLOSURE_DATE}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底地点">{data.JOB_LOCATION}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底人">{data.Nav_User ? data.Nav_User.NAME : ''}</Descriptions.Item>
|
||||
<Descriptions.Item label="被交底人">{
|
||||
data.Nav_Person && data.Nav_Person.map((item, i) => {
|
||||
if (i == (data.Nav_Person.length - 1)) {
|
||||
if (item.DEAL_STATUS == 0)
|
||||
return <label style={{ color: 'red' }} title='未签到'> {item.Nav_User?.NAME}</label>
|
||||
else
|
||||
return item.Nav_User?.NAME
|
||||
} else {
|
||||
if (item.DEAL_STATUS == 0)
|
||||
return <label style={{ color: 'red' }} title='未签到'>{item.Nav_User?.NAME + ' '}</label>
|
||||
else
|
||||
return item.Nav_User?.NAME + ' '
|
||||
}
|
||||
})
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底内容">{data.DisclosureContent}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底人签字">{
|
||||
(data.Nav_User && data.Nav_User.FILE_PATH)?
|
||||
showUserSign(data.Nav_User, config.picServerHost):null
|
||||
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="被交底人签字">{
|
||||
data.Nav_Person && data.Nav_Person.map((item, i) => {
|
||||
if (item.DEAL_STATUS == 1) {
|
||||
showUserSign(item.Nav_User, config.picServerHost)
|
||||
}
|
||||
})
|
||||
}</Descriptions.Item>
|
||||
</Descriptions>
|
||||
</div> : null
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
}
|
||||
export default connect(({ login }) => ({ login }))(FO041ShowPrint)
|
||||
153
src/components/CustomPages/FO/FO043ShowPrint.js
Normal file
153
src/components/CustomPages/FO/FO043ShowPrint.js
Normal file
@ -0,0 +1,153 @@
|
||||
import { message } from "antd/lib/index";
|
||||
import { Button,Descriptions, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd';
|
||||
import React from 'react';
|
||||
import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter,showFiles, GetFileModel,showUserSign } from "../../../utils/common";
|
||||
import ReactToPrint from "react-to-print";
|
||||
import stylesStep from '../HI/StepForm.css';
|
||||
import config from "../../../config";
|
||||
import XLSX from 'xlsx';
|
||||
import { connect } from 'dva';
|
||||
import moment from 'moment';
|
||||
class FO043ShowPrint extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
data: null,
|
||||
enumData: null,
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onTableBtnAgree() {
|
||||
this.props.dispatch({
|
||||
type: 'app/getDataByPost',
|
||||
url: 'FO/FOLeaderWellRecord/PersonalAgree',
|
||||
payload: {
|
||||
ID: this.props.data.id,
|
||||
TaskID: this.props.data.TaskID,
|
||||
},
|
||||
onComplete: (ret) => {
|
||||
if (ret) {
|
||||
message.success('确认成功!');
|
||||
this.setState({ BtnAgreeDisplay: 'none' })
|
||||
this.BtnClose();
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
BtnClose = () => {
|
||||
if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function')
|
||||
this.props.data.onCancel();
|
||||
}
|
||||
|
||||
loadData = (dataId) => {
|
||||
let json = initFilter(this.props.login.OrgId);
|
||||
extendRule(json, 'ID', 1, dataId);
|
||||
extendIgnoreDataRule(json)
|
||||
this.props.dispatch({
|
||||
type: 'app/getDataByPost',
|
||||
payload: json,
|
||||
url: 'FO/FOLeaderWellRecord/GetEdit',
|
||||
onComplete: (ret) => {
|
||||
if (ret) {
|
||||
if(this.props.data && this.props.data.loadDataDeal)
|
||||
{
|
||||
this.props.data.loadDataDeal(1);
|
||||
}
|
||||
this.setState({ data: ret })
|
||||
if (this.props.data.tableKey=="2" ||this.props.data.tableKey==undefined) {
|
||||
this.setState({ BtnAgreeDisplay: 'none' })
|
||||
}else{
|
||||
this.setState({ BtnAgreeDisplay: 'inline' })
|
||||
}
|
||||
}
|
||||
else
|
||||
{ message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
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 } = this.state;
|
||||
return <div>
|
||||
<div style={{ padding: '10px' }}>
|
||||
<ReactToPrint
|
||||
trigger={() => <Button type={'default'} icon={'printer'} style={{ marginLeft: '8px',display: data && data.FORM_STATUS === 2?"inline":"none" }}>打印</Button>}
|
||||
content={() => this.componentRef}
|
||||
pageStyle=".printDIV { padding:0 40px;} img{width :120px}"
|
||||
/>
|
||||
<Button style={{ marginLeft: '8px',display: data && data.FORM_STATUS === 2?"inline":"none" }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button>
|
||||
<Button type="primary" style={{ marginLeft: '8px', display: this.state.BtnAgreeDisplay }} onClick={() => this.onTableBtnAgree()} icon="check" >确认</Button>
|
||||
</div>
|
||||
|
||||
|
||||
{/* */}
|
||||
<div ref={el => (this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id} className="printDIV">
|
||||
|
||||
<h1 style={{ textAlign: 'center', margin: '15px' }}>领导带班下井记录</h1>
|
||||
{
|
||||
data ?
|
||||
<div>
|
||||
<Descriptions size="middle" bordered className={stylesStep.description}>
|
||||
<Descriptions.Item label="编号">{data.CODE}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底事项">{data.NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底时间">{data.DISCLOSURE_DATE}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底地点">{data.JOB_LOCATION}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底人">{data.Nav_User ? data.Nav_User.NAME : ''}</Descriptions.Item>
|
||||
<Descriptions.Item label="被交底人">{
|
||||
data.Nav_Person && data.Nav_Person.map((item, i) => {
|
||||
if (i == (data.Nav_Person.length - 1)) {
|
||||
if (item.DEAL_STATUS == 0)
|
||||
return <label style={{ color: 'red' }} title='未签到'> {item.Nav_User?.NAME}</label>
|
||||
else
|
||||
return item.Nav_User?.NAME
|
||||
} else {
|
||||
if (item.DEAL_STATUS == 0)
|
||||
return <label style={{ color: 'red' }} title='未签到'>{item.Nav_User?.NAME + ' '}</label>
|
||||
else
|
||||
return item.Nav_User?.NAME + ' '
|
||||
}
|
||||
})
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底内容">{data.DisclosureContent}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底人签字">{
|
||||
(data.Nav_User && data.Nav_User.FILE_PATH)?
|
||||
showUserSign(data.Nav_User, config.picServerHost):null
|
||||
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="被交底人签字">{
|
||||
data.Nav_Person && data.Nav_Person.map((item, i) => {
|
||||
if (item.DEAL_STATUS == 1) {
|
||||
showUserSign(item.Nav_User, config.picServerHost)
|
||||
}
|
||||
})
|
||||
}</Descriptions.Item>
|
||||
</Descriptions>
|
||||
</div> : null
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
}
|
||||
export default connect(({ login }) => ({ login }))(FO043ShowPrint)
|
||||
153
src/components/CustomPages/FO/FO045ShowPrint.js
Normal file
153
src/components/CustomPages/FO/FO045ShowPrint.js
Normal file
@ -0,0 +1,153 @@
|
||||
import { message } from "antd/lib/index";
|
||||
import { Button,Descriptions, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd';
|
||||
import React from 'react';
|
||||
import { initFilter, extendRule, extendInclude,extendIgnoreDataRule, setDataFieldValue, guid, initQueryFilter,showFiles, GetFileModel,showUserSign } from "../../../utils/common";
|
||||
import ReactToPrint from "react-to-print";
|
||||
import stylesStep from '../HI/StepForm.css';
|
||||
import config from "../../../config";
|
||||
import XLSX from 'xlsx';
|
||||
import { connect } from 'dva';
|
||||
import moment from 'moment';
|
||||
class FO045ShowPrint extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
data: null,
|
||||
enumData: null,
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onTableBtnAgree() {
|
||||
this.props.dispatch({
|
||||
type: 'app/getDataByPost',
|
||||
url: 'FO/FOLeaderWellRecord/PersonalAgree',
|
||||
payload: {
|
||||
ID: this.props.data.id,
|
||||
TaskID: this.props.data.TaskID,
|
||||
},
|
||||
onComplete: (ret) => {
|
||||
if (ret) {
|
||||
message.success('确认成功!');
|
||||
this.setState({ BtnAgreeDisplay: 'none' })
|
||||
this.BtnClose();
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
BtnClose = () => {
|
||||
if (typeof this.props.data.onCancel != "undefined"&&typeof this.props.data.onCancel == 'function')
|
||||
this.props.data.onCancel();
|
||||
}
|
||||
|
||||
loadData = (dataId) => {
|
||||
let json = initFilter(this.props.login.OrgId);
|
||||
extendRule(json, 'ID', 1, dataId);
|
||||
extendIgnoreDataRule(json)
|
||||
this.props.dispatch({
|
||||
type: 'app/getDataByPost',
|
||||
payload: json,
|
||||
url: 'FO/FOLeaderWellRecord/GetEdit',
|
||||
onComplete: (ret) => {
|
||||
if (ret) {
|
||||
if(this.props.data && this.props.data.loadDataDeal)
|
||||
{
|
||||
this.props.data.loadDataDeal(1);
|
||||
}
|
||||
this.setState({ data: ret })
|
||||
if (this.props.data.tableKey=="2" ||this.props.data.tableKey==undefined) {
|
||||
this.setState({ BtnAgreeDisplay: 'none' })
|
||||
}else{
|
||||
this.setState({ BtnAgreeDisplay: 'inline' })
|
||||
}
|
||||
}
|
||||
else
|
||||
{ message.error('请先尝试刷新,若仍然加载失败,请联系管理员排查!');}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
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 } = this.state;
|
||||
return <div>
|
||||
<div style={{ padding: '10px' }}>
|
||||
<ReactToPrint
|
||||
trigger={() => <Button type={'default'} icon={'printer'} style={{ marginLeft: '8px',display: data && data.FORM_STATUS === 2?"inline":"none" }}>打印</Button>}
|
||||
content={() => this.componentRef}
|
||||
pageStyle=".printDIV { padding:0 40px;} img{width :120px}"
|
||||
/>
|
||||
<Button style={{ marginLeft: '8px',display: data && data.FORM_STATUS === 2?"inline":"none" }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button>
|
||||
<Button type="primary" style={{ marginLeft: '8px', display: this.state.BtnAgreeDisplay }} onClick={() => this.onTableBtnAgree()} icon="check" >确认</Button>
|
||||
</div>
|
||||
|
||||
|
||||
{/* */}
|
||||
<div ref={el => (this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id} className="printDIV">
|
||||
|
||||
<h1 style={{ textAlign: 'center', margin: '15px' }}>领导带班下井记录</h1>
|
||||
{
|
||||
data ?
|
||||
<div>
|
||||
<Descriptions size="middle" bordered className={stylesStep.description}>
|
||||
<Descriptions.Item label="编号">{data.CODE}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底事项">{data.NAME}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底时间">{data.DISCLOSURE_DATE}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底地点">{data.JOB_LOCATION}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底人">{data.Nav_User ? data.Nav_User.NAME : ''}</Descriptions.Item>
|
||||
<Descriptions.Item label="被交底人">{
|
||||
data.Nav_Person && data.Nav_Person.map((item, i) => {
|
||||
if (i == (data.Nav_Person.length - 1)) {
|
||||
if (item.DEAL_STATUS == 0)
|
||||
return <label style={{ color: 'red' }} title='未签到'> {item.Nav_User?.NAME}</label>
|
||||
else
|
||||
return item.Nav_User?.NAME
|
||||
} else {
|
||||
if (item.DEAL_STATUS == 0)
|
||||
return <label style={{ color: 'red' }} title='未签到'>{item.Nav_User?.NAME + ' '}</label>
|
||||
else
|
||||
return item.Nav_User?.NAME + ' '
|
||||
}
|
||||
})
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底内容">{data.DisclosureContent}</Descriptions.Item>
|
||||
<Descriptions.Item label="交底人签字">{
|
||||
(data.Nav_User && data.Nav_User.FILE_PATH)?
|
||||
showUserSign(data.Nav_User, config.picServerHost):null
|
||||
|
||||
}</Descriptions.Item>
|
||||
<Descriptions.Item label="被交底人签字">{
|
||||
data.Nav_Person && data.Nav_Person.map((item, i) => {
|
||||
if (item.DEAL_STATUS == 1) {
|
||||
showUserSign(item.Nav_User, config.picServerHost)
|
||||
}
|
||||
})
|
||||
}</Descriptions.Item>
|
||||
</Descriptions>
|
||||
</div> : null
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
}
|
||||
export default connect(({ login }) => ({ login }))(FO045ShowPrint)
|
||||
265
src/components/CustomPages/SK/OperateLog.css
Normal file
265
src/components/CustomPages/SK/OperateLog.css
Normal file
@ -0,0 +1,265 @@
|
||||
.flowchart {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
/* 关键:内容过多时自动换行 */
|
||||
gap: 16px;
|
||||
/* 项之间的间距 */
|
||||
padding: 10px 0;
|
||||
width: 100%;
|
||||
/* 确保容器宽度充足 */
|
||||
}
|
||||
|
||||
.logListContainer {
|
||||
padding-left: 30px;
|
||||
/* 确保左侧始终有30px间距 */
|
||||
width: calc(100% - 180px);
|
||||
/* 减去左侧步骤区域的宽度,避免溢出 */
|
||||
}
|
||||
|
||||
/* 单个日志项样式 - 控制最小宽度避免过度挤压 */
|
||||
|
||||
|
||||
.step {
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
background-color: #4472C4;
|
||||
/* #f0f0f0; */
|
||||
color: white;
|
||||
border: 1px solid #ddd;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 20px;
|
||||
position: relative;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.stepno {
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
background-color: #A5A5A5;
|
||||
/* #f0f0f0; */
|
||||
color: white;
|
||||
border: 1px solid #ddd;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 20px;
|
||||
position: relative;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
/* 长方形 */
|
||||
.rectangle {
|
||||
width: 20px;
|
||||
height: 50px;
|
||||
/* margin-top: -70px; */
|
||||
margin-top: 8px;
|
||||
margin-left: 45px;
|
||||
position: relative;
|
||||
background-color: #ADCDEA;
|
||||
/* transform: rotate(-40deg); */
|
||||
/* 旋转角度 */
|
||||
}
|
||||
|
||||
.rectangleno {
|
||||
width: 20px;
|
||||
height: 50px;
|
||||
/* margin-top: -70px; */
|
||||
margin-top: 8px;
|
||||
margin-left: 45px;
|
||||
position: relative;
|
||||
background-color: #A5A5A5;
|
||||
/* transform: rotate(-40deg); */
|
||||
/* 旋转角度 */
|
||||
}
|
||||
|
||||
.rectangleno::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: -13px;
|
||||
/* 根据需要调整 */
|
||||
left: 50%;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 20px solid transparent;
|
||||
border-right: 20px solid transparent;
|
||||
border-top: 20px solid #A5A5A5;
|
||||
/* 线条颜色 #ddd*/
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
/* 模拟线条 */
|
||||
/* .step:not(:last-child)::after { */
|
||||
.rectangle::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: -13px;
|
||||
/* 根据需要调整 */
|
||||
left: 50%;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 20px solid transparent;
|
||||
border-right: 20px solid transparent;
|
||||
border-top: 20px solid #ADCDEA;
|
||||
/* 线条颜色 #ddd*/
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.step::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
/* bottom: -13px; */
|
||||
/* 根据需要调整 */
|
||||
/* left: 50%; */
|
||||
margin-left: 150px;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-top: 20px solid transparent;
|
||||
border-bottom: 20px solid transparent;
|
||||
/* border-left: 20px solid transparent; */
|
||||
border-left: 20px solid #ADCDEA;
|
||||
/* border-color: #ADCDEA; */
|
||||
/* border: 1px solid #A5A5A5; */
|
||||
|
||||
|
||||
|
||||
/* border-left: 20px solid transparent;
|
||||
border-right: 20px solid transparent; */
|
||||
/* border-top: 20px solid #ADCDEA; */
|
||||
/* 线条颜色 #ddd*/
|
||||
/* transform: translateX(-50%); */
|
||||
}
|
||||
|
||||
|
||||
/* #ADCDEA 天蓝*/
|
||||
/* #70AD47 绿色 */
|
||||
/* #A5A5A5 灰色 深 */
|
||||
/* #D9D9D9 灰色 */
|
||||
/* #FFC000 橙色 浅 */
|
||||
/* #ED7D31 橙色 深 */
|
||||
|
||||
|
||||
|
||||
/* 横向布局 */
|
||||
.flowchartx {
|
||||
flex-direction: row;
|
||||
/* justify-content: space-between; */
|
||||
/* width: 100%; */
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
/* 横向item */
|
||||
.stepx {
|
||||
/* margin-right: 15px; */
|
||||
width: 120px;
|
||||
height: 40px;
|
||||
background-color: #70AD47;
|
||||
color: white;
|
||||
border: 1px solid white;
|
||||
/* border: 1px solid #ddd; */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 20px;
|
||||
position: relative;
|
||||
border-radius: 50px;
|
||||
margin-left: 25px;
|
||||
}
|
||||
|
||||
/* 超时处理 */
|
||||
.stepxOutTime {
|
||||
/* margin-right: 15px; */
|
||||
width: 120px;
|
||||
height: 40px;
|
||||
background-color: #FFC000;
|
||||
color: white;
|
||||
border: 1px solid white;
|
||||
/* border: 1px solid #ddd; */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 20px;
|
||||
position: relative;
|
||||
border-radius: 50px;
|
||||
margin-left: 25px;
|
||||
}
|
||||
|
||||
/* 未处理 */
|
||||
.stepxEnable {
|
||||
/* margin-right: 15px; */
|
||||
width: 120px;
|
||||
height: 40px;
|
||||
background-color: #A5A5A5;
|
||||
color: white;
|
||||
border: 1px solid white;
|
||||
/* border: 1px solid #ddd; */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 20px;
|
||||
position: relative;
|
||||
border-radius: 50px;
|
||||
margin-left: 25px;
|
||||
}
|
||||
|
||||
.stepxLeft50 {
|
||||
margin-left: 50px;
|
||||
}
|
||||
|
||||
/* 横向箭头线 */
|
||||
.linex {
|
||||
margin-left: 10px;
|
||||
width: 60px;
|
||||
height: 5px;
|
||||
/* margin-top: -70px; */
|
||||
/* margin-top: 8px; */
|
||||
/* margin-left: -30px; */
|
||||
margin-top: 40px;
|
||||
position: relative;
|
||||
background-color: #ADCDEA;
|
||||
/* transform: rotate(-40deg); */
|
||||
/* 旋转角度 */
|
||||
}
|
||||
|
||||
/* 横向箭头 */
|
||||
.linex::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
margin-left: 30px;
|
||||
margin-top: -5px;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-top: 8px solid transparent;
|
||||
border-bottom: 8px solid transparent;
|
||||
border-left: 8px solid #ADCDEA;
|
||||
}
|
||||
|
||||
.discribeSpan {
|
||||
display: flex;
|
||||
width: 120px;
|
||||
/* width: 100%; */
|
||||
height: 70px;
|
||||
margin-top: -25px;
|
||||
border-radius: 5px;
|
||||
background: #D9D9D9;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
margin-left: 25px;
|
||||
}
|
||||
|
||||
|
||||
.discribeSpanUser {
|
||||
margin-top: 28px;
|
||||
font-size: smaller;
|
||||
padding: 0 0 0 5px;
|
||||
}
|
||||
|
||||
.discribeSpanTime {
|
||||
font-size: smaller;
|
||||
padding: 0 0 0 5px;
|
||||
}
|
||||
|
||||
/* 横向布局 */
|
||||
@ -1,13 +1,21 @@
|
||||
import { Button, Descriptions, Badge, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd';
|
||||
import React from 'react';
|
||||
import { initFilter, extendRule, extendInclude, setDataFieldValue, showApprove, guid, ShowDateTime } from '../../../utils/common';
|
||||
import {
|
||||
initFilter,
|
||||
extendRule,
|
||||
extendInclude,
|
||||
setDataFieldValue,
|
||||
showApprove,
|
||||
guid,
|
||||
ShowDateTime,
|
||||
} from '../../../utils/common.js';
|
||||
import ReactToPrint from 'react-to-print';
|
||||
import { ExportToExcel } from '@woowalker/feui'
|
||||
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/OperateLog.css';
|
||||
import styles from './OperateLog.css';
|
||||
import config from '../../../config.js';
|
||||
|
||||
class SK006ShowOperateLog extends React.Component {
|
||||
@ -17,7 +25,7 @@ class SK006ShowOperateLog extends React.Component {
|
||||
data: null,
|
||||
riskCount: 1,
|
||||
riskHeight: 50,
|
||||
opEnd: null
|
||||
opEnd: null,
|
||||
// dateFirst: [
|
||||
// [{ OPERATEPOINT: 10 }, { OPERATEPOINT: 20 }, { OPERATEPOINT: 30 }, { OPERATEPOINT: 40 }],
|
||||
// [{ OPERATEPOINT: 48 }, { OPERATEPOINT: 50 }, { OPERATEPOINT: 60 }, { OPERATEPOINT: 70 }, { OPERATEPOINT: 80 }],
|
||||
@ -26,12 +34,11 @@ class SK006ShowOperateLog extends React.Component {
|
||||
// [{ OPERATEPOINT: 140 }, { OPERATEPOINT: 150 }, { OPERATEPOINT: 160 }, { OPERATEPOINT: 180 }, { OPERATEPOINT: 190 }, { OPERATEPOINT: 200 }, { OPERATEPOINT: 210 }, { OPERATEPOINT: 220 }]
|
||||
// ]
|
||||
// ]
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
if (this.props.data?.id)
|
||||
this.loadData(this.props.data?.id);
|
||||
if (this.props.data?.id) this.loadData(this.props.data?.id);
|
||||
}
|
||||
|
||||
componentWillReceiveProps(NextProps) {
|
||||
@ -46,48 +53,47 @@ class SK006ShowOperateLog extends React.Component {
|
||||
this.props.dispatch({
|
||||
type: 'app/getDataByPost',
|
||||
payload: json,
|
||||
url: 'SK/SKSecurityInspectionNotice/SKOrderEntities',
|
||||
url: 'SK/SKSecurityInspectionNotice/OperateLogView',
|
||||
onComplete: (ret) => {
|
||||
if (ret) {
|
||||
let riskCount = 1
|
||||
riskCount = ret.length - 3
|
||||
var isEnd = false
|
||||
var opEnd = null
|
||||
let riskCount = 1;
|
||||
riskCount = ret.length - 3;
|
||||
var isEnd = false;
|
||||
var opEnd = null;
|
||||
if (ret[ret.length - 1].length == 1 && ret[ret.length - 1][0].OPERATEPOINT == 220) {
|
||||
isEnd = true
|
||||
riskCount = riskCount - 1
|
||||
opEnd = ret[ret.length - 1][0]
|
||||
isEnd = true;
|
||||
riskCount = riskCount - 1;
|
||||
opEnd = ret[ret.length - 1][0];
|
||||
}
|
||||
|
||||
let dataRiskMore = []
|
||||
let dataRiskMore = [];
|
||||
if (riskCount > 0) {
|
||||
var countOpeate = ret.length
|
||||
if (isEnd) countOpeate--
|
||||
var countOpeate = ret.length;
|
||||
if (isEnd) countOpeate--;
|
||||
for (let i = 4; i < countOpeate; i++) {
|
||||
dataRiskMore.push(ret[i])
|
||||
dataRiskMore.push(ret[i]);
|
||||
}
|
||||
}
|
||||
if (riskCount == 0) riskCount = 1
|
||||
let riskHeight = 65 * riskCount
|
||||
if (riskCount == 0) riskCount = 1;
|
||||
let riskHeight = 65 * riskCount;
|
||||
this.setState({
|
||||
data: ret,
|
||||
dataRiskMore: dataRiskMore,
|
||||
riskCount: riskCount,
|
||||
opEnd: opEnd,
|
||||
riskHeight: riskHeight
|
||||
})
|
||||
}
|
||||
}
|
||||
riskHeight: riskHeight,
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
render() {
|
||||
const { data, riskCount, dataRiskMore, opEnd, riskHeight } = this.state;
|
||||
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
||||
return <div style={{ textAlign: 'center', margin: "30px 0 0 50px" }}>
|
||||
|
||||
|
||||
<table style={{ marginBottom: "50px" }} >
|
||||
<tbody >
|
||||
return (
|
||||
<div style={{ textAlign: 'center', margin: '30px 0 0 50px' }}>
|
||||
<table style={{ marginBottom: '50px' }}>
|
||||
<tbody>
|
||||
{/* <tr>
|
||||
<td style={{ width: "150px", textAlign: "center" }}>
|
||||
<div className={styles.rectangle} id="step0"></div>
|
||||
@ -97,509 +103,77 @@ class SK006ShowOperateLog extends React.Component {
|
||||
</tr> */}
|
||||
|
||||
{/* 检查任务 */}
|
||||
<tr>
|
||||
<td style={{ width: "150px", textAlign: "center" }}>
|
||||
<div className={styles.step} id="ste1">安全检查通知</div>
|
||||
<div className={styles.rectangle} id="step1"></div>
|
||||
</td>
|
||||
<td colSpan={10} style={{ paddingLeft: "30px" }}>
|
||||
<div className={styles.flowchartx} >
|
||||
|
||||
{data &&
|
||||
data?.map((item, index) => {
|
||||
// 判断当前item的logList中是否所有STATUS都是0
|
||||
const allStatusZero = item.logList?.every((log) => log.STATUS === 0);
|
||||
{
|
||||
data && data[0]?.map((item, index) => {
|
||||
let resultdiv = []
|
||||
for (let i = 0; i < 2; i++) {
|
||||
if (i == 0) {
|
||||
resultdiv.push(
|
||||
item.OPERTETIME ?
|
||||
(
|
||||
//有操作
|
||||
item.ISINTTIME ?
|
||||
(//按时完成 绿色
|
||||
return (
|
||||
<div style={{ display: 'flex', flexDirection: 'row', alignItems: 'flex-start' }}>
|
||||
<div style={{ width: '150px', textAlign: 'center', marginRight: '30px' }}>
|
||||
<div className={allStatusZero ? styles.stepno : styles.step} id="ste1">
|
||||
{item.FORM_NAME}
|
||||
</div>
|
||||
{index < data.length - 1 && (
|
||||
<div className={allStatusZero ? styles.rectangleno : styles.rectangle} id="step1"></div>
|
||||
)}
|
||||
</div>
|
||||
<div className={styles.logListContainer}>
|
||||
<div className={styles.flowchartx}>
|
||||
{item.logList &&
|
||||
item.logList.map((item1, index1) => {
|
||||
{
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
}}
|
||||
key={index1}
|
||||
>
|
||||
<div>
|
||||
<div className={styles.stepx} id="step01">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step02" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:{ShowDateTime(item.OPERTETIME, "MM-dd HH:mm")}</span>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
:
|
||||
( //超时完成 橙色
|
||||
<div>
|
||||
<div className={styles.stepxOutTime} id="step01">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step02" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:{ShowDateTime(item.OPERTETIME, "MM-dd HH:mm")}</span>
|
||||
</div>
|
||||
</div>)
|
||||
)
|
||||
:
|
||||
(
|
||||
//没有操作 灰色
|
||||
item.USRTNAME ? (
|
||||
//有用户信息 写入用户
|
||||
<div>
|
||||
<div className={styles.stepxEnable} id="step01">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step02" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:</span>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
//没有用户信息
|
||||
<div>
|
||||
<div className={styles.stepxEnable} id="step01">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
</div>
|
||||
)
|
||||
)
|
||||
)
|
||||
} else if (index != data[0].length - 1) {
|
||||
resultdiv.push(
|
||||
<div className={styles.linex}></div>
|
||||
)
|
||||
}
|
||||
}
|
||||
return resultdiv
|
||||
})
|
||||
<div
|
||||
className={
|
||||
item1.STATUS == 0
|
||||
? styles.stepxEnable
|
||||
: item1.STATUS == 5
|
||||
? styles.stepx
|
||||
: styles.stepxOutTime
|
||||
}
|
||||
id="step20"
|
||||
>
|
||||
{item1.NAME}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<div id="step21" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item1.USER_NAME}</span>
|
||||
<span className={styles.discribeSpanTime}>
|
||||
{' '}
|
||||
时间:{ShowDateTime(item1.DEAL_DATE, 'MM-dd HH:mm')}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{index1 < item.logList.length - 1 ? <div className={styles.linex}></div> : null}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
})}
|
||||
|
||||
{/* 检查任务 */}
|
||||
|
||||
{/* 检查记录 */}
|
||||
<tr>
|
||||
<td style={{ width: "150px", textAlign: "center" }}>
|
||||
<div className={styles.step} id="ste2">安全检查记录</div>
|
||||
<div className={styles.rectangle} id="step2"></div>
|
||||
</td>
|
||||
<td colSpan={10} style={{ paddingLeft: "30px" }}>
|
||||
<div className={styles.flowchartx} >
|
||||
{
|
||||
data && data[1]?.map((item, index) => {
|
||||
let resultdiv = []
|
||||
for (let i = 0; i < 2; i++) {
|
||||
if (i == 0) {
|
||||
resultdiv.push(
|
||||
item.OPERTETIME ?
|
||||
(
|
||||
//有操作
|
||||
item.ISINTTIME ?
|
||||
(//按时完成 绿色
|
||||
<div>
|
||||
<div className={styles.stepx} id="step20">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step21" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:{ShowDateTime(item.OPERTETIME, "MM-dd HH:mm")}</span>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
:
|
||||
( //超时完成 橙色
|
||||
<div>
|
||||
<div className={styles.stepxOutTime} id="step20">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step21" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:{ShowDateTime(item.OPERTETIME, "MM-dd HH:mm")}</span>
|
||||
</div>
|
||||
</div>)
|
||||
)
|
||||
:
|
||||
(
|
||||
//没有操作 灰色
|
||||
item.USRTNAME ? (
|
||||
//有用户信息 写入用户
|
||||
<div>
|
||||
<div className={styles.stepxEnable} id="step20">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step21" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:</span>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
//没有用户信息
|
||||
<div>
|
||||
<div className={styles.stepxEnable} id="step20">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
</div>
|
||||
)
|
||||
)
|
||||
)
|
||||
} else if (index != data[1].length - 1) {
|
||||
resultdiv.push(
|
||||
<div className={styles.linex}></div>
|
||||
)
|
||||
}
|
||||
}
|
||||
return resultdiv
|
||||
})
|
||||
}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/* 检查记录 */}
|
||||
|
||||
{/* 检查记录汇总 */}
|
||||
<tr>
|
||||
<td style={{ width: "150px", textAlign: "center" }}>
|
||||
<div className={styles.step} id="ste3">安全检查记录汇总</div>
|
||||
<div className={styles.rectangle} id="step3"></div>
|
||||
</td>
|
||||
<td colSpan={10} style={{ paddingLeft: "30px" }}>
|
||||
<div className={styles.flowchartx} >
|
||||
{
|
||||
data && data[2]?.map((item, index) => {
|
||||
let resultdiv = []
|
||||
for (let i = 0; i < 2; i++) {
|
||||
if (i == 0) {
|
||||
resultdiv.push(
|
||||
item.OPERTETIME ?
|
||||
(
|
||||
//有操作
|
||||
item.ISINTTIME ?
|
||||
(//按时完成 绿色
|
||||
<div>
|
||||
<div className={styles.stepx} id="step30">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step31" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:{ShowDateTime(item.OPERTETIME, "MM-dd HH:mm")}</span>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
:
|
||||
( //超时完成 橙色
|
||||
<div>
|
||||
<div className={styles.stepxOutTime} id="step30">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step31" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:{ShowDateTime(item.OPERTETIME, "MM-dd HH:mm")}</span>
|
||||
</div>
|
||||
</div>)
|
||||
)
|
||||
:
|
||||
(
|
||||
//没有操作 灰色
|
||||
item.USRTNAME ? (
|
||||
//有用户信息 写入用户
|
||||
<div>
|
||||
<div className={styles.stepxEnable} id="step30">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step31" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:</span>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
//没有用户信息
|
||||
<div>
|
||||
<div className={styles.stepxEnable} id="step30">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
</div>
|
||||
)
|
||||
)
|
||||
)
|
||||
} else if (index != data[2].length - 1) {
|
||||
resultdiv.push(
|
||||
<div className={styles.linex}></div>
|
||||
)
|
||||
}
|
||||
}
|
||||
return resultdiv
|
||||
})
|
||||
}
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/* 检查记录汇总 */}
|
||||
|
||||
{/* 隐患上报 */}
|
||||
<tr>
|
||||
<td style={{ width: "150px", textAlign: "center" }}>
|
||||
<div className={styles.step} id="ste4">隐患上报</div>
|
||||
<div className={styles.rectangle} id="step4"></div>
|
||||
</td>
|
||||
<td colSpan={10} style={{ paddingLeft: "30px" }}>
|
||||
<div className={styles.flowchartx} >
|
||||
{
|
||||
data && data[3]?.map((item, index) => {
|
||||
let resultdiv = []
|
||||
for (let i = 0; i < 2; i++) {
|
||||
if (i == 0) {
|
||||
resultdiv.push(
|
||||
item.OPERTETIME ?
|
||||
(
|
||||
//有操作
|
||||
item.ISINTTIME ?
|
||||
(//按时完成 绿色
|
||||
<div>
|
||||
<div className={styles.stepx} id="step40">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step41" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:{ShowDateTime(item.OPERTETIME, "MM-dd HH:mm")}</span>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
:
|
||||
( //超时完成 橙色
|
||||
<div>
|
||||
<div className={styles.stepxOutTime} id="step40">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step41" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:{ShowDateTime(item.OPERTETIME, "MM-dd HH:mm")}</span>
|
||||
</div>
|
||||
</div>)
|
||||
)
|
||||
:
|
||||
(
|
||||
//没有操作 灰色
|
||||
item.USRTNAME ? (
|
||||
//有用户信息 写入用户
|
||||
<div>
|
||||
<div className={styles.stepxEnable} id="step40">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step41" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:</span>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
//没有用户信息
|
||||
<div>
|
||||
<div className={styles.stepxEnable} id="step40">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
</div>
|
||||
)
|
||||
)
|
||||
)
|
||||
} else if (index != data[3].length - 1) {
|
||||
resultdiv.push(
|
||||
<div className={styles.linex}></div>
|
||||
)
|
||||
}
|
||||
}
|
||||
return resultdiv
|
||||
})
|
||||
}
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/* 隐患上报 */}
|
||||
|
||||
{/* 隐患确认单 */}
|
||||
<tr>
|
||||
<td style={{ width: "150px", textAlign: "center" }}>
|
||||
<div className={styles.step} id="ste5">隐患确认单</div>
|
||||
<div className={styles.rectangle} id="step5"></div>
|
||||
</td>
|
||||
<td colSpan={10} style={{ paddingLeft: "30px" }}>
|
||||
<div className={styles.flowchartx} >
|
||||
{
|
||||
data && data[4]?.map((item, index) => {
|
||||
let resultdiv = []
|
||||
for (let i = 0; i < 2; i++) {
|
||||
if (i == 0) {
|
||||
resultdiv.push(
|
||||
item.OPERTETIME ?
|
||||
(
|
||||
//有操作
|
||||
item.ISINTTIME ?
|
||||
(//按时完成 绿色
|
||||
<div>
|
||||
<div className={styles.stepx} id="step50">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step51" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:{ShowDateTime(item.OPERTETIME, "MM-dd HH:mm")}</span>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
:
|
||||
( //超时完成 橙色
|
||||
<div>
|
||||
<div className={styles.stepxOutTime} id="step50">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step51" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:{ShowDateTime(item.OPERTETIME, "MM-dd HH:mm")}</span>
|
||||
</div>
|
||||
</div>)
|
||||
)
|
||||
:
|
||||
(
|
||||
//没有操作 灰色
|
||||
item.USRTNAME ? (
|
||||
//有用户信息 写入用户
|
||||
<div>
|
||||
<div className={styles.stepxEnable} id="step50">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step51" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:</span>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
//没有用户信息
|
||||
<div>
|
||||
<div className={styles.stepxEnable} id="step50">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
</div>
|
||||
)
|
||||
)
|
||||
)
|
||||
} else if (index != data[4].length - 1) {
|
||||
resultdiv.push(
|
||||
<div className={styles.linex}></div>
|
||||
)
|
||||
}
|
||||
}
|
||||
return resultdiv
|
||||
})
|
||||
}
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/* 隐患确认单 */}
|
||||
|
||||
{/* 隐患整改通知 */}
|
||||
<tr>
|
||||
<td style={{ width: "150px", textAlign: "center" }}>
|
||||
<div className={styles.step} id="ste6">隐患整改通知</div>
|
||||
<div className={styles.rectangle} id="step6"></div>
|
||||
</td>
|
||||
<td colSpan={10} style={{ paddingLeft: "30px" }}>
|
||||
<div className={styles.flowchartx} >
|
||||
{
|
||||
data && data[5]?.map((item, index) => {
|
||||
let resultdiv = []
|
||||
for (let i = 0; i < 2; i++) {
|
||||
if (i == 0) {
|
||||
resultdiv.push(
|
||||
item.OPERTETIME ?
|
||||
(
|
||||
//有操作
|
||||
item.ISINTTIME ?
|
||||
(//按时完成 绿色
|
||||
<div>
|
||||
<div className={styles.stepx} id="step60">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step61" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:{ShowDateTime(item.OPERTETIME, "MM-dd HH:mm")}</span>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
:
|
||||
( //超时完成 橙色
|
||||
<div>
|
||||
<div className={styles.stepxOutTime} id="step60">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step61" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:{ShowDateTime(item.OPERTETIME, "MM-dd HH:mm")}</span>
|
||||
</div>
|
||||
</div>)
|
||||
)
|
||||
:
|
||||
(
|
||||
//没有操作 灰色
|
||||
item.USRTNAME ? (
|
||||
//有用户信息 写入用户
|
||||
<div>
|
||||
<div className={styles.stepxEnable} id="step60">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step61" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:</span>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
//没有用户信息
|
||||
<div>
|
||||
<div className={styles.stepxEnable} id="step60">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
</div>
|
||||
)
|
||||
)
|
||||
)
|
||||
} else if (index != data[5].length - 1) {
|
||||
resultdiv.push(
|
||||
<div className={styles.linex}></div>
|
||||
)
|
||||
}
|
||||
}
|
||||
return resultdiv
|
||||
})
|
||||
}
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/* 隐患整改通知 */}
|
||||
|
||||
{/* 隐患整改记录 */}
|
||||
<tr>
|
||||
<td style={{ width: "150px", textAlign: "center" }}>
|
||||
<div className={styles.step} id="ste7">隐患整改记录</div>
|
||||
{/* <div className={styles.rectangle} id="step7"></div> */}
|
||||
</td>
|
||||
<td colSpan={10} style={{ paddingLeft: "30px" }}>
|
||||
<div className={styles.flowchartx} >
|
||||
{
|
||||
data && data[6]?.map((item, index) => {
|
||||
let resultdiv = []
|
||||
for (let i = 0; i < 2; i++) {
|
||||
if (i == 0) {
|
||||
resultdiv.push(
|
||||
item.OPERTETIME ?
|
||||
(
|
||||
//有操作
|
||||
item.ISINTTIME ?
|
||||
(//按时完成 绿色
|
||||
<div>
|
||||
<div className={styles.stepx} id="step70">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step71" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:{ShowDateTime(item.OPERTETIME, "MM-dd HH:mm")}</span>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
:
|
||||
( //超时完成 橙色
|
||||
<div>
|
||||
<div className={styles.stepxOutTime} id="step70">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step71" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:{ShowDateTime(item.OPERTETIME, "MM-dd HH:mm")}</span>
|
||||
</div>
|
||||
</div>)
|
||||
)
|
||||
:
|
||||
(
|
||||
//没有操作 灰色
|
||||
item.USRTNAME ? (
|
||||
//有用户信息 写入用户
|
||||
<div>
|
||||
<div className={styles.stepxEnable} id="step70">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step71" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:</span>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
//没有用户信息
|
||||
<div>
|
||||
<div className={styles.stepxEnable} id="step70">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
</div>
|
||||
)
|
||||
)
|
||||
)
|
||||
} else if (index != data[6].length - 1) {
|
||||
resultdiv.push(
|
||||
<div className={styles.linex}></div>
|
||||
)
|
||||
}
|
||||
}
|
||||
return resultdiv
|
||||
})
|
||||
}
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/* 隐患整改记录 */}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
export default connect(({ login, app }) => ({ login, app }))(SK006ShowOperateLog)
|
||||
export default connect(({ login, app }) => ({ login, app }))(SK006ShowOperateLog);
|
||||
|
||||
605
src/components/CustomPages/SK/SK006ShowOperateLogOld.js
Normal file
605
src/components/CustomPages/SK/SK006ShowOperateLogOld.js
Normal file
@ -0,0 +1,605 @@
|
||||
import { Button, Descriptions, Badge, Popconfirm, Row, Col, Form, Input, Select, Table } from 'antd';
|
||||
import React from 'react';
|
||||
import { initFilter, extendRule, extendInclude, setDataFieldValue, showApprove, guid, ShowDateTime } from '../../../utils/common.js';
|
||||
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/OperateLog.css';
|
||||
import config from '../../../config.js';
|
||||
|
||||
class SK006ShowOperateLog extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
data: null,
|
||||
riskCount: 1,
|
||||
riskHeight: 50,
|
||||
opEnd: null
|
||||
// dateFirst: [
|
||||
// [{ OPERATEPOINT: 10 }, { OPERATEPOINT: 20 }, { OPERATEPOINT: 30 }, { OPERATEPOINT: 40 }],
|
||||
// [{ OPERATEPOINT: 48 }, { OPERATEPOINT: 50 }, { OPERATEPOINT: 60 }, { OPERATEPOINT: 70 }, { OPERATEPOINT: 80 }],
|
||||
// [{ OPERATEPOINT: 130 }],
|
||||
// [
|
||||
// [{ OPERATEPOINT: 140 }, { OPERATEPOINT: 150 }, { OPERATEPOINT: 160 }, { OPERATEPOINT: 180 }, { OPERATEPOINT: 190 }, { OPERATEPOINT: 200 }, { OPERATEPOINT: 210 }, { OPERATEPOINT: 220 }]
|
||||
// ]
|
||||
// ]
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
loadData = (id) => {
|
||||
var orgId = this.props.login ? this.props.login.OrgId : '';
|
||||
let json = initFilter(orgId, id);
|
||||
this.props.dispatch({
|
||||
type: 'app/getDataByPost',
|
||||
payload: json,
|
||||
url: 'SK/SKSecurityInspectionNotice/SKOrderEntities',
|
||||
onComplete: (ret) => {
|
||||
if (ret) {
|
||||
let riskCount = 1
|
||||
riskCount = ret.length - 3
|
||||
var isEnd = false
|
||||
var opEnd = null
|
||||
if (ret[ret.length - 1].length == 1 && ret[ret.length - 1][0].OPERATEPOINT == 220) {
|
||||
isEnd = true
|
||||
riskCount = riskCount - 1
|
||||
opEnd = ret[ret.length - 1][0]
|
||||
}
|
||||
|
||||
let dataRiskMore = []
|
||||
if (riskCount > 0) {
|
||||
var countOpeate = ret.length
|
||||
if (isEnd) countOpeate--
|
||||
for (let i = 4; i < countOpeate; i++) {
|
||||
dataRiskMore.push(ret[i])
|
||||
}
|
||||
}
|
||||
if (riskCount == 0) riskCount = 1
|
||||
let riskHeight = 65 * riskCount
|
||||
this.setState({
|
||||
data: ret,
|
||||
dataRiskMore: dataRiskMore,
|
||||
riskCount: riskCount,
|
||||
opEnd: opEnd,
|
||||
riskHeight: riskHeight
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
render() {
|
||||
const { data, riskCount, dataRiskMore, opEnd, riskHeight } = this.state;
|
||||
const enums = this.props.data.enums ? this.props.data.enums : this.props.app.enums;
|
||||
return <div style={{ textAlign: 'center', margin: "30px 0 0 50px" }}>
|
||||
|
||||
|
||||
<table style={{ marginBottom: "50px" }} >
|
||||
<tbody >
|
||||
{/* <tr>
|
||||
<td style={{ width: "150px", textAlign: "center" }}>
|
||||
<div className={styles.rectangle} id="step0"></div>
|
||||
</td>
|
||||
<td colSpan={10}>
|
||||
</td>
|
||||
</tr> */}
|
||||
|
||||
{/* 检查任务 */}
|
||||
<tr>
|
||||
<td style={{ width: "150px", textAlign: "center" }}>
|
||||
<div className={styles.step} id="ste1">安全检查通知</div>
|
||||
<div className={styles.rectangle} id="step1"></div>
|
||||
</td>
|
||||
<td colSpan={10} style={{ paddingLeft: "30px" }}>
|
||||
<div className={styles.flowchartx} >
|
||||
{
|
||||
data && data[0]?.map((item, index) => {
|
||||
let resultdiv = []
|
||||
for (let i = 0; i < 2; i++) {
|
||||
if (i == 0) {
|
||||
resultdiv.push(
|
||||
item.OPERTETIME ?
|
||||
(
|
||||
//有操作
|
||||
item.ISINTTIME ?
|
||||
(//按时完成 绿色
|
||||
<div>
|
||||
<div className={styles.stepx} id="step01">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step02" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:{ShowDateTime(item.OPERTETIME, "MM-dd HH:mm")}</span>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
:
|
||||
( //超时完成 橙色
|
||||
<div>
|
||||
<div className={styles.stepxOutTime} id="step01">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step02" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:{ShowDateTime(item.OPERTETIME, "MM-dd HH:mm")}</span>
|
||||
</div>
|
||||
</div>)
|
||||
)
|
||||
:
|
||||
(
|
||||
//没有操作 灰色
|
||||
item.USRTNAME ? (
|
||||
//有用户信息 写入用户
|
||||
<div>
|
||||
<div className={styles.stepxEnable} id="step01">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step02" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:</span>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
//没有用户信息
|
||||
<div>
|
||||
<div className={styles.stepxEnable} id="step01">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
</div>
|
||||
)
|
||||
)
|
||||
)
|
||||
} else if (index != data[0].length - 1) {
|
||||
resultdiv.push(
|
||||
<div className={styles.linex}></div>
|
||||
)
|
||||
}
|
||||
}
|
||||
return resultdiv
|
||||
})
|
||||
}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/* 检查任务 */}
|
||||
|
||||
{/* 检查记录 */}
|
||||
<tr>
|
||||
<td style={{ width: "150px", textAlign: "center" }}>
|
||||
<div className={styles.step} id="ste2">安全检查记录</div>
|
||||
<div className={styles.rectangle} id="step2"></div>
|
||||
</td>
|
||||
<td colSpan={10} style={{ paddingLeft: "30px" }}>
|
||||
<div className={styles.flowchartx} >
|
||||
{
|
||||
data && data[1]?.map((item, index) => {
|
||||
let resultdiv = []
|
||||
for (let i = 0; i < 2; i++) {
|
||||
if (i == 0) {
|
||||
resultdiv.push(
|
||||
item.OPERTETIME ?
|
||||
(
|
||||
//有操作
|
||||
item.ISINTTIME ?
|
||||
(//按时完成 绿色
|
||||
<div>
|
||||
<div className={styles.stepx} id="step20">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step21" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:{ShowDateTime(item.OPERTETIME, "MM-dd HH:mm")}</span>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
:
|
||||
( //超时完成 橙色
|
||||
<div>
|
||||
<div className={styles.stepxOutTime} id="step20">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step21" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:{ShowDateTime(item.OPERTETIME, "MM-dd HH:mm")}</span>
|
||||
</div>
|
||||
</div>)
|
||||
)
|
||||
:
|
||||
(
|
||||
//没有操作 灰色
|
||||
item.USRTNAME ? (
|
||||
//有用户信息 写入用户
|
||||
<div>
|
||||
<div className={styles.stepxEnable} id="step20">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step21" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:</span>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
//没有用户信息
|
||||
<div>
|
||||
<div className={styles.stepxEnable} id="step20">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
</div>
|
||||
)
|
||||
)
|
||||
)
|
||||
} else if (index != data[1].length - 1) {
|
||||
resultdiv.push(
|
||||
<div className={styles.linex}></div>
|
||||
)
|
||||
}
|
||||
}
|
||||
return resultdiv
|
||||
})
|
||||
}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/* 检查记录 */}
|
||||
|
||||
{/* 检查记录汇总 */}
|
||||
<tr>
|
||||
<td style={{ width: "150px", textAlign: "center" }}>
|
||||
<div className={styles.step} id="ste3">安全检查记录汇总</div>
|
||||
<div className={styles.rectangle} id="step3"></div>
|
||||
</td>
|
||||
<td colSpan={10} style={{ paddingLeft: "30px" }}>
|
||||
<div className={styles.flowchartx} >
|
||||
{
|
||||
data && data[2]?.map((item, index) => {
|
||||
let resultdiv = []
|
||||
for (let i = 0; i < 2; i++) {
|
||||
if (i == 0) {
|
||||
resultdiv.push(
|
||||
item.OPERTETIME ?
|
||||
(
|
||||
//有操作
|
||||
item.ISINTTIME ?
|
||||
(//按时完成 绿色
|
||||
<div>
|
||||
<div className={styles.stepx} id="step30">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step31" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:{ShowDateTime(item.OPERTETIME, "MM-dd HH:mm")}</span>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
:
|
||||
( //超时完成 橙色
|
||||
<div>
|
||||
<div className={styles.stepxOutTime} id="step30">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step31" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:{ShowDateTime(item.OPERTETIME, "MM-dd HH:mm")}</span>
|
||||
</div>
|
||||
</div>)
|
||||
)
|
||||
:
|
||||
(
|
||||
//没有操作 灰色
|
||||
item.USRTNAME ? (
|
||||
//有用户信息 写入用户
|
||||
<div>
|
||||
<div className={styles.stepxEnable} id="step30">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step31" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:</span>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
//没有用户信息
|
||||
<div>
|
||||
<div className={styles.stepxEnable} id="step30">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
</div>
|
||||
)
|
||||
)
|
||||
)
|
||||
} else if (index != data[2].length - 1) {
|
||||
resultdiv.push(
|
||||
<div className={styles.linex}></div>
|
||||
)
|
||||
}
|
||||
}
|
||||
return resultdiv
|
||||
})
|
||||
}
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/* 检查记录汇总 */}
|
||||
|
||||
{/* 隐患上报 */}
|
||||
<tr>
|
||||
<td style={{ width: "150px", textAlign: "center" }}>
|
||||
<div className={styles.step} id="ste4">隐患上报</div>
|
||||
<div className={styles.rectangle} id="step4"></div>
|
||||
</td>
|
||||
<td colSpan={10} style={{ paddingLeft: "30px" }}>
|
||||
<div className={styles.flowchartx} >
|
||||
{
|
||||
data && data[3]?.map((item, index) => {
|
||||
let resultdiv = []
|
||||
for (let i = 0; i < 2; i++) {
|
||||
if (i == 0) {
|
||||
resultdiv.push(
|
||||
item.OPERTETIME ?
|
||||
(
|
||||
//有操作
|
||||
item.ISINTTIME ?
|
||||
(//按时完成 绿色
|
||||
<div>
|
||||
<div className={styles.stepx} id="step40">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step41" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:{ShowDateTime(item.OPERTETIME, "MM-dd HH:mm")}</span>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
:
|
||||
( //超时完成 橙色
|
||||
<div>
|
||||
<div className={styles.stepxOutTime} id="step40">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step41" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:{ShowDateTime(item.OPERTETIME, "MM-dd HH:mm")}</span>
|
||||
</div>
|
||||
</div>)
|
||||
)
|
||||
:
|
||||
(
|
||||
//没有操作 灰色
|
||||
item.USRTNAME ? (
|
||||
//有用户信息 写入用户
|
||||
<div>
|
||||
<div className={styles.stepxEnable} id="step40">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step41" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:</span>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
//没有用户信息
|
||||
<div>
|
||||
<div className={styles.stepxEnable} id="step40">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
</div>
|
||||
)
|
||||
)
|
||||
)
|
||||
} else if (index != data[3].length - 1) {
|
||||
resultdiv.push(
|
||||
<div className={styles.linex}></div>
|
||||
)
|
||||
}
|
||||
}
|
||||
return resultdiv
|
||||
})
|
||||
}
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/* 隐患上报 */}
|
||||
|
||||
{/* 隐患确认单 */}
|
||||
<tr>
|
||||
<td style={{ width: "150px", textAlign: "center" }}>
|
||||
<div className={styles.step} id="ste5">隐患确认单</div>
|
||||
<div className={styles.rectangle} id="step5"></div>
|
||||
</td>
|
||||
<td colSpan={10} style={{ paddingLeft: "30px" }}>
|
||||
<div className={styles.flowchartx} >
|
||||
{
|
||||
data && data[4]?.map((item, index) => {
|
||||
let resultdiv = []
|
||||
for (let i = 0; i < 2; i++) {
|
||||
if (i == 0) {
|
||||
resultdiv.push(
|
||||
item.OPERTETIME ?
|
||||
(
|
||||
//有操作
|
||||
item.ISINTTIME ?
|
||||
(//按时完成 绿色
|
||||
<div>
|
||||
<div className={styles.stepx} id="step50">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step51" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:{ShowDateTime(item.OPERTETIME, "MM-dd HH:mm")}</span>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
:
|
||||
( //超时完成 橙色
|
||||
<div>
|
||||
<div className={styles.stepxOutTime} id="step50">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step51" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:{ShowDateTime(item.OPERTETIME, "MM-dd HH:mm")}</span>
|
||||
</div>
|
||||
</div>)
|
||||
)
|
||||
:
|
||||
(
|
||||
//没有操作 灰色
|
||||
item.USRTNAME ? (
|
||||
//有用户信息 写入用户
|
||||
<div>
|
||||
<div className={styles.stepxEnable} id="step50">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step51" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:</span>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
//没有用户信息
|
||||
<div>
|
||||
<div className={styles.stepxEnable} id="step50">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
</div>
|
||||
)
|
||||
)
|
||||
)
|
||||
} else if (index != data[4].length - 1) {
|
||||
resultdiv.push(
|
||||
<div className={styles.linex}></div>
|
||||
)
|
||||
}
|
||||
}
|
||||
return resultdiv
|
||||
})
|
||||
}
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/* 隐患确认单 */}
|
||||
|
||||
{/* 隐患整改通知 */}
|
||||
<tr>
|
||||
<td style={{ width: "150px", textAlign: "center" }}>
|
||||
<div className={styles.step} id="ste6">隐患整改通知</div>
|
||||
<div className={styles.rectangle} id="step6"></div>
|
||||
</td>
|
||||
<td colSpan={10} style={{ paddingLeft: "30px" }}>
|
||||
<div className={styles.flowchartx} >
|
||||
{
|
||||
data && data[5]?.map((item, index) => {
|
||||
let resultdiv = []
|
||||
for (let i = 0; i < 2; i++) {
|
||||
if (i == 0) {
|
||||
resultdiv.push(
|
||||
item.OPERTETIME ?
|
||||
(
|
||||
//有操作
|
||||
item.ISINTTIME ?
|
||||
(//按时完成 绿色
|
||||
<div>
|
||||
<div className={styles.stepx} id="step60">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step61" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:{ShowDateTime(item.OPERTETIME, "MM-dd HH:mm")}</span>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
:
|
||||
( //超时完成 橙色
|
||||
<div>
|
||||
<div className={styles.stepxOutTime} id="step60">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step61" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:{ShowDateTime(item.OPERTETIME, "MM-dd HH:mm")}</span>
|
||||
</div>
|
||||
</div>)
|
||||
)
|
||||
:
|
||||
(
|
||||
//没有操作 灰色
|
||||
item.USRTNAME ? (
|
||||
//有用户信息 写入用户
|
||||
<div>
|
||||
<div className={styles.stepxEnable} id="step60">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step61" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:</span>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
//没有用户信息
|
||||
<div>
|
||||
<div className={styles.stepxEnable} id="step60">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
</div>
|
||||
)
|
||||
)
|
||||
)
|
||||
} else if (index != data[5].length - 1) {
|
||||
resultdiv.push(
|
||||
<div className={styles.linex}></div>
|
||||
)
|
||||
}
|
||||
}
|
||||
return resultdiv
|
||||
})
|
||||
}
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/* 隐患整改通知 */}
|
||||
|
||||
{/* 隐患整改记录 */}
|
||||
<tr>
|
||||
<td style={{ width: "150px", textAlign: "center" }}>
|
||||
<div className={styles.step} id="ste7">隐患整改记录</div>
|
||||
{/* <div className={styles.rectangle} id="step7"></div> */}
|
||||
</td>
|
||||
<td colSpan={10} style={{ paddingLeft: "30px" }}>
|
||||
<div className={styles.flowchartx} >
|
||||
{
|
||||
data && data[6]?.map((item, index) => {
|
||||
let resultdiv = []
|
||||
for (let i = 0; i < 2; i++) {
|
||||
if (i == 0) {
|
||||
resultdiv.push(
|
||||
item.OPERTETIME ?
|
||||
(
|
||||
//有操作
|
||||
item.ISINTTIME ?
|
||||
(//按时完成 绿色
|
||||
<div>
|
||||
<div className={styles.stepx} id="step70">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step71" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:{ShowDateTime(item.OPERTETIME, "MM-dd HH:mm")}</span>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
:
|
||||
( //超时完成 橙色
|
||||
<div>
|
||||
<div className={styles.stepxOutTime} id="step70">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step71" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:{ShowDateTime(item.OPERTETIME, "MM-dd HH:mm")}</span>
|
||||
</div>
|
||||
</div>)
|
||||
)
|
||||
:
|
||||
(
|
||||
//没有操作 灰色
|
||||
item.USRTNAME ? (
|
||||
//有用户信息 写入用户
|
||||
<div>
|
||||
<div className={styles.stepxEnable} id="step70">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
<div id="step71" className={styles.discribeSpan}>
|
||||
<span className={styles.discribeSpanUser}> 用户:{item.USRTNAME}</span>
|
||||
<span className={styles.discribeSpanTime}> 时间:</span>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
//没有用户信息
|
||||
<div>
|
||||
<div className={styles.stepxEnable} id="step70">{enums.SKOPERATEPOINT_Enums.enums[item.OPERATEPOINT]}</div>
|
||||
</div>
|
||||
)
|
||||
)
|
||||
)
|
||||
} else if (index != data[6].length - 1) {
|
||||
resultdiv.push(
|
||||
<div className={styles.linex}></div>
|
||||
)
|
||||
}
|
||||
}
|
||||
return resultdiv
|
||||
})
|
||||
}
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/* 隐患整改记录 */}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
export default connect(({ login, app }) => ({ login, app }))(SK006ShowOperateLog)
|
||||
@ -16,7 +16,7 @@ class SK010CheckList extends React.Component {
|
||||
selectedRowKeys:[],
|
||||
taskSelects: [],
|
||||
dataList: [],
|
||||
MineType:0,
|
||||
PRODUCTION_UNIT_ID:null,
|
||||
CHECK_CYCLE:0,
|
||||
CHECK_TYPE:0,
|
||||
CHECK_CYCLE_ID:null,
|
||||
@ -103,8 +103,8 @@ class SK010CheckList extends React.Component {
|
||||
},
|
||||
{
|
||||
title: "生产单元",
|
||||
dataIndex: "Nav_ProductionUnit.NAME",
|
||||
key: "Nav_ProductionUnit.NAME",
|
||||
dataIndex: "MINE_NAME",
|
||||
key: "MINE_NAME",
|
||||
// render: (text, record, index) => {
|
||||
// return <label>{this.props.app.enums.SKProductionUnit.enums[record.MineType]}</label>
|
||||
// }
|
||||
@ -204,7 +204,7 @@ class SK010CheckList extends React.Component {
|
||||
this.setState({
|
||||
showDetail: true,
|
||||
},()=>{
|
||||
let json = initFilter(this.props.login.OrgId,item.MineType,'','','',item.CHECK_TYPE_ID,item.CHECK_CYCLE,item.CHECK_TYPE);
|
||||
let json = initFilter(this.props.login.OrgId,item.PRODUCTION_UNIT_ID,'','','',item.CHECK_TYPE_ID,item.CHECK_CYCLE,item.CHECK_TYPE);
|
||||
extendIgnoreDataRule(json)
|
||||
this.props.dispatch({
|
||||
type: 'app/getDataByPost',
|
||||
@ -213,7 +213,7 @@ class SK010CheckList extends React.Component {
|
||||
onComplete: (ret) => {
|
||||
if (ret) {
|
||||
this.setState({ Details: ret,
|
||||
MineType:item.MineType,
|
||||
PRODUCTION_UNIT_ID :item.PRODUCTION_UNIT_ID,
|
||||
CHECK_CYCLE:item.CHECK_CYCLE,
|
||||
CHECK_TYPE:item.CHECK_TYPE,
|
||||
CHECK_TYPE_ID:item.CHECK_TYPE_ID, });
|
||||
|
||||
@ -38,7 +38,23 @@ class SK022ShowPrint extends React.Component {
|
||||
if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
|
||||
this.props.data.onCancel();
|
||||
}
|
||||
|
||||
onTableBtnAgree() {
|
||||
this.props.dispatch({
|
||||
type: 'app/getDataByPost',
|
||||
url: 'SK/SKHiddenDangerRectifyRecord/IdentityUpdate',
|
||||
payload: {
|
||||
ID: this.props.data.id,
|
||||
TaskID: this.props.data.TaskID,
|
||||
},
|
||||
onComplete: (ret) => {
|
||||
if (ret) {
|
||||
message.success('确认成功!');
|
||||
this.setState({ BtnAgreeDisplay: 'none' })
|
||||
this.BtnClose();
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
loadData = (dataId, taskID) => {
|
||||
let json = initFilter(this.props.login.OrgId);
|
||||
extendRule(json, 'ID', 1, dataId);
|
||||
@ -108,6 +124,7 @@ class SK022ShowPrint extends React.Component {
|
||||
pageStyle=".printDIV { padding:0 40px;} img{width :120px}"
|
||||
/>
|
||||
<Button style={{ marginLeft: '8px', display: data && data.STATUS === 30 ? "inline" : "none" }} onClick={() => this.onTableBtnExport()} icon="export" >导出</Button>
|
||||
<Button type="primary" style={{ marginLeft: '8px', display: data && data.STATUS === 21 ? "inline" : "none" }} onClick={() => this.onTableBtnAgree()} icon="check" >确认</Button>
|
||||
</div>
|
||||
<div ref={el => (this.componentRef = el)} style={{ padding: '20px' }} id={'tableId' + this.props.data.id}>
|
||||
<h1 style={{ textAlign: 'center', margin: '15px' }}>隐患整改记录</h1>
|
||||
|
||||
@ -115,11 +115,10 @@ class SK033ShowPrint extends React.Component {
|
||||
<Descriptions.Item label="发起部门">{data.Nav_ApplyDepartment ? data.Nav_ApplyDepartment.NAME : ''}</Descriptions.Item>
|
||||
<Descriptions.Item label="发起人员">{data.Nav_ApplyUser ? data.Nav_ApplyUser.NAME : ''}</Descriptions.Item>
|
||||
<Descriptions.Item label="辨识年度">{data.YEAR}</Descriptions.Item>
|
||||
<Descriptions.Item label="辨识与评估内容">{data.CONTENTS}</Descriptions.Item>
|
||||
<Descriptions.Item label="开始时间">{moment(data.START_DATE).format('YYYY-MM-DD')}</Descriptions.Item>
|
||||
<Descriptions.Item label="结束时间">{data.END_DATE ? moment(data.END_DATE).format('YYYY-MM-DD') : null}</Descriptions.Item>
|
||||
<Descriptions.Item label="辨识与评估内容">{data.CONTENTS}</Descriptions.Item>
|
||||
<Descriptions.Item label="辨识要求">{data.Nav_Require ? data.Nav_Require.NAME : ''}</Descriptions.Item>
|
||||
|
||||
<Descriptions.Item label="附件">{
|
||||
showFiles(data?.Nav_Files, config.picServerHost, this)
|
||||
}</Descriptions.Item>
|
||||
|
||||
@ -1,70 +1,62 @@
|
||||
// 核心库
|
||||
import React, { Component } from "react";
|
||||
import { connect } from "dva";
|
||||
import { withRouter } from "dva/router";
|
||||
import QRCode from "qrcode";
|
||||
import config from "../../config";
|
||||
import React, { Component } from 'react';
|
||||
import { connect } from 'dva';
|
||||
import { withRouter } from 'dva/router';
|
||||
import QRCode from 'qrcode';
|
||||
import config from '../../config';
|
||||
|
||||
class GuideCanvas extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
visible: "none",
|
||||
company: "XLK",
|
||||
visible: 'none',
|
||||
company: 'XLK',
|
||||
};
|
||||
}
|
||||
componentDidMount() {
|
||||
QRCode.toCanvas(
|
||||
config.guideSeverHost,
|
||||
{ errorCorrectionLevel: "L", width: 140 },
|
||||
function (err, canvas) {
|
||||
QRCode.toCanvas(config.guideSeverHost, { errorCorrectionLevel: 'L', width: 140 }, function (err, canvas) {
|
||||
if (err) throw err;
|
||||
let container = document.getElementById("canvas1");
|
||||
let container = document.getElementById('canvas1');
|
||||
if (container) {
|
||||
try {
|
||||
container.appendChild(canvas);
|
||||
} catch (e) { }
|
||||
} catch (e) {}
|
||||
}
|
||||
}
|
||||
);
|
||||
QRCode.toCanvas(
|
||||
config.guideH5Host,
|
||||
{ errorCorrectionLevel: "L", width: 140 },
|
||||
function (err, canvas) {
|
||||
});
|
||||
QRCode.toCanvas(config.guideH5Host, { errorCorrectionLevel: 'L', width: 140 }, function (err, canvas) {
|
||||
if (err) throw err;
|
||||
let container1 = document.getElementById("canvas2");
|
||||
let container1 = document.getElementById('canvas2');
|
||||
if (container1) {
|
||||
try {
|
||||
container1.appendChild(canvas);
|
||||
} catch (e) { }
|
||||
} catch (e) {}
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
QRCode.toCanvas(
|
||||
config.h5Web + "#/pages/index/index?OrgId=" + this.props.login.OrgId,
|
||||
{ errorCorrectionLevel: "L", width: 140 },
|
||||
config.h5Web + '#/pages/index/index?OrgId=' + this.props.login.OrgId,
|
||||
{ errorCorrectionLevel: 'L', width: 140 },
|
||||
function (err, canvas) {
|
||||
if (err) throw err;
|
||||
let container1 = document.getElementById("canvas3");
|
||||
let container1 = document.getElementById('canvas3');
|
||||
if (container1) {
|
||||
try {
|
||||
container1.appendChild(canvas);
|
||||
} catch (e) { }
|
||||
} catch (e) {}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// 二维码平台
|
||||
QRCode.toCanvas(
|
||||
config.h5Web+'?OrgId='+this.props.login.OrgId ,
|
||||
{ errorCorrectionLevel: "L", width: 140 },
|
||||
config.h5Web + '?OrgId=' + this.props.login.OrgId,
|
||||
{ errorCorrectionLevel: 'L', width: 140 },
|
||||
function (err, canvas) {
|
||||
if (err) throw err;
|
||||
let container = document.getElementById("canvas5");
|
||||
let container = document.getElementById('canvas5');
|
||||
if (container) {
|
||||
try {
|
||||
container.appendChild(canvas);
|
||||
} catch (e) { }
|
||||
} catch (e) {}
|
||||
}
|
||||
}
|
||||
);
|
||||
@ -73,8 +65,8 @@ class GuideCanvas extends Component {
|
||||
render() {
|
||||
return (
|
||||
<React.Fragment>
|
||||
<div style={{ display: "flex", flexDirection: "row", margin: "20px" }}>
|
||||
<div
|
||||
<div style={{ display: 'flex', flexDirection: 'row', margin: '20px' }}>
|
||||
{/* <div
|
||||
style={{
|
||||
display: "none",
|
||||
flexDirection: "column",
|
||||
@ -84,12 +76,12 @@ class GuideCanvas extends Component {
|
||||
>
|
||||
<div id="canvas1" ></div>
|
||||
<b>APP下载</b>
|
||||
</div>
|
||||
</div> */}
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
alignItems: "center",
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
alignItems: 'center',
|
||||
}}
|
||||
>
|
||||
<div id="canvas2"></div>
|
||||
@ -98,16 +90,16 @@ class GuideCanvas extends Component {
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: "column",
|
||||
alignItems: "center",
|
||||
marginLeft: "30px",
|
||||
flexDirection: 'column',
|
||||
alignItems: 'center',
|
||||
marginLeft: '30px',
|
||||
}}
|
||||
>
|
||||
<div id="canvas3"></div>
|
||||
<b>新员工注册</b>
|
||||
</div>
|
||||
|
||||
<div
|
||||
{/* <div
|
||||
style={{
|
||||
display: 'none',
|
||||
flexDirection: "column",
|
||||
@ -117,7 +109,7 @@ class GuideCanvas extends Component {
|
||||
>
|
||||
<div id="canvas5"></div>
|
||||
<b>二维码平台</b>
|
||||
</div>
|
||||
</div> */}
|
||||
</div>
|
||||
</React.Fragment>
|
||||
);
|
||||
|
||||
@ -546,8 +546,8 @@ export function permissionUtils (login) {
|
||||
if (login.rolePerm && login.rolePerm.Nav_RolePermForms && login.rolePerm.Nav_RolePermForms.length) { // 只要一个角色有权限就有权限
|
||||
login.rolePerm.Nav_RolePermForms.forEach((n1, i1) => {
|
||||
if (n1.PermFormId === formId) {
|
||||
const matchForm = n1.MenuId === currActivatedMenu.ID
|
||||
if (type == 0 && matchForm) { // 表单权限
|
||||
//const matchForm = n1.MenuId === currActivatedMenu.ID
|
||||
if (type == 0 && true) { // 表单权限
|
||||
hasPermission = true
|
||||
} else if (type == 1) { // 按钮权限
|
||||
if (n1.Nav_Btns && n1.Nav_Btns.length) {
|
||||
|
||||
37
src/files/edit/FO041.js
Normal file
37
src/files/edit/FO041.js
Normal file
@ -0,0 +1,37 @@
|
||||
import { message } from "antd/lib/index";
|
||||
import { getPropertyData, extendInclude, extendRule, getDataFieldValue, setDataFieldValue, initFilter, guid } from "../../utils/common";
|
||||
import moment from 'moment';
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
// 编辑
|
||||
export default {
|
||||
onBeforeSaveHandleRecord(params) {
|
||||
params.record.TaskID = params.data.TaskID //TaskID传递消息表ID
|
||||
params.record.PUBLISH = params.customParams;
|
||||
},
|
||||
onBeforeEdit: ({ isNew,login,record, dispatch,stateData, setFieldVisible,setFieldValue,setFieldValueByBatch }) => {
|
||||
if (isNew) {
|
||||
let json = initFilter(login.OrgId);
|
||||
extendRule(json, "ID", 1, login.userId);
|
||||
extendInclude(json, 'Nav_Department.Nav_Unit');
|
||||
dispatch({
|
||||
type: 'app/getDataByPost',
|
||||
url: 'FM/User/Get',
|
||||
payload: json,
|
||||
onComplete: (ret) => {
|
||||
if (ret) {
|
||||
let temps = [];
|
||||
temps.push({ field: 'APPLY_USER_ID', value: ret.ID})
|
||||
temps.push({ field: 'Nav_ApplyUser.NAME', value: ret.NAME })
|
||||
temps.push({ field: 'APPLY_DEPARTMENT_ID', value: ret.DEPARTMENT_ID})
|
||||
temps.push({ field: 'Nav_ApplyDepartment.NAME', value: ret.Nav_Department?.NAME })
|
||||
temps.push({ field: 'PRODUCTION_UNIT_ID', value: ret.Nav_Department?.PRODUCTION_UNIT_ID})
|
||||
temps.push({ field: 'Nav_ProductionUnit.NAME', value: ret.Nav_Department?.Nav_Unit?.NAME })
|
||||
setFieldValueByBatch(temps);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
35
src/files/edit/FOO035.js
Normal file
35
src/files/edit/FOO035.js
Normal file
@ -0,0 +1,35 @@
|
||||
import { message } from "antd/lib/index";
|
||||
import { getPropertyData, extendInclude, extendRule, getDataFieldValue, setDataFieldValue, initFilter, guid } from "../../utils/common";
|
||||
import moment from 'moment';
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
// 编辑
|
||||
export default {
|
||||
onBeforeSaveHandleRecord(params) {
|
||||
params.record.TaskID = params.data.TaskID //TaskID传递消息表ID
|
||||
params.record.PUBLISH = params.customParams;
|
||||
},
|
||||
onBeforeEdit: ({ isNew,login,record, dispatch,stateData, setFieldVisible,setFieldValue,setFieldValueByBatch }) => {
|
||||
if (isNew) {
|
||||
let json = initFilter(login.OrgId);
|
||||
extendRule(json, "ID", 1, login.userId);
|
||||
extendInclude(json, 'Nav_Department');
|
||||
dispatch({
|
||||
type: 'app/getDataByPost',
|
||||
url: 'FM/User/Get',
|
||||
payload: json,
|
||||
onComplete: (ret) => {
|
||||
if (ret) {
|
||||
let temps = [];
|
||||
temps.push({ field: 'USER_ID', value: ret.ID})
|
||||
temps.push({ field: 'Nav_User.NAME', value: ret.NAME })
|
||||
temps.push({ field: 'DEPARTMENT_ID', value: ret.DEPARTMENT_ID})
|
||||
temps.push({ field: 'Nav_Department.NAME', value: ret.Nav_Department?.NAME })
|
||||
setFieldValueByBatch(temps);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -216,7 +216,12 @@ btnSubContents: ({row, srcRecord,getSelectedRecords,record,saveRowRecord,colInfo
|
||||
payload: stateData,
|
||||
onlyData: false,
|
||||
onComplete: (re) => {
|
||||
if (re && re.IsSuccessful && re.Data) {
|
||||
if(re && re.ErrorMessage)
|
||||
{
|
||||
message.error(re.ErrorMessage)
|
||||
return
|
||||
}
|
||||
else if (re && re.IsSuccessful && re.Data) {
|
||||
stateData.Nav_CheckNoticeDetails = re.Data
|
||||
saveRowRecord({ record: stateData, editCode: "T_SK_SECURITY_INSPECTION_NOTICE_DETAIL" })
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ export default {
|
||||
Nav_Type: item.Nav_Type,
|
||||
Nav_RiskName: item.Nav_RiskName,
|
||||
EVALUATE_LEVEL:item.EVALUATE_LEVEL,
|
||||
MARK:0,
|
||||
MARK:10,
|
||||
ENABLE_STATUS:0,
|
||||
Nav_ProductionUnit: item.Nav_ProductionUnit,
|
||||
}
|
||||
|
||||
@ -1,23 +1,18 @@
|
||||
import React, { useState, useMemo, useEffect } from "react";
|
||||
import { connect } from "dva";
|
||||
import { withRouter } from "dva/router";
|
||||
import { Dropdown, Icon, Menu, message, Button, Modal } from "antd";
|
||||
import { HeaderSearch as OPTSearch, PictureThumb } from "@woowalker/feui";
|
||||
import ModifyPassword from "../components/MainPage/ModifyPassword";
|
||||
import FoUserInfoShow from "../components/MainPage/FoUserInfoShow";
|
||||
import FeedbackQuestion from "../components/MainPage/FeedbackQuestion";
|
||||
import GuideCanvas from "../components/MainPage/GuideCanvas";
|
||||
import IconFont from "../utils/iconFont";
|
||||
import {
|
||||
initFilter,
|
||||
requestFullScreenMethod,
|
||||
exitFullScreen,
|
||||
isFullscreenElement,
|
||||
} from "../utils/common";
|
||||
import config from "../config";
|
||||
import "./header.less";
|
||||
import Option from "./Option";
|
||||
import FullScreenPage from "./FullScreen";
|
||||
import React, { useState, useMemo, useEffect } from 'react';
|
||||
import { connect } from 'dva';
|
||||
import { withRouter } from 'dva/router';
|
||||
import { Dropdown, Icon, Menu, message, Button, Modal } from 'antd';
|
||||
import { HeaderSearch as OPTSearch, PictureThumb } from '@woowalker/feui';
|
||||
import ModifyPassword from '../components/MainPage/ModifyPassword';
|
||||
import FoUserInfoShow from '../components/MainPage/FoUserInfoShow';
|
||||
import FeedbackQuestion from '../components/MainPage/FeedbackQuestion';
|
||||
import GuideCanvas from '../components/MainPage/GuideCanvas';
|
||||
import IconFont from '../utils/iconFont';
|
||||
import { initFilter, requestFullScreenMethod, exitFullScreen, isFullscreenElement } from '../utils/common';
|
||||
import config from '../config';
|
||||
import './header.less';
|
||||
import Option from './Option';
|
||||
import FullScreenPage from './FullScreen';
|
||||
|
||||
// 投屏
|
||||
const DataV = (props) => {
|
||||
@ -25,10 +20,8 @@ const DataV = (props) => {
|
||||
const { OrgId, Tenant, baseConfig } = props.login;
|
||||
const preUrl = baseConfig.SCREEN_URL || config.dataVUrl;
|
||||
const queryStr = `OrgId=${OrgId}&Tenant=${Tenant}`;
|
||||
const url = `${
|
||||
preUrl.indexOf("?") !== -1 ? preUrl : preUrl + "?"
|
||||
}${queryStr}`;
|
||||
window.open(url, "_blank");
|
||||
const url = `${preUrl.indexOf('?') !== -1 ? preUrl : preUrl + '?'}${queryStr}`;
|
||||
window.open(url, '_blank');
|
||||
};
|
||||
return (
|
||||
<span title="投屏" onClick={navTo} className="header__right-datav">
|
||||
@ -72,7 +65,7 @@ const Search = (props) => {
|
||||
* @param {*} e
|
||||
*/
|
||||
const handleSearchMenu = (e) => {
|
||||
if (!e || e === "") {
|
||||
if (!e || e === '') {
|
||||
setAutoCompleteData([]);
|
||||
return;
|
||||
}
|
||||
@ -94,11 +87,9 @@ const Search = (props) => {
|
||||
* @param {*} e
|
||||
*/
|
||||
const handleSelectMenu = (e) => {
|
||||
const menu = leafMenus.menuDatas.find(
|
||||
(item) => item.Menu.Nav_MenuForm.ID === e
|
||||
);
|
||||
const menu = leafMenus.menuDatas.find((item) => item.Menu.Nav_MenuForm.ID === e);
|
||||
props.dispatch({
|
||||
type: "app/updateActivatedMenu",
|
||||
type: 'app/updateActivatedMenu',
|
||||
payload: {
|
||||
currActivatedTab: menu.Node.ID,
|
||||
currActivatedMenu: menu.Node,
|
||||
@ -107,16 +98,10 @@ const Search = (props) => {
|
||||
props.history.push({ pathname: `/main/${menu.Node.ID}` });
|
||||
};
|
||||
|
||||
if (window.navigator.userAgent.indexOf("Windows") < 1) {
|
||||
if (window.navigator.userAgent.indexOf('Windows') < 1) {
|
||||
return <span></span>;
|
||||
} else {
|
||||
return (
|
||||
<OPTSearch
|
||||
dataSource={autoCompleteData}
|
||||
onChange={handleSearchMenu}
|
||||
onSelect={handleSelectMenu}
|
||||
/>
|
||||
);
|
||||
return <OPTSearch dataSource={autoCompleteData} onChange={handleSearchMenu} onSelect={handleSelectMenu} />;
|
||||
}
|
||||
//return (
|
||||
//
|
||||
@ -138,23 +123,23 @@ const User = (props) => {
|
||||
*/
|
||||
const handleLogout = () => {
|
||||
const { OrgId, userId } = props.login;
|
||||
const logJson = initFilter(OrgId, userId, "", 0, 1, 0);
|
||||
const logJson = initFilter(OrgId, userId, '', 0, 1, 0);
|
||||
props.dispatch({
|
||||
type: "app/addLoginOut",
|
||||
type: 'app/addLoginOut',
|
||||
payload: logJson,
|
||||
});
|
||||
localStorage.removeItem("accessToken");
|
||||
localStorage.removeItem("currentMineTypeName");
|
||||
props.history.push({ pathname: "/login" });
|
||||
localStorage.removeItem('accessToken');
|
||||
localStorage.removeItem('currentMineTypeName');
|
||||
props.history.push({ pathname: '/login' });
|
||||
};
|
||||
|
||||
/**
|
||||
* 锁屏
|
||||
*/
|
||||
const handleLockScreen = () => {
|
||||
localStorage.removeItem("accessToken");
|
||||
localStorage.removeItem('accessToken');
|
||||
props.dispatch({
|
||||
type: "login/save",
|
||||
type: 'login/save',
|
||||
payload: {
|
||||
screenLocked: true,
|
||||
},
|
||||
@ -167,15 +152,15 @@ const User = (props) => {
|
||||
*/
|
||||
const handleUserMenuClick = (evt) => {
|
||||
switch (evt.key) {
|
||||
case "user-menu-logout":
|
||||
case 'user-menu-logout':
|
||||
handleLogout();
|
||||
break;
|
||||
case "user-menu-lockscreen":
|
||||
case 'user-menu-lockscreen':
|
||||
handleLockScreen();
|
||||
break;
|
||||
case "user-menu-cacheclean":
|
||||
case 'user-menu-cacheclean':
|
||||
window.localStorage.clear();
|
||||
message.success("清除成功,即将重新加载页面", 2, () => {
|
||||
message.success('清除成功,即将重新加载页面', 2, () => {
|
||||
setTimeout(() => window.location.reload(true), 500);
|
||||
});
|
||||
break;
|
||||
@ -192,9 +177,7 @@ const User = (props) => {
|
||||
onVisibleChange={setVisible}
|
||||
overlay={
|
||||
<Menu onClick={handleUserMenuClick}>
|
||||
<Menu.Item key="user-menu-userinfo">
|
||||
当前登录:{loginInfo.User?.NAME}
|
||||
</Menu.Item>
|
||||
<Menu.Item key="user-menu-userinfo">当前登录:{loginInfo.User?.NAME}</Menu.Item>
|
||||
<Menu.Item key="user-menu-UserInfoShow">
|
||||
<FoUserInfoShow>我的资料</FoUserInfoShow>
|
||||
</Menu.Item>
|
||||
@ -219,87 +202,83 @@ const HeaderUser = withRouter(connect(({ login }) => ({ login }))(User));
|
||||
// 2023-10-08 生产单元
|
||||
const MineType = (props) => {
|
||||
const [visible, setVisible] = useState(false);
|
||||
let currUserMineType = localStorage.getItem("MineType");
|
||||
let currUserMineType = localStorage.getItem('MineType');
|
||||
if (currUserMineType == null || currUserMineType == undefined) {
|
||||
localStorage.setItem("MineType", "30");
|
||||
localStorage.setItem("currentMineTypeName", "露天矿");
|
||||
localStorage.setItem('MineType', '30');
|
||||
localStorage.setItem('currentMineTypeName', '露天矿');
|
||||
} else {
|
||||
if (localStorage.getItem("currentMineTypeName") == null) {
|
||||
if (localStorage.getItem('currentMineTypeName') == null) {
|
||||
if (currUserMineType.indexOf(30) > -1) {
|
||||
localStorage.setItem("currentMineType", 30);
|
||||
localStorage.setItem("currentMineTypeName", "露天矿");
|
||||
localStorage.setItem('currentMineType', 30);
|
||||
localStorage.setItem('currentMineTypeName', '露天矿');
|
||||
} else if (currUserMineType.indexOf(20) > -1) {
|
||||
localStorage.setItem("currentMineType", 20);
|
||||
localStorage.setItem("currentMineTypeName", "尾矿库");
|
||||
localStorage.setItem('currentMineType', 20);
|
||||
localStorage.setItem('currentMineTypeName', '尾矿库');
|
||||
} else if (currUserMineType.indexOf(10) > -1) {
|
||||
localStorage.setItem("currentMineType", 10);
|
||||
localStorage.setItem("currentMineTypeName", "选矿厂");
|
||||
localStorage.setItem('currentMineType', 10);
|
||||
localStorage.setItem('currentMineTypeName', '选矿厂');
|
||||
} else if (currUserMineType.indexOf(40) > -1) {
|
||||
localStorage.setItem("currentMineType", 40);
|
||||
localStorage.setItem("currentMineTypeName", "地下矿");
|
||||
}
|
||||
else if (currUserMineType.indexOf(31) > -1) {
|
||||
localStorage.setItem("currentMineType", 31);
|
||||
localStorage.setItem("currentMineTypeName", "职能口");
|
||||
}
|
||||
else if (currUserMineType.indexOf(32) > -1) {
|
||||
localStorage.setItem("currentMineType", 32);
|
||||
localStorage.setItem("currentMineTypeName", "非金属");
|
||||
localStorage.setItem('currentMineType', 40);
|
||||
localStorage.setItem('currentMineTypeName', '地下矿');
|
||||
} else if (currUserMineType.indexOf(31) > -1) {
|
||||
localStorage.setItem('currentMineType', 31);
|
||||
localStorage.setItem('currentMineTypeName', '职能口');
|
||||
} else if (currUserMineType.indexOf(32) > -1) {
|
||||
localStorage.setItem('currentMineType', 32);
|
||||
localStorage.setItem('currentMineTypeName', '非金属');
|
||||
}
|
||||
} else {
|
||||
let currentMineType = localStorage.getItem("currentMineType");
|
||||
let currentMineType = localStorage.getItem('currentMineType');
|
||||
if (currUserMineType.indexOf(currentMineType) > -1) {
|
||||
if (currentMineType == 30) {
|
||||
localStorage.setItem("currentMineTypeName", "露天矿");
|
||||
localStorage.setItem('currentMineTypeName', '露天矿');
|
||||
} else if (currUserMineType == 20) {
|
||||
localStorage.setItem("currentMineTypeName", "尾矿库");
|
||||
localStorage.setItem('currentMineTypeName', '尾矿库');
|
||||
} else if (currUserMineType == 10) {
|
||||
localStorage.setItem("currentMineTypeName", "选矿厂");
|
||||
localStorage.setItem('currentMineTypeName', '选矿厂');
|
||||
} else if (currUserMineType == 40) {
|
||||
localStorage.setItem("currentMineTypeName", "地下矿");
|
||||
}else if (currUserMineType == 31) {
|
||||
localStorage.setItem("currentMineTypeName", "职能口");
|
||||
}else if (currUserMineType == 32) {
|
||||
localStorage.setItem("currentMineTypeName", "非金属");
|
||||
localStorage.setItem('currentMineTypeName', '地下矿');
|
||||
} else if (currUserMineType == 31) {
|
||||
localStorage.setItem('currentMineTypeName', '职能口');
|
||||
} else if (currUserMineType == 32) {
|
||||
localStorage.setItem('currentMineTypeName', '非金属');
|
||||
}
|
||||
} else {
|
||||
if (currUserMineType.indexOf(30) > -1) {
|
||||
localStorage.setItem("currentMineTypeName", "露天矿");
|
||||
localStorage.setItem('currentMineTypeName', '露天矿');
|
||||
} else if (currUserMineType.indexOf(20) > -1) {
|
||||
localStorage.setItem("currentMineTypeName", "尾矿库");
|
||||
localStorage.setItem('currentMineTypeName', '尾矿库');
|
||||
} else if (currUserMineType.indexOf(10) > -1) {
|
||||
localStorage.setItem("currentMineTypeName", "选矿厂");
|
||||
localStorage.setItem('currentMineTypeName', '选矿厂');
|
||||
} else if (currUserMineType.indexOf(40) > -1) {
|
||||
localStorage.setItem("currentMineTypeName", "地下矿");
|
||||
}
|
||||
else if (currUserMineType.indexOf(31) > -1) {
|
||||
localStorage.setItem("currentMineTypeName", "职能口");
|
||||
}
|
||||
else if (currUserMineType.indexOf(32) > -1) {
|
||||
localStorage.setItem("currentMineTypeName", "非金属");
|
||||
localStorage.setItem('currentMineTypeName', '地下矿');
|
||||
} else if (currUserMineType.indexOf(31) > -1) {
|
||||
localStorage.setItem('currentMineTypeName', '职能口');
|
||||
} else if (currUserMineType.indexOf(32) > -1) {
|
||||
localStorage.setItem('currentMineTypeName', '非金属');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let currUserMineTypeArray = [];
|
||||
if (currUserMineType.indexOf("30") > -1) {
|
||||
currUserMineTypeArray.push({ key: "30", label: "露天矿" });
|
||||
if (currUserMineType.indexOf('30') > -1) {
|
||||
currUserMineTypeArray.push({ key: '30', label: '露天矿' });
|
||||
}
|
||||
if (currUserMineType.indexOf("10") > -1) {
|
||||
currUserMineTypeArray.push({ key: "10", label: "选矿厂" });
|
||||
if (currUserMineType.indexOf('10') > -1) {
|
||||
currUserMineTypeArray.push({ key: '10', label: '选矿厂' });
|
||||
}
|
||||
if (currUserMineType.indexOf("20") > -1) {
|
||||
currUserMineTypeArray.push({ key: "20", label: "尾矿库" });
|
||||
if (currUserMineType.indexOf('20') > -1) {
|
||||
currUserMineTypeArray.push({ key: '20', label: '尾矿库' });
|
||||
}
|
||||
if (currUserMineType.indexOf("40") > -1) {
|
||||
currUserMineTypeArray.push({ key: "40", label: "地下矿" });
|
||||
if (currUserMineType.indexOf('40') > -1) {
|
||||
currUserMineTypeArray.push({ key: '40', label: '地下矿' });
|
||||
}
|
||||
if (currUserMineType.indexOf("31") > -1) {
|
||||
currUserMineTypeArray.push({ key: "31", label: "职能口" });
|
||||
if (currUserMineType.indexOf('31') > -1) {
|
||||
currUserMineTypeArray.push({ key: '31', label: '职能口' });
|
||||
}
|
||||
if (currUserMineType.indexOf("32") > -1) {
|
||||
currUserMineTypeArray.push({ key: "32", label: "非金属" });
|
||||
if (currUserMineType.indexOf('32') > -1) {
|
||||
currUserMineTypeArray.push({ key: '32', label: '非金属' });
|
||||
}
|
||||
const MineTypeMenu = () => {
|
||||
return (
|
||||
@ -315,30 +294,24 @@ const MineType = (props) => {
|
||||
* @param {*} evt
|
||||
*/
|
||||
const handleMineTypeClick = (evt) => {
|
||||
localStorage.setItem("currentMineType", evt.key);
|
||||
localStorage.setItem("currentMineTypeName", evt.item.props.children);
|
||||
localStorage.setItem('currentMineType', evt.key);
|
||||
localStorage.setItem('currentMineTypeName', evt.item.props.children);
|
||||
setVisible(false);
|
||||
window.location.reload();
|
||||
};
|
||||
if (window.navigator.userAgent.indexOf("Windows") < 1) {
|
||||
if (window.navigator.userAgent.indexOf('Windows') < 1) {
|
||||
return <div></div>;
|
||||
} else {
|
||||
return (
|
||||
<Dropdown
|
||||
visible={visible}
|
||||
onVisibleChange={setVisible}
|
||||
overlay={MineTypeMenu}
|
||||
>
|
||||
<a style={{ color: "#000000A6", marginLeft: "20px" }}>
|
||||
<b>生产单元:{localStorage.getItem("currentMineTypeName")}</b>
|
||||
<Dropdown visible={visible} onVisibleChange={setVisible} overlay={MineTypeMenu}>
|
||||
<a style={{ color: '#000000A6', marginLeft: '20px' }}>
|
||||
<b>生产单元:{localStorage.getItem('currentMineTypeName')}</b>
|
||||
</a>
|
||||
</Dropdown>
|
||||
);
|
||||
}
|
||||
};
|
||||
const HeaderMineType = withRouter(
|
||||
connect(({ login }) => ({ login }))(MineType)
|
||||
);
|
||||
const HeaderMineType = withRouter(connect(({ login }) => ({ login }))(MineType));
|
||||
const GuideCodePage = (props) => {
|
||||
const [showCanvas, setshowCanvas] = useState(false);
|
||||
const currVans = (val) => {
|
||||
@ -349,7 +322,7 @@ const GuideCodePage = (props) => {
|
||||
* @param {*} evt
|
||||
*/
|
||||
|
||||
if (window.navigator.userAgent.indexOf("Windows") < 1) {
|
||||
if (window.navigator.userAgent.indexOf('Windows') < 1) {
|
||||
return <div></div>;
|
||||
} else {
|
||||
return (
|
||||
@ -358,14 +331,14 @@ const GuideCodePage = (props) => {
|
||||
onClick={() => {
|
||||
currVans();
|
||||
}}
|
||||
style={{ margin: "0px 36px", display: "flex", alignItems: "center" }}
|
||||
style={{ margin: '0px 36px', display: 'flex', alignItems: 'center' }}
|
||||
>
|
||||
<Icon type="qrcode" className="header__right-icon" />
|
||||
</div>
|
||||
<Modal
|
||||
title=""
|
||||
visible={showCanvas}
|
||||
width="750px"
|
||||
width="450px"
|
||||
centered={true}
|
||||
onOk={() => {
|
||||
setshowCanvas(false);
|
||||
@ -381,15 +354,13 @@ const GuideCodePage = (props) => {
|
||||
);
|
||||
}
|
||||
};
|
||||
const GuideCode = withRouter(
|
||||
connect(({ login }) => ({ login }))(GuideCodePage)
|
||||
);
|
||||
const GuideCode = withRouter(connect(({ login }) => ({ login }))(GuideCodePage));
|
||||
const NavOpton = (props) => {
|
||||
const [showModal, setshowModal] = useState(false);
|
||||
const getChildCount = (val) => {
|
||||
setshowModal(val);
|
||||
};
|
||||
if (window.navigator.userAgent.indexOf("Windows") < 1) {
|
||||
if (window.navigator.userAgent.indexOf('Windows') < 1) {
|
||||
return <div></div>;
|
||||
} else {
|
||||
return (
|
||||
@ -401,10 +372,7 @@ const NavOpton = (props) => {
|
||||
}}
|
||||
>
|
||||
{/* <Icon type='bars' className='header__right-icon'></Icon> */}
|
||||
<IconFont
|
||||
type="icon-line-108"
|
||||
style={{ fontSize: "22px", color: "#333333", cursor: "pointer" }}
|
||||
></IconFont>
|
||||
<IconFont type="icon-line-108" style={{ fontSize: '22px', color: '#333333', cursor: 'pointer' }}></IconFont>
|
||||
</div>
|
||||
<Modal
|
||||
title="功能导航"
|
||||
@ -442,36 +410,27 @@ const FullScreenOpton = (props) => {
|
||||
);
|
||||
if (isFull) {
|
||||
// /
|
||||
}else{
|
||||
} else {
|
||||
// requestFullScreenMethod(document.body);
|
||||
setshowModal(false);
|
||||
}
|
||||
};
|
||||
useEffect(() => {
|
||||
// 监听退出全屏事件 --- chrome 用 esc 退出全屏并不会触发 keyup 事件
|
||||
document.addEventListener(
|
||||
"webkitfullscreenchange",
|
||||
escFunction
|
||||
); /* Chrome, Safari and Opera */
|
||||
document.addEventListener("mozfullscreenchange", escFunction); /* Firefox */
|
||||
document.addEventListener(
|
||||
"fullscreenchange",
|
||||
escFunction
|
||||
); /* Standard syntax */
|
||||
document.addEventListener(
|
||||
"msfullscreenchange",
|
||||
escFunction
|
||||
); /* IE / Edge */
|
||||
document.addEventListener('webkitfullscreenchange', escFunction); /* Chrome, Safari and Opera */
|
||||
document.addEventListener('mozfullscreenchange', escFunction); /* Firefox */
|
||||
document.addEventListener('fullscreenchange', escFunction); /* Standard syntax */
|
||||
document.addEventListener('msfullscreenchange', escFunction); /* IE / Edge */
|
||||
return () => {
|
||||
//销毁时清除监听
|
||||
document.removeEventListener("webkitfullscreenchange", escFunction);
|
||||
document.removeEventListener("mozfullscreenchange", escFunction);
|
||||
document.removeEventListener("fullscreenchange", escFunction);
|
||||
document.removeEventListener("MSFullscreenChange", escFunction);
|
||||
document.removeEventListener('webkitfullscreenchange', escFunction);
|
||||
document.removeEventListener('mozfullscreenchange', escFunction);
|
||||
document.removeEventListener('fullscreenchange', escFunction);
|
||||
document.removeEventListener('MSFullscreenChange', escFunction);
|
||||
};
|
||||
}, []);
|
||||
|
||||
if (window.navigator.userAgent.indexOf("Windows") < 1) {
|
||||
if (window.navigator.userAgent.indexOf('Windows') < 1) {
|
||||
return <div></div>;
|
||||
} else {
|
||||
return (
|
||||
@ -483,7 +442,7 @@ const FullScreenOpton = (props) => {
|
||||
requestFullScreenMethod(document.body); // 进入全屏
|
||||
}}
|
||||
>
|
||||
<Icon type='alert' className='header__right-icon'></Icon>
|
||||
<Icon type="alert" className="header__right-icon"></Icon>
|
||||
{/* <IconFont
|
||||
type="icon-line-108"
|
||||
style={{ fontSize: "22px", color: "#333333", cursor: "pointer" }}
|
||||
@ -509,45 +468,35 @@ const FullScreenOpton = (props) => {
|
||||
}
|
||||
};
|
||||
|
||||
const FullScreen = withRouter(
|
||||
connect(({ login }) => ({ login }))(FullScreenOpton)
|
||||
);
|
||||
const FullScreen = withRouter(connect(({ login }) => ({ login }))(FullScreenOpton));
|
||||
|
||||
const HeaderNav = withRouter(connect(({ login }) => ({ login }))(NavOpton));
|
||||
|
||||
function Header(props) {
|
||||
const { baseConfig = {} } = props.login;
|
||||
const thumbCode = baseConfig.Nav_PictureLogo
|
||||
? baseConfig.Nav_PictureLogo.CODE
|
||||
: "";
|
||||
const thumbCode = baseConfig.Nav_PictureLogo ? baseConfig.Nav_PictureLogo.CODE : '';
|
||||
let isMobile = false;
|
||||
|
||||
if (window.navigator.userAgent.indexOf("Windows") < 1) {
|
||||
if (window.navigator.userAgent.indexOf('Windows') < 1) {
|
||||
isMobile = true;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={`header ${props.matchLogin ? "login" : ""}`}>
|
||||
<div className={`header ${props.matchLogin ? 'login' : ''}`}>
|
||||
<div className="header__left">
|
||||
<PictureThumb
|
||||
thumbCodes={thumbCode ? [thumbCode] : []}
|
||||
thumbConfigs={[{ target: thumbCode }]}
|
||||
defaultThumb={require("../assets/layout/headerno-logo-new.png")}
|
||||
defaultThumb={require('../assets/layout/headerno-logo-new.png')}
|
||||
className="header__left-logo"
|
||||
/>
|
||||
{isMobile ? (
|
||||
<span className="header__left-slogan-mobile"> </span>
|
||||
) : (
|
||||
<span
|
||||
className={`${
|
||||
props.matchLogin
|
||||
? "header__left-sloganLogin"
|
||||
: "header__left-slogan"
|
||||
}`}
|
||||
>
|
||||
<span className={`${props.matchLogin ? 'header__left-sloganLogin' : 'header__left-slogan'}`}>
|
||||
矿山安全生产信息化平台
|
||||
<span style={{ color: "#c99d03" }}></span>
|
||||
{baseConfig.SYS_NAME}{" "}
|
||||
<span style={{ color: '#c99d03' }}></span>
|
||||
{baseConfig.SYS_NAME}{' '}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@ -646,8 +646,8 @@ export function permissionUtils(login) {
|
||||
hasPermission = true
|
||||
} else {
|
||||
if (n1.PermFormId === formId) {
|
||||
const matchForm = (n1.MenuId === currActivatedMenu.ID || !currActivatedMenu.ID)
|
||||
if (type == 0 && matchForm) { //表单权限
|
||||
//const matchForm = (n1.MenuId === currActivatedMenu.ID || !currActivatedMenu.ID)
|
||||
if (type == 0 && true) { //
|
||||
hasPermission = true;
|
||||
} else if (type == 1) { //按钮权限
|
||||
if (n1.Nav_Btns && n1.Nav_Btns.length) {
|
||||
|
||||
@ -97,6 +97,11 @@ const FO015ShowPrint = createLoadableComponent(() => import('../components/Custo
|
||||
const FO008ShowPrint = createLoadableComponent(() => import('../components/CustomPages/FO/FO008ShowPrint'))
|
||||
const FO021EditPage = createLoadableComponent(() => import('../components/CustomPages/FO/FO021EditPage'))
|
||||
const FO019ShowPrint = createLoadableComponent(() => import('../components/CustomPages/FO/FO019ShowPrint'))
|
||||
const FO035ShowPrint = createLoadableComponent(() => import('../components/CustomPages/FO/FO035ShowPrint'))
|
||||
const FO037ShowPrint = createLoadableComponent(() => import('../components/CustomPages/FO/FO037ShowPrint'))
|
||||
const FO041ShowPrint = createLoadableComponent(() => import('../components/CustomPages/FO/FO041ShowPrint'))
|
||||
const FO043ShowPrint = createLoadableComponent(() => import('../components/CustomPages/FO/FO043ShowPrint'))
|
||||
const FO045ShowPrint = createLoadableComponent(() => import('../components/CustomPages/FO/FO045ShowPrint'))
|
||||
|
||||
const PreMeetingTask = createLoadableComponent(() => import('../components/CustomPages/Mobile/PreMeetingTask'))
|
||||
const PreOperSchTask = createLoadableComponent(() => import('../components/CustomPages/Mobile/PreOperSchTask'))
|
||||
@ -301,6 +306,11 @@ export default function (componentName, formId, formParam, data, formCode, formD
|
||||
FO022ShowPrint: <FO022ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
FO021EditPage: <FO021EditPage formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
FO015ShowPrint: <FO015ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
FO035ShowPrint: <FO035ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
FO037ShowPrint: <FO037ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
FO041ShowPrint: <FO041ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
FO043ShowPrint: <FO043ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
FO045ShowPrint: <FO045ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
|
||||
HM104ShowPrint: <HM104ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
HM087ShowPrint: <HM087ShowPrint formId={formId} formParam={formParam} data={data} formCode={formCode} />,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user