|
|
|
@ -1002,7 +1002,7 @@ const getPageData = () => { |
|
|
|
//表单导入 |
|
|
|
function doImportTableData(){ |
|
|
|
dynamicVNode.value=h(importPanel,{ |
|
|
|
fields:props.fieldsDetailList, |
|
|
|
fields:props.fieldsDetailList.filter(val=>val.type!=="table"), |
|
|
|
formId:props.versionid, |
|
|
|
commitFunc:()=>{ |
|
|
|
getPageData() //刷新table页面 |
|
|
|
@ -1042,7 +1042,8 @@ function doExportTableData(){ |
|
|
|
let maxline=0; |
|
|
|
//写主表列 |
|
|
|
for (let val of fields){ |
|
|
|
line.push((item[val.field] as string).replaceAll(",",",")) |
|
|
|
if(typeof(val)==="string") line.push((item[val.field] as string).replaceAll(",",",")) |
|
|
|
else line.push(item[val.field]) |
|
|
|
} |
|
|
|
|
|
|
|
//写子表列 |
|
|
|
@ -1089,7 +1090,7 @@ function doExportTableData(){ |
|
|
|
}) |
|
|
|
|
|
|
|
//去掉标题行的统计 |
|
|
|
if((array.length-1)!==datas.total) alert(`实际数据总量:${datas.total}, 导出数据总量:${array.length}`) |
|
|
|
if((array.length-1)!==datas.total) alert(`导出记录数:${datas.total}, 共计:${array.length-1} 行`) |
|
|
|
|
|
|
|
const filename= props.pickAppMenu.label+".csv" |
|
|
|
const csvString = array.join('\n'); |
|
|
|
@ -1109,7 +1110,8 @@ function doExportTableData(){ |
|
|
|
} |
|
|
|
|
|
|
|
dynamicVNode.value=h(exportPanel,{ |
|
|
|
fields:columnsFilter.value, |
|
|
|
fields:columnsFilter.value.filter((item)=>item.pattern!=="table"), |
|
|
|
subtabs:columnsFilter.value.filter((item)=>item.pattern==="table"), |
|
|
|
subFields:subTableFieldsFilter.value.fields, |
|
|
|
commitFunc:exportFunc, |
|
|
|
closeFunc:()=>dynamicVNode.value=null |
|
|
|
|