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

29126 增加违纪历史记录已经

上级 e99b9dd0
...@@ -8,6 +8,7 @@ import config from '@/config/config'; ...@@ -8,6 +8,7 @@ import config from '@/config/config';
import { message, Modal, notification, Popconfirm } from 'antd'; import { message, Modal, notification, Popconfirm } from 'antd';
import DetailOneStop from '@/webPublic/one_stop_public/DetailForAudit/IframeForDetail'; import DetailOneStop from '@/webPublic/one_stop_public/DetailForAudit/IframeForDetail';
import { getIsBei_Dian, getIsGui_Jian } from '@/webPublic/zyd_public/utils/utils'; import { getIsBei_Dian, getIsGui_Jian } from '@/webPublic/zyd_public/utils/utils';
import { getUrlInfo } from '@/webPublic/one_stop_public/DetailForAudit/utils';
window.iframeParentComponent = { window.iframeParentComponent = {
Modal, Modal,
...@@ -16,22 +17,6 @@ window.iframeParentComponent = { ...@@ -16,22 +17,6 @@ window.iframeParentComponent = {
Popconfirm, Popconfirm,
}; };
const getUrlInfo = (param) => {
let url = window.document.location.href.toString();
let u = url.split('?');
if (typeof u[1] == 'string') {
u = u[1].split('&');
let get = {};
for (let i in u) {
let j = u[i].split('=');
get[j[0]] = decodeURIComponent(j[1]);
}
return get;
} else {
return {};
}
};
export default class Detail extends Component { export default class Detail extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
...@@ -47,12 +32,15 @@ export default class Detail extends Component { ...@@ -47,12 +32,15 @@ export default class Detail extends Component {
} }
} }
if (!id) { if (!id) {
id = getUrlInfo()?.id; id = getUrlInfo().id;
}
if (!code) {
code = getUrlInfo().code;
} }
this.state = { this.state = {
id, id,
code, code,
showAll: props.from !== 'onestopApp2.0' showAll: props.from !== 'onestopApp2.0' && getUrlInfo().showAll !== 'false',
}; };
} }
...@@ -80,11 +68,7 @@ export default class Detail extends Component { ...@@ -80,11 +68,7 @@ export default class Detail extends Component {
render() { render() {
const { from } = this.props; const { from } = this.props;
const { const { id, showAll, code } = this.state;
id,
showAll,
code,
} = this.state;
const url = config.onestopPC.split('/#/'); const url = config.onestopPC.split('/#/');
let showPrint = this.props.location?.state?.showPrint; let showPrint = this.props.location?.state?.showPrint;
if (getIsGui_Jian() && !showPrint) { if (getIsGui_Jian() && !showPrint) {
...@@ -97,7 +81,9 @@ export default class Detail extends Component { ...@@ -97,7 +81,9 @@ export default class Detail extends Component {
iframeUrl = iframeUrl + '&showPrint=true'; iframeUrl = iframeUrl + '&showPrint=true';
} }
if (from === 'onestopApp2.0') { if (from === 'onestopApp2.0') {
iframeUrl = config.gateWayPort + `/portal/#/showAuditIframe?id=${id}&code=${code}&hasSingle=false&token=${getToken()}&isPrint=false`; iframeUrl =
config.gateWayPort +
`/portal/#/showAuditIframe?id=${id}&code=${code}&hasSingle=false&token=${getToken()}&isPrint=false`;
} }
// iframeUrl = `http://localhost:8000/onestop/IframeForDetail?id=${id}&token=${getToken()}`; // iframeUrl = `http://localhost:8000/onestop/IframeForDetail?id=${id}&token=${getToken()}`;
// console.log(showPrint); // console.log(showPrint);
...@@ -123,14 +109,13 @@ export default class Detail extends Component { ...@@ -123,14 +109,13 @@ export default class Detail extends Component {
name={'全屏查看'} name={'全屏查看'}
className="defaultBlue" className="defaultBlue"
handleClick={() => { handleClick={() => {
document.getElementById('detailIframeId') document.getElementById('detailIframeId').requestFullscreen();
.requestFullscreen(); }}
}}/> />
</div> </div>
</Shell> </Shell>
<Shell> <Shell>
{ {from === 'onestopApp2.0' ? (
from === 'onestopApp2.0' ?
<iframe <iframe
src={iframeUrl} src={iframeUrl}
frameBorder={0} frameBorder={0}
...@@ -147,15 +132,12 @@ export default class Detail extends Component { ...@@ -147,15 +132,12 @@ export default class Detail extends Component {
overflowY: 'hidden', overflowY: 'hidden',
minHeight: '80vh', minHeight: '80vh',
}} }}
/> : />
) : (
<div id={'detailIframeId'}> <div id={'detailIframeId'}>
<DetailOneStop id={id} <DetailOneStop id={id} {...this.props} code={code} showPrint={showPrint || false} />
{...this.props}
code={code}
showPrint={showPrint || false}/>
</div> </div>
} )}
</Shell> </Shell>
<Shell> <Shell>
<div <div
...@@ -178,9 +160,9 @@ export default class Detail extends Component { ...@@ -178,9 +160,9 @@ export default class Detail extends Component {
type={'primary'} type={'primary'}
// className='primaryBlue' // className='primaryBlue'
handleClick={() => { handleClick={() => {
document.getElementById('detailIframeId') document.getElementById('detailIframeId').requestFullscreen();
.requestFullscreen(); }}
}}/> />
</div> </div>
</Shell> </Shell>
</PageHeaderWrapper> </PageHeaderWrapper>
......
...@@ -2,24 +2,8 @@ import RenderForm from "@/webPublic/FormInsertDiy/RenderForm"; ...@@ -2,24 +2,8 @@ import RenderForm from "@/webPublic/FormInsertDiy/RenderForm";
import { fetchTemplateById } from '@/webPublic/Services'; import { fetchTemplateById } from '@/webPublic/Services';
import { useState, useEffect } from "react"; import { useState, useEffect } from "react";
import { Form } from 'antd'; import { Form } from 'antd';
import { getOneStopConfig } from "@/baseComponent/utils";
import { setToken } from '@/utils/authority'; import { setToken } from '@/utils/authority';
import { getUrlInfo } from '@/webPublic/one_stop_public/DetailForAudit/utils';
const getUrlInfo = (param) => {
let url = window.document.location.href.toString();
let u = url.split("?");
if (typeof(u[1]) == "string") {
u = u[1].split("&");
let get = {};
for (let i in u) {
let j = u[i].split("=");
get[j[0]] = decodeURIComponent(j[1]);
}
return get;
} else {
return {};
}
};
function OtherCheckRecord({ form, location: { pathname }, ...props }) { function OtherCheckRecord({ form, location: { pathname }, ...props }) {
const [data, setData] = useState(); const [data, setData] = useState();
......
...@@ -385,6 +385,15 @@ class DetailSplit extends Component { ...@@ -385,6 +385,15 @@ class DetailSplit extends Component {
this.setState({ paddingBottom: value }); this.setState({ paddingBottom: value });
}; };
goOtherDetail = (e) => {
const code = e.currentTarget.dataset.codeId;
console.log(this.props);
let url = window.location.href.split('#')[0];
if (code) {
window.open(url + '#' + this.props.history.location.pathname + '?code=' + code + '&showAll=false');
}
};
render() { render() {
const { const {
stepFlow, stepFlow,
...@@ -642,6 +651,22 @@ class DetailSplit extends Component { ...@@ -642,6 +651,22 @@ class DetailSplit extends Component {
)} )}
</div> </div>
)} )}
{// 关联流程 禅道 29126
Array.isArray(data.pcodeData) &&
data.pcodeData.length && (
<div className={styles.body_hea}>
<h3>关联流程</h3>
<div className={styles.guanLianLiuCheng}>
{data.pcodeData.filter((x) => !!x.pcode).map((g) => {
return (
<a key={g.code} onClick={this.goOtherDetail} data-code-id={g.pcode}>
{g.appName}
</a>
);
})}
</div>
</div>
)}
<div <div
className={styles.HistoryFormList} className={styles.HistoryFormList}
id="card_table" id="card_table"
...@@ -978,6 +1003,7 @@ function Index(props) { ...@@ -978,6 +1003,7 @@ function Index(props) {
const id = history.location.state && history.location.state.id; const id = history.location.state && history.location.state.id;
const code = history.location.state && history.location.state.code; const code = history.location.state && history.location.state.code;
const queryId = history.location.query && history.location.query.id; const queryId = history.location.query && history.location.query.id;
const queryCode = history.location.query && history.location.query.code;
const taskId = history.location.state && history.location.state.taskId; const taskId = history.location.state && history.location.state.taskId;
if (!id && !code) { if (!id && !code) {
if (queryId) { if (queryId) {
...@@ -990,8 +1016,8 @@ function Index(props) { ...@@ -990,8 +1016,8 @@ function Index(props) {
dispatch({ dispatch({
type: 'affair/getIdFormDetail', type: 'affair/getIdFormDetail',
payload: { payload: {
id: queryId ? queryId : id, // 审批表Id id: queryId || id || undefined, // 审批表Id
code: code || null, // 表单值 code: queryCode || code || null, // 表单值
handleUser: null, // 处理人 handleUser: null, // 处理人
taskId, // 多任务流程会使用到,后续改为必须传入 taskId, // 多任务流程会使用到,后续改为必须传入
lite: true, lite: true,
...@@ -1007,14 +1033,18 @@ function Index(props) { ...@@ -1007,14 +1033,18 @@ function Index(props) {
} }
}, },
}); });
} };
if (!prepare) { if (!prepare) {
return <Spin size="large" spinning={true} />; return <Spin size="large" spinning={true} />;
} }
return <DetailSplitFormNew.current {...props} formPrepareData={prepare} getFormDetailData={getFormDetailData}/>; return (
<DetailSplitFormNew.current
{...props}
formPrepareData={prepare}
getFormDetailData={getFormDetailData}
/>
);
} }
export default connect(() => { export default connect(() => {
......
...@@ -204,3 +204,9 @@ ...@@ -204,3 +204,9 @@
align-items: center; align-items: center;
} }
} }
.guanLianLiuCheng{
display: grid;
grid-template-columns: repeat(auto-fill, 20%);
width: 100%;
justify-items: center;
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论