Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-resource
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-resource
Commits
13b7cbf6
提交
13b7cbf6
authored
7月 12, 2022
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
资源类型增加zip
上级
bc2fb40c
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
21 行增加
和
17 行删除
+21
-17
CardListItem.vue
src/components/base/CardListItem.vue
+2
-2
StepTwo.vue
src/modules/course/create/views/StepTwo.vue
+17
-13
Update.vue
src/modules/resource/other/views/Update.vue
+2
-2
没有找到文件。
src/components/base/CardListItem.vue
浏览文件 @
13b7cbf6
...
@@ -8,7 +8,7 @@ const props: any = defineProps<{
...
@@ -8,7 +8,7 @@ const props: any = defineProps<{
tabIndex
:
string
tabIndex
:
string
}
>
()
}
>
()
const
fileType
=
[
'doc'
,
'docx'
,
'xls'
,
'xlsx'
,
'pdf'
,
'ppt'
,
'pptx'
,
'mp3'
,
'mp4'
,
'png'
,
'jpeg'
,
'jpg'
,
'rar'
]
const
fileType
=
[
'doc'
,
'docx'
,
'xls'
,
'xlsx'
,
'pdf'
,
'ppt'
,
'pptx'
,
'mp3'
,
'mp4'
,
'png'
,
'jpeg'
,
'jpg'
,
'rar'
,
'zip'
]
const
bytesToSize
=
(
bytes
:
number
)
=>
{
const
bytesToSize
=
(
bytes
:
number
)
=>
{
if
(
bytes
===
0
)
return
'0 B'
if
(
bytes
===
0
)
return
'0 B'
...
@@ -31,7 +31,7 @@ const bytesToSize = (bytes: number) => {
...
@@ -31,7 +31,7 @@ const bytesToSize = (bytes: number) => {
<div
class=
"info"
>
学习人次:
{{
props
.
data
.
learn_count
}}
人次
</div>
<div
class=
"info"
>
学习人次:
{{
props
.
data
.
learn_count
}}
人次
</div>
</div>
</div>
<img
<img
:src=
"`https://webapp-pub.
oss-cn-beijing.aliyuncs
.com/center_resource/$
{props.data.type}.png`"
:src=
"`https://webapp-pub.
ezijing
.com/center_resource/$
{props.data.type}.png`"
v-if="fileType.includes(props.data.type)"
v-if="fileType.includes(props.data.type)"
/>
/>
<el-icon
class=
"item-info-icon"
v-else
>
<el-icon
class=
"item-info-icon"
v-else
>
...
...
src/modules/course/create/views/StepTwo.vue
浏览文件 @
13b7cbf6
...
@@ -179,45 +179,48 @@ const handleDrop = (startNode: any, endNode: any, position: any) => {
...
@@ -179,45 +179,48 @@ const handleDrop = (startNode: any, endNode: any, position: any) => {
const
imgUrl
=
(
node
:
any
)
=>
{
const
imgUrl
=
(
node
:
any
)
=>
{
if
(
node
.
data
.
resource_type
===
'1'
)
{
if
(
node
.
data
.
resource_type
===
'1'
)
{
// 章节
// 章节
return
'https://webapp-pub.
oss-cn-beijing.aliyuncs
.com/center_resource/chapter_img.png'
return
'https://webapp-pub.
ezijing
.com/center_resource/chapter_img.png'
}
else
if
(
node
.
data
.
resource_type
===
'2'
)
{
}
else
if
(
node
.
data
.
resource_type
===
'2'
)
{
// 视频
// 视频
return
'https://webapp-pub.
oss-cn-beijing.aliyuncs
.com/center_resource/mp4_img.png'
return
'https://webapp-pub.
ezijing
.com/center_resource/mp4_img.png'
}
else
if
(
node
.
data
.
resource_type
===
'3'
)
{
}
else
if
(
node
.
data
.
resource_type
===
'3'
)
{
// 作业
// 作业
return
'https://webapp-pub.
oss-cn-beijing.aliyuncs
.com/center_resource/homework.png'
return
'https://webapp-pub.
ezijing
.com/center_resource/homework.png'
}
else
if
(
node
.
data
.
resource_type
===
'4'
||
node
.
data
.
resource_type
===
'10'
||
node
.
data
.
resource_type
===
'11'
)
{
}
else
if
(
node
.
data
.
resource_type
===
'4'
||
node
.
data
.
resource_type
===
'10'
||
node
.
data
.
resource_type
===
'11'
)
{
if
(
node
.
data
.
resource
?.
url
.
includes
(
'pptx'
)
||
node
.
data
.
resource
?.
url
.
includes
(
'ppt'
))
{
if
(
node
.
data
.
resource
?.
url
.
includes
(
'pptx'
)
||
node
.
data
.
resource
?.
url
.
includes
(
'ppt'
))
{
// 其他资源
// 其他资源
return
'https://webapp-pub.
oss-cn-beijing.aliyuncs
.com/center_resource/pptx_img.png'
return
'https://webapp-pub.
ezijing
.com/center_resource/pptx_img.png'
}
else
if
(
node
.
data
.
resource
?.
url
.
includes
(
'rar'
))
{
}
else
if
(
node
.
data
.
resource
?.
url
.
includes
(
'rar'
))
{
// 其他资源
// 其他资源
return
'https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/rar_img.png'
return
'https://webapp-pub.ezijing.com/center_resource/rar_img.png'
}
else
if
(
node
.
data
.
resource
?.
url
.
includes
(
'zip'
))
{
// 其他资源
return
'https://webapp-pub.ezijing.com/center_resource/zip_img.png'
}
else
if
(
node
.
data
.
resource
?.
url
.
includes
(
'mp3'
))
{
}
else
if
(
node
.
data
.
resource
?.
url
.
includes
(
'mp3'
))
{
// 其他资源
// 其他资源
return
'https://webapp-pub.
oss-cn-beijing.aliyuncs
.com/center_resource/mp3_img.png'
return
'https://webapp-pub.
ezijing
.com/center_resource/mp3_img.png'
}
else
if
(
node
.
data
.
resource
?.
url
.
includes
(
'mp4'
))
{
}
else
if
(
node
.
data
.
resource
?.
url
.
includes
(
'mp4'
))
{
// 其他资源
// 其他资源
return
'https://webapp-pub.
oss-cn-beijing.aliyuncs
.com/center_resource/mp4_img.png'
return
'https://webapp-pub.
ezijing
.com/center_resource/mp4_img.png'
}
else
if
(
node
.
data
.
resource
?.
url
.
includes
(
'docx'
)
||
node
.
data
.
resource
?.
url
.
includes
(
'doc'
))
{
}
else
if
(
node
.
data
.
resource
?.
url
.
includes
(
'docx'
)
||
node
.
data
.
resource
?.
url
.
includes
(
'doc'
))
{
return
'https://webapp-pub.
oss-cn-beijing.aliyuncs
.com/center_resource/docx_img.png'
return
'https://webapp-pub.
ezijing
.com/center_resource/docx_img.png'
}
else
if
(
node
.
data
.
resource
?.
url
.
includes
(
'xls'
)
||
node
.
data
.
resource
?.
url
.
includes
(
'xlsx'
))
{
}
else
if
(
node
.
data
.
resource
?.
url
.
includes
(
'xls'
)
||
node
.
data
.
resource
?.
url
.
includes
(
'xlsx'
))
{
return
'https://webapp-pub.
oss-cn-beijing.aliyuncs
.com/center_resource/xls_img.png'
return
'https://webapp-pub.
ezijing
.com/center_resource/xls_img.png'
}
else
if
(
}
else
if
(
node
.
data
.
resource
?.
url
.
includes
(
'png'
)
||
node
.
data
.
resource
?.
url
.
includes
(
'png'
)
||
node
.
data
.
resource
?.
url
.
includes
(
'jpeg'
)
||
node
.
data
.
resource
?.
url
.
includes
(
'jpeg'
)
||
node
.
data
.
resource
?.
url
.
includes
(
'jpg'
)
node
.
data
.
resource
?.
url
.
includes
(
'jpg'
)
)
{
)
{
return
'https://webapp-pub.
oss-cn-beijing.aliyuncs
.com/center_resource/jpg_img.png'
return
'https://webapp-pub.
ezijing
.com/center_resource/jpg_img.png'
}
else
if
(
node
.
data
.
resource
?.
url
.
includes
(
'pdf'
))
{
}
else
if
(
node
.
data
.
resource
?.
url
.
includes
(
'pdf'
))
{
return
'https://webapp-pub.
oss-cn-beijing.aliyuncs
.com/center_resource/pdf_img.png'
return
'https://webapp-pub.
ezijing
.com/center_resource/pdf_img.png'
}
}
}
else
if
(
node
.
data
.
resource_type
===
'6'
)
{
}
else
if
(
node
.
data
.
resource_type
===
'6'
)
{
// 直播
// 直播
return
'https://webapp-pub.
oss-cn-beijing.aliyuncs
.com/center_resource/live_img.png'
return
'https://webapp-pub.
ezijing
.com/center_resource/live_img.png'
}
else
if
(
node
.
data
.
resource_type
===
'9'
)
{
}
else
if
(
node
.
data
.
resource_type
===
'9'
)
{
// 考试
// 考试
return
'https://webapp-pub.
oss-cn-beijing.aliyuncs
.com/center_resource/test_img.png'
return
'https://webapp-pub.
ezijing
.com/center_resource/test_img.png'
}
}
}
}
const
nodeType
=
(
node
:
any
)
=>
{
const
nodeType
=
(
node
:
any
)
=>
{
...
@@ -245,6 +248,7 @@ const nodeType = (node: any) => {
...
@@ -245,6 +248,7 @@ const nodeType = (node: any) => {
}
}
const
handleNodeExpand
=
(
data
:
any
)
=>
{
const
handleNodeExpand
=
(
data
:
any
)
=>
{
defaultExpandedKeys
.
value
=
[
data
.
id
]
defaultExpandedKeys
.
value
=
[
data
.
id
]
console
.
log
(
defaultExpandedKeys
.
value
)
}
}
const
handleNodeCollapse
=
()
=>
{
const
handleNodeCollapse
=
()
=>
{
defaultExpandedKeys
.
value
=
[]
defaultExpandedKeys
.
value
=
[]
...
...
src/modules/resource/other/views/Update.vue
浏览文件 @
13b7cbf6
...
@@ -154,7 +154,7 @@ const changeProtocol = (data: any) => {
...
@@ -154,7 +154,7 @@ const changeProtocol = (data: any) => {
<div
class=
"upload-video"
>
<div
class=
"upload-video"
>
<div
class=
"upload-box"
>
<div
class=
"upload-box"
>
<AppUpload
<AppUpload
accept=
".doc,.docx,.xls,.xlsx,.pdf,.ppt,.pptx,.mp3,.mp4,.png,.jpeg,.jpg,.rar"
accept=
".doc,.docx,.xls,.xlsx,.pdf,.ppt,.pptx,.mp3,.mp4,.png,.jpeg,.jpg,.rar
,.zip
"
:limit=
"1"
:limit=
"1"
v-model=
"form.file"
v-model=
"form.file"
></AppUpload>
></AppUpload>
...
@@ -162,7 +162,7 @@ const changeProtocol = (data: any) => {
...
@@ -162,7 +162,7 @@ const changeProtocol = (data: any) => {
</div>
</div>
</div>
</div>
<div
class=
"tips"
>
<div
class=
"tips"
>
文件支持格式包含:doc docx xls xlsx pdf ppt pptx mp3 mp4 png jpeg jpg rar,大小不超过200M
文件支持格式包含:doc docx xls xlsx pdf ppt pptx mp3 mp4 png jpeg jpg rar
zip
,大小不超过200M
</div>
</div>
</div>
</div>
</el-form-item>
</el-form-item>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论