Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-lab
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-lab
Commits
01dd3cfe
提交
01dd3cfe
authored
8月 22, 2022
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: update
上级
ca028022
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
4 行增加
和
133 行删除
+4
-133
AppUpload.vue
src/components/base/AppUpload.vue
+3
-6
PreviewFiles.vue
src/components/base/PreviewFiles.vue
+0
-88
Protocol.vue
src/components/base/Protocol.vue
+0
-36
ReportDialog.vue
src/modules/student/lab/components/ReportDialog.vue
+1
-3
没有找到文件。
src/components/base/AppUpload.vue
浏览文件 @
01dd3cfe
...
...
@@ -21,12 +21,9 @@ const uploadData = ref()
const
fileList
=
ref
<
UploadUserFile
[]
>
([])
watch
(
()
=>
props
.
modelValue
,
value
=>
{
fileList
.
value
=
Array
.
isArray
(
value
)
?
value
.
map
(
item
=>
({
...
item
}))
:
[]
}
)
watchEffect
(()
=>
{
fileList
.
value
=
Array
.
isArray
(
props
.
modelValue
)
?
props
.
modelValue
.
map
(
item
=>
({
...
item
}))
:
[]
})
const
showFileList
=
computed
(()
=>
{
return
Array
.
isArray
(
props
.
modelValue
)
...
...
src/components/base/PreviewFiles.vue
deleted
100644 → 0
浏览文件 @
ca028022
<
script
setup
lang=
"ts"
>
const
props
=
defineProps
({
url
:
{
type
:
String
,
require
:
true
}
})
const
isShowType
=
ref
(
1
)
// 判断用什么标签展示内容
if
(
props
.
url
?.
indexOf
(
'.pdf'
)
!==
-
1
||
props
.
url
?.
indexOf
(
'.txt'
)
!==
-
1
)
{
isShowType
.
value
=
2
}
else
if
(
props
.
url
?.
indexOf
(
'.mp4'
)
!==
-
1
)
{
isShowType
.
value
=
3
}
else
if
(
props
.
url
?.
indexOf
(
'.mp3'
)
!==
-
1
)
{
isShowType
.
value
=
4
}
else
if
(
props
.
url
?.
indexOf
(
'.png'
)
!==
-
1
||
props
.
url
?.
indexOf
(
'.jpg'
)
!==
-
1
||
props
.
url
?.
indexOf
(
'.jpeg'
)
!==
-
1
)
{
isShowType
.
value
=
5
}
else
if
(
props
.
url
?.
indexOf
(
'.rar'
)
!==
-
1
||
props
.
url
?.
indexOf
(
'.zip'
)
!==
-
1
)
{
isShowType
.
value
=
6
}
</
script
>
<
template
>
<div
class=
"max-w-h"
>
<iframe
v-if=
"isShowType === 1"
:src=
"`https://view.officeapps.live.com/op/view.aspx?src=$
{props.url}`">
</iframe>
<embed
:src=
"props.url"
v-else-if=
"isShowType === 2"
/>
<video
v-else-if=
"isShowType === 3"
controls
id=
"video"
>
<source
:src=
"props.url"
/>
</video>
<audio
v-else-if=
"isShowType === 4"
:src=
"props.url"
controls
></audio>
<img
v-else-if=
"isShowType === 5"
:src=
"props.url"
/>
<div
v-else-if=
"isShowType === 6"
class=
"zip_con"
>
<img
v-if=
"props.url?.indexOf('.rar') !== -1"
src=
"https://webapp-pub.ezijing.com/center_resource/rar.png"
class=
"img_zip"
/>
<img
v-else-if=
"props.url?.indexOf('.zip') !== -1"
src=
"https://webapp-pub.ezijing.com/center_resource/zip.png"
class=
"img_zip"
/>
<div
class=
"zip_tips"
>
* 该文件格式暂不支持预览
</div>
</div>
</div>
</
template
>
<
style
lang=
"scss"
scoped
>
.max-w-h
{
max-width
:
1200px
;
width
:
100%
;
height
:
500px
;
margin
:
0
auto
;
display
:
flex
;
justify-content
:
center
;
iframe
,
embed
,
video
{
width
:
100%
;
height
:
100%
;
}
.zip_con
{
border
:
1px
solid
#ccc
;
width
:
100%
;
display
:
block
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
flex-direction
:
column
;
}
.img_zip
{
width
:
100px
;
height
:
100px
;
}
.zip_tips
{
font-size
:
14px
;
margin-top
:
10px
;
}
img
{
width
:
100%
;
display
:
block
;
}
}
</
style
>
src/components/base/Protocol.vue
deleted
100644 → 0
浏览文件 @
ca028022
<
script
setup
lang=
"ts"
>
import
PreviewFiles
from
'./PreviewFiles.vue'
const
dialogVisible
=
ref
(
false
)
const
protocol
=
ref
(
false
)
const
emit
=
defineEmits
([
'change'
])
const
changeProtocol
=
(
flag
?:
boolean
)
=>
{
if
(
flag
!==
undefined
)
{
protocol
.
value
=
flag
}
emit
(
'change'
,
protocol
)
dialogVisible
.
value
=
false
}
</
script
>
<
template
>
<div
style=
"display: flex;align-items: center;"
>
<el-checkbox
@
change=
"changeProtocol()"
v-model=
"protocol"
size=
"large"
>
我已阅读并同意
</el-checkbox>
<span
class=
"red-color"
@
click=
"dialogVisible = true"
>
《紫荆教育用户入驻及网络教学资源协议》
</span>
</div>
<el-dialog
v-model=
"dialogVisible"
title=
"提示"
width=
"850px"
>
<PreviewFiles
url=
"https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/%E7%B4%AB%E8%8D%86%E6%95%99%E8%82%B2%E7%94%A8%E6%88%B7%E5%85%A5%E9%A9%BB%E5%8F%8A%E7%BD%91%E7%BB%9C%E6%95%99%E5%AD%A6%E8%B5%84%E6%BA%90%E5%8D%8F%E8%AE%AE(1).docx"
></PreviewFiles>
<template
#
footer
>
<el-button
type=
"primary"
@
click=
"changeProtocol(true)"
>
我已阅读并同意
</el-button>
</
template
>
</el-dialog>
</template>
<
style
lang=
"scss"
scoped
>
.red-color
{
color
:
#aa1941
;
cursor
:
pointer
;
}
</
style
>
src/modules/student/lab/components/ReportDialog.vue
浏览文件 @
01dd3cfe
...
...
@@ -21,9 +21,7 @@ const emit = defineEmits<{
const
formRef
=
$ref
<
FormInstance
>
()
const
form
=
reactive
<
any
>
({
files
:
[]
})
watchEffect
(()
=>
{
if
(
detail
?.
file
)
{
form
.
files
=
[
detail
.
file
]
}
form
.
files
=
detail
?.
file
?
[
detail
.
file
]
:
[]
})
const
rules
=
ref
<
FormRules
>
({
files
:
[{
required
:
true
,
message
:
'请上传实验报告文件'
,
trigger
:
'blur'
}]
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论