Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
d11b33b3
提交
d11b33b3
authored
8月 05, 2022
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore(课后作业): 课后作业可上传多个文件
上级
0fbfc0a6
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
14 行增加
和
6 行删除
+14
-6
upload.vue
src/modules/viewer/components/common/upload.vue
+6
-2
chapterTest.vue
src/modules/viewer/components/work/chapterTest.vue
+1
-1
chapterWork.vue
src/modules/viewer/components/work/chapterWork.vue
+6
-2
examItem.vue
src/modules/viewer/components/work/examItem.vue
+1
-1
没有找到文件。
src/modules/viewer/components/common/upload.vue
浏览文件 @
d11b33b3
...
...
@@ -2,7 +2,7 @@
<div
class=
"upload"
>
<el-upload
action
:disabled=
"disabled"
:show-file-list=
"false"
:http-request=
"httpRequest"
v-bind=
"$attrs"
>
<slot></slot>
<el-button
type=
"text"
icon=
"el-icon-upload"
>
{{
$t
(
'viewerWork.clickUpload'
)
}}
</el-button>
<el-button
type=
"text"
icon=
"el-icon-upload"
:loading=
"isUploading"
>
{{
$t
(
'viewerWork.clickUpload'
)
}}
</el-button>
<template
v-slot:tip
>
<div
class=
"el-upload__tips"
>
<slot
name=
"tip"
></slot>
...
...
@@ -43,7 +43,8 @@ export default {
},
data
()
{
return
{
fileList
:
[]
fileList
:
[],
isUploading
:
false
}
},
watch
:
{
...
...
@@ -67,6 +68,7 @@ export default {
},
methods
:
{
httpRequest
(
xhr
)
{
this
.
isUploading
=
true
api
.
uploadFile
({
file
:
xhr
.
file
})
.
then
(
response
=>
{
...
...
@@ -79,8 +81,10 @@ export default {
this
.
$emit
(
'input'
,
response
.
url
)
}
}
this
.
isUploading
=
false
})
.
catch
(
error
=>
{
this
.
isUploading
=
false
this
.
$message
.
error
(
error
.
message
)
})
},
...
...
src/modules/viewer/components/work/chapterTest.vue
浏览文件 @
d11b33b3
...
...
@@ -123,7 +123,7 @@ export default {
formModel
:
{
id
:
item
.
id
,
user_answer
:
item
.
user_answer
?
Base64
.
decode
(
item
.
user_answer
)
:
''
,
attachments
:
item
.
attachments
||
''
attachments
:
item
.
attachments
||
[]
}
}
}
...
...
src/modules/viewer/components/work/chapterWork.vue
浏览文件 @
d11b33b3
...
...
@@ -275,7 +275,7 @@ export default {
formModel
:
{
id
:
item
.
id
,
user_answer
:
item
.
user_answer
?
Base64
.
decode
(
item
.
user_answer
)
:
''
,
attachments
:
item
.
attachments
||
''
attachments
:
item
.
attachments
||
[]
}
}
}
...
...
@@ -296,7 +296,11 @@ export default {
const
found
=
parseAnswers
.
find
(
answer
=>
answer
.
question_id
===
item
.
id
)
if
(
found
)
{
item
.
user_answer
=
found
.
descreption
item
.
attachments
=
found
.
file_url
let
attachments
=
[]
if
(
found
.
file_url
)
{
attachments
=
Array
.
isArray
(
found
.
file_url
)
?
found
.
file_url
:
[{
name
:
'附件下载'
,
url
:
found
.
file_url
}
]
}
item
.
attachments
=
attachments
}
return
item
}
)
...
...
src/modules/viewer/components/work/examItem.vue
浏览文件 @
d11b33b3
...
...
@@ -28,7 +28,7 @@
<!-- 简答题 -->
<
template
v-if=
"type === 3"
>
<v-editor
v-model=
"currentValue.user_answer"
:disabled=
"disabled"
></v-editor>
<v-upload
:disabled=
"disabled"
v-model=
"currentValue.attachments"
v-if=
"hasUpload"
<v-upload
multiple
:disabled=
"disabled"
v-model=
"currentValue.attachments"
v-if=
"hasUpload"
>
{{
$t
(
'viewerWork.workUrl.label'
)
}}
:
</v-upload
>
</
template
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论