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
6e488f43
Commit
6e488f43
authored
Sep 29, 2019
by
wangxuelai
Browse files
Options
Browse Files
Download
Plain Diff
''
parents
79fac089
9245ea48
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
2340 additions
and
660 deletions
+2340
-660
subjectUp.png
image/subjectUp.png
+0
-0
index.html
index.html
+25
-2
api.js
src/common/api.js
+5
-0
menuconfig.js
src/common/menuconfig.js
+1
-1
createtheme.js
src/models/createtheme.js
+710
-49
indexstaic.js
src/models/indexstaic.js
+0
-19
thememgt.js
src/models/thememgt.js
+31
-0
webapp.js
src/models/webapp.js
+168
-0
index.js
src/pages/index/index.js
+3
-3
ThemeEditor.js
src/pages/newtheme/ThemeEditor.js
+57
-23
ThemeEditor.less
src/pages/newtheme/ThemeEditor.less
+109
-39
index.js
src/pages/newtheme/calendarclock/index.js
+53
-26
index.less
src/pages/newtheme/calendarclock/index.less
+1
-1
ContentSetting.js
src/pages/newtheme/emigratedclock/ContentSetting.js
+416
-0
ContentSetting.less
src/pages/newtheme/emigratedclock/ContentSetting.less
+128
-0
Unclock.js
src/pages/newtheme/emigratedclock/Unclock.js
+272
-0
Unclock.less
src/pages/newtheme/emigratedclock/Unclock.less
+88
-0
index.js
src/pages/newtheme/emigratedclock/index.js
+37
-429
index.less
src/pages/newtheme/emigratedclock/index.less
+4
-0
index.js
src/pages/newtheme/index.js
+44
-42
index.less
src/pages/newtheme/index.less
+5
-2
index.js
src/pages/newtheme/jobclock/index.js
+51
-22
index.less
src/pages/newtheme/jobclock/index.less
+1
-1
index.js
src/pages/thememgt/index.js
+64
-1
router.js
src/router.js
+14
-0
createtheme.js
src/services/createtheme.js
+52
-0
index.js
src/utils/index.js
+1
-0
No files found.
image/subjectUp.png
0 → 100644
View file @
6e488f43
221 Bytes
index.html
View file @
6e488f43
<!DOCTYPE html>
<html
lang=
"en"
><head><meta
charset=
"UTF-8"
><title>
轻校
</title><link
rel=
"shortcut icon"
href=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/image/qxlogo4.png"
><meta
content=
"width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0;"
name=
"viewport"
><meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<!-- Polyfills --><!--[if lt IE 10]>
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
轻校
</title>
<link
rel=
"shortcut icon"
href=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/image/qxlogo4.png"
>
<meta
content=
"width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0;"
name=
"viewport"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<!-- Polyfills --><!--[if lt IE 10]>
<script src="js/console-polyfill.js"></script>
<![endif]-->
<script
charset=
"utf-8"
src=
"https://map.qq.com/api/js?v=2.exp&key=XSZBZ-5LHCV-5I2P7-UQHPW-6456F-JBB3B"
></script><link
href=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/index.css?1569633785496"
rel=
"stylesheet"
><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/lib/vendor.dll.js?3"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/console-polyfill.js?3"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es6-shim.min.js?3"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-shim.js?3"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-sham.min.js?3"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/json3.min.js?3"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/html5shiv.min.js?3"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/polyfill.js?3"
charset=
"utf-8"
></script></head><body><div
id=
"root"
></div><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/index.js?1569633785496"
charset=
"utf-8"
></script></body></html>
\ No newline at end of file
<![endif]-->
<script
charset=
"utf-8"
src=
"https://map.qq.com/api/js?v=2.exp&key=XSZBZ-5LHCV-5I2P7-UQHPW-6456F-JBB3B"
></script>
<link
href=
"/dist/index.css?1569724894288"
rel=
"stylesheet"
>
<script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/lib/vendor.dll.js?3"
charset=
"utf-8"
></script>
<script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/console-polyfill.js?3"
charset=
"utf-8"
></script>
<script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es6-shim.min.js?3"
charset=
"utf-8"
></script>
<script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-shim.js?3"
charset=
"utf-8"
></script>
<script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-sham.min.js?3"
charset=
"utf-8"
></script>
<script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/json3.min.js?3"
charset=
"utf-8"
></script>
<script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/html5shiv.min.js?3"
charset=
"utf-8"
></script>
<script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/polyfill.js?3"
charset=
"utf-8"
></script>
</head>
<body>
<div
id=
"root"
></div>
<script
src=
"/dist/index.js?1569724894288"
charset=
"utf-8"
></script>
</body>
</html>
src/common/api.js
View file @
6e488f43
...
...
@@ -160,6 +160,11 @@ export default {
},
createtheme
:
{
addTheme
:
`
${
dakaapi
}
member/subject`
,
unlock_subject
:
`
${
dakaapi
}
member/unlock_subject/store`
,
find_subject_detail
:
`
${
dakaapi
}
member/unlock_subject/show`
,
unlockSubjectRelease
:
`
${
dakaapi
}
member/unlock_subject/release`
,
deleteTheme
:
`
${
dakaapi
}
member/subjects`
,
delete_unlock_subject
:
`
${
dakaapi
}
member/unlock_subject`
,
},
};
src/common/menuconfig.js
View file @
6e488f43
...
...
@@ -37,7 +37,7 @@ export default {
activeurl
:
`
${
__IMGCDN__
}
menu/classactive.png`
,
notactiveurl
:
`
${
__IMGCDN__
}
menu/class.png`
,
path
:
'/sjd/classmgt'
,
relativePath
:
[
'/sjd/classmgt'
,
'/sjd/classdetail/:classid'
],
relativePath
:
[
'/sjd/classmgt'
,
'/sjd/classdetail/:classid'
,
'/sjd/newtheme/jobclock/:id'
,
'/sjd/newtheme/calendarclock/:id'
,
'/sjd/newtheme/jobclock/:id/:isCopy'
,
'/sjd/newtheme/calendarclock/:id/:isCopy'
,
'/sjd/thememgt/:classid'
],
},
{
id
:
'4'
,
...
...
src/models/createtheme.js
View file @
6e488f43
This diff is collapsed.
Click to expand it.
src/models/indexstaic.js
View file @
6e488f43
...
...
@@ -578,25 +578,6 @@ export default {
// message.error(clockCharts.msg, 1);
}
},
*
goTheme
({
payload
},
{
call
,
put
,
select
})
{
const
{
index
}
=
payload
;
yield
put
({
type
:
'updateState'
,
payload
:
{
tabIndex
:
index
,
},
});
yield
put
(
routerRedux
.
push
(
'/sjd/newtheme'
));
},
*
tabChange
({
payload
},
{
call
,
put
,
select
})
{
const
{
tabIndex
}
=
payload
;
yield
put
({
type
:
'updateState'
,
payload
:
{
tabIndex
,
},
});
},
*
pageInit
({
payload
},
{
call
,
put
,
select
})
{
yield
put
({
type
:
'updateState'
,
...
...
src/models/thememgt.js
View file @
6e488f43
...
...
@@ -4,6 +4,7 @@ import { message } from 'antd';
import
{
delay
}
from
'redux-saga'
;
import
*
as
thememgtajax
from
'../services/thememgt'
;
import
errorcode
from
'../common/errorcode'
;
import
*
as
themeAjax
from
'../services/createtheme'
;
export
default
{
namespace
:
'thememgt'
,
state
:
{
...
...
@@ -181,6 +182,36 @@ export default {
},
});
},
*
deleteTheme
({
payload
},
{
call
,
put
,
select
})
{
const
{
id
,
record
}
=
payload
;
const
{
sid
}
=
yield
select
(
state
=>
state
.
webapp
);
const
postFunction
=
record
.
subject_type
==
3
?
themeAjax
.
deleteSubject
:
themeAjax
.
deleteTheme
;
const
goodsdelete
=
yield
call
(
postFunction
,
{
id
,
school_id
:
sid
,
});
if
(
goodsdelete
.
code
==
200
)
{
yield
put
({
type
:
'webapp/updateState'
,
});
yield
put
({
type
:
'querythemelist'
,
payload
:
{
params
:
{
page
:
1
,
},
},
});
message
.
success
(
'删除成功'
,
1
);
}
else
{
yield
put
({
type
:
'webapp/errorrequestresolve'
,
payload
:
{
data
:
goodsdelete
,
},
});
}
},
*
pageInit
({
payload
},
{
call
,
put
,
select
})
{
yield
put
({
type
:
'updateState'
,
...
...
src/models/webapp.js
View file @
6e488f43
...
...
@@ -485,6 +485,174 @@ export default {
},
});
}
const
jobClockActive
=
pathToRegexp
(
'/sjd/newtheme/jobclock/:id'
).
exec
(
pathname
);
if
(
jobClockActive
)
{
dispatch
({
type
:
'createtheme/createThemeModalFind'
,
payload
:
{
id
:
jobClockActive
[
1
],
},
});
dispatch
({
type
:
'createtheme/queryClassList'
,
payload
:
{
},
});
dispatch
({
type
:
'createtheme/pageInit'
,
payload
:
{
},
});
dispatch
({
type
:
'webapp/updateState'
,
payload
:
{
breadcrumbList
:
[
{
path
:
'sjd/classmgt'
,
name
:
'班级管理'
,
},
{
path
:
pathname
,
name
:
'主题管理'
,
},
{
path
:
pathname
,
name
:
'编辑作业打卡'
,
},
],
},
});
}
const
jobClockCopyActive
=
pathToRegexp
(
'/sjd/newtheme/jobclock/:id/:isCopy'
).
exec
(
pathname
);
if
(
jobClockCopyActive
)
{
dispatch
({
type
:
'createtheme/pageInit'
,
payload
:
{
},
});
dispatch
({
type
:
'createtheme/createThemeModalFind'
,
payload
:
{
id
:
jobClockCopyActive
[
1
],
isCopy
:
jobClockCopyActive
[
2
],
},
});
dispatch
({
type
:
'createtheme/queryClassList'
,
payload
:
{
},
});
dispatch
({
type
:
'webapp/updateState'
,
payload
:
{
breadcrumbList
:
[
{
path
:
'sjd/classmgt'
,
name
:
'班级管理'
,
},
{
path
:
pathname
,
name
:
'主题管理'
,
},
{
path
:
pathname
,
name
:
'复制作业打卡'
,
},
],
},
});
}
const
CalendarClockActive
=
pathToRegexp
(
'/sjd/newtheme/calendarclock/:id'
).
exec
(
pathname
);
if
(
CalendarClockActive
)
{
dispatch
({
type
:
'createtheme/pageInit'
,
payload
:
{
},
});
dispatch
({
type
:
'createtheme/createThemeModalFind'
,
payload
:
{
id
:
CalendarClockActive
[
1
],
},
});
dispatch
({
type
:
'createtheme/calculatecalendar'
,
payload
:
{
currentTimestamp
:
moment
().
month
(
moment
().
month
()).
startOf
(
'month'
).
valueOf
(),
judgetodaycurrentTimestamp
:
moment
().
valueOf
(),
},
});
dispatch
({
type
:
'createtheme/queryClassList'
,
payload
:
{
},
});
dispatch
({
type
:
'webapp/updateState'
,
payload
:
{
breadcrumbList
:
[
{
path
:
'sjd/classmgt'
,
name
:
'班级管理'
,
},
{
path
:
pathname
,
name
:
'主题管理'
,
},
{
path
:
pathname
,
name
:
'编辑日历打卡'
,
},
],
},
});
}
const
CalendarClockCopyActive
=
pathToRegexp
(
'/sjd/newtheme/calendarclock/:id/:isCopy'
).
exec
(
pathname
);
if
(
CalendarClockCopyActive
)
{
dispatch
({
type
:
'createtheme/pageInit'
,
payload
:
{
},
});
dispatch
({
type
:
'createtheme/createThemeModalFind'
,
payload
:
{
id
:
CalendarClockCopyActive
[
1
],
isCopy
:
CalendarClockCopyActive
[
2
],
},
});
dispatch
({
type
:
'createtheme/calculatecalendar'
,
payload
:
{
currentTimestamp
:
moment
().
month
(
moment
().
month
()).
startOf
(
'month'
).
valueOf
(),
judgetodaycurrentTimestamp
:
moment
().
valueOf
(),
},
});
dispatch
({
type
:
'createtheme/queryClassList'
,
payload
:
{
},
});
dispatch
({
type
:
'webapp/updateState'
,
payload
:
{
breadcrumbList
:
[
{
path
:
'sjd/classmgt'
,
name
:
'班级管理'
,
},
{
path
:
pathname
,
name
:
'主题管理'
,
},
{
path
:
pathname
,
name
:
'复制作业打卡'
,
},
],
},
});
}
const
clockmgtactive
=
pathToRegexp
(
'/sjd/clockmgt/:themetype/:classid/:themeid'
).
exec
(
pathname
);
if
(
clockmgtactive
)
{
dispatch
({
...
...
src/pages/index/index.js
View file @
6e488f43
...
...
@@ -59,7 +59,7 @@ class StaticCenter extends React.Component {
createTheme
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'
indexstaic
/goTheme'
,
type
:
'
createtheme
/goTheme'
,
payload
:
{
index
:
1
,
},
...
...
@@ -68,7 +68,7 @@ class StaticCenter extends React.Component {
createCalendarTheme
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'
indexstaic
/goTheme'
,
type
:
'
createtheme
/goTheme'
,
payload
:
{
index
:
2
,
},
...
...
@@ -597,7 +597,7 @@ function mapStateToProps(state) {
scheduleCount
,
}
=
state
.
indexstaic
;
// eslint-disable-next-line no-empty-pattern
const
{}
=
state
.
c
lassmgt
;
const
{}
=
state
.
c
reatetheme
;
return
{
staticcenter
,
clockCharts
,
...
...
src/pages/newtheme/ThemeEditor.js
View file @
6e488f43
...
...
@@ -3,6 +3,7 @@ import React from 'react';
import
{
Icon
,
Divider
,
Tabs
,
Select
,
Form
,
Upload
,
Row
,
Col
,
Input
,
Radio
,
Modal
,
message
}
from
'antd'
;
import
pageStyle
from
'./ThemeEditor.less'
;
import
{
pageIn
,
hasBtnPower
,
imagify
,
ossVideofy
}
from
'../../utils/index'
;
import
upImg
from
'../../../image/subjectUp.png'
;
const
{
TabPane
}
=
Tabs
;
const
{
TextArea
}
=
Input
;
class
ThemeEditor
extends
React
.
Component
{
...
...
@@ -41,35 +42,68 @@ class ThemeEditor extends React.Component {
deleteThemeImg
,
deleteThemeVideo
,
editorText
,
editorAddText
,
moveContent
,
}
=
this
.
props
;
return
(
<
div
className
=
{
pageStyle
.
container
}
>
<
TextArea
value
=
{
editorText
}
onChange
=
{
e
=>
editorChange
(
e
)}
placeholder
=
"请输入内容"
style
=
{{
width
:
560
}}
maxLength
=
{
500
}
rows
=
{
6
}
/
>
<
div
className
=
{
pageStyle
.
editorwrap
}
>
<
div
className
=
{
pageStyle
.
uploadimgbox
}
>
{
commentParams
.
content
.
map
((
item
,
index
)
=>
(
item
.
type
===
'img'
&&
<
div
className
=
{
pageStyle
.
imgwrap
}
>
<
img
alt
=
{
item
.
type
}
className
=
{
pageStyle
.
teacheruploadimg
}
src
=
{
imagify
(
item
.
value
)}
/
>
<
div
className
=
{
pageStyle
.
imghide
}
>
<
a
title
=
"预览文件"
onClick
=
{()
=>
this
.
priviewImg
(
item
.
value
)}
href
=
"javascript:;"
><
Icon
style
=
{{
color
:
'#fff'
}}
type
=
"eye"
/>
预览
<
/a
>
<
Divider
type
=
"vertical"
/>
<
a
title
=
"删除文件"
onClick
=
{()
=>
deleteThemeImg
(
index
)}
href
=
"javascript:;"
>
<
Icon
style
=
{{
color
:
'#fff'
}}
type
=
"delete"
/>
删除
<
/a
>
<
/div
>
<
/div
>
))}
{
commentParams
.
content
.
map
((
item
,
index
)
=>
(
item
.
type
===
'video'
&&
<
div
className
=
{
pageStyle
.
videowrap
}
>
<
video
controls
=
"controls"
className
=
{
pageStyle
.
videoPoster
}
src
=
{
ossVideofy
(
item
.
value
)}
/
>
<
div
className
=
{
pageStyle
.
videohide
}
>
<
a
title
=
"删除文件"
onClick
=
{()
=>
deleteThemeImg
(
index
)}
href
=
"javascript:;"
>
<
Icon
style
=
{{
color
:
'#fff'
}}
type
=
"delete"
/>
删除
<
/a
>
<
/div
>
<
/div
>
))}
<
/div
>
{
/* eslint-disable-next-line array-callback-return,consistent-return */
}
{
commentParams
.
content
.
map
((
item
,
index
)
=>
{
// eslint-disable-next-line default-case
switch
(
item
.
type
)
{
case
'text'
:
return
(
<
div
className
=
{
pageStyle
.
textWrap
}
>
<
TextArea
autosize
=
{{
minRows
:
4
,
maxRows
:
10
}}
value
=
{
item
.
value
}
onChange
=
{
e
=>
editorChange
(
e
,
index
)}
placeholder
=
"请输入内容"
style
=
{{
width
:
560
}}
maxLength
=
{
500
}
/
>
<
div
className
=
{
pageStyle
.
sizeNumber
}
>
{
item
.
value
.
length
}
/500</
div
>
<
div
className
=
{
pageStyle
.
toolList
}
>
{
index
===
0
&&
<
div
aria
-
disabled
=
"true"
className
=
{
pageStyle
.
noup
}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
{
index
>
0
&&
<
div
className
=
{
pageStyle
.
up
}
onClick
=
{()
=>
moveContent
(
index
,
'up'
)}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
{
index
===
(
commentParams
.
content
.
length
-
1
)
&&
<
div
className
=
{
pageStyle
.
nodown
}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
{
index
<
(
commentParams
.
content
.
length
-
1
)
&&
<
div
className
=
{
pageStyle
.
down
}
onClick
=
{()
=>
moveContent
(
index
,
'down'
)}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
<
div
className
=
{
pageStyle
.
delete
}
onClick
=
{()
=>
deleteThemeImg
(
index
)}
><
Icon
type
=
"delete"
theme
=
"filled"
/><
/div
>
<
/div
>
<
/div
>
);
case
'img'
:
return
(
<
div
className
=
{
pageStyle
.
uploadimgbox
}
>
<
div
className
=
{
pageStyle
.
imgwrap
}
>
<
div
className
=
{
pageStyle
.
uploadimgwrap
}
>
<
img
alt
=
{
item
.
type
}
className
=
{
pageStyle
.
teacheruploadimg
}
src
=
{
imagify
(
item
.
value
)}
/></
div
>
<
div
className
=
{
pageStyle
.
imghide
}
>
<
a
title
=
"预览文件"
onClick
=
{()
=>
this
.
priviewImg
(
item
.
value
)}
href
=
"javascript:;"
><
Icon
style
=
{{
color
:
'#fff'
}}
type
=
"eye"
/>
预览
<
/a
>
<
/div
>
<
div
className
=
{
pageStyle
.
toolList
}
>
{
index
===
0
&&
<
div
aria
-
disabled
=
"true"
className
=
{
pageStyle
.
noup
}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
{
index
>
0
&&
<
div
className
=
{
pageStyle
.
up
}
onClick
=
{()
=>
moveContent
(
index
,
'up'
)}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
{
index
===
(
commentParams
.
content
.
length
-
1
)
&&
<
div
className
=
{
pageStyle
.
nodown
}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
{
index
<
(
commentParams
.
content
.
length
-
1
)
&&
<
div
className
=
{
pageStyle
.
down
}
onClick
=
{()
=>
moveContent
(
index
,
'down'
)}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
<
div
className
=
{
pageStyle
.
delete
}
onClick
=
{()
=>
deleteThemeImg
(
index
)}
><
Icon
type
=
"delete"
theme
=
"filled"
/><
/div
>
<
/div
>
<
/div
>
<
/div
>
);
case
'video'
:
return
(
<
div
className
=
{
pageStyle
.
videowrap
}
>
<
video
controls
=
"controls"
className
=
{
pageStyle
.
videoPoster
}
src
=
{
ossVideofy
(
item
.
value
)}
/
>
<
div
className
=
{
pageStyle
.
toolList
}
>
{
index
===
0
&&
<
div
aria
-
disabled
=
"true"
className
=
{
pageStyle
.
noup
}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
{
index
>
0
&&
<
div
className
=
{
pageStyle
.
up
}
onClick
=
{()
=>
moveContent
(
index
,
'up'
)}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
{
index
===
(
commentParams
.
content
.
length
-
1
)
&&
<
div
className
=
{
pageStyle
.
nodown
}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
{
index
<
(
commentParams
.
content
.
length
-
1
)
&&
<
div
className
=
{
pageStyle
.
down
}
onClick
=
{()
=>
moveContent
(
index
,
'down'
)}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
<
div
className
=
{
pageStyle
.
delete
}
onClick
=
{()
=>
deleteThemeImg
(
index
)}
><
Icon
type
=
"delete"
theme
=
"filled"
/><
/div
>
<
/div
>
<
/div
>
);
}
},
)}
<
/div
>
<
div
className
=
{
pageStyle
.
uploadflex
}
>
<
div
className
=
{
pageStyle
.
uploadimg
}
onClick
=
{
editorAddText
}
><
Icon
style
=
{{
marginRight
:
10
}}
type
=
"font-size"
/>
添加文字
<
/div
>
<
div
className
=
{
pageStyle
.
uploadimg
}
><
input
type
=
"file"
id
=
"uploadImg"
className
=
{
pageStyle
.
fileuploadinput
}
onChange
=
{
editorUploadImg
}
accept
=
"image/*"
/><
Icon
style
=
{{
marginRight
:
10
}}
type
=
"picture"
/>
添加图片
<
/div
>
<
div
className
=
{
pageStyle
.
uploadimg
}
><
input
type
=
"file"
id
=
"uploadVideo"
className
=
{
pageStyle
.
fileuploadinput
}
onChange
=
{
editorUploadAudio
}
accept
=
"video/*"
/><
Icon
style
=
{{
marginRight
:
10
}}
type
=
"video-camera"
/>
添加视频
<
/div
>
<
/div
>
...
...
src/pages/newtheme/ThemeEditor.less
View file @
6e488f43
.textWrap {
width: 560px;
height: auto;
position: relative;
margin-bottom:10px;
:global {
.ant-input {
padding: 6px 15px 20px;
}
}
.sizeNumber {
position: absolute;
bottom: 8px;
right: 10px;
}
}
.editorwrap {
width: 563px;
margin-top: 15px;
.videowrap {
width: 100%;
height: 120px;
position: relative;
margin-bottom: 10px;
.videoPoster {
width: 100%;
height: 100%;
}
}
.videowrap:hover {
cursor: pointer;
.videohide {
opacity: 1;
background-color: rgba(0,0,0,0.5);
transition: all .3s;
z-index: 1;
color: #fff;
}
}
.videohide {
position: absolute;
width: 100%;
height: 100%;
bottom: 0;
left: 0;
display: flex;
justify-content: center;
align-items: center;
opacity: 0;
color: #fff;
z-index: -1;
a {
color: #fff;
}
}
.uploadimgbox {
display: flex;
align-items: flex-end;
margin-bottom: 18px;
flex-wrap: wrap;
.imgwrap {
width: 1
35px
;
height: 1
35
px;
width: 1
00%
;
height: 1
20
px;
border-radius: 4px;
margin-right: 6px;
position: relative;
.uploadimgwrap {
width: 100%;
height: 120px;
overflow: hidden;
}
}
.imgwrap:hover {
cursor: pointer;
...
...
@@ -40,48 +98,12 @@
}
}
.teacheruploadimg {
width: 100%;
height: 100%;
object-fit: contain;
border-radius: 4px;
}
.teacheruploadimg:nth-child(4n){
margin-right: 0;
}
.videowrap {
width: 150px;
height: 150px;
position: relative;
.videoPoster {
width: 100%;
height: 100%;
}
}
.videowrap:hover {
cursor: pointer;
.videohide {
opacity: 1;
background-color: rgba(0,0,0,0.5);
transition: all .3s;
z-index: 1;
color: #fff;
}
}
.videohide {
position: absolute;
width: 100%;
height: 100%;
bottom: 0;
left: 0;
display: flex;
justify-content: center;
align-items: center;
opacity: 0;
color: #fff;
z-index: -1;
a {
color: #fff;
}
}
}
}
...
...
@@ -111,3 +133,51 @@
}
}
}
.toolList {
position: absolute;
right: -30px;
top: 0;
width: 30px;
height: 90px;
display: flex;
flex-direction: column;
background-color: #D3D3D3;
opacity: 0;
border-radius: 2px;
z-index: -1;
div {
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-size: 14px;
cursor: pointer;
}
div>img {
width: 14px;
height: 14px;
}
.up:hover {
background-color: #1890FF;
}
.down,.nodown {
transform: rotate(180deg);
}
.nodown,.noup {
cursor: not-allowed;
}
.down:hover {
background-color: #1890FF;
}
.delete:hover {
background-color: #FF6060;
}
}
.textWrap:hover,.imgwrap:hover,.videowrap:hover {
.toolList {
opacity: 1;
z-index: 1;
}
}
src/pages/newtheme/calendarclock/index.js
View file @
6e488f43
This diff is collapsed.
Click to expand it.
src/pages/newtheme/calendarclock/index.less
View file @
6e488f43
.container {
background-color: #fff;
padding:
0
20px;
padding: 20px;
position: relative;
}
.title {
...
...
src/pages/newtheme/emigratedclock/ContentSetting.js
0 → 100644
View file @
6e488f43
This diff is collapsed.
Click to expand it.
src/pages/newtheme/emigratedclock/ContentSetting.less
0 → 100644
View file @
6e488f43
.container {
background-color: #fff;
padding: 0 20px;
position: relative;
margin-top: 40px;
}
.title {
font-size:16px;
font-family:PingFangSC;
font-weight:600;
color:rgba(0,0,0,0.85);
line-height:24px;
position: relative;
padding-bottom: 30px;
.pack {
font-size:14px;
font-family:PingFangSC;
font-weight:400;
color:rgba(24,144,255,1);
line-height:20px;
display: inline-block;
margin-left: 36px;
cursor: pointer;
}
}
.title:after {
position: absolute;
content: '';
display: block;
width: 3px;
height: 19px;
background-color: #1890FF;
left: -10px;
top: 4px;
border-radius:2px;
}
.commonwrap {
display: flex;
align-items: flex-start;
:global {
.ant-form-item-label > label::after {
content: '';
}
}
.commonleft {
width: 105px;
font-size:14px;
font-family:PingFangSC;
font-weight:400;
color:rgba(0,0,0,0.85);
line-height:40px;
}
.commonright {
width: 80%;
:global {
.ant-form-text1 {
font-size:12px;
font-family:PingFangSC;
font-weight:400;
color:rgba(0,0,0,0.55);
line-height:22px;
display: inline-block;
margin-left: 10px;
}
.ant-form-item .ant-switch {
margin-left: -12px;
}
}
}
}
.panpelBox {
display: block;
transition: all .3s;
}
.panpelhideBox {
display: none;
}
.pushlocation {
:global {
.ant-form-item {
.ant-form-item-children {
display: flex;
align-items: center;
}
}
}
}
.stepsContent {
width: 400px;
margin-left: 140px;
}
.customs {
display: flex;
align-items: center;
:global {
.ant-tabs {
height: 60px !important;
width: 410px;
.ant-tabs-bar {
border-bottom: transparent;
}
.ant-tabs-nav .ant-tabs-tab {
width: 40px;
height: 40px;
border-radius: 50%;
text-align: center;
line-height: 40px;
border:1px solid rgba(217,217,217,1);
padding: 0;
margin: 0 10px 0 0;
}
.ant-tabs-nav .ant-tabs-tab-active {
width: 40px;
height: 40px;
border-radius: 50%;
text-align: center;
line-height: 40px;
background-color: #1890FF;
color: #fff;
border: none;
}
.ant-tabs-nav-scroll {
padding-right: 0;
border-right: none;
}
}
}
}
src/pages/newtheme/emigratedclock/Unclock.js
0 → 100644
View file @
6e488f43
import
{
connect
}
from
'dva'
;
import
React
from
'react'
;
import
{
Form
,
Icon
,
Button
,
Tabs
,
Modal
,
Row
,
Col
,
Steps
,
Divider
,
Switch
,
TimePicker
,
Collapse
,
DatePicker
,
Select
,
Radio
,
InputNumber
,
Input
,
message
,
}
from
'antd'
;
import
pageStyle
from
'./Unclock.less'
;
import
{
hasBtnPower
,
imagify
}
from
'../../../utils'
;
import
ThemeEditor
from
'../ThemeEditor'
;
const
{
TabPane
}
=
Tabs
;
const
FormItem
=
Form
.
Item
;
const
{
Option
}
=
Select
;
const
{
TextArea
}
=
Input
;
const
{
RangePicker
}
=
DatePicker
;
class
UnClockForm
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
isShow
:
true
,
title
:
''
,
current
:
0
,
};
}
componentDidUpdate
()
{
}
componentWillUnmount
()
{
// 卸载
}
handleSubmit
=
(
e
)
=>
{
const
{
dispatch
,
form
,
handleScoreCancel
}
=
this
.
props
;
e
.
preventDefault
();
this
.
props
.
form
.
validateFields
((
err
,
values
)
=>
{
if
(
!
err
)
{
const
{
title
,
push_status
,
push_time
,
class_id
,
password
,
join_rule_type
,
subject_count
,
unlock_limit
,
}
=
values
;
dispatch
({
type
:
'createtheme/createThemeModalAddEmigrated'
,
payload
:
{
title
,
push_status
,
push_time
:
push_status
==
1
?
push_time
.
format
(
'HH:mm'
)
:
'18:00'
,
class_id
,
unlock_rule_type
:
1
,
password
,
join_rule_type
,
clock_start_time
:
'00:00'
,
clock_end_time
:
'23:59'
,
max_clock_count
:
1
,
subject_count
,
unlock_limit
,
callBack
:
()
=>
{
form
.
resetFields
();
this
.
setState
({
title
:
''
,
});
},
},
});
}
});
}
titleChange
=
(
e
)
=>
{
this
.
setState
({
title
:
e
.
target
.
value
,
});
}
render
()
{
const
{
isShow
,
title
,
current
}
=
this
.
state
;
const
{
form
:
{
getFieldDecorator
,
getFieldValue
},
unClockLoading
,
classList
,
}
=
this
.
props
;
const
formItemModalLineLayout
=
{
labelCol
:
{
xs
:
{
span
:
3
},
md
:
{
span
:
3
},
},
wrapperCol
:
{
xs
:
{
span
:
21
},
md
:
{
span
:
21
},
},
};
const
formItemverticalLayout
=
{
labelCol
:
{
xs
:
{
span
:
5
},
sm
:
{
span
:
5
},
},
wrapperCol
:
{
xs
:
{
span
:
19
},
sm
:
{
span
:
19
},
},
};
const
formItemModaltypeLayout
=
{
labelCol
:
{
xs
:
{
span
:
3
},
sm
:
{
span
:
3
},
},
wrapperCol
:
{
xs
:
{
span
:
21
},
sm
:
{
span
:
21
},
},
};
const
submitFormLayout
=
{
wrapperCol
:
{
xs
:
{
span
:
24
,
offset
:
0
},
sm
:
{
span
:
10
,
offset
:
7
},
},
};
const
selectBefore
=
(
<
div
>
{
title
.
length
||
0
}
/20</
div
>
);
return
(
<
div
className
=
{
pageStyle
.
container
}
>
<
div
className
=
{
pageStyle
.
title
}
>
闯关打卡基本设置
<
/div
>
<
Form
labelAlign
=
"left"
onSubmit
=
{
this
.
handleSubmit
}
>
<
FormItem
{...
formItemModalLineLayout
}
label
=
"闯关标题"
>
{
getFieldDecorator
(
'title'
,
{
rules
:
[
{
required
:
true
,
message
:
'请输入标题'
,
},
],
})(
<
Input
maxLength
=
{
20
}
onChange
=
{
e
=>
this
.
titleChange
(
e
)}
addonAfter
=
{
selectBefore
}
placeholder
=
"请输入标题"
style
=
{{
width
:
435
}}
/>
,
)}
<
/FormItem
>
<
FormItem
{...
formItemModalLineLayout
}
label
=
"选择班级"
>
{
getFieldDecorator
(
'class_id'
,
{
rules
:
[
{
required
:
true
,
message
:
'请选择班级'
,
},
],
})(
<
Select
placeholder
=
"请选择班级"
style
=
{{
width
:
174
}}
showSearch
onChange
=
{
this
.
handleStudentChange
}
>
{
classList
.
map
(
ele
=>
<
Option
value
=
{
ele
.
id
}
>
{
ele
.
title
}
<
/Option>
)
}
<
/Select>
,
)}
<
/FormItem
>
<
FormItem
{...
formItemModalLineLayout
}
label
=
"关卡时长设置"
>
<
span
className
=
"ant-form-text"
>
共
&
nbsp
;
&
nbsp
;
&
nbsp
;
&
nbsp
;
&
nbsp
;
&
nbsp
;
&
nbsp
;
&
nbsp
;
&
nbsp
;
&
nbsp
;
&
nbsp
;
<
/span
>
{
getFieldDecorator
(
'subject_count'
,
{
initialValue
:
1
,
rules
:
[
{
required
:
true
,
message
:
'请输入关卡时长设置'
,
},
],
})(
<
InputNumber
max
=
{
199
}
min
=
{
0
}
style
=
{{
width
:
100
}}
/>
,
)}
<
span
className
=
"ant-form-text"
>
关卡
<
/span
>
<
/FormItem
>
<
FormItem
{...
formItemModalLineLayout
}
label
=
"每天闯关次数"
>
<
span
className
=
"ant-form-text"
>
每天可闯
<
/span
>
{
getFieldDecorator
(
'unlock_limit'
,
{
initialValue
:
1
,
rules
:
[
{
required
:
true
,
message
:
'请输入每天闯关次数'
,
},
],
})(
<
InputNumber
min
=
{
0
}
style
=
{{
width
:
100
}}
/>
,
)}
<
span
className
=
"ant-form-text"
>
关卡
<
/span
>
<
/FormItem
>
<
FormItem
{...
formItemModalLineLayout
}
label
=
"参与规则"
>
{
getFieldDecorator
(
'join_rule_type'
,
{
initialValue
:
1
},
)(
<
Radio
.
Group
>
<
Radio
value
=
{
1
}
>
任何人加入
<
/Radio
>
<
Radio
value
=
{
2
}
>
密码加入
<
/Radio
>
<
/Radio.Group>
,
)}
<
div
style
=
{{
display
:
'inline-block'
}}
>
{
getFieldValue
(
'join_rule_type'
)
===
2
?
(
<
FormItem
style
=
{{
marginBottom
:
0
}}
>
{
getFieldDecorator
(
'password'
,
{
rules
:
[
{
required
:
true
,
message
:
'请输入6位正整数的密码'
,
pattern
:
new
RegExp
(
/^
[
1-9
]\d
*$/
,
'g'
),
},
],
})(
<
Input
maxLength
=
{
6
}
style
=
{{
width
:
100
,
marginRight
:
5
}}
placeholder
=
"请输入密码"
/>
)}
<
span
className
=
"ant-form-text"
>
(
6
位纯数字
)
<
/span
>
<
/FormItem
>
)
:
(
''
)}
<
/div
>
<
/FormItem
>
<
div
className
=
{
pageStyle
.
pushlocation
}
>
<
FormItem
{...
formItemModalLineLayout
}
label
=
"定时提醒"
>
{
getFieldDecorator
(
'push_status'
,
{
initialValue
:
2
},
)(
<
Radio
.
Group
>
<
Radio
value
=
{
2
}
>
关闭提醒
<
/Radio
>
<
Radio
value
=
{
1
}
>
开启提醒
<
/Radio
>
<
/Radio.Group>
,
)}
<
div
style
=
{{
display
:
'inline-block'
}}
>
{
getFieldValue
(
'push_status'
)
===
1
?
(
<
FormItem
style
=
{{
marginBottom
:
0
}}
>
{
getFieldDecorator
(
'push_time'
,
{
rules
:
[
{
required
:
true
,
message
:
'请选择时间'
,
},
],
})(
<
TimePicker
style
=
{{
width
:
150
}}
format
=
"HH:mm"
/>
)}
<
/FormItem
>
)
:
(
''
)}
<
/div
>
<
/FormItem
>
<
/div
>
<
Divider
/>
<
FormItem
style
=
{{
marginTop
:
32
}}
>
<
Button
type
=
"primary"
htmlType
=
"submit"
loading
=
{
unClockLoading
}
>
下一步
<
/Button
>
<
/FormItem
>
<
/Form
>
<
/div
>
);
}
}
UnClockForm
.
propTypes
=
{
};
const
UnClock
=
Form
.
create
()(
UnClockForm
);
function
mapStateToProps
(
state
)
{
const
{
unClockLoading
,
classList
,
}
=
state
.
createtheme
;
return
{
unClockLoading
,
classList
,
};
}
export
default
connect
(
mapStateToProps
)(
UnClock
);
src/pages/newtheme/emigratedclock/Unclock.less
0 → 100644
View file @
6e488f43
.container {
background-color: #fff;
padding: 0 20px;
position: relative;
margin-top: 40px;
}
.title {
font-size:16px;
font-family:PingFangSC;
font-weight:600;
color:rgba(0,0,0,0.85);
line-height:24px;
position: relative;
padding-bottom: 30px;
.pack {
font-size:14px;
font-family:PingFangSC;
font-weight:400;
color:rgba(24,144,255,1);
line-height:20px;
display: inline-block;
margin-left: 36px;
cursor: pointer;
}
}
.title:after {
position: absolute;
content: '';
display: block;
width: 3px;
height: 19px;
background-color: #1890FF;
left: -10px;
top: 4px;
border-radius:2px;
}
.commonwrap {
display: flex;
align-items: flex-start;
:global {
.ant-form-item-label > label::after {
content: '';
}
}
.commonleft {
width: 105px;
font-size:14px;
font-family:PingFangSC;
font-weight:400;
color:rgba(0,0,0,0.85);
line-height:40px;
}
.commonright {
width: 80%;
:global {
.ant-form-text1 {
font-size:12px;
font-family:PingFangSC;
font-weight:400;
color:rgba(0,0,0,0.55);
line-height:22px;
display: inline-block;
margin-left: 10px;
}
.ant-form-item .ant-switch {
margin-left: -12px;
}
}
}
}
.panpelBox {
display: block;
transition: all .3s;
}
.panpelhideBox {
display: none;
}
.pushlocation {
:global {
.ant-form-item {
.ant-form-item-children {
display: flex;
align-items: center;
}
}
}
}
src/pages/newtheme/emigratedclock/index.js
View file @
6e488f43
This diff is collapsed.
Click to expand it.
src/pages/newtheme/emigratedclock/index.less
View file @
6e488f43
...
...
@@ -84,3 +84,7 @@
}
}
}
.stepsContent {
width: 400px;
margin-left: 140px;
}
src/pages/newtheme/index.js
View file @
6e488f43
...
...
@@ -23,7 +23,7 @@ class NewThemeForm extends React.Component {
return
;
}
dispatch
({
type
:
'
indexstaic
/tabChange'
,
type
:
'
createtheme
/tabChange'
,
payload
:
{
tabIndex
:
key
,
},
...
...
@@ -36,53 +36,55 @@ class NewThemeForm extends React.Component {
return
(
<
div
className
=
{
pageStyle
.
container
}
>
<
div
className
=
{
pageStyle
.
typeTip
}
>
主题类型
<
/div
>
<
Tabs
activeKey
=
{
`
${
tabIndex
}
`
}
tabPosition
=
"left"
onChange
=
{
this
.
tabChange
}
animated
=
{
false
}
>
<
TabPane
tab
=
{
<
div
className
=
{
pageStyle
.
makeitem
}
>
<
div
className
=
{
pageStyle
.
makeitemLeft
}
>
<
div
className
=
{
`
${
pageStyle
.
themeicon
}
`
}
>
<
img
src
=
{
`
${
__IMGCDN__
}
themeaicon.png`
}
alt
=
""
/>
<
div
className
=
{
pageStyle
.
topTab
}
>
<
Tabs
activeKey
=
{
`
${
tabIndex
}
`
}
tabPosition
=
"left"
onChange
=
{
this
.
tabChange
}
animated
=
{
false
}
>
<
TabPane
tab
=
{
<
div
className
=
{
pageStyle
.
makeitem
}
>
<
div
className
=
{
pageStyle
.
makeitemLeft
}
>
<
div
className
=
{
`
${
pageStyle
.
themeicon
}
`
}
>
<
img
src
=
{
`
${
__IMGCDN__
}
themeaicon.png`
}
alt
=
""
/>
<
/div
>
<
div
className
=
{
pageStyle
.
themetypename
}
>
新建作业打卡
<
/div
>
<
/div
>
<
div
className
=
{
pageStyle
.
themetypename
}
>
新建作业打卡
<
/div
>
<
/div
>
<
/div
>
}
key
=
"1"
>
<
JobClock
/>
<
/TabPane
>
<
TabPane
tab
=
{
<
div
className
=
{
pageStyle
.
makeitem
}
>
<
div
className
=
{
pageStyle
.
makeitemLeft
}
>
<
div
className
=
{
`
${
pageStyle
.
themeicon
}
`
}
>
<
img
src
=
{
`
${
__IMGCDN__
}
themebicon.png`
}
alt
=
""
/>
key
=
"1"
>
<
JobClock
/>
<
/TabPane
>
<
TabPane
tab
=
{
<
div
className
=
{
pageStyle
.
makeitem
}
>
<
div
className
=
{
pageStyle
.
makeitemLeft
}
>
<
div
className
=
{
`
${
pageStyle
.
themeicon
}
`
}
>
<
img
src
=
{
`
${
__IMGCDN__
}
themebicon.png`
}
alt
=
""
/>
<
/div
>
<
div
className
=
{
pageStyle
.
themetypename
}
>
新建日历打卡
<
/div
>
<
/div
>
<
div
className
=
{
pageStyle
.
themetypename
}
>
新建日历打卡
<
/div
>
<
/div
>
<
/div
>
}
key
=
"2"
>
<
CalendarClock
/>
<
/TabPane
>
<
TabPane
tab
=
{
<
div
className
=
{
pageStyle
.
makeitem
}
>
<
div
className
=
{
pageStyle
.
makeitemLeft
}
>
<
div
className
=
{
`
${
pageStyle
.
themeicon
}
`
}
>
<
img
src
=
{
`
${
__IMGCDN__
}
themecicon.png`
}
alt
=
""
/>
}
key
=
"2"
>
<
CalendarClock
/>
<
/TabPane
>
<
TabPane
tab
=
{
<
div
className
=
{
pageStyle
.
makeitem
}
>
<
div
className
=
{
pageStyle
.
makeitemLeft
}
>
<
div
className
=
{
`
${
pageStyle
.
themeicon
}
`
}
>
<
img
src
=
{
`
${
__IMGCDN__
}
themecicon.png`
}
alt
=
""
/>
<
/div
>
<
div
className
=
{
pageStyle
.
themetypename
}
>
新建闯关打卡
<
/div
>
<
/div
>
<
div
className
=
{
pageStyle
.
themetypename
}
>
新建闯关打卡
<
/div
>
<
/div
>
<
/div
>
}
key
=
"3"
>
<
EmigratedClock
/
>
<
/Tab
Pane
>
<
/
Tabs
>
}
key
=
"3"
>
<
EmigratedClock
/
>
<
/TabPane
>
<
/Tab
s
>
<
/
div
>
<
/div
>
);
}
...
...
@@ -95,7 +97,7 @@ const NewTheme = Form.create()(NewThemeForm);
function
mapStateToProps
(
state
)
{
const
{
tabIndex
,
}
=
state
.
indexstaic
;
}
=
state
.
createtheme
;
return
{
tabIndex
,
};
...
...
src/pages/newtheme/index.less
View file @
6e488f43
...
...
@@ -7,10 +7,15 @@
overflow-y: hidden;
min-width: 1350px;
border-radius:2px 0px 2px 2px;
}
.topTab {
:global {
.ant-tabs .ant-tabs-left-bar .ant-tabs-tab, .ant-tabs .ant-tabs-right-bar .ant-tabs-tab {
padding: 0;
}
.ant-tabs-bar {
margin-top: 20px;
}
.ant-tabs-nav-scroll {
border-right: 1px solid rgba(0, 0, 0, .1);
padding-right: 30px;
...
...
@@ -34,9 +39,7 @@
color: #1890FF;
}
}
}
.typeTip {
font-size: 16px;
font-family: PingFangSC;
...
...
src/pages/newtheme/jobclock/index.js
View file @
6e488f43
This diff is collapsed.
Click to expand it.
src/pages/newtheme/jobclock/index.less
View file @
6e488f43
.container {
background-color: #fff;
padding:
0
20px;
padding: 20px;
position: relative;
}
.title {
...
...
src/pages/thememgt/index.js
View file @
6e488f43
import
React
from
'react'
;
import
{
connect
}
from
'dva'
;
import
{
Table
,
Row
,
Col
,
Form
,
Select
,
DatePicker
,
Button
,
Pagination
}
from
'antd'
;
import
{
Table
,
Row
,
Col
,
Form
,
Select
,
DatePicker
,
Button
,
Pagination
,
Divider
,
message
,
Modal
,
Icon
}
from
'antd'
;
import
pageStyle
from
'./index.less'
;
import
{
pageIn
}
from
'../../utils/index'
;
const
{
Option
}
=
Select
;
...
...
@@ -135,6 +135,61 @@ class ThemeMgt extends React.Component {
}
return
status
;
}
editTheme
=
(
record
)
=>
{
const
{
dispatch
}
=
this
.
props
;
if
(
record
.
subject_type
==
3
)
{
message
.
warning
(
'功能即将开放,敬请期待'
,
1
);
return
;
}
dispatch
({
type
:
'createtheme/editGoTheme'
,
payload
:
{
record
,
},
});
}
copyClockMgt
=
(
record
,
isCopy
)
=>
{
const
{
dispatch
}
=
this
.
props
;
if
(
record
.
subject_type
==
3
)
{
message
.
warning
(
'功能即将开放,敬请期待'
,
1
);
return
;
}
dispatch
({
type
:
'createtheme/copyGoTheme'
,
payload
:
{
record
,
isCopy
,
},
});
}
deleteTheme
=
(
record
)
=>
{
const
me
=
this
;
const
{
dispatch
}
=
me
.
props
;
Modal
.
confirm
({
title
:
`确定删除“
${
record
.
title
}
”?`
,
content
:
'删除后不可恢复,请谨慎操作!'
,
okText
:
'确定'
,
cancelText
:
'取消'
,
icon
:
<
Icon
type
=
"close-circle"
style
=
{{
color
:
'red'
}}
/>
,
onOk
()
{
dispatch
({
type
:
'thememgt/deleteTheme'
,
payload
:
{
record
,
id
:
record
.
id
,
},
});
},
okButtonProps
:
{
type
:
'danger'
,
style
:
{
color
:
'#fff'
,
backgroundColor
:
'#ff4d4f'
,
borderColor
:
'#ff4d4f'
,
},
},
});
}
render
()
{
const
{
themeTotal
,
...
...
@@ -236,7 +291,13 @@ class ThemeMgt extends React.Component {
key
:
'x'
,
render
:
(
text
,
record
,
index
)
=>
(
<
div
className
=
{
pageStyle
.
tablecell
}
>
<
a
href
=
"javascript:;"
onClick
=
{()
=>
this
.
editTheme
(
record
)}
>
编辑
<
/a
>
<
Divider
type
=
"vertical"
/>
<
a
href
=
"javascript:;"
onClick
=
{()
=>
this
.
copyClockMgt
(
record
,
1
)}
>
复制
<
/a
>
<
Divider
type
=
"vertical"
/>
<
a
href
=
"javascript:;"
onClick
=
{()
=>
this
.
goClockMgt
(
record
)}
>
点评
<
/a
>
<
Divider
type
=
"vertical"
/>
<
a
href
=
"javascript:;"
onClick
=
{()
=>
this
.
deleteTheme
(
record
)}
>
删除
<
/a
>
<
/div
>
),
}];
...
...
@@ -356,6 +417,8 @@ function mapStateToProps(state) {
endTime
,
endOpen
,
}
=
state
.
thememgt
;
// eslint-disable-next-line no-empty-pattern
const
{}
=
state
.
createtheme
;
return
{
themeTotal
,
themeList
,
...
...
src/router.js
View file @
6e488f43
...
...
@@ -175,6 +175,16 @@ const RechargeDesc = props => (
{
RechargeDesc
=>
(
<
RechargeDesc
{...
props
}
/>
)
}
<
/Bundle
>
);
const
JobClock
=
props
=>
(
<
Bundle
load
=
{()
=>
import
(
/* webpackChunkName:"JobClock" */
'./pages/newtheme/jobclock/index'
)}
>
{
JobClock
=>
(
<
JobClock
{...
props
}
/>
)
}
<
/Bundle
>
);
const
CalendarClock
=
props
=>
(
<
Bundle
load
=
{()
=>
import
(
/* webpackChunkName:"JobClock" */
'./pages/newtheme/calendarclock/index'
)}
>
{
CalendarClock
=>
(
<
CalendarClock
{...
props
}
/>
)
}
<
/Bundle
>
);
function
RouterConfig
({
history
})
{
return
(
<
LocaleProvider
locale
=
{
zhCN
}
>
...
...
@@ -204,6 +214,10 @@ function RouterConfig({ history }) {
<
Route
path
=
"/sjd/studentclass/:id"
exact
component
=
{
StudentClass
}
/
>
<
Route
path
=
"/sjd/institutions"
exact
component
=
{
Institutions
}
/
>
<
Route
path
=
"/sjd/schooledit"
exact
component
=
{
SchoolEdit
}
/
>
<
Route
path
=
"/sjd/newtheme/jobclock/:id"
exact
component
=
{
JobClock
}
/
>
<
Route
path
=
"/sjd/newtheme/jobclock/:id/:isCopy"
exact
component
=
{
JobClock
}
/
>
<
Route
path
=
"/sjd/newtheme/calendarclock/:id"
exact
component
=
{
CalendarClock
}
/
>
<
Route
path
=
"/sjd/newtheme/calendarclock/:id/:isCopy"
exact
component
=
{
CalendarClock
}
/
>
<
/SjdIndex
>
)}
/
>
...
...
src/services/createtheme.js
View file @
6e488f43
import
qs
from
'qs'
;
import
request
from
'../utils/request'
;
import
api
from
'../common/api'
;
export
function
findTheme
(
params
)
{
const
data
=
qs
.
stringify
(
params
);
return
request
({
url
:
`
${
api
.
createtheme
.
addTheme
}
/
${
params
.
id
}
`
,
method
:
'GET'
,
data
,
});
}
export
function
addTheme
(
params
)
{
const
data
=
qs
.
stringify
(
params
);
return
request
({
...
...
@@ -9,3 +17,47 @@ export function addTheme(params) {
data
,
});
}
export
function
editTheme
(
params
)
{
const
data
=
qs
.
stringify
(
params
);
return
request
({
url
:
`
${
api
.
createtheme
.
addTheme
}
/
${
params
.
id
}
`
,
method
:
'PUT'
,
data
,
});
}
export
function
deleteTheme
({
id
})
{
return
request
({
url
:
`
${
api
.
createtheme
.
deleteTheme
}
/
${
id
}
`
,
method
:
'DELETE'
,
});
}
export
function
deleteSubject
({
id
})
{
return
request
({
url
:
`
${
api
.
createtheme
.
delete_unlock_subject
}
/
${
id
}
`
,
method
:
'DELETE'
,
});
}
export
function
addEmigrated
(
params
)
{
const
data
=
qs
.
stringify
(
params
);
return
request
({
url
:
`
${
api
.
createtheme
.
unlock_subject
}
`
,
method
:
'POST'
,
data
,
});
}
export
function
findEmigrated
(
params
)
{
const
data
=
qs
.
stringify
(
params
);
return
request
({
url
:
`
${
api
.
createtheme
.
find_subject_detail
}
?
${
data
}
`
,
method
:
'GET'
,
data
,
});
}
export
function
saveRelease
(
params
)
{
const
data
=
qs
.
stringify
(
params
);
return
request
({
url
:
`
${
api
.
createtheme
.
unlockSubjectRelease
}
`
,
method
:
'POST'
,
data
,
});
}
src/utils/index.js
View file @
6e488f43
...
...
@@ -816,4 +816,5 @@ export {
getWeek
,
unique1
,
getWeekDay
,
getDateStamp
,
};
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