56 lines
1.5 KiB
JavaScript
56 lines
1.5 KiB
JavaScript
|
|
import { message } from "antd/lib/index";
|
||
|
|
import { getPropertyData, extendInclude, extendRule, getDataFieldValue, setDataFieldValue, initFilter, empty, downLoad } from "../../utils/common";
|
||
|
|
import { connect } from 'dva';
|
||
|
|
import config from "../../config.js";
|
||
|
|
/**
|
||
|
|
* @return {string}
|
||
|
|
*/
|
||
|
|
|
||
|
|
export default {
|
||
|
|
//导出Excel
|
||
|
|
btnDownLoad: (params) => {
|
||
|
|
var selectEd = params.getSelectedRecords()
|
||
|
|
if (selectEd == null || selectEd.length == 0) {
|
||
|
|
message.error("请选择要导出的数据!");
|
||
|
|
return false;
|
||
|
|
}
|
||
|
|
var listID = ""
|
||
|
|
selectEd.forEach(element => {
|
||
|
|
listID += element.ID + ","
|
||
|
|
});
|
||
|
|
let json = initFilter(params.login.OrgId,listID);
|
||
|
|
params.dispatch({
|
||
|
|
type: 'app/getDataByPost',
|
||
|
|
payload: json,
|
||
|
|
url: 'BS/BSRiskSubmit/GetOutPutData',
|
||
|
|
onComplete: (ret) => {
|
||
|
|
if (ret) {
|
||
|
|
downLoad(config.picServerHost, ret)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
});
|
||
|
|
},
|
||
|
|
btnDownLoadDeatil: (params) => {
|
||
|
|
var selectEd = params.getSelectedRecords()
|
||
|
|
if (selectEd == null || selectEd.length == 0) {
|
||
|
|
message.error("请选择要导出的数据!");
|
||
|
|
return false;
|
||
|
|
}
|
||
|
|
var listID = ""
|
||
|
|
selectEd.forEach(element => {
|
||
|
|
listID += element.ID + ","
|
||
|
|
});
|
||
|
|
let json = initFilter(params.login.OrgId,listID);
|
||
|
|
params.dispatch({
|
||
|
|
type: 'app/getDataByPost',
|
||
|
|
payload: json,
|
||
|
|
url: 'BS/BSRiskSubmitContentDeal/GetOutPutData',
|
||
|
|
onComplete: (ret) => {
|
||
|
|
if (ret) {
|
||
|
|
downLoad(config.picServerHost, ret)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
});
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|