Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
6dd65782
提交
6dd65782
authored
4月 09, 2020
作者:
zyx
浏览文件
操作
浏览文件
下载
差异文件
update
上级
2fe3e413
4664b1c7
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
801 行增加
和
24 行删除
+801
-24
DiscussAction.js
client/src/action/DiscussAction.js
+233
-0
FeedbackAction.js
client/src/action/FeedbackAction.js
+13
-0
index.js
client/src/action/index.js
+7
-1
discuss_api.js
client/src/api/discuss_api.js
+67
-0
feedback_api.js
client/src/api/feedback_api.js
+25
-0
index.js
client/src/api/index.js
+7
-1
sidebar.vue
client/src/components/learnSysLayout/sidebar.vue
+2
-2
feedbackCreate.vue
client/src/pages/feedback/feedbackCreate.vue
+177
-0
feedbackList.vue
client/src/pages/feedback/feedbackList.vue
+251
-0
discussDetail.vue
client/src/pages/learn/discussDetail.vue
+0
-0
discussion.vue
client/src/pages/learn/discussion.vue
+13
-14
videoH5.vue
client/src/pages/player/chapterVideo/videoH5.vue
+1
-1
routes.js
client/src/router/routes.js
+5
-5
没有找到文件。
client/src/action/DiscussAction.js
0 → 100644
浏览文件 @
6dd65782
import
BaseACTION
from
'./base_action'
import
{
Discuss
}
from
'@api'
/**
* 小程序 跟 PC 区别
* 1. PC 直接使用 then,小程序 需要 callback
* 2. PC 直接返回 对象,小程序 外层再保证一次返回 { status: xxx, data: data }
*/
export
default
class
DiscussAction
extends
BaseACTION
{
/* 获取讨论题目列表,“我提出的问题”和“我参与的问题”信息 */
/**
* dataJson.limit - 获取数量
* dataJson.offset - 偏移量
*/
getDiscussList
(
path
,
dataJson
)
{
return
Discuss
.
getDiscussList
(
path
,
dataJson
).
then
(
res
=>
{
const
_data
=
res
const
json
=
_data
.
map
(
function
(
_
,
i
)
{
return
{
id
:
_
.
id
,
sid
:
_
.
semester_id
,
cid
:
_
.
relate_id
,
user
:
{
url
:
_
.
questioner
.
avatar
||
''
,
name
:
_
.
questioner
.
nickname
,
time
:
_
.
created_time
},
title
:
_
.
title
,
text
:
_
.
contents
,
askCnt
:
_
.
answer_count
,
TouCnt
:
_
.
tag_total_count
,
courseName
:
'在线学习课程'
,
comments
:
_
.
comments
,
mine
:
_
.
mine
,
isShow
:
false
}
})
// callback(json) // 可以不使用callback 因为使用then
return
json
})
}
/* 获取讨论题目列表,“课程的问题”信息 */
/**
* dataJson.limit - 获取数量
* dataJson.offset - 偏移量
* dataJson.sort - 排序类型
*/
getCourseDiscussList
(
cid
,
sid
,
dataJson
)
{
return
Discuss
.
getCourseDiscussList
(
cid
,
sid
,
dataJson
).
then
(
res
=>
{
const
_data
=
res
const
json
=
_data
.
map
(
function
(
_
,
i
)
{
return
{
id
:
_
.
id
,
sid
:
_
.
semester_id
,
cid
:
_
.
relate_id
,
user
:
{
url
:
_
.
questioner
.
avatar
||
''
,
name
:
_
.
questioner
.
nickname
,
time
:
_
.
created_time
},
title
:
_
.
title
,
text
:
_
.
contents
,
askCnt
:
_
.
answer_count
,
TouCnt
:
_
.
tag_total_count
,
courseName
:
'在线学习课程'
,
comments
:
_
.
comments
,
mine
:
_
.
mine
,
isShow
:
false
}
})
// callback(json) // 可以不使用callback 因为使用then
return
json
})
}
/* 获取问题详情 */
getDiscussDetail
(
qid
)
{
return
Discuss
.
getDiscussDetail
(
qid
).
then
(
res
=>
{
const
_data
=
res
const
json
=
{
ques
:
{
qid
:
_data
.
id
,
sid
:
_data
.
semester_id
,
user
:
{
url
:
_data
.
questioner
.
avatar
||
''
,
name
:
_data
.
questioner
.
nickname
,
time
:
_data
.
created_time
},
title
:
_data
.
title
,
text
:
_data
.
contents
,
askCnt
:
_data
.
answer_count
||
0
,
TouCnt
:
_data
.
tag_total_count
||
0
,
likeCnt
:
_data
.
tag_count
||
0
,
comCnt
:
_data
.
comments
.
length
,
mine
:
_data
.
mine
,
isShowComment
:
false
,
has_tag
:
_data
.
has_tag
,
tag_id
:
(
_data
.
tag
&&
_data
.
tag
.
id
)
||
''
,
comments
:
_data
.
comments
.
map
(
function
(
_
,
i
)
{
return
{
cid
:
_
.
id
,
user
:
{
url
:
_
.
observer
.
avatar
||
''
,
name
:
_
.
observer
.
nickname
,
time
:
_
.
created_time
},
text
:
_
.
comments
,
mine
:
_
.
mine
}
})
},
answer
:
(
_data
.
answers
&&
_data
.
answers
.
map
(
function
(
_
,
i
)
{
return
{
aid
:
_
.
id
,
user
:
{
url
:
_
.
replier
.
avatar
||
''
,
name
:
_
.
replier
.
nickname
,
time
:
_
.
created_time
},
text
:
_
.
contents
,
likeCnt
:
_
.
tag_count
,
comCnt
:
_
.
comments
.
length
,
mine
:
_
.
mine
,
isShowComment
:
false
,
has_tag
:
_
.
has_tag
,
tag_id
:
(
_
.
tag
&&
_
.
tag
.
id
)
||
''
,
comments
:
_
.
comments
.
map
(
function
(
__
,
i
)
{
return
{
cid
:
__
.
id
,
user
:
{
url
:
__
.
observer
.
avatar
||
''
,
name
:
__
.
observer
.
nickname
,
time
:
__
.
created_time
},
text
:
__
.
comments
,
mine
:
__
.
mine
}
})
}
}))
||
[]
}
// callback(json) // 可以不使用callback 因为使用then
return
json
})
}
/* 删除提问 */
deleteDiscuss
(
qid
)
{
return
Discuss
.
deleteDiscuss
(
qid
).
then
(
res
=>
{
const
_data
=
res
if
(
_data
.
success
)
{
// callback(res) // 可以不使用callback 因为使用then
return
res
}
})
}
/* 提出问题 */
publishQues
(
param
)
{
return
Discuss
.
publishQues
(
param
).
then
(
res
=>
{
// callback(res) // 可以不使用callback 因为使用then
return
res
})
}
/* 回答问题 */
answerQues
(
param
)
{
return
Discuss
.
answerQues
(
param
).
then
(
res
=>
{
const
_data
=
res
if
(
_data
.
success
)
{
// callback(res) // 可以不使用callback 因为使用then
return
res
}
})
}
/* 删除回答 */
deleteAnswer
(
aid
)
{
return
Discuss
.
deleteAnswer
(
aid
).
then
(
res
=>
{
const
_data
=
res
if
(
_data
.
success
)
{
// callback(res) // 可以不使用callback 因为使用then
return
res
}
})
}
/* 回复评论 */
callbackComment
(
param
)
{
return
Discuss
.
callbackComment
(
param
).
then
(
res
=>
{
const
_data
=
res
if
(
_data
.
success
)
{
// callback(res) // 可以不使用callback 因为使用then
return
res
}
})
}
/* 删除评论 */
deleteComment
(
cid
)
{
return
Discuss
.
deleteComment
(
cid
).
then
(
res
=>
{
const
_data
=
res
if
(
_data
.
success
)
{
// callback(res) // 可以不使用callback 因为使用then
return
res
}
})
}
/* 点赞 */
like
(
param
)
{
return
Discuss
.
like
(
param
).
then
(
res
=>
{
const
_data
=
res
if
(
_data
.
success
)
{
// callback(res) // 可以不使用callback 因为使用then
return
res
}
})
}
/* 取消点赞 */
unlike
(
tagid
)
{
return
Discuss
.
unlike
(
tagid
).
then
(
res
=>
{
const
_data
=
res
if
(
_data
.
success
)
{
// callback(res) // 可以不使用callback 因为使用then
return
res
}
})
}
}
client/src/action/FeedbackAction.js
0 → 100644
浏览文件 @
6dd65782
import
BaseACTION
from
'./base_action'
import
{
Feedback
}
from
'@api'
export
default
class
FeedbackAction
extends
BaseACTION
{
/* 提交重修 */
rebuildSubmit
(
obj
)
{
return
Feedback
.
submitRebuild
(
obj
).
then
(
res
=>
res
)
}
/* 意见反馈列表 */
feedbackList
(
obj
)
{
return
Feedback
.
feedbackList
(
obj
).
then
(
res
=>
res
)
}
/* 意见反馈回复 */
feedbackReply
(
obj
)
{
return
Feedback
.
feedbackReply
(
obj
).
then
(
res
=>
res
)
}
/* 意见反馈提交 */
feedbackCommit
(
obj
)
{
return
Feedback
.
feedbackCommit
(
obj
).
then
(
res
=>
res
)
}
}
client/src/action/index.js
浏览文件 @
6dd65782
...
...
@@ -3,19 +3,25 @@ import CourseAction from './CourseAction'
import
GradeAction
from
'./GradeAction'
import
ReportAction
from
'./ReportAction'
import
PlayerAction
from
'./PlayerAction'
import
DiscussAction
from
'./DiscussAction'
import
FeedbackAction
from
'./FeedbackAction'
const
Other
=
new
OtherAction
()
const
Course
=
new
CourseAction
()
const
Grade
=
new
GradeAction
()
const
Report
=
new
ReportAction
()
const
Player
=
new
PlayerAction
()
const
Discuss
=
new
DiscussAction
()
const
Feedback
=
new
FeedbackAction
()
const
cAction
=
{
Other
,
Course
,
Grade
,
Report
,
Player
Player
,
Discuss
,
Feedback
}
export
default
cAction
client/src/api/discuss_api.js
0 → 100644
浏览文件 @
6dd65782
import
BaseAPI
from
'./base_api'
export
default
class
DiscussAPI
extends
BaseAPI
{
/**
* 获取讨论题目列表,“我提出的问题”和“我参与的问题”信息
* dataJson.limit - 获取数量
* dataJson.offset - 偏移量
* @param {[string]} path
* @param {[object]} dataJson
*/
getDiscussList
=
(
path
,
dataJson
)
=>
this
.
get
(
'/v2/qa/questions'
+
path
,
dataJson
)
/**
* 获取讨论题目列表,“课程的问题”信息
* dataJson.limit - 获取数量
* dataJson.offset - 偏移量
* dataJson.sort - 排序类型
* @param {[string]} cid
* @param {[string]} sid
* @param {[object]} dataJson
*/
getCourseDiscussList
=
(
cid
,
sid
,
dataJson
)
=>
this
.
get
(
`/v2/qa/questions/course/
${
sid
}
/
${
cid
}
`
,
dataJson
)
/**
* 获取问题详情
* @param {[string]} qid
*/
getDiscussDetail
=
(
qid
)
=>
this
.
get
(
`/v2/qa/questions/
${
qid
}
`
,
{})
/**
* 删除提问
* @param {[string]} qid
*/
deleteDiscuss
=
(
qid
)
=>
this
.
delete
(
`/v2/qa/questions/
${
qid
}
`
,
{})
/**
* 提出问题
* @param {[object]} param
*/
publishQues
=
(
param
)
=>
this
.
post
(
'/v2/qa/questions'
,
param
)
/**
* 回答问题
* @param {[object]} param
*/
answerQues
=
(
param
)
=>
this
.
post
(
'/v2/qa/answers'
,
param
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
/**
* 删除回答
* @param {[string]} aid
*/
deleteAnswer
=
(
aid
)
=>
this
.
delete
(
`/v2/qa/answers/
${
aid
}
`
,
{})
/**
* 回复评论
* @param {[object]} param
*/
callbackComment
=
(
param
)
=>
this
.
post
(
'/v2/qa/comments'
,
param
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
/**
* 删除评论
* @param {[string]} cid
*/
deleteComment
=
(
cid
)
=>
this
.
delete
(
`/v2/qa/comments/
${
cid
}
`
)
/**
* 点赞
* @param {[object]} param
*/
like
=
(
param
)
=>
this
.
post
(
'/v2/qa/tags'
,
param
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
/**
* 取消点赞
* @param {[string]} tagid
*/
unlike
=
(
tagid
)
=>
this
.
delete
(
`/v2/qa/tags/
${
tagid
}
`
,
{})
}
client/src/api/feedback_api.js
0 → 100644
浏览文件 @
6dd65782
import
BaseAPI
from
'./base_api'
export
default
class
FeedbackAPI
extends
BaseAPI
{
/**
* 提交 重修课程
*/
submitRebuild
=
(
obj
=
{})
=>
this
.
post
(
'/v2/education/retake'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
/**
* 获取意见列表
* type_id [int]
* page [int]
* pageSize [int]
*/
feedbackList
=
(
obj
=
{})
=>
this
.
get
(
'/v2/feedback/lists'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
/**
* 意见反馈回复
* feedback_id [int]
* contents [string]
*/
feedbackReply
=
(
obj
=
{})
=>
this
.
post
(
'/v2/feedback/reply'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
/**
* 意见反馈提交
*/
feedbackCommit
=
(
obj
=
{})
=>
this
.
post
(
'/v2/feedback/commit'
,
obj
,
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
}
client/src/api/index.js
浏览文件 @
6dd65782
...
...
@@ -3,17 +3,23 @@ import CourseAPI from './course_api'
import
GradeAPI
from
'./grade_api'
import
ReportAPI
from
'./report_api'
import
PlayerAPI
from
'./player_api'
import
DiscussAPI
from
'./discuss_api'
import
FeedbackAPI
from
'./feedback_api'
const
Other
=
new
OtherAPI
(
webConf
)
const
Course
=
new
CourseAPI
(
webConf
)
const
Grade
=
new
GradeAPI
(
webConf
)
const
Report
=
new
ReportAPI
(
webConf
)
const
Player
=
new
PlayerAPI
(
webConf
)
const
Discuss
=
new
DiscussAPI
(
webConf
)
const
Feedback
=
new
FeedbackAPI
(
webConf
)
export
{
Other
,
Course
,
Grade
,
Report
,
Player
Player
,
Discuss
,
Feedback
}
client/src/components/learnSysLayout/sidebar.vue
浏览文件 @
6dd65782
...
...
@@ -61,7 +61,7 @@ export default {
case
'/app/learn/discussion'
:
defaultActive
=
'1-2'
;
break
case
'/app/learn/report-active-list'
:
defaultActive
=
'1-3'
;
break
case
'/app/grade/credit'
:
defaultActive
=
'2-1'
;
break
case
'/app/
account/feedbackL
ist'
:
defaultActive
=
'3'
;
break
case
'/app/
feedback/feedback-l
ist'
:
defaultActive
=
'3'
;
break
case
'/app/service-hall/hall'
:
defaultActive
=
'4'
;
break
}
return
{
...
...
@@ -109,7 +109,7 @@ export default {
case
'1-2'
:
this
.
$router
.
push
({
path
:
'/app/learn/discussion'
});
break
case
'1-3'
:
this
.
$router
.
push
({
path
:
'/app/learn/report-active-list'
});
break
case
'2-1'
:
this
.
$router
.
push
({
path
:
'/app/grade/credit'
});
break
case
'3'
:
this
.
$router
.
push
({
path
:
'/app/
account/feedbackL
ist'
});
break
case
'3'
:
this
.
$router
.
push
({
path
:
'/app/
feedback/feedback-l
ist'
});
break
case
'4'
:
this
.
$router
.
push
({
path
:
'/app/service-hall/hall'
});
break
}
},
...
...
client/src/pages/feedback/feedbackCreate.vue
0 → 100644
浏览文件 @
6dd65782
<
template
>
<div>
<div
class=
"con-title"
>
系统反馈
</div>
<div
class=
"con-box"
>
<el-row
type=
"flex"
justify=
"center"
>
<el-col
:xs=
"24"
:sm=
"24"
:md=
"24"
:lg=
"24"
:xl=
"24"
>
<el-form
ref=
"setApplyForm"
:model=
"setApply"
:rules=
"applyRules"
>
<el-form-item
label=
"问题描述"
prop=
"name"
>
<el-input
v-model=
"setApply.name"
placeholder=
"请输入问题描述"
type=
"text"
/>
</el-form-item>
<div
style=
"width: 100%; height: 10px;"
></div>
<div
class=
"label"
style=
"font-size: 14px; line-height: 2;"
>
问题详情:
</div>
<textarea
id=
"editor"
></textarea>
<div
style=
"width: 100%; height: 10px;"
></div>
<el-form-item
label=
"上传附件"
prop=
"file"
>
<el-upload
ref=
"upFile"
class=
"upload-demo"
action=
""
:multiple=
"false"
:limit=
"1"
:show-file-list=
"false"
:on-change=
"handleChange"
:http-request=
"uploadFile"
:file-list=
"filesArr"
>
<el-button
size=
"small"
type=
"primary"
>
点击上传
</el-button>
<div
slot=
"tip"
class=
"el-upload__tip"
>
(可以上传 word、ppt、png、jpg、zip、rar等资源,多文件请先压缩打包成一个文件后,再上传)
</div>
<template
v-if=
"successFileUrl"
>
{{
successFileUrl
.
replace
(
/.*
\/([^\/]
*
\.[^
.
]
+
)
$/gi
,
'$1'
)
}}
</
template
>
</el-upload>
<
template
v-if=
"successFileUrl"
>
<a
:href=
"successFileUrl"
>
下载已上传附件
</a>
</
template
>
</el-form-item>
<el-form-item
label=
"提交给"
prop=
"type_id"
>
<el-select
v-model=
"value"
placeholder=
"请选择"
>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"onApplyFrom"
>
提交
</el-button>
</el-form-item>
</el-form>
</el-col>
</el-row>
</div>
</div>
</template>
<
script
>
import
cAction
from
'@action'
import
CKEDITOR
from
'CKEDITOR'
export
default
{
components
:
{},
data
()
{
return
{
ckeditor
:
null
,
setApply
:
{
name
:
''
,
content
:
''
},
applyRules
:
{
name
:
[
{
required
:
true
,
message
:
'问题描述不能为空'
,
trigger
:
'blur'
}
]
},
successFileUrl
:
''
,
filesArr
:
[],
file
:
{
id
:
'WU_FILE_0'
,
name
:
''
,
type
:
''
,
lastModifiedDate
:
''
,
size
:
''
,
file
:
''
},
options
:
[
{
value
:
'0'
,
label
:
'全部'
},
{
value
:
'1'
,
label
:
'教务'
},
{
value
:
'2'
,
label
:
'技术'
}
],
value
:
'2'
}
},
mounted
()
{
this
.
initckeditor
()
},
destroyed
()
{
/* 清空 ckeditor 需要调用方法删除 并 在DOM结构中也移除 */
this
.
ckeditor
&&
this
.
ckeditor
.
destroy
(
true
)
this
.
ckeditor
=
null
},
methods
:
{
handleChange
(
file
,
filelist
)
{
this
.
file
.
name
=
file
.
raw
.
name
this
.
file
.
type
=
file
.
raw
.
type
this
.
file
.
lastModifiedDate
=
file
.
raw
.
lastModifiedDate
this
.
file
.
size
=
file
.
raw
.
size
this
.
file
.
file
=
file
.
raw
},
uploadFile
()
{
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
''
,
spinner
:
''
,
background
:
'rgba(255, 255, 255, 0.9)'
})
cAction
.
Other
.
uploadFile
(
this
.
file
).
then
(
data
=>
{
this
.
successFileUrl
=
data
.
url
this
.
filesArr
.
pop
()
}).
catch
(
e
=>
{
this
.
filesArr
.
pop
();
this
.
$message
.
error
(
e
.
message
)
}).
finally
(()
=>
{
loading
.
close
()
})
},
onApplyFrom
()
{
this
.
$refs
.
setApplyForm
.
validate
((
valid
)
=>
{
if
(
valid
)
{
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
''
,
spinner
:
''
,
background
:
'rgba(255, 255, 255, 0.9)'
})
cAction
.
Feedback
.
feedbackCommit
({
title
:
this
.
setApply
.
name
,
contents
:
this
.
ckeditor
.
getData
(),
type_id
:
this
.
value
,
attachments
:
JSON
.
stringify
([{
name
:
this
.
file
.
name
,
url
:
this
.
successFileUrl
}])
}).
then
(
data
=>
{
if
(
data
.
success
)
{
this
.
$message
({
type
:
'success'
,
message
:
'提交成功,等待反馈'
})
this
.
ckeditor
.
setData
(
''
)
this
.
$refs
.
setApplyForm
.
resetFields
()
this
.
$router
.
push
({
path
:
'/app/feedback/feedback-list'
})
}
}).
catch
(
e
=>
{
this
.
filesArr
.
pop
();
this
.
$message
.
error
(
e
.
message
)
}).
finally
(()
=>
{
loading
.
close
()
})
}
else
{
this
.
$message
.
error
(
'请检查输入项,确认无误后,重新提交'
)
return
false
}
})
},
/* 初始化 ckeditor */
initckeditor
()
{
!
this
.
ckeditor
&&
(
this
.
ckeditor
=
CKEDITOR
.
replace
(
'editor'
,
{
height
:
300
,
uiColor
:
'#eeeeee'
,
filebrowserImageUploadUrl
:
'/api/ckeditor/img/upload'
,
// resize_enabled: typeof this.props.resizable === 'boolean' ? this.props.resizable : true,
toolbar
:
[
// { name: 'document', items: ['Source', '-', 'Save', 'NewPage', 'Preview'] },
{
name
:
'styles'
,
items
:
[
'Styles'
,
'Format'
,
'Font'
,
'FontSize'
]
},
{
name
:
'colors'
,
items
:
[
'TextColor'
,
'BGColor'
]
},
{
name
:
'tools'
,
items
:
[
'Maximize'
,
'ShowBlocks'
]
},
// { name: 'clipboard', items: ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo'] },
{
name
:
'editing'
,
items
:
[
'Find'
,
'Replace'
]
},
// { name: 'forms', items: ['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'] },
'/'
,
{
name
:
'basicstyles'
,
items
:
[
'Bold'
,
'Italic'
,
'Underline'
,
'Strike'
,
'Subscript'
,
'Superscript'
,
'-'
,
'RemoveFormat'
]
},
{
name
:
'paragraph'
,
items
:
[
'NumberedList'
,
'BulletedList'
,
'-'
,
'Outdent'
,
'Indent'
,
'-'
,
'Blockquote'
,
'CreateDiv'
,
'-'
,
'JustifyLeft'
,
'JustifyCenter'
,
'JustifyRight'
,
'JustifyBlock'
,
'-'
,
'BidiLtr'
,
'BidiRtl'
]
},
{
name
:
'links'
,
items
:
[
'Link'
,
'Unlink'
,
'Anchor'
]
},
{
name
:
'insert'
,
items
:
[
'Image'
,
'Table'
,
'HorizontalRule'
]
}
]
}))
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
/* 申请 */
.el-date-editor.el-input
{
width
:
100%
;
}
.el-upload__tip
{
line-height
:
1
.5
;
}
</
style
>
client/src/pages/feedback/feedbackList.vue
0 → 100644
浏览文件 @
6dd65782
<
template
>
<div>
<div
class=
"con-title"
>
系统反馈
<el-button
style=
"float: right; margin: 8px;"
type=
"primary"
size=
"mini"
round
@
click=
"goCreate"
>
提出问题
</el-button></div>
<div
class=
"con-box"
>
<template
v-for=
"(item, index) in find"
>
<ul
v-bind:key=
"index"
class=
"tabs-list"
>
<li
class=
"tabs-hd"
>
{{
item
.
name
}}
</li>
<template
v-for=
"(item1, index1) in item.arrItem"
>
<li
v-bind:key=
"index1"
>
<div
:class=
"['tab', (item.selectIndex == index1 ? 'on' : '')]"
@
click=
"selFindSelect"
:data-index=
'index1'
:data-i=
"index"
:data-key=
'item.key'
:data-val=
'item1.val'
>
{{
item1
.
name
}}
</div>
</li>
</
template
>
</ul>
</template>
</div>
<div
class=
"con-box"
>
<el-collapse
v-model=
"activeNames"
@
change=
"handleChange"
>
<
template
v-for=
"(item, index) in feedbackList"
>
<el-collapse-item
v-bind:key=
"index"
:name=
"index"
>
<template
slot=
"title"
>
{{
item
.
feedback_title
}}
<div
style=
"position: absolute; right: 70px;"
v-html=
"item.status"
></div>
</
template
>
<div
style=
"font-size: 15px; font-weight: 700;"
>
问题描述:(发布时间:{{item.created_time}})
</div>
<div
style=
"text-indent: 20px;"
v-html=
"item.feedback_contents"
></div>
<div
style=
"font-size: 15px; font-weight: 700;"
>
下载附件:
</div>
<div
style=
"overflow: hidden; text-indent: 20px;"
>
<
template
v-if=
"item.isEmpty"
>
暂无附件内容
</
template
>
<
template
v-else
>
<template
v-for=
"(item1, index1) in item.feedback_attachments"
>
<template
v-if=
"item1.url"
>
<a
style=
"float: left; margin-right: 10px;"
:href=
"item1.url"
>
下载附件
{{
index1
+
1
}}
</a>
</
template
>
</template>
</template>
</div>
<div
style=
"font-size: 15px; font-weight: 700;"
>
问题回复:
</div>
<
template
v-if=
"item.replies.length"
>
<template
v-for=
"(item1, index1) in item.replies"
>
<div
class=
"discuss-feedback-scroll"
>
<div
v-bind:key=
'index'
class=
'item-list'
>
<div
class=
'user'
>
<template
v-if=
"item1.avatar"
>
<img
class=
'img'
:src=
'item1.avatar'
/>
</
template
>
<
template
v-else
>
<img
class=
'img'
src=
'../../assets/images/person-default.jpg'
/>
</
template
>
<div
class=
'right'
>
<div
class=
'name'
>
{{item1.nickname}}
</div>
<div
class=
'time'
>
{{item1.created_time}}
</div>
</div>
</div>
<div
:class=
'["text"]'
v-html=
"item1.reply_contents"
></div>
</div>
</div>
</template>
<textarea
v-model=
"item.replyContent"
></textarea>
<el-button
type=
"primary"
size=
"mini"
round
@
click=
"replyContent"
:data-index=
'index'
>
回复
</el-button>
</template>
<
template
v-else
>
<div
style=
"text-indent: 20px;"
>
问题已发送给相应的技术或教务人员,正在处理中,请耐心等待。
</div>
</
template
>
</el-collapse-item>
</template>
</el-collapse>
</div>
<div
class=
"pagination-right"
v-if=
"(pagination.totalCount / pagination.pageSize > 1)"
>
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"pagination.currentPage"
:page-size=
"pagination.pageSize"
layout=
"prev, pager, next, jumper"
:total=
"pagination.totalCount"
>
</el-pagination>
</div>
</div>
</template>
<
script
>
import
cAction
from
'@action'
export
default
{
components
:
{
},
data
()
{
return
{
find
:
[{
name
:
'分类'
,
isShow
:
false
,
selectIndex
:
0
,
key
:
'type_id'
,
arrItem
:
[
// 从后台请求
{
val
:
'0'
,
name
:
'全部'
},
{
val
:
'1'
,
name
:
'教务'
},
{
val
:
'2'
,
name
:
'技术'
}
]
}],
param
:
{
type_id
:
0
,
page
:
1
,
pageSize
:
10
},
pagination
:
{
totalCount
:
5
,
pageSize
:
1
,
currentPage
:
1
},
activeNames
:
[
'1'
],
feedbackList
:
[]
}
},
mounted
()
{
this
.
getAjaxList
()
},
methods
:
{
getAjaxList
()
{
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
''
,
spinner
:
''
,
background
:
'rgba(255, 255, 255, 0.9)'
})
cAction
.
Feedback
.
feedbackList
(
this
.
param
).
then
(
data
=>
{
for
(
let
i
=
0
;
i
<
data
.
lists
.
length
;
i
++
)
{
const
temp
=
data
.
lists
[
i
]
/* 对附件下载 做一下单独处理 */
try
{
temp
.
feedback_attachments
=
JSON
.
parse
(
temp
.
feedback_attachments
)
}
catch
(
e
)
{
temp
.
feedback_attachments
=
[]
}
temp
.
isEmpty
=
true
for
(
let
j
=
0
;
j
<
temp
.
feedback_attachments
.
length
;
j
++
)
{
const
temp1
=
temp
.
feedback_attachments
[
j
]
if
(
temp1
.
url
)
{
temp
.
isEmpty
=
false
}
}
/* 对状态 做一下单独处理 */
temp
.
status
=
temp
.
status
===
'0'
?
'<em style="color: #f34b4b">待处理</em>'
:
temp
.
status
===
'1'
?
'<em style="color: #f3c74b">处理中</em>'
:
temp
.
status
===
'2'
?
'<em style="color: #44a706">处理完成</em>'
:
'暂无'
/* 对回复 做一下单独处理 */
temp
.
replyContent
=
''
}
this
.
feedbackList
=
data
.
lists
this
.
pagination
=
data
.
pagination
}).
catch
(
e
=>
{
this
.
$message
.
error
(
e
.
message
)
}).
finally
(()
=>
{
loading
.
close
()
})
},
goCreate
()
{
this
.
$router
.
push
({
path
:
'/app/feedback/feedback-create'
})
},
replyContent
(
e
)
{
const
i
=
e
.
target
.
dataset
.
index
if
(
!
this
.
feedbackList
[
i
].
replyContent
)
{
this
.
$message
.
error
(
'回复内容不能为空!'
)
return
}
console
.
log
(
this
.
feedbackList
[
i
].
replyContent
,
this
.
feedbackList
[
i
].
id
)
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
''
,
spinner
:
''
,
background
:
'rgba(255, 255, 255, 0.9)'
})
cAction
.
Feedback
.
feedbackReply
({
feedback_id
:
this
.
feedbackList
[
i
].
id
,
contents
:
this
.
feedbackList
[
i
].
replyContent
}).
then
(
data
=>
{
if
(
data
.
success
)
{
this
.
$message
.
success
(
'回复成功,等待新的答复'
)
}
}).
catch
(
e
=>
{
this
.
$message
.
error
(
e
.
message
)
}).
finally
(()
=>
{
loading
.
close
()
})
},
/**
* 分类选择 - 选中某一项
*/
selFindSelect
(
e
)
{
const
_data
=
e
.
currentTarget
.
dataset
const
index
=
_data
.
index
const
json
=
this
.
find
const
i
=
_data
.
i
json
[
i
].
selectIndex
=
index
json
[
i
].
isShow
=
false
this
.
param
[
_data
.
key
]
=
parseInt
(
_data
.
val
)
/* 调用接口 */
this
.
getAjaxList
()
},
handleChange
(
val
)
{
},
/* 分页组件方法 */
handleSizeChange
()
{
},
handleCurrentChange
()
{
this
.
param
.
page
=
this
.
pagination
.
currentPage
this
.
getAjaxList
()
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
/* 列表 筛选 */
ul
.tabs-list
{
float
:
left
;
width
:
100%
;
margin
:
0
0
0
.15rem
0
;
padding
:
0
;
font-size
:
0
.16rem
;
line-height
:
1
.5
;
border-top
:
1px
solid
#e8e8e8
;
&
:last-child
{
margin-bottom
:
0
;
}
.tabs-hd
{
display
:
inline-block
;
color
:
#fff
;
padding
:
5px
0
9px
;
margin-top
:
-5px
;
width
:
94px
;
text-align
:
center
;
background
:
url(https://zws-imgs-pub.ezijing.com/754005be709bf2295bc55923c2b91fd8.png)
no-repeat
0
0
;
}
li
{
float
:
left
;
list-style
:
none
;
padding
:
0
.1rem
0
;
margin-right
:
0
.2rem
;
.tab
{
padding
:
0
0
.1rem
;
cursor
:
pointer
;
&
.on
{
background
:
#b49441
;
color
:
#ffffff
;
}
&
:focus
,
&
:hover
{
color
:
#b49441
;
background
:
#eeeeee
;
}
}
}
}
/* 分页样式 */
.pagination-right
{
float
:
right
;
margin
:
0
0
.3rem
0
0
;
}
textarea
{
width
:
100%
;
height
:
60px
;
}
.discuss-feedback-scroll
{
padding
:
5px
;
}
.discuss-feedback-scroll
.item-list
{
position
:
relative
;
padding
:
0
.1rem
;
background
:
#fff
;
box-shadow
:
0
2px
4px
rgba
(
10
,
4
,
6
,
0
.1
);
cursor
:
pointer
;
}
.discuss-feedback-scroll
.item-list
.user
{
position
:
relative
;
overflow
:
hidden
;
}
.discuss-feedback-scroll
.item-list
.user
.img
{
float
:
left
;
width
:
0
.5rem
;
height
:
0
.5rem
;
background
:
#e5e5e5
;
border-radius
:
50%
;
}
.discuss-feedback-scroll
.item-list
.user
.right
{
position
:
absolute
;
left
:
0
.52rem
;
top
:
50%
;
-webkit-transform
:
translateY
(
-50%
);
transform
:
translateY
(
-50%
);
}
.discuss-feedback-scroll
.item-list
.user
.right
.name
{
font-size
:
0
.14rem
;
color
:
#313131
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
word-break
:break-all
;
}
.discuss-feedback-scroll
.item-list
.user
.right
.time
{
font-size
:
0
.14rem
;
color
:
#a0a0a0
;
}
.discuss-feedback-scroll
.item-list
.text
{
text-indent
:
10px
;
font-size
:
0
.14rem
;
color
:
#535353
;
line-height
:
1
.5
;
text-align
:
justify
;
/* display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; text-overflow: ellipsis; overflow: hidden; */
word-break
:break-all
;
overflow
:
hidden
;
}
</
style
>
client/src/pages/learn/discussDetail.vue
浏览文件 @
6dd65782
差异被折叠。
点击展开。
client/src/pages/learn/discussion.vue
浏览文件 @
6dd65782
...
...
@@ -15,7 +15,7 @@
<img
class=
'img'
:src=
'item.user.url'
/>
</
template
>
<
template
v-else
>
<img
class=
'img'
src=
'../../assets/im
g
/person-default.jpg'
/>
<img
class=
'img'
src=
'../../assets/im
ages
/person-default.jpg'
/>
</
template
>
<div
class=
'right'
>
<div
class=
'name'
>
{{item.user.name}}
</div>
...
...
@@ -37,7 +37,7 @@
</template>
<
script
>
import
cAction
from
'@action
s
'
import
cAction
from
'@action'
export
default
{
components
:
{
},
...
...
@@ -85,17 +85,17 @@ export default {
},
methods: {
resizeRoot () {
le
t elems = document.querySelectorAll('
.
ellipsis
')
cons
t elems = document.querySelectorAll('
.
ellipsis
')
let fs = getComputedStyle(window.document.documentElement)['
font
-
size
'].replace('
px
', '') // eslint-disable-line
elems.forEach((_, i) => {
_.previousSibling.style.height = '
auto
'
le
t height = _.previousSibling.offsetHeight
le
t realHeight = fs * 0.18 * 1.5 * 2
cons
t height = _.previousSibling.offsetHeight
cons
t realHeight = fs * 0.18 * 1.5 * 2
if (height > realHeight) {
this.discussList[i]
['
isShow
']
= true
this.discussList[i]
.isShow
= true
_.previousSibling.style.height = realHeight + '
px
'
} else {
this.discussList[i]
['
isShow
']
= false
this.discussList[i]
.isShow
= false
}
})
},
...
...
@@ -107,7 +107,7 @@ export default {
}
}
const loading = this.$loading({ lock: true, text: '', spinner: '', background: '
rgba
(
255
,
255
,
255
,
0.9
)
' })
cAction.
discussAction
.getDiscussList(pathUrl, this.param).then(json => {
cAction.
Discuss
.getDiscussList(pathUrl, this.param).then(json => {
this.discussList = json
}).catch(e => { this.$message.error(e.message) }).finally(() => { loading.close() })
},
...
...
@@ -115,8 +115,8 @@ export default {
* 切换 - tab
*/
tabSelect (e) {
le
t index = e.currentTarget.dataset.index
le
t json = this.tabs
cons
t index = e.currentTarget.dataset.index
cons
t json = this.tabs
for (let i = 0; i < json.length; i++) {
json[i].isShow = false
}
...
...
@@ -129,16 +129,15 @@ export default {
* 跳转到对应 问题详情页
*/
goDiscussDetail (e) {
le
t qid = e.currentTarget.dataset.id
le
t sid = e.currentTarget.dataset.sid
le
t cid = e.currentTarget.dataset.cid
cons
t qid = e.currentTarget.dataset.id
cons
t sid = e.currentTarget.dataset.sid
cons
t cid = e.currentTarget.dataset.cid
this.$router.push({ path: `/app/learn/discuss-detail/${sid}/${cid}/${qid}` })
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.tab-select
{
width
:
100%
;
border-bottom
:
1px
solid
#c9c9c9
;
overflow
:
hidden
;
background
:
#fff
;
}
...
...
client/src/pages/player/chapterVideo/videoH5.vue
浏览文件 @
6dd65782
...
...
@@ -134,7 +134,7 @@ export default {
_d
.
m3u8RequestId
=
window
.
G
.
m3u8RequestId
_d
.
UA
=
window
.
navigator
.
userAgent
var
arr
=
JSON
.
stringify
({
action
:
'aliVideoErr'
,
info
:
Base64
.
encode
(
str
),
auth
:
'aliVideoErr'
,
code
:
Base64
.
encode
(
e
.
paramData
.
error_code
),
err
:
Base64
.
encode
(
JSON
.
stringify
(
_d
))
}).
split
(
''
)
// var arr = JSON.stringify({
action: 'aliVideoErr', info: Base64.encode(str), auth: 'aliVideoErr', code
: Base64.encode('4006') }).split('')
// var arr = JSON.stringify({
'action': 'aliVideoErr', info: Base64.encode(str), 'auth': 'aliVideoErr', 'code'
: Base64.encode('4006') }).split('')
var
strArr
=
[]
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
strArr
[
i
]
=
arr
[
i
].
charCodeAt
()
...
...
client/src/router/routes.js
浏览文件 @
6dd65782
...
...
@@ -44,8 +44,8 @@ export default [
{
path
:
'course'
,
component
:
()
=>
import
(
'../pages/learn/course.vue'
)
},
{
path
:
'course-all'
,
component
:
()
=>
import
(
'../pages/learn/courseAll.vue'
)
},
{
path
:
'course-detail/:sid/:cid'
,
component
:
()
=>
import
(
'../pages/learn/courseDetail.vue'
),
props
:
true
},
//
{ path: 'discuss-detail/:sid/:cid/:id', component: () => import('../pages/learn/discussDetail.vue'), props: true },
//
{ path: 'discussion', component: () => import('../pages/learn/discussion.vue') },
{
path
:
'discuss-detail/:sid/:cid/:id'
,
component
:
()
=>
import
(
'../pages/learn/discussDetail.vue'
),
props
:
true
},
{
path
:
'discussion'
,
component
:
()
=>
import
(
'../pages/learn/discussion.vue'
)
},
{
path
:
'report-list'
,
component
:
()
=>
import
(
'../pages/learn/reportList.vue'
)
},
{
path
:
'report-active-list'
,
component
:
()
=>
import
(
'../pages/learn/reportActiveList.vue'
)
},
{
path
:
'report-list-all/:rid'
,
component
:
()
=>
import
(
'../pages/learn/reportListAll.vue'
),
props
:
true
},
...
...
@@ -63,14 +63,14 @@ export default [
]
},
{
path
:
'
account
'
,
path
:
'
feedback
'
,
redirect
:
'error/404'
,
component
:
()
=>
import
(
'@/components/learnSysLayout/container.vue'
),
children
:
[
// { path: 'set-pwd', component: () => import('../pages/account/setPwd.vue') },
// { path: 'update-pic', component: () => import('../pages/account/updatePic.vue') },
// { path: 'feedbackList', component: () => import('../pages/account
/feedbackList.vue') },
// { path: 'feedbackCreate', component: () => import('../pages/account
/feedbackCreate.vue') }
{
path
:
'feedback-list'
,
component
:
()
=>
import
(
'../pages/feedback
/feedbackList.vue'
)
},
{
path
:
'feedback-create'
,
component
:
()
=>
import
(
'../pages/feedback
/feedbackCreate.vue'
)
}
]
},
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论