Commit f028d1b1 authored by zhengke's avatar zhengke

no message

parents 9a6cee22 9432fea1
......@@ -10,7 +10,7 @@
<div class="CloudDisk-L-Center fz14">
<div class="CloudDisk-L-Title row flex-between cusor-pointer"
v-for="(item,index) in GroupList" :key="index" @click="Search(item)"
:class="[queryObj.CloudGroupId==item.Id?'active':'']">
:class="[GroupId==item.Id?'active':'']">
<span class="black">{{item.GName}}</span>
<div class="row">
<template v-if="item.Id">
......@@ -56,8 +56,7 @@
</FileInput>
<template v-for="(item,index) in dataList">
<div class="CloudDisk-R-Box"
:class="[GImg==item.DetailsId?'acitve':'']" @click="setImg(item)">
<div class="CloudDisk-R-Box">
<div class="CloudDisk-R-Img">
<el-image
style="width: 80px; height: 80px"
......@@ -109,9 +108,6 @@ import AliyunUpload from '@/utils/upload/aliyun'
import { useUserStore } from "@/store";
import { storeToRefs } from 'pinia'
const emit = defineEmits<{
(event: 'getImg'): void
}>()
const { token, userInfo } = storeToRefs(useUserStore())
const dialogFormVisible = ref(false)
......@@ -123,7 +119,6 @@ const queryObj = reactive({
FileName: '',
})
const GName= ref('')
const GImg= ref(0)
const addEditMsg = reactive({
Id: '',
GName: '',
......@@ -138,17 +133,15 @@ const GroupList = ref([] as any)
const setLoading = ref(false)
const deleteLoading = ref<any>(null)
const setImg = (item:any) =>{
emit('getImg',item.FilePath)
}
const insertImageElement = async (files: FileList) => {
let parms = {
isppt: '1',
uid: token.value,
gid: GroupId.value
}
let name = new Date().getTime()
let url = await AliyunUpload.UploadCloudDisk(files[0], `${name}`, parms);
let filePath="tripImg/";
console.log("ssss");
let url = await AliyunUpload.UploadCloudDisk(files[0], filePath, parms);
if(url) Search()
}
......@@ -207,8 +200,7 @@ const deleteGroup = (item:any) => {
})
let dataRes = await CloudDiskService.RemovePPTCloudGroup(item.Id)
if (dataRes.data.resultCode == 1) {
if(queryObj.CloudGroupId==item.Id) queryObj.CloudGroupId = ''
Search()
querySearchGroup()
}
deleteLoading.value.close()
deleteLoading.value = null
......@@ -239,7 +231,7 @@ const querySearchGroup = async () =>{
}
const Search = (item:any) =>{
if(item) queryObj.CloudGroupId = item.Id
if(item) GroupId.value = item.Id
queryObj.pageIndex = 1
querySearchHandler()
}
......@@ -379,9 +371,6 @@ onMounted(()=>{
margin-left: 26px;
margin-bottom: 24px;
}
.CloudDisk-R-Box.active{
box-shadow: 0px 0px 13px 0px #0D3EBC;
}
.CloudDisk-R-Img{
width: 80px;
height: 80px;
......
......@@ -41,8 +41,8 @@ class AliyunUpload {
try {
const formData = new FormData();
formData.append('file', file);
if(parms&&parms.uid) formData.append('parms', parms);
const response = await fetch(`${domainManager().UploadUrl}/Upload?filePath=${encodeURIComponent(name)}`, {
if(parms&&parms.uid) formData.append('parms', JSON.stringify(parms));
const response = await fetch(`${domainManager().UploadUrl}/Upload/UploadToALiOSS?filePath=${encodeURIComponent(name)}`, {
method: 'POST',
body: formData,
});
......
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