Commit 179bd7e0 authored by baixian's avatar baixian

复制

parent 734ef405
...@@ -37,7 +37,7 @@ export default { ...@@ -37,7 +37,7 @@ export default {
activeurl: `${__IMGCDN__}menu/classactive.png`, activeurl: `${__IMGCDN__}menu/classactive.png`,
notactiveurl: `${__IMGCDN__}menu/class.png`, notactiveurl: `${__IMGCDN__}menu/class.png`,
path: '/sjd/classmgt', 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'],
}, },
{ {
id: '4', id: '4',
......
This diff is collapsed.
...@@ -482,6 +482,160 @@ export default { ...@@ -482,6 +482,160 @@ 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/createThemeModalFind',
payload: {
id: jobClockCopyActive[1],
isCopy: jobClockCopyActive[2],
},
});
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 CalendarClockActive = pathToRegexp('/sjd/newtheme/calendarclock/:id').exec(pathname);
if (CalendarClockActive) {
dispatch({
type: 'createtheme/createThemeModalFind',
payload: {
id: CalendarClockActive[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 CalendarClockCopyActive = pathToRegexp('/sjd/newtheme/calendarclock/:id/:isCopy').exec(pathname);
if (CalendarClockCopyActive) {
dispatch({
type: 'createtheme/createThemeModalFind',
payload: {
id: CalendarClockCopyActive[1],
isCopy: CalendarClockCopyActive[2],
},
});
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 clockmgtactive = pathToRegexp('/sjd/clockmgt/:themetype/:classid/:themeid').exec(pathname); const clockmgtactive = pathToRegexp('/sjd/clockmgt/:themetype/:classid/:themeid').exec(pathname);
if (clockmgtactive) { if (clockmgtactive) {
dispatch({ dispatch({
......
...@@ -3,6 +3,7 @@ import React from 'react'; ...@@ -3,6 +3,7 @@ import React from 'react';
import { Icon, Divider, Tabs, Select, Form, Upload, Row, Col, Input, Radio, Modal, message } from 'antd'; import { Icon, Divider, Tabs, Select, Form, Upload, Row, Col, Input, Radio, Modal, message } from 'antd';
import pageStyle from './ThemeEditor.less'; import pageStyle from './ThemeEditor.less';
import { pageIn, hasBtnPower, imagify, ossVideofy } from '../../utils/index'; import { pageIn, hasBtnPower, imagify, ossVideofy } from '../../utils/index';
import upImg from '../../../image/subjectUp.png';
const { TabPane } = Tabs; const { TabPane } = Tabs;
const { TextArea } = Input; const { TextArea } = Input;
class ThemeEditor extends React.Component { class ThemeEditor extends React.Component {
...@@ -31,10 +32,6 @@ class ThemeEditor extends React.Component { ...@@ -31,10 +32,6 @@ class ThemeEditor extends React.Component {
previewVisible: false, previewVisible: false,
}); });
} }
change = (e, index) => {
console.log(e.target.value, 'textValue12');
console.log(index, 'index');
}
render() { render() {
const { previewVisible, previewImage } = this.state; const { previewVisible, previewImage } = this.state;
const { const {
...@@ -46,40 +43,64 @@ class ThemeEditor extends React.Component { ...@@ -46,40 +43,64 @@ class ThemeEditor extends React.Component {
deleteThemeVideo, deleteThemeVideo,
editorText, editorText,
editorAddText, editorAddText,
moveContent,
} = this.props; } = this.props;
return ( return (
<div className={pageStyle.container}> <div className={pageStyle.container}>
{commentParams.content.map((item, index) => (
item.type === 'text' &&
<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 onClick={() => deleteThemeImg(index)} className={pageStyle.delete}><Icon type="close-circle" theme="filled" /></div>
</div>
))}
<div className={pageStyle.editorwrap}> <div className={pageStyle.editorwrap}>
<div className={pageStyle.uploadimgbox}> {/* eslint-disable-next-line array-callback-return,consistent-return */}
{commentParams.content.map((item, index) => ( {commentParams.content.map((item, index) => {
item.type === 'img' && // eslint-disable-next-line default-case
<div className={pageStyle.imgwrap}> switch (item.type) {
<img alt={item.type} className={pageStyle.teacheruploadimg} src={imagify(item.value)} /> case 'text':
<div className={pageStyle.imghide}> return (
<a title="预览文件" onClick={() => this.priviewImg(item.value)} href="javascript:;" ><Icon style={{ color: '#fff' }} type="eye" /> 预览</a> <div className={pageStyle.textWrap}>
<Divider type="vertical" /> <TextArea autosize={{ minRows: 4, maxRows: 10 }} value={item.value} onChange={e => editorChange(e, index)} placeholder="请输入内容" style={{ width: 560 }} maxLength={500} />
<a title="删除文件" onClick={() => deleteThemeImg(index)} href="javascript:;"> <Icon style={{ color: '#fff' }} type="delete" />删除</a> <div className={pageStyle.sizeNumber}>{item.value.length}/500</div>
</div> <div className={pageStyle.toolList}>
</div> { 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> }
{commentParams.content.map((item, index) => ( { index === (commentParams.content.length - 1) && <div className={pageStyle.nodown}><img src={upImg} alt="" /> </div> }
item.type === 'video' && { index < (commentParams.content.length - 1) && <div className={pageStyle.down} onClick={() => moveContent(index, 'down')}><img src={upImg} alt="" /> </div> }
<div className={pageStyle.videowrap}> <div className={pageStyle.delete} onClick={() => deleteThemeImg(index)}><Icon type="delete" theme="filled" /></div>
<video controls="controls" className={pageStyle.videoPoster} src={ossVideofy(item.value)} /> </div>
<div className={pageStyle.videohide}> </div>
<a title="删除文件" onClick={() => deleteThemeImg(index)} href="javascript:;"> <Icon style={{ color: '#fff' }} type="delete" />删除</a> );
</div> case 'img':
</div> return (
))} <div className={pageStyle.uploadimgbox}>
</div> <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>
</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>
<div className={pageStyle.uploadflex}> <div className={pageStyle.uploadflex}>
<div className={pageStyle.uploadimg} onClick={editorAddText}><Icon style={{ marginRight: 10 }} type="font-size" />添加文字</div> <div className={pageStyle.uploadimg} onClick={editorAddText}><Icon style={{ marginRight: 10 }} type="font-size" />添加文字</div>
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
width: 560px; width: 560px;
height: auto; height: auto;
position: relative; position: relative;
margin-bottom:10px;
:global { :global {
.ant-input { .ant-input {
padding: 6px 15px 20px; padding: 6px 15px 20px;
...@@ -12,31 +13,55 @@ ...@@ -12,31 +13,55 @@
bottom: 8px; bottom: 8px;
right: 10px; right: 10px;
} }
.delete {
position: absolute;
top: 0;
right: 10px;
cursor: pointer;
color:#FF7373;
:global {
.anticon {
font-size: 20px;
}
}
}
} }
.editorwrap { .editorwrap {
width: 563px; width: 563px;
margin-top: 15px; 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 { .uploadimgbox {
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
margin-bottom: 18px; margin-bottom: 18px;
flex-wrap: wrap; flex-wrap: wrap;
.imgwrap { .imgwrap {
width: 135px; width: 100%;
height: 135px; height: 120px;
border-radius: 4px; border-radius: 4px;
margin-right: 6px; margin-right: 6px;
position: relative; position: relative;
...@@ -75,41 +100,6 @@ ...@@ -75,41 +100,6 @@
.teacheruploadimg:nth-child(4n){ .teacheruploadimg:nth-child(4n){
margin-right: 0; 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;
}
}
} }
} }
...@@ -139,3 +129,48 @@ ...@@ -139,3 +129,48 @@
} }
} }
} }
.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);
}
.down:hover {
background-color: #1890FF;
}
.delete:hover {
background-color: #FF6060;
}
}
.textWrap:hover,.imgwrap:hover,.videowrap:hover {
.toolList {
opacity: 1;
z-index: 1;
}
}
...@@ -102,6 +102,7 @@ class CalendarClockForm extends React.Component { ...@@ -102,6 +102,7 @@ class CalendarClockForm extends React.Component {
form.resetFields(); form.resetFields();
this.setState({ this.setState({
title: '', title: '',
calendarShow: false,
}); });
}, },
}, },
...@@ -227,6 +228,16 @@ class CalendarClockForm extends React.Component { ...@@ -227,6 +228,16 @@ class CalendarClockForm extends React.Component {
}, },
}); });
} }
calendarMoveContent = (index, direction) => {
const { dispatch } = this.props;
dispatch({
type: 'createtheme/calendarMoveContent',
payload: {
index,
direction,
},
});
}
render() { render() {
const { isShow, calendarShow, title } = this.state; const { isShow, calendarShow, title } = this.state;
const { const {
...@@ -239,6 +250,7 @@ class CalendarClockForm extends React.Component { ...@@ -239,6 +250,7 @@ class CalendarClockForm extends React.Component {
calendarData, calendarData,
currentTimestamp, currentTimestamp,
selectPlanDays, selectPlanDays,
isCopy,
} = this.props; } = this.props;
let new_rest_dates = []; let new_rest_dates = [];
new_rest_dates = [...new Set(new_rest_dates.concat(...rest_dates))]; new_rest_dates = [...new Set(new_rest_dates.concat(...rest_dates))];
...@@ -309,7 +321,7 @@ class CalendarClockForm extends React.Component { ...@@ -309,7 +321,7 @@ class CalendarClockForm extends React.Component {
}, },
], ],
})( })(
<Select disabled={!!calendarParams.class_id} placeholder="请选择班级" style={{ width: 174 }} showSearch onChange={this.handleStudentChange}> <Select disabled={(calendarParams.class_id && calendarParams.class_id != undefined) && (isCopy === 0)} placeholder="请选择班级" style={{ width: 174 }} showSearch onChange={this.handleStudentChange}>
{classList.map(ele => <Option value={ele.id}>{ele.title}</Option>)} {classList.map(ele => <Option value={ele.id}>{ele.title}</Option>)}
</Select>, </Select>,
)} )}
...@@ -607,6 +619,7 @@ class CalendarClockForm extends React.Component { ...@@ -607,6 +619,7 @@ class CalendarClockForm extends React.Component {
editorChange={this.editorChange} editorChange={this.editorChange}
deleteThemeImg={this.deleteCalendarImg} deleteThemeImg={this.deleteCalendarImg}
editorAddText={this.calendarAddText} editorAddText={this.calendarAddText}
moveContent={this.calendarMoveContent}
/> />
<FormItem {...submitFormLayout} style={{ marginTop: 32 }}> <FormItem {...submitFormLayout} style={{ marginTop: 32 }}>
<Button type="primary" htmlType="submit" loading={themeAddLoading}> <Button type="primary" htmlType="submit" loading={themeAddLoading}>
...@@ -633,6 +646,7 @@ function mapStateToProps(state) { ...@@ -633,6 +646,7 @@ function mapStateToProps(state) {
calendarData, calendarData,
currentTimestamp, currentTimestamp,
selectPlanDays, selectPlanDays,
isCopy,
} = state.createtheme; } = state.createtheme;
return { return {
themeAddLoading, themeAddLoading,
...@@ -644,6 +658,7 @@ function mapStateToProps(state) { ...@@ -644,6 +658,7 @@ function mapStateToProps(state) {
calendarData, calendarData,
currentTimestamp, currentTimestamp,
selectPlanDays, selectPlanDays,
isCopy,
}; };
} }
export default connect(mapStateToProps)(CalendarClock); export default connect(mapStateToProps)(CalendarClock);
......
.container { .container {
background-color: #fff; background-color: #fff;
padding: 0 20px; padding: 20px;
position: relative; position: relative;
} }
.title { .title {
......
...@@ -13,6 +13,9 @@ ...@@ -13,6 +13,9 @@
.ant-tabs .ant-tabs-left-bar .ant-tabs-tab, .ant-tabs .ant-tabs-right-bar .ant-tabs-tab { .ant-tabs .ant-tabs-left-bar .ant-tabs-tab, .ant-tabs .ant-tabs-right-bar .ant-tabs-tab {
padding: 0; padding: 0;
} }
.ant-tabs-bar {
margin-top: 20px;
}
.ant-tabs-nav-scroll { .ant-tabs-nav-scroll {
border-right: 1px solid rgba(0, 0, 0, .1); border-right: 1px solid rgba(0, 0, 0, .1);
padding-right: 30px; padding-right: 30px;
......
...@@ -175,6 +175,16 @@ class JobClockForm extends React.Component { ...@@ -175,6 +175,16 @@ class JobClockForm extends React.Component {
}, },
}); });
} }
jobMoveContent = (index, direction) => {
const { dispatch } = this.props;
dispatch({
type: 'createtheme/jobMoveContent',
payload: {
index,
direction,
},
});
}
render() { render() {
const { isShow, title } = this.state; const { isShow, title } = this.state;
const { const {
...@@ -183,6 +193,7 @@ class JobClockForm extends React.Component { ...@@ -183,6 +193,7 @@ class JobClockForm extends React.Component {
classList, classList,
jobParams, jobParams,
editorText, editorText,
isCopy,
} = this.props; } = this.props;
const formItemModalLineLayout = { const formItemModalLineLayout = {
labelCol: { labelCol: {
...@@ -251,7 +262,7 @@ class JobClockForm extends React.Component { ...@@ -251,7 +262,7 @@ class JobClockForm extends React.Component {
}, },
], ],
})( })(
<Select disabled={!!jobParams.class_id} placeholder="请选择班级" style={{ width: 174 }} showSearch onChange={this.handleStudentChange}> <Select disabled={(jobParams.class_id && jobParams.class_id != undefined) && (isCopy === 0)} placeholder="请选择班级" style={{ width: 174 }} showSearch onChange={this.handleStudentChange}>
{classList.map(ele => <Option value={ele.id}>{ele.title}</Option>)} {classList.map(ele => <Option value={ele.id}>{ele.title}</Option>)}
</Select>, </Select>,
)} )}
...@@ -444,6 +455,7 @@ class JobClockForm extends React.Component { ...@@ -444,6 +455,7 @@ class JobClockForm extends React.Component {
editorUploadAudio={this.jobUploadAudio} editorUploadAudio={this.jobUploadAudio}
editorChange={this.jobChangeSize} editorChange={this.jobChangeSize}
deleteThemeImg={this.deleteJobImg} deleteThemeImg={this.deleteJobImg}
moveContent={this.jobMoveContent}
editorAddText={this.jobAddText} editorAddText={this.jobAddText}
/> />
<FormItem {...submitFormLayout} style={{ marginTop: 32 }}> <FormItem {...submitFormLayout} style={{ marginTop: 32 }}>
...@@ -466,12 +478,14 @@ function mapStateToProps(state) { ...@@ -466,12 +478,14 @@ function mapStateToProps(state) {
classList, classList,
jobParams, jobParams,
editorText, editorText,
isCopy,
} = state.createtheme; } = state.createtheme;
return { return {
themeAddLoading, themeAddLoading,
classList, classList,
jobParams, jobParams,
editorText, editorText,
isCopy,
}; };
} }
export default connect(mapStateToProps)(JobClock); export default connect(mapStateToProps)(JobClock);
......
.container { .container {
background-color: #fff; background-color: #fff;
padding: 0 20px; padding: 20px;
position: relative; position: relative;
} }
.title { .title {
......
...@@ -138,7 +138,7 @@ class ThemeMgt extends React.Component { ...@@ -138,7 +138,7 @@ class ThemeMgt extends React.Component {
editTheme = (record) => { editTheme = (record) => {
const { dispatch } = this.props; const { dispatch } = this.props;
if (record.subject_type == 3) { if (record.subject_type == 3) {
message.error('闯关打卡暂时不支持编辑哟', 1); message.warning('功能即将开放,敬请期待', 1);
return; return;
} }
dispatch({ dispatch({
...@@ -148,6 +148,20 @@ class ThemeMgt extends React.Component { ...@@ -148,6 +148,20 @@ class ThemeMgt extends React.Component {
}, },
}); });
} }
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) => { deleteTheme = (record) => {
const me = this; const me = this;
const { dispatch } = me.props; const { dispatch } = me.props;
...@@ -279,6 +293,8 @@ class ThemeMgt extends React.Component { ...@@ -279,6 +293,8 @@ class ThemeMgt extends React.Component {
<div className={pageStyle.tablecell}> <div className={pageStyle.tablecell}>
<a href="javascript:;" onClick={() => this.editTheme(record)}>编辑</a> <a href="javascript:;" onClick={() => this.editTheme(record)}>编辑</a>
<Divider type="vertical" /> <Divider type="vertical" />
<a href="javascript:;" onClick={() => this.copyClockMgt(record, 1)}>复制</a>
<Divider type="vertical" />
<a href="javascript:;" onClick={() => this.goClockMgt(record)}>点评</a> <a href="javascript:;" onClick={() => this.goClockMgt(record)}>点评</a>
<Divider type="vertical" /> <Divider type="vertical" />
<a href="javascript:;" onClick={() => this.deleteTheme(record)}>删除</a> <a href="javascript:;" onClick={() => this.deleteTheme(record)}>删除</a>
......
...@@ -175,6 +175,16 @@ const RechargeDesc = props => ( ...@@ -175,6 +175,16 @@ const RechargeDesc = props => (
{ RechargeDesc => (<RechargeDesc {...props} />) } { RechargeDesc => (<RechargeDesc {...props} />) }
</Bundle> </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 }) { function RouterConfig({ history }) {
return ( return (
<LocaleProvider locale={zhCN}> <LocaleProvider locale={zhCN}>
...@@ -204,6 +214,10 @@ function RouterConfig({ history }) { ...@@ -204,6 +214,10 @@ function RouterConfig({ history }) {
<Route path="/sjd/studentclass/:id" exact component={StudentClass} /> <Route path="/sjd/studentclass/:id" exact component={StudentClass} />
<Route path="/sjd/institutions" exact component={Institutions} /> <Route path="/sjd/institutions" exact component={Institutions} />
<Route path="/sjd/schooledit" exact component={SchoolEdit} /> <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> </SjdIndex>
)} )}
/> />
......
import qs from 'qs'; import qs from 'qs';
import request from '../utils/request'; import request from '../utils/request';
import api from '../common/api'; 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) { export function addTheme(params) {
const data = qs.stringify(params); const data = qs.stringify(params);
return request({ return request({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment