ow
This commit is contained in:
1 parent
2b963e4bfe
commit
501c92d87c
13 files changed
+2374
-322
No files matched your search
@@ -96,7 +96,7 @@ interface BreadcrumbItem {
|
||||
const { width } = useWindowSize();
|
||||
|
||||
const showModalShare = ref<boolean>(false);
|
||||
const sharedFileRecord = ref<DmsFileUploadViewDisplayData | null>(null);
|
||||
const sharedFileRecords = ref<DmsFileUploadViewDisplayData[]>([]);
|
||||
const showModalPublishPhoto = ref<boolean>(false);
|
||||
const showModalPublishAudio = ref<boolean>(false);
|
||||
const showModalPublishVideo = ref<boolean>(false);
|
||||
@@ -487,8 +487,8 @@ const onPublishVideo = async () => {
|
||||
showModalPublishVideo.value = true;
|
||||
};
|
||||
|
||||
const onShareFamily = async (record: Record<string, any>) => {
|
||||
sharedFileRecord.value = toUploadView(record);
|
||||
const onShareFamily = async (records: DmsFileUploadViewDisplayData[]) => {
|
||||
sharedFileRecords.value = records.map((r) => toUploadView(r));
|
||||
showModalShare.value = true;
|
||||
};
|
||||
|
||||
@@ -801,18 +801,20 @@ const onReload = async () => {
|
||||
|
||||
const handleSelectShare = async () => {
|
||||
if (shareEnquiry.value) {
|
||||
if (shareEnquiry.value.keys.length > 0) {
|
||||
if (shareEnquiry.value.keys.length > 0 && sharedFileRecords.value.length > 0) {
|
||||
let fgps: FamilyGroupFolderEntity[] = [];
|
||||
let fgp: FamilyGroupFolderEntity;
|
||||
shareEnquiry.value.keys.forEach((element) => {
|
||||
fgp = new FamilyGroupFolderEntity();
|
||||
fgp.FamilyName = element.FamilyName;
|
||||
fgp.TopFolderName = element.TopFolderName;
|
||||
fgp.FolderName = sharedFileRecord.value?.FileName ?? "";
|
||||
fgp.FolderLocalName = sharedFileRecord.value?.OrgFileName ?? "";
|
||||
fgp.FilePath = element.FolderName;
|
||||
// 每个选中的目标共享目录 × 每个待共享的文件,各生成一条群组文件夹记录
|
||||
shareEnquiry.value.keys.forEach((target) => {
|
||||
sharedFileRecords.value.forEach((record) => {
|
||||
let fgp: FamilyGroupFolderEntity = new FamilyGroupFolderEntity();
|
||||
fgp.FamilyName = target.FamilyName;
|
||||
fgp.TopFolderName = target.TopFolderName;
|
||||
fgp.FolderName = record.FileName ?? "";
|
||||
fgp.FolderLocalName = record.OrgFileName ?? "";
|
||||
fgp.FilePath = target.FolderName;
|
||||
|
||||
fgps.push(fgp);
|
||||
fgps.push(fgp);
|
||||
});
|
||||
});
|
||||
|
||||
await dmsFileService.CreateFamilyGroupFolder(fgps);
|
||||
@@ -997,28 +999,26 @@ const onDownloadSelected = (items: DmsFileUploadViewDisplayData[]) => {
|
||||
};
|
||||
|
||||
const onShareSelected = (items: DmsFileUploadViewDisplayData[]) => {
|
||||
if (items.length > 0) {
|
||||
onShareFamily(items[0]);
|
||||
const files = items.filter((item) => item.IsDirectoryIndc != "Y");
|
||||
if (files.length > 0) {
|
||||
onShareFamily(files);
|
||||
}
|
||||
};
|
||||
|
||||
const onPublishSelected = (items: DmsFileUploadViewDisplayData[]) => {
|
||||
if (items.length === 0) return;
|
||||
const first = items[0];
|
||||
if (
|
||||
fileTypePolicy.isImage(first.OrderKey) ||
|
||||
fileTypePolicy.isImage(first.OrgFileName)
|
||||
) {
|
||||
const files = items.filter((item) => item.IsDirectoryIndc != "Y");
|
||||
if (files.length === 0) return;
|
||||
const first = files[0];
|
||||
const mediaKey = (item: DmsFileUploadViewDisplayData) =>
|
||||
item.OrderKey || item.OrgFileName || "";
|
||||
if (fileTypePolicy.isImage(mediaKey(first))) {
|
||||
keys.value = files.filter((item) => fileTypePolicy.isImage(mediaKey(item)));
|
||||
onPublishPhoto();
|
||||
} else if (
|
||||
fileTypePolicy.isVideo(first.OrderKey) ||
|
||||
fileTypePolicy.isVideo(first.OrgFileName)
|
||||
) {
|
||||
} else if (fileTypePolicy.isVideo(mediaKey(first))) {
|
||||
keys.value = files.filter((item) => fileTypePolicy.isVideo(mediaKey(item)));
|
||||
onPublishVideo();
|
||||
} else if (
|
||||
fileTypePolicy.isAudio(first.OrderKey) ||
|
||||
fileTypePolicy.isAudio(first.OrgFileName)
|
||||
) {
|
||||
} else if (fileTypePolicy.isAudio(mediaKey(first))) {
|
||||
keys.value = files.filter((item) => fileTypePolicy.isAudio(mediaKey(item)));
|
||||
onPublishAudio();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
@on-select-change="onSelectChange">
|
||||
<template #cardTitle="{ record }">
|
||||
{{ record.FamilyLocalName }}
|
||||
<span style="margin-left: 6px"><FolderOutlined style="margin-right: 2px" />{{ getSharePath(record) }}</span>
|
||||
<span style="margin-left: 6px"><FolderOutlined style="margin-right: 2px; color: #faad14" />{{ getSharePath(record) }}</span>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record, index }">
|
||||
<template v-if="column.dataIndex === FamilyFolderFavoriteViewEntity.TOP_FOLDER_LOCAL_NAME">
|
||||
<FolderOutlined style="margin-right: 2px" /><span>{{ getSharePath(record) }}</span>
|
||||
<FolderOutlined style="margin-right: 2px; color: #faad14" /><span>{{ getSharePath(record) }}</span>
|
||||
</template>
|
||||
</template>
|
||||
</searchCard>
|
||||
|
||||
@@ -15,6 +15,10 @@
|
||||
@on-select-change="onSelectChange"
|
||||
>
|
||||
<template #control> </template>
|
||||
<template #cardTitle="{ record }">
|
||||
{{ record.FamilyLocalName }}
|
||||
<span style="margin-left: 6px"><FolderOutlined style="margin-right: 2px; color: #faad14" />{{ record.TopFolderLocalName + (record.TopFolderLocalName != record.FolderLocalName ? " > " + record.FolderLocalName : "") }}</span>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record, index }">
|
||||
<template
|
||||
v-if="
|
||||
@@ -22,7 +26,7 @@
|
||||
FamilyFolderFavoriteViewEntity.TOP_FOLDER_LOCAL_NAME
|
||||
"
|
||||
>
|
||||
<FolderOutlined /> {{ record.TopFolderLocalName +(record.TopFolderLocalName!=record.FolderLocalName?(' > '+record.FolderLocalName):'') }}
|
||||
<FolderOutlined style="margin-right: 2px; color: #faad14" /> {{ record.TopFolderLocalName +(record.TopFolderLocalName!=record.FolderLocalName?(' > '+record.FolderLocalName):'') }}
|
||||
</template>
|
||||
</template>
|
||||
<template #footer>
|
||||
|
||||
@@ -1355,17 +1355,6 @@ const onPersonQuickCreated = (person: FamilyPersonDisplayData) => {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.page-footer {
|
||||
z-index: 999;
|
||||
padding-left: 8px;
|
||||
padding-right: 18px;
|
||||
padding-top: 8px;
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
bottom: 8px;
|
||||
border-top: 1px solid silver;
|
||||
}
|
||||
|
||||
.son-row-selected td {
|
||||
border-top: 2px solid #1677ff !important;
|
||||
border-bottom: 2px solid #1677ff !important;
|
||||
@@ -2038,13 +2027,11 @@ const onPersonQuickCreated = (person: FamilyPersonDisplayData) => {
|
||||
color: var(--fto-blue);
|
||||
}
|
||||
|
||||
/* ---------- 底部操作条:白色底 + 模糊,避免下方内容透出来 ---------- */
|
||||
/* ---------- 底部操作条:不透明白底,避免下方内容透出来 ---------- */
|
||||
.family-tree-op .page-footer {
|
||||
padding: 10px 16px;
|
||||
border-top: 1px solid var(--fto-line);
|
||||
background: rgba(255, 255, 255, 0.92);
|
||||
backdrop-filter: blur(8px);
|
||||
-webkit-backdrop-filter: blur(8px);
|
||||
background: #ffffff;
|
||||
box-shadow: 0 -8px 24px -18px rgba(15, 23, 42, 0.5);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,29 +1,15 @@
|
||||
<template>
|
||||
<div class="main-list" :style="{ height: (height - 150) + 'px' }">
|
||||
<a-row style="margin-left:-8px;margin-top:-8px;">
|
||||
<a-col :sm="24" :lg="24">
|
||||
<section class="vertical" :style='imgStyle'>
|
||||
<photo-provider>
|
||||
<photo-consumer v-for="(src, index) in images" :key="src.DetailId" :src="src.FileName">
|
||||
<img :src="src.PublishName" class="view-box">
|
||||
</photo-consumer>
|
||||
</photo-provider>
|
||||
|
||||
</section>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
<div class="main-page-footer">
|
||||
<a-pagination v-model:current="result.Page" v-model:page-size="result.Limit" :total="result.Total"
|
||||
@change="onPagination" :pageSizeOptions="pageSizeOptions"></a-pagination>
|
||||
<div class="pv-page">
|
||||
<PhotoSlidePlayer :items="slides" @close="onClose" />
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { watch, computed, inject, reactive, ref, VNode, h, unref, onMounted, onBeforeMount } from "vue";
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import PhotoSlidePlayer from "@/components/basic/PhotoSlidePlayer.vue";
|
||||
import type { PhotoSlideItem } from "@/components/basic/PhotoSlidePlayer.vue";
|
||||
import { PublishPhotoDetailEntity } from "@/data/auto/publishPhotoDetailEntity";
|
||||
import publishPhotoService from "@/service/master/publishPhotoService";
|
||||
import { useWindowSize } from '@vueuse/core'
|
||||
import { bsInfo } from "@/utils/browser"
|
||||
import { DmsFileSearchCriteria } from "@/data/auto/dmsFileSearchCriteria";
|
||||
import { SearchFilter } from "@/data/auto/searchFilter";
|
||||
@@ -34,8 +20,6 @@ import dmsFileService from "@/service/master/dmsFileService";
|
||||
import { LeftCircleOutlined, RightCircleOutlined } from '@ant-design/icons-vue';
|
||||
import { SearchCriteriaResultData } from "@/data/auto/searchCriteriaResultData";
|
||||
|
||||
const { width, height } = useWindowSize()
|
||||
|
||||
const images = ref<PublishPhotoDetailEntity[]>([]);
|
||||
|
||||
|
||||
@@ -53,14 +37,24 @@ const beforeChange = (from: number, to: number) => {
|
||||
}
|
||||
}
|
||||
|
||||
const imgStyle = computed(() => {
|
||||
if (!bsInfo.size.sm) {
|
||||
return ' object-fit: cover;width:100%; height:' + (height.value - 260) + 'px;'
|
||||
// 交给 PhotoSlidePlayer 播放:FileName 为缩略图,PublishName 为原图
|
||||
const slides = computed<PhotoSlideItem[]>(() =>
|
||||
images.value.map((item) => ({
|
||||
url: item.PublishName,
|
||||
thumb: item.FileName,
|
||||
name: (item.FileName || "").replace(/\.[^./\\]+$/, "") || undefined,
|
||||
}))
|
||||
);
|
||||
|
||||
// 收起播放器:返回来源页;没有历史时回首页
|
||||
const onClose = (() => {
|
||||
if (window.history.length > 1) {
|
||||
router.back();
|
||||
}
|
||||
else {
|
||||
return ' object-fit: cover;width:' + width.value + 'px; height:' + height.value + 'px;'
|
||||
router.push('/');
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
const pagingParams = ref<PagingParams>({ pageSize: bsInfo.size.sm ? 30 : 100, page: 1 });
|
||||
const result = ref<SearchCriteriaResultData>(new SearchCriteriaResultData());
|
||||
@@ -95,7 +89,7 @@ const findData = async (params: number) => {
|
||||
try {
|
||||
let c: DmsFileSearchCriteria = new DmsFileSearchCriteria();
|
||||
c.page = params;
|
||||
c.limit = pagingParams.value.pageSize;
|
||||
c.limit =999999;// pagingParams.value.pageSize;
|
||||
let filter: SearchFilter;
|
||||
filter = new SearchFilter();
|
||||
filter.Column = DmsFileUploadViewDisplayData.DB_FILE_PATH;
|
||||
@@ -145,46 +139,18 @@ const showSizeChange = (async (current: number, size: number) => {
|
||||
|
||||
|
||||
<style lang="less" scoped>
|
||||
.vertical {
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
/* 外层 .layout-content-view 自带 padding-top / padding-left(各 8px),
|
||||
这里用等量负外边距抵消、同时把宽高补回满格,让播放器铺满整个内容区,
|
||||
最外层不留任何间距 */
|
||||
.pv-page {
|
||||
width: calc(100% + 8px);
|
||||
height: calc(100% + 8px);
|
||||
margin: -8px 0 0 -8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.main-list {
|
||||
/* 设置高度 */
|
||||
overflow-y: auto;
|
||||
/* 显示纵向滚动条 */
|
||||
|
||||
background-color: bisque;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
padding-top: 8px;
|
||||
margin-right: 8px;
|
||||
background-image: url('/images/main/p3.png');
|
||||
background-size: cover;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.view-box {
|
||||
display: inline-block;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
margin-right: 20px;
|
||||
margin-bottom: 20px;
|
||||
cursor: pointer;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.main-page-footer {
|
||||
background-color: aliceblue;
|
||||
z-index: 999;
|
||||
padding-left: 8px;
|
||||
padding-right: 18px;
|
||||
padding-top: 8px;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
border-top: 1px solid silver;
|
||||
/* 铺满后不再需要卡片圆角,否则四个角会露出留白 */
|
||||
.pv-page :deep(.psp) {
|
||||
border-radius: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -110,5 +110,9 @@ const onClose = (() => {
|
||||
<style scoped>
|
||||
.pa-page {
|
||||
width: 100%;
|
||||
/* 外层 .layout-content-view 只有 padding-left: 8px,这里补上右侧
|
||||
同样的间距,播放器才会左右居中而不是偏右贴边 */
|
||||
padding-right: 8px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user