Merge branch '20220418-zjl-报表打印另存为默认格式打开文件内容乱码' into 'master-0422-合并'

4.22 报表打印另存为默认格式打开文件内容乱码

See merge request eshop/fe_service_ebtp_frontend!28
This commit is contained in:
周建龙
2022-04-22 20:55:05 +08:00
2 changed files with 6 additions and 5 deletions

View File

@ -34,7 +34,7 @@ const ReportPrint: React.FC<{}> = () => {
<Button
type="text"
key={item.id}
onClick={() => onClickLink(item.url, item.dicName, response?.data)}
onClick={() => onClickLink(item.url, item.dicName, item.queryType, response?.data)}
style={{ color: '#b30000', background: 'rgba(0, 0, 0, 0)' }}
>
{index + 1}{item.dicName}
@ -86,11 +86,11 @@ const ReportPrint: React.FC<{}> = () => {
}
};
const onClickLink = (url: string, name: string, data: any) => {
const onClickLink = (url: string, name: string, type: string, data: any) => {
editLoading();
const fileName: string = `${data.sectionName}-${data.sectionNum}-${data.roomType == 1 ? '预审' : ''}${name}${defId == 'recruit_multi' ? `${data.roomSort}` : ''}${data.reviewMark == 1 ? `(第${data.reviewSort}次重新评审)` : ''}`;
const format = fileName.replace(/\//g, "-") //格式化文件名称
window.ntkoBrowser.openWindow('/Weboffice4Path.html?path=' + encodeURIComponent(url) + '&fileName=' + format);
window.ntkoBrowser.openWindow('/Weboffice4Path.html?path=' + encodeURIComponent(url) + '&fileType=' + type + '&fileName=' + format);
};
return (