tangning 2 months ago
parent
commit
98a0a87393
1 changed files with 2 additions and 1 deletions
  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)