Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
992f71f4
提交
992f71f4
authored
5月 31, 2021
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
5807d279
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
25 行增加
和
25 行删除
+25
-25
chapterWork.vue
src/modules/viewer/components/work/chapterWork.vue
+13
-10
chapterWorkComment.vue
src/modules/viewer/components/work/chapterWorkComment.vue
+11
-14
chapterWorkCommentItem.vue
...modules/viewer/components/work/chapterWorkCommentItem.vue
+1
-1
没有找到文件。
src/modules/viewer/components/work/chapterWork.vue
浏览文件 @
992f71f4
...
...
@@ -67,7 +67,7 @@
<!--
评论同学作业
-->
<
chapter
-
work
-
comment
id
=
"comment"
:
end
Date
=
"commentEndDat
e"
:
end
Time
=
"commentEndTim
e"
:
status
=
"detail.status2"
@
update
=
"$emit('updateHomework')"
v
-
if
=
"showComment"
...
...
@@ -151,7 +151,8 @@ export default {
hasUpload
:
true
,
// 是否可以上传
isAnonymous
:
false
,
// 是否匿名
hasComment
:
false
,
// 是否评论
commentEndDate
:
''
,
commentStartTime
:
''
,
// 评论开始时间
commentEndTime
:
''
,
// 评论结束时间
rules
:
{
user_answer
:
[{
required
:
true
,
message
:
'请输入'
,
trigger
:
'change'
}
]
}
,
...
...
@@ -225,15 +226,16 @@ export default {
return
false
}
const
currentTime
=
new
Date
().
getTime
()
const
endTime
=
+
new
Date
(
this
.
deadlin
e
)
return
this
.
hasComment
&&
currentTime
>
end
Time
&&
this
.
detail
.
status
!==
1
const
startTime
=
+
new
Date
(
this
.
commentStartTim
e
)
return
this
.
hasComment
&&
currentTime
>
=
start
Time
&&
this
.
detail
.
status
!==
1
}
,
disabled
()
{
if
(
this
.
detail
.
status
===
1
)
{
return
false
}
// -1未处理 0已处理 1驳回
return
this
.
detail
.
status
===
0
||
!
this
.
isWorkTime
return
this
.
detail
.
status
===
0
// if (this.detail.status === 1)
{
// return false
//
}
// // -1未处理 0已处理 1驳回
// return this.detail.status === 0 || !this.isWorkTime
}
,
dialogTitle
()
{
if
(
this
.
detail
.
status
===
1
&&
this
.
detail
.
status2
===
1
)
{
...
...
@@ -255,7 +257,8 @@ export default {
this
.
hasUpload
=
response
.
pdf
!==
0
this
.
isAnonymous
=
!!
response
.
anonymous
this
.
hasComment
=
!!
response
.
comment
this
.
commentEndDate
=
response
.
comment_end
this
.
commentStartTime
=
response
.
comment_begin
this
.
commentEndTime
=
response
.
comment_end
}
)
}
,
// 组装问题数据
...
...
src/modules/viewer/components/work/chapterWorkComment.vue
浏览文件 @
992f71f4
...
...
@@ -11,13 +11,7 @@
ref=
"form"
>
<el-form-item
prop=
"comment"
>
<chapter-work-comment-item
:data=
"item"
:index=
"index"
:endDate=
"endDate"
:disabled=
"disabled"
:key=
"item.id"
/>
</el-form-item
<chapter-work-comment-item
:data=
"item"
:index=
"index"
:disabled=
"disabled"
:key=
"item.id"
/>
</el-form-item
></el-form>
</
template
>
<div
class=
"button"
v-if=
"status !== 0"
>
...
...
@@ -25,7 +19,7 @@
$t('viewerWork.commentSubmitText')
}}
</el-button>
<p
v-if=
"status === 1"
>
注:重新提交后不可修改,请检查好作业内容再做提交。
</p>
<
p
v-else
>
{{ $t('viewerWork.commentSubmitTips', { date: endDate }) }}
</p
>
<
!-- <p v-else>{{ $t('viewerWork.commentSubmitTips', { date: endTime }) }}</p> --
>
</div>
<slot></slot>
<div
class=
"more"
>
...
...
@@ -45,7 +39,7 @@ import ChapterWorkCommentItem from './chapterWorkCommentItem.vue'
export
default
{
components
:
{
Container
,
ChapterWorkCommentItem
},
props
:
{
end
Dat
e
:
{
type
:
String
},
status
:
{
type
:
Number
}
},
props
:
{
end
Tim
e
:
{
type
:
String
},
status
:
{
type
:
Number
}
},
data
()
{
return
{
list
:
[],
...
...
@@ -70,17 +64,20 @@ export default {
},
isSubmitTime
()
{
// 大于开始时间,小于结束时间
const
endTime
=
+
new
Date
(
this
.
end
Dat
e
)
const
endTime
=
+
new
Date
(
this
.
end
Tim
e
)
const
currentTime
=
new
Date
().
getTime
()
return
currentTime
<
endTime
},
// 是否禁用
disabled
()
{
// -1未处理 0已处理 1驳回
if
(
this
.
status
===
1
)
{
return
false
if
(
this
.
status
===
0
)
{
return
true
}
return
!
this
.
isSubmitTime
// -1未处理 0已处理 1驳回
// if (this.status === 1) {
// return false
// }
// return !this.isSubmitTime
}
},
methods
:
{
...
...
src/modules/viewer/components/work/chapterWorkCommentItem.vue
浏览文件 @
992f71f4
...
...
@@ -11,7 +11,7 @@ import ChapterWorkAnswerItem from './chapterWorkAnswerItem.vue'
import
VEditor
from
'@/components/tinymce'
export
default
{
props
:
{
endDate
:
{
type
:
String
},
data
:
{
type
:
Object
,
default
:
()
=>
({})
},
disabled
:
{
type
:
Boolean
}
},
props
:
{
data
:
{
type
:
Object
,
default
:
()
=>
({})
},
disabled
:
{
type
:
Boolean
}
},
components
:
{
ChapterWorkAnswerItem
,
VEditor
},
data
()
{
return
{}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论