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

3766 增加已处理的导出功能

上级 5c492c18
......@@ -361,6 +361,7 @@ export default class List extends Component {
getPage={this.getPage}
children={children}
columns={columns}
searcherKeyValue={this.trueSearchParams?.searcherKeyValue}
/>
) : null}
<StandardTable {...tableProps} />
......
......@@ -11,6 +11,7 @@ export default function exportHandledInfo({
columns = [],
appId = '1492048888356405248',
type = 'handled',
searcherKeyValue = {},
}) {
const headers = columns.filter((g) => {
return g.dataIndex !== 'operationDiy';
......@@ -31,20 +32,21 @@ export default function exportHandledInfo({
appId,
type,
headers: JSON.stringify(headers),
searcherKeyValue,
token: getToken(),
};
if (appId) {
message.info('正在导出文件,请耐心等待');
let url = window.CONFIG.OAUTH_ACTION_PATH + '/UnifiedAppFormApi/exportData';
// uaaRequest('/UnifiedAppFormApi/getHandledPage', data);
// downloadFile(url, data);
console.log(data, url);
giveBase16EnCode(data, url)
.then((newData) => {
console.log('newData', newData);
if (typeof newData === 'object' && newData.url && newData.datas) {
// newData.datas.rbin = true;
newData.datas.token = getToken();
return downloadFile(newData.url, newData.datas);
}else{
return downloadFile(url, newData);
}
// downloadFile(url, data);
});
......
......@@ -210,11 +210,12 @@ class Index extends React.Component {
type: 'export',
name: '导出',
component: 'Normal',
handleClick: (selectRows, formValues, getPage, search, columns) => {
handleClick: (selectRows, formValues, getPage, search, columns, searcherKeyValue) => {
exportHandledInfo({
columns,
appId: workId,
type: 'handled',
searcherKeyValue,
});
},
}); // 解决禅道 32366 二级学院审核,所有二级学院审核后在已处理中加导出功能 103152
......@@ -225,11 +226,12 @@ class Index extends React.Component {
type: 'export',
name: '导出',
component: 'Normal',
handleClick: (selectRows, formValues, getPage, search, columns) => {
handleClick: (selectRows, formValues, getPage, search, columns, trueSearchParams) => {
exportHandledInfo({
columns,
appId: workId,
type: null,
searcherKeyValue: trueSearchParams,
});
},
}); // 解决禅道 32366 二级学院审核,所有二级学院审核后在已处理中加导出功能 103152
......
......@@ -5,7 +5,7 @@ import ModalForm from './ModalForm';
export default class ButtonListDom extends Component {
render() {
const { config, getPage, selectRows, formValues, children, search, listData, columns } = this.props;
const { config, getPage, selectRows, formValues, children, search, listData, columns, searcherKeyValue = JSON.stringify({}) } = this.props;
return (
<div style={{ height: '50px', padding: '12px 0 12px 12px', positon: 'relative' }}>
{config.map((item, i) => {
......@@ -34,7 +34,7 @@ export default class ButtonListDom extends Component {
type={item.buttonType}
className={item.className || 'defaultBule'}
handleClick={() => {
item.handleClick(selectRows, formValues, getPage, search, columns);
item.handleClick(selectRows, formValues, getPage, search, columns, searcherKeyValue);
}}
/>
);
......@@ -46,6 +46,7 @@ export default class ButtonListDom extends Component {
getPage,
search,
listData,
searcherKeyValue,
});
default:
break;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论