提交 fd7db942 authored 作者: 钟是志's avatar 钟是志

流程图地址 增加token

上级 ac50ca98
......@@ -4,57 +4,47 @@ import classNames from 'classnames/bind';
import PortalFlowExamineModalImage from './Image';
import { connect } from 'dva';
import { queryApiActionPath } from '@/webPublic/one_stop_public/utils/queryConfig';
import { getToken } from '@/webPublic/one_stop_public/utils/token';
const names = classNames.bind(require('./style.less'));
const Body = ({
className,
...props
}) => <div className={names('body', className)} {...props} />;
const Body = ({ className, ...props }) => <div className={names('body', className)} {...props} />;
@connect()
export default class PortalFlowExamineModalContent extends React.Component {
constructor() {
super();
this.state = {
data: {}, // 事务所有数据
arr: [], // 事务流程
};
}
constructor() {
super();
this.state = {
data: {}, // 事务所有数据
arr: [], // 事务流程
};
}
render() {
let {
id,
affairId,
code,
} = this.props;
return (
<Row className={names('warp')}>
<Col span={24}>
<Body>
{id % 2 === 1 ? (
<PortalFlowExamineModalImage
appid={id}
code={code}
src={
!!affairId
? `${queryApiActionPath()}/UnifiedAppFormApi/getProcessImg?appId=${id}&id=${affairId}`
: `${queryApiActionPath()}/UnifiedAppFormApi/getProcessImg?appId=${id}`
}
render() {
let { id, affairId, code } = this.props;
let url = `${queryApiActionPath()}/UnifiedAppFormApi/getProcessImg?appId=${id}&token=${getToken()}`;
if(affairId){
url = url + `&id=${affairId}`;
}
return (
<Row className={names('warp')}>
<Col span={24}>
<Body>
{id % 2 === 1 ? (
<PortalFlowExamineModalImage
appid={id}
code={code}
src={url}
/>
) : (
<PortalFlowExamineModalImage
appid={id}
code={code}
src={url}
/>
) : (
<PortalFlowExamineModalImage
appid={id}
code={code}
src={
!!affairId
? `${queryApiActionPath()}/UnifiedAppFormApi/getProcessImg?appId=${id}&id=${affairId}`
: `${queryApiActionPath()}/UnifiedAppFormApi/getProcessImg?appId=${id}`
}
/>
)}
</Body>
</Col>
</Row>
);
}
)}
</Body>
</Col>
</Row>
);
}
}
......@@ -6,33 +6,32 @@ import PortalFlowExamineModalContent from './Content';
const names = classNames.bind(require('./style.less'));
export default class PortalFlowExamineModal extends React.Component {
state = { visible: false };
state = { visible: false };
showModal = () => {
this.setState({ visible: true });
};
showModal = () => {
this.setState({ visible: true });
};
handleCancel = () => {
this.setState({ visible: false });
};
handleCancel = () => {
this.setState({ visible: false });
};
render() {
const { visible } = this.state;
const { isShow, id, affairId } = this.props;
const code = this.props?.code ? this.props?.code : '';
// console.log(this.props)
return (
<Modal
title="事务流程"
visible={visible}
onCancel={this.handleCancel}
footer={null}
width={1300}
wrapClassName={names('modal-warp')}
destroyOnClose
>
<PortalFlowExamineModalContent affairId={affairId} id={id} code={code} isShow={isShow} />
</Modal>
);
}
render() {
const { visible } = this.state;
const { isShow, id, affairId } = this.props;
const code = this.props?.code ? this.props?.code : '';
// console.log(this.props)
return (
<Modal
title="事务流程"
visible={visible}
onCancel={this.handleCancel}
footer={null}
width={1300}
wrapClassName={names('modal-warp')}
destroyOnClose>
<PortalFlowExamineModalContent affairId={affairId} id={id} code={code} isShow={isShow} />
</Modal>
);
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论