gaoluyang
2025-02-25 d67b031476d33a4a2d002ed32bc30dac34fc5493
导出修改
已修改6个文件
72 ■■■■ 文件已修改
src/api/business/materialInspection.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/business/productOrder.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/productOrder/index.vue 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/rawMaterialInspection/index.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/reportPreparation/index.vue 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/business/materialInspection.js
@@ -93,6 +93,7 @@
  return request({
    url: '/rawMaterialOrder/rawAllExport',
    method: 'post',
    data: query
    data: query,
    responseType: "blob"
  })
}
src/api/business/productOrder.js
@@ -22,7 +22,8 @@
  return request({
    url: '/insOrder/rawAllInsOrderExport',
    method: 'post',
    data: query
    data: query,
    responseType: "blob"
  })
}
// 将待检验的的撤销进行更改
src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue
@@ -158,13 +158,10 @@
          let url = '';
          if (res.data.type == 1) {
            url = this.javaApi + '/img/' + res.data.fileUrl
            file.downloadIamge(url, row.fileName)
            this.$download.saveAs(url, row.fileName);
          } else {
            url = this.javaApi + '/word/' + res.data.fileUrl
            const link = document.createElement('a');
            link.href = url;
            link.download = row.fileName;
            link.click();
            this.$download.saveAs(url, row.fileName);
          }
        }
      }).catch(error => {
src/views/business/productOrder/index.vue
@@ -865,14 +865,10 @@
    },
    // 导出记录
    downLoad () {
      rawAllInsOrderExport({...this.entity, responseType: "blob"}).then(res => {
      rawAllInsOrderExport({...this.entity}).then(res => {
        this.$message.success('导出成功')
        const blob = new Blob([res],{ type: 'application/octet-stream' });
        const url = URL.createObjectURL(blob);
        const link = document.createElement('a');
        link.href = url;
        link.download = '委托检测信息导出' + '.xlsx';
        link.click();
        let url = this.javaApi + '/word/' + res.data
        this.$download.saveAs(url, '委托检测信息导出.xlsx');
      }).catch(err => {
        console.log('err---', err);
      })
@@ -984,13 +980,10 @@
          let url = '';
          if(res.data.type==1){
            url = this.javaApi+'/img/'+res.data.fileUrl
            file.downloadIamge(url,row.fileName)
            this.$download.saveAs(url, row.fileName);
          }else{
            url = this.javaApi+'/word/'+res.data.fileUrl
            const link = document.createElement('a');
            link.href = url;
            link.download = row.fileName;
            link.click();
            this.$download.saveAs(url, row.fileName);
          }
        }
      }).catch(error => {
@@ -1002,11 +995,7 @@
      let url = row.urlS?row.urlS:row.url;
      if(url){
        url = url.split('.')[0]+'.pdf'
        const link = document.createElement('a');
        link.href = this.javaApi + url;
        link.target = '_blank';
        document.body.appendChild(link);
        link.click();
        this.$download.saveAs(url, this.downLoadInfo.fileName);
      }
    },
    // 撤销
src/views/business/rawMaterialInspection/index.vue
@@ -795,16 +795,11 @@
      this.outLoading = true
      rawAllExport({
        entity:entity
      },{
        responseType: "blob"}).then(res => {
      }).then(res => {
        this.outLoading = false
        this.$message.success('导出成功')
        const blob = new Blob([res],{ type: 'application/octet-stream' });
        const url = URL.createObjectURL(blob);
        const link = document.createElement('a');
        link.href = url;
        link.download = '原材料检测信息导出.xlsx';
        link.click();
        let url = this.javaApi + '/word/' + res.data
        this.$download.saveAs(url, "原材料检测信息导出.xlsx");
      })
    },
    clear() {
src/views/business/reportPreparation/index.vue
@@ -555,13 +555,10 @@
          let url = '';
          if(res.data.type==1){
            url = this.javaApi+'/img/'+res.data.fileUrl
            file.downloadIamge(url,row.fileName)
            this.$download.saveAs(url, row.fileName);
          }else{
            url = this.javaApi+'/word/'+res.data.fileUrl
            const link = document.createElement('a');
            link.href = url;
            link.download = row.fileName;
            link.click();
            this.$download.saveAs(url, row.fileName);
          }
        }
      }).catch(error => {
@@ -603,17 +600,7 @@
      downAll({ids: str}).then(res => {
        this.outLoading = false
        this.$message.success('导出成功')
        // const blob = new Blob([res],{ type: 'application/octet-stream' });
        // const url = URL.createObjectURL(blob);
        // const link = document.createElement('a');
        // link.href = url;
        // link.download = '报告.zip';
        // link.click();
        const link = document.createElement('a');
        link.href = this.javaApi + res.message;
        link.target = '_blank';
        document.body.appendChild(link);
        link.click();
        this.$download.saveAs(this.javaApi + res.message, row.fileName);
      })
    },
    beforeUpload(file){
@@ -710,11 +697,7 @@
    },
    download(row) {
      let url = row.urlS ? row.urlS : row.url;
      const link = document.createElement('a');
      link.href = this.javaApi + url;
      link.target = '_blank';
      document.body.appendChild(link);
      link.click();
      this.$download.saveAs(url, row.fileName);
    },
    // 还原操作
    handleRestore(row) {