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

3604 多人并行 【1.0低代码】审核页面新增,上一页下一页功能

上级 dc3fe454
......@@ -15,7 +15,6 @@ import DetailOneStop from '@/webPublic/one_stop_public/DetailForAudit/IframeForD
import { getIsBei_Dian, getIsGui_Jian } from '@/webPublic/zyd_public/utils/utils';
import { getUrlInfo } from '@/webPublic/one_stop_public/DetailForAudit/utils';
import { getWaitIds } from '@/webPublic/Services';
import { connect } from 'dva';
window.iframeParentComponent = {
Modal,
......@@ -48,17 +47,38 @@ export default class Detail extends Component {
id,
code,
showAll: props.from !== 'onestopApp2.0' && getUrlInfo().showAll !== 'false',
allPageInfo: [], // 解决禅道 3604 多人并行 【1.0低代码】审核页面新增,上一页下一页功能
allWaitIds: [], // 解决禅道 3604 多人并行 【1.0低代码】审核页面新增,上一页下一页功能
};
}
getWaitInfos() {
const { state } = this.props.location;
if (state.activeType === '待处理' && getIsBei_Dian()) {
const { code } = this.state;
if (state.activeType === '待处理' && getIsBei_Dian() && code) {
// 后续再考虑 开放给其他学校.
getWaitIds({
appId: state.workId, //
...state.searchFormValues, // 搜索条件
}).then((res) => {
if (res && Array.isArray(res)) {
res.forEach((g, index) => {
g.taskId = g.id;
delete g.id;
if(g.code === code){
g.rightNow = true;
if(index > 0){
res[index - 1].prev = true;
}
if(index < res.length - 1){
res[index + 1].next = true;
}
}
});
this.setState({
allWaitIds: res,
});
}
});
}
}
......@@ -87,11 +107,13 @@ export default class Detail extends Component {
};
getButtons = () => {
const { showAll } = this.state;
const { hiddenButton, fromCheckRecord } = this.props;
const { showAll, allWaitIds } = this.state;
const { hiddenButton, fromCheckRecord, location: { state } } = this.props;
if (hiddenButton) {
return null;
}
const nextForm = allWaitIds.find((x) => x.next) || null;
const prevForm = allWaitIds.find((x) => x.prev) || null;
return (
<>
<Shell>
......@@ -121,6 +143,48 @@ export default class Detail extends Component {
document.getElementById('detailIframeId').requestFullscreen();
}}
/>
{
!!prevForm && (
<ButtonDiy
name={'上一条'}
className="defaultBlue"
handleClick={() => {
router.replace({
pathname: './Detail',
state: {
...state,
record: {
id: undefined,
code: prevForm.code,
},
taskId: prevForm.taskId,
},
});
}}
/>
)
}
{
!!nextForm && (
<ButtonDiy
name={'下一条'}
className="defaultBlue"
handleClick={() => {
router.replace({
pathname: './Detail',
state: {
...state,
record: {
id: undefined,
code: nextForm.code,
},
taskId: nextForm.taskId,
},
});
}}
/>
)
}
</div>
</Shell>
</>
......
......@@ -182,7 +182,6 @@ class DetailSplit extends Component {
const id = this.props.history.location.state && this.props.history.location.state.id;
const code = this.props.history.location.state && this.props.history.location.state.code;
const queryId = this.props.history.location.query && this.props.history.location.query.id;
const taskId = this.props.history.location.state && this.props.history.location.state.taskId;
if (!id && !code) {
if (queryId) {
} else {
......
......@@ -50,6 +50,7 @@ export default class GetDetail extends Component {
state: {
id,
code,
taskId: location.state.taskId || undefined,
fromIframe: false,
},
};
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论