浏览代码

Merge branch 'feature/new-JSONData' into 'wrdp'

版式文件转换扩展名判断

See merge request o2oa/o2oa!2239
胡起 5 年之前
父节点
当前提交
54739be710
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      o2web/source/x_component_process_Xform/Documenteditor.js

+ 3 - 2
o2web/source/x_component_process_Xform/Documenteditor.js

@@ -2973,8 +2973,9 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor =  new Cla
 
 
             var fileName = docNmae || this.json.toWordFilename || "$doc";
             var fileName = docNmae || this.json.toWordFilename || "$doc";
             var n = fileName.lastIndexOf(".");
             var n = fileName.lastIndexOf(".");
-            var ex = fileName.substring(n, fileName.length).toLowerCase();
-            if (ex!==".doc" && ex!==".docx") fileName = fileName+".doc";
+            if (n==-1) fileName = fileName+".doc";
+            // var ex = fileName.substring(n, fileName.length).toLowerCase();
+            // if (ex!==".doc" && ex!==".docx") fileName = fileName+".doc";
 
 
             var body = {
             var body = {
                 "fileName": fileName,
                 "fileName": fileName,