Commit 86ec99f4 authored by zhengke's avatar zhengke

新增编辑文件夹

parent db0917d3
......@@ -4,6 +4,13 @@ import Api,{ HttpResponse, Result } from './../utils/request';
* 配置相关方法
*/
class ConfigService{
/**
* 我的云文档列表(行程、广告)
*/
static async GetMyTripFolderPage(params : any):Promise<HttpResponse>{
return Api.Post("triptemplate_GetMyTripFolderPage",params)
}
/**
* 分享销售模版详情
......
......@@ -3,11 +3,12 @@ import Api,{ HttpResponse, Result } from './../utils/request';
class FolderService{
static async SetFolderAsync(FolderId:number,FolderName:string,ParendFolderId:number):Promise<HttpResponse>{
static async SetFolderAsync(FolderId:number,FolderName:string,ParendFolderId:number,FolderType:number):Promise<HttpResponse>{
let msg = {
FolderId,
FolderName,
ParendFolderId
ParendFolderId,
FolderType
}
return Api.Post("triptemplate_SetTripFolder",msg)
}
......
......@@ -34,8 +34,12 @@ const props = defineProps({
type:String,
default:''
},
folderType:{
type:String,
default:1
}
})
const emit = defineEmits<{
const emit = defineEmits<{
(event: 'close'): void,
(event: 'success'): void
}>()
......@@ -51,8 +55,9 @@ const saveFolder=async ()=>{
if(name.value=='') errmsg='请输入文件夹名称'
if(errmsg==''){
try {
let response = await FolderService.SetFolderAsync(props.folderId,name.value,props.parentId)
let response = await FolderService.SetFolderAsync(props.folderId,name.value,props.parentId,props.folderType)
if(response.data.resultCode==ApiResult.SUCCESS){
emit('success')
ElMessage.success({
message:'操作成功'
})
......
<template>
<el-dialog v-model="show" v-loading="loading" :show-close="false"
:close-on-press-escape="false" :close-on-click-modal="false"
style="max-width:1000px;">
<template #header>
<div class="row overflow-hide">
<div>
<img class="q-px-md"
:src="details.TemplateType==1?datas.pdfImg:datas.adsImg"
style="height: 43px;" />
</div>
<div class="q-pl-md col">
<div>
<el-tooltip
placement="top-start">
<template #content><div style="max-width: 600px;">{{details.Title}}</div></template>
<div class="HistoricalVersion-Title pointer">{{details.Title}}</div>
</el-tooltip>
</div>
<div class="text-small text-5B5D62 q-pt-sm">创建者:{{details.CreateByName}}</div>
</div>
</div>
</template>
<el-scrollbar @scroll="scrollingHandler" height="100%">
<div class="HistoricalVersion-container" ref="HistoricalVersion">
<table class="text-small" style="width: 100%;">
<tr class="text-left">
<th class="text-light" style="min-width: 100px;width: 110px;">时间</th>
<th class="text-light"><div class="text-left q-pl-md">更新者</div></th>
<th class="text-light" style="min-width: 100px;width: 110px;">大小</th>
<th class="text-light" style="min-width: 100px;width: 100px;">版本名称</th>
<th class="text-light" style="min-width: 120px;width: 120px;">操作</th>
</tr>
<template v-for="(item,index) in dataList">
<tr class="text-5B5D62 journeyAdsple-table pointer">
<td style="width: 30px;">
</td>
<td class="journeyAds-title wrap">
<span>{{}}</span>
</td>
<td class="text-center"><span>{{}}</span></td>
<td class="text-center"><span>{{}}</span></td>
<td class="text-center">
</td>
</tr>
</template>
</table>
<div v-if="dataList.length == 0 && !loading" class="q-mt-lg bg-white rounded"
style="padding: 30px 10px 30px 10px;">
<el-empty description="暂无数据" />
</div>
<el-divider class="no-bg q-mt-lg" v-if='queryObj.pageCount == queryObj.pageIndex && !loading'>
<span class="text-small bg-white" style="padding: 0 10px;color:#a3a3a3">已加载完成所有数据</span>
</el-divider>
<div style="height:40px;" class="q-mt-md no-bg" background="transparent" v-loading="loading" element-loading-text="正在加载中"></div>
</div>
</el-scrollbar>
<template #footer>
<span class="dialog-footer">
<el-button @click="()=>closedhandler()">关闭</el-button>
<!-- <el-button type="primary" @click="()=>closedhandler()"> 保存分享配置 </el-button> -->
</span>
</template>
</el-dialog>
</template>
<script setup lang="ts">
import { ApiResult } from '@/configs/axios';
import OrgService from '@/services/OrgService';
import { ref,reactive } from 'vue';
import { View,Download,EditPen,Delete } from '@element-plus/icons-vue';
import { ElMessage } from 'element-plus';
import ConfigService from '@/services/ConfigService';
const props = defineProps({
id:{
type:Number,
required:true
},
details: {
type:Object,
required:{}
}
})
const emit = defineEmits<{
(event: 'close'): void
}>()
const datas = reactive({
pdfImg: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1708337830000_43.png',
adsImg: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1708250377000_777.png',
})
const show=ref(true)
const loading = ref(true)
const HistoricalVersion = ref<any>()
const queryObj = reactive({
Title: '',
pageIndex: 1,
pageSize: 20,
pageCount: 0, //总页数
Id: props.details.Id,
TemplateType: props.details.TemplateType,
})
const dataList=ref([])
const closedhandler=()=>{
emit('close')
}
const querySearchHandler = async () => {
loading.value = true
try {
if(queryObj.pageIndex == 1) dataList.value =[]
let pageRes = await ConfigService.sellGetTripOtherPage(queryObj);
if (pageRes.data.resultCode == 1) {
dataList.value = dataList.value.concat(pageRes.data.data.pageData);
queryObj.pageCount = pageRes.data.data.pageCount;
}
loading.value = false
} catch (error) {
loading.value = false
}
}
const scrollingHandler = () =>{
if(HistoricalVersion.value && !loading.value){
let maxHeight = HistoricalVersion.value.scrollHeight - HistoricalVersion.value.offsetHeight
let scrollTop = HistoricalVersion.value.scrollTop
if((maxHeight - scrollTop==0||maxHeight - scrollTop<1) && queryObj.pageCount > queryObj.pageIndex) {
queryObj.pageIndex++
querySearchHandler()
}
}
}
querySearchHandler()
</script>
<style scoped>
.HistoricalVersion-Title{
width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: 15px;
}
.HistoricalVersion-container th{
padding: 0 10px 10px 10px;
border-bottom: 1px solid #f6f6f6;
}
.HistoricalVersion-container td{
padding: 0 10px;
}
</style>
\ No newline at end of file
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