Merge branch '20230625-动态防护-weboffice文件名处理' into 'release_20230714'
7.14 动态防护 weboffice文件名处理 See merge request eshop/fe_service_ebtp_frontend!307
This commit is contained in:
@ -59,7 +59,7 @@
|
||||
<!--AfterPublishAsPDFToURL-->
|
||||
|
||||
<body
|
||||
onload="path=getQueryString('path');fileName=getQueryString('fileName');fileType=getQueryString('fileType');init(path);">
|
||||
onload="path=getQueryString('path');fileName=decodeURI(getQueryString('fileName'));fileType=getQueryString('fileType');init(path);">
|
||||
|
||||
<script type="text/javascript" for="TANGER_OCX" event="OnDocumentOpened(File, Document)">
|
||||
|
||||
|
@ -79,7 +79,7 @@
|
||||
savePDF=getQueryString('savePDF');
|
||||
HTMLfileCode=getQueryString('HTMLfileCode');
|
||||
saveHTML=getQueryString('saveHTML');
|
||||
fileName=getQueryString('fileName');
|
||||
fileName=decodeURI(getQueryString('fileName'));
|
||||
init(readonly,DocfileCode);"
|
||||
>
|
||||
<script language="JScript" for="TANGER_OCX" event="OnCustomButtonOnMenuCmd(btnPos,btnCaption,btnCmdid)">
|
||||
|
@ -83,7 +83,7 @@
|
||||
savePDF=getQueryString('savePDF');
|
||||
HTMLfileCode=getQueryString('HTMLfileCode');
|
||||
saveHTML=getQueryString('saveHTML');
|
||||
fileName=getQueryString('fileName');
|
||||
fileName=decodeURI(getQueryString('fileName'));
|
||||
init(readonly,DocfileCode);"
|
||||
onbeforeunload="closePostMessage()"
|
||||
>
|
||||
|
@ -188,9 +188,6 @@ const BraftText: React.FC<WangType> = (props) => {
|
||||
/**一定要创建 */
|
||||
editor.create();
|
||||
|
||||
//控制是否可编辑
|
||||
disabled && makeDis();
|
||||
|
||||
willCreate = false;
|
||||
}
|
||||
|
||||
@ -202,6 +199,11 @@ const BraftText: React.FC<WangType> = (props) => {
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
//控制是否可编辑
|
||||
disabled && makeDis();
|
||||
}, [disabled])
|
||||
|
||||
useEffect(() => {
|
||||
// 重新设置编辑器内容
|
||||
echo && editor.txt.html(echo);
|
||||
@ -240,7 +242,7 @@ const BraftText: React.FC<WangType> = (props) => {
|
||||
|
||||
//不可编辑
|
||||
function makeDis() {
|
||||
editor.disable();
|
||||
editor && editor.disable();
|
||||
}
|
||||
|
||||
//form取值
|
||||
|
@ -89,7 +89,7 @@ const ReportPrint: React.FC<{}> = () => {
|
||||
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, "-") //格式化文件名称
|
||||
const format = encodeURI(encodeURI(fileName.replace(/\//g, "-"))) //格式化文件名称
|
||||
window.ntkoBrowser.openWindow('/Weboffice4Path.html?path=' + encodeURIComponent(url) + '&fileType=' + type + '&fileName=' + format);
|
||||
};
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zhoujianlong
|
||||
* @Date: 2021-06-09 15:29:07
|
||||
* @Last Modified by: zhoujianlong
|
||||
* @Last Modified time: 2022-06-24 23:26:28
|
||||
* @Last Modified time: 2023-06-21 16:36:57
|
||||
*/
|
||||
import { Button, Modal } from 'antd';
|
||||
import { LoadingOutlined } from '@ant-design/icons';
|
||||
@ -259,7 +259,7 @@ const WebOffice0609: React.FC<WebOfficeProps> = (props) => {
|
||||
}
|
||||
openUrl += `.html?readonly=${readOnly}&DocfileCode=${docFileCode_}&PDFfileCode=${pdfFileCode_}&HTMLfileCode=${htmlFileCode_}&savePDF=${savePDF}&saveHTML=${saveHTML}&varNtkoGUID=${window.ntkoBrowser.thisNTKOGUID}`;
|
||||
if (fileName != '') {
|
||||
const format = fileName.replace(/\//g, "-") //格式化文件名称
|
||||
const format = encodeURI(encodeURI(fileName.replace(/\//g, "-"))) //格式化文件名称
|
||||
openUrl += `&fileName=${format}`
|
||||
}
|
||||
window.ntkoBrowser.openWindow(openUrl);
|
||||
|
Reference in New Issue
Block a user