1
0
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)