Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
zys-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
龙菲
zys-ui
Commits
2c86b025
提交
2c86b025
authored
8月 16, 2023
作者:
龙菲
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
完成文件移动和复制
上级
1d351b1a
显示空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
82 行增加
和
21 行删除
+82
-21
qwFile.js
src/api/qwFile.js
+10
-0
BoxMask.vue
src/components/file/box/audioPreview/BoxMask.vue
+1
-1
BoxMask.vue
src/components/file/box/codePreview/BoxMask.vue
+1
-1
BoxMask.vue
src/components/file/box/markdownPreview/BoxMask.vue
+1
-1
Dialog.vue
src/components/file/dialog/authWeChat/Dialog.vue
+1
-1
Dialog.vue
src/components/file/dialog/copyFile/Dialog.vue
+30
-4
Dialog.vue
src/components/file/dialog/deleteFile/Dialog.vue
+1
-1
Dialog.vue
src/components/file/dialog/moveFile/Dialog.vue
+34
-6
Dialog.vue
src/components/file/dialog/restoreFile/Dialog.vue
+1
-1
Dialog.vue
src/components/file/dialog/saveShareFile/Dialog.vue
+1
-1
Dialog.vue
src/components/file/dialog/shareFile/Dialog.vue
+0
-3
Dialog.vue
src/components/file/dialog/unzipFile/Dialog.vue
+1
-1
没有找到文件。
src/api/qwFile.js
浏览文件 @
2c86b025
...
...
@@ -60,6 +60,16 @@ export const getFoldTree = (params) => {
})
}
// 获取文件目录树by path
export
const
getFoldTreeByPath
=
(
params
)
=>
{
return
request
({
url
:
baseUrl
+
'/file/getfiletreeByPath'
,
method
:
'get'
,
params
})
}
/**
* 单文件操作相关接口
*/
...
...
src/components/file/box/audioPreview/BoxMask.vue
浏览文件 @
2c86b025
...
...
@@ -344,7 +344,7 @@ export default {
getFileDetail
({
userFileId
:
this
.
activeFileObj
.
userFileId
})
.
then
((
res
)
=>
{
this
.
loading
=
false
;
if
(
res
.
success
)
{
if
(
res
.
code
==
200
)
{
this
.
audioInfo
=
{
...
res
.
data
.
music
,
duration
:
res
.
data
.
music
.
trackLength
,
...
...
src/components/file/box/codePreview/BoxMask.vue
浏览文件 @
2c86b025
...
...
@@ -260,7 +260,7 @@ export default {
})
.
then
((
res
)
=>
{
this
.
codeMirrorLoading
=
false
;
if
(
res
.
success
)
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"已保存"
);
this
.
getCodeText
();
}
else
{
...
...
src/components/file/box/markdownPreview/BoxMask.vue
浏览文件 @
2c86b025
...
...
@@ -213,7 +213,7 @@ export default {
})
.
then
((
res
)
=>
{
this
.
markdownLoading
=
false
;
if
(
res
.
success
)
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"已保存"
);
this
.
getMarkdownText
();
}
else
{
...
...
src/components/file/dialog/authWeChat/Dialog.vue
浏览文件 @
2c86b025
...
...
@@ -56,7 +56,7 @@ export default {
)
{
console
.
log
(
"getWeChatAuthStateData"
,
getWeChatAuthStateData
);
// getWeChatAuthState().then((res) => {
// if (res.
success
) {
// if (res.
code == 200
) {
// if (res.data) {
// this.callback("go");
// } else {
...
...
src/components/file/dialog/copyFile/Dialog.vue
浏览文件 @
2c86b025
...
...
@@ -58,7 +58,7 @@
</
template
>
<
script
>
import
{
getFoldTree
,
copyFile
}
from
"@/api/qwFile.js"
;
import
{
getFoldTree
ByPath
,
copyFile
}
from
"@/api/qwFile.js"
;
export
default
{
name
:
"CopyFileDialog"
,
...
...
@@ -90,11 +90,37 @@ export default {
* 初始化文件目录树
*/
initFileTree
(
id
)
{
// this.loading = true;
// getFoldTree().then((res) => {
// this.loading = false;
// if (res.code == 200) {
// this.fileTree = [res.data];
// this.defaultExpandedKeys = id ? [id] : [this.fileTree[0].id];
// } else {
// this.$message.error(res.message);
// }
// });
this
.
loading
=
true
;
getFoldTree
().
then
((
res
)
=>
{
// 通过当前路由判断传入参数
const
{
pathname
}
=
window
.
location
;
let
path
=
"/我的创作"
;
if
(
pathname
.
includes
(
"myCreate"
))
{
path
=
"/我的创作"
;
}
else
if
(
pathname
.
includes
(
"myTemplate"
))
{
path
=
"/我的模板"
;
}
else
if
(
pathname
.
includes
(
"myCollect"
))
{
path
=
"/我的收藏"
;
}
else
if
(
pathname
.
includes
(
"myNote"
))
{
path
=
"/我的笔记"
;
}
else
if
(
pathname
.
includes
(
"myShare"
))
{
path
=
"/我的共享"
;
}
this
.
targetPath
=
path
;
const
params
=
{
path
};
getFoldTreeByPath
(
params
).
then
((
res
)
=>
{
this
.
loading
=
false
;
if
(
res
.
code
==
200
)
{
this
.
fileTree
=
[
res
.
data
];
this
.
fileTree
=
res
.
data
.
children
;
//隐藏掉根目录
this
.
defaultExpandedKeys
=
id
?
[
id
]
:
[
this
.
fileTree
[
0
].
id
];
}
else
{
this
.
$message
.
error
(
res
.
message
);
...
...
@@ -135,7 +161,7 @@ export default {
copyFile
(
data
)
.
then
((
res
)
=>
{
this
.
sureBtnLoading
=
false
;
if
(
res
.
success
)
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"复制成功"
);
this
.
visible
=
false
;
this
.
callback
(
"confirm"
);
...
...
src/components/file/dialog/deleteFile/Dialog.vue
浏览文件 @
2c86b025
...
...
@@ -100,7 +100,7 @@ export default {
}
}
}
if
(
res
.
success
)
{
if
(
res
.
code
==
200
)
{
this
.
sureBtnLoading
=
false
;
this
.
$message
.
success
(
"删除成功"
);
this
.
visible
=
false
;
...
...
src/components/file/dialog/moveFile/Dialog.vue
浏览文件 @
2c86b025
...
...
@@ -58,14 +58,19 @@
</
template
>
<
script
>
import
{
getFoldTree
,
moveFile
,
batchMoveFile
}
from
"@/api/qwFile.js"
;
import
{
getFoldTree
,
getFoldTreeByPath
,
moveFile
,
batchMoveFile
,
}
from
"@/api/qwFile.js"
;
export
default
{
name
:
"MoveFileDialog"
,
data
()
{
return
{
visible
:
false
,
// 对话框是否可见
targetPath
:
"/"
,
// 目标路径
targetPath
:
"/
我的创作
"
,
// 目标路径
fileTree
:
[],
// 文件夹目录树
loading
:
false
,
// 文件夹目录树 loading 状态
defaultExpandedKeys
:
[],
...
...
@@ -86,15 +91,38 @@ export default {
handleDialogOpen
()
{
this
.
initFileTree
();
},
getQueryString
(
name
)
{
var
reg
=
new
RegExp
(
"(^|&)"
+
name
+
"=([^&]*)(&|$)"
,
"i"
);
var
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
);
if
(
r
!=
null
)
return
r
[
2
];
return
null
;
},
/**
* 初始化文件目录树
*/
initFileTree
(
id
)
{
this
.
loading
=
true
;
getFoldTree
().
then
((
res
)
=>
{
// 通过当前路由判断传入参数
const
{
pathname
}
=
window
.
location
;
let
path
=
"/我的创作"
;
if
(
pathname
.
includes
(
"myCreate"
))
{
path
=
"/我的创作"
;
}
else
if
(
pathname
.
includes
(
"myTemplate"
))
{
path
=
"/我的模板"
;
}
else
if
(
pathname
.
includes
(
"myCollect"
))
{
path
=
"/我的收藏"
;
}
else
if
(
pathname
.
includes
(
"myNote"
))
{
path
=
"/我的笔记"
;
}
else
if
(
pathname
.
includes
(
"myShare"
))
{
path
=
"/我的共享"
;
}
this
.
targetPath
=
path
;
const
params
=
{
path
};
getFoldTreeByPath
(
params
).
then
((
res
)
=>
{
this
.
loading
=
false
;
if
(
res
.
code
==
200
)
{
this
.
fileTree
=
[
res
.
data
];
this
.
fileTree
=
res
.
data
.
children
;
//隐藏掉根目录
this
.
defaultExpandedKeys
=
id
?
[
id
]
:
[
this
.
fileTree
[
0
].
id
];
}
else
{
this
.
$message
.
error
(
res
.
message
);
...
...
@@ -141,7 +169,7 @@ export default {
batchMoveFile
(
data
)
.
then
((
res
)
=>
{
this
.
sureBtnLoading
=
false
;
if
(
res
.
success
)
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"移动成功"
);
this
.
visible
=
false
;
this
.
fileInfo
=
{};
...
...
@@ -162,7 +190,7 @@ export default {
moveFile
(
data
)
.
then
((
res
)
=>
{
this
.
sureBtnLoading
=
false
;
if
(
res
.
success
)
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"移动成功"
);
this
.
visible
=
false
;
this
.
callback
(
"confirm"
);
...
...
src/components/file/dialog/restoreFile/Dialog.vue
浏览文件 @
2c86b025
...
...
@@ -34,7 +34,7 @@ export default {
deleteBatchNum
:
this
.
deleteBatchNum
,
filePath
:
this
.
filePath
,
}).
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"文件已还原"
);
this
.
visible
=
false
;
this
.
callback
(
"confirm"
);
...
...
src/components/file/dialog/saveShareFile/Dialog.vue
浏览文件 @
2c86b025
...
...
@@ -135,7 +135,7 @@ export default {
})
.
then
((
res
)
=>
{
this
.
sureBtnLoading
=
false
;
if
(
res
.
success
)
{
if
(
res
.
code
==
200
)
{
this
.
visible
=
false
;
this
.
$message
.
success
(
"保存成功"
);
}
else
{
...
...
src/components/file/dialog/shareFile/Dialog.vue
浏览文件 @
2c86b025
...
...
@@ -274,9 +274,6 @@ export default {
}
else
if
(
this
.
form
.
shareType
==
2
)
{
this
.
form
.
shareTo
=
this
.
userIdsParams
;
}
// console.log("this.form.shareTo", this.form.shareTo);
// return;
this
.
sureBtnLoading
=
true
;
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
...
...
src/components/file/dialog/unzipFile/Dialog.vue
浏览文件 @
2c86b025
...
...
@@ -155,7 +155,7 @@ export default {
}
unzipFile
(
reqData
).
then
((
res
)
=>
{
this
.
sureBtnLoading
=
false
;
if
(
res
.
success
)
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"解压成功"
);
this
.
visible
=
false
;
this
.
callback
(
"confirm"
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论