Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
biz.qingxiao.com
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxuelai
biz.qingxiao.com
Commits
1c27a803
Commit
1c27a803
authored
Nov 27, 2019
by
wangxuelai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
''
parent
452c7fe9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
307 additions
and
49 deletions
+307
-49
index.html
index.html
+1
-1
UploadCourseware.js
src/components/UploadCourseware.js
+12
-2
UploadCourseware.less
src/components/UploadCourseware.less
+27
-0
coursegatherdetail.js
src/models/coursegatherdetail.js
+168
-33
onlineclasses.js
src/models/onlineclasses.js
+91
-9
uploadcourseware.js
src/models/uploadcourseware.js
+5
-1
CourseBox.js
src/pages/coursegather/detail/CourseBox.js
+3
-3
No files found.
index.html
View file @
1c27a803
...
...
@@ -17,6 +17,6 @@
</head>
<body>
<div
id=
"root"
></div>
<script
src=
"dist/main.js?157483
3367343
"
charset=
"utf-8"
></script>
<script
src=
"dist/main.js?157483
7184040
"
charset=
"utf-8"
></script>
</body>
</html>
\ No newline at end of file
src/components/UploadCourseware.js
View file @
1c27a803
import
{
connect
}
from
'dva'
;
import
React
from
'react'
;
import
{
Button
,
Row
,
Carousel
,
Icon
,
Col
,
Input
,
Select
,
Pagination
,
Radio
,
DatePicker
,
Modal
,
Form
,
TimePicker
,
InputNumber
,
Table
}
from
'antd'
;
import
{
Button
,
Row
,
Carousel
,
Icon
,
Col
,
Input
,
Select
,
Pagination
,
Radio
,
DatePicker
,
Modal
,
Form
,
TimePicker
,
InputNumber
,
Table
,
Spin
}
from
'antd'
;
import
pageStyle
from
'./UploadCourseware.less'
;
import
{
pageIn
,
...
...
@@ -87,6 +87,8 @@ class UploadCourseware extends React.Component {
visible
,
info
,
chooseFromCourseMateria
,
saveStatus
,
loading
,
}
=
this
.
props
;
return
(
<
Modal
...
...
@@ -96,7 +98,7 @@ class UploadCourseware extends React.Component {
onCancel
=
{
this
.
hide
}
onOk
=
{
this
.
save
}
className
=
"UploadCoursewareContent"
// confirmLoading={callStudentSubmitt
ing}
confirmLoading
=
{
load
ing
}
zIndex
=
{
110
}
maskClosable
=
{
false
}
width
=
{
600
}
...
...
@@ -126,6 +128,12 @@ class UploadCourseware extends React.Component {
<
/div
>
<
/div
>
<
div
className
=
{
pageStyle
.
uploadBox
}
style
=
{{
display
:
info
.
src
?
'block'
:
'none'
}}
>
{
saveStatus
.
status
!=
0
&&
<
div
className
=
{
`
${
pageStyle
.
uploadLoading
}
uploadLoading`
}
>
<
Spin
size
=
"large"
wrapperClassName
=
{
pageStyle
.
uploadLoadingSpin
}
/
>
<
div
className
=
{
pageStyle
.
uploadLoadingText
}
>
{
saveStatus
.
text
}
<
/div
>
<
/div
>
}
{
info
.
mediaType
==
1
&&
<
Carousel
className
=
{
pageStyle
.
Carousel
}
...
...
@@ -213,10 +221,12 @@ function mapStateToProps(state) {
const
{
visible
,
info
,
saveStatus
,
}
=
state
.
uploadcourseware
;
return
{
visible
,
info
,
saveStatus
,
};
}
export
default
connect
(
mapStateToProps
)(
UploadCourseware
);
...
...
src/components/UploadCourseware.less
View file @
1c27a803
...
...
@@ -209,4 +209,31 @@
text-overflow: ellipsis;
white-space: nowrap;
}
}
:global {
.uploadLoading {
.ant-spin-dot-item {
background-color: #fff;
}
}
}
.uploadLoading {
position: absolute;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.6);
z-index: 5;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
.uploadLoadingText {
text-align: center;
color: #fff;
font-size: 18px;
position: relative;
z-index: 6;
font-weight: 700;
margin-top: 10px;
}
}
\ No newline at end of file
src/models/coursegatherdetail.js
View file @
1c27a803
This diff is collapsed.
Click to expand it.
src/models/onlineclasses.js
View file @
1c27a803
...
...
@@ -934,6 +934,21 @@ export default {
},
});
}
else
{
yield
put
({
type
:
'uploadcourseware/updateState'
,
payload
:
{
saveStatus
:
{
status
:
0
,
// 1 转换中 2 保存中
text
:
''
,
},
},
});
yield
put
({
type
:
'updateState'
,
payload
:
{
coursewareSubmitting
:
false
,
},
});
yield
put
({
type
:
'webapp/errorrequestresolve'
,
payload
:
{
...
...
@@ -982,17 +997,41 @@ export default {
},
});
}
else
{
yield
put
({
type
:
'uploadcourseware/updateState'
,
payload
:
{
saveStatus
:
{
status
:
0
,
// 1 转换中 2 保存中
text
:
''
,
},
},
});
yield
put
({
type
:
'webapp/errorrequestresolve'
,
payload
:
{
data
:
transformData
,
},
});
yield
put
({
type
:
'updateState'
,
payload
:
{
coursewareSubmitting
:
false
,
},
});
}
},
*
uploadCourseware
({
payload
},
{
call
,
put
,
select
})
{
const
{
info
}
=
payload
;
const
{
addCourseObj
,
coursewareSubmitting
}
=
yield
select
(
state
=>
state
.
onlineclasses
);
if
(
coursewareSubmitting
)
{
return
;
}
yield
put
({
type
:
'updateState'
,
payload
:
{
coursewareSubmitting
:
true
,
},
});
const
{
from
}
=
info
;
if
(
from
==
'upload'
)
{
// 课件上传得到需要转码
if
(
info
.
type
==
4
)
{
// 其他文件需要转码
...
...
@@ -1002,6 +1041,15 @@ export default {
info
,
},
});
yield
put
({
type
:
'uploadcourseware/updateState'
,
payload
:
{
saveStatus
:
{
status
:
1
,
// 1 转换中 2 保存中
text
:
'文件解析中,请稍等...'
,
},
},
});
}
else
{
yield
put
({
type
:
'saveCourseWare'
,
...
...
@@ -1032,6 +1080,12 @@ export default {
},
});
}
else
{
// 打开弹窗没操作 直接关闭弹窗
yield
put
({
type
:
'updateState'
,
payload
:
{
coursewareSubmitting
:
false
,
},
});
yield
put
({
type
:
'uploadcourseware/updateState'
,
payload
:
{
...
...
@@ -1044,19 +1098,28 @@ export default {
*
saveCourseWare
({
payload
},
{
call
,
put
,
select
})
{
const
{
info
}
=
payload
;
const
{
addCourseObj
,
coursewareSubmitting
}
=
yield
select
(
state
=>
state
.
onlineclasses
);
if
(
coursewareSubmitting
)
{
return
;
// if (coursewareSubmitting) {
// return;
// }
// yield put({
// type: 'updateState',
// payload: {
// coursewareSubmitting: true,
// },
// });
if
(
info
.
from
)
{
delete
info
.
from
;
}
yield
put
({
type
:
'updateState'
,
type
:
'up
loadcourseware/up
dateState'
,
payload
:
{
coursewareSubmitting
:
true
,
saveStatus
:
{
status
:
2
,
// 1 转换中 2 保存中
text
:
'保存中...'
,
},
},
});
if
(
info
.
from
)
{
delete
info
.
from
;
}
const
loadmessage
=
message
.
loading
(
'保存中...'
,
0
);
// const loadmessage = message.loading('保存中...', 0);
const
data
=
yield
call
(
courseMateriaAjax
.
uploadCourseware
,
{
content
:
JSON
.
stringify
(
info
),
id
:
addCourseObj
.
id
,
...
...
@@ -1067,7 +1130,7 @@ export default {
coursewareSubmitting
:
false
,
},
});
setTimeout
(
loadmessage
);
console
.
log
(
1111111111111
);
if
(
data
.
code
==
200
)
{
yield
put
({
type
:
'uploadcourseware/updateState'
,
...
...
@@ -1076,6 +1139,15 @@ export default {
info
:
{},
},
});
yield
put
({
type
:
'uploadcourseware/updateState'
,
payload
:
{
saveStatus
:
{
status
:
0
,
// 1 转换中 2 保存中
text
:
''
,
},
},
});
yield
put
({
type
:
'updateState'
,
payload
:
{
...
...
@@ -1098,7 +1170,17 @@ export default {
params
:
{},
},
});
message
.
success
(
'课件保存成功...'
,
1
);
}
else
{
yield
put
({
type
:
'uploadcourseware/updateState'
,
payload
:
{
saveStatus
:
{
status
:
0
,
// 1 转换中 2 保存中
text
:
''
,
},
},
});
yield
put
({
type
:
'webapp/errorrequestresolve'
,
payload
:
{
...
...
src/models/uploadcourseware.js
View file @
1c27a803
...
...
@@ -20,6 +20,10 @@ export default {
state
:
{
visible
:
false
,
info
:
{},
saveStatus
:
{
status
:
0
,
// 1 转换中 2 保存中
text
:
''
,
},
},
subscriptions
:
{
setup
({
dispatch
,
history
})
{
// eslint-disable-line
...
...
@@ -72,7 +76,7 @@ export default {
return
;
}
let
signature
=
{};
const
uploaderLoading
=
message
.
loading
(
'
课
件上传中...'
);
const
uploaderLoading
=
message
.
loading
(
'
文
件上传中...'
);
const
uploadSignature
=
yield
call
(
ajax
,
params
);
signature
=
uploadSignature
.
data
;
if
(
uploadSignature
.
code
==
200
)
{
...
...
src/pages/coursegather/detail/CourseBox.js
View file @
1c27a803
...
...
@@ -124,13 +124,13 @@ class CourseBoxForm extends React.Component {
<
List
size
=
"large"
grid
=
{{
gutter
:
2
0
,
gutter
:
1
0
,
xs
:
1
,
sm
:
1
,
md
:
1
,
lg
:
2
,
xl
:
2
,
xxl
:
3
,
xl
:
3
,
xxl
:
4
,
}}
dataSource
=
{
list
}
footer
=
{
...
...
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