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

到处组件修改

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