Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
zys-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
龙菲
zys-ui
Commits
d70d9125
提交
d70d9125
authored
8月 17, 2023
作者:
李忠利
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
http://222.85.214.245:11036/longfei666/zys-ui
上级
d7d4b492
5f04d733
隐藏空白字符变更
内嵌
并排
正在显示
37 个修改的文件
包含
941 行增加
和
328 行删除
+941
-328
qwFile.js
src/api/qwFile.js
+10
-0
index.js
src/api/user/index.js
+2
-2
icon-liebiao.svg
src/assets/icons/svg/icon-liebiao.svg
+2
-0
index.vue
src/components/PaginationSelector/index.vue
+151
-0
BreadCrumb.vue
src/components/common/BreadCrumb.vue
+78
-39
FileTable.vue
src/components/common/FileTable.vue
+56
-20
AsideMenu.vue
src/components/file/AsideMenu.vue
+4
-4
FileList.vue
src/components/file/FileList.vue
+57
-36
BoxMask.vue
src/components/file/box/audioPreview/BoxMask.vue
+4
-4
BoxMask.vue
src/components/file/box/codePreview/BoxMask.vue
+3
-3
Box.vue
src/components/file/box/contextMenu/Box.vue
+1
-1
BoxMask.vue
src/components/file/box/imgPreview/BoxMask.vue
+2
-2
BoxMask.vue
src/components/file/box/markdownPreview/BoxMask.vue
+3
-3
Box.vue
src/components/file/box/uploadFile/Box.vue
+4
-4
VideoPlayer.vue
src/components/file/box/videoPreview/VideoPlayer.vue
+5
-5
FileGrid.vue
src/components/file/components/FileGrid.vue
+138
-138
FileTimeLine.vue
src/components/file/components/FileTimeLine.vue
+2
-2
OperationMenu.vue
src/components/file/components/OperationMenu.vue
+24
-9
Dialog.vue
src/components/file/dialog/addFile/Dialog.vue
+1
-1
Dialog.vue
src/components/file/dialog/addFolder/Dialog.vue
+1
-1
Dialog.vue
src/components/file/dialog/authWeChat/Dialog.vue
+1
-1
Dialog.vue
src/components/file/dialog/copyFile/Dialog.vue
+32
-6
Dialog.vue
src/components/file/dialog/deleteFile/Dialog.vue
+1
-1
Dialog.vue
src/components/file/dialog/moveFile/Dialog.vue
+36
-8
Dialog.vue
src/components/file/dialog/renameFile/Dialog.vue
+1
-1
Dialog.vue
src/components/file/dialog/restoreFile/Dialog.vue
+1
-1
Dialog.vue
src/components/file/dialog/saveShareFile/Dialog.vue
+3
-3
Dialog.vue
src/components/file/dialog/shareFile/Dialog.vue
+170
-7
Dialog.vue
src/components/file/dialog/showFileDetail/Dialog.vue
+1
-1
Dialog.vue
src/components/file/dialog/unzipFile/Dialog.vue
+3
-3
common.js
src/libs/qiwen/globalFunction/common.js
+3
-3
file.js
src/libs/qiwen/globalFunction/file.js
+94
-2
staticRoute.js
src/router/staticRoute.js
+11
-11
getters.js
src/store/getters.js
+12
-2
qwConfig.js
src/utils/qwConfig.js
+1
-1
index.vue
src/views/read/wpsReader/index.vue
+22
-2
vue.config.js
vue.config.js
+1
-1
没有找到文件。
src/api/qwFile.js
浏览文件 @
d70d9125
...
...
@@ -60,6 +60,16 @@ export const getFoldTree = (params) => {
})
}
// 获取文件目录树by path
export
const
getFoldTreeByPath
=
(
params
)
=>
{
return
request
({
url
:
baseUrl
+
'/file/getfiletreeByPath'
,
method
:
'get'
,
params
})
}
/**
* 单文件操作相关接口
*/
...
...
src/api/user/index.js
浏览文件 @
d70d9125
...
...
@@ -11,4 +11,5 @@ export const verity = params => {
method
:
'post'
,
params
})
}
\ No newline at end of file
}
src/assets/icons/svg/icon-liebiao.svg
0 → 100644
浏览文件 @
d70d9125
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
t=
"1691980701595"
class=
"icon"
viewBox=
"0 0 1024 1024"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
p-id=
"1118"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
width=
"64"
height=
"64"
><path
d=
"M896.021502 255.956996 607.897867 255.956996c-17.717453 0-31.994625-14.277171-31.994625-31.994625 0-17.717453 14.277171-31.994625 31.994625-31.994625l287.951621 0c17.717453 0 31.994625 14.277171 31.994625 31.994625C928.016126 241.679825 913.738955 255.956996 896.021502 255.956996z"
p-id=
"1119"
></path><path
d=
"M896.021502 415.930119 607.897867 415.930119c-17.717453 0-31.994625-14.277171-31.994625-31.994625s14.277171-31.994625 31.994625-31.994625l287.951621 0c17.717453 0 31.994625 14.277171 31.994625 31.994625S913.738955 415.930119 896.021502 415.930119z"
p-id=
"1120"
></path><path
d=
"M896.021502 672.05913 607.897867 672.05913c-17.717453 0-31.994625-14.277171-31.994625-31.994625s14.277171-31.994625 31.994625-31.994625l287.951621 0c17.717453 0 31.994625 14.277171 31.994625 31.994625S913.738955 672.05913 896.021502 672.05913z"
p-id=
"1121"
></path><path
d=
"M896.021502 832.032253 607.897867 832.032253c-17.717453 0-31.994625-14.277171-31.994625-31.994625s14.277171-31.994625 31.994625-31.994625l287.951621 0c17.717453 0 31.994625 14.277171 31.994625 31.994625S913.738955 832.032253 896.021502 832.032253z"
p-id=
"1122"
></path><path
d=
"M383.935495 479.919368 191.967747 479.919368c-52.980346 0-95.983874-43.003528-95.983874-95.983874L95.983874 191.967747c0-52.980346 43.003528-95.983874 95.983874-95.983874l191.967747 0c52.980346 0 95.983874 43.003528 95.983874 95.983874l0 191.967747C479.919368 436.915841 436.915841 479.919368 383.935495 479.919368zM191.967747 159.973123c-17.545439 0-31.994625 14.449185-31.994625 31.994625l0 191.967747c0 17.545439 14.449185 31.994625 31.994625 31.994625l191.967747 0c17.545439 0 31.994625-14.449185 31.994625-31.994625L415.930119 191.967747c0-17.545439-14.449185-31.994625-31.994625-31.994625L191.967747 159.973123 191.967747 159.973123z"
p-id=
"1123"
></path><path
d=
"M383.935495 928.016126 191.967747 928.016126c-52.980346 0-95.983874-43.003528-95.983874-95.983874L95.983874 639.892491c0-52.980346 43.003528-95.983874 95.983874-95.983874l191.967747 0c52.980346 0 95.983874 43.003528 95.983874 95.983874l0 191.967747C479.919368 884.840585 436.915841 928.016126 383.935495 928.016126zM191.967747 607.897867c-17.545439 0-31.994625 14.277171-31.994625 31.994625l0 191.967747c0 17.717453 14.449185 31.994625 31.994625 31.994625l191.967747 0c17.545439 0 31.994625-14.277171 31.994625-31.994625L415.930119 639.892491c0-17.717453-14.449185-31.994625-31.994625-31.994625L191.967747 607.897867 191.967747 607.897867z"
p-id=
"1124"
></path></svg>
\ No newline at end of file
src/components/PaginationSelector/index.vue
0 → 100644
浏览文件 @
d70d9125
<
template
>
<el-select
v-model=
"childSelectedValue"
:filterable=
"remote"
multiple
:loading=
"loading"
:remote=
"remote"
:size=
"size"
:remote-method=
"remoteMethod"
:clearable=
"clearable"
@
change=
"handleChange"
@
clear=
"handleClear"
@
focus=
"handleFocus"
:style=
"
{ width: '93%' }"
:placeholder="placeholder"
>
<el-option
v-for=
"item in optionSource"
:key=
"item[valueKey]"
:label=
"item[labelKey]"
:value=
"item[valueKey]"
>
</el-option>
<!--
{{
optionSource
}}
-->
<el-pagination
small
layout=
"prev, pager, next"
@
current-change=
"changeNumber"
:hide-on-single-page=
"true"
:page-size=
"paginationOption.pageSize"
:current-page=
"paginationOption.currentPage"
:pager-count=
"paginationOption.pagerCount"
:total=
"paginationOption.total"
>
</el-pagination>
</el-select>
</
template
>
<
script
>
export
default
{
name
:
"PaginationSelect"
,
props
:
{
//此参数只是为了父组件实现 v-model指令接受参数用,子组件中无实际意义
// 在子组件中通过监听childSelectedValue值,来触发 input 事件,实现子父组件数据绑定
value
:
{
type
:
String
|
Array
,
default
:
""
,
},
valueKey
:
{
//传入的option数组中,要作为最终选择项的键值名称
type
:
String
,
},
labelKey
:
{
//传入的option数组中,要作为显示项的键值名称
type
:
String
,
},
clearable
:
{
//是否支持清除,默认支持
type
:
Boolean
,
default
:
true
,
},
remote
:
{
//是否支持远程搜索,默认支持
type
:
Boolean
,
default
:
false
,
},
size
:
{
//组件尺寸,配置项同select String | medium/small/mini
type
:
String
,
default
:
"medium"
,
},
loading
:
{
//远程数据加载状态显示
type
:
Boolean
,
default
:
false
,
},
placeholder
:
{
type
:
String
,
default
:
"选择用户"
,
},
optionSource
:
{
//下拉框组件数据源
type
:
Array
,
required
:
true
,
},
paginationOption
:
{
//分页配置项
type
:
Object
,
default
:
function
()
{
return
{
pageSize
:
5
,
//每页显示条数 6条刚好
currentPage
:
1
,
//当前页
pagerCount
:
5
,
//按钮数,超过时会折叠
total
:
10
,
//总条数
};
},
},
},
data
()
{
return
{
childSelectedValue
:
this
.
value
,
};
},
watch
:
{
//监听子组件中选择的值得变化,每当选择一个项后,触发input事件,
// 将子组件中选择的值通过input事件传递给父组件,实现父组件中v-model绑定的值的双向绑定
childSelectedValue
(
val
)
{
this
.
$emit
(
"input"
,
val
);
},
value
(
val
)
{
if
(
val
!=
null
&&
val
.
length
<
1
)
{
this
.
childSelectedValue
=
""
;
}
},
},
mounted
()
{},
methods
:
{
//子组件分页器,页码选择事件,父组件中监听子组件的 pageNationChange 事件,获取当前页码
changeNumber
(
val
)
{
//此处的val是页码
this
.
$emit
(
"pageNationChange"
,
val
);
},
// 远程调用方法,在父组件中实现远程方法
remoteMethod
(
val
)
{
if
(
val
!=
null
&&
val
.
length
>
0
)
{
//只有输入的字符串长度大于1时,触发
this
.
$emit
(
"remote-method"
,
val
);
}
else
{
this
.
childSelectedValue
=
" "
;
}
},
//使组件支持change事件
handleChange
(
val
)
{
this
.
$emit
(
"change"
,
val
);
},
//使组件支持clear事件
handleClear
(
val
)
{
this
.
$emit
(
"clear"
,
val
);
},
//解决远程搜索无结果时,显示清除按钮问题
handleFocus
()
{
if
(
this
.
childSelectedValue
.
length
<
1
)
{
this
.
childSelectedValue
=
""
;
}
},
},
};
</
script
>
<
style
scoped
></
style
>
src/components/common/BreadCrumb.vue
浏览文件 @
d70d9125
...
...
@@ -12,19 +12,21 @@
@
blur=
"handleInputBlurEnter"
@
change=
"handleInputBlurEnter"
></el-input>
<!--
{{
breadCrumbList
}}
-->
<div
class=
"breadcrumb-box"
:class=
"
{ 'able-input': fileType === 0 }"
v-show="!isShowInput"
@click.self="handleClickBreadCrumbSelf"
>
<el-breadcrumb
<
!--
<
el-breadcrumb
v-if=
"![0, 8].includes(fileType) && !['Share'].includes($route.name)"
separator-class=
"el-icon-arrow-right"
>
<el-breadcrumb-item>
{{
fileTypeMap
[
fileType
]
}}
</el-breadcrumb-item>
</el-breadcrumb>
<el-breadcrumb
v-else
separator-class=
"el-icon-arrow-right"
>
</el-breadcrumb>
-->
<el-breadcrumb
separator-class=
"el-icon-arrow-right"
>
<el-breadcrumb-item
v-for=
"(item, index) in breadCrumbList"
:key=
"index"
...
...
@@ -66,48 +68,85 @@ export default {
},
isShowInput
:
false
,
// 是否展示路径输入框
inputFilePath
:
""
,
// 路径输入
breadCrumbList
:
[],
};
},
watch
:
{
$route
(
value
)
{
// console.log(123, value);
const
{
filePath
}
=
value
.
query
;
// debugger;
let
filePathList
=
filePath
?
filePath
.
split
(
"/"
)
:
[];
let
res
=
[];
// 返回结果数组
let
_path
=
[];
// 存放祖先路径
for
(
let
i
=
0
;
i
<
filePathList
.
length
;
i
++
)
{
if
(
filePathList
[
i
])
{
_path
.
push
(
filePathList
[
i
]);
res
.
push
({
path
:
_path
.
join
(
"/"
),
name
:
filePathList
[
i
],
});
}
else
if
(
i
===
0
)
{
// 根目录
filePathList
[
i
]
=
""
;
_path
.
push
(
filePathList
[
i
]);
// res.push({
// path: "/",
// name:
// this.fileType === 0
// ? "全部文件"
// : this.fileType === 8
// ? "我的分享"
// : this.$route.name === "Share"
// ? "全部分享"
// : "",
// });
}
}
console
.
log
(
"res"
,
res
);
this
.
breadCrumbList
=
res
;
},
},
computed
:
{
/**
* 面包屑导航栏数组
*/
breadCrumbList
:
{
get
()
{
let
filePath
=
this
.
$route
.
query
.
filePath
;
let
filePathList
=
filePath
?
filePath
.
split
(
"/"
)
:
[];
let
res
=
[];
// 返回结果数组
let
_path
=
[];
// 存放祖先路径
for
(
let
i
=
0
;
i
<
filePathList
.
length
;
i
++
)
{
if
(
filePathList
[
i
])
{
_path
.
push
(
filePathList
[
i
]);
res
.
push
({
path
:
_path
.
join
(
"/"
),
name
:
filePathList
[
i
],
});
}
else
if
(
i
===
0
)
{
// 根目录
filePathList
[
i
]
=
""
;
_path
.
push
(
filePathList
[
i
]);
res
.
push
({
path
:
"/"
,
name
:
this
.
fileType
===
0
?
"全部文件"
:
this
.
fileType
===
8
?
"我的分享"
:
this
.
$route
.
name
===
"Share"
?
"全部分享"
:
""
,
});
}
}
return
res
;
},
set
()
{
return
[];
},
},
//
breadCrumbList: {
//
get() {
//
let filePath = this.$route.query.filePath;
//
let filePathList = filePath ? filePath.split("/") : [];
//
let res = []; // 返回结果数组
//
let _path = []; // 存放祖先路径
//
for (let i = 0; i
<
filePathList
.
length
;
i
++
)
{
//
if (filePathList[i]) {
//
_path.push(filePathList[i]);
//
res.push({
//
path: _path.join("/"),
//
name: filePathList[i],
//
});
//
} else if (i === 0) {
//
// 根目录
//
filePathList[i] = "";
//
_path.push(filePathList[i]);
//
res.push({
//
path: "/",
//
name:
//
this.fileType === 0
//
? "全部文件"
//
: this.fileType === 8
//
? "我的分享"
//
: this.$route.name === "Share"
//
? "全部分享"
//
: "",
//
});
//
}
//
}
//
return res;
//
},
//
set() {
//
return [];
//
},
//
},
},
methods
:
{
/**
...
...
src/components/common/FileTable.vue
浏览文件 @
d70d9125
...
...
@@ -2,6 +2,7 @@
<div
class=
"file-table-wrapper"
>
<!-- 文件表格 -->
<el-table
v-if=
"fileList.length > 0"
class=
"file-table"
:class=
"['file-type-' + fileType, routeName === 'Share' ? 'share' : '']"
ref=
"multipleTable"
...
...
@@ -41,7 +42,11 @@
:title=
"`$
{scope.row.isDir ? '' : '点击预览'}`"
style="width: 30px; max-height: 30px; cursor: pointer"
@click="
$file.handleFileNameClick(scope.row, scope.$index, sortedFileList)
$file.handleFileNameClickNew(
scope.row,
scope.$index,
sortedFileList
)
"
v-else
/>
...
...
@@ -60,7 +65,11 @@
<
template
slot-scope=
"scope"
>
<span
@
click=
"
$file.handleFileNameClick(scope.row, scope.$index, sortedFileList)
$file.handleFileNameClickNew(
scope.row,
scope.$index,
sortedFileList
)
"
>
<span
...
...
@@ -114,7 +123,11 @@
:sort-by=
"['isDir', 'extendName']"
sortable
show-overflow-tooltip
v-if=
"selectedColumnList.includes('extendName') && screenWidth > 768"
v-if=
"
selectedColumnList &&
selectedColumnList.includes('extendName') &&
screenWidth > 768
"
>
<
template
slot-scope=
"scope"
>
<span>
{{
$file
.
getFileType
(
scope
.
row
)
}}
</span>
...
...
@@ -128,7 +141,11 @@
:sort-by=
"['isDir', 'fileSize']"
sortable
align=
"right"
v-if=
"selectedColumnList.includes('fileSize') && screenWidth > 768"
v-if=
"
selectedColumnList &&
selectedColumnList.includes('fileSize') &&
screenWidth > 768
"
>
<
template
slot-scope=
"scope"
>
{{
...
...
@@ -147,6 +164,7 @@
sortable
align=
"center"
v-if=
"
selectedColumnList &&
selectedColumnList.includes('uploadTime') &&
![7, 8].includes(fileType) &&
!['Share'].includes(this.routeName) &&
...
...
@@ -163,6 +181,7 @@
align=
"center"
v-if=
"
fileType === 6 &&
selectedColumnList &&
selectedColumnList.includes('deleteTime') &&
screenWidth > 768
"
...
...
@@ -227,6 +246,7 @@
</
template
>
</el-table-column>
</el-table>
<el-empty
v-else
>
</el-empty>
</div>
</template>
...
...
@@ -281,21 +301,27 @@ export default {
*/
filePath
()
{
this
.
clearSelectedTable
();
this
.
$refs
.
multipleTable
.
clearSort
();
this
.
$nextTick
(()
=>
{
this
.
$refs
.
multipleTable
.
clearSort
();
});
},
/**
* 文件类型变化时清空表格已选行
*/
fileType
()
{
this
.
clearSelectedTable
();
this
.
$refs
.
multipleTable
.
clearSort
();
this
.
$nextTick
(()
=>
{
this
.
$refs
.
multipleTable
.
clearSort
();
});
},
/**
* 文件列表变化时清空表格已选行
*/
fileList
()
{
this
.
clearSelectedTable
();
this
.
$refs
.
multipleTable
.
clearSort
();
this
.
$nextTick
(()
=>
{
this
.
$refs
.
multipleTable
.
clearSort
();
});
this
.
sortedFileList
=
this
.
fileList
;
},
},
...
...
@@ -303,7 +329,7 @@ export default {
/**
* 当表格的排序条件发生变化的时候会触发该事件
*/
handleSortChange
()
{
this
.
sortedFileList
=
this
.
$refs
.
multipleTable
.
tableData
;
},
...
...
@@ -320,14 +346,19 @@ export default {
// xs 以上的屏幕
if
(
this
.
screenWidth
>
768
)
{
event
.
preventDefault
();
this
.
$refs
.
multipleTable
.
setCurrentRow
(
row
);
// 选中当前行
this
.
$nextTick
(()
=>
{
this
.
$refs
.
multipleTable
.
setCurrentRow
(
row
);
// 选中当前行
});
this
.
$openBox
.
contextMenu
({
selectedFile
:
row
,
domEvent
:
event
,
})
.
then
((
res
)
=>
{
this
.
$refs
.
multipleTable
.
setCurrentRow
();
// 取消当前选中行
this
.
$nextTick
(()
=>
{
this
.
$refs
.
multipleTable
.
setCurrentRow
(
row
);
// 选中当前行
});
if
(
res
===
"confirm"
)
{
this
.
$emit
(
"getTableDataByType"
);
// 刷新文件列表
// this.$store.dispatch("showStorage"); // 刷新存储容量
...
...
@@ -340,7 +371,10 @@ export default {
* @description 用于父组件调用 | 本组件调用,请勿删除
*/
clearSelectedTable
()
{
this
.
$refs
.
multipleTable
.
clearSelection
();
this
.
$nextTick
(()
=>
{
console
.
log
(
"this.$refs.multipleTable"
,
this
.
$refs
.
multipleTable
);
this
.
$refs
.
multipleTable
.
clearSelection
();
});
},
/**
* 表格选择项发生变化时的回调函数
...
...
@@ -364,7 +398,9 @@ export default {
domEvent
:
event
,
})
.
then
((
res
)
=>
{
this
.
$refs
.
multipleTable
.
setCurrentRow
();
// 取消当前选中行
this
.
$nextTick
(()
=>
{
this
.
$refs
.
multipleTable
.
setCurrentRow
(
row
);
// 选中当前行
});
if
(
res
===
"confirm"
)
{
this
.
$emit
(
"getTableDataByType"
);
// 刷新文件列表
// this.$store.dispatch("showStorage"); // 刷新存储容量
...
...
@@ -381,11 +417,11 @@ export default {
.file-table-wrapper
{
margin-top
:
2px
;
height
:
calc
(
100vh
-
262px
)
!
important
;
.file-type-0
{
height
:
calc
(
100vh
-
206px
)
!
important
;
//
height: calc(100vh - 206px) !important;
>>>
.el-table__body-wrapper
{
::v-deep
.el-table__body-wrapper
{
height
:
calc
(
100vh
-
262px
)
!
important
;
}
}
...
...
@@ -393,7 +429,7 @@ export default {
.file-type-6
{
height
:
calc
(
100vh
-
211px
)
!
important
;
>>>
.el-table__body-wrapper
{
::v-deep
.el-table__body-wrapper
{
height
:
calc
(
100vh
-
263px
)
!
important
;
}
}
...
...
@@ -401,16 +437,16 @@ export default {
.file-table.share
{
height
:
calc
(
100vh
-
109px
)
!
important
;
>>>
.el-table__body-wrapper
{
::v-deep
.el-table__body-wrapper
{
height
:
calc
(
100vh
-
161px
)
!
important
;
}
}
.file-table
{
width
:
100%
!
important
;
height
:
calc
(
100vh
-
2
03
px
);
height
:
calc
(
100vh
-
2
90
px
);
>>>
.el-table__header-wrapper
{
::v-deep
.el-table__header-wrapper
{
th
{
// background: $tabBackColor;
padding
:
4px
0
;
...
...
@@ -429,7 +465,7 @@ export default {
}
}
>>>
.el-table__body-wrapper
{
::v-deep
.el-table__body-wrapper
{
height
:
calc
(
100vh
-
255px
);
overflow-y
:
auto
;
// setScrollbar(6px, transparent, #C0C4CC);
...
...
src/components/file/AsideMenu.vue
浏览文件 @
d70d9125
...
...
@@ -323,7 +323,7 @@ export default {
}
}
>>>
.el-menu
{
::v-deep
.el-menu
{
background
:
transparent
;
}
...
...
@@ -357,7 +357,7 @@ export default {
.storage-wrapper.fold
{
padding
:
0
;
>>>
.el-progress--circle
{
::v-deep
.el-progress--circle
{
margin
:
0
auto
;
width
:
32px
;
display
:
block
;
...
...
@@ -409,7 +409,7 @@ export default {
// box-shadow: 0 4px 12px 0 $BorderExtralight;
// }
// }
//
>>>
.el-menu {
//
::v-deep
.el-menu {
// background: transparent;
// }
// // 对展开状态下的菜单设置宽度
...
...
@@ -440,7 +440,7 @@ export default {
// }
// .storage-wrapper.fold {
// padding: 0;
//
>>>
.el-progress--circle {
//
::v-deep
.el-progress--circle {
// margin: 0 auto;
// width: 32px;
// display: block;
...
...
src/components/file/FileList.vue
浏览文件 @
d70d9125
...
...
@@ -24,7 +24,7 @@
:filePath=
"filePath"
:fileList=
"fileList"
:loading
.
sync=
"loading"
v-if=
"fileModel ==
=
0"
v-if=
"fileModel == 0"
@
getTableDataByType=
"getTableDataByType"
@
click
.
native
.
right=
"handleClickRight"
></FileTable>
...
...
@@ -34,7 +34,7 @@
:filePath=
"filePath"
:fileList=
"fileList"
:loading=
"loading"
v-if=
"fileModel ==
=
1"
v-if=
"fileModel == 1"
@
getTableDataByType=
"getTableDataByType"
@
click
.
native
.
right=
"handleClickRight"
></FileGrid>
...
...
@@ -48,7 +48,7 @@
@
click
.
native
.
right=
"handleClickRight"
></FileTimeLine>
<div
class=
"pagination-wrapper"
>
<div
class=
"current-page-count"
>
当前页
{{
this
.
fileList
.
length
}}
条
</div>
<div
class=
"current-page-count"
>
当前页
{{
fileList
.
length
}}
条
</div>
<!-- 回收站不展示分页组件 -->
<el-pagination
:current-page=
"pageData.currentPage"
...
...
@@ -104,6 +104,7 @@ export default {
pageCount
:
50
,
total
:
0
,
},
searchFileName
:
""
,
//当前搜索的文件名称,支持文件名和文件夹名
};
},
computed
:
{
...
...
@@ -115,7 +116,9 @@ export default {
},
// 当前所在路径
filePath
()
{
return
this
.
$route
.
query
.
filePath
?
this
.
$route
.
query
.
filePath
:
"/我的创作"
;
return
this
.
$route
.
query
.
filePath
?
this
.
$route
.
query
.
filePath
:
"/我的创作"
;
},
// 文件查看模式 0列表模式 1网格模式 2 时间线模式
fileModel
()
{
...
...
@@ -128,11 +131,14 @@ export default {
},
watch
:
{
filePath
()
{
// debugger;
// 当左侧菜单选择“全部”或“我的分享”,文件路径发生变化时,再重新获取文件列表
if
(
this
.
$route
.
name
===
"File"
&&
[
0
,
8
].
includes
(
this
.
fileType
))
{
this
.
setPageCount
();
this
.
getTableDataByType
();
}
// if (this.$route.name === "File" && [0, 8].includes(this.fileType)) {
// this.setPageCount();
// this.getTableDataByType();
// }
this
.
setPageCount
();
this
.
getTableDataByType
();
},
fileType
()
{
if
(
this
.
$route
.
name
===
"File"
)
{
...
...
@@ -144,6 +150,12 @@ export default {
fileModel
()
{
this
.
setPageCount
();
},
// 监听搜索文件
searchFileName
()
{
console
.
log
(
"searchFileName"
);
this
.
setPageCount
();
this
.
getTableDataByType
();
},
},
created
()
{
this
.
setPageCount
();
...
...
@@ -189,7 +201,7 @@ export default {
*/
getTableDataByType
()
{
this
.
loading
=
true
;
console
.
log
(
"type:"
,
this
.
fileType
)
console
.
log
(
"type:"
,
this
.
fileType
);
// 分类型
if
(
Number
(
this
.
fileType
))
{
switch
(
Number
(
this
.
fileType
))
{
...
...
@@ -228,18 +240,20 @@ export default {
* 表格数据获取相关事件 | 获取当前路径下的文件列表
*/
showFileList
()
{
console
.
log
(
"showFileList"
);
let
data
=
{
fileType
:
this
.
fileType
,
filePath
:
this
.
filePath
,
currentPage
:
this
.
pageData
.
currentPage
,
pageCount
:
this
.
pageData
.
pageCount
,
fileName
:
this
.
searchFileName
,
};
const
params
=
new
URLSearchParams
();
for
(
const
key
in
data
)
{
params
.
append
(
key
,
data
[
key
]);
}
getFileListByPath
(
params
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
fileList
=
res
.
data
.
records
;
this
.
pageData
.
total
=
res
.
data
.
total
;
this
.
loading
=
false
;
...
...
@@ -278,22 +292,25 @@ export default {
/**
* 表格数据获取相关事件 | 获取我的创作文件列表
*/
showMyCreateFile
()
{
showMyCreateFile
()
{
console
.
log
(
"showMyCreateFile"
);
let
data
=
{
fileType
:
this
.
fileType
,
filePath
:
this
.
filePath
,
currentPage
:
this
.
pageData
.
currentPage
,
pageCount
:
this
.
pageData
.
pageCount
,
fileName
:
this
.
searchFileName
,
};
const
params
=
new
URLSearchParams
();
for
(
const
key
in
data
)
{
params
.
append
(
key
,
data
[
key
]);
}
getFileListByPath
(
params
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
fileList
=
res
.
data
.
records
;
this
.
pageData
.
total
=
res
.
data
.
total
;
this
.
loading
=
false
;
console
.
log
(
"200"
);
}
else
{
this
.
$message
.
error
(
res
.
msg
);
}
...
...
@@ -302,49 +319,51 @@ export default {
/**
* 表格数据获取相关事件 | 获取我的收藏文件列表
*/
showMyFavoriteFile
()
{
showMyFavoriteFile
()
{
let
data
=
{
fileType
:
this
.
fileType
,
filePath
:
this
.
filePath
,
currentPage
:
this
.
pageData
.
currentPage
,
pageCount
:
this
.
pageData
.
pageCount
,
fileName
:
this
.
searchFileName
,
};
const
params
=
new
URLSearchParams
();
for
(
const
key
in
data
)
{
params
.
append
(
key
,
data
[
key
]);
}
getFileListByPath
(
params
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
fileList
=
res
.
data
.
records
;
this
.
pageData
.
total
=
res
.
data
.
total
;
this
.
loading
=
false
;
}
else
{
this
.
$message
.
error
(
res
.
msg
);
}
this
.
loading
=
false
;
});
},
/**
* 表格数据获取相关事件 | 获取我的笔记文件列表
*/
showMyNoteFile
()
{
showMyNoteFile
()
{
let
data
=
{
fileType
:
this
.
fileType
,
filePath
:
this
.
filePath
,
currentPage
:
this
.
pageData
.
currentPage
,
pageCount
:
this
.
pageData
.
pageCount
,
fileName
:
this
.
searchFileName
,
};
const
params
=
new
URLSearchParams
();
for
(
const
key
in
data
)
{
params
.
append
(
key
,
data
[
key
]);
}
getFileListByPath
(
params
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
fileList
=
res
.
data
.
records
;
this
.
pageData
.
total
=
res
.
data
.
total
;
this
.
loading
=
false
;
}
else
{
this
.
$message
.
error
(
res
.
msg
);
}
this
.
loading
=
false
;
});
},
/**
...
...
@@ -358,13 +377,13 @@ export default {
pageCount
:
this
.
pageData
.
pageCount
,
};
getMyShareFileList
(
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
fileList
=
res
.
data
.
records
;
this
.
pageData
.
total
=
Number
(
res
.
data
.
total
);
this
.
loading
=
false
;
}
else
{
this
.
$message
.
error
(
res
.
msg
);
}
this
.
loading
=
false
;
});
},
/**
...
...
@@ -378,7 +397,7 @@ export default {
pageCount
:
this
.
pageData
.
pageCount
,
};
getFileListByType
(
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
fileList
=
res
.
data
.
records
;
this
.
pageData
.
total
=
Number
(
res
.
data
.
total
);
this
.
loading
=
false
;
...
...
@@ -393,20 +412,21 @@ export default {
* @param {string} fileName 文件名称
*/
getSearchFileList
(
fileName
)
{
this
.
loading
=
true
;
searchFile
({
currentPage
:
this
.
pageData
.
currentPage
,
pageCount
:
this
.
pageData
.
pageCount
,
fileName
:
fileName
,
}).
then
((
res
)
=>
{
this
.
loading
=
false
;
if
(
res
.
code
==
200
)
{
this
.
fileList
=
res
.
data
.
records
;
this
.
pageData
.
total
=
res
.
data
.
total
;
}
else
{
this
.
$message
.
error
(
res
.
msg
);
}
});
// this.loading = true;
this
.
searchFileName
=
fileName
;
// searchFile({
// currentPage: this.pageData.currentPage,
// pageCount: this.pageData.pageCount,
// fileName: fileName,
// }).then((res) => {
// this.loading = false;
// if (res.code == 200) {
// this.fileList = res.data.records;
// this.pageData.total = res.data.total;
// } else {
// this.$message.error(res.msg);
// }
// });
},
},
};
...
...
@@ -427,10 +447,11 @@ export default {
.pagination-wrapper
{
position
:
relative
;
border-top
:
1px
solid
$BorderBase
;
//
border-top: 1px solid $BorderBase;
height
:
44px
;
line-height
:
44px
;
text-align
:
center
;
padding-top
:
10px
;
.current-page-count
{
position
:
absolute
;
...
...
src/components/file/box/audioPreview/BoxMask.vue
浏览文件 @
d70d9125
...
...
@@ -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
,
...
...
@@ -806,7 +806,7 @@ export default {
margin-right
:
16px
;
flex
:
1
;
>>>
.el-slider__runway
{
::v-deep
.el-slider__runway
{
height
:
2px
;
.el-slider__button-wrapper
{
...
...
@@ -1072,7 +1072,7 @@ export default {
// .progress-bar {
// margin-right: 16px;
// flex: 1;
//
>>>
.el-slider__runway {
//
::v-deep
.el-slider__runway {
// height: 2px;
// .el-slider__button-wrapper {
// top: -17px;
...
...
@@ -1118,7 +1118,7 @@ export default {
// }
// .volume-bar {
// width: 100px;
//
>>>
.el-slider__runway {
//
::v-deep
.el-slider__runway {
// height: 2px;
// .el-slider__button-wrapper {
// top: -19px;
...
...
src/components/file/box/codePreview/BoxMask.vue
浏览文件 @
d70d9125
...
...
@@ -260,7 +260,7 @@ export default {
})
.
then
((
res
)
=>
{
this
.
codeMirrorLoading
=
false
;
if
(
res
.
success
)
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"已保存"
);
this
.
getCodeText
();
}
else
{
...
...
@@ -403,7 +403,7 @@ export default {
.editor-set-form
{
flex
:
1
;
text-align
:
right
;
>>>
.el-form-item
{
::v-deep
.el-form-item
{
margin-bottom
:
0
;
&
.font-size
{
.el-form-item__content
{
...
...
@@ -431,7 +431,7 @@ export default {
}
.code-editor
{
height
:
calc
(
100vh
-
129px
);
>>>
.CodeMirror
{
::v-deep
.CodeMirror
{
border-radius
:
0
0
8px
8px
;
height
:
inherit
;
font-size
:
inherit
;
...
...
src/components/file/box/contextMenu/Box.vue
浏览文件 @
d70d9125
...
...
@@ -11,7 +11,7 @@
>
<li
class=
"right-menu-item"
@
click=
"$file.handleFileNameClick(selectedFile, 0, [selectedFile])"
@
click=
"$file.handleFileNameClick
New
(selectedFile, 0, [selectedFile])"
v-if=
"seeBtnShow"
>
<i
class=
"el-icon-view"
></i>
查看
...
...
src/components/file/box/imgPreview/BoxMask.vue
浏览文件 @
d70d9125
...
...
@@ -420,7 +420,7 @@ export default {
width
:
100px
;
display
:
flex
;
>>>
.el-input-number
{
::v-deep
.el-input-number
{
width
:
40px
;
.el-input-number__decrease
,
...
...
@@ -569,7 +569,7 @@ export default {
width
:
600px
;
display
:
flex
;
>>>
.el-slider
{
::v-deep
.el-slider
{
flex
:
1
;
.el-slider__bar
{
...
...
src/components/file/box/markdownPreview/BoxMask.vue
浏览文件 @
d70d9125
...
...
@@ -213,7 +213,7 @@ export default {
})
.
then
((
res
)
=>
{
this
.
markdownLoading
=
false
;
if
(
res
.
success
)
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"已保存"
);
this
.
getMarkdownText
();
}
else
{
...
...
@@ -330,7 +330,7 @@ export default {
}
}
>>>
.v-note-wrapper
{
::v-deep
.v-note-wrapper
{
box-shadow
:
none
!
important
;
border
:
1px
solid
$BorderBase
;
.v-note-op
{
...
...
@@ -357,7 +357,7 @@ export default {
}
}
}
>>>
.v-note-wrapper
:not
(
.fullscreen
)
{
::v-deep
.v-note-wrapper
:not
(
.fullscreen
)
{
margin
:
56px
auto
0
auto
;
width
:
90vw
;
height
:
calc
(
100vh
-
80px
);
...
...
src/components/file/box/uploadFile/Box.vue
浏览文件 @
d70d9125
...
...
@@ -531,7 +531,7 @@ export default {
flex
:
1
;
text-align
:
right
;
>>>
.el-button--text
{
::v-deep
.el-button--text
{
color
:
$PrimaryText
;
i
[
class
^=
"el-icon-"
]
{
...
...
@@ -566,7 +566,7 @@ export default {
position
:
relative
;
background-color
:
#fff
;
>>>
.uploader-file
{
::v-deep
.uploader-file
{
height
:
40px
;
line-height
:
40px
;
...
...
@@ -599,7 +599,7 @@ export default {
}
}
>>>
.uploader-file
[
status
=
"success"
]
{
::v-deep
.uploader-file
[
status
=
"success"
]
{
.uploader-file-progress
{
border
:
none
;
}
...
...
@@ -607,7 +607,7 @@ export default {
}
.file-item.custom-status-item
{
>>>
.uploader-file-status
{
::v-deep
.uploader-file-status
{
visibility
:
hidden
;
}
...
...
src/components/file/box/videoPreview/VideoPlayer.vue
浏览文件 @
d70d9125
...
...
@@ -76,7 +76,7 @@ export default {
color
:
$Primary
;
// 播放按钮
>>>
.vjs-big-play-button
{
::v-deep
.vjs-big-play-button
{
border-radius
:
50%
;
border
:
6px
solid
$Primary
;
left
:
calc
(
50%
-
1em
);
...
...
@@ -94,14 +94,14 @@ export default {
}
}
// 改变各种“条”的颜色
>>>
.vjs-volume-level
,
>>>
.vjs-play-progress
,
>>>
.vjs-slider-bar
{
::v-deep
.vjs-volume-level
,
::v-deep
.vjs-play-progress
,
::v-deep
.vjs-slider-bar
{
background
:
$Primary
;
}
// 控制条按钮的大小
>>>
.vjs-control-bar
{
::v-deep
.vjs-control-bar
{
font-size
:
14px
;
}
}
...
...
src/components/file/components/FileGrid.vue
浏览文件 @
d70d9125
...
...
@@ -13,7 +13,7 @@
:title=
"$file.getFileNameComplete(item)"
:style=
"`width: $
{gridSize + 40}px; `"
:class="item.userFileId === selectedFile.userFileId ? 'active' : ''"
@click="$file.handleFileNameClick(item, index, fileListSorted)"
@click="$file.handleFileNameClick
New
(item, index, fileListSorted)"
@contextmenu.prevent="handleContextMenu(item, index, $event)"
>
<video
...
...
@@ -184,6 +184,137 @@ export default {
@import
"@/assets/styles/varibles.scss"
;
// .file-grid-wrapper {
// border-top: 1px solid $BorderBase;
// .file-list {
// height: calc(100vh - 206px);
// overflow-y: auto;
// display: flex;
// flex-wrap: wrap;
// align-items: flex-start;
// align-content: flex-start;
// list-style: none;
// @include setScrollbar(6px, transparent, #c0c4cc);
// .file-item {
// margin: 0 16px 16px 0;
// position: relative;
// padding: 8px;
// text-align: center;
// cursor: pointer;
// z-index: 1;
// &:hover {
// background: $tabBackColor;
// .file-name {
// font-weight: 550;
// }
// }
// .file-name {
// margin-top: 8px;
// height: 44px;
// line-height: 22px;
// font-size: 12px;
// word-break: break-all;
// @include setEllipsis(2);
// ::v-deep .keyword {
// color: $Danger;
// }
// }
// .file-checked-wrapper {
// position: absolute;
// top: 0;
// left: 0;
// z-index: 2;
// background: rgba(245, 247, 250, 0.5);
// width: 100%;
// height: 100%;
// .file-checked {
// position: absolute;
// top: 16px;
// left: 24px;
// }
// }
// &.checked {
// .file-checked-wrapper {
// background: rgba(245, 247, 250, 0);
// }
// }
// &.active {
// background: $tabBackColor;
// }
// }
// }
// .right-menu-list {
// position: fixed;
// display: flex;
// flex-direction: column;
// background: #fff;
// border: 1px solid $BorderLighter;
// border-radius: 4px;
// box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
// z-index: 2;
// padding: 4px 0;
// color: $RegularText;
// .right-menu-item,
// .unzip-item {
// padding: 0 16px;
// height: 36px;
// line-height: 36px;
// cursor: pointer;
// &:hover {
// background: $PrimaryHover;
// color: $Primary;
// }
// i {
// margin-right: 8px;
// }
// }
// .unzip-menu-item {
// position: relative;
// &:hover {
// .unzip-list {
// display: block;
// }
// }
// .unzip-list {
// position: absolute;
// display: none;
// .unzip-item {
// width: 200px;
// @include setEllipsis(1);
// }
// }
// }
// }
// .right-menu-list,
// .unzip-list {
// background: #fff;
// border: 1px solid $BorderLighter;
// border-radius: 4px;
// box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
// z-index: 2;
// padding: 4px 0;
// color: $RegularText;
// }
// }
.file-grid-wrapper
{
border-top
:
1px
solid
$BorderBase
;
...
...
@@ -220,7 +351,7 @@ export default {
font-size
:
12px
;
word-break
:
break-all
;
@include
setEllipsis
(
2
);
>>>
.keyword
{
::v-deep
.keyword
{
color
:
$Danger
;
}
}
...
...
@@ -241,16 +372,13 @@ export default {
}
}
&
.checked
{
.file-checked-wrapper
{
background
:
rgba
(
245
,
247
,
250
,
0
);
}
}
&
.active
{
background
:
$tabBackColor
;
.file-checked-wrapper.checked
{
background
:
rgba
(
245
,
247
,
250
,
0
);
}
}
.file-item.active
{
background
:
$tabBackColor
;
}
}
.right-menu-list
{
...
...
@@ -271,12 +399,10 @@ export default {
height
:
36px
;
line-height
:
36px
;
cursor
:
pointer
;
&
:hover
{
background
:
$PrimaryHover
;
color
:
$Primary
;
}
i
{
margin-right
:
8px
;
}
...
...
@@ -284,17 +410,14 @@ export default {
.unzip-menu-item
{
position
:
relative
;
&
:hover
{
.unzip-list
{
display
:
block
;
}
}
.unzip-list
{
position
:
absolute
;
display
:
none
;
.unzip-item
{
width
:
200px
;
@include
setEllipsis
(
1
);
...
...
@@ -302,7 +425,6 @@ export default {
}
}
}
.right-menu-list
,
.unzip-list
{
background
:
#fff
;
...
...
@@ -314,126 +436,4 @@ export default {
color
:
$RegularText
;
}
}
// .file-grid-wrapper {
// border-top: 1px solid $BorderBase;
// .file-list {
// height: calc(100vh - 206px);
// overflow-y: auto;
// display: flex;
// flex-wrap: wrap;
// align-items: flex-start;
// align-content: flex-start;
// list-style: none;
// setScrollbar(6px, transparent, #C0C4CC);
// .file-item {
// margin: 0 16px 16px 0;
// position: relative;
// padding: 8px;
// text-align: center;
// cursor: pointer;
// z-index: 1;
// &:hover {
// background: $tabBackColor;
// .file-name {
// font-weight: 550;
// }
// }
// .file-name {
// margin-top: 8px;
// height: 44px;
// line-height: 22px;
// font-size: 12px;
// word-break: break-all;
// setEllipsis(2);
// >>> .keyword {
// color: $Danger;
// }
// }
// .file-checked-wrapper {
// position: absolute;
// top: 0;
// left: 0;
// z-index: 2;
// background: rgba(245, 247, 250, 0.5);
// width: 100%;
// height: 100%;
// .file-checked {
// position: absolute;
// top: 16px;
// left: 24px;
// }
// }
// .file-checked-wrapper.checked {
// background: rgba(245, 247, 250, 0);
// }
// }
// .file-item.active {
// background: $tabBackColor;
// }
// }
// .right-menu-list {
// position: fixed;
// display: flex;
// flex-direction: column;
// background: #fff;
// border: 1px solid $BorderLighter;
// border-radius: 4px;
// box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
// z-index: 2;
// padding: 4px 0;
// color: $RegularText;
// .right-menu-item,
// .unzip-item {
// padding: 0 16px;
// height: 36px;
// line-height: 36px;
// cursor: pointer;
// &:hover {
// background: $PrimaryHover;
// color: $Primary;
// }
// i {
// margin-right: 8px;
// }
// }
// .unzip-menu-item {
// position: relative;
// &:hover {
// .unzip-list {
// display: block;
// }
// }
// .unzip-list {
// position: absolute;
// display: none;
// .unzip-item {
// width: 200px;
// setEllipsis(1)
// }
// }
// }
// }
// .right-menu-list,
// .unzip-list {
// background: #fff;
// border: 1px solid $BorderLighter;
// border-radius: 4px;
// box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
// z-index: 2;
// padding: 4px 0;
// color: $RegularText;
// }
// }
</
style
>
src/components/file/components/FileTimeLine.vue
浏览文件 @
d70d9125
...
...
@@ -165,7 +165,7 @@ export default {
font-size
:
12px
;
word-break
:
break-all
;
@include
setEllipsis
(
2
);
>>>
.keyword
{
::v-deep
.keyword
{
color
:
$Danger
;
}
}
...
...
@@ -211,7 +211,7 @@ export default {
// font-size: 12px;
// word-break: break-all;
// setEllipsis(2);
//
>>>
.keyword {
//
::v-deep
.keyword {
// color: $Danger;
// }
// }
...
...
src/components/file/components/OperationMenu.vue
浏览文件 @
d70d9125
...
...
@@ -6,7 +6,10 @@
>
<el-button-group
class=
"create-operate-group"
v-if=
"(!selectedFiles.length || !isBatchOperation) && [0,10,11,12].includes(fileType) "
v-if=
"
(!selectedFiles.length || !isBatchOperation) &&
[0, 10, 11, 12].includes(fileType)
"
>
<el-dropdown
class=
"upload-drop"
trigger=
"hover"
>
<el-button
...
...
@@ -101,7 +104,6 @@
<!-- 全局搜索文件 -->
<el-input
v-if=
"fileType === 0"
class=
"select-file-input"
v-model=
"searchFile.fileName"
placeholder=
"搜索您的文件"
...
...
@@ -135,13 +137,20 @@
></i>
<el-divider
direction=
"vertical"
></el-divider>
<template
v-if=
"screenWidth > 768"
>
<!-- fileGroupLable:
{{
fileGroupLable
}}
-->
<!-- 文件展示模式 -->
<i
class=
"model-icon iconfont icon-liebiao
1
"
<
!--
<
i
class=
"model-icon iconfont icon-liebiao"
:class=
"
{ active: fileGroupLable === 0 }"
title="列表模式"
@click="handleFileDisplayModelChange(0)"
>
</i>
>
</i>
-->
<svg-icon
icon-class=
"icon-liebiao"
@
click=
"handleFileDisplayModelChange(0)"
title=
"列表模式"
:class=
"
{ active: fileGroupLable === 0, 'model-icon': true }"
>
</svg-icon>
<i
class=
"model-icon el-icon-s-grid"
:class=
"
{ active: fileGroupLable === 1 }"
...
...
@@ -283,8 +292,14 @@ export default {
},
// 批量下载文件链接
batchDownloadLink
()
{
const
baseApi
=
"/api"
;
return
`
${
baseApi
}
/filetransfer/batchDownloadFile?userFileIds=
${
this
.
selectedFiles
// return `${
// process.env.VUE_APP_BASE_API
// }/filetransfer/batchDownloadFile?userFileIds=${this.selectedFiles
// .map((item) => item.userFileId)
// .join(",")}`;
return
`
${
process
.
env
.
VUE_APP_BASE_API
}
/v1/api/folder/transfer/batchDownloadFile?userFileIds=
${
this
.
selectedFiles
.
map
((
item
)
=>
item
.
userFileId
)
.
join
(
","
)}
`
;
},
...
...
@@ -326,7 +341,7 @@ export default {
filePath
:
this
.
$route
.
query
.
filePath
||
"/"
,
})
.
then
((
res
)
=>
{
console
.
log
(
"确认结果:"
,
res
)
console
.
log
(
"确认结果:"
,
res
);
if
(
res
===
"confirm"
)
{
this
.
$emit
(
"getTableDataByType"
);
}
...
...
@@ -525,7 +540,7 @@ export default {
.model-icon
{
margin-right
:
8px
;
&
:last-of-type
{
margin-right
:
0
;
//
margin-right: 0;
}
}
...
...
src/components/file/dialog/addFile/Dialog.vue
浏览文件 @
d70d9125
...
...
@@ -83,7 +83,7 @@ export default {
})
.
then
((
res
)
=>
{
this
.
sureBtnLoading
=
false
;
if
(
res
.
success
&&
res
.
code
===
0
)
{
if
(
res
.
code
==
20
0
)
{
this
.
$message
.
success
(
"文件创建成功"
);
this
.
$refs
[
formName
].
resetFields
();
this
.
visible
=
false
;
...
...
src/components/file/dialog/addFolder/Dialog.vue
浏览文件 @
d70d9125
...
...
@@ -116,7 +116,7 @@ export default {
})
.
then
((
res
)
=>
{
this
.
sureBtnLoading
=
false
;
if
(
res
.
success
)
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"文件夹创建成功"
);
this
.
$refs
[
formName
].
resetFields
();
this
.
visible
=
false
;
...
...
src/components/file/dialog/authWeChat/Dialog.vue
浏览文件 @
d70d9125
...
...
@@ -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
浏览文件 @
d70d9125
...
...
@@ -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
.
success
)
{
this
.
fileTree
=
[
res
.
data
];
if
(
res
.
code
==
200
)
{
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"
);
...
...
@@ -155,7 +181,7 @@ export default {
@import
"@/assets/styles/varibles.scss"
;
@import
"@/assets/styles/qw-mixins.scss"
;
>>>
.el-dialog
{
::v-deep
.el-dialog
{
.el-dialog__header
{
display
:
flex
;
}
...
...
src/components/file/dialog/deleteFile/Dialog.vue
浏览文件 @
d70d9125
...
...
@@ -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
浏览文件 @
d70d9125
...
...
@@ -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
.
success
)
{
this
.
fileTree
=
[
res
.
data
];
if
(
res
.
code
==
200
)
{
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"
);
...
...
@@ -183,7 +211,7 @@ export default {
@import
"@/assets/styles/varibles.scss"
;
@import
"@/assets/styles/qw-mixins.scss"
;
>>>
.el-dialog
{
::v-deep
.el-dialog
{
.el-dialog__header
{
display
:
flex
;
}
...
...
src/components/file/dialog/renameFile/Dialog.vue
浏览文件 @
d70d9125
...
...
@@ -90,7 +90,7 @@ export default {
})
.
then
((
res
)
=>
{
this
.
sureBtnLoading
=
false
;
if
(
res
.
success
)
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"重命名成功"
);
this
.
$refs
[
formName
].
resetFields
();
this
.
visible
=
false
;
...
...
src/components/file/dialog/restoreFile/Dialog.vue
浏览文件 @
d70d9125
...
...
@@ -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
浏览文件 @
d70d9125
...
...
@@ -93,7 +93,7 @@ export default {
this
.
loading
=
true
;
getFoldTree
().
then
((
res
)
=>
{
this
.
loading
=
false
;
if
(
res
.
success
)
{
if
(
res
.
code
==
200
)
{
this
.
fileTree
=
[
res
.
data
];
this
.
defaultExpandedKeys
=
id
?
[
id
]
:
[
this
.
fileTree
[
0
].
id
];
}
else
{
...
...
@@ -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
{
...
...
@@ -154,7 +154,7 @@ export default {
@import
"@/assets/styles/varibles.scss"
;
@import
"@/assets/styles/qw-mixins.scss"
;
>>>
.el-dialog
{
::v-deep
.el-dialog
{
.el-dialog__header
{
display
:
flex
;
}
...
...
src/components/file/dialog/shareFile/Dialog.vue
浏览文件 @
d70d9125
...
...
@@ -4,7 +4,7 @@
title=
"分享文件"
:visible
.
sync=
"visible"
:close-on-click-modal=
"false"
width=
"
55
0px"
width=
"
68
0px"
@
close=
"handleDialogCancel"
>
<el-form
...
...
@@ -13,10 +13,45 @@
:model=
"form"
ref=
"shareFileForm"
label-suffix=
":"
label-width=
"1
3
0px"
label-width=
"1
8
0px"
:label-position=
"screenWidth
<
=
520
?
'
top
'
:
'
right
'"
:rules=
"rules"
>
<el-form-item
label=
"分享给部门或个人"
prop=
"shareType"
>
<el-radio-group
v-model=
"form.shareType"
>
<el-radio
:label=
"0"
>
分享到公共社区
</el-radio>
<el-radio
:label=
"1"
>
分享到部门
</el-radio>
<el-radio
:label=
"2"
>
分享到个人
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
:label=
"getChooseDataLabel"
v-if=
"form.shareType == 1 || form.shareType == 2"
>
<el-tree
v-if=
"form.shareType == 1"
class=
"tree-border"
:data=
"deptOptions"
show-checkbox
default-expand-all
ref=
"dept"
node-key=
"id"
empty-text=
"加载中,请稍候"
:props=
"defaultProps"
></el-tree>
<PaginationSelector
v-if=
"form.shareType == 2"
@
pageNationChange=
"pageNationChange"
@
change=
"handleChangUserName"
:optionSource=
"userListAllByLocal"
v-model=
"userIds"
labelKey=
"userName"
valueKey=
"userId"
:paginationOption=
"setSelectPage"
/>
<!--
{{
userListAllByLocal
}}
-->
<!--
<div
v-if=
"form.shareType == 2"
>
人员列表
</div>
-->
</el-form-item>
<el-form-item
label=
"链接有效期至"
prop=
"endTime"
>
<el-date-picker
v-model=
"form.endTime"
...
...
@@ -31,7 +66,7 @@
</el-date-picker>
</el-form-item>
<el-form-item
label=
"是否需要提取码"
prop=
"shareType"
>
<el-radio-group
v-model=
"form.
shareTyp
e"
>
<el-radio-group
v-model=
"form.
isNeedCod
e"
>
<el-radio
:label=
"1"
>
是
</el-radio>
<el-radio
:label=
"0"
>
否
</el-radio>
</el-radio-group>
...
...
@@ -89,19 +124,27 @@
<
script
>
import
store
from
"@/store/index.js"
;
import
{
shareFile
}
from
"@/api/qwFile.js"
;
import
{
shareFile
}
from
"@/api/qwFile"
;
import
{
deptTreeSelect
,
listUser
}
from
"@/api/system/user"
;
import
PaginationSelector
from
"@/components/PaginationSelector"
;
export
default
{
name
:
"ShareFileDialog"
,
components
:
{
PaginationSelector
,
},
data
()
{
return
{
visible
:
false
,
// 对话框是否可见
// 分享文件对话框数据
form
:
{
isNeedCode
:
0
,
//是否需要提取码,0-是 1-否
endTime
:
""
,
shareType
:
0
,
shareType
:
0
,
//分享类型 0公共分享,1部门分享,2个人分享
},
rules
:
{
shareType
:
[
{
required
:
true
,
message
:
"请选择分享类别"
,
trigger
:
"blur"
},
],
endTime
:
[
{
required
:
true
,
message
:
"请选择链接有效期"
,
trigger
:
"blur"
},
],
...
...
@@ -158,6 +201,23 @@ export default {
shareBatchNum
:
""
,
extractionCode
:
""
,
},
// 部门列表
deptOptions
:
[],
defaultProps
:
{
children
:
"children"
,
label
:
"label"
,
},
//分页信息
setSelectPage
:
{
pageSize
:
5
,
//每页显示条数 3条刚好
pageNum
:
1
,
//当前页
pagerCount
:
5
,
//按钮数,超过时会折叠
total
:
0
,
//总条数
},
userIds
:
""
,
//用户id集合,用于绑定数据
userIdsParams
:
""
,
//用户id集合,用于提交给后台
userListAllByLocal
:
[],
userListAllPaged
:
[],
};
},
computed
:
{
...
...
@@ -165,6 +225,30 @@ export default {
screenWidth
()
{
return
store
.
state
.
common
.
screenWidth
;
},
getChooseDataLabel
()
{
if
(
this
.
form
.
shareType
==
1
)
{
return
"选择部门"
;
}
else
if
(
this
.
form
.
shareType
==
2
)
{
return
"选择个人"
;
}
},
},
watch
:
{
"form.shareType"
(
value
)
{
if
(
value
==
1
)
{
this
.
getDeptTree
();
// 清空人员的选择
this
.
clearCheckedUser
();
}
else
if
(
value
==
2
)
{
this
.
getUserList
();
// 清空部门的选择
this
.
clearCheckedDept
();
}
else
{
// 选择分享给全部时,要清空部门和人员的所有选择
this
.
clearCheckedUser
();
this
.
clearCheckedDept
();
}
},
},
methods
:
{
/**
...
...
@@ -175,6 +259,9 @@ export default {
this
.
$refs
[
"shareFileForm"
].
resetFields
();
this
.
visible
=
false
;
this
.
callback
(
"cancel"
);
// 清空部门和人员的所有选择
this
.
clearCheckedUser
();
this
.
clearCheckedDept
();
},
/**
* 分享文件对话框 | 确定按钮点击事件
...
...
@@ -182,6 +269,11 @@ export default {
* @param {string} formName 表单ref值
*/
handleDialogSure
(
formName
)
{
if
(
this
.
form
.
shareType
==
1
)
{
this
.
form
.
shareTo
=
this
.
getDeptAllCheckedKeys
();
}
else
if
(
this
.
form
.
shareType
==
2
)
{
this
.
form
.
shareTo
=
this
.
userIdsParams
;
}
this
.
sureBtnLoading
=
true
;
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
...
...
@@ -192,7 +284,7 @@ export default {
})
.
then
((
res
)
=>
{
this
.
sureBtnLoading
=
false
;
if
(
res
.
success
)
{
if
(
res
.
code
==
200
)
{
this
.
shareData
=
res
.
data
;
this
.
shareIsSuccess
=
true
;
this
.
callback
(
"confirm"
);
...
...
@@ -209,6 +301,77 @@ export default {
}
});
},
/**
* 根据角色ID查询部门树结构
* @param {string} roleId 当前用户角色id
*/
getDeptTree
()
{
// 若已经加载过不再重复调取接口
if
(
this
.
deptOptions
.
length
>
0
)
{
return
;
}
deptTreeSelect
().
then
((
response
)
=>
{
this
.
deptOptions
=
response
.
data
;
});
},
/**
* 获取被选择的组织id
* @returns {string} 组织Id以逗号隔开的字符串
*/
getDeptAllCheckedKeys
()
{
// 目前被选中的部门节点
let
checkedKeys
=
this
.
$refs
.
dept
.
getCheckedKeys
();
// 半选中的部门节点
// let halfCheckedKeys = this.$refs.dept.getHalfCheckedKeys();
// checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
return
checkedKeys
.
join
(
","
);
},
//下拉列表分页的点击的事件
pageNationChange
(
val
)
{
//设置当前页为点击的页
this
.
setSelectPage
.
pageNum
=
val
;
//重新调用分页查询的方法
this
.
getUserList
(
this
.
setSelectPage
);
},
//获取下拉框中的运动员编号--保存方案
handleChangUserName
(
val
)
{
this
.
userIdsParams
=
val
.
join
(
","
);
},
// 清空选中的人员
clearCheckedUser
()
{
this
.
userIds
=
""
;
this
.
userIdsParams
=
""
;
},
// 清空组织的选择
clearCheckedDept
()
{
if
(
this
.
$refs
.
dept
)
{
this
.
$refs
.
dept
.
setCheckedKeys
([]);
}
},
//查询所有用户列表
getUserList
(
setSelectPage
)
{
const
{
pageNum
,
pageSize
}
=
this
.
setSelectPage
;
const
params
=
{
pageNum
,
pageSize
};
listUser
(
params
).
then
((
res
)
=>
{
//下拉列表数据源绑定
this
.
userListAllByLocal
=
res
.
rows
;
//绑定总记录数
this
.
setSelectPage
.
total
=
res
.
total
;
//
if
(
this
.
userListAllPaged
.
length
===
0
)
{
this
.
userListAllPaged
=
res
.
rows
;
}
else
{
//追加数据
for
(
let
i
=
0
;
i
<
res
.
rows
.
length
;
i
++
)
{
this
.
userListAllPaged
.
push
(
res
.
rows
[
i
]);
}
}
});
},
},
};
</
script
>
...
...
src/components/file/dialog/showFileDetail/Dialog.vue
浏览文件 @
d70d9125
...
...
@@ -147,7 +147,7 @@ export default {
width
:
40%
;
height
:
auto
;
}
>>>
.el-form.file-info-form
{
::v-deep
.el-form.file-info-form
{
.el-form-item
{
margin-bottom
:
16px
;
.el-input__inner
{
...
...
src/components/file/dialog/unzipFile/Dialog.vue
浏览文件 @
d70d9125
...
...
@@ -101,7 +101,7 @@ export default {
this
.
loading
=
true
;
getFoldTree
().
then
((
res
)
=>
{
this
.
loading
=
false
;
if
(
res
.
success
)
{
if
(
res
.
code
==
200
)
{
this
.
fileTree
=
[
res
.
data
];
this
.
defaultExpandedKeys
=
id
?
[
id
]
:
[
this
.
fileTree
[
0
].
id
];
}
else
{
...
...
@@ -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"
);
...
...
@@ -172,7 +172,7 @@ export default {
@import
"@/assets/styles/varibles.scss"
;
@import
"@/assets/styles/qw-mixins.scss"
;
>>>
.el-dialog
{
::v-deep
.el-dialog
{
.el-dialog__header
{
display
:
flex
;
}
...
...
src/libs/qiwen/globalFunction/common.js
浏览文件 @
d70d9125
...
...
@@ -14,7 +14,7 @@ const commonFunction = {
* @param {object} others 域名、路径、有效期等,封装到对象中
*/
setCookies
(
name
,
value
,
others
=
null
)
{
Cookies
.
set
(
name
,
value
,
{
domain
:
c
onfig
.
domain
,
...
others
})
Cookies
.
set
(
name
,
value
,
{
domain
:
qwC
onfig
.
domain
,
...
others
})
},
/**
* 获取 Cookies
...
...
@@ -23,7 +23,7 @@ const commonFunction = {
* @returns {string} Cookies 值
*/
getCookies
(
name
,
others
=
null
)
{
return
Cookies
.
get
(
name
,
{
domain
:
c
onfig
.
domain
,
...
others
})
return
Cookies
.
get
(
name
,
{
domain
:
qwC
onfig
.
domain
,
...
others
})
},
/**
* 移除 Cookies
...
...
@@ -31,7 +31,7 @@ const commonFunction = {
* @param {object} others 域名、路径等,封装到对象中
*/
removeCookies
(
name
,
others
=
null
)
{
Cookies
.
remove
(
name
,
{
domain
:
c
onfig
.
domain
,
...
others
})
Cookies
.
remove
(
name
,
{
domain
:
qwC
onfig
.
domain
,
...
others
})
}
}
export
default
commonFunction
src/libs/qiwen/globalFunction/file.js
浏览文件 @
d70d9125
...
...
@@ -9,6 +9,7 @@ import {
markdownFileType
}
from
'@/libs/qiwen/map.js'
import
{
officeFileType
}
from
'@/libs/qiwen/map.js'
import
{
getViewUrlDbPath
}
from
'@/api/wps'
// 全局函数 - 文件相关
const
fileFunction
=
{
...
...
@@ -286,8 +287,98 @@ const fileFunction = {
Number
(
router
.
currentRoute
.
query
.
fileType
)
===
4
?
currentIndex
:
0
Vue
.
prototype
.
$openBox
.
audioPreview
({
audioList
,
defaultIndex
})
},
/**
* 文件预览——word使用wps预览,pdf使用pdf组件进行预览
* @description 若当前点击的为文件夹,则进入文件夹内部;若是文件,则进行相应的预览。
* @param {object} row 文件信息
* @param {number} currentIndex 当前文件索引
* @param {array} fileList 文件列表
*/
handleFileNameClickNew
(
row
,
currentIndex
,
fileList
=
[])
{
// 如果当前文件在回收站中,则不允许预览
if
(
row
.
deleteFlag
!==
undefined
&&
row
.
deleteFlag
!==
0
)
{
return
false
}
// 若是文件夹则进入该文件夹
if
(
row
.
isDir
)
{
// debugger
if
(
router
.
currentRoute
.
name
===
'Share'
)
{
// 当前是查看他人分享列表的页面
router
.
push
({
query
:
{
filePath
:
`
${
row
.
shareFilePath
===
'/'
?
''
:
row
.
shareFilePath
}
/
${
row
.
fileName
}
`
}
})
}
else
if
(
Number
(
router
.
currentRoute
.
query
.
fileType
)
===
8
)
{
// 当前是我的已分享列表页面
router
.
push
({
query
:
{
fileType
:
8
,
filePath
:
`
${
row
.
shareFilePath
===
'/'
?
''
:
row
.
shareFilePath
}
/
${
row
.
fileName
}
`
,
shareBatchNum
:
row
.
shareBatchNum
}
})
}
else
if
(
Number
(
router
.
currentRoute
.
query
.
fileType
)
!==
6
)
{
// 回收站页面不允许打开文件夹
// 网盘页面
router
.
push
({
query
:
{
filePath
:
`
${
row
.
filePath
===
'/'
?
''
:
row
.
filePath
}
/
${
row
.
fileName
}
`
,
fileType
:
router
.
currentRoute
.
query
.
fileType
}
})
}
}
else
{
const
WORD
=
[
'doc'
,
'docx'
]
const
PDF
=
[
'pdf'
]
// 若当前点击项是word
if
(
WORD
.
includes
(
row
.
extendName
.
toLowerCase
()))
{
let
flag
=
false
// 根据当前路由判断,是否支持编辑,目前只要我的创作才能够编辑
console
.
log
(
'router.currentRoute'
,
router
.
currentRoute
);
if
(
router
.
currentRoute
.
name
===
'MyCreate'
)
{
flag
=
true
}
console
.
log
(
123
,
row
);
const
{
fileId
,
identifier
}
=
row
const
params
=
{
fileId
:
identifier
,
flag
}
getViewUrlDbPath
(
params
).
then
(
res
=>
{
if
(
res
.
data
)
{
console
.
log
(
res
.
data
);
// 跳转 使用sessionStorage,避免关键信息在ip中暴露
// 使用push会停留当前页面,故不采纳
// params 传递参数,子组件无法渲染iframe组件,故不采纳
// localStorage.wpsUrl = res.data.wpsUrl
// localStorage.token = res.data.token
// let resolve = $el.$router.resolve({
// path: '/wpsReader',
// query: {
// wpsUrl: res.data.wpsUrl,
// token: res.data.token
// }
// })
// window.open(resolve.href, '_blank')
}
})
// router.push('/wpsReader')
return
false
}
// 若当前点击项是pdf
if
(
PDF
.
includes
(
row
.
extendName
.
toLowerCase
()))
{
router
.
push
(
'/pdfReader'
)
return
false
}
}
},
/**
* 文件预览
* 文件预览
——原始奇文的方法,使用的onlyoffice预览
* @description 若当前点击的为文件夹,则进入文件夹内部;若是文件,则进行相应的预览。
* @param {object} row 文件信息
* @param {number} currentIndex 当前文件索引
...
...
@@ -300,6 +391,7 @@ const fileFunction = {
}
// 若是文件夹则进入该文件夹
if
(
row
.
isDir
)
{
// debugger
if
(
router
.
currentRoute
.
name
===
'Share'
)
{
// 当前是查看他人分享列表的页面
router
.
push
({
...
...
@@ -325,7 +417,7 @@ const fileFunction = {
query
:
{
filePath
:
`
${
row
.
filePath
===
'/'
?
''
:
row
.
filePath
}
/
${
row
.
fileName
}
`
,
fileType
:
0
fileType
:
router
.
currentRoute
.
query
.
fileType
}
})
}
...
...
src/router/staticRoute.js
浏览文件 @
d70d9125
...
...
@@ -36,17 +36,17 @@ export const staticRouters = [
affix
:
false
}
},
{
path
:
'myTemplate'
,
component
:
()
=>
import
(
'@/views/mine/myTemplate/index.vue'
),
name
:
'MyTemplate'
,
meta
:
{
title
:
'我的模板'
,
icon
:
'dashboard'
,
noCache
:
false
,
affix
:
false
}
},
//
{
//
path: 'myTemplate',
//
component: () => import('@/views/mine/myTemplate/index.vue'),
//
name: 'MyTemplate',
//
meta: {
//
title: '我的模板',
//
icon: 'dashboard',
//
noCache: false,
//
affix: false
//
}
//
},
{
path
:
'myCollect'
,
component
:
()
=>
import
(
'@/views/mine/myCollect/index.vue'
),
...
...
src/store/getters.js
浏览文件 @
d70d9125
import
{
allColumnList
}
from
'@/libs/qiwen/map.js'
const
getters
=
{
sidebar
:
state
=>
state
.
app
.
sidebar
,
size
:
state
=>
state
.
app
.
size
,
...
...
@@ -16,7 +18,15 @@ const getters = {
defaultRoutes
:
state
=>
state
.
permission
.
defaultRoutes
,
sidebarRouters
:
state
=>
state
.
permission
.
sidebarRouters
,
//奇文
fileModel
:
state
=>
state
.
fileList
.
fileModel
,
// 文件查看模式
fileModel
:
(
state
)
=>
state
.
fileList
.
fileModel
===
null
?
0
:
Number
(
state
.
fileList
.
fileModel
),
// 表格显示列
selectedColumnList
:
(
state
)
=>
state
.
fileList
.
selectedColumnList
===
null
?
allColumnList
:
state
.
fileList
.
selectedColumnList
.
split
(
','
),
// 网格模式 & 时间线模式下 文件图标大小
gridSize
:
(
state
)
=>
state
.
fileList
.
gridSize
,
}
export
default
getters
src/utils/qwConfig.js
浏览文件 @
d70d9125
...
...
@@ -34,7 +34,7 @@ const qwConfig = {
/**
* 存放 token 时的命名方式
*/
tokenKeyName
:
'
t
oken'
tokenKeyName
:
'
Admin-T
oken'
}
export
default
qwConfig
src/views/read/wpsReader/index.vue
浏览文件 @
d70d9125
<
template
>
<div>
阅读wps
</div>
<div>
阅读wps
<div
id=
"viewFile"
></div>
</div>
</
template
>
<
script
>
export
default
{};
import
WebOfficeSDK
from
"/public/weboffice/web-office-sdk-v1.1.8.es"
;
export
default
{
mounted
()
{
// this.getBookList();
console
.
log
(
"WebOfficeSDK"
,
WebOfficeSDK
);
this
.
openWps
(
this
.
$route
.
query
.
wpsUrl
,
this
.
$route
.
query
.
token
);
},
methods
:
{
async
openWps
(
url
,
token
)
{
this
.
wps
=
WebOfficeSDK
.
config
({
wpsUrl
:
url
,
// 如果需要通过js-sdk传递token方式鉴权,则需要包含_w_tokentype=1参数
mount
:
document
.
querySelector
(
"#viewFile"
),
});
this
.
wps
.
setToken
({
token
});
this
.
wps
.
ready
();
},
},
};
</
script
>
<
style
lang=
""
></
style
>
vue.config.js
浏览文件 @
d70d9125
...
...
@@ -35,7 +35,7 @@ module.exports = {
proxy
:
{
// detail: https://cli.vuejs.org/config/#devserver-proxy
[
process
.
env
.
VUE_APP_BASE_API
]:
{
target
:
`http://
192.168.1.230
:9600`
,
target
:
`http://
222.85.214.245
:9600`
,
changeOrigin
:
true
,
pathRewrite
:
{
[
'^'
+
process
.
env
.
VUE_APP_BASE_API
]:
''
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论