Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
064d8228
提交
064d8228
authored
4月 22, 2021
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug fixes
上级
24938a73
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
77 行增加
和
17 行删除
+77
-17
index.vue
src/components/ckeditor/index.vue
+16
-0
chapterWork.vue
src/modules/viewer/components/work/chapterWork.vue
+13
-10
chapterWorkAnswerItem.vue
src/modules/viewer/components/work/chapterWorkAnswerItem.vue
+16
-2
chapterWorkComment.vue
src/modules/viewer/components/work/chapterWorkComment.vue
+19
-4
chapterWorkCommentItem.vue
...modules/viewer/components/work/chapterWorkCommentItem.vue
+10
-0
style.scss
src/style.scss
+3
-1
没有找到文件。
src/components/ckeditor/index.vue
浏览文件 @
064d8228
...
...
@@ -54,6 +54,22 @@ export default {
},
onEditorInput
(
value
)
{
this
.
$emit
(
'input'
,
value
)
this
.
dispatch
(
'ElFormItem'
,
'el.form.change'
,
value
)
},
dispatch
(
componentName
,
eventName
,
params
)
{
var
parent
=
this
.
$parent
||
this
.
$root
var
name
=
parent
.
$options
.
componentName
while
(
parent
&&
(
!
name
||
name
!==
componentName
))
{
parent
=
parent
.
$parent
if
(
parent
)
{
name
=
parent
.
$options
.
componentName
}
}
if
(
parent
)
{
parent
.
$emit
.
apply
(
parent
,
[
eventName
].
concat
(
params
))
}
}
}
}
...
...
src/modules/viewer/components/work/chapterWork.vue
浏览文件 @
064d8228
<
template
>
<div>
<container
:title=
"chapter.name"
v-loading=
"loading"
>
<template
v-slot:header-aside
v-if=
"isRevised"
>
{{
$t
(
'viewerWork.score'
)
}}
:
{{
detail
.
score
}}{{
$t
(
'viewerWork.fractionUnit'
)
}}
</
template
>
<div
class=
"exam-form"
>
<
template
v-for=
"(item, index) in questions"
>
<el-form
:disabled=
"disabled"
:key=
"item.id"
ref=
"form"
:model=
"item.formModel"
:rules=
"rules"
>
...
...
@@ -19,7 +22,7 @@
</div>
<p
style=
"color: red"
v-if=
"deadline"
>
{{ $t('viewerWork.deadline', { date: deadline }) }}
</p>
<!-- 驳回状态 -->
<
template
v-if=
"detail
&& detail
.status === 1"
>
<
template
v-if=
"detail.status === 1"
>
<div
class=
"work-bottom"
>
<div
class=
"info"
>
<div
class=
"paper-check"
>
...
...
@@ -74,7 +77,7 @@
<
/div
>
<
/template
>
<
/container
>
<
chapter
-
work
-
comment
:
endDate
=
"commentEndDate"
v
-
if
=
"showComment"
/>
<
chapter
-
work
-
comment
:
endDate
=
"commentEndDate"
:
status
=
"detail.status2"
v
-
if
=
"showComment"
/>
<
/div
>
<
/template
>
...
...
@@ -111,7 +114,7 @@ export default {
data
()
{
return
{
loading
:
false
,
detail
:
null
,
detail
:
{
}
,
questions
:
[],
// 问题列表
startTime
:
new
Date
().
getTime
(),
// 进入时间
messageInstance
:
null
,
...
...
@@ -158,7 +161,7 @@ export default {
}
,
// 是否批改
isRevised
()
{
return
this
.
detail
?
this
.
detail
.
status
===
0
:
false
return
this
.
detail
.
status
===
0
}
,
// 提交按钮文本
submitText
()
{
...
...
@@ -185,11 +188,11 @@ export default {
return
this
.
hasComment
&&
currentTime
>
endTime
}
,
disabled
()
{
// -1未处理 0已处理 1驳回
if
(
this
.
detail
&&
this
.
detail
.
status
===
-
1
)
{
if
(
this
.
detail
.
status
===
9
)
{
return
false
}
return
[
0
,
1
].
includes
(
this
.
detail
?
this
.
detail
.
status
:
null
)
||
!
this
.
isWorkTime
// -1未处理 0已处理 1驳回 9重新编辑
return
[
0
,
1
].
includes
(
this
.
detail
.
status
)
||
!
this
.
isWorkTime
}
}
,
methods
:
{
...
...
@@ -209,8 +212,8 @@ export default {
api
.
getChapterHomework
(
this
.
sid
,
this
.
cid
,
this
.
resourceId
)
.
then
(
response
=>
{
this
.
detail
=
Array
.
isArray
(
response
)
?
null
:
response
if
(
this
.
detail
)
{
this
.
detail
=
Array
.
isArray
(
response
)
?
{
}
:
response
if
(
this
.
detail
.
id
)
{
const
parseAnswers
=
JSON
.
parse
(
this
.
detail
.
work_contents
)
// 设置答案
this
.
questions
=
this
.
questions
.
map
(
item
=>
{
...
...
@@ -333,7 +336,7 @@ export default {
}
,
// 重新编辑
onReEdit
()
{
this
.
detail
.
status
=
-
1
this
.
detail
.
status
=
9
}
}
,
beforeMount
()
{
...
...
src/modules/viewer/components/work/chapterWorkAnswerItem.vue
浏览文件 @
064d8228
...
...
@@ -45,10 +45,16 @@ export default {
<
style
lang=
"scss"
>
.chatper-work-answer-item
{
border-bottom
:
1px
solid
#c9c9c9
7a
;
// padding-bottom: 10px;
// border-bottom: 1px solid #c9c9c97a;
margin-bottom
:
20px
;
.item
{
padding
:
10px
;
border-radius
:
8px
;
background-color
:
#fff
;
}
.item
+
.item
{
border-top
:
1px
dashed
#c9c9c9
7a
;
margin-top
:
10px
;
}
.file
{
display
:
inline-block
;
...
...
@@ -60,4 +66,12 @@ export default {
}
}
}
.chapter-work-answer-item-hd
{
margin-bottom
:
10px
;
}
.chapter-work-answer-item-bd
{
img
{
max-width
:
100%
;
}
}
</
style
>
src/modules/viewer/components/work/chapterWorkComment.vue
浏览文件 @
064d8228
<
template
>
<container
:title=
"$t('viewerWork.commentTitle')"
>
<template
v-for=
"(item, index) in list"
>
<el-form
:disabled=
"disabled"
:key=
"item.id"
ref=
"form"
:model=
"item"
:rules=
"rules"
>
<el-form-item
:label=
"$t('viewerWork.commentMyTitle')"
prop=
"comment"
>
<el-form
label-position=
"top"
:disabled=
"disabled"
:model=
"item"
:rules=
"rules"
:hide-required-asterisk=
"true"
:key=
"item.id"
ref=
"form"
>
<el-form-item
prop=
"comment"
>
<chapter-work-comment-item
:data=
"item"
:index=
"index"
...
...
@@ -36,12 +44,12 @@ import ChapterWorkCommentItem from './chapterWorkCommentItem.vue'
export
default
{
components
:
{
Container
,
ChapterWorkCommentItem
},
props
:
{
endDate
:
{
type
:
String
}
},
props
:
{
endDate
:
{
type
:
String
}
,
status
:
{
type
:
Number
}
},
data
()
{
return
{
list
:
[],
rules
:
{
comment
:
[{
required
:
true
,
message
:
'请输入评价内容'
,
trigger
:
'
blur
'
}]
comment
:
[{
required
:
true
,
message
:
'请输入评价内容'
,
trigger
:
'
change
'
}]
}
}
},
...
...
@@ -66,6 +74,10 @@ export default {
},
// 是否禁用
disabled
()
{
// -1未处理 0已处理 1驳回
if
(
this
.
status
===
1
)
{
return
false
}
return
!
this
.
isSubmitTime
}
},
...
...
@@ -131,4 +143,7 @@ export default {
padding-left
:
20px
;
}
}
::v-deep
.el-form-item__content
{
line-height
:
24px
;
}
</
style
>
src/modules/viewer/components/work/chapterWorkCommentItem.vue
浏览文件 @
064d8228
<
template
>
<chapter-work-answer-item
:data=
"data"
:key=
"data.id"
v-bind=
"$attrs"
>
<h3
class=
"comment-title"
>
{{
$t
(
'viewerWork.commentMyTitle'
)
}}
</h3>
<v-editor
v-model=
"data.comment"
:disabled=
"disabled"
></v-editor>
</chapter-work-answer-item>
</
template
>
...
...
@@ -17,3 +18,12 @@ export default {
}
}
</
script
>
<
style
lang=
"scss"
>
.comment-title
{
margin
:
10px
0
;
font-size
:
14px
;
font-weight
:
normal
;
// padding: 10px 0;
}
</
style
>
src/style.scss
浏览文件 @
064d8228
...
...
@@ -12,7 +12,9 @@ body {
font-family
:
'Source Han Sans CN'
,
'PingFang SC'
,
-
apple-system
,
'Microsoft YaHei'
,
'Helvetica'
,
'Arial'
,
Verdana
,
'Hiragino Sans GB'
,
'Wenquanyi Micro Hei'
,
sans-serif
;
}
p
{
margin
:
0
;
}
/* 公共标题 - 样式 /app/learn */
.con-title
{
padding
:
0
30px
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论