Commit 0b85049b authored by zhengke's avatar zhengke

修复bug

parent c2e22cf0
......@@ -18,9 +18,6 @@ page {
src: url("https://im.oytour.com/tripfont/a5cf6c61491d0b1aed95c0f9d0737140.woff2") format("woff2");
font-display: swap;
}
*{
font-family: PingFang SC;
}
.el-table.tableHBEbeef5 th.el-table__cell {
background-color: #ebeef5;
}
......
......@@ -9,7 +9,7 @@
</div>
<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)"
v-for="(item,index) in GroupList" :key="index" @click.stop="Search(item)"
:class="[queryObj.CloudGroupId==item.Id?'active':'']">
<span class="block">{{item.GName}}</span>
<div class="row">
......@@ -20,10 +20,10 @@
</div>
<template #dropdown>
<el-dropdown-menu class="q-pa-md">
<el-dropdown-item @click="EditGroup(item)">
<el-dropdown-item @click.stop="EditGroup(item)">
<el-button type="default" link :icon="Edit" size="small">重命名</el-button>
</el-dropdown-item>
<el-dropdown-item @click="deleteGroup(item)">
<el-dropdown-item @click.stop="deleteGroup(item)">
<el-button type="default" link :icon="Delete" size="small">删除分组</el-button>
</el-dropdown-item>
</el-dropdown-menu>
......@@ -42,8 +42,8 @@
placeholder="请输入图片名称搜索" @keyup.enter="Search">
</el-input>
</div>
<div ref="imgRef">
<div class="CloudDisk-R-Center row">
<div ref="imgDiskRef" style="height: 420px;padding-top: 20px;">
<div class="CloudDisk-R-Center row" v-loading="loading">
<FileInput @change="files => insertImageElement(files)">
<div class="CloudDisk-R-Box">
<div class="CloudDisk-R-Plus column items-center cusor-pointer">
......@@ -71,12 +71,28 @@
:initial-index="4"
fit="cover"
/> -->
<span class="close-btn cursor-pointer column items-center flex-center"
@click.stop="deleteImg(item)">
<IconClose :size="10"></IconClose>
</span>
</div>
<span class="title block">{{item.FileName}}</span>
</div>
</template>
</div>
</div>
<div v-if="queryObj.pageCount>1" class="q-mt-md" style="display: flex;justify-content: center;">
<el-pagination
v-model:current-page="currentPage"
:page-size="queryObj.pageSize"
small="small"
layout="prev, pager, next"
:total="queryObj.total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
</div>
</div>
......@@ -117,10 +133,12 @@ const dialogFormVisible = ref(false)
const dialogTitle = ref('')
const queryObj = reactive({
pageIndex: 1,
pageSize: 3,
pageSize: 11,
CloudGroupId: '',
FileName: '',
total: 0
})
const currentPage = ref(1)
const ImgId= ref('')
const GName= ref('')
const addEditMsg = reactive({
......@@ -129,7 +147,7 @@ const addEditMsg = reactive({
SortNum: null,
})
const GroupId = ref(''|Number)
const imgRef = ref<any>()
const imgDiskRef = ref<any>()
const dataList = ref([] as any)
const loading = ref(false)
const GroupList = ref([] as any)
......@@ -166,6 +184,34 @@ const insertImageElement = async (files: FileList) => {
},300)
}
// 删除
const deleteImg = (item:any) => {
ElMessageBox.confirm(
`此操作将删除该图,是否确定?`,
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
).then(async () => {
try {
deleteLoading.value = ElLoading.service({
lock:true,
text:'正在处理'
})
let dataRes = await CloudDiskService.RemovePPTCloudInfo(item.DetailsId)
if (dataRes.data.resultCode == 1) {
querySearchHandler()
}
deleteLoading.value.close()
deleteLoading.value = null
} catch (error) {}
}).catch(() => {})
}
const addEditGroup = () =>{
dialogFormVisible.value = true
dialogTitle.value = '添加分组名称'
......@@ -269,8 +315,9 @@ const querySearchHandler = async () =>{
})
}
arrList(pageRes.data.data.pageData)
dataList.value = dataList.value.concat(pageRes.data.data.pageData);
dataList.value = pageRes.data.data.pageData //dataList.value.concat(pageRes.data.data.pageData);
queryObj.pageCount = pageRes.data.data.pageCount;
queryObj.total = pageRes.data.data.count;
}
setTimeout(()=>{
loading.value = false
......@@ -281,9 +328,9 @@ const querySearchHandler = async () =>{
}
const scrollingHandler = () =>{
if(imgRef.value && !loading.value){
let maxHeight = imgRef.value.scrollHeight - imgRef.value.offsetHeight
let scrollTop = imgRef.value.scrollTop
if(imgDiskRef.value && !loading.value){
let maxHeight = imgDiskRef.value.scrollHeight - imgDiskRef.value.offsetHeight
let scrollTop = imgDiskRef.value.scrollTop
if(maxHeight - scrollTop==0 && queryObj.pageCount > queryObj.pageIndex) {
queryObj.pageIndex++
querySearchHandler()
......@@ -292,16 +339,23 @@ const scrollingHandler = () =>{
}
const handleSizeChange = (val: number) => {
}
const handleCurrentChange = (val: number) => {
queryObj.pageIndex = val
querySearchHandler()
}
querySearchGroup()
querySearchHandler()
onMounted(()=>{
imgRef.value.addEventListener("scroll", scrollingHandler);
// imgDiskRef.value.addEventListener("scroll", scrollingHandler);
})
</script>
<style lang="scss" scoped>
.CloudDisk-L{
border-right: 1px solid #E9E9E9;
padding: 22px 22px 22px 0;
padding: 0 22px 22px 0;
}
.CloudDisk-L-inquire{
margin-bottom: 20px;
......@@ -352,10 +406,9 @@ onMounted(()=>{
color: #3556F9 ;
}
.CloudDisk-R{
padding: 22px 0 0 0;
/* padding: 22px 0 0 0; */
}
.CloudDisk-R-inquire{
padding-bottom: 20px;
padding-left: 24px;
}
.CloudDisk-R-inquire .el-input{
......@@ -382,8 +435,9 @@ onMounted(()=>{
}
.CloudDisk-R-Box{
width: 80px;
margin-left: 26px;
margin-left: 24px;
margin-bottom: 24px;
position: relative;
}
.CloudDisk-R-Img{
width: 80px;
......@@ -407,7 +461,7 @@ onMounted(()=>{
color: #000000;
}
.CloudDisk-L-Center,.CloudDisk-R-Center{
max-height: 100px;
/* max-height: 100px; */
}
.CloudDisk-R-Box.active .CloudDisk-R-Img{
width: 80px;
......@@ -417,4 +471,20 @@ onMounted(()=>{
border-radius: 8px;
border: 2px solid #3556F9;
}
.CloudDisk-R-Box .close-btn{
position: absolute;
top: -10px;
right: -10px;
width: 20px;
height: 20px;
border:1px solid #AFAFAF;
text-align: center;
color:#AFAFAF;
border-radius: 50%;
z-index: 3;
opacity: 0;
}
.CloudDisk-R-Box:hover .close-btn{
opacity: 1;
}
</style>
\ No newline at end of file
......@@ -3,6 +3,11 @@ import Api,{ HttpResponse, Result } from './../utils/request';
class CloudDiskService{
static async RemovePPTCloudInfo(DetailsId:String):Promise<HttpResponse>{
let msg = {DetailsId}
return Api.Post("ppt_RemovePPTCloudInfo",msg)
}
static async GetPPTCloudList(GName:String):Promise<HttpResponse>{
let msg = {GName}
return Api.Post("ppt_GetPPTCloudList",msg)
......
......@@ -477,7 +477,7 @@ const setTemplate = async (type) =>{
if(dataLoading.value){
dataLoadingStore.setDataLoading(0)
}
if(model.value==1&&userInfo.value.isTemplate==1){
if(model.value==1&&(userInfo.value.isTemplate==1||userInfo.value.iv || userInfo.value.ic || userInfo.value.ia)){
arr.forEach(x=>{
if(searchData.value.TemplateType==2) {
x.pageType = 0
......@@ -533,7 +533,7 @@ const setTemplate = async (type) =>{
}
queryObj.value.TempData = JSON.stringify(arr)
if(model.value==1&&userInfo.value.isTemplate==1){
if(model.value==1&&userInfo.value.isTemplate==1||userInfo.value.iv || userInfo.value.ic || userInfo.value.ia){
datas.loading = true
await SetTripTemplateSlide()
}else if(ConfigId.value&&model.value!=2){
......
......@@ -131,6 +131,7 @@ const acquiesceLogo = ref([
'https://im.oytour.com/pptist/static/logo4.png',
'https://im.oytour.com/pptist/static/logo5.png',
'https://im.oytour.com/pptist/static/logo6.png',
'https://im.oytour.com/pptist/static/logo7.png',
])
const tempDatas = ({} as any)
......@@ -585,7 +586,8 @@ const ResolveTripLogoHandler = async (items:any, slideIndex:number,dark:false,da
let scale = parseInt(tempSize.width/tempSize.height)
let url = ''
// if(Colors[1]||scale==6) templateObj[i].filters.invert = '20%'
if(scale==1) url = dark==true?acquiesceLogo.value[0]:acquiesceLogo.value[3]
if(scale==1&&!day) url = dark==true?acquiesceLogo.value[0]:acquiesceLogo.value[3]
if(scale==1&&day) url = acquiesceLogo.value[6]
if(scale<1) url = dark==true?acquiesceLogo.value[1]:acquiesceLogo.value[4]
if(scale==6) url = dark==true?acquiesceLogo.value[2]:acquiesceLogo.value[5]
if(scale==3&&!day) url = dark==true?acquiesceLogo.value[2]:acquiesceLogo.value[5]
......
......@@ -64,6 +64,7 @@ const acquiesceLogo = ref([
'https://im.oytour.com/pptist/static/logo4.png',
'https://im.oytour.com/pptist/static/logo5.png',
'https://im.oytour.com/pptist/static/logo6.png',
'https://im.oytour.com/pptist/static/logo7.png',
])
const tempDatas = ({} as any)
......@@ -170,7 +171,8 @@ const ResolveTripLogoHandler = async (items:any, slideIndex:number,dark:false,da
let scale = parseInt(tempSize.width/tempSize.height)
let url = ''
// if(Colors[1]||scale==6) templateObj[i].filters.invert = '20%'
if(scale==1) url = dark==true?acquiesceLogo.value[0]:acquiesceLogo.value[3]
if(scale==1&&!day) url = dark==true?acquiesceLogo.value[0]:acquiesceLogo.value[3]
if(scale==1&&day) url = acquiesceLogo.value[6]
if(scale<1) url = dark==true?acquiesceLogo.value[1]:acquiesceLogo.value[4]
if(scale==6) url = dark==true?acquiesceLogo.value[2]:acquiesceLogo.value[5]
if(scale==3&&!day) url = dark==true?acquiesceLogo.value[2]:acquiesceLogo.value[5]
......
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