提交 3ada453a authored 作者: 姚鑫国's avatar 姚鑫国

优化批量下载word方法

上级 da848831
...@@ -11,7 +11,7 @@ import { ...@@ -11,7 +11,7 @@ import {
getWord, getWord,
getFileAndShow, getFileAndShow,
renderContentAll, renderContentAll,
renderContentRow, downloadFile, renderContentRow, downloadFile, getListWord
} from './globalFunction'; } from './globalFunction';
export function giveSmartFormGlobalProps({ export function giveSmartFormGlobalProps({
...@@ -23,7 +23,7 @@ export function giveSmartFormGlobalProps({ ...@@ -23,7 +23,7 @@ export function giveSmartFormGlobalProps({
data = {}, data = {},
nextUsers = {}, // nextUsers = {}, //
calculateFlowData = [], // 移动端使用 用于分块块 禅道 23933 移动端全表单后审核步骤的显示问题优化 calculateFlowData = [], // 移动端使用 用于分块块 禅道 23933 移动端全表单后审核步骤的显示问题优化
}) { }) {
window.smartFormGlobalProps = { window.smartFormGlobalProps = {
fromStart, fromStart,
hasSingle, hasSingle,
...@@ -41,6 +41,7 @@ export function giveSmartFormGlobalProps({ ...@@ -41,6 +41,7 @@ export function giveSmartFormGlobalProps({
getColumnsSqlKeyRealize, getColumnsSqlKeyRealize,
getWord, getWord,
getFileAndShow, getFileAndShow,
getListWord,
downloadFile, downloadFile,
renderContentAll, renderContentAll,
renderContentRow, renderContentRow,
...@@ -60,6 +61,8 @@ export function giveSmartFormGlobalProps({ ...@@ -60,6 +61,8 @@ export function giveSmartFormGlobalProps({
`下载文档地址 ;参数->前五个必填 templatePath,params, title, allValues, listConfig`, `下载文档地址 ;参数->前五个必填 templatePath,params, title, allValues, listConfig`,
'getFileAndShow({templatePath,params, title, allValues, listConfig, ext})': 'getFileAndShow({templatePath,params, title, allValues, listConfig, ext})':
`下载一个文件并直接展示出来地址 ;参数->前五个必填 templatePath,params, title, allValues, listConfig`, `下载一个文件并直接展示出来地址 ;参数->前五个必填 templatePath,params, title, allValues, listConfig`,
'getListWord({templatePath,paramsList, title,sonTitleKey, allValuesKey, listConfig, ext,sonExt})':
`批量下载文档地址 ;参数->前五个必填 templatePath,paramsList, title,sonTitleKey, allValuesKey`,
'renderContentAll(value, row, index, key, spanData, cloumnNames) ': 'renderContentAll(value, row, index, key, spanData, cloumnNames) ':
`ant表头横向、纵向合并 ;参数->所有必填 value, row, index, key, spanData, cloumnNames 实例:render:(value, row, index)=>{return renderContentAll(value, row, index,"inst_name",spanData,cloumnNames)}`, `ant表头横向、纵向合并 ;参数->所有必填 value, row, index, key, spanData, cloumnNames 实例:render:(value, row, index)=>{return renderContentAll(value, row, index,"inst_name",spanData,cloumnNames)}`,
'renderContentRow(value, row, index, key, spanData, cloumnNames) ': 'renderContentRow(value, row, index, key, spanData, cloumnNames) ':
......
...@@ -686,14 +686,14 @@ export function getListWord({ ...@@ -686,14 +686,14 @@ export function getListWord({
function getObjectsKey(listKey = [], params = {}) { function getObjectsKey(listKey = [], params = {}) {
return ( return (
listKey listKey
.filter((key) => Object.keys(params).indexOf(key) .filter((key) => Object.keys(params).indexOf(key))
.reduce( .reduce(
(acc, key) => ({ (acc, key) => ({
...acc, ...acc,
[key]: params[key] === null ? '' : params[key], [key]: params[key] === null ? '' : params[key],
}), }),
{}, {},
)) )
) )
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论