Commit 3a7fb9a9 authored by wangxuelai's avatar wangxuelai

''

parent ee2e9938
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
<script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=XSZBZ-5LHCV-5I2P7-UQHPW-6456F-JBB3B"></script> <script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=XSZBZ-5LHCV-5I2P7-UQHPW-6456F-JBB3B"></script>
<script src="/js/ueeditor/ueditor.config.js?20191012222" charset="utf-8"></script><script src="/js/ueeditor/ueditor.all.js?20191012222" charset="utf-8"></script> <script src="/js/ueeditor/ueditor.config.js?20191012222" charset="utf-8"></script><script src="/js/ueeditor/ueditor.all.js?20191012222" charset="utf-8"></script>
<script src="js/console-polyfill.js?20191012222" charset="utf-8"></script><script src="js/es6-shim.min.js?20191012222" charset="utf-8"></script><script src="js/es5-shim.js?20191012222" charset="utf-8"></script><script src="js/es5-sham.min.js?20191012222" charset="utf-8"></script><script src="js/json3.min.js?20191012222" charset="utf-8"></script><script src="js/html5shiv.min.js?20191012222" charset="utf-8"></script><script src="js/polyfill.js?20191012222" charset="utf-8"></script><script src="lib/vendor.dll.js?2019101222211" charset="utf-8"></script> <script src="js/console-polyfill.js?20191012222222" charset="utf-8"></script><script src="js/es6-shim.min.js?20191012222222" charset="utf-8"></script><script src="js/es5-shim.js?20191012222222" charset="utf-8"></script><script src="js/es5-sham.min.js?20191012222222" charset="utf-8"></script><script src="js/json3.min.js?20191012222222" charset="utf-8"></script><script src="js/html5shiv.min.js?20191012222222" charset="utf-8"></script><script src="js/polyfill.js?20191012222222" charset="utf-8"></script><script src="lib/vendor.dll.js?20191012222222" charset="utf-8"></script>
</head> </head>
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>
<script type="text/javascript" src="./dist/main.3af597.js"></script></body> <script type="text/javascript" src="./dist/main.dacea1.js"></script></body>
</html> </html>
\ No newline at end of file
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
"query-string": "^6.8.3", "query-string": "^6.8.3",
"rc-tree": "^3.0.0-alpha.38", "rc-tree": "^3.0.0-alpha.38",
"react": "16.9.0", "react": "16.9.0",
"react-addons-perf": "^15.4.2",
"react-dnd": "^9.4.0", "react-dnd": "^9.4.0",
"react-dnd-html5-backend": "^9.4.0", "react-dnd-html5-backend": "^9.4.0",
"react-dom": "^16.2.0", "react-dom": "^16.2.0",
......
import { connect } from 'dva'; import { connect } from 'dva';
import React from 'react'; import React from 'react';
import { Table, Button, Select, Popover, message, Radio, Icon } from 'antd'; import { Table, Button, Select, Popover, message, Radio, Icon, Spin } from 'antd';
import pageStyle from './CourseChart.less'; import pageStyle from './CourseChart.less';
import BtnPermission from './BtnPermission'; import BtnPermission from './BtnPermission';
import { hasBtnPower, LocalStorage, btnPermission } from '../utils/index'; import { hasBtnPower, LocalStorage, btnPermission } from '../utils/index';
...@@ -22,6 +22,18 @@ class CourseChart extends React.Component { ...@@ -22,6 +22,18 @@ class CourseChart extends React.Component {
}, },
}); });
} }
shouldComponentUpdate(nextProps, nextState) {
if (nextProps.chartLoaded) {
return true;
}
// if (this.props.chartLoaded !== nextProps.color) {
// return true;
// }
// if (this.state.count !== nextState.count) {
// return true;
// }
return false;
}
calculateStyle = (info) => { calculateStyle = (info) => {
const colorList = ['#FF9A6C', '#FF5971', '#82D7FE', '#38E0C9', '#BD9FFF', '#ffd338', '#35c13a']; const colorList = ['#FF9A6C', '#FF5971', '#82D7FE', '#38E0C9', '#BD9FFF', '#ffd338', '#35c13a'];
const dayStartTimestamp = new Date(`${info.start_date} 06:00`.replace(/-/g, '/')); const dayStartTimestamp = new Date(`${info.start_date} 06:00`.replace(/-/g, '/'));
...@@ -71,6 +83,7 @@ class CourseChart extends React.Component { ...@@ -71,6 +83,7 @@ class CourseChart extends React.Component {
changeSchedule, changeSchedule,
toEditCallStudents, toEditCallStudents,
userPermission, userPermission,
chartLoaded,
} = this.props; } = this.props;
const courseChartColumns = [{ const courseChartColumns = [{
title: '', title: '',
...@@ -903,46 +916,48 @@ class CourseChart extends React.Component { ...@@ -903,46 +916,48 @@ class CourseChart extends React.Component {
const list = [{ const list = [{
id: 1, id: 1,
}]; }];
return ( return chartLoaded ?
<div className={`${pageStyle.coursechartbox} coursechartbox`}> (
<div className={pageStyle.titlebox}> <div className={`${pageStyle.coursechartbox} coursechartbox`}>
<div className={pageStyle.leftbox} style={{ marginRight: '50px' }}> <div className={pageStyle.titlebox}>
<span className={pageStyle.title}>课表</span> <div className={pageStyle.leftbox} style={{ marginRight: '50px' }}>
{/* <span className={pageStyle.selectdate} onClick={() => this.changeDate('pre')}>上周</span> <span className={pageStyle.title}>课表</span>
<span className={pageStyle.selectdate} onClick={() => this.changeDate('current')}>本周</span> {/* <span className={pageStyle.selectdate} onClick={() => this.changeDate('pre')}>上周</span>
<span className={pageStyle.selectdate} onClick={() => this.changeDate('next')}>下周</span> */} <span className={pageStyle.selectdate} onClick={() => this.changeDate('current')}>本周</span>
<Button.Group> <span className={pageStyle.selectdate} onClick={() => this.changeDate('next')}>下周</span> */}
<Button onClick={() => this.changeDate('pre')}><Icon type="left" />上周</Button> <Button.Group>
<Button onClick={() => this.changeDate('current')}>本周</Button> <Button onClick={() => this.changeDate('pre')}><Icon type="left" />上周</Button>
<Button onClick={() => this.changeDate('next')}>下周<Icon type="right" /></Button> <Button onClick={() => this.changeDate('current')}>本周</Button>
</Button.Group> <Button onClick={() => this.changeDate('next')}>下周<Icon type="right" /></Button>
</div> </Button.Group>
<div className={pageStyle.rightbox}> </div>
{hasBtnPower('sjd/indexstaic', 'planSchedule') && <div className={pageStyle.rightbox}>
<BtnPermission btnId="30008"> {hasBtnPower('sjd/indexstaic', 'planSchedule') &&
<Button type="primary" onClick={goPlanCourse}>一键排课</Button> <BtnPermission btnId="30008">
</BtnPermission> <Button type="primary" onClick={goPlanCourse}>一键排课</Button>
} </BtnPermission>
{LocalStorage.getItem('role') != 1 && }
<Select className={pageStyle.selectitem} value={scheduleListQueryParams.teacher_id} onChange={this.changeTeacher}> {LocalStorage.getItem('role') != 1 &&
<Option value="">全部老师</Option> <Select className={pageStyle.selectitem} value={scheduleListQueryParams.teacher_id} onChange={this.changeTeacher}>
{teacherList.map(ele => ( <Option value="">全部老师</Option>
<Option key={ele.id} value={ele.id}>{ele.nickname}</Option> {teacherList.map(ele => (
)) <Option key={ele.id} value={ele.id}>{ele.nickname}</Option>
} ))
</Select> }
} </Select>
}
</div>
</div> </div>
<Table
bordered
columns={courseChartColumns}
dataSource={list}
loading={!chartLoaded}
rowKey="id"
pagination={false}
/>
</div> </div>
<Table ) : (<div className={`${pageStyle.coursechartbox} coursechartbox`} style={{ textAlign: 'center', padding: '20px' }}><Spin size="large" tip="课表加载中..." /></div>);
bordered
columns={courseChartColumns}
dataSource={list}
rowKey="id"
pagination={false}
/>
</div>
);
} }
} }
CourseChart.propTypes = { CourseChart.propTypes = {
...@@ -954,6 +969,7 @@ function mapStateToProps(state) { ...@@ -954,6 +969,7 @@ function mapStateToProps(state) {
showWeekDaysArr, showWeekDaysArr,
scheduleList, scheduleList,
scheduleListQueryParams, scheduleListQueryParams,
chartLoaded,
} = state.coursechart; } = state.coursechart;
const { const {
userPermission, userPermission,
...@@ -963,6 +979,7 @@ function mapStateToProps(state) { ...@@ -963,6 +979,7 @@ function mapStateToProps(state) {
showWeekDaysArr, showWeekDaysArr,
scheduleList, scheduleList,
scheduleListQueryParams, scheduleListQueryParams,
chartLoaded,
}; };
} }
export default connect(mapStateToProps)(CourseChart); export default connect(mapStateToProps)(CourseChart);
......
...@@ -42,25 +42,6 @@ class SjdMenu extends React.Component { ...@@ -42,25 +42,6 @@ class SjdMenu extends React.Component {
}, },
}); });
}); });
// dispatch({
// type: 'classmgt/updateState',
// payload: {
// classListQueryParams: {
// school_id: 0,
// page: 1,
// perPage: 10,
// title: '',
// teacher_id: '',
// course_id: '',
// class_room_id: '',
// graduation_status: 0,
// assign_class_status: 0,
// extra: 'course,class_room',
// student_id: '',
// my: '',
// },
// },
// });
} }
goHome = () => { goHome = () => {
const { dispatch } = this.props; const { dispatch } = this.props;
......
...@@ -74,7 +74,6 @@ class SjdMenu extends React.Component { ...@@ -74,7 +74,6 @@ class SjdMenu extends React.Component {
} else { } else {
headerPdl = 20; headerPdl = 20;
} }
console.log(isDepartment, 'isDepartment');
return ( return (
<Header <Header
className={SjdHeaderStyle.header} className={SjdHeaderStyle.header}
......
...@@ -35,6 +35,7 @@ export default { ...@@ -35,6 +35,7 @@ export default {
scheduleList: [], scheduleList: [],
scheduleListTotal: [], scheduleListTotal: [],
scheduleListGetting: false, scheduleListGetting: false,
chartLoaded: false,
}, },
subscriptions: { subscriptions: {
setup({ dispatch, history }) { // eslint-disable-line setup({ dispatch, history }) { // eslint-disable-line
...@@ -174,6 +175,7 @@ export default { ...@@ -174,6 +175,7 @@ export default {
scheduleList, scheduleList,
showWeekDaysArr, showWeekDaysArr,
useForQueryTimeStamp, useForQueryTimeStamp,
chartLoaded: true,
}, },
}); });
} else { } else {
...@@ -231,6 +233,7 @@ export default { ...@@ -231,6 +233,7 @@ export default {
scheduleList: [], scheduleList: [],
scheduleListTotal: [], scheduleListTotal: [],
scheduleListGetting: false, scheduleListGetting: false,
chartLoaded: false,
}, },
}); });
}, },
......
...@@ -501,6 +501,31 @@ export default { ...@@ -501,6 +501,31 @@ export default {
datetime: staticcenter.datetime, datetime: staticcenter.datetime,
}, },
}); });
yield put({
type: 'queryLeaveTotal',
});
yield put({
type: 'call',
});
yield put({
type: 'birthday',
});
yield put({
type: 'renew',
});
yield put({
type: 'assign',
});
yield put({
type: 'todoSchedule',
});
yield put({
type: 'queryLeaveList',
payload: {
params: {
},
},
});
if (staticcenter.code == 200) { if (staticcenter.code == 200) {
yield put({ yield put({
type: 'updateState', type: 'updateState',
......
...@@ -1234,7 +1234,6 @@ export default { ...@@ -1234,7 +1234,6 @@ export default {
{ {
type: 'orgdesc', type: 'orgdesc',
data: { data: {
}, },
}, },
], ],
......
...@@ -140,7 +140,6 @@ export default { ...@@ -140,7 +140,6 @@ export default {
}); });
} }
if (pathname === '/register') { if (pathname === '/register') {
console.log('/register');
dispatch({ dispatch({
type: 'login/pageInit', type: 'login/pageInit',
}); });
...@@ -184,31 +183,6 @@ export default { ...@@ -184,31 +183,6 @@ export default {
dispatch({ dispatch({
type: 'indexstaic/queryinfo', type: 'indexstaic/queryinfo',
}); });
dispatch({
type: 'indexstaic/queryLeaveTotal',
});
dispatch({
type: 'indexstaic/call',
});
dispatch({
type: 'indexstaic/birthday',
});
dispatch({
type: 'indexstaic/renew',
});
dispatch({
type: 'indexstaic/assign',
});
dispatch({
type: 'indexstaic/todoSchedule',
});
dispatch({
type: 'indexstaic/queryLeaveList',
payload: {
params: {
},
},
});
dispatch({ dispatch({
type: 'updateState', type: 'updateState',
payload: { payload: {
...@@ -887,11 +861,11 @@ export default { ...@@ -887,11 +861,11 @@ export default {
}); });
} }
if (pathname === '/sjd/singleclass') { if (pathname === '/sjd/singleclass') {
// dispatch({ dispatch({
// type: 'onlineclasses/pageInit', type: 'onlineclasses/pageInit',
// payload: { payload: {
// }, },
// }); });
dispatch({ dispatch({
type: 'onlineclasses/selectCourseList', type: 'onlineclasses/selectCourseList',
payload: { payload: {
...@@ -1095,7 +1069,7 @@ export default { ...@@ -1095,7 +1069,7 @@ export default {
pathname: currentMenu.path, pathname: currentMenu.path,
})); }));
} }
message.destroy(); // message.destroy();
}, },
* changeRoute({ payload }, { put, select }) { * changeRoute({ payload }, { put, select }) {
const { path } = payload; const { path } = payload;
...@@ -1252,9 +1226,9 @@ export default { ...@@ -1252,9 +1226,9 @@ export default {
} }
}, },
* shiftSchool({ payload }, { put, select }) { * shiftSchool({ payload }, { put, select }) {
yield put({ // yield put({
type: 'pageInit', // type: 'pageInit',
}); // });
yield put(routerRedux.replace({ yield put(routerRedux.replace({
pathname: '/erp/schoollist', pathname: '/erp/schoollist',
})); }));
...@@ -1273,9 +1247,9 @@ export default { ...@@ -1273,9 +1247,9 @@ export default {
pathname: '/login', pathname: '/login',
})); }));
signouthide(); signouthide();
yield put({ // yield put({
type: 'pageInit', // type: 'pageInit',
}); // });
message.destroy(); message.destroy();
yield put({ yield put({
type: 'updateState', type: 'updateState',
......
...@@ -762,7 +762,7 @@ class ClassMgtForm extends React.Component { ...@@ -762,7 +762,7 @@ class ClassMgtForm extends React.Component {
</div> </div>
<div className={pageStyle.tablebox}> <div className={pageStyle.tablebox}>
<Table <Table
rowKey={classList => classList.title} rowKey={classList => classList.id}
dataSource={classList} dataSource={classList}
columns={columns} columns={columns}
scroll={{ x: 'max-content' }} scroll={{ x: 'max-content' }}
......
...@@ -237,7 +237,7 @@ class ClassMgtForm extends React.Component { ...@@ -237,7 +237,7 @@ class ClassMgtForm extends React.Component {
</div> </div>
<div className={pageStyle.tablebox}> <div className={pageStyle.tablebox}>
<Table <Table
rowKey={coursesinfo => coursesinfo.title} rowKey={coursesinfo => coursesinfo.id}
dataSource={coursesinfo} dataSource={coursesinfo}
columns={columns} columns={columns}
scroll={{ x: 700 }} scroll={{ x: 700 }}
......
...@@ -1195,14 +1195,6 @@ class StaticCenter extends React.Component { ...@@ -1195,14 +1195,6 @@ class StaticCenter extends React.Component {
loading={queryRepeatStudentsLoading} loading={queryRepeatStudentsLoading}
dataSource={repeatStudentList} dataSource={repeatStudentList}
/> />
{/* <AddCourseTime */}
{/* visible={addCourseTimeShow} */}
{/* saveCourseTime={this.saveCourseTime} */}
{/* close={this.closeAddCourseTime} */}
{/* timeArr={timeArr} */}
{/* addTimeSubmitting={addTimeSubmitting} */}
{/* delTime={this.delTime} */}
{/* /> */}
<ChangeCourse <ChangeCourse
{...this.props} {...this.props}
scheduleStudentsizeChange={this.scheduleStudentsizeChange} scheduleStudentsizeChange={this.scheduleStudentsizeChange}
......
...@@ -1214,27 +1214,7 @@ class StudentMgt extends React.Component { ...@@ -1214,27 +1214,7 @@ class StudentMgt extends React.Component {
</div> </div>
</div> </div>
</Modal> </Modal>
{/*
<Modal
visible={previewBindQrcodeShow}
footer={null}
onCancel={this.closeBindQrcodeShow}
title={<div style={{ textAlign: 'center', fontWeight: 700 }}>扫描二维码绑定</div>}
>
<img
alt=""
src={imagify(previewBindQrcode)}
style={{
width: 200,
height: 200,
display: 'block',
margin: '0 auto',
}}
/>
</Modal>
*/}
<RenewEdit <RenewEdit
// {...this.props}
operator={operator} operator={operator}
editClassInfo={editClassInfo} editClassInfo={editClassInfo}
teacherList={teacherList} teacherList={teacherList}
......
...@@ -21,5 +21,19 @@ module.exports = webpackMerge(baseconfig, { ...@@ -21,5 +21,19 @@ module.exports = webpackMerge(baseconfig, {
"X-Custom-Foo": "bar", "X-Custom-Foo": "bar",
"Origin": '*' "Origin": '*'
} }
}, },
// plugins: [
// new BundleAnalyzerPlugin(),
// new webpack.DllReferencePlugin({
// context: path.resolve(__dirname, '../'),
// manifest: require('../lib/vendor-manifest.json'),
// }),
// ],
// plugins: [
// // new BundleAnalyzerPlugin(),
// new webpack.DllReferencePlugin({
// context: path.resolve(__dirname, '../'),
// manifest: require('../lib/vendor-manifest.json'),
// }),
// ],
}); });
\ No newline at end of file
...@@ -153,6 +153,10 @@ module.exports = { ...@@ -153,6 +153,10 @@ module.exports = {
}, },
plugins: [ plugins: [
new HtmlWebpackPlugin(devFile), new HtmlWebpackPlugin(devFile),
new webpack.DllReferencePlugin({
context: path.resolve(__dirname, '../'),
manifest: require('../lib/vendor-manifest.json'),
}),
new webpack.DefinePlugin({ new webpack.DefinePlugin({
// 'ENVIRONMENT': `"${ENVIRONMENT}"`, // 'ENVIRONMENT': `"${ENVIRONMENT}"`,
// '__IMGCDN__' : `"${__IMGCDN__}"`, // '__IMGCDN__' : `"${__IMGCDN__}"`,
......
...@@ -12,9 +12,9 @@ module.exports = webpackMerge(baseconfig, { ...@@ -12,9 +12,9 @@ module.exports = webpackMerge(baseconfig, {
mode: 'production', mode: 'production',
plugins: [ plugins: [
new BundleAnalyzerPlugin(), new BundleAnalyzerPlugin(),
new webpack.DllReferencePlugin({ // new webpack.DllReferencePlugin({
context: path.resolve(__dirname, '../'), // context: path.resolve(__dirname, '../'),
manifest: require('../lib/vendor-manifest.json'), // manifest: require('../lib/vendor-manifest.json'),
}), // }),
], ],
}); });
\ No newline at end of file
...@@ -10,9 +10,9 @@ module.exports = webpackMerge(baseconfig, { ...@@ -10,9 +10,9 @@ module.exports = webpackMerge(baseconfig, {
}, },
mode: 'production', mode: 'production',
plugins: [ plugins: [
new webpack.DllReferencePlugin({ // new webpack.DllReferencePlugin({
context: path.resolve(__dirname, '../'), // context: path.resolve(__dirname, '../'),
manifest: require('../lib/vendor-manifest.json'), // manifest: require('../lib/vendor-manifest.json'),
}), // }),
], ],
}); });
\ No newline at end of file
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