|
@@ -272,6 +272,7 @@ import futuresInterface from '@/api/modules/futuresBaseApi';
|
|
|
import chartRelevanceApi from '@/api/modules/chartRelevanceApi';
|
|
|
import { fittingEquationInterface,statisticFeatureInterface } from '@/api/modules/chartRelevanceApi';
|
|
|
import pptmixin from '../mixins/pptMixins';
|
|
|
+import {uploadFileDirect} from "@/utils/common.js"
|
|
|
import mixins from '../mixins/mixins';
|
|
|
import layerMixins from '../mixins/layerMixins';
|
|
|
import pptEditorMixins from '../mixins/pptEditorMixins';
|
|
@@ -621,21 +622,32 @@ export default {
|
|
|
if(this.isChartLoading) return
|
|
|
this.chartLoadingText = "上传图片中..."
|
|
|
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||''
|
|
|
- /* this.imgUrl = $event.src */
|
|
|
+
|
|
|
+ // 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()}`
|
|
|
+
|
|
|
+ const res = await uploadFileDirect(clientType,$event.src,temName)
|
|
|
+ this.imgUrl = res;
|
|
|
+
|
|
|
//console.log('OK',$event)
|
|
|
let temp_elements = this.addElement(
|
|
|
this.currentItem.elements,
|