Q-ABAB vor 2 Jahren
Ursprung
Commit
cf01f28c9e
1 geänderte Dateien mit 1 neuen und 37 gelöschten Zeilen
  1. 1 37
      src/components/tool/getWord.js

+ 1 - 37
src/components/tool/getWord.js

@@ -636,42 +636,6 @@ function makerActivityWord(data,total){
             wordData['Transaction'] = wordData['fund']['Transaction']
             wordData['type'] = Boolean(wordData['type'])
 
-            // device:"",
-            //         Material:"",
-            //         processing:"",
-            //         Collaboration:"",
-            //         APPRAISAL:"",
-            //         entery:"",
-            //         activities:"",
-            //         Transaction:"",
-            // return console.log(wordData);
-            //渲染模板
-            // doc.setData(wordData);
-
-            // 注册一个自定义的数组模板标签处理器 {{index numbers 0}}
-     // 注册一个自定义的模板标签处理器,用于处理数组索引
-        // doc.setOptions({
-        //     parser: function (tag) {
-        //       if (tag.position === 'content' && tag.type === 'placeholder') {
-        //         const [property] = tag.parts;
-        //         const value = tag.moduleContext.scope.find(property).value;
-            
-        //         return value;
-        //       }
-        //     }
-        //   });
-
-            // 注册一个自定义对象的模板标签处理器 {{obj.a}}
-            // doc.setOptions({
-            //     parser: function (tag) {
-            //       if (tag.position === 'content') {
-            //         const value = tag.moduleContext.scope.resolve(tag.originalValue);
-                
-            //         return value;
-            //       }
-            //     }
-            //   });
-
             doc.setData(wordData);
 
             doc.render();
@@ -683,7 +647,7 @@ function makerActivityWord(data,total){
                 compression: "DEFLATE",
             });
             let link = document.createElement("a");
-            link.download = '附件 2:创客专项资金项目申请表(创客活动).docx';
+            link.download = `附件 2:创客专项资金项目申请表(${wordData['type']?'个人创客':'创客活动'}).docx`;
             link.style.display = "none";
             let blob = new Blob([output]);
             link.href = URL.createObjectURL(blob);