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

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

上级 05941989
...@@ -13,7 +13,6 @@ import CreateC from '../../ExportComponent/ContextCreate'; ...@@ -13,7 +13,6 @@ import CreateC from '../../ExportComponent/ContextCreate';
import exportHandledInfo from '@/webPublic/FormInsertDiy/AffairPage/AuditPage/exportHandledInfo'; import exportHandledInfo from '@/webPublic/FormInsertDiy/AffairPage/AuditPage/exportHandledInfo';
import { connect } from 'dva'; import { connect } from 'dva';
import router from 'umi/router'; import router from 'umi/router';
import { getIsBei_Dian } from '@/webPublic/zyd_public/utils/getSchoolType';
@connect(({ keepAlive }) => ({ @connect(({ keepAlive }) => ({
keepAlive, keepAlive,
...@@ -112,6 +111,8 @@ class Index extends React.Component { ...@@ -112,6 +111,8 @@ class Index extends React.Component {
router.push({ router.push({
pathname: './Detail', pathname: './Detail',
state: { state: {
activeType: refInfo.ListTab.state.activeKey === 'tab1' ? '待处理' : '已处理',
searchFormValues: refInfo.List.state.formValues || {},
workId, workId,
dataBaseId, dataBaseId,
record, record,
......
/**
* onestop 流程详情
* 公共代码 - 谨慎修改
* 钟是志
* */
import React, { Component } from 'react'; import React, { Component } from 'react';
import PageHeaderWrapper from '@/components/PageHeaderWrapper'; import PageHeaderWrapper from '@/components/PageHeaderWrapper';
import Shell from '@/webPublic/one_stop_public/App/ButtonDiy/Shell'; import Shell from '@/webPublic/one_stop_public/App/ButtonDiy/Shell';
...@@ -9,6 +14,8 @@ import { message, Modal, notification, Popconfirm } from 'antd'; ...@@ -9,6 +14,8 @@ 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'; import { getUrlInfo } from '@/webPublic/one_stop_public/DetailForAudit/utils';
import { getWaitIds } from '@/webPublic/Services';
import { connect } from 'dva';
window.iframeParentComponent = { window.iframeParentComponent = {
Modal, Modal,
...@@ -41,10 +48,23 @@ export default class Detail extends Component { ...@@ -41,10 +48,23 @@ export default class Detail extends Component {
id, id,
code, code,
showAll: props.from !== 'onestopApp2.0' && getUrlInfo().showAll !== 'false', showAll: props.from !== 'onestopApp2.0' && getUrlInfo().showAll !== 'false',
allPageInfo: [], // 解决禅道 3604 多人并行 【1.0低代码】审核页面新增,上一页下一页功能
}; };
} }
getWaitInfos() {
const { state } = this.props.location;
if (state.activeType === '待处理' && getIsBei_Dian()) {
// 后续再考虑 开放给其他学校.
getWaitIds({
appId: state.workId, //
...state.searchFormValues, // 搜索条件
});
}
}
componentDidMount() { componentDidMount() {
this.getWaitInfos();
window.addEventListener( window.addEventListener(
'message', 'message',
(event) => { (event) => {
......
...@@ -217,3 +217,7 @@ export function getOnestopKey(key = '', formKey = 'key_list', formValue = 'value ...@@ -217,3 +217,7 @@ export function getOnestopKey(key = '', formKey = 'key_list', formValue = 'value
}); });
} }
} }
export function getWaitIds(params){
return uaaRequest('/UnifiedAppFormApi/getWaitIds', params);
}
...@@ -173,7 +173,7 @@ export async function requestOrigin(url, data, options = { ...@@ -173,7 +173,7 @@ export async function requestOrigin(url, data, options = {
if (options.method === 'GET') { if (options.method === 'GET') {
const pp = { const pp = {
...data, ...data,
version_: version, // version_: version,
}; };
for (let i in pp) { for (let i in pp) {
if (pp[i] == null) { if (pp[i] == null) {
...@@ -204,35 +204,36 @@ export async function requestOrigin(url, data, options = { ...@@ -204,35 +204,36 @@ export async function requestOrigin(url, data, options = {
response.errMsg = response.errMsg.slice(0, 50); response.errMsg = response.errMsg.slice(0, 50);
} }
if (response.errCode && response.errCode == '10000') { if (response.errCode && response.errCode == '10000') {
const ul = window.location.href; return false;
if (ul.indexOf('timeVersion=') == -1) { // const ul = window.location.href;
let x = JSON.parse(response.errMsg); // if (ul.indexOf('timeVersion=') == -1) {
let time = +new Date(); // let x = JSON.parse(response.errMsg);
localStorage.setItem('version', JSON.stringify(x.version)); // let time = +new Date();
// localStorage.setItem('version', JSON.stringify(x.version));
if (ul.indexOf('/portal/') == -1 && ul.indexOf('/admin/') == -1) { //
sessionStorage.removeItem('cacheMobile'); // if (ul.indexOf('/portal/') == -1 && ul.indexOf('/admin/') == -1) {
showToast('检查到最新版本,即将自动更新,更新完成后请重新操作'); // sessionStorage.removeItem('cacheMobile');
// showToast('检查到最新版本,即将自动更新,更新完成后请重新操作');
window.location.href = x.mobileAdress //
? mobileAdress + '?timeVersion=' + time // window.location.href = x.mobileAdress
: ul.indexOf('?') > -1 // ? mobileAdress + '?timeVersion=' + time
? ul + '&timeVersion=' + time // : ul.indexOf('?') > -1
: ul + '?timeVersion=' + time; // ? ul + '&timeVersion=' + time
} else { // : ul + '?timeVersion=' + time;
sessionStorage.removeItem('cacheMobile'); // } else {
openToast('error', '版本更新', '检查到最新版本,即将自动更新,更新完成后请重新操作'); // sessionStorage.removeItem('cacheMobile');
// openToast('error', '版本更新', '检查到最新版本,即将自动更新,更新完成后请重新操作');
window.location.href = x.webAdress //
? x.webAdress + '?timeVersion=' + time // window.location.href = x.webAdress
: ul.indexOf('?') > -1 // ? x.webAdress + '?timeVersion=' + time
? ul + '&timeVersion=' + time // : ul.indexOf('?') > -1
: ul + '?timeVersion=' + time; // ? ul + '&timeVersion=' + time
} // : ul + '?timeVersion=' + time;
setTimeout(() => location.reload(), 3000); // }
} // setTimeout(() => location.reload(), 3000);
// }
return; //
// return;
} }
if (window.location.href.indexOf('/mobile') != -1) { if (window.location.href.indexOf('/mobile') != -1) {
if (response.errCode || response.errMsg) { if (response.errCode || response.errMsg) {
...@@ -264,7 +265,7 @@ export async function requestOrigin(url, data, options = { ...@@ -264,7 +265,7 @@ export async function requestOrigin(url, data, options = {
const pp = { const pp = {
token: getVisitorToken(), // 部分接口 只需要传入假token 所以这里优先级是 data中的token > getToken; token: getVisitorToken(), // 部分接口 只需要传入假token 所以这里优先级是 data中的token > getToken;
...data, ...data,
version_: version, // version_: version,
}; };
for (let i in pp) { for (let i in pp) {
...@@ -292,8 +293,6 @@ export async function requestOrigin(url, data, options = { ...@@ -292,8 +293,6 @@ export async function requestOrigin(url, data, options = {
} }
} }
delete options.prefix; delete options.prefix;
// POST请求 // POST请求
return fetchRequest(transformApi, { return fetchRequest(transformApi, {
...@@ -307,33 +306,34 @@ export async function requestOrigin(url, data, options = { ...@@ -307,33 +306,34 @@ export async function requestOrigin(url, data, options = {
response.errMsg = response.errMsg.slice(0, 30) + '...'; response.errMsg = response.errMsg.slice(0, 30) + '...';
} }
if (response && response.errCode && response.errCode == '10000') { if (response && response.errCode && response.errCode == '10000') {
const ul = window.location.href; return false;
if (ul.indexOf('timeVersion=') == -1) { // const ul = window.location.href;
let x = JSON.parse(response.errMsg); // if (ul.indexOf('timeVersion=') == -1) {
let time = +new Date(); // let x = JSON.parse(response.errMsg);
localStorage.setItem('version', JSON.stringify(x.version)); // let time = +new Date();
// localStorage.setItem('version', JSON.stringify(x.version));
if (ul.indexOf('/portal/') == -1 && ul.indexOf('/admin/') == -1) { //
sessionStorage.removeItem('cacheMobile'); // if (ul.indexOf('/portal/') == -1 && ul.indexOf('/admin/') == -1) {
showToast('检查到最新版本,即将自动更新,更新完成后请重新操作'); // sessionStorage.removeItem('cacheMobile');
window.location.href = x.mobileAdress // showToast('检查到最新版本,即将自动更新,更新完成后请重新操作');
? mobileAdress + '?timeVersion=' + time // window.location.href = x.mobileAdress
: ul.indexOf('?') > -1 // ? mobileAdress + '?timeVersion=' + time
? ul + '&timeVersion=' + time // : ul.indexOf('?') > -1
: ul + '?timeVersion=' + time; // ? ul + '&timeVersion=' + time
} else { // : ul + '?timeVersion=' + time;
sessionStorage.removeItem('cacheMobile'); // } else {
openToast('error', '版本更新', '检查到最新版本,即将自动更新,更新完成后请重新操作'); // sessionStorage.removeItem('cacheMobile');
// openToast('error', '版本更新', '检查到最新版本,即将自动更新,更新完成后请重新操作');
window.location.href = x.webAdress //
? x.webAdress + '?timeVersion=' + time // window.location.href = x.webAdress
: ul.indexOf('?') > -1 // ? x.webAdress + '?timeVersion=' + time
? ul + '&timeVersion=' + time // : ul.indexOf('?') > -1
: ul + '?timeVersion=' + time; // ? ul + '&timeVersion=' + time
} // : ul + '?timeVersion=' + time;
setTimeout(() => location.reload(), 3000); // }
} // setTimeout(() => location.reload(), 3000);
return; // }
// return;
} }
if (window.location.href.indexOf('/mobile') !== -1) { if (window.location.href.indexOf('/mobile') !== -1) {
if (response.errCode || response.errMsg) { if (response.errCode || response.errMsg) {
...@@ -362,7 +362,7 @@ export async function requestOrigin(url, data, options = { ...@@ -362,7 +362,7 @@ export async function requestOrigin(url, data, options = {
return response; return response;
}); });
} }
}; }
const setRequestConfig = config => { const setRequestConfig = config => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论