Commit 9a6cee22 authored by zhengke's avatar zhengke

云盘

parent a01ac0ab
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div class="CloudDisk-L-Center fz14"> <div class="CloudDisk-L-Center fz14">
<div class="CloudDisk-L-Title row flex-between cusor-pointer" <div class="CloudDisk-L-Title row flex-between cusor-pointer"
v-for="(item,index) in GroupList" :key="index" @click="Search(item)" v-for="(item,index) in GroupList" :key="index" @click="Search(item)"
:class="[GroupId==item.Id?'active':'']"> :class="[queryObj.CloudGroupId==item.Id?'active':'']">
<span class="black">{{item.GName}}</span> <span class="black">{{item.GName}}</span>
<div class="row"> <div class="row">
<template v-if="item.Id"> <template v-if="item.Id">
...@@ -56,7 +56,8 @@ ...@@ -56,7 +56,8 @@
</FileInput> </FileInput>
<template v-for="(item,index) in dataList"> <template v-for="(item,index) in dataList">
<div class="CloudDisk-R-Box"> <div class="CloudDisk-R-Box"
:class="[GImg==item.DetailsId?'acitve':'']" @click="setImg(item)">
<div class="CloudDisk-R-Img"> <div class="CloudDisk-R-Img">
<el-image <el-image
style="width: 80px; height: 80px" style="width: 80px; height: 80px"
...@@ -108,6 +109,9 @@ import AliyunUpload from '@/utils/upload/aliyun' ...@@ -108,6 +109,9 @@ import AliyunUpload from '@/utils/upload/aliyun'
import { useUserStore } from "@/store"; import { useUserStore } from "@/store";
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
const emit = defineEmits<{
(event: 'getImg'): void
}>()
const { token, userInfo } = storeToRefs(useUserStore()) const { token, userInfo } = storeToRefs(useUserStore())
const dialogFormVisible = ref(false) const dialogFormVisible = ref(false)
...@@ -119,6 +123,7 @@ const queryObj = reactive({ ...@@ -119,6 +123,7 @@ const queryObj = reactive({
FileName: '', FileName: '',
}) })
const GName= ref('') const GName= ref('')
const GImg= ref(0)
const addEditMsg = reactive({ const addEditMsg = reactive({
Id: '', Id: '',
GName: '', GName: '',
...@@ -133,13 +138,15 @@ const GroupList = ref([] as any) ...@@ -133,13 +138,15 @@ const GroupList = ref([] as any)
const setLoading = ref(false) const setLoading = ref(false)
const deleteLoading = ref<any>(null) const deleteLoading = ref<any>(null)
const setImg = (item:any) =>{
emit('getImg',item.FilePath)
}
const insertImageElement = async (files: FileList) => { const insertImageElement = async (files: FileList) => {
let parms = { let parms = {
isppt: '1', isppt: '1',
uid: token.value, uid: token.value,
gid: GroupId.value gid: GroupId.value
} }
let filePath="/Upload/User/";
let name = new Date().getTime() let name = new Date().getTime()
let url = await AliyunUpload.UploadCloudDisk(files[0], `${name}`, parms); let url = await AliyunUpload.UploadCloudDisk(files[0], `${name}`, parms);
if(url) Search() if(url) Search()
...@@ -200,7 +207,8 @@ const deleteGroup = (item:any) => { ...@@ -200,7 +207,8 @@ const deleteGroup = (item:any) => {
}) })
let dataRes = await CloudDiskService.RemovePPTCloudGroup(item.Id) let dataRes = await CloudDiskService.RemovePPTCloudGroup(item.Id)
if (dataRes.data.resultCode == 1) { if (dataRes.data.resultCode == 1) {
querySearchGroup() if(queryObj.CloudGroupId==item.Id) queryObj.CloudGroupId = ''
Search()
} }
deleteLoading.value.close() deleteLoading.value.close()
deleteLoading.value = null deleteLoading.value = null
...@@ -231,7 +239,7 @@ const querySearchGroup = async () =>{ ...@@ -231,7 +239,7 @@ const querySearchGroup = async () =>{
} }
const Search = (item:any) =>{ const Search = (item:any) =>{
if(item) GroupId.value = item.Id if(item) queryObj.CloudGroupId = item.Id
queryObj.pageIndex = 1 queryObj.pageIndex = 1
querySearchHandler() querySearchHandler()
} }
...@@ -371,6 +379,9 @@ onMounted(()=>{ ...@@ -371,6 +379,9 @@ onMounted(()=>{
margin-left: 26px; margin-left: 26px;
margin-bottom: 24px; margin-bottom: 24px;
} }
.CloudDisk-R-Box.active{
box-shadow: 0px 0px 13px 0px #0D3EBC;
}
.CloudDisk-R-Img{ .CloudDisk-R-Img{
width: 80px; width: 80px;
height: 80px; height: 80px;
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
</div> </div>
</div> </div>
</FileInput> --> </FileInput> -->
<CloudDisk></CloudDisk> <CloudDisk @getImg="getImg"></CloudDisk>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="图片地址" name="3"> <el-tab-pane label="图片地址" name="3">
<div class="row wrap q-mt-md"> <div class="row wrap q-mt-md">
...@@ -166,6 +166,10 @@ const handleCurrentChange = (val: number) => { ...@@ -166,6 +166,10 @@ const handleCurrentChange = (val: number) => {
getImgList() getImgList()
} }
const getImg = (url:String) => {
propsDatas.value = { src: url }
}
const insertImageElement = (files: FileList) => { const insertImageElement = (files: FileList) => {
const imageFile = files[0] const imageFile = files[0]
if (!imageFile) return if (!imageFile) return
......
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