|
@@ -58,7 +58,7 @@ import mixins from '../mixins/mixins';
|
|
|
import html2canvas from 'html2canvas';
|
|
|
import pptxgen from "pptxgenjs";
|
|
|
import moment from 'moment';
|
|
|
-import{dataBaseInterface,getOSSSign} from "@/api/api.js"
|
|
|
+import{pptInterface,dataBaseInterface,getOSSSign} from "@/api/api.js"
|
|
|
import {pptEnInterface} from '@/api/modules/pptEnApi.js';
|
|
|
import Highcharts from "highcharts/highstock";
|
|
|
import HighchartszhCN from '@/utils/highcahrts-zh_CN'
|
|
@@ -487,10 +487,29 @@ export default {
|
|
|
};
|
|
|
|
|
|
pptx2.write('blob').then((data)=>{
|
|
|
+ // 1走后端接口上传
|
|
|
+ const uploadType=this.$setting.dynamicOutLinks.PptUpdateApi ||
|
|
|
+ this.$store.state.dynamicOutLinks.PptUpdateApi ||
|
|
|
+ JSON.parse(localStorage.getItem('dynamicOutLinks')).PptUpdateApi
|
|
|
+ if(uploadType==1){
|
|
|
+ let form = new FormData()
|
|
|
+ form.append("file",data)
|
|
|
+ form.append("PptId",this.$route.query.id)
|
|
|
+ pptInterface.uploadPPTXFile(form).then(res=>{
|
|
|
+ if(res.Ret===200){
|
|
|
+ this.publishPPT(res.Data.ResourceUrl)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ // 上传到阿里云oss
|
|
|
+ // this.handleUploadToOSS(data)
|
|
|
let clientType = this.$setting.dynamicOutLinks.ObjectStorageClient ||
|
|
|
this.$store.state.dynamicOutLinks.ObjectStorageClient ||
|
|
|
JSON.parse(localStorage.getItem('dynamicOutLinks')).ObjectStorageClient
|
|
|
- // 上传到 对象存储器 阿里云、mino
|
|
|
+ // 上传到 对象存储器
|
|
|
uploadFileDirect(clientType,data,temName,options).then(url=>{
|
|
|
console.log('文件地址',url);
|
|
|
this.publishPPT(url)
|