田源
2023-12-06 d3be4d813f6745f245d36a07ea705b4db169d273
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
@@ -578,19 +578,25 @@
      exportGroupCodeExcel({
        codeClassifyOid: this.codeClassifyOid,
      }).then(res => {
        console.log(res)
        if (res) {
          func.downloadFileByBlobHandler(res);
          this.$message.success('下载成功,请查看!');
          this.isLoading = false;
        }
      }).catch(error => {
        console.log(error)
        if (error) {
          this.$message.error('请查看下载的错误文件!');
        }
        this.isLoading = false;
      })
        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;
          }
        };
      });
    },
    //标准申请
    codeApplyHandler() {