tangning 2 月之前
父節點
當前提交
98a0a87393
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/view/material/index.vue

+ 2 - 1
src/view/material/index.vue

@@ -249,7 +249,8 @@ const handleCommand =  async (command: string | number | object, item) => {
       if(item.filesId){
           const res = await exportCaseInquestInfo(item.filesId);
           const href = URL.createObjectURL(res)
-          saveAs(href, item.filesTitle+'.docx');
+          var suffix = item.filesUrl && item.filesUrl.match(/.[^.]+$/)[0] || '.docx';//.txt
+          saveAs(href, item.filesTitle+suffix);
           return;
       }
       downloadFile(item.filesUrl, item.filesTitle)