Commit 83973be2 authored by 罗超's avatar 罗超

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

parents f71ebb2e ec1962bf
...@@ -121,11 +121,20 @@ const sellHistoryTripTemplate = async (sellId:any,LogId:any) => { ...@@ -121,11 +121,20 @@ const sellHistoryTripTemplate = async (sellId:any,LogId:any) => {
lock:true lock:true
}) })
try { try {
let queryMsg = { let queryMsg
let dataRes
if(LogId){
queryMsg = {
Id: sellId,
}
dataRes = await ConfigService.sellGetTemplateDetails(queryMsg);
}else{
queryMsg = {
LogId: LogId, LogId: LogId,
FileId: sellId, FileId: sellId,
} }
let dataRes = await ConfigService.GetHistoryInfo(queryMsg); dataRes = await ConfigService.GetHistoryInfo(queryMsg);
}
if (dataRes.data.resultCode==ApiResult.SUCCESS) { if (dataRes.data.resultCode==ApiResult.SUCCESS) {
loadingObj.close() loadingObj.close()
loading.value = false loading.value = false
......
<template> <template>
<div class="q-px-md q-pt-lg"> <div class="q-px-md q-pt-lg column full-height">
<div class="q-pl-lg row q-mb-lg"> <div class="q-pl-lg row q-mb-lg">
<div class="col row items-center q-pl-md"> <div class="col row items-center q-pl-md">
<h5 class="row items-center"> <h5 class="row items-center">
...@@ -47,45 +47,19 @@ ...@@ -47,45 +47,19 @@
</el-dropdown> --> </el-dropdown> -->
</div> </div>
</div> </div>
</div> <div ref="SellTemplateRef" class="col full-width q-ml-md">
<div
ref="SellTemplateRef"
class="journeyAds-container"
style="height: 100%; overflow: auto"
>
<el-scrollbar @scroll="scrollingHandler" class="q-px-md" style="height: 100%;">
<journeyAdsList <journeyAdsList
:current-menu="currentMenu" :current-menu="currentMenu"
:position="position"
:set-file-list="datas.setFileList"
:list="dataList" :list="dataList"
:msg="queryObj" :msg="queryObj"
:navigations="Navigations"
:selected-datas="datas.selectedDatas"
@UpdateData="UpdateData" @UpdateData="UpdateData"
@success="success" @success="success"
@refreshHandler="refreshHandler"></journeyAdsList> @refreshHandler="refreshHandler"></journeyAdsList>
<div
v-if="dataList.length == 0 && !loading"
class="q-mt-lg bg-white rounded"
style="padding: 30px 10px 30px 10px"
>
<el-empty description="暂无数据" />
</div> </div>
<el-divider
class="no-bg q-mt-lg"
v-if="queryObj.pageCount == queryObj.pageIndex && !loading && queryObj.pageCount != 1"
>
<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>
</el-scrollbar>
</div> </div>
</template> </template>
......
<template> <template>
<div class="q-px-md q-pt-lg"> <div class="q-px-md q-pt-lg column full-height">
<div class="q-pl-lg row q-mb-lg"> <div class="q-pl-lg row q-mb-lg">
<div class="col row items-center q-pl-md"> <div class="col row items-center q-pl-md">
<h5 class="row items-center"> <h5 class="row items-center">
...@@ -30,13 +30,7 @@ ...@@ -30,13 +30,7 @@
</div> </div>
</div> </div>
</div> <div ref="SellTemplateRef" class="col full-width q-ml-md">
<div
ref="SellTemplateRef"
class="journeyAds-container"
style="height: 100%; overflow: auto"
>
<el-scrollbar @scroll="scrollingHandler" class="q-px-md" style="height: 100%;">
<journeyAdsList <journeyAdsList
:current-menu="currentMenu" :current-menu="currentMenu"
:position="position" :position="position"
...@@ -48,33 +42,10 @@ ...@@ -48,33 +42,10 @@
@UpdateData="UpdateData" @UpdateData="UpdateData"
@success="success" @success="success"
@refreshHandler="refreshHandler"></journeyAdsList> @refreshHandler="refreshHandler"></journeyAdsList>
<div
v-if="dataList.length == 0 && !loading"
class="q-mt-lg bg-white rounded"
style="padding: 30px 10px 30px 10px"
>
<el-empty description="暂无数据" />
</div> </div>
<el-divider
class="no-bg q-mt-lg"
v-if="queryObj.pageCount == queryObj.pageIndex && !loading && queryObj.pageCount != 1"
>
<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>
</el-scrollbar>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive, provide, watch, inject, onMounted, PropType } from "vue"; import { ref, reactive, provide, watch, inject, onMounted, PropType } from "vue";
......
...@@ -237,7 +237,7 @@ const openCopyHandler = (item:any)=>{ ...@@ -237,7 +237,7 @@ const openCopyHandler = (item:any)=>{
copyObject.value = item copyObject.value = item
} }
const sortHandler = (val:any)=>{ const sortHandler = (val:any)=>{
queryObj.OrderByType = val=='descending'?2:1 queryObj.OrderByType = val.order=='descending'?2:1
refreshHandler() refreshHandler()
} }
const setFilterNameHandler = (t:0|1)=>{ const setFilterNameHandler = (t:0|1)=>{
......
<template> <template>
<div class="q-px-md q-pt-lg"> <div class="q-px-md q-pt-lg column full-height">
<div class="q-pl-lg row q-mb-lg"> <div class="q-pl-lg row q-mb-lg">
<div class="col row items-center q-pl-md"> <div class="col row items-center q-pl-md">
<h5 class="row items-center"> <h5 class="row items-center">
...@@ -52,13 +52,7 @@ ...@@ -52,13 +52,7 @@
</el-dropdown> --> </el-dropdown> -->
</div> </div>
</div> </div>
</div> <div ref="SellTemplateRef" class="col full-width q-ml-md">
<div
ref="SellTemplateRef"
class="journeyAds-container"
style="height: 100%; overflow: auto"
>
<el-scrollbar @scroll="scrollingHandler" class="q-px-md" style="height: 100%;">
<journeyAdsList <journeyAdsList
:current-menu="currentMenu" :current-menu="currentMenu"
:position="position" :position="position"
...@@ -70,31 +64,7 @@ ...@@ -70,31 +64,7 @@
@UpdateData="UpdateData" @UpdateData="UpdateData"
@success="success" @success="success"
@refreshHandler="refreshHandler"></journeyAdsList> @refreshHandler="refreshHandler"></journeyAdsList>
<div
v-if="dataList.length == 0 && !loading"
class="q-mt-lg bg-white rounded"
style="padding: 30px 10px 30px 10px"
>
<el-empty description="暂无数据" />
</div> </div>
<el-divider
class="no-bg q-mt-lg"
v-if="queryObj.pageCount == queryObj.pageIndex && !loading && queryObj.pageCount != 1"
>
<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>
</el-scrollbar>
</div> </div>
<Folder <Folder
:folder-id="folderObj?.id" :folder-id="folderObj?.id"
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<td class="text-light text-5B5D62"><span>{{item.FileSize}}KB</span></td> <td class="text-light text-5B5D62"><span>{{item.FileSize}}KB</span></td>
<td class="text-light"> <td class="text-light">
<span :class="[item.NewTitle?'active':'text-5B5D62']"> <span :class="[item.NewTitle?'active':'text-5B5D62']">
{{item.NewTitle?item.NewTitle:item.Title}}</span> {{item.NewTitle?item.NewTitle:''}}</span>
</td> </td>
<td class="text-center"> <td class="text-center">
<span class="hoverShow"> <span class="hoverShow">
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<template #dropdown> <template #dropdown>
<el-dropdown-menu class="q-pa-md" @click.stop="OffEdit"> <el-dropdown-menu class="q-pa-md" @click.stop="OffEdit">
<el-dropdown-item icon="Promotion" @click.stop="clickControls(item,1)">另存</el-dropdown-item> <el-dropdown-item icon="Promotion" @click.stop="clickControls(item,1)">另存</el-dropdown-item>
<el-dropdown-item icon="Switch" @click.stop="clickControls(item,2)">替换</el-dropdown-item> <el-dropdown-item v-if="!item.NewTitle" icon="Switch" @click.stop="clickControls(item,2)">替换</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</template> </template>
</el-dropdown> </el-dropdown>
...@@ -126,6 +126,7 @@ import CopyFile from "./CopyFile.vue"; ...@@ -126,6 +126,7 @@ import CopyFile from "./CopyFile.vue";
const loading = ref(true) const loading = ref(true)
const HistoricalVersion = ref<any>() const HistoricalVersion = ref<any>()
const copyDataList = ref([] as Array<any>); const copyDataList = ref([] as Array<any>);
const deleteLoading = ref<any>(null);
const queryObj = reactive({ const queryObj = reactive({
pageIndex: 1, pageIndex: 1,
pageSize: 30, pageSize: 30,
...@@ -139,15 +140,62 @@ import CopyFile from "./CopyFile.vue"; ...@@ -139,15 +140,62 @@ import CopyFile from "./CopyFile.vue";
const clickControls = (row:any,type:any) => { const clickControls = (row:any,type:any) => {
if(type){ if(type){
datas.type = type
journeyAdsDetails.value = row journeyAdsDetails.value = row
if(type==1){
isCopyTo.value = true isCopyTo.value = true
datas.type = type
}else{
ElMessageBox.confirm(
`此操作将替换到当前版本,是否确定?`,
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(async () => {
try {
SaveOverlay()
} catch (error) { }
})
.catch(() => { });
}
}else { }else {
let param = query() let param = query()
const url = `${process.env.VUE_APP_SHARE_URL}/?uid=${param.uid}&sellId=${row.FileId}&LogId=${row.LogId}&ViewSlideshow=1` const url = `${process.env.VUE_APP_SHARE_URL}/?uid=${param.uid}&sellId=${row.FileId}&LogId=${row.LogId}&ViewSlideshow=1`
window.open(url); window.open(url);
} }
} }
const SaveOverlay = async () => {
let queryMsg = {
LogId: journeyAdsDetails.value.LogId,
FileId: journeyAdsDetails.value.FileId,
UpdateType: 2,
FolderId: '',
};
deleteLoading.value = ElLoading.service({
lock: true,
text: "正在处理",
});
let pageRes = await ConfigService.UpdateOtherByHistory(queryMsg);
if (pageRes.data.resultCode == ApiResult.SUCCESS) {
ElMessage({
showClose: true,
message: `替换文件${props.details.FileType ? "" : "夹"}成功`,
type: "success",
});
refreshHandler()
} else {
ElMessage({
showClose: true,
message: `替换文件${props.details.FileType ? "" : "夹"}失败`,
type: "warning",
});
}
deleteLoading.value.close();
deleteLoading.value = null;
};
const closedhandler=()=>{ const closedhandler=()=>{
emit('close') emit('close')
} }
......
<template> <template>
<div style="min-width: '700px';height: 100%;" ref="currentRootDom"> <el-table ref="currentRootDom" class="sample-table" :data="dataList" style="width: 100%" height="100%"
<table class="text-small" style="width: 100%"> @sort-change="sortHandler" :default-sort="{ prop: 'CreateTime', order: 'descending' }"
<tr @click="OffEdit"> @selection-change="handleSelectionChange">
<th class="text-left" :style="{width: currentMenu==3||currentMenu==4?'20px':'0px'}"> <el-table-column type="selection" width="20" v-if="currentMenu==3||currentMenu==4"/>
<el-checkbox v-if="currentMenu==3||currentMenu==4" <el-table-column className="indentLeft">
size="sm" <template #header>
class="SelectAllBox"
v-model="datas.selectAll"
@click="clickSelectAll"
:indeterminate="isIndeterminate"
/>
</th>
<th colspan="2" class="text-light">
<div class="row items-center"> <div class="row items-center">
<div class="text-left q-pl-md">文档名称</div> <span>文档名称</span>
<div> <el-popover :width="200" trigger="click" @before-enter="()=>filterFileNameStatus=true" @before-leave="()=>filterFileNameStatus=false">
<el-popover :width="200" trigger="click" @before-enter="()=>filterFileNameStatus=true"
@before-leave="()=>filterFileNameStatus=false">
<template #reference> <template #reference>
<el-icon size="14px" class="q-ml-md cusor-pointer"> <el-icon size="14px" class="q-ml-md cusor-pointer" :class="{'text-el-primary':queryObj.FileName}">
<ArrowDown v-if="!filterFileNameStatus"/> <ArrowDown v-if="!filterFileNameStatus"/>
<ArrowUp v-else/> <ArrowUp v-else/>
</el-icon> </el-icon>
...@@ -34,99 +25,89 @@ ...@@ -34,99 +25,89 @@
</div> </div>
</el-popover> </el-popover>
</div> </div>
</template>
<template #default="scope">
<div class="row items-center full-width" style="padding-left: 12px;">
<div :class="{'share-icon-box':scope.row.IsShare}" style="display: inline-block;">
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1708337830000_43.png" height="25" v-if="scope.row.FileType==1" @click.stop="scope.row.FileType?OffEdit():editDelete(scope.row,2)"/>
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1708250377000_777.png" height="25" v-else-if="scope.row.FileType==2" @click.stop="scope.row.FileType?OffEdit():editDelete(scope.row,2)"/>
<img src="@/assets/img/file.png" height="25" v-else @click.stop="scope.row.FileType?OffEdit():editDelete(scope.row,2)"/>
</div> </div>
</th> <div class="temp-tr col q-ml-md file-name" :class="{'cusor-pointer':scope.row.FileType==0}">
<th class="text-light" style="min-width: 150px; width: 150px"> <el-tooltip v-if="!scope.row.editTitle" effect="dark" :content="scope.row.FileName">
<div class="row items-center just-center pointer" @click.stop="currentMenu!=-1?clickSort():''"> <div @click.stop="scope.row.FileType?OffEdit():editDelete(scope.row,2)">
<span> {{ scope.row.FileName }}
<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>
<el-icon class="reactive"
style="top:-3px" :class="[queryObj.OrderByType==2?'active':'']"><CaretBottom /></el-icon>
</span>
</div>
</th>
<th class="text-light" style="min-width: 100px; width: 100px">
创建者
</th>
<th class="text-light" style="min-width: 120px; width: 120px">
操作
</th>
</tr>
<tr class="text-5B5D62 journeyAdsple-table pointer" v-for="(item,index) in dataList">
<td @click.stop="item.FileType?OffEdit():editDelete(item,2)">
<div v-if="currentMenu==3||currentMenu==4" class="row items-center hoverShow"
:style="{'opacity':item.singleChoice?1:''}">
<el-checkbox size="sm" class="SelectAllBox" v-model="item.singleChoice"
@click.stop="singleChoice(item)"/></div>
</td>
<td style="width: 30px;" @click.stop="item.FileType?OffEdit():editDelete(item,2)" valign="middle" >
<div :class="{'share-icon-box':item.IsShare}" style="display: inline-block;">
<img v-if="item.FileType" class="q-px-md " :src="item.FileType==1?datas.pdfImg:datas.adsImg" style="height: 25px;" />
<img v-else class="q-px-md" src="@/assets/img/file.png" style="height: 23px;" />
</div>
</td>
<td class="journeyAds-title wrap row">
<div class="col" v-if="!item.editTitle" @click.stop="item.FileType?OffEdit():editDelete(item,2)">
<div class="row flex-center">
<el-tooltip
placement="top-start">
<template #content><div style="max-width: 600px;">{{item.FileName}}</div></template>
<div class="journeyAds-TitleCenter">{{item.FileName}}
<span v-if="item.FileName.length>70">...</span>
</div> </div>
</el-tooltip> </el-tooltip>
</div>
</div>
<el-input <el-input
class="journeyAds-Input" class="journeyAds-Input"
v-model="item.FileName" v-model="scope.row.FileName"
autosize autosize
type="textarea" type="textarea"
placeholder="Please input" placeholder="请输入文档名称"
maxlength="500" maxlength="500"
size="small" size="small"
v-if="item.editTitle" v-if="scope.row.editTitle"
@blur="handleUpdateTitle(item)" @blur="handleUpdateTitle(scope.row)"/>
/></td> </div>
<td class="text-center" @click.stop="item.FileType?OffEdit():editDelete(item,2)"><span>{{formatDateTimeToRead(item.UpdateTime&&item.UpdateTime!=''?item.UpdateTime:item.CreateTime)}}</span></td> </div>
<td class="text-center" @click.stop="item.FileType?OffEdit():editDelete(item,2)"><span>{{item.CreateName}}</span></td> </template>
<td class="text-center"> </el-table-column>
<div class="hoverShow row items-center just-center q-pt-sm"> <el-table-column :label="datas.Title" width="150" sortable="custom" prop="">
<el-button v-if="currentMenu!=-1" type="primary" :icon="Edit" size="small" @click.stop="editDelete(item)">编辑</el-button> <template #default="scope">
<el-button v-else type="primary" icon="Position" size="small" @click.stop="recover(item)">恢复</el-button> {{ formatDateTimeToRead(scope.row.UpdateTime&&scope.row.UpdateTime!=''?scope.row.UpdateTime:scope.row.CreateTime) }}
<el-dropdown v-if="currentMenu!=-1" class="q-pl-md" trigger="click"> </template>
</el-table-column>
<el-table-column label="分享人" prop="CreateName" width="100" />
<el-table-column label="操作" width="120">
<template #default="scope">
<div class="row items-center" :class="{'hover':showItemId!=scope.row.FileId}">
<el-button v-if="currentMenu!=-1" type="primary" :icon="Edit" size="small" @click.stop="editDelete(scope.row)">编辑</el-button>
<el-button v-else type="primary" icon="Position" size="small" @click.stop="recover(scope.row)">恢复</el-button>
<el-dropdown class="q-pl-md" trigger="click" @visible-change="(val:boolean)=>dropdownChange(val,scope.row.FileId)">
<el-icon size="16" color="#b1b7cf"><MoreFilled /></el-icon> <el-icon size="16" color="#b1b7cf"><MoreFilled /></el-icon>
<template #dropdown> <template #dropdown>
<el-dropdown-menu class="q-pa-md" @click.stop="OffEdit"> <el-dropdown-menu class="q-pa-md" @click.stop="OffEdit">
<el-dropdown-item v-if="item.FileType" icon="EditPen" @click.stop="startEditTitle(item)">重命名</el-dropdown-item> <template v-if="currentMenu!=-1">
<el-dropdown-item v-if="item.FileType" icon="Clock" @click.stop="history(item)">历史版本</el-dropdown-item> <el-dropdown-item v-if="scope.row.FileType" icon="EditPen" @click.stop="startEditTitle(scope.row)">重命名</el-dropdown-item>
<el-dropdown-item icon="Position" @click.stop="()=>setFileShareHandler(item)">分享</el-dropdown-item> <el-dropdown-item v-if="scope.row.FileType" icon="Clock" @click.stop="history(scope.row)">历史版本</el-dropdown-item>
<el-dropdown-item v-if="item.IsShare" icon="Hide" @click.stop="removeShareHandler(item)">取消分享</el-dropdown-item> <el-dropdown-item icon="Position" @click.stop="()=>setFileShareHandler(scope.row)">分享</el-dropdown-item>
<el-dropdown-item v-if="currentMenu==3||currentMenu==4" icon="Expand" @click.stop="MoveFile(item)">移动至</el-dropdown-item> <el-dropdown-item v-if="scope.row.IsShare" icon="Hide" @click.stop="removeShareHandler(scope.row)">取消分享</el-dropdown-item>
<el-dropdown-item v-if="item.FileType" @click.stop="CollectHandler(item)"> <el-dropdown-item v-if="currentMenu==3||currentMenu==4" icon="Expand" @click.stop="MoveFile(scope.row)">移动至</el-dropdown-item>
<!-- :style="{color:item.IsCollect?'#FCC525':'#65676B'}" --> <el-dropdown-item v-if="scope.row.FileType" @click.stop="CollectHandler(scope.row)">
<span class="row items-center"> <span class="row items-center">
<el-icon :color="item.IsCollect?'#FCC525':'#65676B'" size="14"><Star /></el-icon> <el-icon :color="scope.row.IsCollect?'#FCC525':'#65676B'" size="14">
<span>{{item.IsCollect?'取消收藏':'收藏'}}</span> <Star /></el-icon>
<span>{{scope.row.IsCollect?'取消收藏':'收藏'}}</span>
</span> </span>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item v-if="item.FileType" icon="CopyDocument" @click.stop="CopyTo(item)">复制到</el-dropdown-item> <el-dropdown-item v-if="scope.row.FileType" icon="CopyDocument" @click.stop="CopyTo(scope.row)">复制到</el-dropdown-item>
<el-dropdown-item icon="Delete" @click="editDelete(item,1)">删除</el-dropdown-item> <el-dropdown-item icon="Delete" @click="editDelete(scope.row,1)">删除</el-dropdown-item>
</template>
<el-dropdown-item v-else icon="View" @click="viewTemplate(scope.row)">查看</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</template> </template>
</el-dropdown> </el-dropdown>
<!--
<el-button type="primary" icon="View" size="small" @click.stop="openFileDocument(scope.row)" v-if="scope.row.FileType!=0">查看</el-button>
<el-dropdown class="q-pl-md cusor-pointer" trigger="click" @visible-change="(val:boolean)=>dropdownChange(val,scope.row.FileId)">
<el-icon size="16" color="#b1b7cf"><MoreFilled /></el-icon>
<template #dropdown>
<el-dropdown-menu class="q-pa-md">
<el-dropdown-item v-if="scope.row.IsEdit && scope.row.FileType!=0" icon="EditPen" @click="editorFileHandler(scope.row)">编辑</el-dropdown-item>
<el-dropdown-item v-if="scope.row.IsDownload && scope.row.FileType!=0" icon="Download" @click="exportDocument(scope.row)">导出</el-dropdown-item>
<el-dropdown-item icon="Copy" v-if="scope.row.IsView" @click="openCopyHandler(scope.row)">复制到</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown> -->
</div> </div>
</td> </template>
</tr> </el-table-column>
</table> <template #empty>
</div> <el-empty :image-size="150" v-if="(!dataList || dataList.length==0) && !loading"
:description="(queryObj.FileId==0?'没有文档':currentMenu!=-1?'文件夹里没有文件':'没有文件')" />
</template>
</el-table>
<ShareForm <ShareForm
:id="shareId" :id="shareId"
:file-type="shareFileType" :file-type="shareFileType"
...@@ -152,17 +133,12 @@ ...@@ -152,17 +133,12 @@
<TreeFile v-if="isTreeFile" <TreeFile v-if="isTreeFile"
:details="journeyAdsDetails" :details="journeyAdsDetails"
:selected-datas="datas.selectedDatas"
:set-file-list="datas.setFileList"
:file-type="journeyAdsDetails.FileType" :file-type="journeyAdsDetails.FileType"
:file-id="queryObj.FileId" :file-id="queryObj.FileId"
@close="() => {journeyAdsDetails = '';isTreeFile=false}" @close="() => {journeyAdsDetails = '';isTreeFile=false}"
@success="() => { @success="() => {
journeyAdsDetails = ''; journeyAdsDetails = '';
isTreeFile=false; isTreeFile=false;
datas.selectAll=false;
isIndeterminate=false;
datas.selectedDatas=[];
emit('success')}"></TreeFile> emit('success')}"></TreeFile>
<CopyFile v-if="isCopyTo" <CopyFile v-if="isCopyTo"
...@@ -190,6 +166,7 @@ import FolderService from "@/services/FolderService"; ...@@ -190,6 +166,7 @@ import FolderService from "@/services/FolderService";
import { injectKeyTemplate } from "@/types/injectKey"; import { injectKeyTemplate } from "@/types/injectKey";
import { getDaysBetween,formatDateTimeToRead } from "@/utils/common"; import { getDaysBetween,formatDateTimeToRead } from "@/utils/common";
import { useSellTemplateStore, useScreenStore, useSlidesStore } from "@/store"; import { useSellTemplateStore, useScreenStore, useSlidesStore } from "@/store";
import { isPC, query } from '@/utils/common'
import ShareForm from "./ShareForm.vue"; import ShareForm from "./ShareForm.vue";
import Folder from "./Folder.vue"; import Folder from "./Folder.vue";
...@@ -220,10 +197,6 @@ import CopyFile from "./CopyFile.vue"; ...@@ -220,10 +197,6 @@ import CopyFile from "./CopyFile.vue";
type:Array, type:Array,
required:[] required:[]
}, },
selectedDatas:{
type:Array,
required:[]
},
navigations:{ navigations:{
type:Array, type:Array,
required:[] required:[]
...@@ -242,7 +215,7 @@ import CopyFile from "./CopyFile.vue"; ...@@ -242,7 +215,7 @@ import CopyFile from "./CopyFile.vue";
type: number; type: number;
}>({ id: -1, name: "", parentId: 0, number: 1 }); }>({ id: -1, name: "", parentId: 0, number: 1 });
const datas = reactive({ const datas = reactive({
selectedDatas: [] as Array, Title: '',
selectAll: false as any, selectAll: false as any,
journeyAds: { RefreshLoading: false } as any, journeyAds: { RefreshLoading: false } as any,
fileList: [] as any, fileList: [] as any,
...@@ -277,7 +250,26 @@ import CopyFile from "./CopyFile.vue"; ...@@ -277,7 +250,26 @@ import CopyFile from "./CopyFile.vue";
const editObj = reactive({}); const editObj = reactive({});
const filterFileNameStatus = ref(false) const filterFileNameStatus = ref(false)
const currentRootDom = ref() const currentRootDom = ref()
const showItemId = ref(0)
if(props.currentMenu==0)datas.Title = '最近浏览'
else if(props.currentMenu==1) datas.Title = '收藏时间'
else if(props.currentMenu==3||props.currentMenu==4) datas.Title = '最近修改'
else if(props.currentMenu==-1) datas.Title = '删除时间'
const viewTemplate = (row:any) => {
let param = query()
const url = `${process.env.VUE_APP_SHARE_URL}/?uid=${param.uid}&sellId=${row.FileId}&LogId=0&ViewSlideshow=1`
window.open(url);
}
const handleSelectionChange = (val: []) =>{
let obj = {
selectedDatas: val.map(x=>{return x.FileId}),
}
emit('UpdateData',obj)
}
const dropdownChange = (val:boolean,id:number) => {
showItemId.value = val?id:0
}
const setFilterNameHandler = (t:0|1)=>{ const setFilterNameHandler = (t:0|1)=>{
filterFileNameStatus.value = false filterFileNameStatus.value = false
if(!t) queryObj.FileName='' if(!t) queryObj.FileName=''
...@@ -293,6 +285,13 @@ import CopyFile from "./CopyFile.vue"; ...@@ -293,6 +285,13 @@ import CopyFile from "./CopyFile.vue";
} }
emit('refreshHandler',obj) emit('refreshHandler',obj)
} }
const sortHandler = (val:any)=>{
queryObj.value.OrderByType = val.order=='descending'?2:1
let obj = {
OrderByType: queryObj.value.OrderByType
}
emit('refreshHandler',obj)
}
// 恢复文件 // 恢复文件
const recover = async (row:any) => { const recover = async (row:any) => {
journeyAdsDetails.value = row journeyAdsDetails.value = row
...@@ -444,61 +443,7 @@ import CopyFile from "./CopyFile.vue"; ...@@ -444,61 +443,7 @@ import CopyFile from "./CopyFile.vue";
removeShareLoading.value.close(); removeShareLoading.value.close();
removeShareLoading.value = null; removeShareLoading.value = null;
} }
// 全选按钮
const clickSelectAll = () => {
setTimeout(() => {
for (let i = 0; i < dataList.value.length; i++) {
if (datas.selectAll == true) {
datas.selectedDatas.push(dataList.value[i].FileId)
dataList.value[i].singleChoice = true;
}
else {
datas.selectedDatas = [];
isIndeterminate.value = false;
dataList.value[i].singleChoice = false;
}
}
let obj = {
selectedDatas: datas.selectedDatas,
}
emit('UpdateData',obj)
}, 100);
};
const singleChoice = (row: any) => {
isIndeterminate.value = false;
if (!row.singleChoice) {
datas.selectedDatas.push(row.FileId);
} else {
let index;
for (let i = 0; i < datas.selectedDatas.length; i++) {
if (datas.selectedDatas[i] == row.FileId) index = i;
}
datas.selectedDatas.splice(index, 1);
if(datas.selectedDatas.length>0) isIndeterminate.value = true;
}
getSelectBox()
let obj = {
selectedDatas: datas.selectedDatas,
list: dataList.value,
}
emit('UpdateData',obj)
};
const getSelectBox = () => {
isIndeterminate.value = false;
let checkedCount = datas.selectedDatas.length;
let datasList = dataList.value.length;
if (checkedCount > 0 && datasList == checkedCount) {
datas.selectAll = true
};
if (checkedCount > 0&& (datasList > checkedCount||datasList < checkedCount)) {
datas.selectAll = ""
isIndeterminate.value = true;
}
if (checkedCount == 0) {
datas.selectAll = ""
isIndeterminate.value = false;
};
}
const DeleteFile = async (item: any) => { const DeleteFile = async (item: any) => {
ElMessageBox.confirm("此操作将删除该文件夹及其下的文件,是否确定?", "提示", { ElMessageBox.confirm("此操作将删除该文件夹及其下的文件,是否确定?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
...@@ -651,47 +596,16 @@ import CopyFile from "./CopyFile.vue"; ...@@ -651,47 +596,16 @@ import CopyFile from "./CopyFile.vue";
if (props.list) { if (props.list) {
nextTick(() => { nextTick(() => {
dataList.value = props.list dataList.value = props.list
datas.selectAll = false
isIndeterminate.value = false
datas.selectedDatas = []
}) })
} }
}) })
watch(() => props.navigations, (n,o) => { watch(() => props.navigations, (n,o) => {
Navigations.value = n Navigations.value = n
for (let index = 0; index < dataList.value.length; index++) {
const element = dataList.value[index];
element.singleChoice = false
}
datas.selectAll = false
datas.selectedDatas = []
isIndeterminate.value = false
let obj = {
selectedDatas: datas.selectedDatas,
}
emit('UpdateData',obj)
}) })
</script> </script>
<style lang="scss" scoped> <style>
.journeyAds-title {
}
.journeyAds-TitleCenter {
width: 100%;
height: 18px;
margin-bottom: 3px;
overflow: hidden; /* 隐藏超出部分 */
text-overflow: ellipsis; /* 显示省略号 */
white-space: wrap; /* 不换行 */
position: relative;
padding-right: 20px;
}
.journeyAds-TitleCenter span {
position: absolute;
right: 16px;
top: 0px;
}
.journeyAds-Input { .journeyAds-Input {
padding-right: 20px; padding-right: 20px;
position: relative; position: relative;
...@@ -701,45 +615,63 @@ import CopyFile from "./CopyFile.vue"; ...@@ -701,45 +615,63 @@ import CopyFile from "./CopyFile.vue";
background: #f5f5f5; background: #f5f5f5;
} }
} }
.journeyAds-container { .sample-table{
position: relative; font-size: 12px !important;
overflow: auto; font-family: microsoft yahei !important;
} }
.journeyAds-container th { .sample-table .el-table-column--selection{
background: #fff; border: none !important;
position: sticky; }
top: 0px; .sample-table .el-table-column--selection .cell{
z-index: 2; padding: 0 !important;
padding-right: 5px !important;
padding-left: 5px !important;
} }
.journeyAdsple-table td > div { .sample-table th .cell{
display: flex; font-weight: normal !important;
} }
.journeyAdsple-table td { .sample-table td, .sample-table th {
border-bottom: 1px solid #f6f6f6; border-bottom: 1px solid #f6f6f6 !important;
} }
.journeyAds-container th { .sample-table td{
border-bottom: 1px solid #f6f6f6; /* color:#000; */
color: #A8ABB2;
} }
.journeyAds-container th:first-child { .sample-table tr td .el-checkbox,
border: 0; .sample-table tr td .hover{
visibility: hidden !important;
} }
.journeyAdsple-table td:first-child, .sample-table tr:hover td .el-checkbox,
.journeyAdsple-table td:nth-child(2) { .sample-table tr td .is-checked,
border: 0; .sample-table tr:hover td .hover{
visibility: visible !important;
} }
.journeyAdsple-table td { .sample-table .indentLeft{
padding-bottom: 6px; border:none !important;
padding: 0 !important;
} }
.journeyAdsple-table td:nth-child(2) { .sample-table .indentLeft .cell{
padding-bottom: 0; padding: 0 !important;
} }
.hoverShow { .sample-table .temp-tr,
opacity: 0; .sample-table th.indentLeft{
border-bottom: 1px solid #f6f6f6 !important;
padding: 8px 0 !important;
} }
.journeyAdsple-table:hover .hoverShow { .sample-table th.indentLeft .cell{
opacity: 1; padding: 0 12px !important;
} }
.sample-table .file-name{
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
width: 0;
}
.el-table .caret-wrapper{
height: 12px !important;
}
/* .sample-table th:nth-child(2) .cell{
padding-left: 0 !important;
} */
.share-icon-box{ .share-icon-box{
position: relative; position: relative;
} }
...@@ -747,15 +679,11 @@ import CopyFile from "./CopyFile.vue"; ...@@ -747,15 +679,11 @@ import CopyFile from "./CopyFile.vue";
display: block; display: block;
position: absolute; position: absolute;
bottom: -4px; bottom: -4px;
right: 6px; right: 0px;
content: " "; content: " ";
background: url('../../../assets/img/share.png'); background: url('@/assets/img/share.png');
width: 14px; width: 14px;
height: 14px; height: 14px;
z-index: 2; z-index: 2;
} }
.active {
color: $themeColor;
}
</style> </style>
\ No newline at end of file
<template> <template>
<div class="q-px-md q-pt-lg"> <div class="q-px-md q-pt-lg column full-height">
<div class="q-pl-lg row q-mb-lg"> <div class="q-pl-lg row q-mb-lg">
<div class="col row items-center q-pl-md"> <div class="col row items-center q-pl-md">
<h5 class="row items-center"> <h5 class="row items-center">
...@@ -63,13 +63,14 @@ ...@@ -63,13 +63,14 @@
</el-dropdown> </el-dropdown>
</div> </div>
</div> </div>
</div> <!--
<div <div
ref="SellTemplateRef" ref="SellTemplateRef"
class="journeyAds-container" class="journeyAds-container" v-if="false">
style="height: 100%; overflow: auto"
>
<el-scrollbar @scroll="scrollingHandler" class="q-px-md" style="height: 100%;"> <el-scrollbar @scroll="scrollingHandler" class="q-px-md" style="height: 100%;">
</el-scrollbar>
</div> -->
<div ref="SellTemplateRef" class="col full-width q-ml-md">
<journeyAdsList <journeyAdsList
:current-menu="currentMenu" :current-menu="currentMenu"
:position="position" :position="position"
...@@ -81,32 +82,9 @@ ...@@ -81,32 +82,9 @@
@UpdateData="UpdateData" @UpdateData="UpdateData"
@success="success" @success="success"
@refreshHandler="refreshHandler"></journeyAdsList> @refreshHandler="refreshHandler"></journeyAdsList>
<div
v-if="dataList.length == 0 && !loading"
class="q-mt-lg bg-white rounded"
style="padding: 30px 10px 30px 10px"
>
<el-empty description="暂无数据" />
</div> </div>
<el-divider
class="no-bg q-mt-lg"
v-if="queryObj.pageCount == queryObj.pageIndex && !loading && queryObj.pageCount != 1"
>
<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>
</el-scrollbar>
</div> </div>
<Folder <Folder
:folder-id="folderObj?.id" :folder-id="folderObj?.id"
:folder-name="folderObj?.name" :folder-name="folderObj?.name"
...@@ -364,86 +342,5 @@ querySearchHandler(); ...@@ -364,86 +342,5 @@ querySearchHandler();
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import url("@/assets/styles/common.css");
.SelectAllBox {
position: relative;
top: 3px;
}
.journeyAds-title {
}
.journeyAds-TitleCenter {
width: 100%;
height: 18px;
margin-bottom: 3px;
overflow: hidden; /* 隐藏超出部分 */
text-overflow: ellipsis; /* 显示省略号 */
white-space: wrap; /* 不换行 */
position: relative;
padding-right: 20px;
}
.journeyAds-TitleCenter span {
position: absolute;
right: 16px;
top: 0px;
}
.journeyAds-Input {
padding-right: 20px;
position: relative;
margin-bottom: 2px;
::v-deep(.el-textarea__inner) {
padding: 5px;
background: #f5f5f5;
}
}
.journeyAds-container {
position: relative;
overflow: auto;
}
.journeyAds-container th {
background: #fff;
position: sticky;
top: 0px;
z-index: 2;
}
.journeyAdsple-table td > div {
display: flex;
}
.journeyAdsple-table td,
.journeyAds-container th {
border-bottom: 1px solid #f6f6f6;
}
.journeyAdsple-table td:first-child,
.journeyAdsple-table td:nth-child(2),
.journeyAds-container th:first-child {
border: 0;
}
.journeyAdsple-table td {
padding-bottom: 6px;
}
.journeyAdsple-table td:nth-child(2) {
padding-bottom: 0;
}
.hoverShow {
opacity: 0;
}
.journeyAdsple-table:hover .hoverShow {
opacity: 1;
}
.share-icon-box{
position: relative;
}
.share-icon-box::after{
display: block;
position: absolute;
bottom: -4px;
right: 6px;
content: " ";
background: url('@/assets/img/share.png');
width: 14px;
height: 14px;
z-index: 2;
}
.active {
color: $themeColor;
}
</style> </style>
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