Merge branch 'main' of http://47.122.43.22:3000/wjn/mh-sms-web
This commit is contained in:
commit
a420fdfd58
@ -19,6 +19,7 @@ class HM042ShowPrint extends React.Component {
|
||||
isAudit: 'none',
|
||||
tmpData: {},
|
||||
DEALOPINION: '',
|
||||
teamUsers: []
|
||||
};
|
||||
};
|
||||
//审批意见 改变
|
||||
@ -83,7 +84,14 @@ class HM042ShowPrint extends React.Component {
|
||||
if (typeof this.props.data.onCancel != "undefined" && typeof this.props.data.onCancel == 'function')
|
||||
this.props.data.onCancel();
|
||||
}
|
||||
|
||||
removeDuplicateUser(arr) {
|
||||
let obj = {};
|
||||
arr = arr.reduce((newArr, next) => {
|
||||
obj[next.USER_ID] ? "" : (obj[next.USER_ID] = true && newArr.push(next));
|
||||
return newArr;
|
||||
}, []);
|
||||
return arr;
|
||||
}
|
||||
loadData = (dataId) => {
|
||||
let json = initFilter(this.props.login.OrgId);
|
||||
extendRule(json, 'ID', 1, dataId);
|
||||
@ -104,6 +112,7 @@ class HM042ShowPrint extends React.Component {
|
||||
if (this.props.data && this.props.data.loadDataDeal) {
|
||||
this.props.data.loadDataDeal(1);
|
||||
}
|
||||
this.teamUsers = this.removeDuplicateUser(ret.Nav_Details);
|
||||
this.onClickApprove(false);
|
||||
if (ret.STATUS >= 4) {
|
||||
this.state.isFinished = "inline";
|
||||
@ -226,8 +235,8 @@ class HM042ShowPrint extends React.Component {
|
||||
<Descriptions.Item label="风险管理小组副组长" span={1.5}>{data.Nav_DeputyGroupLeader ? data.Nav_DeputyGroupLeader.NAME : ''}</Descriptions.Item>
|
||||
<Descriptions.Item label="风险管理小组组长" span={1.5}>{data.Nav_GroupLeader ? data.Nav_GroupLeader.NAME : ''}</Descriptions.Item>
|
||||
<Descriptions.Item label="风险管理小组成员" span={3}>{
|
||||
data.Nav_Details && data.Nav_Details.map((item, i) => {
|
||||
if (i == (data.Nav_Details.length - 1)) {
|
||||
this.teamUsers && this.teamUsers.map((item, i) => {
|
||||
if (i == (this.teamUsers.length - 1)) {
|
||||
if (item.DEAL_STATUS == 0)
|
||||
return <label style={{ color: 'red' }} title='未签到'> {item.Nav_ChargeUser ? item.Nav_ChargeUser.NAME : ''}</label>
|
||||
else
|
||||
@ -257,30 +266,32 @@ class HM042ShowPrint extends React.Component {
|
||||
</Descriptions.Item>
|
||||
</Descriptions>
|
||||
<table style={{ width: '100%', textAlign: 'center' }} className={styles.PrintForm1}>
|
||||
<tr>
|
||||
<td className={styles.fontBold}>开始时间</td>
|
||||
<td className={styles.fontBold}>结束时间</td>
|
||||
<td className={styles.fontBold}>层级</td>
|
||||
<td className={styles.fontBold}>辨识区域</td>
|
||||
<td className={styles.fontBold}>类别</td>
|
||||
<td className={styles.fontBold}>辨识对象</td>
|
||||
<td className={styles.fontBold}>负责人</td>
|
||||
<td className={styles.fontBold}>备注</td>
|
||||
</tr>
|
||||
{
|
||||
data.Nav_Details && data.Nav_Details.map((item, i) => {
|
||||
return <tr>
|
||||
<td>{moment(item.START_TIME).format('YYYY-MM-DD')}</td>
|
||||
<td>{moment(item.END_TIME).format('YYYY-MM-DD')}</td>
|
||||
<td>{this.renderLevel(item.LEVEL)}</td>
|
||||
<td>{this.joinArea(item.Nav_Areas)}</td>
|
||||
<td>{this.joinIdentifying(item.Nav_Identifyings)}</td>
|
||||
<td>{this.props.app.enums.HMRiskTypeEnmu.enums[item.RISK_TYPE]}</td>
|
||||
<td>{item.Nav_ChargeUser?.NAME}</td>
|
||||
<td>{item.REMARK}</td>
|
||||
</tr>
|
||||
})
|
||||
}
|
||||
<tbody>
|
||||
<tr>
|
||||
<td className={styles.fontBold}>开始时间</td>
|
||||
<td className={styles.fontBold}>结束时间</td>
|
||||
<td className={styles.fontBold}>层级</td>
|
||||
<td className={styles.fontBold}>辨识区域</td>
|
||||
<td className={styles.fontBold}>类别</td>
|
||||
<td className={styles.fontBold}>辨识对象</td>
|
||||
<td className={styles.fontBold}>负责人</td>
|
||||
<td className={styles.fontBold}>备注</td>
|
||||
</tr>
|
||||
{
|
||||
data.Nav_Details && data.Nav_Details.map((item, i) => {
|
||||
return <tr>
|
||||
<td>{moment(item.START_TIME).format('YYYY-MM-DD')}</td>
|
||||
<td>{moment(item.END_TIME).format('YYYY-MM-DD')}</td>
|
||||
<td>{this.renderLevel(item.LEVEL)}</td>
|
||||
<td>{this.joinArea(item.Nav_Areas)}</td>
|
||||
<td>{this.joinIdentifying(item.Nav_Identifyings)}</td>
|
||||
<td>{this.props.app.enums.HMRiskTypeEnmu.enums[item.RISK_TYPE]}</td>
|
||||
<td>{item.Nav_ChargeUser?.NAME}</td>
|
||||
<td>{item.REMARK}</td>
|
||||
</tr>
|
||||
})
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
<FormPage {...this.state.tmpData} />
|
||||
<table style={{ width: '90%', lineHeight: '35px' }}>
|
||||
|
||||
@ -476,22 +476,23 @@ class PFCommonApproveView extends React.Component {
|
||||
if (item.NODE_APPROVE_STATUS != 0) {
|
||||
if (item.Nav_ApproveUser != null && item.Nav_ApproveUser.Nav_UserSignFiles[0] != null)
|
||||
{
|
||||
return <table style={{border:"0",width:'100%', textAlign: 'left'}}><tr><td style={{border:"0"}}><b>{(item.NAME? item.NAME: "")}</b><br/>
|
||||
return <table style={{border:"0",width:'100%', textAlign: 'left'}}><tbody><tr><td style={{border:"0"}}><b>{(item.NAME? item.NAME: "")}</b><br/>
|
||||
{("审批结论:"+(item.CONTEXT===undefined?"同意":item.CONTEXT ))}<br/>
|
||||
{("审核时间:"+item.NODE_APPROVE_TIME)}</td>
|
||||
<td style={{border:"0"}}><br/><img style={{ margin: "0 0 0 15px",width:'150px' }} alt={item.Nav_ApproveUser.NAME} src={config.picServerHost + item.Nav_ApproveUser.Nav_UserSignFiles[0].Nav_ImgFile.Nav_File.FILE_PATH} />
|
||||
</td></tr>
|
||||
<tr><td colSpan={2} style={{border:"0"}}><hr style={{border:'1px dashed #ccc'}}></hr></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
else
|
||||
{
|
||||
return <table style={{border:"0",width:'100%', textAlign: 'left'}}><tr><td style={{border:"0"}}><b>{(item.NAME? item.NAME: "")}</b><br/>
|
||||
return <table style={{border:"0",width:'100%', textAlign: 'left'}}><tbody><tr><td style={{border:"0"}}><b>{(item.NAME? item.NAME: "")}</b><br/>
|
||||
{("审批结论:"+(item.CONTEXT===undefined?"同意":item.CONTEXT ))}<br/>
|
||||
{("审核时间:"+item.NODE_APPROVE_TIME)}</td>
|
||||
<td style={{border:"0"}}><br/><img style={{ margin: "0 0 0 15px",width:'150px' }} title={item.Nav_ApproveUser.NAME} />
|
||||
</td></tr>
|
||||
<tr><td colSpan={2} style={{border:"0"}}><hr style={{border:'1px dashed #ccc'}}></hr></td></tr>
|
||||
<tr><td colSpan={2} style={{border:"0"}}><hr style={{border:'1px dashed #ccc'}}></hr></td></tr></tbody>
|
||||
</table>
|
||||
}
|
||||
}
|
||||
|
||||
@ -392,8 +392,7 @@ function Header(props) {
|
||||
>
|
||||
安全管理系统
|
||||
<span style={{ color: "#c99d03" }}>(SMS)</span>
|
||||
{/* {baseConfig.SYS_NAME}{" "} */}
|
||||
-宁化行洛坑
|
||||
{baseConfig.SYS_NAME}{" "}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@ -31,6 +31,7 @@ import {
|
||||
Table,
|
||||
Button,
|
||||
DatePicker,
|
||||
notification,
|
||||
Select,
|
||||
} from "antd";
|
||||
import styles from "./dashboard.css";
|
||||
@ -48,6 +49,17 @@ const formItemLayout = {
|
||||
labelCol: { span: 6 },
|
||||
wrapperCol: { span: 14 },
|
||||
};
|
||||
|
||||
const openNotification = (placement) => {
|
||||
notification.info({
|
||||
duration: null,
|
||||
top: 43,
|
||||
message: `签名照上传提示:`,
|
||||
description: "您还没上传自己的签名照片,请在我的资料中尽快上传您的签名照!",
|
||||
placement,
|
||||
});
|
||||
};
|
||||
|
||||
const AllTech = (props) => {
|
||||
return (
|
||||
<Col
|
||||
@ -232,6 +244,7 @@ class Home extends React.Component {
|
||||
},
|
||||
],
|
||||
};
|
||||
this.resizeRef = React.createRef();
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
@ -249,16 +262,7 @@ class Home extends React.Component {
|
||||
lmdisplay: 24,
|
||||
},
|
||||
() => {
|
||||
this.getBaseData(1, "1", 5);
|
||||
this.getBaseData(1, "1");
|
||||
this.timeJudg();
|
||||
this.riskLevel();
|
||||
// this.homeRound();
|
||||
this.completeRate();
|
||||
this.timelyRate();
|
||||
this.safeCheck();
|
||||
this.dangerChange();
|
||||
this.getUser();
|
||||
this.willDo()
|
||||
}
|
||||
);
|
||||
} else {
|
||||
@ -268,20 +272,66 @@ class Home extends React.Component {
|
||||
lmdisplay: 17,
|
||||
},
|
||||
() => {
|
||||
this.getBaseData(1, "1", 5);
|
||||
this.getBaseData(1, "1");
|
||||
this.timeJudg();
|
||||
this.riskLevel();
|
||||
// this.homeRound();
|
||||
this.completeRate();
|
||||
this.timelyRate();
|
||||
this.safeCheck();
|
||||
this.dangerChange();
|
||||
this.getUser();
|
||||
this.willDo()
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
willDo = ()=>{
|
||||
this.getBaseData(1, "1", 5);
|
||||
this.getBaseData(1, "1");
|
||||
this.timeJudg();
|
||||
this.riskLevel();
|
||||
// this.homeRound();
|
||||
this.completeRate();
|
||||
this.timelyRate();
|
||||
this.safeCheck();
|
||||
this.dangerChange();
|
||||
this.getUser();
|
||||
this.showModalSign();
|
||||
//定时器功能,暂时不开启
|
||||
this.timerID = setInterval(
|
||||
() =>{this.getBaseData(1, this.state.tableKey, 5),this.getBaseData(1, this.state.overDataKey)} ,
|
||||
120000
|
||||
);
|
||||
|
||||
}
|
||||
componentWillUnmount() {
|
||||
this.timerID && clearTimeout(this.timerID);
|
||||
}
|
||||
useEffect = () => {
|
||||
// 监听的函数
|
||||
const resize = new ResizeObserver((e) => {
|
||||
if (!Array.isArray(e) || !e.length) return;
|
||||
for (const ent of e) {
|
||||
resizeChange(ent);
|
||||
}
|
||||
});
|
||||
// 传入监听对象
|
||||
resize.observe(resizeRef.current);
|
||||
// 及时销毁监听函数(重要!!!)
|
||||
return () => {
|
||||
resize.unobserve(resizeRef?.current);
|
||||
};
|
||||
};
|
||||
showModalSign = () => {
|
||||
var userId = storage("lacal").getItem("userid")?.val; //登录后有存储登录信息
|
||||
var orgId = storage("lacal").getItem("webOrgId")?.val; //登录后有存储登录信息
|
||||
|
||||
let json = initFilter(orgId);
|
||||
this.props.dispatch({
|
||||
type: "app/getDataByPost",
|
||||
payload: json,
|
||||
url: "FM/User/UserSign", //验证是否有签名照
|
||||
onComplete: (ret) => {
|
||||
//返回查询结果ret
|
||||
if (ret) {
|
||||
//判断是否有记录
|
||||
openNotification("topRight");
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
showTodayModal = (
|
||||
dataId,
|
||||
formCode,
|
||||
@ -666,7 +716,7 @@ class Home extends React.Component {
|
||||
if (limit == 5) {
|
||||
this.setState({
|
||||
workData: ret.Data.newData,
|
||||
// workTotal: ret.Data,
|
||||
workTotal: ret.Data,
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
@ -1519,7 +1569,7 @@ class Home extends React.Component {
|
||||
>
|
||||
<div>
|
||||
<Form>
|
||||
<Row style={{ marginTop: "50px" }}>
|
||||
<Row style={{margin:'50px 50px 0px 50px'}}>
|
||||
<Col span={5}>
|
||||
<Form.Item label={"名称"} {...formItemLayout}>
|
||||
<Input
|
||||
@ -1583,7 +1633,7 @@ class Home extends React.Component {
|
||||
>
|
||||
<div>
|
||||
<Form>
|
||||
<Row style={{ marginTop: "50px" }}>
|
||||
<Row style={{margin:'50px 50px 0px 50px'}}>
|
||||
<Col span={5}>
|
||||
<Form.Item label={"提醒内容"} {...formItemLayout}>
|
||||
<Input
|
||||
|
||||
Loading…
Reference in New Issue
Block a user