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

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

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