u
This commit is contained in:
1 parent
3464bc7907
commit
3620369d47
9 files changed
+1270
-635
No files matched your search
@@ -34,6 +34,8 @@
|
||||
background: #f5f7fa;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.button-group {
|
||||
@@ -76,7 +78,7 @@
|
||||
<button id="destroyBtn">销毁组件</button>
|
||||
</div>
|
||||
|
||||
<div style="height: 600px;width: 800px;">
|
||||
<div style="height: 600px;width: 1200px;">
|
||||
<div id="fileContainer"></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -121,7 +123,7 @@
|
||||
language: 'zh-CN',
|
||||
previewUrl: 'https://sxox.g3soft.cn:8012/onlinePreview?url=',
|
||||
data: [
|
||||
{ name: 'logo.png', size: 1024000, uploadDate: '2024-01-15T10:30:00', url: 'https://g3hdzjsj.oss-cn-hangzhou.aliyuncs.com/g3hd/2026/04/28/ccb964f4-124d-4169-8981-20333bea2587.docx' },
|
||||
{ name: 'DC2A4692147D10C9C7B48A7EA29BCBA8.jpg', size: 1024000, uploadDate: '2024-01-15T10:30:00', url: 'http://118.89.70.199:9000/test/DC2A4692147D10C9C7B48A7EA29BCBA8.jpg' },
|
||||
],
|
||||
uploadConfig: {
|
||||
aliyun: {
|
||||
@@ -195,80 +197,6 @@
|
||||
getActionMenu: function (file) {
|
||||
const menuItems = [];
|
||||
|
||||
// 根据权限添加菜单项
|
||||
if (userPermissions.approve) {
|
||||
menuItems.push({
|
||||
title: '审批',
|
||||
onClick: function (f) {
|
||||
console.log('审批文件:', f.name);
|
||||
alert('审批功能:' + f.name);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (userPermissions.edit) {
|
||||
menuItems.push({
|
||||
title: '修改',
|
||||
onClick: function (f) {
|
||||
console.log('修改文件:', f.name);
|
||||
alert('修改功能:' + f.name);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (userPermissions.rename) {
|
||||
menuItems.push({
|
||||
title: '重命名',
|
||||
onClick: function (f) {
|
||||
console.log('重命名文件:', f.name);
|
||||
const newName = prompt('请输入新文件名:', f.name);
|
||||
if (newName && newName !== f.name) {
|
||||
console.log('文件已重命名为:', newName);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (userPermissions.copy) {
|
||||
menuItems.push({
|
||||
title: '复制',
|
||||
onClick: function (f) {
|
||||
console.log('复制文件:', f.name);
|
||||
alert('复制功能:' + f.name);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (userPermissions.move) {
|
||||
menuItems.push({
|
||||
title: '移动到文件夹',
|
||||
onClick: function (f) {
|
||||
console.log('移动文件:', f.name);
|
||||
alert('移动功能:' + f.name);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (userPermissions.share) {
|
||||
menuItems.push({
|
||||
title: '分享',
|
||||
onClick: function (f) {
|
||||
console.log('分享文件:', f.name);
|
||||
alert('分享功能:' + f.name);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (userPermissions.history) {
|
||||
menuItems.push({
|
||||
title: '历史版本',
|
||||
onClick: function (f) {
|
||||
console.log('查看历史版本:', f.name);
|
||||
alert('历史版本功能:' + f.name);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return menuItems;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user