Commit ec8e32a1 authored by 罗超's avatar 罗超

Merge branch '1.2.0' of http://gitlab.oytour.com/viitto/pptist into 1.2.0

parents e391c61e 339a0746
......@@ -3,6 +3,13 @@ import Api,{ HttpResponse, Result } from './../utils/request';
class FolderService{
/**
* 恢复文件
*/
static async UpdateTripOtherStatus(params : any):Promise<HttpResponse>{
return Api.Post("triptemplate_UpdateTripOtherStatus",params)
}
/**
* 我的回收站
*/
......
......@@ -98,9 +98,9 @@
import { injectKeyTemplate } from "@/types/injectKey";
import { getDaysBetween } from "@/utils/common";
import { useSellTemplateStore, useScreenStore } from "@/store";
import TreeFile from "./TreeFile.vue";
import breadPeeling from "./breadPeeling.vue";
import journeyAdsList from "./journeyAdsList.vue";
import TreeFile from "./components/TreeFile.vue";
import breadPeeling from "./components/breadPeeling.vue";
import journeyAdsList from "./components/journeyAdsList.vue";
const SalesEditorStore = useSellTemplateStore();
const marketStore = useScreenStore();
......@@ -263,7 +263,7 @@
</script>
<style lang="scss" scoped>
@import url("../../../assets/styles/common.css");
@import url("@/assets/styles/common.css");
.SelectAllBox {
position: relative;
top: 3px;
......
This diff is collapsed.
......@@ -29,17 +29,6 @@
</div>
</div>
<div>
<el-dropdown v-if="datas.selectedDatas.length>0" trigger="click" class="q-px-md">
<el-button>
<el-icon><CopyDocument /></el-icon>
<span class="">批量操作</span>
</el-button>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item icon="Expand" @click="MoveFile(0)">移动至</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
<!--
<el-dropdown trigger="click">
<el-button>新建</el-button>
......@@ -137,13 +126,13 @@
import { injectKeyTemplate } from "@/types/injectKey";
import { getDaysBetween,formatDateTimeToRead } from "@/utils/common";
import { useSellTemplateStore, useScreenStore, useSlidesStore } from "@/store";
import ShareForm from "./ShareForm.vue";
import Folder from "./Folder.vue";
import HistoricalVersion from "./HistoricalVersion.vue";
import TreeFile from "./TreeFile.vue";
import breadPeeling from "./breadPeeling.vue";
import ShareForm from "./components/ShareForm.vue";
import Folder from "./components/Folder.vue";
import HistoricalVersion from "./components/HistoricalVersion.vue";
import TreeFile from "./components/TreeFile.vue";
import breadPeeling from "./components/breadPeeling.vue";
import { ApiResult } from "@/configs/axios";
import journeyAdsList from "./journeyAdsList.vue";
import journeyAdsList from "./components/journeyAdsList.vue";
const SalesEditorStore = useSellTemplateStore();
const marketStore = useScreenStore();
......@@ -172,11 +161,6 @@
journeyAds: { RefreshLoading: false } as any,
fileList: [] as any,
setFileList: [] as any,
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",
folderImg: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1708250377000_777.png",
});
const folderObj = ref<{
id: number;
......@@ -369,7 +353,7 @@
</script>
<style lang="scss" scoped>
@import url("../../../assets/styles/common.css");
@import url("@/assets/styles/common.css");
.SelectAllBox {
position: relative;
top: 3px;
......@@ -443,7 +427,7 @@
bottom: -4px;
right: 6px;
content: " ";
background: url('../../../assets/img/share.png');
background: url('@/assets/img/share.png');
width: 14px;
height: 14px;
z-index: 2;
......
......@@ -79,6 +79,7 @@
<BrowsingHistory :current-menu="currentMenu" v-if="currentMenu==0"></BrowsingHistory>
<StarTarget :current-menu="currentMenu" v-if="currentMenu==1"></StarTarget>
<journeyAds :position="position" :current-menu="currentMenu" v-if="currentMenu==3||currentMenu==4" @destroy-position="()=>position=null"></journeyAds>
<RecycleBin :current-menu="currentMenu" v-if="currentMenu==-1"></RecycleBin>
<ShareList :position="position" v-if="currentMenu==2" @destroy-position="()=>position=null"></ShareList>
</div>
</div>
......@@ -90,10 +91,11 @@ import { userStore } from '@/store/user';
import { storeToRefs } from 'pinia';
import { ref,reactive,provide,inject } from 'vue';
import SearchDocument from './components/SearchDocument.vue'
import BrowsingHistory from './components/BrowsingHistory.vue'
import StarTarget from './components/StarTarget.vue'
import BrowsingHistory from './BrowsingHistory.vue'
import StarTarget from './StarTarget.vue'
import ShareList from './Share.vue';
import journeyAds from './components/journeyAds.vue'
import journeyAds from './journeyAds.vue'
import RecycleBin from './RecycleBin.vue'
import { Plus,ArrowDown,Clock,Star,Share,Picture,Management,Delete,RefreshRight,Refresh,Loading } from '@element-plus/icons-vue';
import { injectKeyTemplate } from '@/types/injectKey'
......
<template>
<el-dialog v-model="show" v-loading="loading" :show-close="false"
:close-on-press-escape="false" :close-on-click-modal="false"
style="width: 260px;">
<template #header>
<div class="row overflow-hide">
<div>
<img v-if="details.FileType>0" class="q-px-md"
:src="details.FileType==1?datas.pdfImg:datas.adsImg"
style="height: 43px;" />
<img v-else class="q-px-md"
src="@/assets/img/file.png"
style="height: 43px;" />
</div>
<div class="q-pl-md col">
<div class="row flex-center">
<el-tooltip
placement="top-start">
<template #content><div class="text-center" style="width: 200px;">{{details.FileName}}</div></template>
<div class="TreeFile-Title pointer">{{details.FileName}}</div>
</el-tooltip>
</div>
<div class="text-small text-5B5D62 q-pt-sm">
<template v-if="details">
创建者:{{details.CreateName}}
</template>
<div v-else class="row items-center">
<div class="TreeFile-Title text-sm pointer">恢复文件</div>
</div>
</div>
</div>
</div>
</template>
<div class="TreeFile-container">
<!-- <el-input class="q-pb-md q-px-md" v-model="filterText" placeholder="关键词检索文件夹" />
<el-tree
ref="treeRef"
:data="dataList"
:props="defaultProps"
node-key="FileId"
default-expand-all
show-checkbox
check-strictly
:filter-node-method="filterNode"
@check="handleTreeNodeClick"/>-->
<el-tree-select
placeholder="请选择文件"
node-key="FileId"
:props="defaultProps"
v-model="datas.FolderId"
:data="dataList"
check-strictly
:render-after-expand="false"
style="width: 220px"
filterable
@current-change="handleTreeNodeClick"
/>
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="()=>closedhandler()">关闭</el-button>
<el-button :disabled="datas.FolderId==null" type="primary" @click="()=>save()"> 保存恢复 </el-button>
</span>
</template>
</el-dialog>
</template>
<script setup lang="ts">
import { ApiResult } from '@/configs/axios';
import OrgService from '@/services/OrgService';
import { ref,reactive,watch } from 'vue';
import { View,Download,EditPen,Delete } from '@element-plus/icons-vue';
import { ElMessage,ElTree } from 'element-plus';
import FolderService from "@/services/FolderService";
const props = defineProps({
details:{
type:Object,
required:''
},
selectedDatas:{
type: Array,
required:[]
},
setFileList:{
type: Array,
required:[]
},
fileType: {
type:Number,
required: 1
},
fileId:{
type: Number,
required: ''
}
})
const emit = defineEmits<{
(event: 'close'): void,
(event: 'success'): void
}>()
interface Tree {
[key: string]: any
}
const filterText = ref('')
const treeRef = ref<InstanceType<typeof ElTree>>()
const defaultProps = {
children: 'ChildList',
label: 'FileName',
disabled: 'disabled',
}
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',
fileList: [] as Tree[],
FolderId: null as Number,
FolderObj: {},
checkedKeys: null as any
})
const show=ref(true)
const loading = ref(true)
const deleteLoading = ref<any>(null);
const dataList=ref([])
const closedhandler=()=>{
emit('close')
}
const handleTreeNodeClick = (data:any) => {
datas.FolderObj = data
}
const filterNode = (value: string, data: Tree) => {
if (!value) return true
return data.FileName.includes(value)
}
const save = () => {
let title = ''
let Ids = ''
title = props.details.FileName
Ids = props.details.FileId
ElMessageBox.confirm(`此操作将${title}恢复到${datas.FolderObj.FileName},是否确定?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(async () => {
try {
let queryMsg = {
Ids: Ids,
Folderld: datas.FolderId,
};
deleteLoading.value = ElLoading.service({
lock: true,
text: "正在处理",
});
let pageRes = await FolderService.UpdateTripOtherStatus(queryMsg);
if (pageRes.data.resultCode == 1) {
ElMessage({
showClose: true,
message: `恢复文件成功`,
type: "success",
});
emit('close')
emit('success')
} else {
ElMessage({
showClose: true,
message: `恢复文件失败`,
type: "warning",
});
}
deleteLoading.value.close();
deleteLoading.value = null;
} catch (error) {}
})
.catch(() => {});
}
const getFile = async () => {
let querys = {
FileType: props.details.FileType
}
let pageRes = await FolderService.GetMyFolderTree(querys);
if (pageRes.data.resultCode == 1) {
dataList.value = pageRes.data.data
}
}
watch(filterText, (val) => {
treeRef.value!.filter(val)
})
getFile()
</script>
<style scoped>
.TreeFile-Title{
width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: 15px;
position: relative;
}
.TreeFile-Title.text-sm{
font-size: 12px;
}
.TreeFile-container th{
padding: 0 10px 5px 10px;
border-bottom: 1px solid #f6f6f6;
background: #fff;
position: sticky;
top: 0px;
z-index: 2;
}
.TreeFile-container td{
padding: 8px 10px;
border-bottom: 1px solid #f6f6f6;
}
.TreeFile-table {
}
</style>
\ No newline at end of file
......@@ -15,8 +15,13 @@
<div class="text-left q-pl-md">文档名称</div>
</th>
<th class="text-light" style="min-width: 150px; width: 150px">
<div class="row items-center just-center pointer" @click.stop="clickSort">
<span>最近修改 </span>
<div class="row items-center just-center pointer" @click.stop="currentMenu==-1?clickSort():''">
<span>
<template v-if="currentMenu==0">最近修改</template>
<template v-if="currentMenu==1">收藏时间</template>
<template v-if="currentMenu==3||currentMenu==4">最近修改</template>
<template v-if="currentMenu==-1">删除时间</template>
</span>
<span class="column">
<el-icon class="reactive"
style="top: 3px" :class="[queryObj.OrderByType==1?'active':'']"><CaretTop /></el-icon>
......@@ -72,8 +77,9 @@
<td class="text-center" @click.stop="item.FileType?OffEdit():editDelete(item,2)"><span>{{item.CreateName}}</span></td>
<td class="text-center">
<div class="hoverShow row items-center just-center q-pt-sm">
<el-button type="primary" :icon="Edit" size="small" @click.stop="editDelete(item)">编辑</el-button>
<el-dropdown class="q-pl-md" trigger="click">
<el-button v-if="currentMenu!=-1" type="primary" :icon="Edit" size="small" @click.stop="editDelete(item)">编辑</el-button>
<el-button v-else type="primary" icon="Position" size="small" @click.stop="recover(item)">恢复</el-button>
<el-dropdown v-if="currentMenu!=-1" class="q-pl-md" trigger="click">
<el-icon size="16" color="#b1b7cf"><MoreFilled /></el-icon>
<template #dropdown>
<el-dropdown-menu class="q-pa-md" @click.stop="OffEdit">
......@@ -140,6 +146,15 @@
<CopyFile v-if="isCopyTo"
:details="journeyAdsDetails"
@close="() => {journeyAdsDetails = '';isCopyTo=false}"></CopyFile>
<TreeFileRecover v-if="isTreeFileRecover"
:details="journeyAdsDetails"
:file-type="journeyAdsDetails.FileType"
@close="() => {journeyAdsDetails = '';isTreeFileRecover=false}"
@success="() => {
journeyAdsDetails = '';
isTreeFileRecover=false;
emit('success')}"></TreeFileRecover>
</template>
<script setup lang="ts">
import { ApiResult } from '@/configs/axios';
......@@ -158,6 +173,7 @@ import ShareForm from "./ShareForm.vue";
import Folder from "./Folder.vue";
import HistoricalVersion from "./HistoricalVersion.vue";
import TreeFile from "./TreeFile.vue";
import TreeFileRecover from "./TreeFileRecover.vue";
import breadPeeling from "./breadPeeling.vue";
import CopyFile from "./CopyFile.vue";
......@@ -230,6 +246,7 @@ import CopyFile from "./CopyFile.vue";
const isCopyTo = ref(false);
const isIndeterminate = ref(false);
const isTreeFile = ref(false)
const isTreeFileRecover = ref(false)
const Navigations = ref([] as Array<any>);
const searchData = ref({} as any);
searchData.value = inject(injectKeyTemplate);
......@@ -243,7 +260,39 @@ import CopyFile from "./CopyFile.vue";
}
emit('refreshHandler',obj)
}
// 恢复文件
const recover = async (row:any) => {
journeyAdsDetails.value = row
isTreeFileRecover.value = true
return
try {
let queryMsg = {
Ids: row.FileId
}
deleteLoading.value = ElLoading.service({
lock: true,
text: "正在处理",
});
let dataRes = await FolderService.UpdateTripOtherStatus(queryMsg);
deleteLoading.value.close();
deleteLoading.value = null;
if (dataRes.data.resultCode == 1) {
ElMessage({
showClose: true,
message: `恢复${row.FileName}成功`,
type: "success",
});
emit('refreshHandler')
}else{
ElMessage({
showClose: true,
message: `恢复${row.FileName}失败`,
type: "warning",
});
}
} catch (error) {}
}
// 收藏文件
const CollectHandler = async (row:any) => {
try {
......
......@@ -73,6 +73,7 @@
<journeyAdsList
:current-menu="currentMenu"
:position="position"
:set-file-list="datas.setFileList"
:list="dataList"
:msg="queryObj"
:navigations="Navigations"
......@@ -136,13 +137,13 @@ import FolderService from "@/services/FolderService";
import { injectKeyTemplate } from "@/types/injectKey";
import { getDaysBetween,formatDateTimeToRead } from "@/utils/common";
import { useSellTemplateStore, useScreenStore, useSlidesStore } from "@/store";
import ShareForm from "./ShareForm.vue";
import Folder from "./Folder.vue";
import HistoricalVersion from "./HistoricalVersion.vue";
import TreeFile from "./TreeFile.vue";
import breadPeeling from "./breadPeeling.vue";
import ShareForm from "./components/ShareForm.vue";
import Folder from "./components/Folder.vue";
import HistoricalVersion from "./components/HistoricalVersion.vue";
import TreeFile from "./components/TreeFile.vue";
import breadPeeling from "./components/breadPeeling.vue";
import { ApiResult } from "@/configs/axios";
import journeyAdsList from "./journeyAdsList.vue";
import journeyAdsList from "./components/journeyAdsList.vue";
const SalesEditorStore = useSellTemplateStore();
const marketStore = useScreenStore();
......@@ -171,11 +172,6 @@ const datas = reactive({
journeyAds: { RefreshLoading: false } as any,
fileList: [] as any,
setFileList: [] as any,
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",
folderImg: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1708250377000_777.png",
});
const folderObj = ref<{
id: number;
......@@ -367,7 +363,7 @@ querySearchHandler();
</script>
<style lang="scss" scoped>
@import url("../../../assets/styles/common.css");
@import url("@/assets/styles/common.css");
.SelectAllBox {
position: relative;
top: 3px;
......@@ -441,7 +437,7 @@ querySearchHandler();
bottom: -4px;
right: 6px;
content: " ";
background: url('../../../assets/img/share.png');
background: url('@/assets/img/share.png');
width: 14px;
height: 14px;
z-index: 2;
......
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