Commit 19a73ceb authored by zhengke's avatar zhengke

修复预览bug , 云盘

parent a864f59b
...@@ -190,6 +190,7 @@ const setImg = (item:any) => { ...@@ -190,6 +190,7 @@ const setImg = (item:any) => {
} }
const insertImageElement = async (files: FileList) => { const insertImageElement = async (files: FileList) => {
let name = files[0].name.split('.')
const loadingObj = ElLoading.service({ const loadingObj = ElLoading.service({
text:'正在上传图', text:'正在上传图',
lock:true lock:true
...@@ -200,9 +201,21 @@ const insertImageElement = async (files: FileList) => { ...@@ -200,9 +201,21 @@ const insertImageElement = async (files: FileList) => {
loadingObj.close() loadingObj.close()
return; return;
} }
let parms = {
fname: name[0],
gid: queryObj.CloudGroupId,
hi: hash
}
let dataRes = await CloudDiskService.CheckCloudInfo(parms)
if (dataRes.data.resultCode==ApiResult.SUCCESS) {
queryObj.CloudGroupId = ''
queryObj.FileName = dataRes.data.data.SourceFileName
Search()
}else{
//TODO: 实现校验HASH值是否存在,如果不存在,才调用下面的这个方法。 //TODO: 实现校验HASH值是否存在,如果不存在,才调用下面的这个方法。
await uoloadFileToService(files[0]) if(dataRes.data.message=='不存在此文件!') await uoloadFileToService(files[0])
}
// await uoloadFileToService(files[0])
loadingObj.close() loadingObj.close()
} }
......
...@@ -3,6 +3,11 @@ import Api,{ HttpResponse, Result } from './../utils/request'; ...@@ -3,6 +3,11 @@ import Api,{ HttpResponse, Result } from './../utils/request';
class CloudDiskService{ class CloudDiskService{
static async CheckCloudInfo(parms:any):Promise<HttpResponse>{
let msg = parms
return Api.Post("ppt_CheckCloudInfo",msg)
}
static async RemovePPTCloudInfo(DetailsId:String):Promise<HttpResponse>{ static async RemovePPTCloudInfo(DetailsId:String):Promise<HttpResponse>{
let msg = {DetailsId} let msg = {DetailsId}
return Api.Post("ppt_RemovePPTCloudInfo",msg) return Api.Post("ppt_RemovePPTCloudInfo",msg)
......
...@@ -83,6 +83,7 @@ import { uniqueId } from 'lodash' ...@@ -83,6 +83,7 @@ import { uniqueId } from 'lodash'
import { useUserStore } from "@/store"; import { useUserStore } from "@/store";
import themeColor from '@/utils/colorExtraction'; import themeColor from '@/utils/colorExtraction';
import HtmlUtil from '@/utils/htmlutil' import HtmlUtil from '@/utils/htmlutil'
import router from '@/router'
const mainStore = useMainStore() const mainStore = useMainStore()
const slidesStore = useSlidesStore() const slidesStore = useSlidesStore()
...@@ -137,6 +138,10 @@ const acquiesceLogo = ref([ ...@@ -137,6 +138,10 @@ const acquiesceLogo = ref([
const tempDatas = ({} as any) const tempDatas = ({} as any)
const colorList = ref([] as any) const colorList = ref([] as any)
const param = router.currentRoute.value.params
const viewSlideShow = param.status
watch(() => slideIndex.value, () => { watch(() => slideIndex.value, () => {
// 清除多选状态的幻灯片 // 清除多选状态的幻灯片
if (selectedSlidesIndex.value.length) { if (selectedSlidesIndex.value.length) {
...@@ -403,7 +408,7 @@ const GetTripTemplate = async () =>{ ...@@ -403,7 +408,7 @@ const GetTripTemplate = async () =>{
text:'正在渲染模版数据', text:'正在渲染模版数据',
lock:true lock:true
}) })
if(!searchData.value.TempId&&!searchData.value.TempId2&&!TempId.value&&!searchData.value.sellTempId&&searchData.value.ViewSlideshow) { if(!searchData.value.TempId&&!searchData.value.TempId2&&!TempId.value&&!searchData.value.sellTempId&&viewSlideShow) {
let list = [ let list = [
{ {
id: 'test-slide-1', id: 'test-slide-1',
...@@ -935,7 +940,9 @@ const contextmenusThumbnailItem = (): ContextmenuItem[] => { ...@@ -935,7 +940,9 @@ const contextmenusThumbnailItem = (): ContextmenuItem[] => {
} }
if(searchData.value.sellId&&!searchData.value.TempId) sellGetTripTemplate() if(searchData.value.sellId&&!searchData.value.TempId) sellGetTripTemplate()
if(!query().ViewSlideshow) GetTripTemplate() if(!viewSlideShow) {
GetTripTemplate()
}
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment