ludc
2023-12-07 d76744a052cc15e327d6a07c34140a55aca5b2c4
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
@@ -578,24 +578,27 @@
      exportGroupCodeExcel({
        codeClassifyOid: this.codeClassifyOid,
      }).then(res => {
        let reader = new FileReader();
        reader.readAsText(res.data)
        reader.onload = (result) => {
          try {
            let resData = JSON.parse(result.target.result);  // 解析对象成功
            if (!resData.success) {
              console.log("resData", resData)
              this.$message.error(resData.msg);
              this.isLoading = false;
            }
          } catch (err) {
            // console.log("err",err)// 解析成对象失败,说明是正常的文件流
            func.downloadFileByBlobHandler(res);
            this.$message.success('下载成功,请查看!');
            this.isLoading = false;
          }
        };
        // let reader = new FileReader();
        // reader.readAsText(res.data);
        // reader.onload = () => {
        //   try {
        //     let resData = JSON.parse(reader.result);  // 解析对象成功
        //     if (!resData.success) {
        //       this.$message.error(resData.msg);
        //       this.isLoading = false;
        //     }
        //   } catch (err) {
        //     // 解析成对象失败,说明是正常的文件流
        //     func.downloadFileByBlobHandler(res);
        //     this.$message.success('下载成功,请查看!');
        //     this.isLoading = false;
        //   }
        // };
        func.downloadFileByBlobHandler(res);
        this.$message.success('下载成功,请查看!');
        this.isLoading = false;
      }).catch(error=>{
        this.$message.error(error);
      });
    },
    //标准申请