Commit 90d31a00 authored by baixian's avatar baixian

优化

parents 2b7d04ea 66e9983a
......@@ -11,13 +11,13 @@
<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>
<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?20191012222" charset="utf-8"></script>
</head>
</head>
<body>
<div id="root"></div>
<script src="dist/main.js?1577671604271" charset="utf-8"></script>
<script src="dist/main.js?1577678431815" charset="utf-8"></script>
</body>
</html>
</html>
\ No newline at end of file
......@@ -904,7 +904,11 @@ class CourseChart extends React.Component {
</Button.Group>
</div>
<div className={pageStyle.rightbox}>
{hasBtnPower('sjd/indexstaic', 'planSchedule') && <Button type="primary" onClick={goPlanCourse}>一键排课</Button>}
{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>
......
......@@ -8,6 +8,7 @@ import {
showWeekDay,
showMonthDay,
} from '../utils/index';
import rootMap from '../common/constants';
import errorcode from '../common/errorcode';
import * as headquartersAjax from '../services/headquarters';
export default {
......@@ -201,8 +202,9 @@ export default {
},
* goSchoolSystem({ payload }, { call, put, select }) {
const { school } = payload;
LocalStorage.setItem('sid', school.id);
LocalStorage.setItem('sid', school.school_id);
LocalStorage.setItem('role', 5);
LocalStorage.setItem('rootMap', rootMap.emptyRootMap);
yield put({
type: 'webapp/updateState',
payload: {
......
......@@ -179,6 +179,7 @@ class SjdIndex extends React.Component {
localStorage.clear();
mainDom = redirectLogin;
} else {
console.log(role, rootMap, sid, 'dasdasdas');
if (!role || !rootMap || !sid) {
mainDom = redirectSchoolList;
}
......
......@@ -6,7 +6,7 @@ import {
Redirect,
routerRedux,
} from 'dva/router';
import $ from 'jquery';
// import $ from 'jquery';
import { connect } from 'dva';
import {
message,
......@@ -112,7 +112,7 @@ class StaticCenter extends React.Component {
createTheme = () => {
const { dispatch, userPermission } = this.props;
if (!btnPermission(userPermission, 30002)) {
message.warn('暂无权限,请管理员开通【主题管理权限】', 1);
message.warn('暂无权限,请联系管理员开通【主题管理权限】', 1);
return;
}
dispatch({
......@@ -125,7 +125,7 @@ class StaticCenter extends React.Component {
createCalendarTheme = () => {
const { dispatch, userPermission } = this.props;
if (!btnPermission(userPermission, 30002)) {
message.warn('暂无权限,请管理员开通【主题管理权限】', 1);
message.warn('暂无权限,请联系管理员开通【主题管理权限】', 1);
return;
}
dispatch({
......@@ -371,7 +371,7 @@ class StaticCenter extends React.Component {
return;
}
if (visible == true && !btnPermission(userPermission, 30007)) {
message.warn('暂无权限,请管理员开通【添加学员】', 1);
message.warn('暂无权限,请联系管理员开通【添加学员】', 1);
return;
}
dispatch({
......@@ -727,7 +727,7 @@ class StaticCenter extends React.Component {
createCourse = () => {
const { dispatch, userPermission } = this.props;
if (!btnPermission(userPermission, 50000)) {
message.warn('暂无权限,请管理员开通【新增课程权限】', 1);
message.warn('暂无权限,请联系管理员开通【新增课程权限】', 1);
return;
}
dispatch({
......@@ -777,7 +777,7 @@ class StaticCenter extends React.Component {
createClass = () => {
const { dispatch, userPermission } = this.props;
if (!btnPermission(userPermission, 30001)) {
message.warn('暂无权限,请管理员开通【添加班级】', 1);
message.warn('暂无权限,请联系管理员开通【添加班级】', 1);
return;
}
dispatch({
......@@ -865,6 +865,7 @@ class StaticCenter extends React.Component {
editClassInfo,
editClassModalShow,
classSubmitting,
userPermission,
} = this.props;
const studentChangeScheduleColumns = [
{
......@@ -1110,24 +1111,28 @@ class StaticCenter extends React.Component {
<div className={pageStyle.informTip}>点名提醒</div>
</div>
</Col>
<Col xs={{ span: 8, offset: 0 }} sm={{ span: 8, offset: 0 }} md={{ span: 4, offset: 1 }} lg={{ span: 4, offset: 1 }} xl={{ span: 4, offset: 1 }}>
<div className={pageStyle.informItem} onClick={this.goPlanStudent}>
<div className={pageStyle.informImg} id="index_planwarn"><img src={`${__IMGCDN__}index/inform_icon3.png`} alt="" />
<Badge className={pageStyle.informNum} overflowCount={999} count={assign.total}>
</Badge>
{btnPermission(userPermission, 2) &&
<Col xs={{ span: 8, offset: 0 }} sm={{ span: 8, offset: 0 }} md={{ span: 4, offset: 1 }} lg={{ span: 4, offset: 1 }} xl={{ span: 4, offset: 1 }}>
<div className={pageStyle.informItem} onClick={this.goPlanStudent}>
<div className={pageStyle.informImg} id="index_planwarn"><img src={`${__IMGCDN__}index/inform_icon3.png`} alt="" />
<Badge className={pageStyle.informNum} overflowCount={999} count={assign.total}>
</Badge>
</div>
<div className={pageStyle.informTip}>分配提醒</div>
</div>
<div className={pageStyle.informTip}>分配提醒</div>
</div>
</Col>
<Col xs={{ span: 8, offset: 0 }} sm={{ span: 8, offset: 0 }} md={{ span: 4, offset: 1 }} lg={{ span: 4, offset: 1 }} xl={{ span: 4, offset: 1 }}>
<div className={pageStyle.informItem} onClick={this.goBirthStudent}>
<div className={pageStyle.informImg} id="index_birthwarn"><img src={`${__IMGCDN__}index/inform_icon4.png`} alt="" />
<Badge className={pageStyle.informNum} overflowCount={999} count={birthday.total}>
</Badge>
</Col>
}
{btnPermission(userPermission, 2) &&
<Col xs={{ span: 8, offset: 0 }} sm={{ span: 8, offset: 0 }} md={{ span: 4, offset: 1 }} lg={{ span: 4, offset: 1 }} xl={{ span: 4, offset: 1 }}>
<div className={pageStyle.informItem} onClick={this.goBirthStudent}>
<div className={pageStyle.informImg} id="index_birthwarn"><img src={`${__IMGCDN__}index/inform_icon4.png`} alt="" />
<Badge className={pageStyle.informNum} overflowCount={999} count={birthday.total}>
</Badge>
</div>
<div className={pageStyle.informTip}>生日提醒</div>
</div>
<div className={pageStyle.informTip}>生日提醒</div>
</div>
</Col>
</Col>
}
<Col xs={{ span: 8, offset: 0 }} sm={{ span: 8, offset: 0 }} md={{ span: 4, offset: 1 }} lg={{ span: 4, offset: 1 }} xl={{ span: 4, offset: 1 }}>
<div className={pageStyle.informItem} onClick={this.goLeaveShow}>
<div className={pageStyle.informImg} id="index_paywarn"><img src={`${__IMGCDN__}index/inform_icon6.png`} alt="" />
......@@ -1137,15 +1142,17 @@ class StaticCenter extends React.Component {
<div className={pageStyle.informTip}>请假提醒</div>
</div>
</Col>
<Col xs={{ span: 8, offset: 0 }} sm={{ span: 8, offset: 0 }} md={{ span: 4, offset: 1 }} lg={{ span: 4, offset: 1 }} xl={{ span: 4, offset: 1 }}>
<div className={pageStyle.informItem} onClick={this.goDeadlineStudent}>
<div className={pageStyle.informImg} id="index_paywarn"><img src={`${__IMGCDN__}index/inform_icon5.png`} alt="" />
<Badge className={pageStyle.informNum} overflowCount={999} count={renew.total}>
</Badge>
{btnPermission(userPermission, 2) &&
<Col xs={{ span: 8, offset: 0 }} sm={{ span: 8, offset: 0 }} md={{ span: 4, offset: 1 }} lg={{ span: 4, offset: 1 }} xl={{ span: 4, offset: 1 }}>
<div className={pageStyle.informItem} onClick={this.goDeadlineStudent}>
<div className={pageStyle.informImg} id="index_paywarn"><img src={`${__IMGCDN__}index/inform_icon5.png`} alt="" />
<Badge className={pageStyle.informNum} overflowCount={999} count={renew.total}>
</Badge>
</div>
<div className={pageStyle.informTip}>续费提醒</div>
</div>
<div className={pageStyle.informTip}>续费提醒</div>
</div>
</Col>
</Col>
}
</Row>
</Card>
</div>
......
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