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
29c47994
Commit
29c47994
authored
Jul 01, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Plain Diff
fix:解决合并培训计划空状态图的分支冲突
parents
96753369
1be68445
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
148 additions
and
116 deletions
+148
-116
src/modules/plan-manage/components/EmployeeShareData.jsx
+127
-96
src/modules/plan-manage/components/UserLearningData.jsx
+0
-0
src/modules/plan-manage/modal/relatedCourseModal.jsx
+20
-20
src/modules/teach-tool/examination-manager/ExamData.tsx
+0
-0
src/modules/teach-tool/paper-manage/OperatePaper.less
+1
-0
No files found.
src/modules/plan-manage/components/EmployeeShareData.jsx
View file @
29c47994
import
React
from
'react'
;
import
React
from
'react'
;
import
{
withRouter
}
from
"react-router-dom"
;
import
{
withRouter
}
from
'react-router-dom'
;
import
{
Table
,
Modal
,
Input
,
message
}
from
'antd'
;
import
{
Input
}
from
'antd'
;
import
{
PageControl
}
from
"@/components"
;
import
{
PageControl
,
XMTable
}
from
'@/components'
;
import
PlanService
from
'@/domains/plan-domain/planService'
import
college
from
'@/common/lottie/college'
;
import
PlanService
from
'@/domains/plan-domain/planService'
;
import
User
from
'@/common/js/user'
;
import
User
from
'@/common/js/user'
;
import
Bus
from
'@/core/bus'
;
import
Bus
from
'@/core/bus'
;
import
'./EmployeeShareData.less'
;
import
'./EmployeeShareData.less'
;
...
@@ -10,103 +11,129 @@ import './EmployeeShareData.less';
...
@@ -10,103 +11,129 @@ import './EmployeeShareData.less';
const
{
Search
}
=
Input
;
const
{
Search
}
=
Input
;
const
UserRole
=
{
const
UserRole
=
{
Store_Manager
:
{
Store_Manager
:
{
text
:
"学院管理员"
text
:
'学院管理员'
,
},
},
Cloud_Manager
:
{
Cloud_Manager
:
{
text
:
"管理员"
text
:
'管理员'
,
},
},
Cloud_Operator
:
{
Cloud_Operator
:
{
text
:
'运营师'
text
:
'运营师'
,
},
},
Cloud_Lecture
:
{
Cloud_Lecture
:
{
text
:
"讲师"
text
:
'讲师'
,
},
},
};
};
class
EmployeeShareData
extends
React
.
Component
{
class
EmployeeShareData
extends
React
.
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
const
id
=
getParameterByName
(
"id"
);
const
id
=
getParameterByName
(
'id'
);
this
.
state
=
{
this
.
state
=
{
id
,
id
,
dataSource
:[],
dataSource
:
[],
size
:
10
,
size
:
10
,
query
:
{
query
:
{
current
:
1
,
current
:
1
,
},
},
totalCount
:
0
,
totalCount
:
0
,
}
}
;
}
}
componentDidMount
(){
componentDidMount
()
{
this
.
handleFetchDataList
();
this
.
handleFetchDataList
();
}
}
handleFetchDataList
=
()
=>
{
handleFetchDataList
=
()
=>
{
const
{
query
,
size
,
id
}
=
this
.
state
;
const
{
query
,
size
,
id
}
=
this
.
state
;
const
params
=
{
const
params
=
{
...
query
,
...
query
,
size
,
size
,
planId
:
id
,
planId
:
id
,
storeId
:
User
.
getStoreId
(),
storeId
:
User
.
getStoreId
(),
}
}
;
PlanService
.
getPlanUserRecordPage
(
params
).
then
((
res
)
=>
{
PlanService
.
getPlanUserRecordPage
(
params
).
then
((
res
)
=>
{
const
{
result
=
{}
}
=
res
;
const
{
result
=
{}
}
=
res
;
const
{
records
=
[],
total
=
0
}
=
result
;
const
{
records
=
[],
total
=
0
}
=
result
;
this
.
setState
({
this
.
setState
({
dataSource
:
records
,
dataSource
:
records
,
totalCount
:
Number
(
total
)
totalCount
:
Number
(
total
),
});
});
});
});
}
}
;
onShowSizeChange
=
(
current
,
size
)
=>
{
onShowSizeChange
=
(
current
,
size
)
=>
{
if
(
current
==
size
)
{
if
(
current
==
size
)
{
return
return
;
}
}
this
.
setState
({
this
.
setState
(
size
{
},()
=>
{
this
.
handleFetchDataList
()})
size
,
},
()
=>
{
this
.
handleFetchDataList
();
}
}
handleChangeTable
=
(
pagination
,
filters
,
sorter
)
=>
{
);
};
handleChangeTable
=
(
pagination
,
filters
,
sorter
)
=>
{
const
{
columnKey
,
order
}
=
sorter
;
const
{
columnKey
,
order
}
=
sorter
;
const
{
query
}
=
this
.
state
;
const
{
query
}
=
this
.
state
;
let
_columnKey
;
let
_columnKey
;
let
_order
;
let
_order
;
if
(
columnKey
===
'learnNum'
&&
order
===
'ascend'
)
{
_columnKey
=
"LEARN_NUM"
;
_order
=
'SORT_ASC'
;
}
if
(
columnKey
===
'learnNum'
&&
order
===
'ascend'
)
{
if
(
columnKey
===
'learnNum'
&&
order
===
'descend'
)
{
_columnKey
=
"LEARN_NUM"
;
_order
=
'SORT_DESC'
;
}
_columnKey
=
'LEARN_NUM'
;
_order
=
'SORT_ASC'
;
}
if
(
columnKey
===
'learnNum'
&&
order
===
'descend'
)
{
_columnKey
=
'LEARN_NUM'
;
_order
=
'SORT_DESC'
;
}
if
(
columnKey
===
'learnFinishNum'
&&
order
===
'ascend'
)
{
_columnKey
=
"FINISH_NUM"
;
_order
=
'SORT_ASC'
;
}
if
(
columnKey
===
'learnFinishNum'
&&
order
===
'ascend'
)
{
if
(
columnKey
===
'learnFinishNum'
&&
order
===
'descend'
)
{
_columnKey
=
"FINISH_NUM"
;
_order
=
'SORT_DESC'
;
}
_columnKey
=
'FINISH_NUM'
;
_order
=
'SORT_ASC'
;
}
if
(
columnKey
===
'learnFinishNum'
&&
order
===
'descend'
)
{
_columnKey
=
'FINISH_NUM'
;
_order
=
'SORT_DESC'
;
}
if
(
columnKey
===
'learnNoFinishNum'
&&
order
===
'ascend'
)
{
_columnKey
=
"NOT_NUM"
;
_order
=
'SORT_ASC'
;
}
if
(
columnKey
===
'learnNoFinishNum'
&&
order
===
'ascend'
)
{
if
(
columnKey
===
'learnNoFinishNum'
&&
order
===
'descend'
)
{
_columnKey
=
"NOT_NUM"
;
_order
=
'SORT_DESC'
;
}
_columnKey
=
'NOT_NUM'
;
_order
=
'SORT_ASC'
;
}
if
(
columnKey
===
'learnNoFinishNum'
&&
order
===
'descend'
)
{
_columnKey
=
'NOT_NUM'
;
_order
=
'SORT_DESC'
;
}
const
_query
=
{
const
_query
=
{
...
query
,
...
query
,
sortMap
:
{}
sortMap
:
{},
};
};
_query
.
sortMap
[
_columnKey
]
=
_order
;
_query
.
sortMap
[
_columnKey
]
=
_order
;
this
.
setState
({
this
.
setState
(
query
:
_query
{
},()
=>
this
.
handleFetchDataList
())
query
:
_query
,
}
},
handleChangNickname
=
(
value
)
=>
{
()
=>
this
.
handleFetchDataList
()
);
};
handleChangNickname
=
(
value
)
=>
{
const
isPhone
=
(
value
||
''
).
match
(
/^
\d
+$/
);
const
isPhone
=
(
value
||
''
).
match
(
/^
\d
+$/
);
const
{
query
}
=
this
.
state
;
const
{
query
}
=
this
.
state
;
if
(
isPhone
)
{
if
(
isPhone
)
{
query
.
userPhone
=
value
;
query
.
userPhone
=
value
;
query
.
userName
=
null
;
query
.
userName
=
null
;
}
else
{
}
else
{
query
.
userName
=
value
;
query
.
userName
=
value
;
query
.
userPhone
=
null
;
query
.
userPhone
=
null
;
}
}
query
.
current
=
1
;
query
.
current
=
1
;
this
.
setState
({
this
.
setState
({
query
query
,
})
});
}
}
;
watchDataView
=
(
record
)
=>
{
watchDataView
=
(
record
)
=>
{
Bus
.
trigger
(
'watchDataView'
,
record
);
Bus
.
trigger
(
'watchDataView'
,
record
);
}
}
;
// 请求表头
// 请求表头
parselumns
=
()
=>
{
parselumns
=
()
=>
{
const
columns
=
[
const
columns
=
[
...
@@ -115,24 +142,16 @@ class EmployeeShareData extends React.Component {
...
@@ -115,24 +142,16 @@ class EmployeeShareData extends React.Component {
key
:
'storeUserName'
,
key
:
'storeUserName'
,
dataIndex
:
'storeUserName'
,
dataIndex
:
'storeUserName'
,
render
:
(
val
,
record
)
=>
{
render
:
(
val
,
record
)
=>
{
return
(
return
<
div
>
{
val
}
</
div
>;
<
div
>
},
{
val
}
</
div
>
)
}
},
},
{
{
title
:
'角色'
,
title
:
'角色'
,
key
:
'roleEnum'
,
key
:
'roleEnum'
,
dataIndex
:
'roleEnum'
,
dataIndex
:
'roleEnum'
,
render
:
(
val
,
record
)
=>
{
render
:
(
val
,
record
)
=>
{
return
(
return
<
div
>
{
UserRole
[
record
.
roleEnum
].
text
}
</
div
>;
<
div
>
},
{
UserRole
[
record
.
roleEnum
].
text
}
</
div
>
)
}
},
},
//产品暂时性隐藏
//产品暂时性隐藏
// {
// {
...
@@ -151,28 +170,20 @@ class EmployeeShareData extends React.Component {
...
@@ -151,28 +170,20 @@ class EmployeeShareData extends React.Component {
title
:
'最近分享成功时间'
,
title
:
'最近分享成功时间'
,
key
:
'recentlyForwardTime'
,
key
:
'recentlyForwardTime'
,
dataIndex
:
'recentlyForwardTime'
,
dataIndex
:
'recentlyForwardTime'
,
width
:
240
,
width
:
240
,
render
:
(
val
,
record
)
=>
{
render
:
(
val
,
record
)
=>
{
return
(
return
<
div
>
{
formatDate
(
'YYYY-MM-DD H:i'
,
val
)
}
</
div
>;
<
div
>
},
{
formatDate
(
'YYYY-MM-DD H:i'
,
val
)
}
</
div
>
)
}
},
},
{
{
title
:
'学习人数'
,
title
:
'学习人数'
,
key
:
'learnNum'
,
key
:
'learnNum'
,
dataIndex
:
'learnNum'
,
dataIndex
:
'learnNum'
,
width
:
110
,
width
:
110
,
sorter
:
true
,
sorter
:
true
,
render
:
(
val
,
record
)
=>
{
render
:
(
val
,
record
)
=>
{
return
(
return
<
div
className=
'learn-num'
>
{
val
}
</
div
>;
<
div
className=
"learn-num"
>
},
{
val
}
</
div
>
)
}
},
},
// {
// {
// title: '已学完',
// title: '已学完',
...
@@ -208,24 +219,39 @@ class EmployeeShareData extends React.Component {
...
@@ -208,24 +219,39 @@ class EmployeeShareData extends React.Component {
dataIndex
:
'operate'
,
dataIndex
:
'operate'
,
render
:
(
val
,
record
)
=>
{
render
:
(
val
,
record
)
=>
{
return
(
return
(
<
span
className=
"operate-item"
onClick=
{
()
=>
this
.
watchDataView
(
record
)
}
>
数据详情
</
span
>
<
span
className=
'operate-item'
onClick=
{
()
=>
this
.
watchDataView
(
record
)
}
>
)
数据详情
}
</
span
>
}
);
},
},
];
];
return
columns
;
return
columns
;
}
}
;
render
()
{
render
()
{
const
{
dataSource
,
query
,
size
,
totalCount
}
=
this
.
state
;
const
{
dataSource
,
query
,
size
,
totalCount
}
=
this
.
state
;
return
(
return
(
<
div
className=
"employee-share-data"
>
<
div
className=
'employee-share-data'
>
<
div
className=
"search-container"
>
<
div
className=
'search-container'
>
<
Search
placeholder=
"搜索员工姓名或手机号"
onChange=
{
(
e
)
=>
{
this
.
handleChangNickname
(
e
.
target
.
value
)}
}
onSearch=
{
()
=>
{
this
.
handleFetchDataList
()}
}
style=
{
{
width
:
200
}
}
enterButton=
{
<
span
className=
"icon iconfont"
>

</
span
>
}
/>
<
Search
placeholder=
'搜索员工姓名或手机号'
onChange=
{
(
e
)
=>
{
this
.
handleChangNickname
(
e
.
target
.
value
);
}
}
onSearch=
{
()
=>
{
this
.
handleFetchDataList
();
}
}
style=
{
{
width
:
200
}
}
enterButton=
{
<
span
className=
'icon iconfont'
>

</
span
>
}
/>
</
div
>
</
div
>
<
div
>
<
div
>
<
Table
<
XMTable
rowKey=
{
record
=>
record
.
id
}
renderEmpty=
{
{
image
:
college
,
description
:
'暂无数据'
,
}
}
rowKey=
{
(
record
)
=>
record
.
id
}
dataSource=
{
dataSource
}
dataSource=
{
dataSource
}
columns=
{
this
.
parselumns
()
}
columns=
{
this
.
parselumns
()
}
pagination=
{
false
}
pagination=
{
false
}
...
@@ -233,25 +259,30 @@ class EmployeeShareData extends React.Component {
...
@@ -233,25 +259,30 @@ class EmployeeShareData extends React.Component {
showSorterTooltip=
{
false
}
showSorterTooltip=
{
false
}
bordered
bordered
/>
/>
{
dataSource
.
length
>
0
&&
{
dataSource
.
length
>
0
&&
(
<
div
className=
"box-footer"
>
<
div
className=
'box-footer'
>
<
PageControl
<
PageControl
current=
{
query
.
current
-
1
}
current=
{
query
.
current
-
1
}
pageSize=
{
size
}
pageSize=
{
size
}
total=
{
totalCount
}
total=
{
totalCount
}
toPage=
{
(
page
)
=>
{
toPage=
{
(
page
)
=>
{
const
_query
=
{...
query
,
current
:
page
+
1
};
const
_query
=
{
...
query
,
current
:
page
+
1
};
this
.
setState
({
this
.
setState
(
query
:
_query
{
},()
=>
{
this
.
handleFetchDataList
()})
query
:
_query
,
},
()
=>
{
this
.
handleFetchDataList
();
}
);
}
}
}
}
onShowSizeChange=
{
this
.
onShowSizeChange
}
onShowSizeChange=
{
this
.
onShowSizeChange
}
/>
/>
</
div
>
</
div
>
}
)
}
</
div
>
</
div
>
</
div
>
</
div
>
)
)
;
}
}
}
}
...
...
src/modules/plan-manage/components/UserLearningData.jsx
View file @
29c47994
This diff is collapsed.
Click to expand it.
src/modules/plan-manage/modal/relatedCourseModal.jsx
View file @
29c47994
import
React
from
'react'
;
import
React
from
'react'
;
import
_
from
'underscore'
;
import
_
from
'underscore'
;
import
{
Table
,
Radio
,
Tabs
,
Modal
,
Input
,
message
,
Button
,
Tooltip
}
from
'antd'
;
import
{
Radio
,
Tabs
,
Modal
,
Input
,
message
,
Button
,
Tooltip
}
from
'antd'
;
import
{
PageControl
}
from
'@/components'
;
import
{
PageControl
,
XMTable
}
from
'@/components'
;
import
college
from
'@/common/lottie/college'
;
import
CourseService
from
'@/domains/course-domain/CourseService'
;
import
CourseService
from
'@/domains/course-domain/CourseService'
;
import
User
from
'@/common/js/user'
;
import
User
from
'@/common/js/user'
;
...
@@ -312,7 +313,7 @@ class SelectOperatorModal extends React.Component {
...
@@ -312,7 +313,7 @@ class SelectOperatorModal extends React.Component {
return
null
;
return
null
;
})
}
})
}
<
If
condition=
{
!
hasCover
}
>
<
If
condition=
{
!
hasCover
}
>
<
img
className=
'course-cover'
src=
{
"https://image.xiaomaiketang.com/xm/Yip2YtFDwH.png"
}
alt=
''
/>
<
img
className=
'course-cover'
src=
{
'https://image.xiaomaiketang.com/xm/Yip2YtFDwH.png'
}
alt=
''
/>
</
If
>
</
If
>
<
div
>
<
div
>
...
@@ -384,19 +385,6 @@ class SelectOperatorModal extends React.Component {
...
@@ -384,19 +385,6 @@ class SelectOperatorModal extends React.Component {
),
),
key
:
'course'
,
key
:
'course'
,
dataIndex
:
'course'
,
dataIndex
:
'course'
,
width
:
'40%'
,
title
:
(
<
span
>
<
span
>
课程信息
</
span
>
<
Tooltip
title=
'仅显示未关联课程,已关联课程不支持重复选择'
>
<
i
className=
'icon iconfont'
style=
{
{
marginLeft
:
'5px'
,
cursor
:
'pointer'
,
color
:
'#bfbfbf'
,
fontSize
:
'14px'
,
fontWeight
:
'400'
}
}
>

</
i
>
</
Tooltip
>
</
span
>
),
key
:
'course'
,
dataIndex
:
'course'
,
width
:
'60%'
,
width
:
'60%'
,
render
:
(
val
,
record
)
=>
{
render
:
(
val
,
record
)
=>
{
const
{
coverUrl
,
scheduleVideoUrl
}
=
record
;
const
{
coverUrl
,
scheduleVideoUrl
}
=
record
;
...
@@ -471,7 +459,7 @@ class SelectOperatorModal extends React.Component {
...
@@ -471,7 +459,7 @@ class SelectOperatorModal extends React.Component {
const
{
coverUrl
}
=
record
;
const
{
coverUrl
}
=
record
;
return
(
return
(
<
div
className=
'course-info'
>
<
div
className=
'course-info'
>
<
img
className=
'course-cover'
src=
{
coverUrl
||
"https://image.xiaomaiketang.com/xm/wFnpZtp2yB.png"
}
alt=
''
/>
<
img
className=
'course-cover'
src=
{
coverUrl
||
'https://image.xiaomaiketang.com/xm/wFnpZtp2yB.png'
}
alt=
''
/>
<
div
className=
'course-name'
>
{
record
.
courseName
}
</
div
>
<
div
className=
'course-name'
>
{
record
.
courseName
}
</
div
>
</
div
>
</
div
>
);
);
...
@@ -746,7 +734,11 @@ class SelectOperatorModal extends React.Component {
...
@@ -746,7 +734,11 @@ class SelectOperatorModal extends React.Component {
</
div
>
</
div
>
</
div
>
</
div
>
<
div
>
<
div
>
<
Table
<
XMTable
renderEmpty=
{
{
image
:
college
,
description
:
'暂无数据'
,
}
}
rowKey=
{
(
record
)
=>
record
.
liveCourseId
}
rowKey=
{
(
record
)
=>
record
.
liveCourseId
}
dataSource=
{
liveDataSource
}
dataSource=
{
liveDataSource
}
columns=
{
this
.
parseLiveColumns
()
}
columns=
{
this
.
parseLiveColumns
()
}
...
@@ -837,7 +829,11 @@ class SelectOperatorModal extends React.Component {
...
@@ -837,7 +829,11 @@ class SelectOperatorModal extends React.Component {
</
div
>
</
div
>
</
div
>
</
div
>
<
div
>
<
div
>
<
Table
<
XMTable
renderEmpty=
{
{
image
:
college
,
description
:
'暂无数据'
,
}
}
rowKey=
{
(
record
)
=>
record
.
id
}
rowKey=
{
(
record
)
=>
record
.
id
}
dataSource=
{
videoDataSource
[
videoCourseDivision
]
}
dataSource=
{
videoDataSource
[
videoCourseDivision
]
}
columns=
{
this
.
parseVideoColumns
()
}
columns=
{
this
.
parseVideoColumns
()
}
...
@@ -932,7 +928,11 @@ class SelectOperatorModal extends React.Component {
...
@@ -932,7 +928,11 @@ class SelectOperatorModal extends React.Component {
</
div
>
</
div
>
</
div
>
</
div
>
<
div
>
<
div
>
<
Table
<
XMTable
renderEmpty=
{
{
image
:
college
,
description
:
'暂无数据'
,
}
}
rowKey=
{
(
record
)
=>
record
.
id
}
rowKey=
{
(
record
)
=>
record
.
id
}
dataSource=
{
pictureDataSource
}
dataSource=
{
pictureDataSource
}
columns=
{
this
.
parsePictureColumns
()
}
columns=
{
this
.
parsePictureColumns
()
}
...
...
src/modules/teach-tool/examination-manager/ExamData.tsx
View file @
29c47994
This diff is collapsed.
Click to expand it.
src/modules/teach-tool/paper-manage/OperatePaper.less
View file @
29c47994
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
}
}
.table-style {
.table-style {
border: 1px solid #f0f0f0 !important;
border: 1px solid #f0f0f0 !important;
margin-bottom: 70px;
}
}
.ant-tabs {
.ant-tabs {
color: #666666;
color: #666666;
...
...
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