licp
2024-12-26 a4f2ebf136cbac92638d0268f9068dff92241f06
src/components/view/a8-document-approval-records.vue
@@ -200,14 +200,15 @@
    // 导出
    handleDown(){
      this.outLoading = true
      this.$axios.post(this.$api.manageRecordCheck.exportOutManageRecordCheck,{entity:this.componentData.entity},{headers: { 'Content-Type': 'application/json' }}).then(res => {
      this.$axios.get(this.$api.manageRecordCheck.exportOutManageRecordCheck + '?documentName=' + this.componentData.entity.documentName + '&documentCode='+ this.componentData.entity.documentCode,{responseType: "blob"}).then(res => {
        this.outLoading = false
        if(res.code==201) return this.$message.error('导出失败')
        this.$message.success('导出成功')
        let url = this.javaApi+'word/'+res.message
        const blob = new Blob([res],{ type: 'application/msword' });
        const url = URL.createObjectURL(blob);
        const link = document.createElement('a');
        link.href = url;
        link.download = '文件审批记录';
        link.download = '文件审批记录.docx';
        link.click();
      })
    },