Commit 3a7fb9a9 authored by wangxuelai's avatar wangxuelai

''

parent ee2e9938
......@@ -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 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>
<body>
<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>
\ No newline at end of file
......@@ -51,6 +51,7 @@
"query-string": "^6.8.3",
"rc-tree": "^3.0.0-alpha.38",
"react": "16.9.0",
"react-addons-perf": "^15.4.2",
"react-dnd": "^9.4.0",
"react-dnd-html5-backend": "^9.4.0",
"react-dom": "^16.2.0",
......
import { connect } from 'dva';
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 BtnPermission from './BtnPermission';
import { hasBtnPower, LocalStorage, btnPermission } from '../utils/index';
......@@ -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) => {
const colorList = ['#FF9A6C', '#FF5971', '#82D7FE', '#38E0C9', '#BD9FFF', '#ffd338', '#35c13a'];
const dayStartTimestamp = new Date(`${info.start_date} 06:00`.replace(/-/g, '/'));
......@@ -71,6 +83,7 @@ class CourseChart extends React.Component {
changeSchedule,
toEditCallStudents,
userPermission,
chartLoaded,
} = this.props;
const courseChartColumns = [{
title: '',
......@@ -903,46 +916,48 @@ class CourseChart extends React.Component {
const list = [{
id: 1,
}];
return (
<div className={`${pageStyle.coursechartbox} coursechartbox`}>
<div className={pageStyle.titlebox}>
<div className={pageStyle.leftbox} style={{ marginRight: '50px' }}>
<span className={pageStyle.title}>课表</span>
{/* <span className={pageStyle.selectdate} onClick={() => this.changeDate('pre')}>上周</span>
<span className={pageStyle.selectdate} onClick={() => this.changeDate('current')}>本周</span>
<span className={pageStyle.selectdate} onClick={() => this.changeDate('next')}>下周</span> */}
<Button.Group>
<Button onClick={() => this.changeDate('pre')}><Icon type="left" />上周</Button>
<Button onClick={() => this.changeDate('current')}>本周</Button>
<Button onClick={() => this.changeDate('next')}>下周<Icon type="right" /></Button>
</Button.Group>
</div>
<div className={pageStyle.rightbox}>
{hasBtnPower('sjd/indexstaic', 'planSchedule') &&
<BtnPermission btnId="30008">
<Button type="primary" onClick={goPlanCourse}>一键排课</Button>
</BtnPermission>
}
{LocalStorage.getItem('role') != 1 &&
<Select className={pageStyle.selectitem} value={scheduleListQueryParams.teacher_id} onChange={this.changeTeacher}>
<Option value="">全部老师</Option>
{teacherList.map(ele => (
<Option key={ele.id} value={ele.id}>{ele.nickname}</Option>
))
}
</Select>
}
return chartLoaded ?
(
<div className={`${pageStyle.coursechartbox} coursechartbox`}>
<div className={pageStyle.titlebox}>
<div className={pageStyle.leftbox} style={{ marginRight: '50px' }}>
<span className={pageStyle.title}>课表</span>
{/* <span className={pageStyle.selectdate} onClick={() => this.changeDate('pre')}>上周</span>
<span className={pageStyle.selectdate} onClick={() => this.changeDate('current')}>本周</span>
<span className={pageStyle.selectdate} onClick={() => this.changeDate('next')}>下周</span> */}
<Button.Group>
<Button onClick={() => this.changeDate('pre')}><Icon type="left" />上周</Button>
<Button onClick={() => this.changeDate('current')}>本周</Button>
<Button onClick={() => this.changeDate('next')}>下周<Icon type="right" /></Button>
</Button.Group>
</div>
<div className={pageStyle.rightbox}>
{hasBtnPower('sjd/indexstaic', 'planSchedule') &&
<BtnPermission btnId="30008">
<Button type="primary" onClick={goPlanCourse}>一键排课</Button>
</BtnPermission>
}
{LocalStorage.getItem('role') != 1 &&
<Select className={pageStyle.selectitem} value={scheduleListQueryParams.teacher_id} onChange={this.changeTeacher}>
<Option value="">全部老师</Option>
{teacherList.map(ele => (
<Option key={ele.id} value={ele.id}>{ele.nickname}</Option>
))
}
</Select>
}
</div>
</div>
<Table
bordered
columns={courseChartColumns}
dataSource={list}
loading={!chartLoaded}
rowKey="id"
pagination={false}
/>
</div>
<Table
bordered
columns={courseChartColumns}
dataSource={list}
rowKey="id"
pagination={false}
/>
</div>
);
) : (<div className={`${pageStyle.coursechartbox} coursechartbox`} style={{ textAlign: 'center', padding: '20px' }}><Spin size="large" tip="课表加载中..." /></div>);
}
}
CourseChart.propTypes = {
......@@ -954,6 +969,7 @@ function mapStateToProps(state) {
showWeekDaysArr,
scheduleList,
scheduleListQueryParams,
chartLoaded,
} = state.coursechart;
const {
userPermission,
......@@ -963,6 +979,7 @@ function mapStateToProps(state) {
showWeekDaysArr,
scheduleList,
scheduleListQueryParams,
chartLoaded,
};
}
export default connect(mapStateToProps)(CourseChart);
......
......@@ -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 = () => {
const { dispatch } = this.props;
......
......@@ -74,7 +74,6 @@ class SjdMenu extends React.Component {
} else {
headerPdl = 20;
}
console.log(isDepartment, 'isDepartment');
return (
<Header
className={SjdHeaderStyle.header}
......
......@@ -35,6 +35,7 @@ export default {
scheduleList: [],
scheduleListTotal: [],
scheduleListGetting: false,
chartLoaded: false,
},
subscriptions: {
setup({ dispatch, history }) { // eslint-disable-line
......@@ -174,6 +175,7 @@ export default {
scheduleList,
showWeekDaysArr,
useForQueryTimeStamp,
chartLoaded: true,
},
});
} else {
......@@ -231,6 +233,7 @@ export default {
scheduleList: [],
scheduleListTotal: [],
scheduleListGetting: false,
chartLoaded: false,
},
});
},
......
......@@ -501,6 +501,31 @@ export default {
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) {
yield put({
type: 'updateState',
......
......@@ -1234,7 +1234,6 @@ export default {
{
type: 'orgdesc',
data: {
},
},
],
......
......@@ -140,7 +140,6 @@ export default {
});
}
if (pathname === '/register') {
console.log('/register');
dispatch({
type: 'login/pageInit',
});
......@@ -184,31 +183,6 @@ export default {
dispatch({
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({
type: 'updateState',
payload: {
......@@ -887,11 +861,11 @@ export default {
});
}
if (pathname === '/sjd/singleclass') {
// dispatch({
// type: 'onlineclasses/pageInit',
// payload: {
// },
// });
dispatch({
type: 'onlineclasses/pageInit',
payload: {
},
});
dispatch({
type: 'onlineclasses/selectCourseList',
payload: {
......@@ -1095,7 +1069,7 @@ export default {
pathname: currentMenu.path,
}));
}
message.destroy();
// message.destroy();
},
* changeRoute({ payload }, { put, select }) {
const { path } = payload;
......@@ -1252,9 +1226,9 @@ export default {
}
},
* shiftSchool({ payload }, { put, select }) {
yield put({
type: 'pageInit',
});
// yield put({
// type: 'pageInit',
// });
yield put(routerRedux.replace({
pathname: '/erp/schoollist',
}));
......@@ -1273,9 +1247,9 @@ export default {
pathname: '/login',
}));
signouthide();
yield put({
type: 'pageInit',
});
// yield put({
// type: 'pageInit',
// });
message.destroy();
yield put({
type: 'updateState',
......
......@@ -762,7 +762,7 @@ class ClassMgtForm extends React.Component {
</div>
<div className={pageStyle.tablebox}>
<Table
rowKey={classList => classList.title}
rowKey={classList => classList.id}
dataSource={classList}
columns={columns}
scroll={{ x: 'max-content' }}
......
......@@ -237,7 +237,7 @@ class ClassMgtForm extends React.Component {
</div>
<div className={pageStyle.tablebox}>
<Table
rowKey={coursesinfo => coursesinfo.title}
rowKey={coursesinfo => coursesinfo.id}
dataSource={coursesinfo}
columns={columns}
scroll={{ x: 700 }}
......
......@@ -1195,14 +1195,6 @@ class StaticCenter extends React.Component {
loading={queryRepeatStudentsLoading}
dataSource={repeatStudentList}
/>
{/* <AddCourseTime */}
{/* visible={addCourseTimeShow} */}
{/* saveCourseTime={this.saveCourseTime} */}
{/* close={this.closeAddCourseTime} */}
{/* timeArr={timeArr} */}
{/* addTimeSubmitting={addTimeSubmitting} */}
{/* delTime={this.delTime} */}
{/* /> */}
<ChangeCourse
{...this.props}
scheduleStudentsizeChange={this.scheduleStudentsizeChange}
......
......@@ -1214,27 +1214,7 @@ class StudentMgt extends React.Component {
</div>
</div>
</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
// {...this.props}
operator={operator}
editClassInfo={editClassInfo}
teacherList={teacherList}
......
......@@ -21,5 +21,19 @@ module.exports = webpackMerge(baseconfig, {
"X-Custom-Foo": "bar",
"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 = {
},
plugins: [
new HtmlWebpackPlugin(devFile),
new webpack.DllReferencePlugin({
context: path.resolve(__dirname, '../'),
manifest: require('../lib/vendor-manifest.json'),
}),
new webpack.DefinePlugin({
// 'ENVIRONMENT': `"${ENVIRONMENT}"`,
// '__IMGCDN__' : `"${__IMGCDN__}"`,
......
......@@ -12,9 +12,9 @@ module.exports = webpackMerge(baseconfig, {
mode: 'production',
plugins: [
new BundleAnalyzerPlugin(),
new webpack.DllReferencePlugin({
context: path.resolve(__dirname, '../'),
manifest: require('../lib/vendor-manifest.json'),
}),
// new webpack.DllReferencePlugin({
// context: path.resolve(__dirname, '../'),
// manifest: require('../lib/vendor-manifest.json'),
// }),
],
});
\ No newline at end of file
......@@ -10,9 +10,9 @@ module.exports = webpackMerge(baseconfig, {
},
mode: 'production',
plugins: [
new webpack.DllReferencePlugin({
context: path.resolve(__dirname, '../'),
manifest: require('../lib/vendor-manifest.json'),
}),
// new webpack.DllReferencePlugin({
// context: path.resolve(__dirname, '../'),
// 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