Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
14e3bf3e
提交
14e3bf3e
authored
3月 01, 2021
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
差异文件
merge...
上级
f6e4ad51
688dd8f8
显示空白字符变更
内嵌
并排
正在显示
26 个修改的文件
包含
376 行增加
和
238 行删除
+376
-238
.config.dev.js
.config.dev.js
+2
-2
.config.pro.js
.config.pro.js
+2
-1
.config.test.js
.config.test.js
+2
-1
package-lock.json
package-lock.json
+0
-0
package.json
package.json
+12
-12
affairs_api.js
src/api/affairs_api.js
+14
-8
common.js
src/api/common.js
+1
-1
course_api.js
src/api/course_api.js
+17
-6
discuss_api.js
src/api/discuss_api.js
+17
-11
feedback_api.js
src/api/feedback_api.js
+11
-4
grade_api.js
src/api/grade_api.js
+12
-5
other_api.js
src/api/other_api.js
+8
-11
player_api.js
src/api/player_api.js
+48
-21
report_api.js
src/api/report_api.js
+31
-18
navigation.vue
src/components/learnSysLayout/navigation.vue
+2
-2
index.js
src/modules/discuss/api/index.js
+20
-48
index.js
src/modules/offices/api/index.js
+16
-16
edit.js
src/modules/offices/mixins/edit.js
+5
-2
edit.vue
src/modules/offices/src/reportPaper/edit.vue
+15
-7
list.vue
src/modules/offices/src/reportPaper/list.vue
+1
-1
api.js
src/modules/viewer/api.js
+15
-15
chapterWork.vue
src/modules/viewer/components/work/chapterWork.vue
+5
-1
courseExam.vue
src/modules/viewer/components/work/courseExam.vue
+88
-30
zh-CN.js
src/modules/viewer/languages/zh-CN.js
+2
-2
api.js
src/pages/affairsHall/api.js
+11
-11
convert_time.js
src/tool/convert_time.js
+19
-2
没有找到文件。
.config.dev.js
浏览文件 @
14e3bf3e
module
.
exports
=
{
domain
:
'dev.ezijing.com'
,
url
:
'https://
enterprise-learning
.ezijing.com/api'
,
apiBaseURL
:
'
/
'
,
url
:
'https://
learn-api
.ezijing.com/api'
,
apiBaseURL
:
'
https://learn-api.ezijing.com
'
,
others
:
{
url
:
'/app/learn/course'
,
loginUrl
:
'https://login.ezijing.com/enterprise/login/index'
...
...
.config.pro.js
浏览文件 @
14e3bf3e
module
.
exports
=
{
url
:
'/'
,
DesDir
:
'./client-dist'
,
apiBaseURL
:
'/'
,
apiBaseURL
:
'https://learn-api.ezijing.com'
,
// apiBaseURL: '/',
others
:
{
url
:
'/app/learn/course'
,
loginUrl
:
'https://login.ezijing.com/enterprise/login/index'
...
...
.config.test.js
浏览文件 @
14e3bf3e
module
.
exports
=
{
url
:
'/'
,
DesDir
:
'./client-dist'
,
apiBaseURL
:
'/'
,
apiBaseURL
:
'https://learn-api2.ezijing.com'
,
// apiBaseURL: '/',
others
:
{
url
:
'/app/learn/course'
,
loginUrl
:
'https://login2.ezijing.com/enterprise/login/index'
...
...
package-lock.json
浏览文件 @
14e3bf3e
This source diff could not be displayed because it is too large. You can
view the blob
instead.
package.json
浏览文件 @
14e3bf3e
...
...
@@ -29,6 +29,13 @@
"node"
:
">=8.9"
},
"devDependencies"
:
{
"
@babel/core
"
:
"^7.11.6"
,
"
@babel/plugin-proposal-class-properties
"
:
"^7.10.4"
,
"
@babel/plugin-syntax-dynamic-import
"
:
"^7.8.3"
,
"
@babel/plugin-syntax-jsx
"
:
"^7.10.4"
,
"
@babel/plugin-transform-runtime
"
:
"^7.11.5"
,
"
@babel/preset-env
"
:
"^7.11.5"
,
"
@babel/runtime-corejs3
"
:
"^7.11.2"
,
"
acorn
"
:
"^7.1.1"
,
"
ali-oss
"
:
"^6.11.2"
,
"
autoprefixer
"
:
"^9.8.6"
,
...
...
@@ -49,27 +56,20 @@
"
eslint-plugin-standard
"
:
"^4.0.1"
,
"
eslint-plugin-vue
"
:
"^6.2.2"
,
"
file-loader
"
:
"^6.1.1"
,
"
html-replace-webpack-plugin
"
:
"^2.5.6"
,
"
html-webpack-plugin
"
:
"^4.5.0"
,
"
mini-css-extract-plugin
"
:
"^0.9.0"
,
"
postcss-loader
"
:
"^3.0.0"
,
"
request
"
:
"^2.88.2"
,
"
sass-loader
"
:
"^10.0.3"
,
"
semver
"
:
"^1.1.4"
,
"
style-loader
"
:
"^2.0.0"
,
"
url-loader
"
:
"^4.1.1"
,
"
vconsole-webpack-plugin
"
:
"^1.5.2"
,
"
webpack
"
:
"^4.44.2"
,
"
webpack-cli
"
:
"^3.3.12"
,
"
webpack-dev-server
"
:
"^3.11.0"
,
"
webpack-merge
"
:
"^4.2.2"
,
"
html-replace-webpack-plugin
"
:
"^2.5.6"
,
"
request
"
:
"^2.88.2"
,
"
semver
"
:
"^1.1.4"
,
"
vconsole-webpack-plugin
"
:
"^1.5.2"
,
"
@babel/core
"
:
"^7.11.6"
,
"
@babel/plugin-proposal-class-properties
"
:
"^7.10.4"
,
"
@babel/plugin-syntax-dynamic-import
"
:
"^7.8.3"
,
"
@babel/plugin-syntax-jsx
"
:
"^7.10.4"
,
"
@babel/plugin-transform-runtime
"
:
"^7.11.5"
,
"
@babel/preset-env
"
:
"^7.11.5"
,
"
@babel/runtime-corejs3
"
:
"^7.11.2"
"
webpack-merge
"
:
"^4.2.2"
},
"dependencies"
:
{
"
@ckeditor/ckeditor5-build-classic
"
:
"^24.0.0"
,
...
...
src/api/affairs_api.js
浏览文件 @
14e3bf3e
...
...
@@ -4,11 +4,11 @@ export default class AffairsAPI extends BaseAPI {
/**
* 获取事务类型
*/
getAffairsType
=
()
=>
this
.
get
(
'/api/lms/v2/lobby/affairs'
)
getAffairsType
=
()
=>
this
.
get
(
'/api/lms
-ep
/v2/lobby/affairs'
)
/**
* 获取事务类型
*/
getAffairsData
=
(
obj
=
{})
=>
this
.
get
(
'/api/lms/v2/lobby/processes'
,
obj
)
getAffairsData
=
(
obj
=
{})
=>
this
.
get
(
'/api/lms
-ep
/v2/lobby/processes'
,
obj
)
/**
* 提交活动申请
* affair_id 活动名称
...
...
@@ -20,15 +20,21 @@ export default class AffairsAPI extends BaseAPI {
* symposium_lecturer
* 返回 {'flag' : true, 'errors' : []}
*/
submitLearning
=
(
obj
=
{})
=>
this
.
post
(
'/api/lms/v2/lobby/processes'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
submitLearning
=
(
obj
=
{})
=>
this
.
post
(
'/api/lms-ep/v2/lobby/processes'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
/* 删除事务 */
deleteAffairs
=
(
reid
)
=>
this
.
delete
(
`/api/lms
/v2/lobby/processes/
${
reid
}
`
,
{})
deleteAffairs
=
reid
=>
this
.
delete
(
`/api/lms-ep
/v2/lobby/processes/
${
reid
}
`
,
{})
/* 获取事务详情 */
getAffairsDetails
=
(
rid
)
=>
this
.
get
(
`/api/lms
/v2/lobby/processes/
${
rid
}
`
,
{})
getAffairsDetails
=
rid
=>
this
.
get
(
`/api/lms-ep
/v2/lobby/processes/
${
rid
}
`
,
{})
/* 修改事务 */
updateAffairs
=
(
rid
,
obj
=
{})
=>
this
.
post
(
`/api/lms/v2/lobby/processes/
${
rid
}
`
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
updateAffairs
=
(
rid
,
obj
=
{})
=>
this
.
post
(
`/api/lms-ep/v2/lobby/processes/
${
rid
}
`
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
/* 重修图片提交 */
uploadFile
=
(
obj
=
{})
=>
this
.
post
(
'/api/lms/v2/lobby/tools/upload'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
uploadFile
=
(
obj
=
{})
=>
this
.
post
(
'/api/lms-ep/v2/lobby/tools/upload'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
/* 获取成绩单 */
obtainReport
=
(
type
)
=>
this
.
get
(
`/api/lms
/v2/lobby/havereport?type=
${
type
}
`
,
{})
obtainReport
=
type
=>
this
.
get
(
`/api/lms-ep
/v2/lobby/havereport?type=
${
type
}
`
,
{})
}
src/api/common.js
浏览文件 @
14e3bf3e
...
...
@@ -6,7 +6,7 @@ const httpRequest = new BaseAPI(webConf)
* 上传文件
*/
export
function
uploadFile
(
data
)
{
return
httpRequest
.
post
(
'/api/lms/util/upload-file'
,
data
,
{
return
httpRequest
.
post
(
'/api/lms
-ep
/util/upload-file'
,
data
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
}
src/api/course_api.js
浏览文件 @
14e3bf3e
...
...
@@ -4,31 +4,42 @@ export default class CourseAPI extends BaseAPI {
/**
* 获取学期分类信息
*/
getLearnFind
=
()
=>
this
.
get
(
'/api/lms/v2/education/semesters'
,
{})
getLearnFind
=
()
=>
this
.
get
(
'/api/lms
-ep
/v2/education/semesters'
,
{})
/**
* 获取所有课程列表 - 选课广场 和 我的课程 共用同一个,通过 isMy判断
* @param {[string]} isMy
* @param {[object]} param
*/
getCourseList
=
(
isMy
,
param
)
=>
this
.
get
(
'/api/lms/v2/education/courses'
+
(
isMy
?
'/my'
:
''
),
param
)
getCourseList
=
(
isMy
,
param
)
=>
this
.
get
(
'/api/lms
-ep
/v2/education/courses'
+
(
isMy
?
'/my'
:
''
),
param
)
/**
* 获取某个课程详细信息 - 课程考核 和 课程讨论单独获取
* @param {[string]} id
*/
getCourseDetail
=
(
id
,
sid
)
=>
this
.
get
(
`/api/lms/v2/education/courses/
${
id
}
`
,
{})
getCourseDetail
=
(
id
,
sid
)
=>
this
.
get
(
`/api/lms
-ep
/v2/education/courses/
${
id
}
`
,
{})
/**
* 获取课程考核信息
* @param {[string]} cid
*/
getCourseAssess
=
(
cid
,
sid
)
=>
this
.
get
(
`/api/lms/v2/analytics/courses/
${
cid
}
/evaluation`
,
{})
getCourseAssess
=
(
cid
,
sid
)
=>
this
.
get
(
`/api/lms
-ep
/v2/analytics/courses/
${
cid
}
/evaluation`
,
{})
/**
* 选课
* @param {[string]} cid
*/
selectCourse
=
(
cid
,
sid
)
=>
this
.
post
(
'/api/lms/v2/education/courses/major'
,
{
course_id
:
cid
},
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
selectCourse
=
(
cid
,
sid
)
=>
this
.
post
(
'/api/lms-ep/v2/education/courses/major'
,
{
course_id
:
cid
},
{
headers
:
{
'Content-Type'
:
'application/json'
}
}
)
/**
* 退课
* @param {[string]} cid
*/
outSelectCourse
=
(
cid
,
sid
)
=>
this
.
post
(
'/api/lms/v2/education/courses/drop'
,
{
course_id
:
cid
},
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
outSelectCourse
=
(
cid
,
sid
)
=>
this
.
post
(
'/api/lms-ep/v2/education/courses/drop'
,
{
course_id
:
cid
},
{
headers
:
{
'Content-Type'
:
'application/json'
}
}
)
}
src/api/discuss_api.js
浏览文件 @
14e3bf3e
...
...
@@ -8,7 +8,7 @@ export default class DiscussAPI extends BaseAPI {
* @param {[string]} path
* @param {[object]} dataJson
*/
getDiscussList
=
(
path
,
dataJson
)
=>
this
.
get
(
'/api/lms/v2/qa/questions'
+
path
,
dataJson
)
getDiscussList
=
(
path
,
dataJson
)
=>
this
.
get
(
'/api/lms
-ep
/v2/qa/questions'
+
path
,
dataJson
)
/**
* 获取讨论题目列表,“课程的问题”信息
* dataJson.limit - 获取数量
...
...
@@ -17,50 +17,56 @@ export default class DiscussAPI extends BaseAPI {
* @param {[string]} cid
* @param {[object]} dataJson
*/
getCourseDiscussList
=
(
cid
,
sid
,
dataJson
)
=>
this
.
get
(
`/api/lms/v2/qa/questions/course/
${
cid
}
`
,
dataJson
)
getCourseDiscussList
=
(
cid
,
sid
,
dataJson
)
=>
this
.
get
(
`/api/lms
-ep
/v2/qa/questions/course/
${
cid
}
`
,
dataJson
)
/**
* 获取问题详情
* @param {[string]} qid
*/
getDiscussDetail
=
(
qid
)
=>
this
.
get
(
`/api/lms
/v2/qa/questions/
${
qid
}
`
,
{})
getDiscussDetail
=
qid
=>
this
.
get
(
`/api/lms-ep
/v2/qa/questions/
${
qid
}
`
,
{})
/**
* 删除提问
* @param {[string]} qid
*/
deleteDiscuss
=
(
qid
)
=>
this
.
delete
(
`/api/lms
/v2/qa/questions/
${
qid
}
`
,
{})
deleteDiscuss
=
qid
=>
this
.
delete
(
`/api/lms-ep
/v2/qa/questions/
${
qid
}
`
,
{})
/**
* 提出问题
* @param {[object]} param
*/
publishQues
=
(
param
)
=>
this
.
post
(
'/api/lms/v2/qa/questions'
,
param
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
publishQues
=
param
=>
this
.
post
(
'/api/lms-ep/v2/qa/questions'
,
param
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
/**
* 回答问题
* @param {[object]} param
*/
answerQues
=
(
param
)
=>
this
.
post
(
'/api/lms/v2/qa/answers'
,
param
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
answerQues
=
param
=>
this
.
post
(
'/api/lms-ep/v2/qa/answers'
,
param
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
/**
* 删除回答
* @param {[string]} aid
*/
deleteAnswer
=
(
aid
)
=>
this
.
delete
(
`/api/lms
/v2/qa/answers/
${
aid
}
`
,
{})
deleteAnswer
=
aid
=>
this
.
delete
(
`/api/lms-ep
/v2/qa/answers/
${
aid
}
`
,
{})
/**
* 回复评论
* @param {[object]} param
*/
callbackComment
=
(
param
)
=>
this
.
post
(
'/api/lms/v2/qa/comments'
,
param
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
callbackComment
=
param
=>
this
.
post
(
'/api/lms-ep/v2/qa/comments'
,
param
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
/**
* 删除评论
* @param {[string]} cid
*/
deleteComment
=
(
cid
)
=>
this
.
delete
(
`/api/lms
/v2/qa/comments/
${
cid
}
`
)
deleteComment
=
cid
=>
this
.
delete
(
`/api/lms-ep
/v2/qa/comments/
${
cid
}
`
)
/**
* 点赞
* @param {[object]} param
*/
like
=
(
param
)
=>
this
.
post
(
'/api/lms
/v2/qa/tags'
,
param
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
like
=
param
=>
this
.
post
(
'/api/lms-ep
/v2/qa/tags'
,
param
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
/**
* 取消点赞
* @param {[string]} tagid
*/
unlike
=
(
tagid
)
=>
this
.
delete
(
`/api/lms
/v2/qa/tags/
${
tagid
}
`
,
{})
unlike
=
tagid
=>
this
.
delete
(
`/api/lms-ep
/v2/qa/tags/
${
tagid
}
`
,
{})
}
src/api/feedback_api.js
浏览文件 @
14e3bf3e
...
...
@@ -4,22 +4,29 @@ export default class FeedbackAPI extends BaseAPI {
/**
* 提交 重修课程
*/
submitRebuild
=
(
obj
=
{})
=>
this
.
post
(
'/api/lms/v2/education/retake'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
submitRebuild
=
(
obj
=
{})
=>
this
.
post
(
'/api/lms-ep/v2/education/retake'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
/**
* 获取意见列表
* type_id [int]
* page [int]
* pageSize [int]
*/
feedbackList
=
(
obj
=
{})
=>
this
.
get
(
'/api/lms/v2/feedback/lists'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
feedbackList
=
(
obj
=
{})
=>
this
.
get
(
'/api/lms-ep/v2/feedback/lists'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
/**
* 意见反馈回复
* feedback_id [int]
* contents [string]
*/
feedbackReply
=
(
obj
=
{})
=>
this
.
post
(
'/api/lms/v2/feedback/reply'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
feedbackReply
=
(
obj
=
{})
=>
this
.
post
(
'/api/lms-ep/v2/feedback/reply'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
/**
* 意见反馈提交
*/
feedbackCommit
=
(
obj
=
{})
=>
this
.
post
(
'/api/lms/v2/feedback/commit'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
feedbackCommit
=
(
obj
=
{})
=>
this
.
post
(
'/api/lms-ep/v2/feedback/commit'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
}
src/api/grade_api.js
浏览文件 @
14e3bf3e
...
...
@@ -4,26 +4,33 @@ export default class GradeAPI extends BaseAPI {
/**
* 获取我的学分信息
*/
getCredit
=
()
=>
this
.
get
(
'/api/lms/v2/education/credits'
,
{})
getCredit
=
()
=>
this
.
get
(
'/api/lms
-ep
/v2/education/credits'
,
{})
/**
* 提交 重修课程
*/
submitRebuild
=
(
obj
=
{})
=>
this
.
post
(
'/api/lms/v2/education/retake'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
submitRebuild
=
(
obj
=
{})
=>
this
.
post
(
'/api/lms-ep/v2/education/retake'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
/**
* 获取意见列表
* type_id [int]
* page [int]
* pageSize [int]
*/
feedbackList
=
(
obj
=
{})
=>
this
.
get
(
'/api/lms/v2/feedback/lists'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
feedbackList
=
(
obj
=
{})
=>
this
.
get
(
'/api/lms-ep/v2/feedback/lists'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
/**
* 意见反馈回复
* feedback_id [int]
* contents [string]
*/
feedbackReply
=
(
obj
=
{})
=>
this
.
post
(
'/api/lms/v2/feedback/reply'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
feedbackReply
=
(
obj
=
{})
=>
this
.
post
(
'/api/lms-ep/v2/feedback/reply'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
/**
* 意见反馈提交
*/
feedbackCommit
=
(
obj
=
{})
=>
this
.
post
(
'/api/lms/v2/feedback/commit'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
feedbackCommit
=
(
obj
=
{})
=>
this
.
post
(
'/api/lms-ep/v2/feedback/commit'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
}
src/api/other_api.js
浏览文件 @
14e3bf3e
...
...
@@ -5,19 +5,18 @@ export default class OtherAPI extends BaseAPI {
/**
* 当前登录用户,检测是否该系统有权限
*/
getInfo
=
()
=>
this
.
get
(
'/api/lms/user/getinfo'
)
getInfo
=
()
=>
this
.
get
(
'/api/lms
-ep
/user/getinfo'
)
/**
* 获取我的消息信息
*/
getMyMsg
=
(
obj
)
=>
this
.
get
(
'/api/lms
/v2/education/message/my'
,
obj
,
{})
getMyMsg
=
obj
=>
this
.
get
(
'/api/lms-ep
/v2/education/message/my'
,
obj
,
{})
/**
* 标记已读未读
*/
setMyMsg
=
(
rid
)
=>
this
.
post
(
`/api/lms
/v2/education/message/
${
rid
}
`
,
{})
setMyMsg
=
rid
=>
this
.
post
(
`/api/lms-ep
/v2/education/message/
${
rid
}
`
,
{})
getNavMsg
=
(
rid
)
=>
this
.
get
(
`/api/lms/v2/education/message/num?v=
${
new
Date
().
getTime
()}
`
,
{})
getNavMsg
=
rid
=>
this
.
get
(
`/api/lms-ep/v2/education/message/num?v=
${
new
Date
().
getTime
()}
`
,
{})
/**
* 调用退出登录
...
...
@@ -29,7 +28,7 @@ export default class OtherAPI extends BaseAPI {
* @param {[object]} obj
*/
uploadFile
=
(
obj
=
{})
=>
this
.
post
(
'/api/lms/util/upload-file'
,
obj
,
{
this
.
post
(
'/api/lms
-ep
/util/upload-file'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
...
...
@@ -40,11 +39,9 @@ export default class OtherAPI extends BaseAPI {
* @param {[string]} obj.service 这里 一直是定值 h5.ezijing.com
*/
updatePwd
=
(
obj
=
{})
=>
this
.
post
(
'/api/usercenter/user/change-pwd-by-cookie'
,
_
.
assignIn
(
obj
,
{
service
:
'h5.ezijing.com'
}),
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
}
)
this
.
post
(
'/api/usercenter/user/change-pwd-by-cookie'
,
_
.
assignIn
(
obj
,
{
service
:
'h5.ezijing.com'
}),
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
})
/**
* 个人信息 - 上传头像
...
...
src/api/player_api.js
浏览文件 @
14e3bf3e
...
...
@@ -6,23 +6,31 @@ export default class PlayerAPI extends BaseAPI {
* @param {[string]} cur_course_id -> cid
* @param {[string]} cur_video_id -> vid
*/
getChapterList
=
(
cid
,
sid
,
vid
)
=>
this
.
get
(
`/api/lms/v2/education/courses/
${
cid
}
`
,
{})
getChapterList
=
(
cid
,
sid
,
vid
)
=>
this
.
get
(
`/api/lms
-ep
/v2/education/courses/
${
cid
}
`
,
{})
/**
* 获取对应某个章节的详细信息
* @param {[string]} vid
*/
getCurrentChapterDetail
=
(
vid
)
=>
this
.
post
(
'/api/lms/v2/education/video-streaming'
,
{
vid
},
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
getCurrentChapterDetail
=
vid
=>
this
.
post
(
'/api/lms-ep/v2/education/video-streaming'
,
{
vid
},
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
/**
* 获取对应某个章节的详细信息
* @param {[string]} vid
*/
getCurrentChapterDetailAliyun
=
(
vid
)
=>
this
.
post
(
'/api/lms/v2/education/aliyun-video-streaming'
,
{
vid
},
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
getCurrentChapterDetailAliyun
=
vid
=>
this
.
post
(
'/api/lms-ep/v2/education/aliyun-video-streaming'
,
{
vid
},
{
headers
:
{
'Content-Type'
:
'application/json'
}
}
)
/**
* 获取进度信息
* @param {[string]} vid
* @param {[string]} did
*/
getProgress
=
(
vid
,
did
,
sid
)
=>
this
.
get
(
`/api/lms/v2/education/video/
${
vid
}
/device`
,
{
device_id
:
did
})
getProgress
=
(
vid
,
did
,
sid
)
=>
this
.
get
(
`/api/lms
-ep
/v2/education/video/
${
vid
}
/device`
,
{
device_id
:
did
})
/**
* 提交进度信息
* @param {[object]} obj
...
...
@@ -35,17 +43,19 @@ export default class PlayerAPI extends BaseAPI {
_m: obj.mpt, // 当前播放最大时间
_c: obj.cpt // 当前播放位置
*/
updateProgress
=
(
obj
=
{})
=>
this
.
get
(
'/api/lms/v2/analytics/upload-video'
,
obj
)
updateProgress
=
(
obj
=
{})
=>
this
.
get
(
'/api/lms
-ep
/v2/analytics/upload-video'
,
obj
)
/**
* 获取试题信息
* @param {[string]} eid
*/
getExamDetail
=
(
sid
,
cid
,
eid
)
=>
this
.
get
(
`/api/lms/v2/education/homeworks/
${
cid
}
/
${
eid
}
`
,
{})
getExamDetail
=
(
sid
,
cid
,
eid
)
=>
this
.
get
(
`/api/lms
-ep
/v2/education/homeworks/
${
cid
}
/
${
eid
}
`
,
{})
/**
* 提交考试信息
* @param {[object]} param
*/
submitExamDetail
=
(
param
)
=>
this
.
post
(
'/api/lms/v2/education/homeworks'
,
param
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
submitExamDetail
=
param
=>
this
.
post
(
'/api/lms-ep/v2/education/homeworks'
,
param
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
/**
* 获取试题信息 - 课程后考试
* @param {[string]} eid
...
...
@@ -55,49 +65,61 @@ export default class PlayerAPI extends BaseAPI {
* 提交考试信息 - 课程后考试
* @param {[object]} param
*/
submitExamDetailAfterCourse
=
(
param
)
=>
this
.
post
(
'/v2/education/examinations'
,
param
)
submitExamDetailAfterCourse
=
param
=>
this
.
post
(
'/v2/education/examinations'
,
param
)
/**
* 获取对应 作业或问题 回答
* @param {[string]} id resource_id
*/
getHomework
=
(
sid
,
cid
,
id
)
=>
this
.
get
(
`/api/lms/v2/education/homeworks/
${
cid
}
/
${
id
}
`
,
{})
getHomework
=
(
sid
,
cid
,
id
)
=>
this
.
get
(
`/api/lms
-ep
/v2/education/homeworks/
${
cid
}
/
${
id
}
`
,
{})
/**
* 文件提交
* @param {[object]} obj
*/
uploadFile
=
(
obj
=
{})
=>
this
.
post
(
'/api/lms/util/upload-file'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
uploadFile
=
(
obj
=
{})
=>
this
.
post
(
'/api/lms-ep/util/upload-file'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
/**
* 提交课程 作业或问题
*/
updateHomework
=
(
obj
=
{})
=>
this
.
post
(
'/api/lms/v2/education/homeworks'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
updateHomework
=
(
obj
=
{})
=>
this
.
post
(
'/api/lms-ep/v2/education/homeworks'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
/**
* 课程作业截止时间
*/
getHomeworkStopTime
=
(
sid
,
cid
,
chapterId
)
=>
this
.
get
(
`/api/lms/v2/education/homeworks/
${
cid
}
/
${
chapterId
}
/deadline`
,
{})
getHomeworkStopTime
=
(
sid
,
cid
,
chapterId
)
=>
this
.
get
(
`/api/lms-ep/v2/education/homeworks/
${
cid
}
/
${
chapterId
}
/deadline`
,
{})
/**
* 获取对应 大作业 回答
* @param {[string]} cid
*/
getCourseHomework
=
(
sid
,
cid
)
=>
this
.
get
(
`/api/lms/v2/education/courses/
${
cid
}
/essay`
,
{})
getCourseHomework
=
(
sid
,
cid
)
=>
this
.
get
(
`/api/lms
-ep
/v2/education/courses/
${
cid
}
/essay`
,
{})
/**
* 提交课程 大作业
* @param {[string]} cid
*/
updateCourseHomework
=
(
sid
,
cid
,
obj
=
{})
=>
this
.
post
(
`/api/lms/v2/education/courses/
${
cid
}
/essay`
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
updateCourseHomework
=
(
sid
,
cid
,
obj
=
{})
=>
this
.
post
(
`/api/lms-ep/v2/education/courses/
${
cid
}
/essay`
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
/**
* 提交 课程考核
* @param {[string]} obj.cid
* @param {[string]} obj.raw (base64)
*/
updateSurveyAnswer
=
(
obj
)
=>
this
.
post
(
'/api/lms/v2/education/survey/answer'
,
obj
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
updateSurveyAnswer
=
obj
=>
this
.
post
(
'/api/lms-ep/v2/education/survey/answer'
,
obj
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
/**
* 手机端 获取实时最新直播接口
*/
getNewLiveMsg
=
(
obj
=
{})
=>
this
.
get
(
'/api/lms/v2/education/lives/latest'
,
obj
)
getNewLiveMsg
=
(
obj
=
{})
=>
this
.
get
(
'/api/lms
-ep
/v2/education/lives/latest'
,
obj
)
/**
* 手机端 获取列表接口
*/
getLiveList
=
(
obj
=
{})
=>
this
.
get
(
'/api/lms/v2/education/lives/courses'
,
obj
)
getLiveList
=
(
obj
=
{})
=>
this
.
get
(
'/api/lms
-ep
/v2/education/lives/courses'
,
obj
)
/**
* 跨域接口请求 - 直接获取云课堂设置
*/
...
...
@@ -107,21 +129,23 @@ export default class PlayerAPI extends BaseAPI {
* @param {[string]} course_id -> cid
* @param {[string]} semester_id -> sid
*/
getExamInfo
=
(
cid
,
sid
)
=>
this
.
get
(
`/api/lms/v2/education/
${
sid
}
/
${
cid
}
/examination`
,
{})
getExamInfo
=
(
cid
,
sid
)
=>
this
.
get
(
`/api/lms
-ep
/v2/education/
${
sid
}
/
${
cid
}
/examination`
,
{})
/**
* 获取考卷结果
* @param {[string]} course_id -> cid
* @param {[string]} semester_id -> sid
* @param {[string]} exam_id -> eid
*/
getExamAnswer
=
(
cid
,
sid
,
eid
,
obj
=
{})
=>
this
.
get
(
`/api/lms/v2/education/
${
sid
}
/
${
cid
}
/examination/
${
eid
}
/sheet`
,
obj
)
getExamAnswer
=
(
cid
,
sid
,
eid
,
obj
=
{})
=>
this
.
get
(
`/api/lms-ep/v2/education/
${
sid
}
/
${
cid
}
/examination/
${
eid
}
/sheet`
,
obj
)
/**
* 获取考试状态
* @param {[string]} course_id -> cid
* @param {[string]} semester_id -> sid
* @param {[string]} exam_id -> eid
*/
getExamStatus
=
(
cid
,
sid
,
eid
)
=>
this
.
get
(
`/api/lms/v2/education/
${
sid
}
/
${
cid
}
/examination/
${
eid
}
/status`
,
{})
getExamStatus
=
(
cid
,
sid
,
eid
)
=>
this
.
get
(
`/api/lms
-ep
/v2/education/
${
sid
}
/
${
cid
}
/examination/
${
eid
}
/status`
,
{})
/**
* 提交考卷
* @param {[string]} course_id -> cid
...
...
@@ -129,5 +153,8 @@ export default class PlayerAPI extends BaseAPI {
* @param {[string]} exam_id -> eid
* @param {[object]} obj -> 提交对象类
*/
submitExam
=
(
cid
,
sid
,
eid
,
obj
=
{})
=>
this
.
post
(
`/api/lms/v2/education/
${
sid
}
/
${
cid
}
/examination/
${
eid
}
/sheet`
,
obj
,
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
})
submitExam
=
(
cid
,
sid
,
eid
,
obj
=
{})
=>
this
.
post
(
`/api/lms-ep/v2/education/
${
sid
}
/
${
cid
}
/examination/
${
eid
}
/sheet`
,
obj
,
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
})
}
src/api/report_api.js
浏览文件 @
14e3bf3e
...
...
@@ -4,11 +4,11 @@ export default class ReportAPI extends BaseAPI {
/**
* 获取所有通过报告列表
*/
getReportList
=
()
=>
this
.
get
(
'/api/lms/v2/education/symposium-report-all'
,
{})
getReportList
=
()
=>
this
.
get
(
'/api/lms
-ep
/v2/education/symposium-report-all'
,
{})
/**
* 获取我的学术活动
*/
getReportActiveList
=
()
=>
this
.
get
(
'/api/lms/v2/education/symposium/my'
,
{})
getReportActiveList
=
()
=>
this
.
get
(
'/api/lms
-ep
/v2/education/symposium/my'
,
{})
/**
* 提交活动申请
* symposium_name 活动名称
...
...
@@ -19,53 +19,65 @@ export default class ReportAPI extends BaseAPI {
* symposium_address 活动地点
* 返回 {'flag' : true, 'errors' : []}
*/
submitReportActive
=
(
obj
=
{})
=>
this
.
post
(
'/api/lms/v2/education/symposium'
,
obj
,
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
})
submitReportActive
=
(
obj
=
{})
=>
this
.
post
(
'/api/lms-ep/v2/education/symposium'
,
obj
,
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
})
/**
* 获取学术活动详情
*/
getReportActive
=
(
rid
)
=>
this
.
get
(
`/api/lms
/v2/education/symposium/
${
rid
}
`
,
{})
getReportActive
=
rid
=>
this
.
get
(
`/api/lms-ep
/v2/education/symposium/
${
rid
}
`
,
{})
/**
* 修改活动申请
* 参数同上
*/
updateReportActive
=
(
rid
,
obj
=
{})
=>
this
.
post
(
`/api/lms/v2/education/symposium/
${
rid
}
`
,
obj
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
updateReportActive
=
(
rid
,
obj
=
{})
=>
this
.
post
(
`/api/lms-ep/v2/education/symposium/
${
rid
}
`
,
obj
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
/**
* 删除活动申请
* 参数同上
*/
deleteReportActive
=
rid
=>
this
.
delete
(
`/api/lms/v2/education/symposium/
${
rid
}
`
,
{})
deleteReportActive
=
rid
=>
this
.
delete
(
`/api/lms
-ep
/v2/education/symposium/
${
rid
}
`
,
{})
/**
* 获取活动相关的学术报告
*/
getReportListAll
=
(
rid
)
=>
this
.
get
(
`/api/lms
/v2/education/symposium/
${
rid
}
/report`
,
{})
getReportListAll
=
rid
=>
this
.
get
(
`/api/lms-ep
/v2/education/symposium/
${
rid
}
/report`
,
{})
/**
* 提交学术报告
* report_name 报告名称
* report_description 报告描述
* file_url 文章URL
*/
submitReport
=
(
rid
,
obj
=
{})
=>
this
.
post
(
`/api/lms/v2/education/symposium/
${
rid
}
/report`
,
obj
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
submitReport
=
(
rid
,
obj
=
{})
=>
this
.
post
(
`/api/lms-ep/v2/education/symposium/
${
rid
}
/report`
,
obj
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
/**
* 获取学术报告详情
*/
getSubmitReport
=
(
rid
,
reid
)
=>
this
.
get
(
`/api/lms/v2/education/symposium/report/
${
reid
}
`
,
{})
getSubmitReport
=
(
rid
,
reid
)
=>
this
.
get
(
`/api/lms
-ep
/v2/education/symposium/report/
${
reid
}
`
,
{})
/**
* 更新学术报告
*/
updateSubmitReport
=
(
rid
,
reid
,
obj
=
{})
=>
this
.
post
(
`/api/lms/v2/education/symposium/
${
rid
}
/report/
${
reid
}
`
,
obj
)
updateSubmitReport
=
(
rid
,
reid
,
obj
=
{})
=>
this
.
post
(
`/api/lms-ep/v2/education/symposium/
${
rid
}
/report/
${
reid
}
`
,
obj
)
/**
* 删除学术报告
* 参数同上
*/
deleteSubmitReport
=
(
rid
,
reid
)
=>
this
.
delete
(
`/api/lms/v2/education/symposium/report/
${
reid
}
`
,
{})
deleteSubmitReport
=
(
rid
,
reid
)
=>
this
.
delete
(
`/api/lms
-ep
/v2/education/symposium/report/
${
reid
}
`
,
{})
/**
* 获取事务类型
*/
getAffairsType
=
()
=>
this
.
get
(
'/api/lms/v2/lobby/affairs'
)
getAffairsType
=
()
=>
this
.
get
(
'/api/lms
-ep
/v2/lobby/affairs'
)
/**
* 获取事务类型
*/
getAffairsData
=
(
obj
=
{})
=>
this
.
get
(
'/api/lms/v2/lobby/processes'
,
obj
)
getAffairsData
=
(
obj
=
{})
=>
this
.
get
(
'/api/lms
-ep
/v2/lobby/processes'
,
obj
)
/**
* 提交活动申请
* affair_id 活动名称
...
...
@@ -77,13 +89,14 @@ export default class ReportAPI extends BaseAPI {
* symposium_lecturer
* 返回 {'flag' : true, 'errors' : []}
*/
submitLearning
=
(
obj
=
{})
=>
this
.
post
(
'/api/lms/v2/lobby/processes'
,
obj
)
submitLearning
=
(
obj
=
{})
=>
this
.
post
(
'/api/lms
-ep
/v2/lobby/processes'
,
obj
)
/* 删除事务 */
deleteAffairs
=
(
reid
)
=>
this
.
delete
(
`/api/lms
/v2/lobby/processes/
${
reid
}
`
,
{})
deleteAffairs
=
reid
=>
this
.
delete
(
`/api/lms-ep
/v2/lobby/processes/
${
reid
}
`
,
{})
/* 获取事务详情 */
getAffairsDetails
=
(
rid
)
=>
this
.
get
(
`/api/lms
/v2/lobby/processes/
${
rid
}
`
,
{})
getAffairsDetails
=
rid
=>
this
.
get
(
`/api/lms-ep
/v2/lobby/processes/
${
rid
}
`
,
{})
/* 修改事务 */
updateAffairs
=
(
rid
,
obj
=
{})
=>
this
.
post
(
`/api/lms/v2/lobby/processes/
${
rid
}
`
,
obj
)
updateAffairs
=
(
rid
,
obj
=
{})
=>
this
.
post
(
`/api/lms
-ep
/v2/lobby/processes/
${
rid
}
`
,
obj
)
/* 重修图片提交 */
uploadFile
=
(
obj
=
{})
=>
this
.
post
(
'/api/lms/v2/lobby/tools/upload'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
uploadFile
=
(
obj
=
{})
=>
this
.
post
(
'/api/lms-ep/v2/lobby/tools/upload'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
}
src/components/learnSysLayout/navigation.vue
浏览文件 @
14e3bf3e
<
template
>
<div
class=
"menu"
>
<div
class=
"nav-left"
>
<img
class=
"logo"
src=
"
@/assets/images/logo-header.png"
alt=
"logo
"
/>
<img
class=
"logo"
src=
"
https://zws-imgs-pub.ezijing.com/pc/base/logo_white.svg
"
/>
<div
class=
"text-title"
@
click=
"setStatus"
>
{{
$t
(
'components.learnSysLayout.navigation.title'
)
}}
</div>
</div>
<div
class=
"nav-right"
>
...
...
@@ -65,7 +65,7 @@ export default {
position
:
absolute
;
left
:
0
;
top
:
50%
;
height
:
3
7%
;
height
:
3
8px
;
width
:
auto
;
transform
:
translateY
(
-50%
);
}
...
...
src/modules/discuss/api/index.js
浏览文件 @
14e3bf3e
...
...
@@ -4,92 +4,64 @@ const httpRequest = new BaseAPI(webConf)
/**
* 获取课程讨论列表
*/
export
const
getDiscussList
=
(
param
)
=>
{
export
const
getDiscussList
=
param
=>
{
const
paramPath
=
param
.
path
||
''
return
httpRequest
.
get
(
`/api/lms/v2/qa/questions
${
paramPath
}
`
,
param
.
dataJson
)
return
httpRequest
.
get
(
`/api/lms-ep/v2/qa/questions
${
paramPath
}
`
,
param
.
dataJson
)
}
/**
* 获取我的课程讨论列表
*/
export
const
getCourseDiscussList
=
(
param
)
=>
{
export
const
getCourseDiscussList
=
param
=>
{
const
paramPath
=
param
.
path
||
''
return
httpRequest
.
get
(
`/api/lms/v2/qa/questions/course
${
paramPath
}
`
,
param
.
dataJson
)
return
httpRequest
.
get
(
`/api/lms-ep/v2/qa/questions/course
${
paramPath
}
`
,
param
.
dataJson
)
}
/**
* 删除提问
*/
export
const
deleteDiscuss
=
(
qid
)
=>
{
return
httpRequest
.
delete
(
`/api/lms/v2/qa/questions/
${
qid
}
`
)
export
const
deleteDiscuss
=
qid
=>
{
return
httpRequest
.
delete
(
`/api/lms-ep/v2/qa/questions/
${
qid
}
`
)
}
/**
* 获取问题详情
*/
export
const
getDiscussDetail
=
(
qid
)
=>
{
return
httpRequest
.
get
(
`/api/lms/v2/qa/questions/
${
qid
}
`
)
export
const
getDiscussDetail
=
qid
=>
{
return
httpRequest
.
get
(
`/api/lms-ep/v2/qa/questions/
${
qid
}
`
)
}
/**
* 删除评论
*/
export
const
deleteComment
=
(
cid
)
=>
{
return
httpRequest
.
delete
(
`/api/lms/v2/qa/comments/
${
cid
}
`
)
export
const
deleteComment
=
cid
=>
{
return
httpRequest
.
delete
(
`/api/lms-ep/v2/qa/comments/
${
cid
}
`
)
}
/**
* 回复评论
*/
export
const
callbackComment
=
(
param
)
=>
{
return
httpRequest
.
post
(
'/api/lms/v2/qa/comments'
,
param
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
}
)
export
const
callbackComment
=
param
=>
{
return
httpRequest
.
post
(
'/api/lms-ep/v2/qa/comments'
,
param
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
}
/**
* 回答问题
*/
export
const
answerQues
=
(
param
)
=>
{
return
httpRequest
.
post
(
'/api/lms/v2/qa/answers'
,
param
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
}
)
export
const
answerQues
=
param
=>
{
return
httpRequest
.
post
(
'/api/lms-ep/v2/qa/answers'
,
param
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
}
/**
* 删除回答
*/
export
const
deleteAnswer
=
(
aid
)
=>
{
return
httpRequest
.
delete
(
`/api/lms/v2/qa/answers/
${
aid
}
`
)
export
const
deleteAnswer
=
aid
=>
{
return
httpRequest
.
delete
(
`/api/lms-ep/v2/qa/answers/
${
aid
}
`
)
}
/**
* 取消点赞
*/
export
const
unlike
=
(
tagid
)
=>
{
return
httpRequest
.
delete
(
`/api/lms/v2/qa/tags/
${
tagid
}
`
)
export
const
unlike
=
tagid
=>
{
return
httpRequest
.
delete
(
`/api/lms-ep/v2/qa/tags/
${
tagid
}
`
)
}
/**
* 点赞
*/
export
const
like
=
(
param
)
=>
{
return
httpRequest
.
post
(
'/api/lms/v2/qa/tags'
,
param
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
}
)
export
const
like
=
param
=>
{
return
httpRequest
.
post
(
'/api/lms-ep/v2/qa/tags'
,
param
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
}
src/modules/offices/api/index.js
浏览文件 @
14e3bf3e
...
...
@@ -4,11 +4,11 @@ const httpRequest = new BaseAPI(webConf)
// 获取事务类型列表
export
function
getAffairType
()
{
return
httpRequest
.
get
(
'/api/lms/v2/lobby/affairs'
)
return
httpRequest
.
get
(
'/api/lms
-ep
/v2/lobby/affairs'
)
}
// 获取事务列表
export
function
getAffairList
(
params
)
{
return
httpRequest
.
get
(
'/api/lms/v2/lobby/processes'
,
params
).
then
(
response
=>
{
return
httpRequest
.
get
(
'/api/lms
-ep
/v2/lobby/processes'
,
params
).
then
(
response
=>
{
const
status
=
{
'-1'
:
'待审批'
,
0
:
'未通过'
,
...
...
@@ -26,49 +26,49 @@ export function getAffairList(params) {
}
// 获取事务详情
export
function
getAffair
(
id
)
{
return
httpRequest
.
get
(
`/api/lms/v2/lobby/processes/
${
id
}
`
)
return
httpRequest
.
get
(
`/api/lms
-ep
/v2/lobby/processes/
${
id
}
`
)
}
// 创建事务
export
function
createAffair
(
data
)
{
return
httpRequest
.
post
(
'/api/lms/v2/lobby/processes'
,
data
)
return
httpRequest
.
post
(
'/api/lms
-ep
/v2/lobby/processes'
,
data
)
}
// 更新事务
export
function
updateAffair
(
id
,
data
)
{
return
httpRequest
.
post
(
`/api/lms/v2/lobby/processes/
${
id
}
`
,
data
)
return
httpRequest
.
post
(
`/api/lms
-ep
/v2/lobby/processes/
${
id
}
`
,
data
)
}
// 删除事务
export
function
deleteAffair
(
id
)
{
return
httpRequest
.
delete
(
`/api/lms/v2/lobby/processes/
${
id
}
`
)
return
httpRequest
.
delete
(
`/api/lms
-ep
/v2/lobby/processes/
${
id
}
`
)
}
// 上传文件
export
function
upload
(
data
)
{
return
httpRequest
.
post
(
'/api/lms/v2/lobby/tools/upload'
,
data
,
{
return
httpRequest
.
post
(
'/api/lms
-ep
/v2/lobby/tools/upload'
,
data
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
}
// 获取学期
export
function
getSemesters
()
{
return
httpRequest
.
get
(
'/api/lms/v2/lobby/semesters'
)
return
httpRequest
.
get
(
'/api/lms
-ep
/v2/lobby/semesters'
)
}
// 获取课程
export
function
getCourses
(
sid
)
{
return
httpRequest
.
get
(
`/api/lms/v2/lobby/semesters/
${
sid
}
/courses`
)
return
httpRequest
.
get
(
`/api/lms
-ep
/v2/lobby/semesters/
${
sid
}
/courses`
)
}
// 获取成绩单
export
function
getReport
(
params
)
{
return
httpRequest
.
get
(
'/api/lms/v2/lobby/havereport'
,
params
)
return
httpRequest
.
get
(
'/api/lms
-ep
/v2/lobby/havereport'
,
params
)
}
// 获取学生
export
function
getStudent
()
{
return
httpRequest
.
get
(
'/api/lms/v2/lobby/student'
)
return
httpRequest
.
get
(
'/api/lms
-ep
/v2/lobby/student'
)
}
// 获取重修课程
export
function
getRetakeCourses
()
{
return
httpRequest
.
get
(
'/api/lms/v2/lobby/courses'
)
return
httpRequest
.
get
(
'/api/lms
-ep
/v2/lobby/courses'
)
}
// 更改事务状态
export
function
changeStatus
(
data
)
{
return
httpRequest
.
post
(
'/api/lms/v2/lobby/changestatus'
,
data
)
return
httpRequest
.
post
(
'/api/lms
-ep
/v2/lobby/changestatus'
,
data
)
}
// 创建微信支付订单
...
...
@@ -88,17 +88,17 @@ export function getOrder(orderId) {
// 支付成功回调
export
function
paySuccess
(
id
)
{
return
httpRequest
.
get
(
`/api/lms/v2/lobby/update-status-api/
${
id
}
`
)
return
httpRequest
.
get
(
`/api/lms
-ep
/v2/lobby/update-status-api/
${
id
}
`
)
}
// 获取学术活动报告列表
export
function
getAcitivityReportList
(
id
)
{
return
httpRequest
.
get
(
`/api/lms/v2/education/symposium/
${
id
}
/report`
)
return
httpRequest
.
get
(
`/api/lms
-ep
/v2/education/symposium/
${
id
}
/report`
)
}
// 上传文件
export
function
uploadFile
(
data
)
{
return
httpRequest
.
post
(
'/api/lms/v2/lobby/tools/upload'
,
data
,
{
return
httpRequest
.
post
(
'/api/lms
-ep
/v2/lobby/tools/upload'
,
data
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
}
src/modules/offices/mixins/edit.js
浏览文件 @
14e3bf3e
...
...
@@ -8,6 +8,7 @@ export default {
},
data
()
{
return
{
loaded
:
false
,
detail
:
{},
// 学期列表
semesterList
:
[
...
...
@@ -33,7 +34,7 @@ export default {
},
// 撤回
hasAbort
()
{
return
this
.
isEdit
&&
this
.
detail
.
status
===
-
1
return
this
.
isEdit
&&
this
.
detail
.
status
===
-
1
&&
this
.
detail
.
pay
!==
1
},
// 去支付
hasPay
()
{
...
...
@@ -87,9 +88,11 @@ export default {
},
// 获取详情
getDetail
()
{
api
.
getAffair
(
this
.
pid
).
then
(
response
=>
{
this
.
loaded
=
false
return
api
.
getAffair
(
this
.
pid
).
then
(
response
=>
{
this
.
detail
=
response
this
.
ruleForm
=
response
.
form
this
.
loaded
=
true
})
},
// 返回
...
...
src/modules/offices/src/reportPaper/edit.vue
浏览文件 @
14e3bf3e
...
...
@@ -122,7 +122,9 @@ export default {
'$route.query'
:
{
immediate
:
true
,
handler
(
query
)
{
this
.
payVisible
=
query
.
pay
===
'1'
if
(
query
.
pay
===
'1'
)
{
this
.
handlePay
()
}
}
}
},
...
...
@@ -134,15 +136,21 @@ export default {
},
methods
:
{
handleSubmitSuccess
(
response
)
{
if
(
!
this
.
isEdit
)
{
this
.
$router
.
replace
({
name
:
'pareportEdit'
,
params
:
{
id
:
response
.
data
.
id
},
query
:
{
id
:
this
.
affairId
,
pay
:
'1'
}
})
.
then
(
this
.
getDetail
)
}
if
(
this
.
isEdit
)
{
this
.
handlePay
()
}
else
{
this
.
$router
.
replace
({
name
:
'pareportEdit'
,
params
:
{
id
:
response
.
data
.
id
},
query
:
{
id
:
this
.
affairId
,
pay
:
'1'
}
})
}
},
// 去支付
handlePay
()
{
async
handlePay
()
{
if
(
!
this
.
loaded
)
{
await
this
.
getDetail
()
}
this
.
payVisible
=
true
},
// 支付成功
...
...
src/modules/offices/src/reportPaper/list.vue
浏览文件 @
14e3bf3e
...
...
@@ -56,7 +56,7 @@ export default {
{
label
:
'删除'
,
isShow
(
row
)
{
return
row
.
status
===
-
1
return
row
.
status
===
-
1
&&
row
.
pay
!==
1
},
onClick
:
row
=>
{
this
.
handleRemove
(
row
)
...
...
src/modules/viewer/api.js
浏览文件 @
14e3bf3e
...
...
@@ -8,7 +8,7 @@ const httpRequest = new BaseAPI(webConf)
* @param {string} courseId 课程ID
*/
export
function
getCourse
(
semesterId
,
courseId
)
{
return
httpRequest
.
get
(
`/api/lms/v2/education/courses/
${
courseId
}
`
)
return
httpRequest
.
get
(
`/api/lms
-ep
/v2/education/courses/
${
courseId
}
`
)
}
/**
...
...
@@ -17,7 +17,7 @@ export function getCourse(semesterId, courseId) {
*/
export
function
getChapterVideo
(
vid
)
{
return
httpRequest
.
post
(
'/api/lms/v2/education/video-streaming'
,
'/api/lms
-ep
/v2/education/video-streaming'
,
{
vid
},
{
headers
:
{
'Content-Type'
:
'application/json'
}
}
)
...
...
@@ -29,7 +29,7 @@ export function getChapterVideo(vid) {
*/
export
function
getChapterVideoAliyun
(
vid
)
{
return
httpRequest
.
post
(
'/api/lms/v2/education/aliyun-video-streaming'
,
'/api/lms
-ep
/v2/education/aliyun-video-streaming'
,
{
vid
},
{
headers
:
{
'Content-Type'
:
'application/json'
}
}
)
...
...
@@ -42,7 +42,7 @@ export function getChapterVideoAliyun(vid) {
* @param {Object} params
*/
export
function
getChapterVideoProgress
(
semesterId
,
resourseId
,
params
)
{
return
httpRequest
.
get
(
`/api/lms/v2/education/video/
${
resourseId
}
/device`
,
params
)
return
httpRequest
.
get
(
`/api/lms
-ep
/v2/education/video/
${
resourseId
}
/device`
,
params
)
}
/**
...
...
@@ -50,7 +50,7 @@ export function getChapterVideoProgress(semesterId, resourseId, params) {
* @param {Object} params
*/
export
function
updateChapterVideoProgress
(
params
)
{
return
httpRequest
.
get
(
'/api/lms/v2/analytics/upload-video'
,
params
)
return
httpRequest
.
get
(
'/api/lms
-ep
/v2/analytics/upload-video'
,
params
)
}
/**
...
...
@@ -60,7 +60,7 @@ export function updateChapterVideoProgress(params) {
* @param {string} resourseId 章节的资源ID
*/
export
function
getChapterHomework
(
courseId
,
chapterId
,
resourseId
)
{
return
httpRequest
.
get
(
`/api/lms/v2/education/homeworks/
${
courseId
}
/
${
chapterId
}
/
${
resourseId
}
`
)
return
httpRequest
.
get
(
`/api/lms
-ep
/v2/education/homeworks/
${
courseId
}
/
${
chapterId
}
/
${
resourseId
}
`
)
}
/**
...
...
@@ -70,14 +70,14 @@ export function getChapterHomework(courseId, chapterId, resourseId) {
* @param {string} chapterId 章节ID
*/
export
function
getChapterHomeworkDeadline
(
semesterId
,
courseId
,
chapterId
)
{
return
httpRequest
.
get
(
`/api/lms/v2/education/homeworks/
${
courseId
}
/
${
chapterId
}
/deadline`
)
return
httpRequest
.
get
(
`/api/lms
-ep
/v2/education/homeworks/
${
courseId
}
/
${
chapterId
}
/deadline`
)
}
/**
* 提交考试
*/
export
function
sbumitChapterHomework
(
params
)
{
return
httpRequest
.
post
(
'/api/lms/v2/education/homeworks'
,
params
,
{
return
httpRequest
.
post
(
'/api/lms
-ep
/v2/education/homeworks'
,
params
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
}
...
...
@@ -86,7 +86,7 @@ export function sbumitChapterHomework(params) {
* 上传文件
*/
export
function
uploadFile
(
data
)
{
return
httpRequest
.
post
(
'/api/lms/util/upload-file'
,
data
,
{
return
httpRequest
.
post
(
'/api/lms
-ep
/util/upload-file'
,
data
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
}
...
...
@@ -97,7 +97,7 @@ export function uploadFile(data) {
* @param {string} courseId 课程ID
*/
export
function
getCourseWork
(
semesterId
,
courseId
)
{
return
httpRequest
.
get
(
`/api/lms/v2/education/courses/
${
courseId
}
/essay`
)
return
httpRequest
.
get
(
`/api/lms
-ep
/v2/education/courses/
${
courseId
}
/essay`
)
}
/**
...
...
@@ -106,7 +106,7 @@ export function getCourseWork(semesterId, courseId) {
* @param {string} courseId 课程ID
*/
export
function
updateCourseWork
(
semesterId
,
courseId
,
data
)
{
return
httpRequest
.
post
(
`/api/lms/v2/education/courses/
${
courseId
}
/essay`
,
data
,
{
return
httpRequest
.
post
(
`/api/lms
-ep
/v2/education/courses/
${
courseId
}
/essay`
,
data
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
}
...
...
@@ -117,7 +117,7 @@ export function updateCourseWork(semesterId, courseId, data) {
* @param {string} courseId 课程ID
*/
export
function
getCourseExam
(
semesterId
,
courseId
)
{
return
httpRequest
.
get
(
`/api/lms/v2/education/
${
courseId
}
/examination`
)
return
httpRequest
.
get
(
`/api/lms
-ep
/v2/education/
${
courseId
}
/examination`
)
}
/**
...
...
@@ -127,7 +127,7 @@ export function getCourseExam(semesterId, courseId) {
* @param {string} examId 试题ID
*/
export
function
getCourseExamStatus
(
semesterId
,
courseId
,
examId
)
{
return
httpRequest
.
get
(
`/api/lms/v2/education/
${
courseId
}
/examination/
${
examId
}
/status`
)
return
httpRequest
.
get
(
`/api/lms
-ep
/v2/education/
${
courseId
}
/examination/
${
examId
}
/status`
)
}
/**
...
...
@@ -137,7 +137,7 @@ export function getCourseExamStatus(semesterId, courseId, examId) {
* @param {string} examId 试题ID
*/
export
function
submitCourseExam
(
semesterId
,
courseId
,
examId
,
data
)
{
return
httpRequest
.
post
(
`/api/lms/v2/education/
${
courseId
}
/examination/
${
examId
}
/sheet`
,
data
,
{
return
httpRequest
.
post
(
`/api/lms
-ep
/v2/education/
${
courseId
}
/examination/
${
examId
}
/sheet`
,
data
,
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
})
}
...
...
@@ -149,5 +149,5 @@ export function submitCourseExam(semesterId, courseId, examId, data) {
* @param {string} examId 试题ID
*/
export
function
getCourseExamResult
(
semesterId
,
courseId
,
examId
,
params
)
{
return
httpRequest
.
get
(
`/api/lms/v2/education/
${
courseId
}
/examination/
${
examId
}
/sheet`
,
params
)
return
httpRequest
.
get
(
`/api/lms
-ep
/v2/education/
${
courseId
}
/examination/
${
examId
}
/sheet`
,
params
)
}
src/modules/viewer/components/work/chapterWork.vue
浏览文件 @
14e3bf3e
...
...
@@ -42,7 +42,7 @@
<
template
v
-
if
=
"isRevised"
>
<
div
class
=
"paper-check"
>
<
p
>
{{
$t
(
'viewerWork.correctionTime'
)
}}
:
{{
detail
.
checker_time
}}
<
/p
>
<
div
class
=
"paper-check-item"
>
<
div
class
=
"paper-check-item"
v
-
if
=
"hasScore"
>
<
b
>
{{
$t
(
'viewerWork.score'
)
}}
:
<
/b
>
{{
detail
.
score
}}
<
/div
>
...
...
@@ -156,6 +156,10 @@ export default {
const
endTime
=
+
new
Date
(
this
.
deadline
)
const
currentTime
=
new
Date
().
getTime
()
return
currentTime
<
endTime
}
,
hasScore
()
{
// allow_score 1 显示 2隐藏
return
this
.
detail
.
allow_score
!==
2
}
}
,
methods
:
{
...
...
src/modules/viewer/components/work/courseExam.vue
浏览文件 @
14e3bf3e
<
template
>
<container
:title=
"
exam.title"
v-loading=
"!loaded
"
>
<template
v-slot:header-aside
>
<container
:title=
"
status.title"
v-loading=
"loading
"
>
<template
v-slot:header-aside
v-if=
"isStartExam"
>
<template
v-if=
"isCompleted"
>
{{
$t
(
'viewerWork.fraction'
)
}}
:
{{
exam
.
score
.
total
}}{{
$t
(
'viewerWork.fractionUnit'
)
}}
</
template
>
<
template
v-else
>
{{
$t
(
'viewerWork.examTime'
)
}}
:
{{
status
.
start_time
}}
~
{{
status
.
terminate_time
}}
</
template
>
<
template
v-else
>
<div
v-if=
"hasCountdown"
>
倒计时:
{{
countdownDurationText
}}
</div>
<div
v-else
>
{{
$t
(
'viewerWork.examTime'
)
}}
:
{{
status
.
start_time
}}
~
{{
status
.
terminate_time
}}
</div>
</
template
>
</template>
<div
class=
"exam"
>
<
template
v-if=
"status.examination_status === '00'"
>
<div
style=
"text-align: center; margin-top: 40px; margin-bottom: -60px"
>
{{
$t
(
'viewerWork.examTime'
)
}}
:
{{
status
.
start_time
}}
~
{{
status
.
terminate_time
}}
</div>
<div
class=
"no-exam"
>
{{
$t
(
'viewerWork.examEmpty'
)
}}
</div>
</
template
>
<
template
v-else-if=
"isSubmited && !isCompleted && !isMultipleExams"
>
<div
class=
"no-exam"
>
{{
$t
(
'viewerWork.examSubmitedTips'
)
}}
</div>
</
template
>
<
template
v-else
>
<!-- 考试期间,未开始考试 -->
<div
class=
"exam-welcome"
v-if=
"!isStartExam"
>
<div
class=
"inner"
>
<div>
{{
$t
(
'viewerWork.examTime'
)
}}
:
{{
status
.
start_time
}}
~
{{
status
.
terminate_time
}}
</div>
<div
v-if=
"hasCountdown"
>
本场考试时间:
{{
durationText
}}
。
<br
/>
时间用尽自动交卷,请您注意答题时间。
</div>
</div>
<el-button
type=
"primary"
:disabled=
"!isExamTime"
@
click=
"onStartExam"
>
{{
startExamButtonText
}}
</el-button>
</div>
<!-- 考试试题 -->
<div
class=
"exam-form"
v-
if=
"loaded"
>
<div
class=
"exam-form"
v-
else
>
<el-form
:disabled=
"!canEditable"
>
<template
v-for=
"items in questions"
>
<exam-item
...
...
@@ -35,7 +49,7 @@
<
template
v-if=
"isMultipleExams"
>
<el-button
type=
"primary"
@
click=
"handlePrev"
v-if=
"hasPrev"
>
{{
$t
(
'viewerWork.prevPapers'
)
}}
</el-button>
<el-button
type=
"primary"
@
click=
"handleNext"
v-if=
"hasNext"
>
{{
$t
(
'viewerWork.nextPapers'
)
}}
</el-button>
<el-button
type=
"primary"
@
click=
"handleNewExam"
v-if=
"hasResubmit"
>
<el-button
type=
"primary"
@
click=
"handleNewExam"
v-if=
"hasResubmit
&& isExamTime
"
>
{{
$t
(
'viewerWork.anotherSubmitText'
)
}}
</el-button>
</
template
>
...
...
@@ -61,30 +75,21 @@ import Container from '../common/container.vue'
import
ExamItem
from
'./examItem.vue'
// api
import
*
as
api
from
'../../api'
import
tool
from
'@/tool/index'
//
章节测试题
//
课后考试
export
default
{
name
:
'CourseExam'
,
components
:
{
Container
,
ExamItem
},
props
:
{
// 当前选中的章节
chapter
:
{
type
:
Object
,
default
()
{
return
{}
}
},
chapter
:
{
type
:
Object
,
default
:
()
=>
{}
},
// 课程详情接口返回的数据
data
:
{
type
:
Object
,
default
()
{
return
{}
}
}
data
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
data
()
{
return
{
load
ed
:
false
,
load
ing
:
false
,
detail
:
{},
status
:
{},
questions
:
[],
...
...
@@ -95,7 +100,9 @@ export default {
submitLoading
:
false
,
isMultipleExams
:
false
,
// 是否可以多次考试
maxExams
:
3
,
// 最多考试几次
examCount
:
this
.
data
.
exist_examination
?
this
.
data
.
exist_examination
.
length
:
0
// 试卷数量
countdownDuration
:
0
,
// 倒计时剩余时间
countdownTimer
:
null
,
isStartExam
:
false
}
},
watch
:
{
...
...
@@ -104,6 +111,12 @@ export default {
handler
()
{
this
.
init
()
}
},
examCount
:
{
immediate
:
true
,
handler
(
value
)
{
this
.
isStartExam
=
!!
value
}
}
},
computed
:
{
...
...
@@ -124,6 +137,10 @@ export default {
// 大于开始时间,小于结束时间
return
this
.
status
.
examination_status
===
'20'
},
// 考试按钮
startExamButtonText
()
{
return
this
.
status
.
examination_status
===
'90'
?
'考试结束'
:
'开始考试'
},
// 是否提交
isSubmited
()
{
return
this
.
exam
.
type
===
1
||
this
.
exam
.
type
===
2
...
...
@@ -156,7 +173,7 @@ export default {
},
// 是否显示再考一次
hasResubmit
()
{
if
(
this
.
exam
List
.
length
>=
this
.
maxExams
)
{
if
(
this
.
exam
Count
>=
this
.
maxExams
)
{
return
false
}
// 判断状态是否还有未提交的试题
...
...
@@ -166,11 +183,25 @@ export default {
}
}
return
true
// return this.isSubmited && this.isExamTime && this.examCount
<
this
.
maxExams
},
// 已存在的试题列表
examList
()
{
return
this
.
data
.
exist_examination
},
// 试卷数量
examCount
()
{
return
this
.
examList
?
this
.
examList
.
length
:
0
},
// 是否有倒计时
hasCountdown
()
{
return
!!
this
.
status
.
duration
&&
this
.
canEditable
},
// 倒计时文字
countdownDurationText
()
{
return
tool
.
convertTime
.
durationToTimeString
(
this
.
countdownDuration
)
},
durationText
()
{
return
tool
.
convertTime
.
durationToTimeString2
(
this
.
status
.
duration
)
}
},
methods
:
{
...
...
@@ -180,11 +211,21 @@ export default {
// 自动获取考试状态
await
this
.
autoCheckExamStatus
()
// 获取试题
this
.
isStartExam
&&
this
.
getExam
()
},
// 开始考试
onStartExam
()
{
this
.
isStartExam
=
true
this
.
getExam
()
},
// 获取考试状态
async
getExamStatus
()
{
await
api
.
getCourseExamStatus
(
this
.
sid
,
this
.
cid
,
this
.
pid
).
then
(
response
=>
{
// examination_status
// 00: 考场未开放,不允许进入
// 10:考场开放,允许进入
// 20:开始答题
// 90:考试已结束
this
.
status
=
response
if
(
this
.
isSubmited
||
response
.
examination_status
===
'90'
)
{
this
.
checkStatusTimer
&&
clearInterval
(
this
.
checkStatusTimer
)
...
...
@@ -196,11 +237,11 @@ export default {
// 获取试题状态
await
this
.
getExamStatus
()
this
.
checkStatusTimer
&&
clearInterval
(
this
.
checkStatusTimer
)
this
.
checkStatusTimer
=
setInterval
(
this
.
getExamStatus
,
5
000
)
this
.
checkStatusTimer
=
setInterval
(
this
.
getExamStatus
,
1
000
)
},
// 获取试题
getExam
()
{
this
.
load
ed
=
fals
e
this
.
load
ing
=
tru
e
api
.
getCourseExamResult
(
this
.
sid
,
this
.
cid
,
this
.
pid
,
{
offset
:
this
.
offset
})
.
then
(
response
=>
{
...
...
@@ -210,9 +251,13 @@ export default {
this
.
canEditable
&&
this
.
autoSubmit
()
// 更新菜单
this
.
isMultipleExams
&&
this
.
$emit
(
'update'
)
// 倒计时剩余时间
this
.
countdownDuration
=
this
.
status
.
duration
-
this
.
exam
.
duration
// 开始倒计时
this
.
hasCountdown
&&
this
.
setCountdown
()
})
.
finally
(()
=>
{
this
.
load
ed
=
tru
e
this
.
load
ing
=
fals
e
})
},
// 组装问题数据
...
...
@@ -293,7 +338,7 @@ export default {
const
params
=
{
answers
:
JSON
.
stringify
(
answers
),
type
:
0
}
// 请求接口
this
.
handleSubmitRequest
(
params
)
},
3
000
)
},
1
000
)
},
// 处理请求接口答案数据
handleSubmitData
()
{
...
...
@@ -340,7 +385,9 @@ export default {
}
})
.
catch
(
error
=>
{
this
.
$message
.
error
(
error
.
message
)
params
.
type
&&
this
.
$message
.
error
(
error
.
message
)
this
.
autoSubmitTimer
&&
clearInterval
(
this
.
autoSubmitTimer
)
this
.
getExam
()
})
.
finally
(()
=>
{
this
.
submitLoading
=
false
...
...
@@ -357,12 +404,22 @@ export default {
},
handleNewExam
()
{
this
.
$router
.
push
({
query
:
{
offset
:
this
.
examCount
}
})
this
.
examCount
++
},
// 清除定时器
clearTimer
()
{
this
.
autoSubmitTimer
&&
clearInterval
(
this
.
autoSubmitTimer
)
this
.
checkStatusTimer
&&
clearInterval
(
this
.
checkStatusTimer
)
this
.
countdownTimer
&&
clearInterval
(
this
.
countdownTimer
)
},
// 设置倒计时
setCountdown
()
{
this
.
countdownTimer
&&
clearInterval
(
this
.
countdownTimer
)
this
.
countdownTimer
=
setInterval
(()
=>
{
this
.
countdownDuration
--
if
(
this
.
countdownDuration
<=
0
)
{
this
.
countdownTimer
&&
clearInterval
(
this
.
countdownTimer
)
}
},
1000
)
}
},
beforeMount
()
{
...
...
@@ -392,9 +449,10 @@ export default {
text-align
:
center
;
}
.exam-welcome
{
padding
:
40px
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
line-height
:
30px
;
text-align
:
center
;
::v-deep
.el-button
{
margin-top
:
30px
;
}
...
...
src/modules/viewer/languages/zh-CN.js
浏览文件 @
14e3bf3e
...
...
@@ -27,8 +27,8 @@ export default {
submitedText
:
'已提交'
,
fraction
:
'分数'
,
fractionUnit
:
'分'
,
examEmpty
:
'
暂无考试
'
,
examTime
:
'考试时间'
,
examEmpty
:
'
考试暂未开始
'
,
examTime
:
'考试
有效
时间'
,
examDeadline
:
'考试截止时间'
,
examSubmitedTips
:
'试卷批改中,请耐心等待'
,
examSubmitButtonTips
:
'提交之后就不能修改了哦'
,
...
...
src/pages/affairsHall/api.js
浏览文件 @
14e3bf3e
...
...
@@ -4,35 +4,35 @@ const httpRequest = new BaseAPI(webConf)
// 获取事务类型列表
export
function
getAffairType
()
{
return
httpRequest
.
get
(
'/api/lms/v2/lobby/affairs'
)
return
httpRequest
.
get
(
'/api/lms
-ep
/v2/lobby/affairs'
)
}
// 获取事务列表
export
function
getAffairList
()
{
return
httpRequest
.
get
(
'/api/lms/v2/lobby/processes'
)
return
httpRequest
.
get
(
'/api/lms
-ep
/v2/lobby/processes'
)
}
// 获取事务详情
export
function
getAffair
(
id
)
{
return
httpRequest
.
get
(
`/api/lms/v2/lobby/processes/
${
id
}
`
)
return
httpRequest
.
get
(
`/api/lms
-ep
/v2/lobby/processes/
${
id
}
`
)
}
// 创建事务
export
function
createAffair
(
data
)
{
return
httpRequest
.
post
(
'/api/lms/v2/lobby/processes'
,
data
)
return
httpRequest
.
post
(
'/api/lms
-ep
/v2/lobby/processes'
,
data
)
}
// 更新事务
export
function
updateAffair
(
id
,
data
)
{
return
httpRequest
.
post
(
`/api/lms/v2/lobby/processes/
${
id
}
`
,
data
)
return
httpRequest
.
post
(
`/api/lms
-ep
/v2/lobby/processes/
${
id
}
`
,
data
)
}
// 删除事务
export
function
deleteAffair
(
id
)
{
return
httpRequest
({
url
:
`/api/lms/v2/lobby/processes/
${
id
}
`
,
url
:
`/api/lms
-ep
/v2/lobby/processes/
${
id
}
`
,
method
:
'delete'
})
}
// 上传文件
export
function
upload
(
data
)
{
return
httpRequest
({
url
:
'/api/lms/v2/lobby/tools/upload'
,
url
:
'/api/lms
-ep
/v2/lobby/tools/upload'
,
method
:
'post'
,
headers
:
{
'Content-Type'
:
'multipart/form-data'
},
data
...
...
@@ -40,17 +40,17 @@ export function upload(data) {
}
// 获取学期
export
function
getSemesters
(
params
)
{
return
httpRequest
.
get
(
'/api/lms/v2/lobby/semesters'
)
return
httpRequest
.
get
(
'/api/lms
-ep
/v2/lobby/semesters'
)
}
// 获取课程
export
function
getCourses
(
sid
)
{
return
httpRequest
.
get
(
`/api/lms/v2/lobby/semesters/
${
sid
}
/courses`
)
return
httpRequest
.
get
(
`/api/lms
-ep
/v2/lobby/semesters/
${
sid
}
/courses`
)
}
// 获取成绩单
export
function
getReport
()
{
return
httpRequest
.
get
(
'/api/lms/v2/lobby/havereport'
)
return
httpRequest
.
get
(
'/api/lms
-ep
/v2/lobby/havereport'
)
}
// 获取学生
export
function
getStudent
()
{
return
httpRequest
.
get
(
'/api/lms/v2/lobby/student'
)
return
httpRequest
.
get
(
'/api/lms
-ep
/v2/lobby/student'
)
}
src/tool/convert_time.js
浏览文件 @
14e3bf3e
...
...
@@ -3,15 +3,32 @@ export default class ConvertTime {
* 工具方法 - 播放时间 转化 h:m:s
* @param {[string]} duration 时间戳
*/
durationToTimeString
(
duration
)
{
durationToTimeString
(
duration
)
{
const
h
=
Math
.
floor
(
duration
/
3600
)
const
m
=
Math
.
floor
((
duration
-
h
*
3600
)
/
60
)
const
s
=
(
duration
-
h
*
3600
-
m
*
60
)
%
60
function
tenify
(
a
)
{
function
tenify
(
a
)
{
return
a
>=
10
?
a
:
'0'
+
a
}
const
to
=
{
h
:
tenify
(
h
),
m
:
tenify
(
m
),
s
:
tenify
(
s
)
}
const
format
=
'h:m:s'
return
format
.
replace
(
/h|m|s/g
,
k
=>
to
[
k
]).
replace
(
/^00:/
,
''
)
}
durationToTimeString2
(
duration
)
{
const
h
=
Math
.
floor
(
duration
/
3600
)
const
m
=
Math
.
floor
((
duration
-
h
*
3600
)
/
60
)
const
s
=
(
duration
-
h
*
3600
-
m
*
60
)
%
60
let
output
=
''
if
(
h
)
{
output
+=
`
${
h
}
小时`
}
if
(
m
)
{
output
+=
`
${
m
}
分钟`
}
if
(
s
)
{
output
+=
`
${
s
}
秒`
}
return
output
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论