Commit 28a7d0c3 authored by baixian's avatar baixian

优化

parents 49ad2416 4dc49266
......@@ -11,7 +11,7 @@
<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>
......@@ -19,5 +19,6 @@
<body>
<div id="root"></div>
<script src="dist/main.js?1577671604271" charset="utf-8"></script>
<script src="dist/main.js?1577671779865" charset="utf-8"></script>
</body>
</html>
\ No newline at end of file
</html>
......@@ -27,7 +27,14 @@ import {
} from 'antd';
import moment from 'moment';
import pageStyle from './index.less';
import { pageIn, hasBtnPower, DayCount, formatDay } from '../../utils/index';
import BtnPermission from '../../components/BtnPermission';
import {
pageIn,
hasBtnPower,
DayCount,
formatDay,
btnPermission,
} from '../../utils/index';
import CourseChart from '../../components/CourseChart';
import PlanCourse from '../../components/PlanCourse';
import ClassRoomMgt from '../classmgt/classRoomMgt';
......@@ -103,7 +110,11 @@ class StaticCenter extends React.Component {
});
}
createTheme = () => {
const { dispatch } = this.props;
const { dispatch, userPermission } = this.props;
if (!btnPermission(userPermission, 30002)) {
message.warn('暂无权限,请管理员开通【主题管理权限】', 1);
return;
}
dispatch({
type: 'createtheme/goTheme',
payload: {
......@@ -112,7 +123,11 @@ class StaticCenter extends React.Component {
});
}
createCalendarTheme = () => {
const { dispatch } = this.props;
const { dispatch, userPermission } = this.props;
if (!btnPermission(userPermission, 30002)) {
message.warn('暂无权限,请管理员开通【主题管理权限】', 1);
return;
}
dispatch({
type: 'createtheme/goTheme',
payload: {
......@@ -349,10 +364,16 @@ class StaticCenter extends React.Component {
}
// 添加学员方法
setModal1Visible(visible) {
const { dispatch, schoolUserInfo, guideShow } = this.props;
const {
dispatch, schoolUserInfo, guideShow, userPermission,
} = this.props;
if (guideShow) {
return;
}
if (visible == true && !btnPermission(userPermission, 30007)) {
message.warn('暂无权限,请管理员开通【添加学员】', 1);
return;
}
dispatch({
type: 'students/updateState',
payload: {
......@@ -704,7 +725,11 @@ class StaticCenter extends React.Component {
});
}
createCourse = () => {
const { dispatch } = this.props;
const { dispatch, userPermission } = this.props;
if (!btnPermission(userPermission, 50000)) {
message.warn('暂无权限,请管理员开通【新增课程权限】', 1);
return;
}
dispatch({
type: 'course/updateState',
payload: {
......@@ -750,7 +775,11 @@ class StaticCenter extends React.Component {
});
}
createClass = () => {
const { dispatch } = this.props;
const { dispatch, userPermission } = this.props;
if (!btnPermission(userPermission, 30001)) {
message.warn('暂无权限,请管理员开通【添加班级】', 1);
return;
}
dispatch({
type: 'classmgt/updateState',
payload: {
......@@ -1269,6 +1298,7 @@ function mapStateToProps(state) {
} = state.classdetail;
const {
schoolUserInfo,
userPermission,
} = state.webapp;
const {
guideShow,
......@@ -1344,6 +1374,7 @@ function mapStateToProps(state) {
editClassModalShow,
classSubmitting,
rulePlanDetail,
userPermission,
};
}
export default connect(mapStateToProps)(StaticCenter);
......
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