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
b777a34e
Commit
b777a34e
authored
Dec 14, 2020
by
wufan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:开始联调上课数据
parent
522a961c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
8 deletions
+69
-8
src/data-source/course/request-api.ts
+9
-1
src/domains/course-domain/CourseService.ts
+23
-0
src/modules/course-manage/DataList/CourseData.jsx
+37
-7
No files found.
src/data-source/course/request-api.ts
View file @
b777a34e
...
@@ -2,10 +2,17 @@
...
@@ -2,10 +2,17 @@
* @Author: wufan
* @Author: wufan
* @Date: 2020-12-12 11:57:10
* @Date: 2020-12-12 11:57:10
* @LastEditors: wufan
* @LastEditors: wufan
* @LastEditTime: 2020-12-1
2 14:32:44
* @LastEditTime: 2020-12-1
4 18:05:23
* @Description: Description
* @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
import
Service
from
"@/common/js/service"
;
import
Service
from
"@/common/js/service"
;
export
function
fetchLecturerData
(
params
:
object
)
{
return
Service
.
Hades
(
"public/courseCloud/queryTeacherVisitData"
,
params
);
}
export
function
fetchUserData
(
params
:
object
)
{
return
Service
.
Hades
(
"public/courseCloud/queryStudentVisitData"
,
params
);
}
\ No newline at end of file
src/domains/course-domain/CourseService.ts
0 → 100644
View file @
b777a34e
/*
* @Author: wufan
* @Date: 2020-11-25 18:25:02
* @LastEditors: wufan
* @LastEditTime: 2020-12-14 18:08:07
* @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import
{
fetchLecturerData
,
fetchUserData
}
from
'@/data-source/course/request-api'
;
export
default
class
StoreService
{
// 获取讲师上课数据
static
fetchLecturerData
(
params
:
any
)
{
return
fetchLecturerData
(
params
);
}
// 获取用户上课数据
static
fetchUserData
(
params
:
any
)
{
return
fetchUserData
(
params
);
}
}
\ No newline at end of file
src/modules/course-manage/DataList/CourseData.jsx
View file @
b777a34e
...
@@ -15,6 +15,7 @@ import {
...
@@ -15,6 +15,7 @@ import {
import
dealTimeDuration
from
"../utils/dealTimeDuration"
;
import
dealTimeDuration
from
"../utils/dealTimeDuration"
;
import
{
PageControl
}
from
"@/components"
;
import
{
PageControl
}
from
"@/components"
;
import
Bus
from
"@/core/bus"
;
import
Bus
from
"@/core/bus"
;
import
CourseService
from
"@/domains/course-domain/CourseService"
;
import
"./DataList.less"
;
import
"./DataList.less"
;
class
DataList
extends
React
.
Component
{
class
DataList
extends
React
.
Component
{
...
@@ -36,17 +37,19 @@ class DataList extends React.Component {
...
@@ -36,17 +37,19 @@ class DataList extends React.Component {
current
:
1
,
current
:
1
,
size
:
10
,
// 添加扣课时学员弹窗回填所需 当前接口返回全部列表
size
:
10
,
// 添加扣课时学员弹窗回填所需 当前接口返回全部列表
total
:
0
,
total
:
0
,
loading
:
false
loading
:
false
,
liveCourseId
:
courseId
,
phone
};
};
}
}
componentDidMount
()
{
componentDidMount
()
{
// this.fetchCourseInfo();
// this.fetchCourseInfo();
// this.fetch
Teach
erData();
// this.fetch
Lectur
erData();
// this.fetch
Student
Data();
// this.fetch
User
Data();
}
}
// 获取课程信息
// 获取课程信息
fetchCourseInfo
()
{
fetchCourseInfo
()
{
// axios
// axios
...
@@ -62,7 +65,7 @@ class DataList extends React.Component {
...
@@ -62,7 +65,7 @@ class DataList extends React.Component {
// });
// });
}
}
// 获取学员上课数据
// 获取学员上课数据
fetch
Student
Data
=
(
current
=
1
)
=>
{
fetch
User
Data
=
(
current
=
1
)
=>
{
this
.
setState
({
loading
:
true
});
this
.
setState
({
loading
:
true
});
const
{
courseId
,
size
,
nameOrPhone
,
liveSignState
}
=
this
.
state
;
const
{
courseId
,
size
,
nameOrPhone
,
liveSignState
}
=
this
.
state
;
const
params
=
{
const
params
=
{
...
@@ -75,6 +78,22 @@ class DataList extends React.Component {
...
@@ -75,6 +78,22 @@ class DataList extends React.Component {
if
(
!
params
.
liveSignState
)
{
if
(
!
params
.
liveSignState
)
{
delete
params
.
liveSignState
;
delete
params
.
liveSignState
;
}
}
CourseService
.
getEmployeeList
(
_query
).
then
((
res
)
=>
{
if
(
res
.
result
)
{
const
{
records
=
[],
current
,
size
,
total
}
=
res
.
result
;
records
.
forEach
((
item
)
=>
{
item
.
edit
=
false
;
item
.
courseBag
=
[];
});
this
.
setState
({
studentData
:
records
,
current
,
size
,
total
,
loading
:
false
,
});
}
});
// window.axios
// window.axios
// .Apollo("public/businessLive/queryStudentVisitData", params)
// .Apollo("public/businessLive/queryStudentVisitData", params)
// .then((res) => {
// .then((res) => {
...
@@ -96,7 +115,18 @@ class DataList extends React.Component {
...
@@ -96,7 +115,18 @@ class DataList extends React.Component {
// });
// });
};
};
// 获取老师上课数据
// 获取老师上课数据
fetchTeacherData
=
()
=>
{
fetchLecturerData
=
()
=>
{
CourseService
.
getEmployeeList
(
_query
).
then
((
res
)
=>
{
if
(
res
.
result
)
{
const
teacherData
=
[
res
.
result
];
this
.
setState
(
{
teacherData
,
}
);
}
});
// window.axios
// window.axios
// .Apollo('public/businessLive/queryTeacherVisitData', { liveCourseId: this.state.courseId })
// .Apollo('public/businessLive/queryTeacherVisitData', { liveCourseId: this.state.courseId })
// .then((res) => {
// .then((res) => {
...
@@ -387,7 +417,7 @@ class DataList extends React.Component {
...
@@ -387,7 +417,7 @@ class DataList extends React.Component {
pageSize=
{
size
}
pageSize=
{
size
}
total=
{
total
}
total=
{
total
}
toPage=
{
(
page
)
=>
{
toPage=
{
(
page
)
=>
{
this
.
fetch
Student
Data
(
page
+
1
);
this
.
fetch
User
Data
(
page
+
1
);
}
}
}
}
/>
/>
</
div
>
</
div
>
...
...
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