|
@@ -385,6 +385,7 @@ export default {
|
|
|
pdfDrawerExcelRef: null,
|
|
|
saveExcelJsonLoadPdf: false,
|
|
|
saveDataInfo: {},
|
|
|
+ pdfDataUrl:''
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -1156,17 +1157,12 @@ async saveExcelInfo() {
|
|
|
|
|
|
if (res.code === 200) {
|
|
|
console.log(res.data,'data');
|
|
|
- const { data: res1 } = await getExcelPdf({
|
|
|
- key: this.from.id,
|
|
|
- url: res1.data
|
|
|
- });
|
|
|
+ this.pdfDataUrl = res.data;
|
|
|
+ this.saveExcelInfoPdf()
|
|
|
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.pdfDrawerExcelRef.show(res1.data,true)
|
|
|
-
|
|
|
- })
|
|
|
|
|
|
} else {
|
|
|
+ this.pdfDataUrl=''
|
|
|
this.$message.error(res.msg);
|
|
|
|
|
|
}
|
|
@@ -1178,6 +1174,18 @@ async saveExcelInfo() {
|
|
|
}
|
|
|
|
|
|
|
|
|
+},
|
|
|
+ async saveExcelInfoPdf() {
|
|
|
+ const { data: res1 } = await getExcelPdf({
|
|
|
+ key: this.from.id,
|
|
|
+ url: this.pdfDataUrl
|
|
|
+ });
|
|
|
+ console.log(res1.data,'res1');
|
|
|
+
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.pdfDrawerExcelRef.show(res1.data,true)
|
|
|
+
|
|
|
+ })
|
|
|
},
|
|
|
async saveExcelInfoPdf() {
|
|
|
this.saveExcelJsonLoadPdf = true; // 开始加载
|