Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
6fb0e402
Commit
6fb0e402
authored
Jun 10, 2021
by
guomingpang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://xmgit.ixm5.cn:10022/xiaomai-cloud-class/xiaomai-cloud-class-web
parents
9009ac6d
679a3038
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
269 additions
and
121 deletions
+269
-121
src/modules/course-manage/graphics-course/components/GraphicsCourseList.jsx
+3
-3
src/modules/course-manage/modal/ShareLiveModal.jsx
+22
-20
src/modules/course-manage/offline-course/AddOfflineCourse.jsx
+7
-2
src/modules/course-manage/offline-course/components/OfflineCourseList.jsx
+4
-4
src/modules/course-manage/offline-course/modal/PreviewOfflineModal.jsx
+1
-1
src/modules/knowledge-base/modal/AddCourse.jsx
+4
-5
src/modules/plan-manage/modal/SharePlanModal.jsx
+1
-1
src/modules/plan-manage/modal/relatedCourseModal.jsx
+2
-3
src/modules/teach-tool/paper-manage/OperatePaper.jsx
+174
-50
src/modules/teach-tool/paper-manage/OperatePaper.less
+20
-2
src/modules/teach-tool/paper-manage/modal/SelectQuestionModal.jsx
+3
-2
src/modules/teach-tool/question-manage/components/OperateQuestionTab.jsx
+26
-26
src/modules/teach-tool/question-manage/components/OperateQuestionTab.less
+1
-1
src/modules/teach-tool/question-manage/modal/PreviewQuestionModal.less
+1
-1
No files found.
src/modules/course-manage/graphics-course/components/GraphicsCourseList.jsx
View file @
6fb0e402
/*
* @Author: 吴文洁
* @Date: 2020-08-05 10:12:45
* @LastEditors:
Please set LastEditors
* @LastEditTime: 2021-0
5-27 20:13:53
* @LastEditors:
yuananting
* @LastEditTime: 2021-0
6-02 15:05:54
* @Description: 视频课-列表模块
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -364,7 +364,7 @@ class GraphicsCourseList extends React.Component {
<
ShareLiveModal
needStr=
{
needStr
}
data=
{
shareData
}
type=
"
video
Class"
type=
"
graphics
Class"
title=
"图文课"
close=
{
()
=>
{
this
.
setState
({
...
...
src/modules/course-manage/modal/ShareLiveModal.jsx
View file @
6fb0e402
...
...
@@ -18,8 +18,6 @@ import CourseService from '@/domains/course-domain/CourseService'
import
'./ShareLiveModal.less'
const
DEFAULT_COVER
=
'https://image.xiaomaiketang.com/xm/YNfi45JwFA.png'
class
ShareLiveModal
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
)
...
...
@@ -98,27 +96,31 @@ class ShareLiveModal extends React.Component {
render
()
{
const
{
courseDivision
,
data
,
type
,
title
}
=
this
.
props
const
{
courseName
,
coverUrl
=
DEFAULT_COVER
,
scheduleVideo
Url
}
=
data
const
{
courseName
,
scheduleVideoUrl
,
courseMediaVOS
,
cover
Url
}
=
data
const
{
shareUrl
,
showImg
,
time
}
=
this
.
state
// 判断是否是默认图, 默认图不需要在URL后面增加字符串
const
isDefaultCover
=
coverUrl
===
DEFAULT_COVER
let
coverImgSrc
=
coverUrl
if
(
type
===
'videoClass'
)
{
if
((
!
coverUrl
||
isDefaultCover
)
&&
title
!==
'图文课'
&&
title
!==
'线下课'
)
{
if
(
courseDivision
===
'external'
)
{
coverImgSrc
=
'https://image.xiaomaiketang.com/xm/mt3ZQRxGKB.png'
let
coverImgSrc
=
''
;
switch
(
type
)
{
case
'liveClass'
:
// 直播课
if
(
courseMediaVOS
&&
courseMediaVOS
.
length
>
0
)
{
data
.
courseMediaVOS
.
map
((
item
,
index
)
=>
{
if
(
item
.
contentType
===
'COVER'
)
{
coverImgSrc
=
item
.
mediaUrl
}
})
}
else
{
coverImgSrc
=
`
${
scheduleVideoUrl
}
?x-oss-process=video/snapshot,t_0,m_fast&anystring=anystring`
}
}
}
else
{
data
.
courseMediaVOS
.
map
((
item
,
index
)
=>
{
if
(
item
.
contentType
===
'COVER'
)
{
coverImgSrc
=
item
.
mediaUrl
coverImgSrc
=
'https://image.xiaomaiketang.com/xm/Yip2YtFDwH.png'
;
}
})
break
;
case
'videoClass'
:
// 视频课
coverImgSrc
=
coverUrl
||
(
courseDivision
===
'internal'
?
`
${
scheduleVideoUrl
}
?x-oss-process=video/snapshot,t_0,m_fast&anystring=anystring`
:
'https://image.xiaomaiketang.com/xm/mt3ZQRxGKB.png'
)
break
;
case
'graphicsClass'
:
// 图文课
coverImgSrc
=
coverUrl
||
'https://image.xiaomaiketang.com/xm/wFnpZtp2yB.png'
;
break
;
case
'offlineClass'
:
// 线下课
coverImgSrc
=
coverUrl
||
'https://image.xiaomaiketang.com/xm/pxbWKsYA87.png'
;
break
;
}
return
(
...
...
@@ -137,7 +139,7 @@ class ShareLiveModal extends React.Component {
<
span
className=
'text'
>
{
User
.
getStoreName
()
}
</
span
>
</
div
>
<
div
className=
'course-name-title'
>
{
type
===
'
videoClass'
?
`${courseName}开课啦`
:
`邀请你观看直播:
`
}
</
div
>
<
div
className=
'course-name-title'
>
{
type
===
'
liveClass'
?
`邀请你观看直播:`
:
`${courseName}开课啦
`
}
</
div
>
{
type
===
'liveClass'
&&
<
div
class=
'live-couse-name'
>
{
courseName
}
</
div
>
}
<
Choose
>
<
When
condition=
{
showImg
}
>
...
...
src/modules/course-manage/offline-course/AddOfflineCourse.jsx
View file @
6fb0e402
/*
* @Author: 吴文洁
* @Date: 2020-08-05 10:07:47
* @LastEditors:
wufan
* @LastEditTime: 2021-0
5-27 19:25:48
* @LastEditors:
yuananting
* @LastEditTime: 2021-0
6-07 15:06:26
* @Description: 线下课新增/编辑页
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -518,6 +518,11 @@ class AddOfflineCourse extends React.Component {
if
(
coverId
){
scheduleMediaRequests
=
[
coverObj
]
}
// 编辑且使用默认图时不传
if
(
pageType
===
'edit'
&&
coverUrl
===
defaultCoverUrl
)
{
scheduleMediaRequests
=
[]
}
const
commonParams
=
{
categoryId
,
courseName
,
...
...
src/modules/course-manage/offline-course/components/OfflineCourseList.jsx
View file @
6fb0e402
/*
* @Author: 吴文洁
* @Date: 2020-08-05 10:12:45
* @LastEditors:
Please set LastEditors
* @LastEditTime: 2021-0
5-27 20:14:01
* @LastEditors:
yuananting
* @LastEditTime: 2021-0
6-02 16:15:55
* @Description: 视频课-列表模块
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -25,7 +25,7 @@ import QRCodeModal from '../modal/QRCodeModal';
import
'./OfflineCourseList.less'
;
const
ENV
=
process
.
env
.
DEPLOY_ENV
||
'dev'
;
const
defaultCoverUrl
=
'https://image.xiaomaiketang.com/xm/
YNfi45JwFA
.png'
;
const
defaultCoverUrl
=
'https://image.xiaomaiketang.com/xm/
pxbWKsYA87
.png'
;
class
OfflineCourseList
extends
React
.
Component
{
...
...
@@ -358,7 +358,7 @@ class OfflineCourseList extends React.Component {
<
ShareLiveModal
needStr=
{
needStr
}
data=
{
shareData
}
type=
"
video
Class"
type=
"
offline
Class"
title=
"线下课"
close=
{
()
=>
{
this
.
setState
({
...
...
src/modules/course-manage/offline-course/modal/PreviewOfflineModal.jsx
View file @
6fb0e402
...
...
@@ -6,7 +6,7 @@ import Service from "@/common/js/service";
import
'./PreviewOfflineModal.less'
;
import
ENUM
from
'@/modules/knowledge-base/ENUM'
;
const
defaultCoverUrl
=
'https://image.xiaomaiketang.com/xm/
YNfi45JwFA
.png'
;
const
defaultCoverUrl
=
'https://image.xiaomaiketang.com/xm/
pxbWKsYA87
.png'
;
class
PreviewOfflineModal
extends
React
.
Component
{
...
...
src/modules/knowledge-base/modal/AddCourse.jsx
View file @
6fb0e402
...
...
@@ -2,8 +2,8 @@
* @Description:
* @Author: zangsuyun
* @Date: 2021-03-13 09:54:26
* @LastEditors:
fusanqias
ng
* @LastEditTime: 2021-06-
01 10:26:46
* @LastEditors:
yuananti
ng
* @LastEditTime: 2021-06-
10 19:55:24
* @Copyright: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -324,7 +324,7 @@ class AddCourse extends React.Component {
return
<
img
className=
'course-cover'
src=
{
item
.
mediaUrl
}
alt=
''
/>;
}
})
}
{
!
hasCover
&&
<
img
className=
'course-cover'
src=
{
'https://image.xiaomaiketang.com/xm/Y
Nfi45JwFA
.png'
}
alt=
''
/>
}
{
!
hasCover
&&
<
img
className=
'course-cover'
src=
{
'https://image.xiaomaiketang.com/xm/Y
ip2YtFDwH
.png'
}
alt=
''
/>
}
<
div
>
<
Choose
>
<
When
condition=
{
record
.
courseName
.
length
>
17
}
>
...
...
@@ -501,8 +501,7 @@ class AddCourse extends React.Component {
const
{
coverUrl
}
=
record
;
return
(
<
div
className=
'record__item'
>
{
/* 上传了封面的话就用上传的封面, 没有的话就取视频的第一帧 */
}
<
img
className=
'course-cover'
src=
{
coverUrl
||
'https://image.xiaomaiketang.com/xm/YNfi45JwFA.png'
}
alt=
''
/>
<
img
className=
'course-cover'
src=
{
coverUrl
||
'https://image.xiaomaiketang.com/xm/wFnpZtp2yB.png'
}
alt=
''
/>
<
Choose
>
<
When
condition=
{
record
.
courseName
.
length
>
25
}
>
<
Tooltip
title=
{
record
.
courseName
}
>
...
...
src/modules/plan-manage/modal/SharePlanModal.jsx
View file @
6fb0e402
...
...
@@ -16,7 +16,7 @@ import CourseService from '@/domains/course-domain/CourseService'
import
'./SharePlanModal.less'
const
DEFAULT_COVER
=
'https://image.xiaomaiketang.com/xm/
YNfi45JwFA
.png'
const
DEFAULT_COVER
=
'https://image.xiaomaiketang.com/xm/
rEAetaTEh3
.png'
class
ShareLiveModal
extends
React
.
Component
{
constructor
(
props
)
{
...
...
src/modules/plan-manage/modal/relatedCourseModal.jsx
View file @
6fb0e402
...
...
@@ -304,7 +304,7 @@ class SelectOperatorModal extends React.Component {
return
null
})
}
<
If
condition=
{
!
hasCover
}
>
<
img
className=
'course-cover'
src=
{
"https://image.xiaomaiketang.com/xm/Y
Nfi45JwFA
.png"
}
alt=
''
/>
<
img
className=
'course-cover'
src=
{
"https://image.xiaomaiketang.com/xm/Y
ip2YtFDwH
.png"
}
alt=
''
/>
</
If
>
<
div
>
...
...
@@ -432,8 +432,7 @@ class SelectOperatorModal extends React.Component {
const
{
coverUrl
}
=
record
return
(
<
div
className=
'course-info'
>
{
/* 上传了封面的话就用上传的封面, 没有的话就取视频的第一帧 */
}
<
img
className=
'course-cover'
src=
{
coverUrl
||
"https://image.xiaomaiketang.com/xm/YNfi45JwFA.png"
}
alt=
''
/>
<
img
className=
'course-cover'
src=
{
coverUrl
||
"https://image.xiaomaiketang.com/xm/wFnpZtp2yB.png"
}
alt=
''
/>
<
div
className=
'course-name'
>
{
record
.
courseName
}
</
div
>
</
div
>
)
...
...
src/modules/teach-tool/paper-manage/OperatePaper.jsx
View file @
6fb0e402
This diff is collapsed.
Click to expand it.
src/modules/teach-tool/paper-manage/OperatePaper.less
View file @
6fb0e402
...
...
@@ -88,4 +88,23 @@
.ant-dropdown-menu-item-selected > span {
color: #333333;
}
\ No newline at end of file
}
.type-order-modal {
.type-order-table {
tr {
background: #F7F8F9 !important;
display: flex;
margin-bottom: 8px;
width: 521px;
justify-content: space-between;
td {
border: none !important;
}
}
.ant-table-tbody > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td {
background: #F7F8F9 !important;
}
}
}
src/modules/teach-tool/paper-manage/modal/SelectQuestionModal.jsx
View file @
6fb0e402
...
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-03-29 10:52:26
* @LastEditors: yuananting
* @LastEditTime: 2021-0
5-08 16:11:27
* @LastEditTime: 2021-0
6-07 14:45:02
* @Description: 助学工具-试卷-新建选择题目弹窗
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -42,7 +42,8 @@ class SelectQuestionModal extends Component {
width=
{
1080
}
onOk=
{
()
=>
{
this
.
props
.
setSelectedQuestion
(
this
.
listRef
.
current
.
state
.
selectQuestionKeys
.
map
((
item
)
=>
{
this
.
listRef
.
current
.
state
.
selectQuestionKeys
.
map
((
item
,
index
)
=>
{
item
.
sorterIndex
=
index
;
item
.
questionId
=
item
.
id
||
item
.
questionId
;
item
.
questionType
=
item
.
questionTypeEnum
||
item
.
questionType
;
item
.
score
=
item
.
score
||
2
;
...
...
src/modules/teach-tool/question-manage/components/OperateQuestionTab.jsx
View file @
6fb0e402
/*
* @Author: yuananting
* @Date: 2021-02-25 14:34:29
* @LastEditors:
wufan
* @LastEditTime: 2021-0
5-14 18:17:08
* @LastEditors:
yuananting
* @LastEditTime: 2021-0
6-09 12:00:12
* @Description: 助学工具-题库-操作题目Tab
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -66,23 +66,25 @@ class OperateQuestionTab extends Component {
}
componentDidMount
()
{
const
{
chooseOptions
}
=
this
.
state
;
const
{
questionTypeKey
}
=
this
.
props
;
const
isEditCurrent
=
getParameterByName
(
"id"
)
&&
getParameterByName
(
"type"
)
===
questionTypeKey
;
const
optionSize
=
isEditCurrent
?
20
:
4
;
if
(
[
"INDEFINITE_CHOICE"
,
"MULTI_CHOICE"
,
"SINGLE_CHOICE"
].
includes
(
this
.
props
.
questionTypeKey
questionTypeKey
)
)
{
if
(
chooseOptions
.
length
===
0
)
{
// 选择题(单选 多选 不定项)-插入4条默认选项
for
(
var
i
=
0
;
i
<
4
;
i
++
)
{
this
.
handleAddOption
();
this
.
setState
({
[
`optionsValidate_
${
i
}
`
]:
"success"
,
[
`optionsText_
${
i
}
`
]:
""
,
});
}
// 选择题(单选 多选 不定项)-插入4条默认选项
for
(
var
i
=
0
;
i
<
optionSize
;
i
++
)
{
this
.
handleAddOption
();
this
.
setState
({
[
`optionsValidate_
${
i
}
`
]:
"success"
,
[
`optionsText_
${
i
}
`
]:
""
,
});
}
}
else
if
(
this
.
props
.
questionTypeKey
===
"JUDGE"
)
{
}
else
if
(
questionTypeKey
===
"JUDGE"
)
{
this
.
initJudgeOption
(
"正确"
);
this
.
initJudgeOption
(
"错误"
);
}
...
...
@@ -634,9 +636,9 @@ class OperateQuestionTab extends Component {
this
.
state
.
stemContent
,
(
contentItem
)
=>
contentItem
.
type
===
"RICH_TEXT"
);
if
(
stemContent
.
textLength
>
1000
)
{
if
(
stemContent
.
textLength
>
1000
)
{
validateError
++
;
}
}
let
stem
=
stemContent
.
content
.
replace
(
/<
[^
>
]
+>/g
,
""
);
stem
=
stem
.
replace
(
/
\&
nbsp
\;
/gi
,
""
);
stem
=
stem
.
replace
(
/
\s
+/g
,
""
);
...
...
@@ -694,7 +696,7 @@ class OperateQuestionTab extends Component {
optionUnChecked
=
item
.
isCorrectAnswer
?
optionUnChecked
:
optionUnChecked
+
1
;
if
(
optionContent
[
0
].
textLength
>
1000
)
{
if
(
optionContent
[
0
].
textLength
>
1000
)
{
validateError
++
;
}
let
optionInput
=
optionContent
[
0
].
content
.
replace
(
/<
[^
>
]
+>/g
,
""
);
...
...
@@ -1040,11 +1042,11 @@ class OperateQuestionTab extends Component {
return
dom
?
(
<
div
className=
"question-item_question-content"
style=
{
{
display
:
[
"PICTURE"
,
"VIDEO"
].
includes
(
type
)
?
"inline-grid"
:
"flex"
,
}
}
style=
{
!
[
"PICTURE"
,
"VIDEO"
].
includes
(
type
)
?
{
display
:
"flex"
}
:
{
float
:
"left"
}
}
key=
{
index
}
>
{
dom
}
...
...
@@ -1194,10 +1196,8 @@ class OperateQuestionTab extends Component {
data
-
label=
"正确答案"
>
{
_
.
map
(
chooseOptions
,
(
optionItem
,
optionIndex
)
=>
{
const
{
questionOptionContentList
,
isCorrectAnswer
,
}
=
optionItem
;
const
{
questionOptionContentList
,
isCorrectAnswer
}
=
optionItem
;
optionItem
.
optionSort
=
optionIndex
;
const
mediaBtn
=
[
"VOICE"
,
"AUDIO"
,
"PICTURE"
];
const
placeHold
=
...
...
src/modules/teach-tool/question-manage/components/OperateQuestionTab.less
View file @
6fb0e402
...
...
@@ -2,7 +2,7 @@
border-radius: 2px;
padding: 16px;
position: relative;
margin-bottom:
35
px;
margin-bottom:
70
px;
.editor-fill-box_single {
border-radius: 4px;
...
...
src/modules/teach-tool/question-manage/modal/PreviewQuestionModal.less
View file @
6fb0e402
...
...
@@ -32,7 +32,7 @@
color: #666666;
.input-box {
margin-bottom: 8px;
display: inline-block;
//
display: inline-block;
*:not(p) {
font-weight: normal !important;
font-size: 14px !important;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment