4.18 修改报表打印文件名后缀
This commit is contained in:
@ -11,6 +11,7 @@
|
||||
<script type="text/javascript">
|
||||
var path; //文档地址
|
||||
var fileName;//weboffice文件名
|
||||
var fileType;//文件类型
|
||||
|
||||
function getQueryString(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
@ -56,7 +57,7 @@
|
||||
|
||||
<!--AfterPublishAsPDFToURL-->
|
||||
|
||||
<body onload="path=getQueryString('path');fileName=getQueryString('fileName');init(path);">
|
||||
<body onload="path=getQueryString('path');fileName=getQueryString('fileName');fileType=getQueryString('fileType');init(path);">
|
||||
|
||||
<script type="text/javascript" for="TANGER_OCX" event="OnDocumentOpened(File, Document)">
|
||||
|
||||
@ -87,7 +88,7 @@
|
||||
}
|
||||
//调用文档通用属性方法 1-打开 2-保存(另存为) 4-打印
|
||||
function generalProp(param) {
|
||||
TANGER_OCX.WebFileName = fileName + ".doc";//文档默认名称
|
||||
TANGER_OCX.WebFileName = fileName + "." + fileType;//文档默认名称
|
||||
TANGER_OCX.ShowDialog(param)
|
||||
}
|
||||
</script>
|
||||
|
@ -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,9 +86,9 @@ const ReportPrint: React.FC<{}> = () => {
|
||||
}
|
||||
};
|
||||
|
||||
const onClickLink = (url: string, name: string, data: any) => {
|
||||
const onClickLink = (url: string, name: string, type: string, data: any) => {
|
||||
editLoading();
|
||||
window.ntkoBrowser.openWindow('/Weboffice4Path.html?path=' + encodeURIComponent(url) + '&fileName=' + `${data.sectionName}-${data.sectionNum}-${data.roomType == 1 ? '预审' : ''}${name}${defId == 'recruit_multi' ? `第${data.roomSort}轮` : ''}${data.reviewMark == 1 ? `(第${data.reviewSort}次重新评审)` : ''}`);
|
||||
window.ntkoBrowser.openWindow('/Weboffice4Path.html?path=' + encodeURIComponent(url) + '&fileType=' + type + '&fileName=' + `${data.sectionName}-${data.sectionNum}-${data.roomType == 1 ? '预审' : ''}${name}${defId == 'recruit_multi' ? `第${data.roomSort}轮` : ''}${data.reviewMark == 1 ? `(第${data.reviewSort}次重新评审)` : ''}`);
|
||||
};
|
||||
|
||||
return (
|
||||
|
Reference in New Issue
Block a user