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
e47d0a7b
Commit
e47d0a7b
authored
Jul 08, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:解决周优化培训计划关联树限制修复的合并冲突
parent
282636bb
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
160 additions
and
139 deletions
+160
-139
src/modules/plan-manage/components/TrainingTask.less
+97
-96
src/modules/plan-manage/modal/relatedCourseModal.jsx
+22
-10
src/modules/root/Header.jsx
+7
-7
src/modules/root/Header.less
+10
-7
src/modules/teach-tool/paper-manage/components/PaperList.less
+20
-18
src/modules/teach-tool/question-manage/Index.less
+4
-1
No files found.
src/modules/plan-manage/components/TrainingTask.less
View file @
e47d0a7b
.training-task{
.training-task
{
thead
{
thead
{
display:
none;
display:
none;
}
}
.ant-form-item
{
.ant-form-item
{
margin-bottom:
0 !important;
margin-bottom:
0 !important;
}
}
.add-task-con
{
.add-task-con
{
height: 52px;
height: 52px;
background: #F7F8F
9;
background: #f7f8f
9;
border-radius: 2px;
border-radius: 2px;
padding:
16px;
padding:
16px;
margin-top:
16px;
margin-top:
16px;
.add-task-btn-disabled
{
.add-task-btn-disabled
{
color:#CCCCCC
;
color: #cccccc
;
font-size:
14px;
font-size:
14px;
}
}
.add-task-btn{
.add-task-btn {
color: #2966FF
;
color: #2966ff
;
font-size:
14px;
font-size:
14px;
}
}
}
}
}
}
.plan-sort-task-item{
.plan-sort-task-item
{
.task-con{
.task-con
{
display:flex;
display:
flex;
padding:16px;
padding:
16px;
background: #
F7F8F
9;
background: #
f7f8f
9;
border-radius: 2px;
border-radius: 2px;
justify-content: space-between;
justify-content: space-between;
align-items: center;
align-items: center;
.task-instro{
.task-instro
{
display:flex;
display:
flex;
align-items: center;
align-items: center;
.open-icon{
.open-icon
{
color:#999999;
color:
#999999;
font-size:10px;
font-size:
10px;
}
}
.task-name-con{
.task-name-con
{
display:flex;
display:
flex;
align-items: center;
align-items: center;
color:#333333;
color:
#333333;
font-size:14px;
font-size:
14px;
.number{
.number
{
margin-right:10px;
margin-right:
10px;
margin-left:10px;
margin-left:
10px;
}
}
.task-name-input{
.task-name-input
{
width: 300px;
width: 300px;
height: 32px;
height: 32px;
background: #
FFFFFF
;
background: #
ffffff
;
border-radius: 4px;
border-radius: 4px;
}
}
}
}
}
}
.operate{
.operate
{
display: none;
display: none;
.operate__item{
.operate__item
{
cursor:pointer;
cursor:
pointer;
margin-left:16px;
margin-left:
16px;
color:#666666;
color:
#666666;
font-size:14px;
font-size:
14px;
.icon{
.icon
{
font-size:14px;
font-size:
14px;
color:#999;
color:
#999;
}
}
.text{
.text
{
margin-left:8px;
margin-left:
8px;
}
}
}
}
}
}
&:hover{
&:hover
{
.operate{
.operate
{
display:block;
display:
block;
}
}
}
}
}
}
.course-box{
.course-box {
.add-course-con{
.add-course-con {
padding:16px 51px;
padding: 16px 51px;
color: #2966FF;
color: #2966ff;
font-size:14px;
font-size: 14px;
.add-course-btn-disabled{
.add-course-btn-disabled {
font-size:14px;
font-size: 14px;
color:#ccc;
color: #ccc;
pointer-events: none;
}
}
}
}
}
}
}
}
.plan-course-sort-item{
.plan-course-sort-item
{
display:flex;
display:
flex;
padding:16px 16px 16px 0px;
padding:
16px 16px 16px 0px;
margin-left:51px;
margin-left:
51px;
justify-content: space-between;
justify-content: space-between;
align-items: center;
align-items: center;
border-bottom:
1px dotted #E8E8E
8;
border-bottom:
1px dotted #e8e8e
8;
&:hover{
&:hover
{
.course-operate{
.course-operate
{
display:block;
display:
block;
}
}
}
}
.course-operate{
.course-operate
{
display: none;
display: none;
.operate__item{
.operate__item
{
cursor:pointer;
cursor:
pointer;
margin-left:16px;
margin-left:
16px;
color:#666666;
color:
#666666;
font-size:14px;
font-size:
14px;
.icon{
.icon
{
font-size:14px;
font-size:
14px;
color:#999;
color:
#999;
}
}
.text{
.text
{
margin-left:8px;
margin-left:
8px;
}
}
}
}
}
}
.course-info{
.course-info
{
.ant-form{
.ant-form
{
display:inline-block;
display:
inline-block;
}
}
.course-name-input{
.course-name-input
{
margin-right:8px;
margin-right:
8px;
}
}
.course-type{
.course-type
{
font-size:
11px;
font-size:
11px;
color:
#666666;
color:
#666666;
padding:
0px 6px;
padding:
0px 6px;
border: 1px solid #999999;
border: 1px solid #999999;
margin-right:
4px;
margin-right:
4px;
border-radius: 2px;
border-radius: 2px;
line-height: 16px;
line-height: 16px;
}
}
.course-name{
.course-name
{
color:
#666666;
color:
#666666;
font-size:
14px;
font-size:
14px;
margin-right:
8px;
margin-right:
8px;
}
}
.tip{
.tip
{
font-size:
14px;
font-size:
14px;
color:#FF4F4F
;
color: #ff4f4f
;
margin-right:
2px;
margin-right:
2px;
}
}
.course-state{
.course-state
{
color:
#999;
color:
#999;
font-size:
14px;
font-size:
14px;
}
}
}
}
}
}
src/modules/plan-manage/modal/relatedCourseModal.jsx
View file @
e47d0a7b
...
@@ -494,7 +494,7 @@ class SelectOperatorModal extends React.Component {
...
@@ -494,7 +494,7 @@ class SelectOperatorModal extends React.Component {
}
else
{
}
else
{
_list
=
_
.
reject
(
selectLive
,
(
item
)
=>
item
.
liveCourseId
===
record
.
liveCourseId
);
_list
=
_
.
reject
(
selectLive
,
(
item
)
=>
item
.
liveCourseId
===
record
.
liveCourseId
);
}
}
if
(
_list
.
length
+
currentTaskCourseData
.
length
+
selectVideo
.
length
+
selectPicture
.
length
>
20
)
{
if
(
_list
.
length
+
currentTaskCourseData
.
length
+
selectVideo
.
internal
.
length
+
selectVideo
.
external
.
length
+
selectPicture
.
length
>
20
)
{
message
.
warning
(
'无法继续选择,一个任务最多关联20个课程'
);
message
.
warning
(
'无法继续选择,一个任务最多关联20个课程'
);
return
;
return
;
}
}
...
@@ -505,14 +505,14 @@ class SelectOperatorModal extends React.Component {
...
@@ -505,14 +505,14 @@ class SelectOperatorModal extends React.Component {
const
{
selectVideo
,
currentTaskCourseData
,
selectLive
,
selectPicture
,
videoCourseDivision
}
=
this
.
state
;
const
{
selectVideo
,
currentTaskCourseData
,
selectLive
,
selectPicture
,
videoCourseDivision
}
=
this
.
state
;
let
{
[
videoCourseDivision
]:
selectList
}
=
selectVideo
;
let
{
[
videoCourseDivision
]:
selectList
}
=
selectVideo
;
let
otherVideoCourseDivision
=
videoCourseDivision
===
'internal'
?
'external'
:
'internal'
;
let
_list
=
[];
let
_list
=
[];
if
(
selected
||
!
_
.
find
(
selectList
,
(
item
)
=>
item
.
id
===
record
.
id
))
{
if
(
selected
||
!
_
.
find
(
selectList
,
(
item
)
=>
item
.
id
===
record
.
id
))
{
_list
=
_
.
uniq
(
selectList
.
concat
([
record
]),
false
,
(
item
)
=>
item
.
id
);
_list
=
_
.
uniq
(
selectList
.
concat
([
record
]),
false
,
(
item
)
=>
item
.
id
);
}
else
{
}
else
{
_list
=
_
.
reject
(
selectList
,
(
item
)
=>
item
.
id
===
record
.
id
);
_list
=
_
.
reject
(
selectList
,
(
item
)
=>
item
.
id
===
record
.
id
);
}
}
if
(
_list
.
length
+
currentTaskCourseData
.
length
+
selectLive
.
length
+
selectPicture
.
length
>
20
)
{
if
(
_list
.
length
+
selectVideo
[
otherVideoCourseDivision
]?.
length
+
currentTaskCourseData
.
length
+
selectLive
.
length
+
selectPicture
.
length
>
20
)
{
message
.
warning
(
'无法继续选择,一个任务最多关联20个课程'
);
message
.
warning
(
'无法继续选择,一个任务最多关联20个课程'
);
return
;
return
;
}
}
...
@@ -532,7 +532,7 @@ class SelectOperatorModal extends React.Component {
...
@@ -532,7 +532,7 @@ class SelectOperatorModal extends React.Component {
}
else
{
}
else
{
_list
=
_
.
reject
(
selectPicture
,
(
item
)
=>
item
.
id
===
record
.
id
);
_list
=
_
.
reject
(
selectPicture
,
(
item
)
=>
item
.
id
===
record
.
id
);
}
}
if
(
_list
.
length
+
currentTaskCourseData
.
length
+
selectLive
.
length
+
selectVideo
.
length
>
20
)
{
if
(
_list
.
length
+
currentTaskCourseData
.
length
+
selectLive
.
length
+
selectVideo
.
internal
.
length
+
selectVideo
.
external
.
length
>
20
)
{
message
.
warning
(
'无法继续选择,一个任务最多关联20个课程'
);
message
.
warning
(
'无法继续选择,一个任务最多关联20个课程'
);
return
;
return
;
}
}
...
@@ -757,9 +757,10 @@ class SelectOperatorModal extends React.Component {
...
@@ -757,9 +757,10 @@ class SelectOperatorModal extends React.Component {
}
else
{
}
else
{
_list
=
_
.
reject
(
selectLive
,
(
item
)
=>
_
.
find
(
changeRows
,
(
data
)
=>
data
.
liveCourseId
===
item
.
liveCourseId
));
_list
=
_
.
reject
(
selectLive
,
(
item
)
=>
_
.
find
(
changeRows
,
(
data
)
=>
data
.
liveCourseId
===
item
.
liveCourseId
));
}
}
if
(
_list
.
length
+
currentTaskCourseData
.
length
+
selectVideo
.
length
+
selectPicture
.
length
>
20
)
{
if
(
_list
.
length
+
currentTaskCourseData
.
length
+
selectVideo
.
internal
.
length
+
selectVideo
.
external
.
length
+
selectPicture
.
length
>
20
)
{
message
.
warning
(
'无法继续选择,一个任务最多关联20个课程'
);
message
.
warning
(
'无法继续选择,一个任务最多关联20个课程'
);
const
extraLength
=
_list
.
length
+
currentTaskCourseData
.
length
+
selectVideo
.
length
+
selectPicture
.
length
-
20
;
const
extraLength
=
_list
.
length
+
currentTaskCourseData
.
length
+
selectVideo
.
internal
.
length
+
selectVideo
.
external
.
length
+
+
selectPicture
.
length
-
20
;
_list
.
splice
(
_list
.
length
-
extraLength
,
extraLength
);
_list
.
splice
(
_list
.
length
-
extraLength
,
extraLength
);
}
}
this
.
setState
({
selectLive
:
_list
});
this
.
setState
({
selectLive
:
_list
});
...
@@ -847,14 +848,24 @@ class SelectOperatorModal extends React.Component {
...
@@ -847,14 +848,24 @@ class SelectOperatorModal extends React.Component {
},
},
onSelectAll
:
(
selected
,
_selectedRows
,
changeRows
)
=>
{
onSelectAll
:
(
selected
,
_selectedRows
,
changeRows
)
=>
{
let
_list
=
[];
let
_list
=
[];
let
otherVideoCourseDivision
=
videoCourseDivision
===
'internal'
?
'external'
:
'internal'
;
if
(
selected
)
{
if
(
selected
)
{
_list
=
_
.
uniq
(
selectVideo
[
videoCourseDivision
].
concat
(
changeRows
),
false
,
(
item
)
=>
item
.
id
);
_list
=
_
.
uniq
(
selectVideo
[
videoCourseDivision
].
concat
(
changeRows
),
false
,
(
item
)
=>
item
.
id
);
}
else
{
}
else
{
_list
=
_
.
reject
(
selectVideo
[
videoCourseDivision
],
(
item
)
=>
_
.
find
(
changeRows
,
(
data
)
=>
data
.
id
===
item
.
id
));
_list
=
_
.
reject
(
selectVideo
[
videoCourseDivision
],
(
item
)
=>
_
.
find
(
changeRows
,
(
data
)
=>
data
.
id
===
item
.
id
));
}
}
if
(
_list
.
length
+
currentTaskCourseData
.
length
+
selectLive
.
length
+
selectPicture
.
length
>
20
)
{
if
(
_list
.
length
+
selectVideo
[
otherVideoCourseDivision
]?.
length
+
currentTaskCourseData
.
length
+
selectLive
.
length
+
selectPicture
.
length
>
20
)
{
message
.
warning
(
'无法继续选择,一个任务最多关联20个课程'
);
message
.
warning
(
'无法继续选择,一个任务最多关联20个课程'
);
const
extraLength
=
_list
.
length
+
currentTaskCourseData
.
length
+
selectLive
.
length
+
selectPicture
.
length
-
20
;
const
extraLength
=
_list
.
length
+
selectVideo
[
otherVideoCourseDivision
]?.
length
+
currentTaskCourseData
.
length
+
selectLive
.
length
+
selectPicture
.
length
-
20
;
_list
.
splice
(
_list
.
length
-
extraLength
,
extraLength
);
_list
.
splice
(
_list
.
length
-
extraLength
,
extraLength
);
}
}
this
.
setState
({
this
.
setState
({
...
@@ -951,9 +962,10 @@ class SelectOperatorModal extends React.Component {
...
@@ -951,9 +962,10 @@ class SelectOperatorModal extends React.Component {
}
else
{
}
else
{
_list
=
_
.
reject
(
selectPicture
,
(
item
)
=>
_
.
find
(
changeRows
,
(
data
)
=>
data
.
id
===
item
.
id
));
_list
=
_
.
reject
(
selectPicture
,
(
item
)
=>
_
.
find
(
changeRows
,
(
data
)
=>
data
.
id
===
item
.
id
));
}
}
if
(
_list
.
length
+
currentTaskCourseData
.
length
+
selectVideo
.
length
+
selectLive
.
length
>
20
)
{
if
(
_list
.
length
+
currentTaskCourseData
.
length
+
selectVideo
.
internal
.
length
+
selectVideo
.
external
.
length
+
selectLive
.
length
>
20
)
{
message
.
warning
(
'无法继续选择,一个任务最多关联20个课程'
);
message
.
warning
(
'无法继续选择,一个任务最多关联20个课程'
);
const
extraLength
=
_list
.
length
+
currentTaskCourseData
.
length
+
selectVideo
.
length
+
selectLive
.
length
-
20
;
const
extraLength
=
_list
.
length
+
currentTaskCourseData
.
length
+
selectVideo
.
internal
.
length
+
selectVideo
.
external
.
length
+
selectLive
.
length
-
20
;
_list
.
splice
(
_list
.
length
-
extraLength
,
extraLength
);
_list
.
splice
(
_list
.
length
-
extraLength
,
extraLength
);
}
}
this
.
setState
({
selectPicture
:
_list
});
this
.
setState
({
selectPicture
:
_list
});
...
...
src/modules/root/Header.jsx
View file @
e47d0a7b
/*
/*
* @Author: 吴文洁
* @Author: 吴文洁
* @Date: 2019-09-10 18:26:03
* @Date: 2019-09-10 18:26:03
* @LastEditors:
Please set LastEditors
* @LastEditors:
yuananting
* @LastEditTime: 2021-0
6-24 19:28:14
* @LastEditTime: 2021-0
7-06 14:37:49
* @Description:
* @Description:
*/
*/
import
React
,
{
useRef
,
useContext
,
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useRef
,
useContext
,
useEffect
,
useState
}
from
'react'
;
...
@@ -271,14 +271,14 @@ function Header(props) {
...
@@ -271,14 +271,14 @@ function Header(props) {
onChange=
{
(
e
)
=>
{
onChange=
{
(
e
)
=>
{
setStoreId
(
e
.
target
.
value
);
setStoreId
(
e
.
target
.
value
);
User
.
setStoreId
(
e
.
target
.
value
);
User
.
setStoreId
(
e
.
target
.
value
);
list
.
map
((
item
)
=>
{
list
.
map
((
item
)
=>
{
if
(
item
.
id
===
e
.
target
.
value
)
{
if
(
item
.
id
===
e
.
target
.
value
)
{
User
.
setStoreUserId
(
item
.
storeUserId
);
User
.
setStoreUserId
(
item
.
storeUserId
);
}
}
})
})
;
User
.
setUserId
(
User
.
getUserId
());
User
.
setUserId
(
User
.
getUserId
());
User
.
setToken
(
User
.
getToken
());
User
.
setToken
(
User
.
getToken
());
User
.
setEnterpriseId
(
User
.
getEnterpriseId
())
User
.
setEnterpriseId
(
User
.
getEnterpriseId
())
;
window
.
RCHistory
.
push
(
'/home'
);
window
.
RCHistory
.
push
(
'/home'
);
window
.
location
.
reload
();
window
.
location
.
reload
();
}
}
}
}
...
@@ -320,10 +320,10 @@ function Header(props) {
...
@@ -320,10 +320,10 @@ function Header(props) {
</
div
>
</
div
>
)
}
)
}
<
div
className=
'right-box'
>
<
div
className=
'right-box'
>
<
div
className=
'link-to-store'
>
<
div
className=
'right-bg-img'
>
<
div
className=
'right-bg-img'
>
<
img
src=
'https://image.xiaomaiketang.com/xm/WCwjyyXYda.png'
></
img
>
<
img
src=
'https://image.xiaomaiketang.com/xm/WCwjyyXYda.png'
></
img
>
</
div
>
</
div
>
<
div
className=
'link-to-store'
>
<
div
className=
'link'
>
<
div
className=
'link'
>
<
span
className=
'link-btn'
>
<
span
className=
'link-btn'
>
<
span
className=
'icon iconfont tool-tip-right'
>

</
span
>
<
span
className=
'icon iconfont tool-tip-right'
>

</
span
>
...
...
src/modules/root/Header.less
View file @
e47d0a7b
...
@@ -196,7 +196,6 @@
...
@@ -196,7 +196,6 @@
margin-left: 62px;
margin-left: 62px;
.college-container {
.college-container {
position: relative;
position: relative;
width: 360px;
height: 50px;
height: 50px;
display: flex;
display: flex;
align-items: center;
align-items: center;
...
@@ -310,13 +309,9 @@
...
@@ -310,13 +309,9 @@
display: flex;
display: flex;
align-items: center;
align-items: center;
}
}
.right-bg-img {
img {
width: 277px;
height: 60px;
}
}
.link-to-store {
.link-to-store {
position: relative;
display: flex;
display: flex;
height: 49px;
height: 49px;
line-height: 49px;
line-height: 49px;
...
@@ -329,6 +324,14 @@
...
@@ -329,6 +324,14 @@
.iconfont {
.iconfont {
color: #fff;
color: #fff;
}
}
.right-bg-img {
position: absolute;
right: 347px;
img {
width: 277px;
height: 60px;
}
}
.link {
.link {
cursor: pointer;
cursor: pointer;
position: relative;
position: relative;
...
...
src/modules/teach-tool/paper-manage/components/PaperList.less
View file @
e47d0a7b
...
@@ -2,33 +2,33 @@
...
@@ -2,33 +2,33 @@
.select-box {
.select-box {
display: flex;
display: flex;
align-items: center;
align-items: center;
.select-container{
.select-container
{
margin-right: 24px;
margin-right: 24px;
.con{
.con
{
background: #
E9EFFF
;
background: #
e9efff
;
border-radius: 4px;
border-radius: 4px;
padding: 3px 16px;
padding: 3px 16px;
display: inline-flex;
display: inline-flex;
align-items: center;
align-items: center;
justify-content: space-between;
justify-content: space-between;
.tip{
.tip
{
font-size:14px;
font-size:
14px;
color:
#2966FF
;
color:
#2966ff
;
margin-right:8px;
margin-right:
8px;
}
}
.text{
.text
{
font-size:14px;
font-size:
14px;
color:#666;
color:
#666;
margin-right:30px;
margin-right:
30px;
}
}
.clear{
.clear
{
color:
#5289FA
;
color:
#5289fa
;
font-size:14px;
font-size:
14px;
}
}
}
}
}
}
}
}
.ant-radio-wrapper{
.ant-radio-wrapper
{
left: -10px;
left: -10px;
}
}
.paper-list-filter {
.paper-list-filter {
...
@@ -75,8 +75,10 @@
...
@@ -75,8 +75,10 @@
.paper-list-content {
.paper-list-content {
position: relative;
position: relative;
margin-top: 12px;
margin-top: 12px;
height: calc(100vh - 260px);
overflow: scroll;
.empty-list-tip {
.empty-list-tip {
color: #2966
FF
;
color: #2966
ff
;
cursor: pointer;
cursor: pointer;
}
}
.record-name {
.record-name {
...
@@ -88,7 +90,7 @@
...
@@ -88,7 +90,7 @@
display: flex;
display: flex;
&__item {
&__item {
color: #2966
FF
;
color: #2966
ff
;
cursor: pointer;
cursor: pointer;
&.split {
&.split {
...
@@ -98,7 +100,7 @@
...
@@ -98,7 +100,7 @@
}
}
}
}
}
}
&.modal-select{
&.modal-select
{
.search-condition {
.search-condition {
width: calc(100% - 80px);
width: calc(100% - 80px);
display: flex;
display: flex;
...
...
src/modules/teach-tool/question-manage/Index.less
View file @
e47d0a7b
...
@@ -7,7 +7,10 @@
...
@@ -7,7 +7,10 @@
.content {
.content {
width: 100%;
width: 100%;
margin-left: 24px;
margin-left: 24px;
height: calc(100vh - 160px);
.question-list-content {
height: calc(100vh - 260px);
overflow: scroll;
}
}
}
}
}
}
}
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