Commit 4455953a authored by wangxuelai's avatar wangxuelai

'最新代码提交'

parent 54941bd2
......@@ -51,7 +51,14 @@
"jsx-a11y/media-has-caption": 0,
"no-useless-escape": 0,
"linebreak-style": [0 ,"error", "windows"],
"camelcase": 0,
"react/self-closing-comp": 0,
"react/sort-comp": 0,
"jsx-a11y/no-noninteractive-element-interactions": 0,
"react/no-danger": 0
"react/no-danger": "off",
"no-underscore-dangle": 0,
"react/no-did-mount-set-state": 0,
"react/no-did-update-set-state": 0,
"prefer-rest-params": 0
}
}
\ No newline at end of file
const path = require('path');
console.log(process.env.NODE_ENV);
export default {
"env": {
"development": {
......@@ -20,12 +19,9 @@ export default {
["import", { "libraryName": "antd", "libraryDirectory": "es", "style": true }]
],
"theme": {
"primary-color": "#3366ff",
"primary-color": "#1890FF",
"imagepath": process.env.NODE_ENV == 'production' ? "'https://cdn.img.shangjiadao.cn/qingxiao/biz/image/'" : "'http://localhost:80/image/'",
},
// extraBabelIncludes: [
// "node_modules/video-react",
// ],
es5ImcompatibleVersions: true,
"proxy": {
// "/api": {
......
import { pathify } from '../utils/index';
const { location } = window;
const basepath = `${location.protocol}//${pathify(window.location.host)}/`;
// const api = 'https://test.wp53.cn/v2/api/';
// const dakaapi = 'https:clock.wp53.cn/v3/';
const api = 'https://wx.m.shangjiadao.cn/v2/api/';
const dakaapi = 'https://wx.m.shangjiadao.cn/daka/v3/';
const api = 'https://test.wp53.cn/v2/api/';
const dakaapi = 'https:clock.wp53.cn/v3/';
// const api = 'https://wx.m.shangjiadao.cn/v2/api/';
// const dakaapi = 'https://wx.m.shangjiadao.cn/daka/v3/';
export default {
userRegister: `${api}service/user/register`,
getVerifyCode: `${api}service/user/verify_code`,
......@@ -19,7 +19,76 @@ export default {
teacherSchool: `${dakaapi}teacher/school`,
getTeachertoken: `${dakaapi}common/get_pc_token`,
generateQrcode: `${dakaapi}common/qr_code_unlimit`,
myNickname: `${dakaapi}member/school/my_nickname`,
myNickname: `${dakaapi}member/me`,
schedulesTime: `${dakaapi}member/erp/schedules_time`,
courseTemplate: `${dakaapi}member/erp/course_template`,
erpVerifyCode: `${dakaapi}common/sms`,
erpVerifyCodeCheck: `${dakaapi}common/sms/check`,
schoolLoginTime: `${dakaapi}member/erp/stronghold/login_time`,
newLogin: {
loginPost: `${dakaapi}common/business_login`,
},
userSetting: {
updateAvatar: `${dakaapi}member/erp/account/nickname_avatar`,
businessDetail: `${dakaapi}member/erp/account/business_detail`,
},
schoolList: {
getSchoolList: `${dakaapi}member/erp/account/index`,
joinSchoolConfirm: `${dakaapi}member/erp/stronghold/school/confirm`,
teacherInvitationConfirm: `${dakaapi}teacher/school/teacher/invitation`,
},
joinSchool: {
joinSchoolAdd: `${dakaapi}member/erp/stronghold/store`,
},
indexstaic: {
statistical: `${dakaapi}member/website/statistical`,
clockCharts: `${dakaapi}member/website/clock_charts`,
},
headquarter: {
headquarterIndex: `${dakaapi}member/erp/stronghold/index`,
headquarterAdd: `${dakaapi}member/erp/stronghold/school`,
headquarterDetail: `${dakaapi}member/erp/stronghold/school`,
headquarterDelete: `${dakaapi}member/erp/stronghold/school/destory`,
headquarterStatistics: `${dakaapi}member/erp/stronghold/school_charts1`,
headquarterCharts: `${dakaapi}member/erp/stronghold/school_charts`,
schoolstatistical: `${dakaapi}member/erp/stronghold/school_statistical`,
},
students: {
studentsinfo: `${dakaapi}member/erp/students`,
studentsReadList: `${dakaapi}member/erp/student/classes`,
studentsChoiceClass: `${dakaapi}member/erp/student/distribution`,
studentClassRecords: `${dakaapi}member/erp/student/calls`,
studentsLog: `${dakaapi}member/erp/student/logs`,
},
teachers: `${dakaapi}member/erp/teachers`,
courses: {
courses: `${dakaapi}member/erp/courses`,
coursesBuyOrRenew: `${dakaapi}member/erp/course/make`,
coursesExit: `${dakaapi}member/erp/course/exit`,
coursesChange: `${dakaapi}member/erp/course/change`,
coursesEliminate: `${dakaapi}member/erp/course/eliminate`,
},
teacherstatus: `${dakaapi}member/erp/teacher/status`,
classMgt: {
common: `${dakaapi}member/erp/classes`,
changeClassStatus: `${dakaapi}member/erp/class/status`,
addClassStudents: `${dakaapi}member/erp/class/student/add`,
plansAdd: `${dakaapi}member/erp/plans`,
},
teacherMgt: {
teacherInvitations: `${dakaapi}member/erp/teacher/invitations`,
},
studentMgt: {
studentsList: `${dakaapi}member/erp/students`,
studentsRemove: `${dakaapi}member/erp/student/remove`,
addStudentToClass: `${dakaapi}member/erp/class/student/add`,
studentAdjust: `${dakaapi}member/erp/student/adjust`,
},
coursePlanMgt: {
common: `${dakaapi}member/erp/plans`,
},
classroomMgt: `${dakaapi}member/erp/rooms`,
schedulestimeMgt: `${dakaapi}member/erp/schedules_time`,
officaialweb: {
schoolDetail: `${dakaapi}member/website/school/detail`,
courseDetail: `${dakaapi}member/website/course/detail`,
......@@ -32,12 +101,19 @@ export default {
moduleSort: `${dakaapi}member/website/school/module_sort`,
clockList: `${dakaapi}common/clock`,
},
indexstaic: {
statistical: `${dakaapi}member/website/statistical`,
clockCharts: `${dakaapi}member/website/clock_charts`,
schedule: `${dakaapi}member/erp/schedules`,
scheduleMgt: {
scheduleList: `${dakaapi}member/erp/schedules`,
scheduleDel: `${dakaapi}member/erp/schedules`,
scheduleUpdate: `${dakaapi}member/erp/schedules`,
studentScheduleAdjust: `${dakaapi}member/erp/schedule/student/adjust`,
studentCalls: `${dakaapi}member/erp/calls`,
},
classmgt: {
classList: `${dakaapi}member/class`,
todo: {
renew: `${dakaapi}member/erp/todo/renew`,
birthday: `${dakaapi}member/erp/todo/birthday`,
call: `${dakaapi}member/erp/todo/call`,
assign: `${dakaapi}member/erp/todo/assign`,
},
thememgt: {
themeList: `${dakaapi}member/subject/mixed`,
......
export default {
rootMap: {
'sjd/indexstaic': ['planSchedule'], // 首页: 一键排课
'sjd/student': ['addStudent', 'enrolCode', 'bundlingCode', 'checkClass', 'addCourseHours', 'removeCourseHours'], // 学员管理: 添加,自助报名二维码,自助绑定二维码,选班,续课,消课
'sjd/studentinfo': ['editStudent', 'addCourseHours', 'changeCourse', 'quitCourse'], // 学生详情: 续课,转课,退课
'sjd/classmgt': ['addClass', 'allWindingUp', 'callStudent', 'singleWindingUp'], // 班级管理: 添加班级,批量结业,点名,结业
'sjd/classdetail': ['editClass', 'planAllSchedule', 'removeAllPlans', 'editPlan', 'removePlan', 'addClassStudent', 'changeClass', 'removeClass', 'removeStudent', 'noPlanCallStudent', 'callStudnet', 'changeCourse', 'removeSchedule'], // 班级详情: 编辑班级,一键排课,批量删除,编辑,删除,添加学员,调班,移除,未排课直接点评,点名,调课,删除点名
'sjd/teacher': ['addTeacher', 'onOroff'], // 老师管理: 添加,启动状态
'sjd/teacherinfo': ['editTeacher', 'callStudnet', 'changeCourse', 'removePlan'], // 老师详情: 编辑,点名,调课,删除
'sjd/course': ['addCourse', 'editCourse', 'removeCourse'], // 课程管理: 新增课程,修改,删除
'sjd/institutions': ['editInstitutions'], // 机构信息: 编辑
'sjd/officialweb': ['editOfficialweb'], // 微官网管理: 装修微官网
},
emptyRootMap: {
'sjd/indexstaic': [], // 首页: 一键排课
'sjd/student': [], // 学员管理: 添加,自助报名二维码,自助绑定二维码,选班,续课,消课
'sjd/studentinfo': [], // 学生详情: 续课,转课,退课
'sjd/classmgt': [], // 班级管理: 添加班级,批量结业,点名,结业
'sjd/classdetail': [], // 班级详情: 编辑班级,一键排课,批量删除,编辑,删除,添加学员,调班,移除,未排课直接点评,点名,调课,删除点名
'sjd/teacher': [], // 老师管理: 添加,启动状态
'sjd/teacherinfo': [], // 老师详情: 编辑,点名,调课,删除
'sjd/course': [], // 课程管理: 新增课程,修改,删除
'sjd/institutions': [], // 课程管理: 编辑
'sjd/officialweb': [], // 微官网管理: 装修微官网
},
};
export default {
menus: [
{
id: '7',
name: '总部管理',
style: {
width: '20px',
height: '20px',
},
isFather: false,
activeurl: `${__IMGCDN__}menu/indexactive.png`,
notactiveurl: `${__IMGCDN__}menu/index.png`,
path: '/sjd/headquarters/index',
relativePath: ['/sjd/headquarters/index'],
},
{
id: '8',
name: '校区信息',
style: {
width: '20px',
height: '20px',
},
isFather: false,
activeurl: `${__IMGCDN__}menu/schoolinfoactive.png`,
notactiveurl: `${__IMGCDN__}menu/schoolinfo.png`,
path: '/sjd/headquarters/detail',
relativePath: ['/sjd/headquarters/detail'],
},
{
id: '9',
name: '校区统计',
style: {
width: '20px',
height: '20px',
},
isFather: false,
activeurl: `${__IMGCDN__}menu/schoolstaticactive.png`,
notactiveurl: `${__IMGCDN__}menu/schoolstatic.png`,
path: '/sjd/headquarters/static',
relativePath: ['/sjd/headquarters/static'],
},
],
};
......@@ -2,45 +2,107 @@ export default {
menus: [
{
id: '1',
name: '概况',
activeIcon: {
backgroundPosition: '-99px 0',
name: '首页',
isFather: false,
style: {
width: '20px',
height: '22px',
},
defaultIcon: {
backgroundPosition: '-67px 0',
},
activeurl: `${__IMGCDN__}menu/indexstaicactive.png`,
notactiveurl: `${__IMGCDN__}menu/indexstaicnotactive.png`,
activeurl: `${__IMGCDN__}menu/indexactive.png`,
notactiveurl: `${__IMGCDN__}menu/index.png`,
path: '/sjd/indexstaic',
relativePath: ['/sjd/indexstaic'],
},
{
id: '2',
name: '微官网管理',
activeIcon: {
backgroundPosition: '-99px -28px',
},
defaultIcon: {
backgroundPosition: '-67px -28px',
id: '5',
name: '学员管理',
isFather: false,
style: {
width: '20px',
height: '20px',
},
activeurl: `${__IMGCDN__}menu/officialwebactive.png`,
notactiveurl: `${__IMGCDN__}menu/officialwebnotactive.png`,
path: '/sjd/officialweb',
relativePath: ['/sjd/officialweb', '/sjd/officialwebeditor'],
activeurl: `${__IMGCDN__}menu/studentactive.png`,
notactiveurl: `${__IMGCDN__}menu/student.png`,
path: '/sjd/student',
relativePath: ['/sjd/student', '/sjd/studentinfo/:id', '/sjd/studentclass/:id'],
},
{
id: '3',
name: '班级管理',
activeIcon: {
backgroundPosition: '-99px -28px',
isFather: false,
style: {
width: '20px',
height: '20px',
},
defaultIcon: {
backgroundPosition: '-67px -28px',
},
activeurl: `${__IMGCDN__}menu/officialwebactive.png`,
notactiveurl: `${__IMGCDN__}menu/officialwebnotactive.png`,
activeurl: `${__IMGCDN__}menu/classactive.png`,
notactiveurl: `${__IMGCDN__}menu/class.png`,
path: '/sjd/classmgt',
relativePath: ['/sjd/classmgt', '/sjd/thememgt/:classid', '/sjd/clockmgt/:themetype/:classid/:themeid'],
relativePath: ['/sjd/classmgt', '/sjd/classdetail/:classid'],
},
{
id: '4',
name: '老师管理',
isFather: false,
style: {
width: '20px',
height: '20px',
},
activeurl: `${__IMGCDN__}menu/teacheractive.png`,
notactiveurl: `${__IMGCDN__}menu/teacher.png`,
path: '/sjd/teacher',
relativePath: ['/sjd/teacher', '/sjd/teacherinfo/:id'],
},
{
id: '6',
name: '课程管理',
isFather: false,
style: {
width: '20px',
height: '20px',
},
activeurl: `${__IMGCDN__}menu/courseactive.png`,
notactiveurl: `${__IMGCDN__}menu/course.png`,
path: '/sjd/course',
relativePath: ['/sjd/course'],
},
{
id: '7',
name: '机构管理',
isFather: false,
style: {
width: '20px',
height: '20px',
},
activeurl: `${__IMGCDN__}menu/orgmgtactive.png`,
notactiveurl: `${__IMGCDN__}menu/orgmgt.png`,
path: '/sjd/institutions',
relativePath: ['/sjd/institutions', '/sjd/schooledit'],
},
{
id: '2',
name: '小程序管理',
style: {
width: '20px',
height: '20px',
},
activeurl: `${__IMGCDN__}menu/minappactive.png`,
notactiveurl: `${__IMGCDN__}menu/minapp.png`,
isFather: true,
subMenues: [
{
id: '8',
fatherId: '2',
name: '微官网管理',
style: {
width: '20px',
height: '20px',
},
isFather: false,
noIcon: true,
path: '/sjd/officialweb',
relativePath: ['/sjd/officialweb', '/sjd/officialwebeditor'],
},
],
},
],
};
This diff is collapsed.
.activeamount{
background-color: #cccccc;
color: #666666;
text-align: center;
line-height: 50px;
font-size: 20px;
}
.hasSearch {
background-color: red;
color: #fff;
}
.endsearchcol {
margin-bottom: 24px;
}
\ No newline at end of file
.fileuploadinput{
height: 32px;
opacity: 0;
position: absolute;
height: 32px;
opacity: 0;
position: absolute;
}
.fileuploadlayer{
border: 1px solid #d9d9d9;
border-radius: 4px;
border: 1px solid #d9d9d9;
border-radius: 4px;
}
.delicon{
position: absolute;
top: 0;
right: 0;
position: absolute;
top: 0;
right: 0;
font-size: 26px;
line-height: 1;
display: block;
cursor: pointer;
color: red;
position: absolute;
top: 0;
right: 0;
position: absolute;
top: 0;
right: 0;
font-size: 26px;
line-height: 1;
display: block;
cursor: pointer;
color: red;
}
.avatorcontent{
white-space: nowrap;
overflow-x: auto;
text-align: center;
height: 125px;
white-space: nowrap;
overflow-x: auto;
text-align: center;
height: 125px;
}
.avatoritem{
width: 89px;
height: 77px;
display: table-cell;
vertical-align: middle;
position: relative;
border: 1px solid #eee;
margin-left: 20px;
img{
display: block;
width: auto;
max-height: 100%;
text-align: center;
margin: 0 auto;
max-width: 100%;
}
width: 89px;
height: 77px;
display: table-cell;
vertical-align: middle;
position: relative;
border: 1px solid #eee;
margin-left: 20px;
img{
display: block;
width: auto;
max-height: 100%;
text-align: center;
margin: 0 auto;
max-width: 100%;
}
}
.avatoritem:first-child{
margin-left: 0;
}
margin-left: 0;
}
\ No newline at end of file
This diff is collapsed.
.titlebox {
display: flex;
align-items: center;
justify-content: space-between;
height: 55px;
padding: 0 22px 0 24px;
.title {
font-size: 16px;
color: #000;
font-weight: 700;
padding-right: 30px;
}
.selectdate {
padding-right: 24px;
cursor: pointer;
&:hover {
color: #1890FF;
}
&:active {
color: #1890FF;
}
&:visited {
color: #1890FF;
}
}
.selectitem {
width: 130px;
height: 32px;
line-height: 32px;
margin-left: 15px;
}
}
.tableth {
position: relative;
width: 60px;
.weekday {
font-size: 16px;
color: #000;
font-weight: 700;
}
.idtoday {
position: absolute;
font-size: 12px;
color: #1890FF;
border: 1px solid #1890FF;
border-radius: 3px;
width: 18px;
height: 18px;
text-align: center;
line-height: 16px;
right: -18px;
top: 50%;
transform: translate(50%, -50%);
}
}
.timeitem {
height: 54px;
border-bottom: 1px solid rgba(0,0,0,0.05);
line-height: 54px;
color:rgba(0,0,0,0.65);
}
.scheduleplanbox {
position: relative;
.timeitemcell {
height:27px;
border-bottom: 1px solid rgba(0,0,0,0.05);
}
.courseInfoBox {
position: absolute;
display: flex;
// align-items: center;
// justify-content: center;
flex-direction: column;
word-break: break-all;
overflow: hidden;
cursor: pointer;
border-style: solid;
border-width: 1px;
border-top-width: 3px;
}
}
.courseDetailStyle {
.timebox {
display: flex;
align-items: center;
justify-content: space-between;
color: #FFFFFF;
padding: 0 15px 10px;
line-height: 1;
.left {
display: flex;
align-items: center;
.bluedot {
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: 9px;
background-color: #26B0FF;
}
.detailTime {
font-size: 15px;
}
}
}
.detailbox {
color: #fff;
display: flex;
align-items: center;
padding: 0 15px;
color: rgba(255,255,255,0.5);
line-height: 1;
padding-bottom: 10px;
font-size: 12px;
.whitedot {
width: 8px;
height: 4px;
border-radius: 2px;
margin-right: 9px;
background-color: rgba(255,255,255,0.5);
}
.name {
margin-right: 5px;
}
}
.classtitlebox {
text-align: center;
color: #FFFFFF;
font-size: 14px;
word-break: break-all;
padding: 10px 15px;
text-align: center;
}
:global {
.ant-popover-content {
width: 280px;
.ant-popover-content {
border-radius: 4px;
}
.ant-popover-inner-content {
background-color: rgba(0,0,0,0.7);
border-radius: 4px;
padding: 15px 0 0;
}
.ant-popover-arrow {
border-top-color: rgba(0, 0, 0, 0.7);
border-left-color: rgba(0, 0, 0, 0.7);
}
}
}
}
:global {
.coursechartbox {
.ant-table-thead {
tr {
th {
background-color: #fff;
padding: 6px;
}
}
}
.ant-table-row:hover {
td {
background-color: #fff!important;
}
}
.ant-table-tbody {
td {
padding: 0;
}
}
}
}
\ No newline at end of file
This diff is collapsed.
:global {
.modifyclassModal {
.ant-form-explain {
padding-left: 0;
}
}
}
.daybox {
width: 40px;
height: 40px;
text-align: center;
line-height: 40px;
border: 1px solid #D9D9D9;
border-radius: 50%;
margin-right: 11px;
cursor: pointer;
&.dayselectbox {
color: #1890FF;
border-color: #1890FF;
}
}
.calendarbox {
box-shadow:0px 2px 8px 0px rgba(0,0,0,0.15);
border-radius:4px;
background:rgba(255,255,255,1);
display: inline-block;
width: 280px;
.totoday {
border-top: 1px solid rgba(0,0,0,0.09);
line-height: 40px;
text-align: center;
color: #108EE9;
cursor: pointer;
}
.dayselect {
border-bottom: 1px solid rgba(0,0,0,0.09);
line-height: 40px;
// display: flex;
padding: 0 20px;
// align-items: center;
text-align: center;
.doubleleft, .arrowleft {
float: left;
cursor: pointer;
padding-right: 10px;
}
.doubleright, .arrowright {
float: right;
cursor: pointer;
padding-left: 10px;
}
.currentmonth {
justify-content: center;
}
}
.notopen {
opacity: .5;
}
}
.dayrow {
display: flex;
.weekday {
width: 30px;
height: 30px;
text-align: center;
line-height: 30px;
color: #000;
font-weight: 500;
margin: 0px 5px 0px 5px;
}
.dayitem {
width: 30px;
height: 30px;
text-align: center;
line-height: 30px;
cursor: pointer;
margin: 0px 5px 0px 5px;
color: rgba(0, 0, 0, 0.5);
border-radius: 2px;
&.current {
color: rgba(0,0,0,1);
}
&.istoday {
border:1px solid rgba(24,144,255,1);
color: #1890FF;
}
&:hover {
background-color: #E6F7FF;
}
&.dayselected {
background-color:#1890FF;
color: #fff;
}
}
}
\ No newline at end of file
import React from 'react';
import { connect } from 'dva';
import { Icon, Layout, Menu, Dropdown, Modal } from 'antd';
import { Icon, Layout, Menu, Dropdown, Modal, Breadcrumb } from 'antd';
import SjdHeaderStyle from './SjdHeader.less';
import { LocalStorage, imagify } from '../../src/utils/index';
const { Header } = Layout;
......@@ -8,6 +8,8 @@ class SjdMenu extends React.Component {
constructor(props) {
super(props);
this.state = {
teachername: LocalStorage.getItem('schoolinfo') ? LocalStorage.getItem('schoolinfo').school_teacher.nickname : '',
role: LocalStorage.getItem('role'),
};
}
componentWillMount() {
......@@ -24,7 +26,7 @@ class SjdMenu extends React.Component {
signOut = ({ item, key, keyPath }) => {
const { dispatch } = this.props;
switch (key) {
case '0':
case '1':
dispatch({
type: 'webapp/signout',
payload: {
......@@ -32,18 +34,39 @@ class SjdMenu extends React.Component {
},
});
break;
case '0':
dispatch({
type: 'webapp/shiftSchool',
});
break;
default:
console.log('default');
break;
}
}
routeChange = (path) => {
const { dispatch } = this.props;
if (window.location.hash.indexOf(path) == 1) {
return;
}
dispatch({
type: 'webapp/changeRoute',
payload: {
path,
},
});
}
render() {
const {
collapsed, userInfo, screenIsBig, breadcrumbList,
collapsed, schoolUserInfo, screenIsBig, breadcrumbList, isDepartment, userInfo,
} = this.props;
const { teachername, role } = this.state;
const menu = (
<Menu onClick={this.signOut}>
<Menu.Item key="0">
<a href="javascript:;">切换校区</a>
</Menu.Item>
<Menu.Item key="1">
<a href="javascript:;">退出</a>
</Menu.Item>
</Menu>
......@@ -66,7 +89,7 @@ class SjdMenu extends React.Component {
width: '100%',
left: 0,
top: 0,
zIndex: 999,
zIndex: 99,
height: '60px',
lineHeight: '60px',
}}>
......@@ -77,7 +100,7 @@ class SjdMenu extends React.Component {
/>
{breadcrumbList.length == 1 &&
<div className={SjdHeaderStyle.breadbox}>
<div className={`${SjdHeaderStyle.breaditembold} ${SjdHeaderStyle.breaditem}`}>
<div className={`${SjdHeaderStyle.breaditembold} ${SjdHeaderStyle.breaditem}`} onClick={() => { this.routeChange(breadcrumbList[0].path); }}>
{breadcrumbList[0].name}
</div>
</div>
......@@ -85,16 +108,24 @@ class SjdMenu extends React.Component {
{breadcrumbList.length > 1 &&
<div className={SjdHeaderStyle.breadbox}>
{breadcrumbList.map((ele, index) => (
<div className={SjdHeaderStyle.breaditem}>
<div className={`${(index + 1) == breadcrumbList.length ? SjdHeaderStyle.breaditembold : ''} ${SjdHeaderStyle.breaditem}`} onClick={() => { this.routeChange(ele.path); }}>
{ele.name}&nbsp;&nbsp;{index < breadcrumbList.length - 1 ? '/' : ''}&nbsp;&nbsp;
</div>
))}
</div>
}
<div className={SjdHeaderStyle.useraccount}>
<span className={SjdHeaderStyle.usermobile}>{(userInfo && userInfo.nickname) || ''}</span>
<img alt={(userInfo && userInfo.name) || ''} src={(userInfo && imagify(userInfo.avatar)) || ''} className={SjdHeaderStyle.avator} />
</div>
{!isDepartment &&
<div className={SjdHeaderStyle.useraccount}>
<span className={SjdHeaderStyle.usermobile}>{(schoolUserInfo && schoolUserInfo.nickname) || ''}</span>
<img alt={(schoolUserInfo && schoolUserInfo.name) || ''} src={(schoolUserInfo && imagify(schoolUserInfo.avatar)) || ''} className={SjdHeaderStyle.avator} />
</div>
}
{isDepartment &&
<div className={SjdHeaderStyle.useraccount}>
<span className={SjdHeaderStyle.usermobile}>{(userInfo && userInfo.nickname) || ''}</span>
<img alt={(userInfo && userInfo.name) || ''} src={(userInfo && imagify(schoolUserInfo.avatar)) || ''} className={SjdHeaderStyle.avator} />
</div>
}
<div className={SjdHeaderStyle.accountoperate}>
<Dropdown overlay={menu} trigger={['click']}>
<Icon type="caret-down" className={SjdHeaderStyle.caretDown} />
......@@ -109,13 +140,15 @@ SjdMenu.propTypes = {
};
function mapStateToProps(state) {
const {
collapsed, userInfo, screenIsBig, breadcrumbList,
collapsed, schoolUserInfo, screenIsBig, breadcrumbList, isDepartment, userInfo,
} = state.webapp;
return {
collapsed,
userInfo,
schoolUserInfo,
screenIsBig,
breadcrumbList,
isDepartment,
userInfo,
};
}
export default connect(mapStateToProps)(SjdMenu);
import React from 'react';
import { connect } from 'dva';
import { routerRedux } from 'dva/router';
import { Menu, Icon, Layout } from 'antd';
import SjdMenuStyle from './SjdMenu.less';
import {
pageIn,
LocalStorage,
SessionStorage,
// isOnline,
translateType,
} from '../utils/index';
const { SubMenu } = Menu;
const { Sider } = Layout;
class SjdMenu extends React.Component {
constructor(props) {
super(props);
this.state = {
avatar: '',
nickname: '',
};
}
componentWillMount() {
......@@ -21,20 +28,56 @@ class SjdMenu extends React.Component {
}
componentWillUnmount() {
}
selectedMenu = (key) => {
selectedMenu = (id, fatherId) => {
const { dispatch } = this.props;
dispatch({
type: 'webapp/menuselected',
payload: key,
payload: {
id,
fatherId,
},
});
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;
dispatch({
type: 'webapp/goHome',
payload: {
},
});
}
render() {
const { menus, defaultMenu, collapsed } = this.props;
const { avatar, nickname } = this.state;
const menuItemStyle = {
fontSize: '13px',
height: '40px',
paddingLeft: '35px',
display: 'flex',
alignItems: 'center',
};
const padding = {
paddingLeft: '5px',
};
const fontSize = {
fontSize: '13px',
};
return (
<Layout>
......@@ -47,26 +90,44 @@ class SjdMenu extends React.Component {
height: '100vh',
// position: 'fixed',
left: 0,
zIndex: 1002,
zIndex: 100,
}}
className={SjdMenuStyle.menusider}
className={`${SjdMenuStyle.menusider} menusider`}
>
<div>
<div className={collapsed ? SjdMenuStyle.collapsedlogo : SjdMenuStyle.uncollapsedlogo} />
<div className={collapsed ? SjdMenuStyle.collapsedlogo : SjdMenuStyle.uncollapsedlogo} onClick={this.goHome} />
<Menu
theme="dark"
mode="inline"
defaultSelectedKeys={[defaultMenu]}
selectedKeys={defaultMenu}
className={SjdMenuStyle.menu}
onClick={this.selectedMenu}
>
{
menus.map(ele => (
<Menu.Item key={ele.id} style={menuItemStyle}>
<div className={SjdMenuStyle.menuicon} style={defaultMenu === ele.id ? { backgroundImage: `url(${ele.activeurl})` } : { backgroundImage: `url(${ele.notactiveurl})` }} />
<Icon style={{ width: 0, minWidth: 'initial' }} />
<span>{ele.name}</span>
</Menu.Item>
!ele.isFather ?
<Menu.Item key={ele.id} style={menuItemStyle} onClick={() => this.selectedMenu(ele.id, null)}>
<div className={SjdMenuStyle.menuicon} style={defaultMenu == ele.id ? { width: ele.style.width, height: ele.style.height, backgroundImage: `url(${ele.activeurl})` } : { width: ele.style.width, height: ele.style.height, backgroundImage: `url(${ele.notactiveurl})` }} />
<Icon style={{ width: 0, minWidth: 'initial' }} />
<span>{ele.name}</span>
</Menu.Item> :
<SubMenu
key="sub1"
title={
<span style={padding}>
<div className={SjdMenuStyle.menuicon} style={defaultMenu == ele.id ? { width: ele.style.width, height: ele.style.height, backgroundImage: `url(${ele.activeurl})` } : { width: ele.style.width, height: ele.style.height, backgroundImage: `url(${ele.notactiveurl})` }} />
<Icon style={{ width: 0, minWidth: 'initial' }} />
<span style={fontSize}>{ele.name}</span>
</span>
}
>
{ele.subMenues.map(submenu => (
<Menu.Item key={submenu.id} style={menuItemStyle} onClick={() => this.selectedMenu(submenu.id, submenu.fatherId)}>
<div className={SjdMenuStyle.menuicon} style={defaultMenu == submenu.id ? { width: submenu.style.width, height: submenu.style.height, backgroundImage: `url(${submenu.activeurl})` } : { width: submenu.style.width, height: submenu.style.height, backgroundImage: `url(${submenu.notactiveurl})` }} />
<Icon style={{ width: 0, minWidth: 'initial' }} />
<span>{submenu.name}</span>
</Menu.Item>
))}
</SubMenu>
))
}
</Menu>
......
@import '../less/variables.less';
@images: '@{imagesroot}';
:global {
.menusider {
.ant-menu-inline-collapsed > .ant-menu-item, .ant-menu-inline-collapsed > .ant-menu-item-group > .ant-menu-item-group-list > .ant-menu-item, .ant-menu-inline-collapsed > .ant-menu-item-group > .ant-menu-item-group-list > .ant-menu-submenu > .ant-menu-submenu-title, .ant-menu-inline-collapsed > .ant-menu-submenu > .ant-menu-submenu-title {
padding: 0 26px !important;
}
}
}
.uncollapsedlogo {
height: 45px;
width: 58px;
......
import React from 'react';
import { Button, Row, Icon, Col, Input, Select, Pagination, Radio, DatePicker, Modal, Form, TimePicker, InputNumber, Table } from 'antd';
const { Option } = Select;
class OpeartorChangeForm extends React.Component {
componentDidMount() { // 挂载
}
componentDidUpdate() {
}
componentWillUnmount() { // 卸载
}
sureOperate = () => {
const { form, sureOperateChange } = this.props;
form.validateFields((err, values) => {
if (!err) {
sureOperateChange(values);
}
});
}
render() {
const {
teacherList,
visible,
operator,
onHide,
} = this.props;
const { getFieldDecorator } = this.props.form;
return (
<div>
<Modal
visible={visible}
title="选择你要变更的操作人"
okText="确定"
onCancel={onHide}
onOk={this.sureOperate}
zIndex={111}
maskClosable={false}
width={433}
centered
>
<Form labelAlign="left" className="addstudentcontent">
<Form.Item
label="操作人"
labelCol={{
xs: { span: 24 },
sm: { span: 6 },
}}
wrapperCol={{
xs: { span: 24 },
sm: { span: 18 },
}}
>
{getFieldDecorator('operator_id', {
initialValue: operator.id,
rules: [
{
required: true,
message: '请选择操作人',
},
],
})(<Select>{teacherList.map(ele => <Option value={ele.id}>{ele.nickname}</Option>)}</Select>)
}
</Form.Item>
</Form>
</Modal>
</div>
);
}
}
OpeartorChangeForm.propTypes = {
};
const OpeartorChange = Form.create()(OpeartorChangeForm);
export default OpeartorChange;
import React from 'react';
import { Modal, Icon } from 'antd';
import { imagify } from '../utils/index';
import pageStyle from './qrcodeShow.less';
class qrcodeShow extends React.Component {
constructor(props) {
super(props);
this.state = {
// date: '',
};
}
componentDidMount() { // 挂载
}
componentWillUnmount() { // 卸载
}
render() {
const {
previewQrcodeShow,
previewQrcode,
closeQrcodeShow,
title,
} = this.props;
return (
<div className={pageStyle.container} style={{ display: previewQrcodeShow ? 'flex' : 'none' }}>
<div className={pageStyle.mask}></div>
<div className={pageStyle.qrcodeBox}>
<Icon type="close-circle" className={pageStyle.closeIcon} onClick={closeQrcodeShow} />
<div className={pageStyle.boxHeader}>
<div className={pageStyle.headerTitle}>{title}</div>
</div>
<div className={pageStyle.qrCode}>
<img className={pageStyle.qrCodeImage} src={imagify(previewQrcode)} alt="" />
</div>
</div>
</div>
);
}
}
qrcodeShow.propTypes = {
};
export default qrcodeShow;
@import '../less/variables.less';
@keyframes qrCodefadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.container {
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 200;
display: flex;
align-items: center;
justify-content: center;
}
.mask {
position: absolute;
z-index: 1;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.5);
}
.qrcodeBox {
width: 520px;
height: 320px;
border-radius: 10px;
background-color: #fff;
position: relative;
z-index: 2;
animation: qrCodefadeIn 0.1s linear 1 forwards;
// overflow: hidden;
}
.boxHeader {
height: 150px;
background-image: url('@{imagesroot}qrboxheader.png');
background-size: 100% 100%;
}
.headerTitle {
color: #fff;
text-align: center;
font-size: 18px;
line-height: 1;
padding-top: 34px;
}
.closeIcon {
position: absolute;
font-size: 30px;
color: rgba(255, 255, 255 ,0.7);
// right: 0;
// top: 0;
right: -15px;
z-index: 2;
top: -15px;
cursor: pointer;
&:hover {
transition: 0.2s;
color: rgba(255, 255, 255 ,1);
}
}
.qrCode {
text-align: center;
}
.qrCodeImage {
width: 160px;
height: 160px;
display: block;
margin: -10px auto 0;
}
\ No newline at end of file
......@@ -2,10 +2,9 @@
@import './less/variables.less';
@import './less/reboot.less';
html, body, :global(#root) {
// height: 100%;
height: 100%;
min-height: 500px;
}
:global{
.clearfix::aftre{
content: '';
......@@ -14,11 +13,30 @@ html, body, :global(#root) {
height: 0;
clear: both;
}
.ant-empty-description {
color: rgba(0,0,0,0.6);
}
.ant-table{
table{
.ant-table-column-sorter {
.anticon-caret-down, .anticon-caret-up {
font-size: 16px;
.ant-table-column-sorter {
.anticon-caret-down, .anticon-caret-up {
font-size: 16px;
}
}
.ant-table-footer {
padding: 0;
.tablefooterbox {
color: rgba(0,0,0,0.6);
font-size: 16px;
line-height: 50px;
display: flex;
background-color: #fff;
align-items: center;
justify-content: space-between;
padding-left: 14px;
padding-right: 14px;
.tablefooterstatic {
color:rgba(0,0,0,0.65);
font-size: 14px;
}
}
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -557,7 +557,13 @@ export default {
},
});
} else {
message.error(commonBatchReviewData.msg, 1.5);
yield put({
type: 'webapp/errorrequestresolve',
payload: {
data: commonBatchReviewData,
},
});
// message.error(commonBatchReviewData.msg, 1.5);
}
yield put({
type: 'updateState',
......@@ -769,7 +775,13 @@ export default {
if (commonBatchReviewData.code == 200) {
message.success('点评成功', 1.5);
} else {
message.error(commonBatchReviewData.msg, 1.5);
yield put({
type: 'webapp/errorrequestresolve',
payload: {
data: commonBatchReviewData,
},
});
// message.error(commonBatchReviewData.msg, 1.5);
}
},
* singlePrivitecommentSwitch({ payload }, { call, put, select }) {
......@@ -856,7 +868,13 @@ export default {
if (commonBatchReviewData.code == 200) {
message.success('点评成功', 1.5);
} else {
message.error(commonBatchReviewData.msg, 1.5);
yield put({
type: 'webapp/errorrequestresolve',
payload: {
data: commonBatchReviewData,
},
});
// message.error(commonBatchReviewData.msg, 1.5);
}
yield put({
type: 'updateState',
......@@ -943,7 +961,13 @@ export default {
},
});
} else {
message.error(themeDetailData.msg, 1);
yield put({
type: 'webapp/errorrequestresolve',
payload: {
data: themeDetailData,
},
});
// message.error(themeDetailData.msg, 1);
}
} else if (themetype == 3) {
const loadmessage = message.loading('数据加载中...', 0);
......@@ -967,7 +991,13 @@ export default {
},
});
} else {
message.error(unclockthemeDetailData.msg, 1);
yield put({
type: 'webapp/errorrequestresolve',
payload: {
data: unclockthemeDetailData,
},
});
// message.error(unclockthemeDetailData.msg, 1);
}
if (unlockSubjectLocksData.code == 200 && unlockSubjectLocksData.data) {
yield put({
......@@ -989,7 +1019,13 @@ export default {
},
});
} else {
message.error(unclockthemeDetailData.msg, 1);
yield put({
type: 'webapp/errorrequestresolve',
payload: {
data: unclockthemeDetailData,
},
});
// message.error(unclockthemeDetailData.msg, 1);
}
} else if (themetype == 2) {
let newcalendarDays = calendarDays;
......@@ -1473,7 +1509,13 @@ export default {
});
}
} else {
message.error(clockListData.msg, 1);
yield put({
type: 'webapp/errorrequestresolve',
payload: {
data: clockListData,
},
});
// message.error(clockListData.msg, 1);
}
},
* goclockmgt({ payload }, { call, put, select }) {
......@@ -1605,7 +1647,7 @@ export default {
yield put({
type: 'webapp/errorrequestresolve',
payload: {
code: uploadSignature.code,
code: uploadSignature,
},
});
}
......@@ -1715,7 +1757,7 @@ export default {
},
});
},
* initialpage({ payload }, { call, put, select }) {
* pageInit({ payload }, { call, put, select }) {
yield put({
type: 'updateState',
payload: {
......@@ -1769,7 +1811,7 @@ export default {
batchPrivitecommentOpen: true,
quickCommentParams: {
common: {
flag: 3,
flag: '',
content: '',
video: '',
audio: '',
......@@ -1797,7 +1839,7 @@ export default {
},
singleCommentParams: {
common: {
flag: 3,
flag: '',
content: '',
video: '',
audio: '',
......@@ -1825,7 +1867,7 @@ export default {
},
batchCommentParams: {
common: {
flag: 3,
flag: '',
content: '',
video: '',
audio: '',
......@@ -1861,6 +1903,18 @@ export default {
quickCommentSubmiting: false,
tabIndex: 1,
placeTopSubmiting: false,
stampImgArr: [1, 2, 3, 4, 5, 6, 7], // 盖章图片
singleSelectedStamp: '',
batchSelectedStamp: '',
quickSelectedStamp: '',
preOreNextLoading: false,
oldWordsList: [
'非常棒的打卡!给你一个大大的赞',
'还不错呢,下次继续努力',
'要加油哦,快看看其他小伙伴都是怎么打卡的',
],
shortWordsList: [],
shortWordPosting: false,
},
});
},
......
import { routerRedux } from 'dva/router';
import { message } from 'antd';
import {
LocalStorage,
SessionStorage,
isExpired,
} from '../utils/index';
import errorcode from '../common/errorcode';
import * as courseAjax from '../services/course';
export default {
namespace: 'course',
state: {
sid: 0,
coursesinfo: [],
extra: {},
age: '',
studentSubmiting: false,
coursesid: 0,
colorList: [
{
value: 1,
color: '#FF9A6C',
},
{
value: 2,
color: '#FF5971',
},
{
value: 3,
color: '#82D7FE',
},
{
value: 4,
color: '#38E0C9',
},
{
value: 5,
color: '#BD9FFF',
},
],
editCourseInfo: {
id: 0,
school_id: 0,
title: '',
color: 1,
mode_time: 1,
mode_interval: 1,
mode_class: 1,
rule_leave: 1,
rule_absent: 1,
},
editCourseModalShow: false,
},
subscriptions: {
setup({ dispatch, history }) { // eslint-disable-line
},
},
effects: {
* chooseColor({ payload }, { call, put, select }) {
const { color } = payload;
const { editCourseInfo } = yield select(state => state.course);
editCourseInfo.color = color.value;
yield put({
type: 'updateState',
payload: {
editCourseInfo: { ...editCourseInfo },
},
});
},
* courseModelList({ payload }, { call, put, select }) {
const { sid } = yield select(state => state.webapp);
const loadmessage = message.loading('数据加载中...', 0);
const courselistinfo = yield call(courseAjax.courseList, {
school_id: sid,
page: 1,
perPage: 100,
extra: 'student_course',
});
setTimeout(loadmessage);
if (courselistinfo.code == 200) {
yield put({
type: 'updateState',
payload: {
sid,
coursesinfo: courselistinfo.data && courselistinfo.data.list,
},
});
} else {
yield put({
type: 'webapp/errorrequestresolve',
payload: {
data: courselistinfo,
},
});
// message.error(courselistinfo.msg, 1);
}
},
* getSelectedCourse({ payload }, { call, put, select }) {
const { course } = payload;
yield put({
type: 'updateState',
payload: {
editCourseInfo: { ...course },
editCourseModalShow: true,
},
});
},
* courseModelAdd({ payload }, { call, put, select }) {
const { sid } = yield select(state => state.webapp);
const { courseSubmiting, editCourseInfo } = yield select(state => state.course);
if (courseSubmiting) {
return;
}
yield put({
type: 'updateState',
payload: {
courseSubmiting: true,
},
});
const {
title,
mode_time,
mode_interval,
mode_class,
rule_leave,
rule_absent,
} = payload;
const loadmessage = message.loading('课程保存中...', 0);
const postFunction = editCourseInfo.id != 0 ? courseAjax.coursePut : courseAjax.courseAdd;
const data = yield call(postFunction, Object.assign(editCourseInfo, {
school_id: sid,
title,
mode_time,
mode_interval,
mode_class,
rule_leave,
rule_absent,
}));
yield put({
type: 'updateState',
payload: {
courseSubmiting: false,
},
});
setTimeout(loadmessage);
if (data.code == 200) {
yield put({
type: 'courseModelList',
});
yield put({
type: 'updateState',
payload: {
editCourseModalShow: false,
editCourseInfo: {
id: 0,
school_id: 0,
title: '222',
color: 1,
mode_time: 1,
mode_interval: 1,
mode_class: 1,
rule_leave: 1,
rule_absent: 1,
},
},
});
message.success('课程保存成功', 1);
} else {
yield put({
type: 'webapp/errorrequestresolve',
payload: {
data,
},
});
// message.error(data.msg, 1);
}
},
* courseModelDelete({ payload }, { call, put, select }) {
const { id } = payload;
const loadmessage = message.loading('数据提交中...', 0);
const coursedelete = yield call(courseAjax.courseDelete, {
id: payload.id,
});
setTimeout(loadmessage);
if (coursedelete.code == 200) {
yield put({
type: 'webapp/updateState',
});
yield put({
type: 'courseModelList',
payload: {
// 1
},
});
} else {
// yield put({
// type: 'updateState',
// });
yield put({
type: 'webapp/errorrequestresolve',
payload: {
data: coursedelete,
},
});
// message.error(coursedelete.msg, 1);
}
},
* pageInit({ payload }, { call, put, select }) {
yield put({
type: 'updateState',
payload: {
sid: 0,
coursesinfo: [],
extra: {},
age: '',
studentSubmiting: false,
coursesid: 0,
colorList: [
{
value: 1,
color: '#FF9A6C',
},
{
value: 2,
color: '#FF5971',
},
{
value: 3,
color: '#82D7FE',
},
{
value: 4,
color: '#38E0C9',
},
{
value: 5,
color: '#BD9FFF',
},
],
editCourseInfo: {
id: 0,
school_id: 0,
title: '',
color: 1,
mode_time: 1,
mode_interval: 1,
mode_class: 1,
rule_leave: 1,
rule_absent: 1,
},
editCourseModalShow: false,
},
});
},
},
reducers: {
save(state, action) {
return { ...state, ...action.payload };
},
updateState(state, action) {
return { ...state, ...action.payload };
},
},
};
import { routerRedux } from 'dva/router';
import { message } from 'antd';
import {
LocalStorage,
SessionStorage,
isExpired,
showWeekDay,
showWeekDays,
} from '../utils/index';
import errorcode from '../common/errorcode';
import * as schedulemgtAjax from '../services/schedulemgt';
export default {
namespace: 'coursechart',
state: {
currentTimeStamp: 0,
useForQueryTimeStamp: 0,
showWeekDaysArr: '',
scheduleListQueryParams: {
school_id: '',
teacher_id: '',
start_time: '',
end_time: '',
status: '',
course_id: '',
class_id: '',
class_room_id: '',
week_start_time: '',
week_end_time: '',
extra: '',
sort_type: '',
my: '',
},
scheduleList: [],
scheduleListTotal: [],
scheduleListGetting: false,
},
subscriptions: {
setup({ dispatch, history }) { // eslint-disable-line
},
},
effects: {
* queryInfo({ payload }, { call, put, select }) {
const { dateTime } = payload;
const currentTimestamp = new Date(dateTime.replace(/-/g, '/')).getTime();
yield put({
type: 'updateState',
payload: {
currentTimeStamp: currentTimestamp,
useForQueryTimeStamp: currentTimestamp,
},
});
yield put({
type: 'queryScheduleList',
});
},
* changeTeacher({ payload }, { call, put, select }) {
const { scheduleListQueryParams, useForQueryTimeStamp } = yield select(state => state.coursechart);
const { value } = payload;
scheduleListQueryParams.teacher_id = value;
yield put({
type: 'updateState',
payload: {
scheduleListQueryParams: { ...scheduleListQueryParams },
},
});
yield put({
type: 'queryScheduleList',
payload: {
useForQueryTimeStamp,
},
});
},
* queryScheduleList({ payload }, { call, put, select }) {
// const { useForQueryTimeStamp } = payload;
const { currentTimeStamp, scheduleListQueryParams, useForQueryTimeStamp } = yield select(state => state.coursechart);
const { sid } = yield select(state => state.webapp);
const showWeekDayObj = showWeekDay(useForQueryTimeStamp);
const showWeekDaysArr = showWeekDays(useForQueryTimeStamp, currentTimeStamp);
const newScheduleListQueryParams = Object.assign(scheduleListQueryParams, {
school_id: sid,
// course_id: classDetail.course_id,
// class_id: classId,
start_time: showWeekDayObj.weekFirstDay,
end_time: showWeekDayObj.weekLastDay,
my: LocalStorage.getItem('role') == 1 ? 1 : '',
type: 1,
});
const queryScheduleListData = yield call(schedulemgtAjax.scheduleList, newScheduleListQueryParams);
if (queryScheduleListData.code == 200) {
const scheduleList = [];
showWeekDaysArr.forEach((weekday) => {
const weedaySchedule = queryScheduleListData.data.list.filter(schedule => schedule.start_date == weekday.date); // 分组数据周一的一条 周二的一条 周三。。周四...周五...周六...周日。。。
weedaySchedule.forEach((ele) => {
const ELE = ele;
ELE.startTimeStamp = new Date(ele.start_time.replace(/-/g, '/')).getTime();
ELE.endTimeStamp = new Date(ele.end_time.replace(/-/g, '/')).getTime();
ELE.relativeSchedules = [ELE.id];
});
scheduleList.push(weedaySchedule);
});
scheduleList.forEach((weekdayschedules, index) => {
for (let i = 0, Length = weekdayschedules.length; i < Length; i++) {
const current = i;
let next = i + 1;
if (next == weekdayschedules.length) {
return;
}
while (next < weekdayschedules.length) {
const start1 = weekdayschedules[current].startTimeStamp;
const end1 = weekdayschedules[current].endTimeStamp;
const start2 = weekdayschedules[next].startTimeStamp;
const end2 = weekdayschedules[next].endTimeStamp;
if ((start1 < start2 && end1 < end2 && end1 > start2) || (start1 > start2 && end1 > end2 && start1 < end2) || (start1 <= start2 && end1 >= end2) || (start1 >= start2 && end1 <= end2)) {
weekdayschedules[current].relativeSchedules.push(weekdayschedules[next].id);
weekdayschedules[next].relativeSchedules.push(weekdayschedules[current].id);
weekdayschedules[current].relativeSchedules.sort((a, b) => {
return a - b;
});
weekdayschedules[next].relativeSchedules.sort((a, b) => {
return a - b;
});
}
next++;
}
}
});
scheduleList.forEach((weekdayschedules, index) => {
// weekdayschedules.sort((a, b) => {
// return a.startTimeStamp - b.startTimeStamp;
// });
for (let i = 0, Length = weekdayschedules.length; i < Length; i++) {
const current = i;
let next = i + 1;
if (next == weekdayschedules.length) {
return;
}
while (next < weekdayschedules.length) {
const relativeSchedules1 = weekdayschedules[current].relativeSchedules;
const relativeSchedules2 = weekdayschedules[next].relativeSchedules;
let flaga = false;
relativeSchedules1.forEach((ele) => {
if (relativeSchedules2.indexOf(ele) != -1) {
flaga = true;
}
});
if (flaga) {
relativeSchedules2.forEach((ele) => {
if (relativeSchedules1.indexOf(ele) == -1) {
relativeSchedules1.push(ele);
relativeSchedules1.sort((a, b) => {
return a - b;
});
}
});
relativeSchedules1.forEach((ele) => {
if (relativeSchedules2.indexOf(ele) == -1) {
relativeSchedules2.push(ele);
relativeSchedules2.sort((a, b) => {
return a - b;
});
}
});
}
next++;
}
}
});
yield put({
type: 'updateState',
payload: {
scheduleList,
showWeekDaysArr,
useForQueryTimeStamp,
},
});
} else {
message.error('课表加载失败!', 1);
}
},
* changeDate({ payload }, { call, put, select }) {
const { currentTimeStamp, useForQueryTimeStamp } = yield select(state => state.coursechart);
const { type } = payload;
let newuseForQueryTimeStamp = useForQueryTimeStamp;
if (type == 'pre') {
newuseForQueryTimeStamp -= 7 * 24 * 60 * 60 * 1000;
} else if (type == 'next') {
newuseForQueryTimeStamp += 7 * 24 * 60 * 60 * 1000;
} else if (type == 'current') {
newuseForQueryTimeStamp = currentTimeStamp;
}
yield put({
type: 'updateState',
payload: {
useForQueryTimeStamp: newuseForQueryTimeStamp,
},
});
yield put({
type: 'queryScheduleList',
});
},
* pageInit({ payload }, { call, put, select }) {
yield put({
type: 'updateState',
payload: {
currentTimeStamp: 0,
useForQueryTimeStamp: 0,
showWeekDaysArr: '',
scheduleListQueryParams: {
school_id: '',
teacher_id: '',
start_time: '',
end_time: '',
status: '',
course_id: '',
class_id: '',
class_room_id: '',
week_start_time: '',
week_end_time: '',
extra: '',
sort_type: '',
my: '',
},
scheduleList: [],
scheduleListTotal: [],
scheduleListGetting: false,
},
});
},
},
reducers: {
save(state, action) {
return { ...state, ...action.payload };
},
updateState(state, action) {
return { ...state, ...action.payload };
},
},
};
This diff is collapsed.
import { routerRedux } from 'dva/router';
import { message } from 'antd';
import {
LocalStorage,
SessionStorage,
isExpired,
showWeekDay,
} from '../utils/index';
import errorcode from '../common/errorcode';
import * as headquartersAjax from '../services/headquarters';
export default {
namespace: 'headquartersdetail',
state: {
sid: 0,
studentsinfo: [],
extra: {},
age: '',
addOrUpdateDiaShow: false,
studentSubmiting: false,
headquarterListdata: {},
headquarterCharts: {
dates: [],
student_count: [0, 0, 0, 0, 0, 0, 0, 0],
school_titles: [],
expend_count: [0, 0, 0, 0, 0, 0, 0],
},
},
subscriptions: {
setup({ dispatch, history }) { // eslint-disable-line
},
},
effects: {
* headquarterModelIndex({ payload }, { call, put, select }) {
const { sid, departmentid } = yield select(state => state.webapp);
if (!sid) {
return;
}
const date = new Date();
// const Y = date.getFullYear() + '-';
const loadmessage = message.loading('数据加载中...', 0);
const headquarterListdata = yield call(headquartersAjax.headquarterIndex, {
id: departmentid,
start_time: '2019-8-1',
end_time: '2019-8-31',
});
setTimeout(loadmessage);
if (headquarterListdata.code == 200) {
yield put({
type: 'updateState',
payload: {
sid,
headquarterListdata: headquarterListdata.data,
},
});
} else {
// yield put({
// type: 'updateState',
// payload: {
// logining: false,
// },
// });
yield put({
type: 'webapp/errorrequestresolve',
payload: {
data: headquarterListdata,
},
});
// message.error(headquarterListdata.msg, 1);
}
},
* headquarterCharts({ payload }, { call, put, select }) {
const { days, init } = payload;
let loadmessage;
if (!init) {
loadmessage = message.loading('数据加载中...', 0);
}
const { sid, departmentid } = yield select(state => state.webapp);
const headquarterCharts = yield call(headquartersAjax.headquarterCharts, {
id: departmentid,
x: 1,
y: 1,
// school_id: sid,
start_time: '2019-8-1',
end_time: '2019-8-31',
});
setTimeout(loadmessage);
if (headquarterCharts.code == 200) {
yield put({
type: 'updateState',
payload: {
sid,
headquarterCharts: headquarterCharts.data,
headquarterSuccess: true,
days,
},
});
} else {
yield put({
type: 'updateState',
payload: {
sid,
clockChartsSuccess: false,
days,
},
});
yield put({
type: 'webapp/errorrequestresolve',
payload: {
data: headquarterCharts,
},
});
}
},
* pageInit({ payload }, { call, put, select }) {
yield put({
type: 'updateState',
payload: {
sid: 0,
studentsinfo: [],
extra: {},
age: '',
addOrUpdateDiaShow: false,
studentSubmiting: false,
headquarterListdata: {},
headquarterCharts: {
dates: [],
student_count: [0, 0, 0, 0, 0, 0, 0, 0],
school_titles: [],
expend_count: [0, 0, 0, 0, 0, 0, 0],
},
},
});
},
},
reducers: {
save(state, action) {
return { ...state, ...action.payload };
},
updateState(state, action) {
return { ...state, ...action.payload };
},
},
};
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -18,6 +18,14 @@ export default {
},
},
effects: {
* pageInit({ payload }, { call, put, select }) {
yield put({
type: 'updateState',
payload: {
mobile: '',
},
});
},
* resetpsd({ payload }, { call, put }) {
const { info } = payload;
const resethide = message.loading('正在重置密码...');
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -14,7 +14,7 @@ class Errorpage extends React.Component {
<div>
<h1 className="fade">温馨提示:您访问的地址不存在!</h1>
<p className="fade">你正在寻找的页面无法找到。
<a style={{ opacity: '1' }} className="link" href="#/sjd/activemanager">返回首页</a>
<a style={{ opacity: '1' }} className="link" href="#/sjd/indexstaic">返回首页</a>
</p>
</div>
</div>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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