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

禅道 32366 二级学院审核,所有二级学院审核后在已处理中加导出功能 103152

上级 736022d4
......@@ -5,6 +5,7 @@ import { message } from 'antd';
import React from 'react';
import { downloadFile } from '@/webPublic/one_stop_public/Table/globalFunction';
import { getToken } from '@/webPublic/one_stop_public/utils/token';
import { giveBase16EnCode, requestFileInfo } from '@/webPublic/one_stop_public/Base16';
export default function exportHandledInfo({
columns = [],
......@@ -13,8 +14,9 @@ export default function exportHandledInfo({
}) {
const headers = columns.filter((g) => {
return g.dataIndex !== 'operationDiy';
}).map((g) => {
if(g.title === '流程审核状态'){
})
.map((g) => {
if (g.title === '流程审核状态') {
return {
key: 'formStatusName',
title: g.title,
......@@ -31,10 +33,18 @@ export default function exportHandledInfo({
headers: JSON.stringify(headers),
token: getToken(),
};
if(appId){
if (appId) {
message.info('正在导出文件,请耐心等待');
let url = window.CONFIG.OAUTH_ACTION_PATH + '/UnifiedAppFormApi/exportData';
downloadFile(url, data);
giveBase16EnCode(data, url)
.then((newData) => {
if (typeof newData === 'object' && newData.url && newData.datas) {
// newData.datas.rbin = true;
newData.datas.token = getToken();
return downloadFile(newData.url, newData.datas);
}
// downloadFile(url, data);
});
}
}
......@@ -11,7 +11,6 @@ import AuditPage from './AuditPage';
import * as destructionFunc from '../destruction';
import { Link } from 'dva/router';
import CreateC from '../../ExportComponent/ContextCreate';
import prepareShow from '@/webPublic/one_stop_public/Table/prepareShow';
import exportHandledInfo from '@/webPublic/FormInsertDiy/AffairPage/AuditPage/exportHandledInfo';
class Index extends React.Component {
......@@ -46,6 +45,9 @@ class Index extends React.Component {
if (typeof response.unifiedServicePatternModel === 'undefined') {
return false;
}
this.setState({
smartFormData: response,
});
destructionFunc.destructionGetDetail(response, workId).then((x) => {
const { addFields, tableInfo, allConfigSetInfo, searchCondition } = x;
this.setState(
......@@ -162,9 +164,10 @@ class Index extends React.Component {
addFields,
allConfigSetInfo,
tableInfo,
smartFormData,
} = this.state;
const { hasBatchAudit, batchAuditButtonName, showPrint, noNeedForm } = this.props;
if (!workId) {
if (!workId || !smartFormData) {
return null;
}
const tab2Buttons = [];
......
......@@ -143,7 +143,9 @@ const getFormDetail = (id) => {
return {};
}
}).then((res) => {
return prepareShow(res);
return prepareShow(res).then((x) => {
return res;
});
});
};
......
......@@ -12,13 +12,10 @@ import Detail from '@/webPublic/FormInsertDiy/AffairPage/Detail'; //详情
import { Modal, message, notification, Popconfirm } from 'antd';
import { connect } from 'dva';
import router from 'umi/router';
import { getIsQian_Nan } from '@/webPublic/zyd_public/utils/getSchoolType';
import exportHandledInfo from '@/webPublic/FormInsertDiy/AffairPage/AuditPage/exportHandledInfo';
import ApplyMerge from './ApplyMerge'; // merge
import AuditMerge from './AuditMerge';
import CheckRecordMerge from './CheckRecordMerge';
import CreateC from './ContextCreate';
import DiyModal from './DiyModal/index';
window.iframeParentComponent = {
Modal,
......@@ -88,25 +85,7 @@ function ActiveMenuComponent({ routerConfig, ...otherProps }) {
Res = <Audit workId={appId} {...otherProps} />;
break;
case 'BatchAudit': // 批量审批
// if(appId === '1492048888356405248' && getIsQian_Nan() || process.env.NODE_ENV === 'development'){
// // 禅道30031
// otherProps.tab2Buttons = [
// {
// type: 'export',
// name: '导出',
// component: 'Normal',
// handleClick: (selectRows, formValues, getPage, search, columns) => {
// exportHandledInfo({
// columns,
// appId,
// handled: 'handled',
// });
// },
// },
// ];
// }
Res = <BatchAudit workId={appId} {...otherProps}
workId={'1492048888356405248'}
/>;
break;
case 'AuditMerage': // 审核页面聚合 多个流程的审核页面放在一起
......
......@@ -153,6 +153,9 @@ const encryptApiList = [
api: 'UnifiedServiceApi/config', // 禅道 25034 宿舍管理/宿舍维修审核,2021030576L 加个字段 做个字段排序
key: ['config'],
},
{
api: 'UnifiedAppFormApi/exportData',
},
];
const resBinaryApiList = [
......@@ -183,6 +186,7 @@ const resBinaryApiList = [
{
api: 'UnifiedWebPatternApi/getDetail',
},
];
export { resBinaryApiList };
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论