Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
2b83926d
提交
2b83926d
authored
12月 27, 2021
作者:
haodaking
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into sofia
上级
ffd53da2
3fa9a0b8
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
183 行增加
和
105 行删除
+183
-105
base_api.js
src/api/base_api.js
+5
-0
index.js
src/modules/offices/api/index.js
+14
-0
pay.vue
src/modules/offices/components/pay.vue
+31
-24
index.vue
src/modules/offices/src/index.vue
+1
-1
edit.vue
src/modules/offices/src/reportPaper/edit.vue
+8
-12
edit.vue
src/modules/offices/src/retake/edit.vue
+6
-35
api.js
src/modules/viewer/api.js
+10
-0
chapterWork.vue
src/modules/viewer/components/work/chapterWork.vue
+26
-15
chapterWorkComment.vue
src/modules/viewer/components/work/chapterWorkComment.vue
+11
-14
chapterWorkCommentItem.vue
...modules/viewer/components/work/chapterWorkCommentItem.vue
+1
-1
chapterWorkCommentToMe.vue
...modules/viewer/components/work/chapterWorkCommentToMe.vue
+63
-0
courseWork.vue
src/modules/viewer/components/work/courseWork.vue
+1
-1
en.js
src/modules/viewer/languages/en.js
+3
-1
zh-CN.js
src/modules/viewer/languages/zh-CN.js
+3
-1
没有找到文件。
src/api/base_api.js
浏览文件 @
2b83926d
...
@@ -87,6 +87,11 @@ export default class API {
...
@@ -87,6 +87,11 @@ export default class API {
*/
*/
_reqSuccess
(
res
)
{
_reqSuccess
(
res
)
{
const
{
data
}
=
res
const
{
data
}
=
res
// token 失效
if
(
data
.
code
===
1001
)
{
window
.
location
.
href
=
`
${
webConf
.
others
.
loginUrl
}
?rd=
${
encodeURIComponent
(
window
.
location
.
href
)}
`
return
Promise
.
reject
(
data
)
}
/* 带 code 参数,新接口模型 */
/* 带 code 参数,新接口模型 */
if
(
data
.
code
!==
undefined
)
{
if
(
data
.
code
!==
undefined
)
{
if
(
data
.
code
!==
0
&&
!
/getinfo$/gi
.
test
(
res
.
config
.
url
))
{
if
(
data
.
code
!==
0
&&
!
/getinfo$/gi
.
test
(
res
.
config
.
url
))
{
...
...
src/modules/offices/api/index.js
浏览文件 @
2b83926d
...
@@ -117,3 +117,17 @@ export function getGraduationProductList(data) {
...
@@ -117,3 +117,17 @@ export function getGraduationProductList(data) {
export
function
mergeGraduationProduct
(
data
)
{
export
function
mergeGraduationProduct
(
data
)
{
return
httpRequest
.
post
(
'/api/pay/v1/product/create-by-details'
,
data
)
return
httpRequest
.
post
(
'/api/pay/v1/product/create-by-details'
,
data
)
}
}
/**
* 创建订单
* */
export
function
createOrder
(
data
)
{
return
httpRequest
.
post
(
'/api/shop/order/add'
,
data
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
}
/**
* 获取订单
* */
export
function
getOrderList
(
data
)
{
return
httpRequest
.
post
(
'/api/shop/order/search'
,
data
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
}
src/modules/offices/components/pay.vue
浏览文件 @
2b83926d
...
@@ -29,7 +29,7 @@ import QrcodeVue from 'qrcode.vue'
...
@@ -29,7 +29,7 @@ import QrcodeVue from 'qrcode.vue'
export
default
{
export
default
{
props
:
{
props
:
{
payment
:
{
type
:
String
},
// 支付方式
payment
:
{
type
:
String
},
// 支付方式
product
Id
:
{
type
:
String
,
required
:
true
},
// 商品ID
product
:
{
type
:
Object
,
required
:
true
},
// 商品信息
num
:
{
type
:
[
Number
,
String
],
default
:
1
}
// 购买数量
num
:
{
type
:
[
Number
,
String
],
default
:
1
}
// 购买数量
},
},
components
:
{
QrcodeVue
},
components
:
{
QrcodeVue
},
...
@@ -42,33 +42,45 @@ export default {
...
@@ -42,33 +42,45 @@ export default {
},
},
computed
:
{
computed
:
{
qrcodeValue
()
{
qrcodeValue
()
{
return
this
.
order
.
url
return
this
.
order
.
payment_
url
},
},
pid
()
{
pid
()
{
return
this
.
$route
.
params
.
id
return
this
.
$route
.
params
.
id
},
},
notifyUrl
()
{
notifyUrl
()
{
return
`
${
webConf
.
apiBaseURL
}
/api/lms/v2/lobby/update-status-api/
${
this
.
pid
}
/sofia
`
return
`
${
webConf
.
apiBaseURL
}
/api/lms/v2/lobby/update-status-api/
${
this
.
pid
}
`
}
}
},
},
methods
:
{
methods
:
{
// 创建微信订单
// 创建订单
createWxPayOrder
(
productId
,
num
=
1
)
{
createOrder
()
{
return
api
.
createWxpayOrder
(
'ezijing'
,
productId
,
{
num
,
notify_url
:
this
.
notifyUrl
}).
then
(
response
=>
{
// 支付类型(1:微信扫码支付,2:微信小程序支付,3:微信JSAPI支付,4:微信h5支付,11:支付宝扫码支付,12:支付宝手机网站支付,13:支付宝网站支付)
this
.
order
=
response
const
payment
=
{
1
:
'11'
,
2
:
'1'
}
return
response
const
params
=
{
})
buy_count
:
this
.
num
+
''
,
},
payment_method
:
payment
[
this
.
payment
],
// 创建支付宝订单
shop_id
:
this
.
product
.
shop_id
,
createAliPayOrder
(
productId
,
num
=
1
)
{
spu_id
:
this
.
product
.
spu_id
,
return
api
.
createAlipayOrder
(
productId
,
{
type
:
2
,
num
,
notify_url
:
this
.
notifyUrl
}).
then
(
response
=>
{
sku_id
:
this
.
product
.
sku_id
,
this
.
order
=
response
notify_url
:
this
.
notifyUrl
}
return
api
.
createOrder
(
params
).
then
(
response
=>
{
if
(
response
.
code
===
0
)
{
this
.
order
=
response
}
else
{
this
.
$message
.
error
(
response
.
msg
)
}
return
response
return
response
})
})
},
},
getOrder
()
{
getOrder
()
{
return
api
.
getOrder
(
this
.
order
.
order_no
).
then
(
response
=>
{
const
params
=
{
const
{
order
}
=
response
shop_id
:
this
.
product
.
shop_id
,
spu_id
:
this
.
product
.
spu_id
,
order_id
:
this
.
order
.
order_id
}
return
api
.
getOrderList
(
params
).
then
(
response
=>
{
const
[
order
=
{}]
=
response
.
data
this
.
rawOrder
=
order
this
.
rawOrder
=
order
return
order
return
order
})
})
...
@@ -77,7 +89,7 @@ export default {
...
@@ -77,7 +89,7 @@ export default {
this
.
timer
=
setInterval
(()
=>
{
this
.
timer
=
setInterval
(()
=>
{
this
.
getOrder
().
then
(
response
=>
{
this
.
getOrder
().
then
(
response
=>
{
// 支付成功
// 支付成功
if
(
response
.
status
===
1
)
{
if
(
response
.
order_status
===
'4'
)
{
this
.
$emit
(
'success'
)
this
.
$emit
(
'success'
)
this
.
clearTimer
()
this
.
clearTimer
()
}
}
...
@@ -89,13 +101,8 @@ export default {
...
@@ -89,13 +101,8 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
if
(
this
.
payment
===
'2'
)
{
if
(
this
.
payment
===
'3'
)
return
// 微信支付
this
.
createOrder
().
then
(
this
.
setTimer
)
this
.
createWxPayOrder
(
this
.
productId
,
this
.
num
).
then
(
this
.
setTimer
)
}
else
if
(
this
.
payment
===
'1'
)
{
// 支付宝支付
this
.
createAliPayOrder
(
this
.
productId
,
this
.
num
).
then
(
this
.
setTimer
)
}
},
},
destroyed
()
{
destroyed
()
{
this
.
clearTimer
()
this
.
clearTimer
()
...
...
src/modules/offices/src/index.vue
浏览文件 @
2b83926d
...
@@ -89,7 +89,7 @@ export default {
...
@@ -89,7 +89,7 @@ export default {
methods
:
{
methods
:
{
getTypes
()
{
getTypes
()
{
api
.
getAffairType
().
then
(
response
=>
{
api
.
getAffairType
().
then
(
response
=>
{
response
=
response
.
concat
([{
affair_name
:
'毕业典礼'
,
form_name
:
'graduation'
,
id
:
'graduation'
}])
//
response = response.concat([{ affair_name: '毕业典礼', form_name: 'graduation', id: 'graduation' }])
const
[
first
=
{}]
=
response
const
[
first
=
{}]
=
response
this
.
active
=
first
this
.
active
=
first
this
.
types
=
response
this
.
types
=
response
...
...
src/modules/offices/src/reportPaper/edit.vue
浏览文件 @
2b83926d
...
@@ -34,8 +34,7 @@
...
@@ -34,8 +34,7 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
"需打印份数"
prop=
"number"
>
<el-form-item
label=
"需打印份数"
prop=
"number"
>
<el-select
v-model=
"ruleForm.number"
:disabled=
"isPaid"
>
<el-select
v-model=
"ruleForm.number"
:disabled=
"isPaid"
>
<el-option
v-for=
"item in productList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
<el-option
v-for=
"item in productList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"支付方式"
prop=
"payment"
>
<el-form-item
label=
"支付方式"
prop=
"payment"
>
...
@@ -64,9 +63,7 @@
...
@@ -64,9 +63,7 @@
</el-form-item>
</el-form-item>
</
template
>
</
template
>
<el-form-item
v-if=
"!this.isView"
>
<el-form-item
v-if=
"!this.isView"
>
<el-button
type=
"primary"
:loading=
"submitLoading"
@
click=
"handleSubmit(handleSubmitSuccess)"
v-if=
"!isPaid"
<el-button
type=
"primary"
:loading=
"submitLoading"
@
click=
"handleSubmit(handleSubmitSuccess)"
v-if=
"!isPaid"
>
去支付
</el-button>
>
去支付
</el-button
>
<el-button
type=
"primary"
:loading=
"submitLoading"
@
click=
"handleSubmit"
v-else
>
保存并提交
</el-button>
<el-button
type=
"primary"
:loading=
"submitLoading"
@
click=
"handleSubmit"
v-else
>
保存并提交
</el-button>
<el-button
type=
"info"
@
click=
"onRemove"
v-if=
"hasAbort"
>
撤回申请
</el-button>
<el-button
type=
"info"
@
click=
"onRemove"
v-if=
"hasAbort"
>
撤回申请
</el-button>
</el-form-item>
</el-form-item>
...
@@ -75,7 +72,7 @@
...
@@ -75,7 +72,7 @@
</div>
</div>
<el-dialog
title=
"支付"
width=
"400px"
:visible
.
sync=
"payVisible"
>
<el-dialog
title=
"支付"
width=
"400px"
:visible
.
sync=
"payVisible"
>
<pay
:payment=
"ruleForm.payment"
:product
Id=
"productId
"
@
success=
"handlePaySuccess"
v-if=
"payVisible"
></pay>
<pay
:payment=
"ruleForm.payment"
:product
=
"product
"
@
success=
"handlePaySuccess"
v-if=
"payVisible"
></pay>
</el-dialog>
</el-dialog>
</div>
</div>
</template>
</template>
...
@@ -111,9 +108,9 @@ export default {
...
@@ -111,9 +108,9 @@ export default {
email
:
[{
required
:
true
,
message
:
'请输入邮寄地址'
,
trigger
:
'blur'
}]
email
:
[{
required
:
true
,
message
:
'请输入邮寄地址'
,
trigger
:
'blur'
}]
},
},
productList
:
[
productList
:
[
{
label
:
'1份—¥127元'
,
value
:
'1'
,
product_id
:
'6747325185390542848
'
},
{
label
:
'1份—¥127元'
,
value
:
'1'
,
shop_id
:
'6816247184455892992'
,
spu_id
:
'6869466274636759040'
,
sku_id
:
'6869466274674507776
'
},
{
label
:
'2份—¥203元'
,
value
:
'2'
,
product_id
:
'6747325279879823360
'
},
{
label
:
'2份—¥203元'
,
value
:
'2'
,
shop_id
:
'6816247184455892992'
,
spu_id
:
'6869466274636759040'
,
sku_id
:
'6869466274737422336
'
},
{
label
:
'3份—¥278元'
,
value
:
'3'
,
product_id
:
'6747325351686307840
'
}
{
label
:
'3份—¥278元'
,
value
:
'3'
,
shop_id
:
'6816247184455892992'
,
spu_id
:
'6869466274636759040'
,
sku_id
:
'6869466274800336896
'
}
],
],
payVisible
:
false
payVisible
:
false
}
}
...
@@ -129,9 +126,8 @@ export default {
...
@@ -129,9 +126,8 @@ export default {
}
}
},
},
computed
:
{
computed
:
{
productId
()
{
product
()
{
const
found
=
this
.
productList
.
find
(
item
=>
item
.
value
===
this
.
ruleForm
.
number
)
return
this
.
productList
.
find
(
item
=>
item
.
value
===
this
.
ruleForm
.
number
)
return
found
?
found
.
product_id
:
''
}
}
},
},
methods
:
{
methods
:
{
...
...
src/modules/offices/src/retake/edit.vue
浏览文件 @
2b83926d
...
@@ -3,15 +3,7 @@
...
@@ -3,15 +3,7 @@
<div
class=
"con-title"
>
重修申请
</div>
<div
class=
"con-title"
>
重修申请
</div>
<div
class=
"con-box"
>
<div
class=
"con-box"
>
<el-button
type=
"text"
@
click=
"goBack"
>
返回列表
</el-button>
<el-button
type=
"text"
@
click=
"goBack"
>
返回列表
</el-button>
<el-form
<el-form
ref=
"ruleForm"
:model=
"ruleForm"
:rules=
"rules"
:disabled=
"isView"
label-width=
"100px"
class=
"main-form"
v-loading=
"loading"
>
ref=
"ruleForm"
:model=
"ruleForm"
:rules=
"rules"
:disabled=
"isView"
label-width=
"100px"
class=
"main-form"
v-loading=
"loading"
>
<el-form-item
label=
"姓名"
prop=
"personal_name"
>
<el-form-item
label=
"姓名"
prop=
"personal_name"
>
<el-input
v-model=
"ruleForm.personal_name"
:disabled=
"disabledInfo"
readonly
/>
<el-input
v-model=
"ruleForm.personal_name"
:disabled=
"disabledInfo"
readonly
/>
</el-form-item>
</el-form-item>
...
@@ -22,22 +14,14 @@
...
@@ -22,22 +14,14 @@
<el-input
v-model=
"ruleForm.sofia_id"
:disabled=
"disabledInfo"
readonly
/>
<el-input
v-model=
"ruleForm.sofia_id"
:disabled=
"disabledInfo"
readonly
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"重修时间"
prop=
"semester_name"
>
<el-form-item
label=
"重修时间"
prop=
"semester_name"
>
<el-radio-group
<el-radio-group
v-model=
"ruleForm.semester_name"
:disabled=
"disabledInfo"
style=
"line-height: 30px; margin-top: 10px"
>
v-model=
"ruleForm.semester_name"
:disabled=
"disabledInfo"
style=
"line-height: 30px; margin-top: 10px"
>
<div
v-for=
"item in semesterList"
:key=
"item.value"
>
<div
v-for=
"item in semesterList"
:key=
"item.value"
>
<el-radio
:label=
"item.value"
></el-radio>
<el-radio
:label=
"item.value"
></el-radio>
</div>
</div>
</el-radio-group>
</el-radio-group>
</el-form-item>
</el-form-item>
<el-form-item
label=
"重修课程"
prop=
"course_id"
>
<el-form-item
label=
"重修课程"
prop=
"course_id"
>
<el-checkbox-group
<el-checkbox-group
v-model=
"ruleForm.course_id"
:disabled=
"disabledInfo"
style=
"line-height: 24px; margin-top: 10px"
>
v-model=
"ruleForm.course_id"
:disabled=
"disabledInfo"
style=
"line-height: 24px; margin-top: 10px"
>
<div
v-for=
"item in currentCourseList"
:key=
"item.id"
>
<div
v-for=
"item in currentCourseList"
:key=
"item.id"
>
<el-checkbox
:label=
"item.id"
>
{{
item
.
course_name
}}
</el-checkbox>
<el-checkbox
:label=
"item.id"
>
{{
item
.
course_name
}}
</el-checkbox>
</div>
</div>
...
@@ -81,13 +65,7 @@
...
@@ -81,13 +65,7 @@
</div>
</div>
<el-dialog
title=
"支付"
width=
"400px"
:visible
.
sync=
"payVisible"
>
<el-dialog
title=
"支付"
width=
"400px"
:visible
.
sync=
"payVisible"
>
<pay
<pay
:payment=
"ruleForm.payment"
:product=
"product"
:num=
"detail.form.credit"
@
success=
"handlePaySuccess"
v-if=
"payVisible"
></pay>
:payment=
"ruleForm.payment"
:productId=
"productId"
:num=
"detail.form.credit"
@
success=
"handlePaySuccess"
v-if=
"payVisible"
></pay>
</el-dialog>
</el-dialog>
</div>
</div>
</template>
</template>
...
@@ -118,7 +96,7 @@ export default {
...
@@ -118,7 +96,7 @@ export default {
},
},
courseList
:
[],
// 课程列表
courseList
:
[],
// 课程列表
submitedCourseList
:
[],
// 提交的课程列表
submitedCourseList
:
[],
// 提交的课程列表
product
Id
:
'6745273257873637376'
,
// 商品ID
product
:
{
shop_id
:
'6816247184455892992'
,
spu_id
:
'6869463821962969088'
,
sku_id
:
'6869463822004912128'
},
// 商品
payVisible
:
false
payVisible
:
false
}
}
},
},
...
@@ -184,14 +162,7 @@ export default {
...
@@ -184,14 +162,7 @@ export default {
})
})
}
}
// 设置表单数据
// 设置表单数据
const
ruleForm
=
this
.
$_
.
pick
(
response
.
form
,
[
const
ruleForm
=
this
.
$_
.
pick
(
response
.
form
,
[
'personal_name'
,
'class_name'
,
'sofia_id'
,
'semester_name'
,
'course_id'
,
'payment'
])
'personal_name'
,
'class_name'
,
'sofia_id'
,
'semester_name'
,
'course_id'
,
'payment'
])
Object
.
assign
(
this
.
ruleForm
,
ruleForm
)
Object
.
assign
(
this
.
ruleForm
,
ruleForm
)
// 设置接口返回的数据
// 设置接口返回的数据
this
.
detail
=
response
this
.
detail
=
response
...
...
src/modules/viewer/api.js
浏览文件 @
2b83926d
...
@@ -186,3 +186,13 @@ export function getChapterHomeworkOtherAll(semesterId, courseId, chapterId, para
...
@@ -186,3 +186,13 @@ export function getChapterHomeworkOtherAll(semesterId, courseId, chapterId, para
export
function
addChapterHomeworkComment
(
data
)
{
export
function
addChapterHomeworkComment
(
data
)
{
return
httpRequest
.
post
(
'/api/lms/v2/education/homeworks/comment'
,
data
)
return
httpRequest
.
post
(
'/api/lms/v2/education/homeworks/comment'
,
data
)
}
}
/**
* 我收到的评论
* @param {string} semesterId 学期ID
* @param {string} courseId 课程ID
* @param {string} chapterId 章节ID
*/
export
function
getChapterHomeworkComment
(
params
)
{
return
httpRequest
.
get
(
'/api/lms/v2/education/homeworks/fmcomment'
,
params
)
}
src/modules/viewer/components/work/chapterWork.vue
浏览文件 @
2b83926d
...
@@ -62,10 +62,12 @@
...
@@ -62,10 +62,12 @@
<
/div
>
<
/div
>
<
/template
>
<
/template
>
<
/container
>
<
/container
>
<!--
我收到的作业评论
-->
<
chapter
-
work
-
comment
-
to
-
me
:
id
=
"detail.id"
v
-
if
=
"showComment"
><
/chapter-work-comment-to-me
>
<!--
评论同学作业
-->
<
chapter
-
work
-
comment
<
chapter
-
work
-
comment
id
=
"comment"
id
=
"comment"
:
end
Date
=
"commentEndDat
e"
:
end
Time
=
"commentEndTim
e"
:
status
=
"detail.status2"
:
status
=
"detail.status2"
@
update
=
"$emit('updateHomework')"
@
update
=
"$emit('updateHomework')"
v
-
if
=
"showComment"
v
-
if
=
"showComment"
...
@@ -122,13 +124,14 @@ import Base64 from 'Base64'
...
@@ -122,13 +124,14 @@ import Base64 from 'Base64'
import
Container
from
'../common/container.vue'
import
Container
from
'../common/container.vue'
import
ExamItem
from
'./examItem.vue'
import
ExamItem
from
'./examItem.vue'
import
ChapterWorkComment
from
'./chapterWorkComment.vue'
import
ChapterWorkComment
from
'./chapterWorkComment.vue'
import
ChapterWorkCommentToMe
from
'./chapterWorkCommentToMe.vue'
// api
// api
import
*
as
api
from
'../../api'
import
*
as
api
from
'../../api'
// 章节作业
// 章节作业
export
default
{
export
default
{
name
:
'ChapterWork'
,
name
:
'ChapterWork'
,
components
:
{
Container
,
ExamItem
,
ChapterWorkComment
}
,
components
:
{
Container
,
ExamItem
,
ChapterWorkComment
,
ChapterWorkCommentToMe
}
,
props
:
{
props
:
{
// 当前选中的
// 当前选中的
chapter
:
{
type
:
Object
,
default
:
()
=>
({
}
)
}
,
chapter
:
{
type
:
Object
,
default
:
()
=>
({
}
)
}
,
...
@@ -148,7 +151,9 @@ export default {
...
@@ -148,7 +151,9 @@ export default {
hasUpload
:
true
,
// 是否可以上传
hasUpload
:
true
,
// 是否可以上传
isAnonymous
:
false
,
// 是否匿名
isAnonymous
:
false
,
// 是否匿名
hasComment
:
false
,
// 是否评论
hasComment
:
false
,
// 是否评论
commentEndDate
:
''
,
commentStartTime
:
''
,
// 评论开始时间
commentEndTime
:
''
,
// 评论结束时间
serverTime
:
Date
.
now
(),
// 服务器时间
rules
:
{
rules
:
{
user_answer
:
[{
required
:
true
,
message
:
'请输入'
,
trigger
:
'change'
}
]
user_answer
:
[{
required
:
true
,
message
:
'请输入'
,
trigger
:
'change'
}
]
}
,
}
,
...
@@ -208,8 +213,8 @@ export default {
...
@@ -208,8 +213,8 @@ export default {
return
true
return
true
}
}
// 大于开始时间,小于结束时间
// 大于开始时间,小于结束时间
const
endTime
=
+
new
Date
(
this
.
deadline
)
const
endTime
=
+
new
Date
(
this
.
deadline
.
replace
(
/-/g
,
'/'
)
)
const
currentTime
=
new
Date
().
getTime
(
)
const
currentTime
=
+
new
Date
(
this
.
serverTime
.
replace
(
/-/g
,
'/'
)
)
return
currentTime
<
endTime
return
currentTime
<
endTime
}
,
}
,
hasScore
()
{
hasScore
()
{
...
@@ -218,16 +223,20 @@ export default {
...
@@ -218,16 +223,20 @@ export default {
}
,
}
,
// 显示作业评论
// 显示作业评论
showComment
()
{
showComment
()
{
const
currentTime
=
new
Date
().
getTime
()
if
(
!
this
.
detail
.
id
)
{
const
endTime
=
+
new
Date
(
this
.
deadline
)
return
this
.
hasComment
&&
currentTime
>
endTime
&&
this
.
detail
.
status
!==
1
}
,
disabled
()
{
if
(
this
.
detail
.
status
===
1
)
{
return
false
return
false
}
}
// -1未处理 0已处理 1驳回
const
currentTime
=
+
new
Date
(
this
.
serverTime
.
replace
(
/-/g
,
'/'
))
return
this
.
detail
.
status
===
0
||
!
this
.
isWorkTime
const
startTime
=
+
new
Date
(
this
.
commentStartTime
.
replace
(
/-/g
,
'/'
))
return
this
.
hasComment
&&
currentTime
>=
startTime
&&
this
.
detail
.
status
!==
1
}
,
disabled
()
{
return
this
.
detail
.
status
===
0
// if (this.detail.status === 1)
{
// return false
//
}
// // -1未处理 0已处理 1驳回
// return this.detail.status === 0 || !this.isWorkTime
}
,
}
,
dialogTitle
()
{
dialogTitle
()
{
if
(
this
.
detail
.
status
===
1
&&
this
.
detail
.
status2
===
1
)
{
if
(
this
.
detail
.
status
===
1
&&
this
.
detail
.
status2
===
1
)
{
...
@@ -249,7 +258,9 @@ export default {
...
@@ -249,7 +258,9 @@ export default {
this
.
hasUpload
=
response
.
pdf
!==
0
this
.
hasUpload
=
response
.
pdf
!==
0
this
.
isAnonymous
=
!!
response
.
anonymous
this
.
isAnonymous
=
!!
response
.
anonymous
this
.
hasComment
=
!!
response
.
comment
this
.
hasComment
=
!!
response
.
comment
this
.
commentEndDate
=
response
.
comment_end
this
.
commentStartTime
=
response
.
comment_begin
this
.
commentEndTime
=
response
.
comment_end
this
.
serverTime
=
response
.
server_time
}
)
}
)
}
,
}
,
// 组装问题数据
// 组装问题数据
...
...
src/modules/viewer/components/work/chapterWorkComment.vue
浏览文件 @
2b83926d
...
@@ -11,13 +11,7 @@
...
@@ -11,13 +11,7 @@
ref=
"form"
ref=
"form"
>
>
<el-form-item
prop=
"comment"
>
<el-form-item
prop=
"comment"
>
<chapter-work-comment-item
<chapter-work-comment-item
:data=
"item"
:index=
"index"
:disabled=
"disabled"
:key=
"item.id"
/>
</el-form-item
:data=
"item"
:index=
"index"
:endDate=
"endDate"
:disabled=
"disabled"
:key=
"item.id"
/>
</el-form-item
></el-form>
></el-form>
</
template
>
</
template
>
<div
class=
"button"
v-if=
"status !== 0"
>
<div
class=
"button"
v-if=
"status !== 0"
>
...
@@ -25,7 +19,7 @@
...
@@ -25,7 +19,7 @@
$t('viewerWork.commentSubmitText')
$t('viewerWork.commentSubmitText')
}}
</el-button>
}}
</el-button>
<p
v-if=
"status === 1"
>
注:重新提交后不可修改,请检查好作业内容再做提交。
</p>
<p
v-if=
"status === 1"
>
注:重新提交后不可修改,请检查好作业内容再做提交。
</p>
<p
v-else
>
{{ $t('viewerWork.commentSubmitTips', { date: end
Dat
e }) }}
</p>
<p
v-else
>
{{ $t('viewerWork.commentSubmitTips', { date: end
Tim
e }) }}
</p>
</div>
</div>
<slot></slot>
<slot></slot>
<div
class=
"more"
>
<div
class=
"more"
>
...
@@ -45,7 +39,7 @@ import ChapterWorkCommentItem from './chapterWorkCommentItem.vue'
...
@@ -45,7 +39,7 @@ import ChapterWorkCommentItem from './chapterWorkCommentItem.vue'
export
default
{
export
default
{
components
:
{
Container
,
ChapterWorkCommentItem
},
components
:
{
Container
,
ChapterWorkCommentItem
},
props
:
{
end
Dat
e
:
{
type
:
String
},
status
:
{
type
:
Number
}
},
props
:
{
end
Tim
e
:
{
type
:
String
},
status
:
{
type
:
Number
}
},
data
()
{
data
()
{
return
{
return
{
list
:
[],
list
:
[],
...
@@ -70,17 +64,20 @@ export default {
...
@@ -70,17 +64,20 @@ export default {
},
},
isSubmitTime
()
{
isSubmitTime
()
{
// 大于开始时间,小于结束时间
// 大于开始时间,小于结束时间
const
endTime
=
+
new
Date
(
this
.
end
Date
)
const
endTime
=
+
new
Date
(
this
.
end
Time
.
replace
(
/-/g
,
'/'
)
)
const
currentTime
=
new
Date
().
getTime
()
const
currentTime
=
new
Date
().
getTime
()
return
currentTime
<
endTime
return
currentTime
<
endTime
},
},
// 是否禁用
// 是否禁用
disabled
()
{
disabled
()
{
// -1未处理 0已处理 1驳回
if
(
this
.
status
===
0
)
{
if
(
this
.
status
===
1
)
{
return
true
return
false
}
}
return
!
this
.
isSubmitTime
// -1未处理 0已处理 1驳回
// if (this.status === 1) {
// return false
// }
// return !this.isSubmitTime
}
}
},
},
methods
:
{
methods
:
{
...
...
src/modules/viewer/components/work/chapterWorkCommentItem.vue
浏览文件 @
2b83926d
...
@@ -11,7 +11,7 @@ import ChapterWorkAnswerItem from './chapterWorkAnswerItem.vue'
...
@@ -11,7 +11,7 @@ import ChapterWorkAnswerItem from './chapterWorkAnswerItem.vue'
import
VEditor
from
'@/components/tinymce'
import
VEditor
from
'@/components/tinymce'
export
default
{
export
default
{
props
:
{
endDate
:
{
type
:
String
},
data
:
{
type
:
Object
,
default
:
()
=>
({})
},
disabled
:
{
type
:
Boolean
}
},
props
:
{
data
:
{
type
:
Object
,
default
:
()
=>
({})
},
disabled
:
{
type
:
Boolean
}
},
components
:
{
ChapterWorkAnswerItem
,
VEditor
},
components
:
{
ChapterWorkAnswerItem
,
VEditor
},
data
()
{
data
()
{
return
{}
return
{}
...
...
src/modules/viewer/components/work/chapterWorkCommentToMe.vue
0 → 100644
浏览文件 @
2b83926d
<
template
>
<container
:title=
"$t('viewerWork.commentToMeTitle')"
>
<template
v-for=
"(item, index) in list"
>
<div
class=
"module-item"
:key=
"index"
>
<div
class=
"module-item-hd"
>
{{
$t
(
'viewerWork.comment'
)
}}{{
index
+
1
}}
:
</div>
<div
class=
"module-item-bd"
>
<show-more>
<div
v-html=
"item.comment"
></div>
</show-more>
</div>
</div>
</
template
>
</container>
</template>
<
script
>
// api
import
*
as
api
from
'../../api'
// componets
import
Container
from
'../common/container.vue'
import
showMore
from
'@/components/showMore'
export
default
{
props
:
{
id
:
{
type
:
String
}
},
components
:
{
Container
,
showMore
},
data
()
{
return
{
list
:
[]
}
},
computed
:
{},
methods
:
{
getList
()
{
api
.
getChapterHomeworkComment
({
homework_id
:
this
.
id
}).
then
(
response
=>
{
this
.
list
=
response
})
}
},
beforeMount
()
{
this
.
getList
()
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.module-item
{
margin-bottom
:
20px
;
}
.module-item
+
.module-item
{
margin-top
:
10px
;
}
.module-item-hd
{
margin-bottom
:
10px
;
}
.module-item-bd
{
padding
:
10px
;
border-radius
:
8px
;
background-color
:
#fff
;
img
{
max-width
:
100%
;
}
}
</
style
>
src/modules/viewer/components/work/courseWork.vue
浏览文件 @
2b83926d
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
<p>
{{
$t
(
'viewerWork.correctionTime'
)
}}
:
{{
detail
.
check_date
}}
</p>
<p>
{{
$t
(
'viewerWork.correctionTime'
)
}}
:
{{
detail
.
check_date
}}
</p>
<div
class=
"paper-check-item"
>
<div
class=
"paper-check-item"
>
<b>
{{
$t
(
'viewerWork.score'
)
}}
:
</b>
<b>
{{
$t
(
'viewerWork.score'
)
}}
:
</b>
{{
detail
.
score
}}
{{
detail
.
grade
||
detail
.
score
}}
</div>
</div>
<div
class=
"paper-check-item"
>
<div
class=
"paper-check-item"
>
<b>
{{
$t
(
'viewerWork.comments'
)
}}
:
</b>
<b>
{{
$t
(
'viewerWork.comments'
)
}}
:
</b>
...
...
src/modules/viewer/languages/en.js
浏览文件 @
2b83926d
...
@@ -78,7 +78,9 @@ export default {
...
@@ -78,7 +78,9 @@ export default {
commentSubmitTips
:
'Deadline: {date} Modifications can be made any time before deadline.'
,
commentSubmitTips
:
'Deadline: {date} Modifications can be made any time before deadline.'
,
answerMoreButtonText
:
'Check other students assignments'
,
answerMoreButtonText
:
'Check other students assignments'
,
submittedAssignments
:
'Submitted Assignments'
,
submittedAssignments
:
'Submitted Assignments'
,
student
:
'student'
student
:
'student'
,
commentToMeTitle
:
'我收到的评论'
,
comment
:
'评论'
},
},
viewerExam
:
{},
viewerExam
:
{},
viewerRead
:
{
viewerRead
:
{
...
...
src/modules/viewer/languages/zh-CN.js
浏览文件 @
2b83926d
...
@@ -77,7 +77,9 @@ export default {
...
@@ -77,7 +77,9 @@ export default {
commentSubmitText
:
'提交评价'
,
commentSubmitText
:
'提交评价'
,
answerMoreButtonText
:
'去看其他同学作业'
,
answerMoreButtonText
:
'去看其他同学作业'
,
submittedAssignments
:
'同学提交的作业'
,
submittedAssignments
:
'同学提交的作业'
,
student
:
'同学'
student
:
'同学'
,
commentToMeTitle
:
'我收到的评论'
,
comment
:
'评论'
},
},
viewerRead
:
{
viewerRead
:
{
download
:
'下载'
,
download
:
'下载'
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论