|
@@ -635,30 +635,41 @@ export default {
|
|
this.chartLoadingText = "上传图片中..."
|
|
this.chartLoadingText = "上传图片中..."
|
|
this.isChartLoading = true
|
|
this.isChartLoading = true
|
|
|
|
|
|
- // const params = new FormData();
|
|
|
|
- // params.append('Image',$event.src)
|
|
|
|
- // const res = await dataBaseInterface.uploadImg(params);
|
|
|
|
- // if(!res||res&&res.Ret!==200){
|
|
|
|
- // this.isChartLoading = false
|
|
|
|
- // return
|
|
|
|
- // }
|
|
|
|
- // const {Data} = res
|
|
|
|
- // if(!Data){
|
|
|
|
- // this.$message.warning("上传图片失败")
|
|
|
|
- // this.isChartLoading = false
|
|
|
|
- // return
|
|
|
|
- // }
|
|
|
|
- // this.imgUrl = Data.ResourceUrl||''
|
|
|
|
-
|
|
|
|
- //直接走oss不走接口
|
|
|
|
- let clientType = this.$setting.dynamicOutLinks.ObjectStorageClient
|
|
|
|
- || this.$store.state.dynamicOutLinks.ObjectStorageClient
|
|
|
|
- || JSON.parse(localStorage.getItem('dynamicOutLinks')).ObjectStorageClient;
|
|
|
|
|
|
|
|
- let temName = `ppt/image/${new Date().getTime()}`
|
|
|
|
|
|
+
|
|
|
|
+ // 1走后端接口上传
|
|
|
|
+ const uploadType=this.$setting.dynamicOutLinks.PptUpdateApi ||
|
|
|
|
+ this.$store.state.dynamicOutLinks.PptUpdateApi ||
|
|
|
|
+ JSON.parse(localStorage.getItem('dynamicOutLinks')).PptUpdateApi
|
|
|
|
+ if(uploadType==1){
|
|
|
|
+ const params = new FormData();
|
|
|
|
+ params.append('Image',$event.src)
|
|
|
|
+ const res = await dataBaseInterface.uploadImg(params);
|
|
|
|
+ if(!res||res&&res.Ret!==200){
|
|
|
|
+ this.isChartLoading = false
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ const {Data} = res
|
|
|
|
+ if(!Data){
|
|
|
|
+ this.$message.warning("上传图片失败")
|
|
|
|
+ this.isChartLoading = false
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.imgUrl = Data.ResourceUrl||''
|
|
|
|
+
|
|
|
|
+ }else{
|
|
|
|
+ //直接走oss不走接口
|
|
|
|
+ let clientType = this.$setting.dynamicOutLinks.ObjectStorageClient
|
|
|
|
+ || this.$store.state.dynamicOutLinks.ObjectStorageClient
|
|
|
|
+ || JSON.parse(localStorage.getItem('dynamicOutLinks')).ObjectStorageClient;
|
|
|
|
+
|
|
|
|
+ let temName = `ppt/image/${new Date().getTime()}`
|
|
|
|
|
|
- const res = await uploadFileDirect(clientType,$event.src,temName)
|
|
|
|
- this.imgUrl = res;
|
|
|
|
|
|
+ const res = await uploadFileDirect(clientType,$event.src,temName)
|
|
|
|
+ this.imgUrl = res;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
//console.log('OK',$event)
|
|
//console.log('OK',$event)
|
|
let temp_elements = this.addElement(
|
|
let temp_elements = this.addElement(
|