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

禅道30031 特定流程已办理页面增加导出按钮

上级 17294f9c
......@@ -332,6 +332,7 @@ export default class List extends Component {
search={pageSearch.search}
getPage={this.getPage}
children={children}
columns={columns}
/>
) : null}
<StandardTable {...tableProps} />
......
/**
* 禅道 30031 已处理的页面增加导出按钮
* */
import { message } from 'antd';
import React from 'react';
import { downloadFile } from '@/webPublic/one_stop_public/Table/globalFunction';
export default function exportHandledInfo({
columns = [],
appId = '1492048888356405248',
type = 'handled',
}) {
const headers = columns.filter((g) => {
return g.dataIndex !== 'operationDiy';
}).map((g) => {
if(g.title === '流程审核状态'){
return {
key: 'formStatusName',
title: g.title,
};
}
return {
key: g.dataIndex,
title: g.title,
};
});
const data = {
appId,
type,
headers: JSON.stringify(headers),
};
if(appId){
message.info('正在导出文件,请耐心等待');
let url = window.CONFIG.OAUTH_ACTION_PATH + '/UnifiedAppFormApi/exportData';
downloadFile(url, data);
}
}
......@@ -5,7 +5,7 @@ import ModalForm from './ModalForm';
export default class ButtonListDom extends Component {
render() {
const { config, getPage, selectRows, formValues, children, search, listData } = this.props;
const { config, getPage, selectRows, formValues, children, search, listData, columns } = this.props;
return (
<div style={{ height: '50px', padding: '12px 0 12px 12px', positon: 'relative' }}>
{config.map((item, i) => {
......@@ -33,7 +33,7 @@ export default class ButtonListDom extends Component {
key={item.type}
className={item.className || 'defaultBule'}
handleClick={() => {
item.handleClick(selectRows, formValues, getPage, search);
item.handleClick(selectRows, formValues, getPage, search, columns);
}}
/>
);
......
......@@ -12,6 +12,8 @@ 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';
export const CreateC = createContext({
routerConfig: {},
......@@ -74,6 +76,23 @@ function ActiveMenuComponent({ routerConfig, ...otherProps }) {
Res = <Apply workId={appId} {...otherProps} />;
break;
case 'Audit': // 审批类
if(appId === '1492048888356405248' && getIsQian_Nan()){
// 禅道30031
otherProps.tab2Buttons = [
{
type: 'export',
name: '导出',
component: 'Normal',
handleClick: (selectRows, formValues, getPage, search, columns) => {
exportHandledInfo({
columns,
appId,
handled: 'handled',
});
},
},
];
}
Res = <Audit workId={appId} {...otherProps} />;
break;
case 'BatchAudit': // 批量审批
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论