Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
zys-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
龙菲
zys-ui
Commits
1de03282
提交
1de03282
authored
9月 06, 2023
作者:
龙菲
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
区分模板管理和我的创作处的新建文件方式
上级
77a8f8db
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
32 行增加
和
15 行删除
+32
-15
OperationMenu.vue
src/components/file/components/OperationMenu.vue
+32
-15
没有找到文件。
src/components/file/components/OperationMenu.vue
浏览文件 @
1de03282
...
...
@@ -22,10 +22,12 @@
>
上传
<i
class=
"el-icon-arrow-down el-icon--right"
></i
></el-button>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
@
click
.
native=
"handleUploadFileBtnClick(FILE_UPLOAD)"
<el-dropdown-item
@
click
.
native=
"handleUploadFileBtnClick(FILE_UPLOAD)"
>
上传文件
</el-dropdown-item
>
<el-dropdown-item
@
click
.
native=
"handleUploadFileBtnClick(FOLDER_UPLOAD)"
<el-dropdown-item
@
click
.
native=
"handleUploadFileBtnClick(FOLDER_UPLOAD)"
>
上传文件夹
</el-dropdown-item
>
<el-dropdown-item
...
...
@@ -51,9 +53,9 @@
</el-dropdown-item>
<!-- 只有我的创作采用到新建word文档 -->
<el-dropdown-item
v-if=
"[MY_CREATE,TEMPLATE_MANAGE].includes(fileType)"
v-if=
"[MY_CREATE,
TEMPLATE_MANAGE].includes(fileType)"
divided
@
click
.
native=
"handleCreateFile
ByTemplate
('docx')"
@
click
.
native=
"handleCreateFile('docx')"
>
<div
class=
"img-text-wrapper"
>
<img
:src=
"wordImg"
/>
新建Word 文档
...
...
@@ -73,20 +75,22 @@
</el-dropdown-menu>
</el-dropdown>
</el-button-group>
<!-- 我的收藏只需要用到新建文件夹 -->
<!-- 我的收藏只需要用到新建文件夹 -->
<el-button
v-if=
"(!selectedFiles.length || !isBatchOperation) &&[MY_COLLECT].includes(fileType)"
v-if=
"
(!selectedFiles.length || !isBatchOperation) &&
[MY_COLLECT].includes(fileType)
"
size=
"mini"
type=
"primary"
icon=
"el-icon-plus"
id=
"uploadFileId"
@
click=
"handleClickAddFolderBtn"
>
新建文件夹
</
i
>
</el-button>
>
新建文件夹
</
el-button
>
<div
class=
"batch-operate-group"
>
<el-button-group
v-if=
"isBatchOperation"
>
<el-button
size=
"mini"
type=
"primary"
...
...
@@ -116,13 +120,13 @@
<el-button
size=
"mini"
type=
"primary"
v-if=
"selectedFiles.length && fileType
!=
MY_COLLECT"
v-if=
"selectedFiles.length && fileType
!=
MY_COLLECT"
icon=
"el-icon-delete"
@
click=
"handleBatchDeleteBtnClick"
>
批量删除
</el-button
>
<el-button
v-if=
"selectedFiles.length && fileType==
MY_COLLECT"
v-if=
"selectedFiles.length && fileType ==
MY_COLLECT"
size=
"mini"
type=
"primary"
icon=
"el-icon-delete"
...
...
@@ -253,7 +257,11 @@
<
script
>
import
SelectColumn
from
"./SelectColumn.vue"
;
import
{
mapState
}
from
"vuex"
;
import
{
displayModeConstant
,
fileTypeConstant
,
uploadModeConstant
}
from
"../constants"
;
import
{
displayModeConstant
,
fileTypeConstant
,
uploadModeConstant
,
}
from
"../constants"
;
export
default
{
name
:
"OperationMenu"
,
props
:
{
...
...
@@ -285,7 +293,7 @@ export default {
pptImg
:
require
(
"@/assets/images/file/file_ppt.svg"
),
...
displayModeConstant
,
...
fileTypeConstant
,
...
uploadModeConstant
...
uploadModeConstant
,
};
},
computed
:
{
...
...
@@ -376,12 +384,21 @@ export default {
}
});
},
// 新建文件按钮
handleCreateFile
()
{
// 模板管理处不能够通过模板新建文件,我的创作处可以
if
(
this
.
fileType
==
this
.
TEMPLATE_MANAGE
)
{
this
.
createFile
(
"docx"
);
}
else
{
this
.
createFileByTemplate
(
"docx"
);
}
},
/**
* 新建 office 文件
* @description 调用新建 office 文件服务,并在弹窗确认回调事件中刷新文件列表
* @param {string} 文件扩展名 docx xlsx pptx
*/
handleC
reateFile
(
extendName
)
{
c
reateFile
(
extendName
)
{
this
.
$openDialog
.
addFile
({
extendName
:
extendName
,
...
...
@@ -398,7 +415,7 @@ export default {
* @description 调用新建 office 文件服务,并在弹窗确认回调事件中刷新文件列表
* @param {string} 文件扩展名 docx xlsx pptx
*/
handleC
reateFileByTemplate
(
extendName
)
{
c
reateFileByTemplate
(
extendName
)
{
this
.
$openDialog
.
addFileByTemplate
({
extendName
:
extendName
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论