tangning před 2 měsíci
rodič
revize
98a0a87393
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  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)