ow
This commit is contained in:
1 parent
adcf94df4a
commit
428c94951b
9 files changed
+622
-263
No files matched your search
@@ -822,114 +822,186 @@ const onReload = async () => {
|
||||
};
|
||||
|
||||
const handleSelectShare = async () => {
|
||||
if (shareEnquiry.value) {
|
||||
if (shareEnquiry.value.keys.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;
|
||||
// 没选目标共享目录时直接提示,不发请求
|
||||
if (!shareEnquiry.value) return;
|
||||
if (shareEnquiry.value.keys.length === 0) {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "请选择一条记录",
|
||||
placement: "topRight",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
fgps.push(fgp);
|
||||
});
|
||||
try {
|
||||
loading.value = true;
|
||||
spinTip.value = "共享中...";
|
||||
|
||||
await dmsFileService.CreateFamilyGroupFolder(fgps);
|
||||
showModalShare.value = false;
|
||||
} else {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "请选择一条记录",
|
||||
placement: "topRight",
|
||||
});
|
||||
}
|
||||
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;
|
||||
|
||||
fgps.push(fgp);
|
||||
});
|
||||
|
||||
// 先关弹窗再发请求:遮罩盖在弹窗上会看不清,关掉后 loading 效果更明显。
|
||||
// fgps 必须在关闭前组装好,弹窗销毁后就取不到选中的目标目录了
|
||||
showModalShare.value = false;
|
||||
|
||||
await dmsFileService.CreateFamilyGroupFolder(fgps);
|
||||
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "共享成功",
|
||||
placement: "topRight",
|
||||
});
|
||||
} catch (error) {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "共享失败",
|
||||
placement: "topRight",
|
||||
});
|
||||
} finally {
|
||||
loading.value = false;
|
||||
spinTip.value = "加载中...";
|
||||
}
|
||||
};
|
||||
|
||||
const handleSelectPublishPhoto = async () => {
|
||||
if (publishPhotoEnquiry.value) {
|
||||
if (publishPhotoEnquiry.value.keys.length > 0) {
|
||||
let data: PublishData;
|
||||
for (let i = 0; i < keys.value.length; i++) {
|
||||
data = new PublishData();
|
||||
data.FileId = keys.value[i].FileId;
|
||||
data.PublishName = publishPhotoEnquiry.value.keys[0].PublishName;
|
||||
try {
|
||||
loading.value = true;
|
||||
if (publishPhotoEnquiry.value) {
|
||||
if (publishPhotoEnquiry.value.keys.length > 0) {
|
||||
// 先把选中的专辑名取出来:关掉弹窗后组件可能被销毁,就取不到了
|
||||
const publishName = publishPhotoEnquiry.value.keys[0].PublishName;
|
||||
// 先关弹窗再发请求,遮罩才看得清
|
||||
showModalPublishPhoto.value = false;
|
||||
|
||||
await publishPhotoService.InsertPublishPhotoDetail(data);
|
||||
let data: PublishData;
|
||||
for (let i = 0; i < keys.value.length; i++) {
|
||||
data = new PublishData();
|
||||
data.FileId = keys.value[i].FileId;
|
||||
data.PublishName = publishName;
|
||||
|
||||
await publishPhotoService.InsertPublishPhotoDetail(data);
|
||||
}
|
||||
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "作品发布成功",
|
||||
placement: "topRight",
|
||||
});
|
||||
} else {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "请选择一条记录",
|
||||
placement: "topRight",
|
||||
});
|
||||
}
|
||||
showModalPublishPhoto.value = false;
|
||||
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "作品发布成功",
|
||||
placement: "topRight",
|
||||
});
|
||||
} else {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "请选择一条记录",
|
||||
placement: "topRight",
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "作品发布失败",
|
||||
placement: "topRight",
|
||||
});
|
||||
} finally {
|
||||
loading.value = false;
|
||||
spinTip.value = "加载中...";
|
||||
}
|
||||
};
|
||||
|
||||
const handleSelectPublishAudio = async () => {
|
||||
if (publishAudioEnquiry.value) {
|
||||
if (publishAudioEnquiry.value.keys.length > 0) {
|
||||
let data: PublishData;
|
||||
for (let i = 0; i < keys.value.length; i++) {
|
||||
data = new PublishData();
|
||||
data.FileId = keys.value[i].FileId;
|
||||
data.PublishName = publishAudioEnquiry.value.keys[0].PublishName;
|
||||
try {
|
||||
loading.value = true;
|
||||
if (publishAudioEnquiry.value) {
|
||||
if (publishAudioEnquiry.value.keys.length > 0) {
|
||||
// 先把选中的专辑名取出来:关掉弹窗后组件可能被销毁,就取不到了
|
||||
const publishName = publishAudioEnquiry.value.keys[0].PublishName;
|
||||
// 先关弹窗再发请求,遮罩才看得清
|
||||
showModalPublishAudio.value = false;
|
||||
|
||||
await publishAudioService.InsertPublishAudioDetail(data);
|
||||
let data: PublishData;
|
||||
for (let i = 0; i < keys.value.length; i++) {
|
||||
data = new PublishData();
|
||||
data.FileId = keys.value[i].FileId;
|
||||
data.PublishName = publishName;
|
||||
|
||||
await publishAudioService.InsertPublishAudioDetail(data);
|
||||
}
|
||||
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "专辑发布成功",
|
||||
placement: "topRight",
|
||||
});
|
||||
} else {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "请选择一条记录",
|
||||
placement: "topRight",
|
||||
});
|
||||
}
|
||||
showModalPublishAudio.value = false;
|
||||
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "专辑发布成功",
|
||||
placement: "topRight",
|
||||
});
|
||||
} else {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "请选择一条记录",
|
||||
placement: "topRight",
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "专辑发布失败",
|
||||
placement: "topRight",
|
||||
});
|
||||
} finally {
|
||||
loading.value = false;
|
||||
spinTip.value = "加载中...";
|
||||
}
|
||||
};
|
||||
|
||||
const handleSelectPublishVideo = async () => {
|
||||
if (publishVideoEnquiry.value) {
|
||||
if (publishVideoEnquiry.value.keys.length > 0) {
|
||||
let data: PublishData;
|
||||
for (let i = 0; i < keys.value.length; i++) {
|
||||
data = new PublishData();
|
||||
data.FileId = keys.value[i].FileId;
|
||||
data.PublishName = publishVideoEnquiry.value.keys[0].PublishName;
|
||||
try {
|
||||
loading.value = true;
|
||||
if (publishVideoEnquiry.value) {
|
||||
if (publishVideoEnquiry.value.keys.length > 0) {
|
||||
// 先把选中的专辑名取出来:关掉弹窗后组件可能被销毁,就取不到了
|
||||
const publishName = publishVideoEnquiry.value.keys[0].PublishName;
|
||||
// 先关弹窗再发请求,遮罩才看得清
|
||||
showModalPublishVideo.value = false;
|
||||
|
||||
await publishVideoService.InsertPublishVideoDetail(data);
|
||||
let data: PublishData;
|
||||
for (let i = 0; i < keys.value.length; i++) {
|
||||
data = new PublishData();
|
||||
data.FileId = keys.value[i].FileId;
|
||||
data.PublishName = publishName;
|
||||
|
||||
await publishVideoService.InsertPublishVideoDetail(data);
|
||||
}
|
||||
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "专辑发布成功",
|
||||
placement: "topRight",
|
||||
});
|
||||
} else {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "请选择一条记录",
|
||||
placement: "topRight",
|
||||
});
|
||||
}
|
||||
showModalPublishVideo.value = false;
|
||||
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "专辑发布成功",
|
||||
placement: "topRight",
|
||||
});
|
||||
} else {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "请选择一条记录",
|
||||
placement: "topRight",
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "专辑发布失败",
|
||||
placement: "topRight",
|
||||
});
|
||||
} finally {
|
||||
loading.value = false;
|
||||
spinTip.value = "加载中...";
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1022,9 +1094,16 @@ const onDownloadSelected = async (
|
||||
};
|
||||
|
||||
const onShareSelected = (items: DmsFileUploadDeleteLogViewDisplayData[]) => {
|
||||
if (items.length > 0) {
|
||||
onShareFamily(items[0]);
|
||||
// 没选中文件时原来什么都不发生,这里给个提示
|
||||
if (items.length === 0) {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "请选择要共享的文件",
|
||||
placement: "topRight",
|
||||
});
|
||||
return;
|
||||
}
|
||||
onShareFamily(items[0]);
|
||||
};
|
||||
|
||||
const onPublishSelected = (items: DmsFileUploadDeleteLogViewDisplayData[]) => {
|
||||
|
||||
@@ -843,7 +843,11 @@ const onDelete = async () => {
|
||||
placement: "topRight",
|
||||
});
|
||||
} catch (error) {
|
||||
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "记录删除失败",
|
||||
placement: "topRight",
|
||||
});
|
||||
}
|
||||
finally {
|
||||
loading.value = false;
|
||||
@@ -988,32 +992,56 @@ const onReload = async () => {
|
||||
};
|
||||
|
||||
const handleSelectShare = async () => {
|
||||
if (shareEnquiry.value) {
|
||||
if (shareEnquiry.value.keys.length > 0 && sharedFileRecords.value.length > 0) {
|
||||
let fgps: FamilyGroupFolderEntity[] = [];
|
||||
// 每个选中的目标共享目录 × 每个待共享的文件,各生成一条群组文件夹记录
|
||||
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;
|
||||
// 没选目标共享目录 / 没有待共享文件时直接提示,不发请求
|
||||
if (!shareEnquiry.value) return;
|
||||
if (shareEnquiry.value.keys.length === 0 || sharedFileRecords.value.length === 0) {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "请选择一条记录",
|
||||
placement: "topRight",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
fgps.push(fgp);
|
||||
});
|
||||
});
|
||||
try {
|
||||
loading.value = true;
|
||||
spinTip.value = "共享中...";
|
||||
|
||||
await dmsFileService.CreateFamilyGroupFolder(fgps);
|
||||
showModalShare.value = false;
|
||||
} else {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "请选择一条记录",
|
||||
placement: "topRight",
|
||||
let fgps: FamilyGroupFolderEntity[] = [];
|
||||
// 每个选中的目标共享目录 × 每个待共享的文件,各生成一条群组文件夹记录
|
||||
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);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// 先关弹窗再发请求:遮罩盖在弹窗上会看不清,关掉后 loading 效果更明显。
|
||||
// 注意 fgps 必须在关闭前组装好,弹窗销毁后就取不到选中的目标目录了
|
||||
showModalShare.value = false;
|
||||
|
||||
await dmsFileService.CreateFamilyGroupFolder(fgps);
|
||||
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "共享成功",
|
||||
placement: "topRight",
|
||||
});
|
||||
} catch (error) {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "共享失败",
|
||||
placement: "topRight",
|
||||
});
|
||||
} finally {
|
||||
loading.value = false;
|
||||
spinTip.value = "加载中...";
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1022,15 +1050,19 @@ const handleSelectPublishPhoto = async () => {
|
||||
loading.value = true;
|
||||
if (publishPhotoEnquiry.value) {
|
||||
if (publishPhotoEnquiry.value.keys.length > 0) {
|
||||
// 先把选中的专辑名取出来:关掉弹窗后组件可能被销毁,就取不到了
|
||||
const publishName = publishPhotoEnquiry.value.keys[0].PublishName;
|
||||
// 先关弹窗再发请求,遮罩才看得清
|
||||
showModalPublishPhoto.value = false;
|
||||
|
||||
let data: PublishData;
|
||||
for (let i = 0; i < keys.value.length; i++) {
|
||||
data = new PublishData();
|
||||
data.FileId = keys.value[i].FileId;
|
||||
data.PublishName = publishPhotoEnquiry.value.keys[0].PublishName;
|
||||
data.PublishName = publishName;
|
||||
|
||||
await publishPhotoService.InsertPublishPhotoDetail(data);
|
||||
}
|
||||
showModalPublishPhoto.value = false;
|
||||
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
@@ -1046,7 +1078,11 @@ const handleSelectPublishPhoto = async () => {
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "作品发布失败",
|
||||
placement: "topRight",
|
||||
});
|
||||
}
|
||||
finally {
|
||||
loading.value = false;
|
||||
@@ -1059,15 +1095,19 @@ const handleSelectPublishAudio = async () => {
|
||||
loading.value = true;
|
||||
if (publishAudioEnquiry.value) {
|
||||
if (publishAudioEnquiry.value.keys.length > 0) {
|
||||
// 先把选中的专辑名取出来:关掉弹窗后组件可能被销毁,就取不到了
|
||||
const publishName = publishAudioEnquiry.value.keys[0].PublishName;
|
||||
// 先关弹窗再发请求,遮罩才看得清
|
||||
showModalPublishAudio.value = false;
|
||||
|
||||
let data: PublishData;
|
||||
for (let i = 0; i < keys.value.length; i++) {
|
||||
data = new PublishData();
|
||||
data.FileId = keys.value[i].FileId;
|
||||
data.PublishName = publishAudioEnquiry.value.keys[0].PublishName;
|
||||
data.PublishName = publishName;
|
||||
|
||||
await publishAudioService.InsertPublishAudioDetail(data);
|
||||
}
|
||||
showModalPublishAudio.value = false;
|
||||
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
@@ -1083,7 +1123,11 @@ const handleSelectPublishAudio = async () => {
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "专辑发布失败",
|
||||
placement: "topRight",
|
||||
});
|
||||
}
|
||||
finally {
|
||||
loading.value = false;
|
||||
@@ -1097,15 +1141,19 @@ const handleSelectPublishVideo = async () => {
|
||||
|
||||
if (publishVideoEnquiry.value) {
|
||||
if (publishVideoEnquiry.value.keys.length > 0) {
|
||||
// 先把选中的专辑名取出来:关掉弹窗后组件可能被销毁,就取不到了
|
||||
const publishName = publishVideoEnquiry.value.keys[0].PublishName;
|
||||
// 先关弹窗再发请求,遮罩才看得清
|
||||
showModalPublishVideo.value = false;
|
||||
|
||||
let data: PublishData;
|
||||
for (let i = 0; i < keys.value.length; i++) {
|
||||
data = new PublishData();
|
||||
data.FileId = keys.value[i].FileId;
|
||||
data.PublishName = publishVideoEnquiry.value.keys[0].PublishName;
|
||||
data.PublishName = publishName;
|
||||
|
||||
await publishVideoService.InsertPublishVideoDetail(data);
|
||||
}
|
||||
showModalPublishVideo.value = false;
|
||||
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
@@ -1121,7 +1169,11 @@ const handleSelectPublishVideo = async () => {
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "专辑发布失败",
|
||||
placement: "topRight",
|
||||
});
|
||||
}
|
||||
finally {
|
||||
loading.value = false;
|
||||
@@ -1216,9 +1268,16 @@ const onDownloadSelected = async (items: DmsFileUploadViewDisplayData[]) => {
|
||||
|
||||
const onShareSelected = (items: DmsFileUploadViewDisplayData[]) => {
|
||||
const files = items.filter((item) => item.IsDirectoryIndc != "Y");
|
||||
if (files.length > 0) {
|
||||
onShareFamily(files);
|
||||
// 只选中目录时原来什么都不发生,这里给个提示
|
||||
if (files.length === 0) {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "请选择要共享的文件",
|
||||
placement: "topRight",
|
||||
});
|
||||
return;
|
||||
}
|
||||
onShareFamily(files);
|
||||
};
|
||||
|
||||
const onPublishSelected = async (items: DmsFileUploadViewDisplayData[]) => {
|
||||
@@ -1240,11 +1299,14 @@ const onPublishSelected = async (items: DmsFileUploadViewDisplayData[]) => {
|
||||
await onPublishAudio();
|
||||
}
|
||||
} catch (error) {
|
||||
loading.value = false;
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "打开发布窗口失败",
|
||||
placement: "topRight",
|
||||
});
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
const onViewPreviewSelected = (items: DmsFileUploadViewDisplayData[]) => {
|
||||
|
||||
@@ -922,114 +922,186 @@ const onReload = async () => {
|
||||
};
|
||||
|
||||
const handleSelectShare = async () => {
|
||||
if (shareEnquiry.value) {
|
||||
if (shareEnquiry.value.keys.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;
|
||||
// 没选目标共享目录时直接提示,不发请求
|
||||
if (!shareEnquiry.value) return;
|
||||
if (shareEnquiry.value.keys.length === 0) {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "请选择一条记录",
|
||||
placement: "topRight",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
fgps.push(fgp);
|
||||
});
|
||||
try {
|
||||
loading.value = true;
|
||||
spinTip.value = "共享中...";
|
||||
|
||||
await dmsFileService.CreateFamilyGroupFolder(fgps);
|
||||
showModalShare.value = false;
|
||||
} else {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "请选择一条记录",
|
||||
placement: "topRight",
|
||||
});
|
||||
}
|
||||
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;
|
||||
|
||||
fgps.push(fgp);
|
||||
});
|
||||
|
||||
// 先关弹窗再发请求:遮罩盖在弹窗上会看不清,关掉后 loading 效果更明显。
|
||||
// fgps 必须在关闭前组装好,弹窗销毁后就取不到选中的目标目录了
|
||||
showModalShare.value = false;
|
||||
|
||||
await dmsFileService.CreateFamilyGroupFolder(fgps);
|
||||
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "共享成功",
|
||||
placement: "topRight",
|
||||
});
|
||||
} catch (error) {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "共享失败",
|
||||
placement: "topRight",
|
||||
});
|
||||
} finally {
|
||||
loading.value = false;
|
||||
spinTip.value = "加载中...";
|
||||
}
|
||||
};
|
||||
|
||||
const handleSelectPublishPhoto = async () => {
|
||||
if (publishPhotoEnquiry.value) {
|
||||
if (publishPhotoEnquiry.value.keys.length > 0) {
|
||||
let data: PublishData;
|
||||
for (let i = 0; i < keys.value.length; i++) {
|
||||
data = new PublishData();
|
||||
data.FileId = keys.value[i].FileId;
|
||||
data.PublishName = publishPhotoEnquiry.value.keys[0].PublishName;
|
||||
try {
|
||||
loading.value = true;
|
||||
if (publishPhotoEnquiry.value) {
|
||||
if (publishPhotoEnquiry.value.keys.length > 0) {
|
||||
// 先把选中的专辑名取出来:关掉弹窗后组件可能被销毁,就取不到了
|
||||
const publishName = publishPhotoEnquiry.value.keys[0].PublishName;
|
||||
// 先关弹窗再发请求,遮罩才看得清
|
||||
showModalPublishPhoto.value = false;
|
||||
|
||||
await publishPhotoService.InsertPublishPhotoDetail(data);
|
||||
let data: PublishData;
|
||||
for (let i = 0; i < keys.value.length; i++) {
|
||||
data = new PublishData();
|
||||
data.FileId = keys.value[i].FileId;
|
||||
data.PublishName = publishName;
|
||||
|
||||
await publishPhotoService.InsertPublishPhotoDetail(data);
|
||||
}
|
||||
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "作品发布成功",
|
||||
placement: "topRight",
|
||||
});
|
||||
} else {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "请选择一条记录",
|
||||
placement: "topRight",
|
||||
});
|
||||
}
|
||||
showModalPublishPhoto.value = false;
|
||||
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "作品发布成功",
|
||||
placement: "topRight",
|
||||
});
|
||||
} else {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "请选择一条记录",
|
||||
placement: "topRight",
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "作品发布失败",
|
||||
placement: "topRight",
|
||||
});
|
||||
} finally {
|
||||
loading.value = false;
|
||||
spinTip.value = "加载中...";
|
||||
}
|
||||
};
|
||||
|
||||
const handleSelectPublishAudio = async () => {
|
||||
if (publishAudioEnquiry.value) {
|
||||
if (publishAudioEnquiry.value.keys.length > 0) {
|
||||
let data: PublishData;
|
||||
for (let i = 0; i < keys.value.length; i++) {
|
||||
data = new PublishData();
|
||||
data.FileId = keys.value[i].FileId;
|
||||
data.PublishName = publishAudioEnquiry.value.keys[0].PublishName;
|
||||
try {
|
||||
loading.value = true;
|
||||
if (publishAudioEnquiry.value) {
|
||||
if (publishAudioEnquiry.value.keys.length > 0) {
|
||||
// 先把选中的专辑名取出来:关掉弹窗后组件可能被销毁,就取不到了
|
||||
const publishName = publishAudioEnquiry.value.keys[0].PublishName;
|
||||
// 先关弹窗再发请求,遮罩才看得清
|
||||
showModalPublishAudio.value = false;
|
||||
|
||||
await publishAudioService.InsertPublishAudioDetail(data);
|
||||
let data: PublishData;
|
||||
for (let i = 0; i < keys.value.length; i++) {
|
||||
data = new PublishData();
|
||||
data.FileId = keys.value[i].FileId;
|
||||
data.PublishName = publishName;
|
||||
|
||||
await publishAudioService.InsertPublishAudioDetail(data);
|
||||
}
|
||||
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "专辑发布成功",
|
||||
placement: "topRight",
|
||||
});
|
||||
} else {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "请选择一条记录",
|
||||
placement: "topRight",
|
||||
});
|
||||
}
|
||||
showModalPublishAudio.value = false;
|
||||
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "专辑发布成功",
|
||||
placement: "topRight",
|
||||
});
|
||||
} else {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "请选择一条记录",
|
||||
placement: "topRight",
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "专辑发布失败",
|
||||
placement: "topRight",
|
||||
});
|
||||
} finally {
|
||||
loading.value = false;
|
||||
spinTip.value = "加载中...";
|
||||
}
|
||||
};
|
||||
|
||||
const handleSelectPublishVideo = async () => {
|
||||
if (publishVideoEnquiry.value) {
|
||||
if (publishVideoEnquiry.value.keys.length > 0) {
|
||||
let data: PublishData;
|
||||
for (let i = 0; i < keys.value.length; i++) {
|
||||
data = new PublishData();
|
||||
data.FileId = keys.value[i].FileId;
|
||||
data.PublishName = publishVideoEnquiry.value.keys[0].PublishName;
|
||||
try {
|
||||
loading.value = true;
|
||||
if (publishVideoEnquiry.value) {
|
||||
if (publishVideoEnquiry.value.keys.length > 0) {
|
||||
// 先把选中的专辑名取出来:关掉弹窗后组件可能被销毁,就取不到了
|
||||
const publishName = publishVideoEnquiry.value.keys[0].PublishName;
|
||||
// 先关弹窗再发请求,遮罩才看得清
|
||||
showModalPublishVideo.value = false;
|
||||
|
||||
await publishVideoService.InsertPublishVideoDetail(data);
|
||||
let data: PublishData;
|
||||
for (let i = 0; i < keys.value.length; i++) {
|
||||
data = new PublishData();
|
||||
data.FileId = keys.value[i].FileId;
|
||||
data.PublishName = publishName;
|
||||
|
||||
await publishVideoService.InsertPublishVideoDetail(data);
|
||||
}
|
||||
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "专辑发布成功",
|
||||
placement: "topRight",
|
||||
});
|
||||
} else {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "请选择一条记录",
|
||||
placement: "topRight",
|
||||
});
|
||||
}
|
||||
showModalPublishVideo.value = false;
|
||||
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "专辑发布成功",
|
||||
placement: "topRight",
|
||||
});
|
||||
} else {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "请选择一条记录",
|
||||
placement: "topRight",
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "专辑发布失败",
|
||||
placement: "topRight",
|
||||
});
|
||||
} finally {
|
||||
loading.value = false;
|
||||
spinTip.value = "加载中...";
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1121,9 +1193,16 @@ const onDownloadSelected = async (items: FamilyDmsFileViewDisplayData[]) => {
|
||||
};
|
||||
|
||||
const onShareSelected = (items: FamilyDmsFileViewDisplayData[]) => {
|
||||
if (items.length > 0) {
|
||||
onShareFamily(items[0]);
|
||||
// 没选中文件时原来什么都不发生,这里给个提示
|
||||
if (items.length === 0) {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "请选择要共享的文件",
|
||||
placement: "topRight",
|
||||
});
|
||||
return;
|
||||
}
|
||||
onShareFamily(items[0]);
|
||||
};
|
||||
|
||||
const onPublishSelected = (items: FamilyDmsFileViewDisplayData[]) => {
|
||||
|
||||
@@ -251,23 +251,44 @@ const onSelectChange = (selected: FamilyFolderFavoriteViewEntity[]) => {
|
||||
};
|
||||
|
||||
const onDelete = async () => {
|
||||
let fgfs: FamilyFolderFavoriteEntity[] = [];
|
||||
let fgf: FamilyFolderFavoriteEntity;
|
||||
keys.value.forEach((element) => {
|
||||
fgf = new FamilyFolderFavoriteEntity();
|
||||
fgf.UserName = element.UserName;
|
||||
fgf.FolderName = element.FolderName;
|
||||
fgfs.push(fgf);
|
||||
});
|
||||
if (keys.value.length === 0) {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "请选择一条记录",
|
||||
placement: "topRight",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
loading.value = true;
|
||||
|
||||
let fgfs: FamilyFolderFavoriteEntity[] = [];
|
||||
let fgf: FamilyFolderFavoriteEntity;
|
||||
keys.value.forEach((element) => {
|
||||
fgf = new FamilyFolderFavoriteEntity();
|
||||
fgf.UserName = element.UserName;
|
||||
fgf.FolderName = element.FolderName;
|
||||
fgfs.push(fgf);
|
||||
});
|
||||
|
||||
await familyGroupService.DeleteFamilyFolderFavorites(fgfs);
|
||||
|
||||
await familyGroupService.DeleteFamilyFolderFavorites(fgfs).then(() => {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "记录删除成功",
|
||||
placement: "topRight",
|
||||
});
|
||||
onReload();
|
||||
});
|
||||
} catch (error) {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "记录删除失败",
|
||||
placement: "topRight",
|
||||
});
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const onReset = () => {
|
||||
|
||||
@@ -44,12 +44,27 @@ const mode = ref<string>(route.params.mode as string)
|
||||
*/
|
||||
const controlsVisible = ref(true);
|
||||
|
||||
/** 退出全屏后让顶栏短暂不响应指针的定时器 */
|
||||
let settleTimer = 0;
|
||||
|
||||
watch(controlsVisible, (visible) => {
|
||||
document.body.classList.toggle("pv-fullscreen", !visible);
|
||||
|
||||
// 退出全屏时鼠标往往正好停在右上角(恢复按钮的位置,也是顶栏菜单的位置),
|
||||
// 顶栏一恢复显示就会被 hover 展开下拉。让它先"冷静" 400ms,避开这次误触。
|
||||
if (visible) {
|
||||
window.clearTimeout(settleTimer);
|
||||
document.body.classList.add("pv-settling");
|
||||
settleTimer = window.setTimeout(() => {
|
||||
document.body.classList.remove("pv-settling");
|
||||
}, 400);
|
||||
}
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
document.body.classList.remove("pv-fullscreen");
|
||||
document.body.classList.remove("pv-settling");
|
||||
window.clearTimeout(settleTimer);
|
||||
});
|
||||
|
||||
const toIndex = ref<number>(0)
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
<div class="pa-page" :style="{
|
||||
height: bsInfo.height - 120 + 'px',
|
||||
}">
|
||||
<VinylAudioPlayer :tracks="audios" @close="onClose" />
|
||||
<VinylAudioPlayer v-model:controls="controlsVisible" :tracks="audios" @close="onClose" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted } from "vue";
|
||||
import { ref, onMounted, onUnmounted, watch } from "vue";
|
||||
import VinylAudioPlayer from "@/components/basic/VinylAudioPlayer.vue";
|
||||
import type { VinylTrack } from "@/components/basic/VinylAudioPlayer.vue";
|
||||
import publishAudioService from "@/service/master/publishAudioService";
|
||||
@@ -32,6 +32,36 @@ const mode = ref<string>(route.params.mode as string)
|
||||
// 播放器曲目(VinylAudioPlayer 负责界面与播放)
|
||||
const audios = ref<VinylTrack[]>([]);
|
||||
|
||||
/**
|
||||
* 控制区显隐:与影视厅 PreviewVideo / 图片页 Preview 同一套机制——
|
||||
* 收起控制区时给 body 挂 .pv-fullscreen,藏掉 layout 顶部的两条栏
|
||||
* (标题栏 + 页面头)并把内容区撑到整屏,音乐厅真正占满全屏。
|
||||
*/
|
||||
const controlsVisible = ref(true);
|
||||
|
||||
/** 退出全屏后让顶栏短暂不响应指针的定时器 */
|
||||
let settleTimer = 0;
|
||||
|
||||
watch(controlsVisible, (visible) => {
|
||||
document.body.classList.toggle("pv-fullscreen", !visible);
|
||||
|
||||
// 退出全屏时鼠标往往正好停在右上角(恢复按钮的位置,也是顶栏菜单的位置),
|
||||
// 顶栏一恢复显示就会被 hover 展开下拉。让它先"冷静" 400ms,避开这次误触。
|
||||
if (visible) {
|
||||
window.clearTimeout(settleTimer);
|
||||
document.body.classList.add("pv-settling");
|
||||
settleTimer = window.setTimeout(() => {
|
||||
document.body.classList.remove("pv-settling");
|
||||
}, 400);
|
||||
}
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
document.body.classList.remove("pv-fullscreen");
|
||||
document.body.classList.remove("pv-settling");
|
||||
window.clearTimeout(settleTimer);
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
// 加载歌曲信息
|
||||
loadAudios()
|
||||
|
||||
@@ -39,12 +39,27 @@ const videos = ref<VideoItem[]>([]);
|
||||
*/
|
||||
const controlsVisible = ref(true);
|
||||
|
||||
/** 退出全屏后让顶栏短暂不响应指针的定时器 */
|
||||
let settleTimer = 0;
|
||||
|
||||
watch(controlsVisible, (visible) => {
|
||||
document.body.classList.toggle("pv-fullscreen", !visible);
|
||||
|
||||
// 退出全屏时鼠标往往正好停在右上角(恢复按钮的位置,也是顶栏菜单的位置),
|
||||
// 顶栏一恢复显示就会被 hover 展开下拉。让它先"冷静" 400ms,避开这次误触。
|
||||
if (visible) {
|
||||
window.clearTimeout(settleTimer);
|
||||
document.body.classList.add("pv-settling");
|
||||
settleTimer = window.setTimeout(() => {
|
||||
document.body.classList.remove("pv-settling");
|
||||
}, 400);
|
||||
}
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
document.body.classList.remove("pv-fullscreen");
|
||||
document.body.classList.remove("pv-settling");
|
||||
window.clearTimeout(settleTimer);
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
|
||||
Reference in new issue
Block a user