Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
rs-admin
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
翟畅
rs-admin
Commits
c19b75fe
提交
c19b75fe
authored
12月 15, 2023
作者:
翟畅
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
zc文件上传限制
上级
59ffad79
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
82 行增加
和
5 行删除
+82
-5
import.vue
src/components/dialog/import.vue
+31
-4
pdfImport.vue
src/components/dialog/pdfImport.vue
+26
-0
index.vue
src/views/resource_manage/video_module/index.vue
+25
-1
没有找到文件。
src/components/dialog/import.vue
浏览文件 @
c19b75fe
<
template
>
<div>
<!-- 导入 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"dialogImport"
:close-on-click-modal=
"false"
:before-close=
"close"
@
open=
"openDialog()"
width=
"430px"
class=
"importDialog"
>
<div
class=
"importTip"
>
操作提示:全部上传完成前请勿关闭窗口,避免数据丢失!
</div>
<div
class=
"importTip"
>
操作提示:
单次上传最多20个文件,
全部上传完成前请勿关闭窗口,避免数据丢失!
</div>
<el-upload
class=
"upload-demo"
ref=
"upload"
:accept=
"accept"
multiple
:limit=
"20"
:action=
"`$
{courseUrl}${action}`"
:on-progress="getListLength"
:on-preview="handlePreview"
:on-remove="handleRemove"
:file-list="fileList"
:on-exceed="handleExceed"
:on-success="handleSuccess"
:before-upload="beforeUpload">
<el-button
type=
"primary"
plain
size=
"small"
>
选择文件(可多选)
</el-button>
</el-upload>
<div
class=
"tipNum"
>
<div
class=
"selectLength"
>
共选择上传数量:
{{
currentFileList
.
length
}}
个
</div>
<div
class=
"uploadLength"
>
已成功上传数量:
{{
commonList
.
length
}}
个
</div>
</div>
<div
class=
"relationBook"
v-if=
"type!='book'"
>
所属图书:
<el-select
value-key=
"id"
v-model=
"bookList.name"
class=
"global_width"
clearable
filterable
remote
default-first-option
placeholder=
"请输入并关联所属图书"
:remote-method=
"getBookList"
@
clear=
"resourceBookList=[]"
@
change=
"selectChange"
>
...
...
@@ -83,6 +89,7 @@ export default {
resourceBookList
:[],
showRelationDialog
:
false
,
bookList
:
{},
currentFileList
:[],
}
},
methods
:
{
...
...
@@ -104,6 +111,9 @@ export default {
handlePreview
()
{
},
getListLength
(
event
,
file
,
fileList
){
this
.
currentFileList
=
fileList
},
handleRemove
(
file
,
fileList
)
{
//移除
this
.
bookEpub
=
[]
if
(
this
.
type
==
'book'
)
{
...
...
@@ -151,7 +161,7 @@ export default {
}
},
handleExceed
(
files
,
fileList
)
{
//上传限制
this
.
$message
.
warning
(
`当前限制选择
1
0 个文件`
);
this
.
$message
.
warning
(
`当前限制选择
2
0 个文件`
);
},
beforeUpload
(
file
)
{
let
type
=
file
.
name
.
slice
(
file
.
name
.
lastIndexOf
(
'.'
)
+
1
).
toLowerCase
()
...
...
@@ -284,9 +294,25 @@ export default {
padding
:
0
6px
;
}
.relationBook
{
padding-top
:
20
px
;
padding-top
:
5
px
;
.book_list
{
padding-top
:
10px
;
}
}
.tipNum
{
height
:
30px
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
margin
:
15px
auto
;
.selectLength
{
font-size
:
16px
;
color
:
#DE0000
;
padding-right
:
40px
;
}
.uploadLength
{
font-size
:
16px
;
color
:
#219177
;
}
}
</
style
>
\ No newline at end of file
src/components/dialog/pdfImport.vue
浏览文件 @
c19b75fe
...
...
@@ -9,6 +9,7 @@
multiple
:limit=
"10"
:action=
"`$
{pdfFileUrl}`"
:on-progress="getListLength"
:on-preview="handlePreview"
:on-remove="handleRemove"
:file-list="fileList"
...
...
@@ -17,6 +18,10 @@
:before-upload="beforeUpload">
<el-button
type=
"primary"
plain
size=
"small"
>
选择文件(可多选)
</el-button>
</el-upload>
<div
class=
"tipNum"
>
<div
class=
"selectLength"
>
共选择上传数量:
{{
currentFileList
.
length
}}
个
</div>
<div
class=
"uploadLength"
>
已成功上传数量:
{{
commonList
.
length
}}
个
</div>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"cancelAll"
>
全部取消
</el-button>
<el-button
size=
"small"
style=
"background:#1F71FF;color:#fff"
@
click=
"importSubmit"
:loading=
"sending"
>
全部上传
</el-button>
...
...
@@ -62,6 +67,7 @@ export default {
pdfFileUrl
,
bookEpub
:
[],
commonList
:
[],
currentFileList
:[],
}
},
methods
:
{
...
...
@@ -117,6 +123,9 @@ export default {
}
}
},
getListLength
(
event
,
file
,
fileList
){
this
.
currentFileList
=
fileList
},
handleSuccess
(
response
,
file
,
fileList
)
{
this
.
$message
.
success
(
'上传成功'
)
if
(
this
.
type
==
'pdf'
)
{
//pdf
...
...
@@ -178,4 +187,20 @@ export default {
margin-top
:
14px
;
padding
:
0
6px
;
}
.tipNum
{
height
:
30px
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
margin
:
15px
auto
;
.selectLength
{
font-size
:
16px
;
color
:
#DE0000
;
padding-right
:
40px
;
}
.uploadLength
{
font-size
:
16px
;
color
:
#219177
;
}
}
</
style
>
\ No newline at end of file
src/views/resource_manage/video_module/index.vue
浏览文件 @
c19b75fe
...
...
@@ -168,8 +168,9 @@ import { getSelectionIds } from "@/filters/getIds";
import
editPrice
from
"@/components/dialog/editPrice"
;
import
editSort
from
"@/components/dialog/editSort"
;
import
importDia
from
"@/components/dialog/import"
;
import
{
pcUrl
}
from
'@/utils/global'
import
{
baseUrl
,
pcUrl
,
requestPath
}
from
'@/utils/global'
import
QRCode
from
"qrcodejs2"
;
import
queryString
from
"query-string"
;
export
default
{
name
:
'video_module'
,
components
:
{
...
...
@@ -179,6 +180,7 @@ export default {
},
data
()
{
return
{
requestPath
,
topBtn
:[],
lineBtn
:[],
classisyFlag
:
false
,
...
...
@@ -341,9 +343,31 @@ export default {
qrCodeLine
:
()
=>
{
this
.
qrCodeCreate
(
id
)
},
batchExportQrBtn
:
()
=>
{
this
.
getBatchExport
()
}
};
status
[
btnName
]();
},
getBatchExport
(){
if
(
this
.
isExist
(
this
.
chooiceList
))
{
//至少选中一条
let
ids
=
getSelectionIds
(
this
.
chooiceList
);
let
data
=
{
ids
:
ids
}
let
{...
params
}
=
data
let
tempParams
=
{}
for
(
const
key
in
params
)
{
if
(({}).
hasOwnProperty
.
call
(
params
,
key
)
&&
params
[
key
]
!==
null
&&
params
[
key
]
!==
''
&&
params
[
key
]
!==
undefined
)
{
tempParams
[
key
]
=
params
[
key
]
}
}
let
paramStr
=
queryString
.
stringify
(
tempParams
)
confirm
.
apply
(
this
,
[
"确定批量导出选中的视频二维码吗?"
]).
then
(()
=>
{
window
.
open
(
`
${
process
.
env
.
VUE_APP_BASE_API
}${
requestPath
.
resource
}
/video-library/batch/download?
${
paramStr
}
`
)
});
}
},
qrCodeCreate
(
id
){
this
.
centerQRDialogVisible
=
true
setTimeout
(()
=>
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论