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

到处组件修改

上级 25ec0f3f
import fetch from 'dva/fetch';
import React from 'react';
import ReactDOM from 'react-dom';
import {
Select,
Button,
Modal,
Input,
Transfer,
Row,
Col,
Form,
message,
notification,
} from 'antd';
import { connect } from 'dva';
import { getToken } from '../utils/token';
import config from '@/webPublic/one_stop_public/config';
import QueryItem from './QueryItem';
import OrderItem from './OrderItem';
import FormdataWrapper from '../utils/object-to-formdata-custom';
import ButtonDiy from './ButtonDiy/ButtonDiy';
const Option = Select.Option;
var keyX = 1;
function swapArray(arr, index1, index2) {
arr[index1] = arr.splice(index2, 1, arr[index1])[0];
return arr;
}
/**
*
* 2019/02/21 修改导出方式为fetch
......@@ -44,7 +23,6 @@ function swapArray(arr, index1, index2) {
}]}
*/
const FormItem = Form.Item;
@connect(({ DataObj, loading }) => ({
DataObj,
loading: loading.models.DataObj,
......@@ -59,7 +37,6 @@ export default class ExportCurrentInfo extends React.Component {
}
exportData = () => {
let divElement = document.getElementById('downloadDiv');
let downloadUrl = config.httpServer + '/DataObjApi/exportCurrent?';
const token = getToken() != null && getToken() != 'null' ? getToken() : '0000';
downloadUrl = `${downloadUrl}token=${token}`;
......
......@@ -21,11 +21,12 @@ export function FormListButtons(props) {
ButtonType: 'import',
});
}
let i = 0 ;
for (let item of exportConfig) {
buttons.push({
...item,
ButtonType: 'export',
index: i++,
});
}
buttons.sort((a, b) => {
......@@ -62,7 +63,7 @@ export function FormListButtons(props) {
key={r.children || '到处'}
query={query}
custom={custom}
index={i}
index={r.index}
btn={r.btn}
ext={r.ext ? r.ext : 'xlsx'}
sql={Base16Encode(sql)}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论