Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-resource
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-resource
Commits
5ec334f0
提交
5ec334f0
authored
7月 08, 2022
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug fixes
上级
daa7a5cb
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
139 行增加
和
25 行删除
+139
-25
AddChapterDialog.vue
.../create/components/stepTwoComponents/AddChapterDialog.vue
+5
-2
AddSectionDialog.vue
.../create/components/stepTwoComponents/AddSectionDialog.vue
+1
-1
StepOne.vue
src/modules/course/create/views/StepOne.vue
+1
-1
StepTwo.vue
src/modules/course/create/views/StepTwo.vue
+1
-1
Operation.vue
src/modules/course/my/components/Operation.vue
+8
-1
ViewCourseInfo.vue
src/modules/course/my/components/ViewCourseInfo.vue
+99
-4
View.vue
src/modules/course/my/views/View.vue
+22
-13
ViewDetails.vue
src/modules/course/my/views/ViewDetails.vue
+2
-2
没有找到文件。
src/modules/course/create/components/stepTwoComponents/AddChapterDialog.vue
浏览文件 @
5ec334f0
...
...
@@ -12,7 +12,10 @@ const form = reactive({
resource_id
:
''
})
const
rules
=
reactive
<
FormRules
>
({
name
:
[{
required
:
true
,
message
:
'请输入章名称'
,
trigger
:
'blur'
}]
name
:
[
{
required
:
true
,
message
:
'请输入章名称'
,
trigger
:
'blur'
},
{
min
:
1
,
max
:
25
,
trigger
:
'blur'
}
]
})
const
props
=
defineProps
({
isShowDialog
:
{
...
...
@@ -80,7 +83,7 @@ onMounted(() => {
>
<el-form
:model=
"form"
:rules=
"rules"
ref=
"ruleFormRef"
label-width=
"80px"
>
<el-form-item
label=
"章-名称:"
prop=
"name"
>
<el-input
v-model=
"form.name"
></el-input>
<el-input
v-model=
"form.name"
maxlength=
"25"
></el-input>
</el-form-item>
</el-form>
<template
#
footer
>
...
...
src/modules/course/create/components/stepTwoComponents/AddSectionDialog.vue
浏览文件 @
5ec334f0
...
...
@@ -83,7 +83,7 @@ onMounted(() => {
<p>
{{
chapterName
}}
</p>
</el-form-item>
<el-form-item
label=
"节-名称:"
prop=
"name"
>
<el-input
v-model=
"form.name"
></el-input>
<el-input
v-model=
"form.name"
maxlength=
"25"
></el-input>
</el-form-item>
</el-form>
<template
#
footer
>
...
...
src/modules/course/create/views/StepOne.vue
浏览文件 @
5ec334f0
...
...
@@ -230,7 +230,7 @@ const createCourseForm = () => {
<!-- 添加考试 -->
<AddExam
:data=
"examList"
@
change=
"changeExam"
style=
"width: 100%"
></AddExam>
</el-form-item>
<el-form-item
label=
"
课程考试:
"
prop=
"live_id"
>
<el-form-item
label=
"
周期性直播
"
prop=
"live_id"
>
<!-- 添加直播 -->
<AddLive
:data=
"liveList"
@
change=
"changeLive"
style=
"width: 100%"
></AddLive>
</el-form-item>
...
...
src/modules/course/create/views/StepTwo.vue
浏览文件 @
5ec334f0
...
...
@@ -373,7 +373,7 @@ const imgUrl = (node: any) => {
color
:
#b2833d
;
border
:
none
;
border-radius
:
16px
;
margin
:
8
px
;
margin
:
3
px
;
}
.btn_edit
{
color
:
#b2833d
;
...
...
src/modules/course/my/components/Operation.vue
浏览文件 @
5ec334f0
...
...
@@ -11,7 +11,9 @@ const router = useRouter()
const
route
=
useRoute
()
const
props
=
defineProps
([
'data'
])
const
emit
=
defineEmits
<
{
(
e
:
'update'
):
void
}
>
()
// 详情id
const
id
=
route
.
query
.
id
as
string
// 设置部门共享
...
...
@@ -37,6 +39,7 @@ const handleDepartment = () => {
setTimeout
(()
=>
{
router
.
go
(
0
)
},
500
)
emit
(
'update'
)
}
})
})
...
...
@@ -65,6 +68,7 @@ const handlePlatform = () => {
setTimeout
(()
=>
{
router
.
go
(
0
)
},
500
)
emit
(
'update'
)
}
})
})
...
...
@@ -93,6 +97,7 @@ const handleStatus = () => {
setTimeout
(()
=>
{
router
.
go
(
0
)
},
500
)
emit
(
'update'
)
}
})
})
...
...
@@ -118,6 +123,7 @@ const handlesetBelong = () => {
setBelong
({
id
:
id
,
belong_operator
:
form
.
members
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
0
)
{
ElMessage
({
message
:
'更改成功'
,
type
:
'success'
})
emit
(
'update'
)
setTimeout
(()
=>
{
dialogFormVisible
.
value
=
false
},
500
)
...
...
@@ -134,6 +140,7 @@ const courseAuthorizeConfirm = () => {
if
(
res
.
code
===
0
)
{
ElMessage
({
message
:
'授权成功'
,
type
:
'success'
})
dialogVisibleAuthorize
.
value
=
false
emit
(
'update'
)
}
})
}
...
...
src/modules/course/my/components/ViewCourseInfo.vue
浏览文件 @
5ec334f0
...
...
@@ -85,6 +85,85 @@ const basicInfo = computed((): IBasicInfo[] => {
})
return
basicList
})
const
add0
=
(
m
:
number
)
=>
{
return
m
<
10
?
'0'
+
m
:
m
}
const
format
=
(
n
:
number
)
=>
{
const
time
=
new
Date
(
n
)
const
y
=
time
.
getFullYear
()
const
m
=
time
.
getMonth
()
+
1
const
d
=
time
.
getDate
()
const
h
=
time
.
getHours
()
const
mm
=
time
.
getMinutes
()
const
s
=
time
.
getSeconds
()
return
y
+
'-'
+
add0
(
m
)
+
'-'
+
add0
(
d
)
+
' '
+
add0
(
h
)
+
':'
+
add0
(
mm
)
+
':'
+
add0
(
s
)
}
const
listOptions
=
computed
(()
=>
{
return
{
data
:
props
.
data
.
examinations
,
columns
:
[
{
label
:
'试卷名称'
,
prop
:
'paper_title'
},
{
label
:
'组卷模式'
,
prop
:
'paper_type'
,
computed
:
(
row
:
any
)
=>
{
return
row
.
row
.
paper_type
===
1
?
'选题组卷'
:
'自动组卷'
}
},
{
label
:
'试卷用途'
,
prop
:
'paper_uses'
,
computed
:
(
row
:
any
)
=>
{
if
(
row
.
row
.
paper_type
===
1
)
{
return
'考试'
}
else
if
(
row
.
row
.
paper_type
===
2
)
{
return
'课后作业'
}
else
if
(
row
.
row
.
paper_type
===
3
)
{
return
'课程测试'
}
}
},
{
label
:
'总分'
,
prop
:
'paper_total_score'
,
align
:
'center'
},
{
label
:
'及格分数'
,
prop
:
'pass_score'
,
align
:
'center'
}
]
}
})
const
liveOptions
=
computed
(()
=>
{
return
{
data
:
props
.
data
.
meetings
,
columns
:
[
{
label
:
'会议code'
,
prop
:
'meeting_code'
,
align
:
'center'
},
{
label
:
'主题'
,
prop
:
'subject'
,
align
:
'center'
},
{
label
:
'开始时间'
,
prop
:
'start_time'
,
align
:
'center'
,
computed
({
row
}:
any
)
{
if
(
row
.
start_time
===
undefined
)
{
return
'-'
}
else
{
return
format
(
parseInt
(
row
.
start_time
)
*
1000
)
}
}
},
{
label
:
'结束时间'
,
prop
:
'end_time'
,
align
:
'center'
,
computed
({
row
}:
any
)
{
if
(
row
.
end_time
===
undefined
)
{
return
'-'
}
else
{
return
format
(
parseInt
(
row
.
end_time
)
*
1000
)
}
}
}
]
}
})
</
script
>
<
template
>
<div
class=
"info-box"
>
...
...
@@ -100,11 +179,19 @@ const basicInfo = computed((): IBasicInfo[] => {
</div>
</div>
</div>
<div
class=
"bottom-info"
>
<div
class=
"lecturer-list"
>
<div
class=
"item"
v-for=
"item in props.data.lecturers"
:key=
"item.id"
>
<div
class=
"avatar"
:style=
"`background-image:url($
{item.avatar})`">
</div>
<div
class=
"name"
>
{{
item
.
name
}}
</div>
<div
v-for=
"item in props.data.lecturers"
:key=
"item.id"
>
<el-popover
placement=
"top-start"
:title=
"item.name"
trigger=
"hover"
>
<div
v-html=
"item.summarize"
></div>
<template
#
reference
>
<div
class=
"item"
>
<div
class=
"avatar"
:style=
"`background-image:url($
{item.avatar})`">
</div>
<div
class=
"name"
>
{{
item
.
name
}}
</div>
</div>
</
template
>
</el-popover>
</div>
</div>
<div
class=
"other-info"
>
...
...
@@ -122,7 +209,9 @@ const basicInfo = computed((): IBasicInfo[] => {
<div
class=
"item"
>
<img
src=
"https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/course-view-icon12.png"
/>
<div
class=
"label"
>
课程授权信息
</div>
<div
class=
"value"
v-for=
"(item, index) in props.data"
:key=
"index"
>
{{
item
.
department_name
}}
</div>
<div
class=
"value"
v-for=
"(item, index) in props.data.auth_departments"
:key=
"index"
>
{{ item.department_name }}
</div>
</div>
</div>
</div>
...
...
@@ -139,6 +228,12 @@ const basicInfo = computed((): IBasicInfo[] => {
<el-form-item
label=
"授课目标:"
>
<v-editor
disabled
v-model=
"form.target"
class=
"editor"
:height=
"200"
></v-editor>
</el-form-item>
<el-form-item
label=
"课程考试:"
>
<AppList
v-bind=
"listOptions"
style=
"width: 100%"
>
</AppList>
</el-form-item>
<el-form-item
label=
"周期性直播:"
>
<AppList
v-bind=
"liveOptions"
style=
"width: 100%"
>
</AppList>
</el-form-item>
</el-form>
</div>
</template>
...
...
src/modules/course/my/views/View.vue
浏览文件 @
5ec334f0
...
...
@@ -10,30 +10,39 @@ const route = useRoute()
const
id
=
route
.
query
.
id
as
string
const
courseDetails
:
any
=
ref
({})
const
courseDetails
:
any
=
ref
({})
onMounted
(()
=>
{
// 课程详情
getViewCourseDetails
({
id
:
id
}).
then
((
res
:
any
)
=>
{
handleGetViewCourseDetails
()
})
const
handleGetViewCourseDetails
=
()
=>
{
getViewCourseDetails
({
id
:
id
}).
then
((
res
:
any
)
=>
{
courseDetails
.
value
=
res
.
data
})
}
)
}
const
handleFresh
=
()
=>
{
handleGetViewCourseDetails
()
}
</
script
>
<
template
>
<AppCard
title=
"查阅课程"
>
<Operation
:data=
"courseDetails"
></Operation>
<div
class=
"course-view"
>
<div
class=
"course-left_info"
>
<ViewCourseInfo
:data=
"courseDetails"
></ViewCourseInfo>
<ViewCourseChapter
v-if=
"Object.keys(courseDetails).length"
:data=
"courseDetails.chapters[0]?.children || []"
></ViewCourseChapter>
<AppCard
title=
"查阅课程"
>
<Operation
:data=
"courseDetails"
@
update=
"handleFresh"
></Operation>
<div
class=
"course-view"
>
<div
class=
"course-left_info"
>
<ViewCourseInfo
:data=
"courseDetails"
></ViewCourseInfo>
<ViewCourseChapter
v-if=
"Object.keys(courseDetails).length"
:data=
"courseDetails.chapters[0]?.children || []"
></ViewCourseChapter>
</div>
</div>
</div>
</AppCard>
</AppCard>
</
template
>
<
style
lang=
"scss"
scoped
>
.course-view
{
.course-view
{
display
:
flex
;
.course-left_info
{
.course-left_info
{
width
:
840px
;
display
:
flex
;
}
...
...
src/modules/course/my/views/ViewDetails.vue
浏览文件 @
5ec334f0
...
...
@@ -149,7 +149,7 @@ const liveOptions = computed(() => {
prop
:
'start_time'
,
align
:
'center'
,
computed
({
row
}:
any
)
{
return
format
(
parseInt
(
row
.
start_time
))
return
format
(
parseInt
(
row
.
start_time
)
*
1000
)
}
},
{
...
...
@@ -157,7 +157,7 @@ const liveOptions = computed(() => {
prop
:
'end_time'
,
align
:
'center'
,
computed
({
row
}:
any
)
{
return
format
(
parseInt
(
row
.
end_time
))
return
format
(
parseInt
(
row
.
end_time
)
*
1000
)
}
},
{
label
:
'操作'
,
slots
:
'table-operate'
,
align
:
'center'
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论