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

3766 增加已处理的导出功能

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