Commit 6cbcb2c2 authored by baixian's avatar baixian

作业日历打卡完成

parent f4b452b7
This diff is collapsed.
......@@ -58,6 +58,7 @@ import holidays from './holidays';
import officialtheme from './officialtheme';
import liveclass from './liveclass';
import createmarke from './createmarke';
import newthemelist from './newthemelist';
export default {
loginModel,
indexstaicModel,
......@@ -110,4 +111,5 @@ export default {
officialtheme,
liveclass,
createmarke,
newthemelist,
};
import { routerRedux } from 'dva/router';
import { message } from 'antd';
import { delay } from 'redux-saga';
import moment from 'moment';
import {
LocalStorage,
SessionStorage,
isExpired,
getRandomFilename,
} from '../utils/index';
import errorcode from '../common/errorcode';
import * as uploader from '../services/uploader';
import * as themeAjax from '../services/newthemelist';
export default {
namespace: 'newthemelist',
state: {
clockList: [],
clockListTotal: 0,
clockListParams: {
title: '',
page: 1,
perPage: 10,
subject_type: 1,
},
},
subscriptions: {
setup({ dispatch, history }) { // eslint-disable-line
},
},
effects: {
* queryinfo({ payload }, { call, put, select }) {
yield put({
type: 'queryList',
payload: {
params: {
},
},
});
},
* queryList({ payload }, { call, put, select }) {
const { params } = payload;
const { sid } = yield select(state => state.webapp);
const { clockListParams, clockListTotal } = yield select(state => state.newthemelist);
const loading = message.loading('数据加载中...', 0.5);
const newParams = Object.assign(clockListParams, params, {
school_id: sid,
});
let newTotal = clockListTotal;
const data = yield call(themeAjax.clockList, {
...newParams,
});
setTimeout(loading);
if (data.code == 200) {
if (data.data.total != undefined) {
newTotal = data.data.total;
}
yield put({
type: 'updateState',
payload: {
clockList: data.data && data.data.list,
clockListTotal: newTotal,
clockListParams: { ...newParams },
},
});
} else {
yield put({
type: 'webapp/errorrequestresolve',
payload: {
data,
},
});
}
},
* queryDetail({ payload }, { call, put, select }) {
const { id } = payload;
const data = yield call(themeAjax.liveDetail, {
id,
});
if (data.code == 200) {
yield put({
type: 'updateState',
payload: {
addLiveObj: {
title: data.data.title,
remark: data.data.remark,
secret: data.data.secret,
cover: data.data.cover,
live_start_time: data.data.live_start_time,
need_replay: data.data.need_replay,
pay_switch: data.data.pay_switch,
status: data.data.status,
content: JSON.parse(data.data.content),
id: data.data.id,
live_status: data.data.live_status,
},
},
});
} else {
yield put({
type: 'webapp/errorrequestresolve',
payload: {
data,
},
});
}
},
* goBack({ payload }, { call, put, select }) {
yield put(routerRedux.goBack());
},
* reset({ payload }, { call, put, select }) {
yield put({
type: 'queryList',
payload: {
params: {
title: '',
status: '',
page: 1,
perPage: 10,
},
},
});
},
* createLive({ payload }, { put, select }) {
yield put(routerRedux.push({
pathname: '/sjd/addLive',
}));
},
* goEdit({ payload }, { put, select }) {
const { id } = payload;
yield put(routerRedux.push({
pathname: `/sjd/editLive/${id}`,
}));
},
* pageInit({ payload }, { call, put, select }) {
yield put({
type: 'updateState',
payload: {
clockList: [],
clockListTotal: 0,
clockListParams: {
title: '',
page: 1,
perPage: 10,
subject_type: 1,
},
},
});
},
},
reducers: {
save(state, action) {
return { ...state, ...action.payload };
},
updateState(state, action) {
return { ...state, ...action.payload };
},
},
};
......@@ -601,6 +601,11 @@ export default {
payload: {
},
});
dispatch({
type: 'createtheme/queryInfo',
payload: {
},
});
dispatch({
type: 'createtheme/createThemeModalFind',
payload: {
......@@ -608,8 +613,9 @@ export default {
},
});
dispatch({
type: 'createtheme/queryClassList',
type: 'createtheme/queryLandingList',
payload: {
params: {},
},
});
dispatch({
......@@ -646,6 +652,12 @@ export default {
isCopy: jobClockCopyActive[2],
},
});
dispatch({
type: 'createtheme/queryLandingList',
payload: {
params: {},
},
});
dispatch({
type: 'createtheme/queryClassList',
payload: {
......@@ -671,6 +683,33 @@ export default {
},
});
}
if (pathname === '/sjd/newtheme/calendarclock') {
dispatch({
type: 'createtheme/pageInit',
payload: {
},
});
dispatch({
type: 'createtheme/queryInfo',
payload: {
},
});
dispatch({
type: 'createtheme/queryLandingList',
payload: {
params: {},
},
});
dispatch({
type: 'updateState',
payload: {
breadcrumbList: [{
path: pathname,
name: '新建日历打卡',
}],
},
});
}
const CalendarClockActive = pathToRegexp('/sjd/newtheme/calendarclock/:id').exec(pathname);
if (CalendarClockActive) {
dispatch({
......@@ -678,6 +717,17 @@ export default {
payload: {
},
});
dispatch({
type: 'createtheme/queryInfo',
payload: {
},
});
dispatch({
type: 'createtheme/queryLandingList',
payload: {
params: {},
},
});
dispatch({
type: 'createtheme/createThemeModalFind',
payload: {
......@@ -723,6 +773,17 @@ export default {
payload: {
},
});
dispatch({
type: 'createtheme/queryInfo',
payload: {
},
});
dispatch({
type: 'createtheme/queryLandingList',
payload: {
params: {},
},
});
dispatch({
type: 'createtheme/createThemeModalFind',
payload: {
......@@ -756,7 +817,7 @@ export default {
},
{
path: pathname,
name: '复制作业打卡',
name: '复制日历打卡',
},
],
},
......@@ -1419,6 +1480,20 @@ export default {
},
});
}
if (pathname === '/sjd/clockList') {
dispatch({
type: 'newthemelist/queryinfo',
});
dispatch({
type: 'updateState',
payload: {
breadcrumbList: [{
path: pathname,
name: '打卡管理',
}],
},
});
}
});
},
},
......@@ -1553,7 +1628,7 @@ export default {
yield put({
type: 'callstudents/pageInit',
});
} if (pathToRegexp('/sjd/record').exec(locationPathname)) {
} else if (pathToRegexp('/sjd/record').exec(locationPathname)) {
yield put({
type: 'classrecord/pageInit',
});
......@@ -1664,6 +1739,14 @@ export default {
yield put({
type: 'liveclass/pageInit',
});
} else if (pathToRegexp('/sjd/newtheme/jobclock').exec(locationPathname)) {
yield put({
type: 'createtheme/pageInit',
});
} else if (pathToRegexp('/sjd/newtheme/calendarclock').exec(locationPathname)) {
yield put({
type: 'createtheme/pageInit',
});
}
// yield put({
// type: 'joinschooladd/pageInit',
......
......@@ -823,6 +823,10 @@ class StaticCenter extends React.Component {
},
});
}
goClockList = () => {
const { dispatch } = this.props;
dispatch(routerRedux.push('/sjd/clockList'));
}
render() {
const that = this;
const {
......@@ -1179,6 +1183,14 @@ class StaticCenter extends React.Component {
</div>
</Col>
}
<Col xs={{ span: 8, offset: 0 }} sm={{ span: 8, offset: 0 }} md={{ span: 8, offset: 0 }} lg={{ span: 4, offset: 1 }} xl={{ span: 4, offset: 1 }} xxl={{ span: 4, offset: 1 }}>
<div className={pageStyle.fasterItem} onClick={this.goClockList}>
<div className={pageStyle.fasterLeft}>
<img className={pageStyle.fasterImg} src={`${__IMGCDN__}index/index_icon11.png?v=1`} alt="" />
</div>
<span>打卡列表</span>
</div>
</Col>
</Row>
</div>
}
......
This diff is collapsed.
......@@ -308,3 +308,40 @@
}
}
}
.radioList {
width: 300px;
.radioItem {
border-bottom: 1px solid #e8e8e8;
.radioName {
font-size: 12px;
color: #000;
line-height: 20px;
}
.radioTop {
display: flex;
align-items: center;
cursor: pointer;
.radioText {
display: flex;
align-items: center;
font-size:13px;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:rgba(34,34,34,1);
width: 300px;
&>span {
font-size:13px;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:#999999;
}
}
.radioRight {
.check {
width: 19px;
height: 19px;
}
}
}
}
}
......@@ -8,7 +8,7 @@ import {
Button,
} from 'antd';
import pageStyle from './ChooseClass.less';
import { pageIn, hasBtnPower, imagify, ossVideofy } from '../../../utils/index';
import { pageIn, hasBtnPower, imagify, indexOf } from '../../../utils/index';
const FormItem = Form.Item;
const { TextArea } = Input;
class ChooseClassModal extends React.Component {
......@@ -26,10 +26,6 @@ class ChooseClassModal extends React.Component {
indexOf = (arr, item) => {
return arr.indexOf(item);
}
close = () => {
const { close, form } = this.props;
close();
}
changeCourseClass = (type) => {
const { changeCourseClass } = this.props;
changeCourseClass(type);
......@@ -71,14 +67,13 @@ class ChooseClassModal extends React.Component {
visible={visible}
zIndex={110}
width={600}
maskClosable={false}
keyboard={false}
closable={false}
bodyStyle={{
padding: '10px 20px',
}}
title="选择参与打卡的班级"
onCancel={this.close}
okText="保存"
cancelText="取消"
onOk={this.save}
footer={null}
>
<div>
......
This diff is collapsed.
......@@ -84,16 +84,41 @@
}
}
}
.radioText {
display: inline-flex;
font-size:13px;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:rgba(34,34,34,1);
&>span {
font-size:13px;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:#999999;
.radioList {
width: 300px;
.radioItem {
border-bottom: 1px solid #e8e8e8;
.radioName {
font-size: 12px;
color: #000;
line-height: 20px;
}
.radioTop {
display: flex;
align-items: center;
cursor: pointer;
.radioText {
display: flex;
align-items: center;
font-size:13px;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:rgba(34,34,34,1);
width: 300px;
&>span {
font-size:13px;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:#999999;
}
}
.radioRight {
.check {
width: 19px;
height: 19px;
}
}
}
}
}
This diff is collapsed.
@import '../../less/variables.less';
.container {
background-color: #fff;
border-radius: 2px;
padding: 20px;
}
.headerbox{
background-color: #fff;
.headerbtn {
color: #2194FF;
font-size: 14px;
cursor: pointer;
}
padding-bottom: 18px;
}
.searchrow {
.formitem {
display: flex;
align-items: center;
.formitemlabel {
color: #000000;
font-size: 14px;
line-height: 1;
min-width: 70px;
white-space: nowrap;
}
}
}
.selectitem {
display: block;
}
.searchbtnbox {
height: 54px;
display: flex;
align-items: flex-end;
}
.resetbtn {
margin-right: 16px;
}
.tablebox {
background: #fff;
:global {
.ant-table-fixed {
border-bottom: 1px solid #E8E8E8 !important;
}
.ant-table tbody tr:nth-child(2n) {
background-color: #FBFBFB;
}
.ant-table-thead > tr > th, .ant-table-tbody > tr > td {
padding: 11px 10px;
}
.ant-table-bordered .ant-table-tbody tr td {
border-bottom: none;
border-right: none!important;
}
.ant-table-bordered .ant-table-thead tr th {
border-bottom: none;
border-right: none!important;
}
.ant-table-bordered .ant-table-thead tr th:last-child {
border-right: 1px solid #e8e8e8!important;
}
.ant-table-bordered .ant-table-tbody tr td:last-child {
border-right: 1px solid #e8e8e8!important;
}
.ant-table-bordered .ant-table-tbody tr:last-child {
border-bottom: 1px solid #e8e8e8!important;
}
}
}
.divideline {
color: #E9E9E9;
padding: 0 8px;
}
.alink {
color: #1890FF;
}
.classNamebox {
max-width: 250px;
word-break: break-all;
color: #1890FF;
cursor: pointer;
}
.tableoperatebox {
min-width: 160px;
line-height: 30px;
}
.endsearchcol {
margin-bottom: 18px;
}
.endclassfooter {
display: flex;
align-items: center;
justify-content: space-between;
}
.classroomitem {
margin-bottom: 5px;
.classroom {
color:rgba(0,0,0,0.85);
}
.aLink {
color: #1890FF;
padding-left: 21px;
}
}
.rightList {
display: flex;
align-items: center;
height: 32px;
.resetIcon {
width: 14px;
height: 14px;
cursor: pointer;
margin-right: 15px;
}
.expend {
font-size:13px;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:rgba(102,102,102,1);
display: inline-block;
cursor: pointer;
}
}
.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;
margin-top: 10px;
.tablefooterstatic {
color:rgba(0,0,0,0.65);
font-size: 14px;
}
}
.shiftbox {
display: flex;
align-items: center;
border-bottom: 1px solid #e8e8e8;
.tabitem {
color: #000000;
font-size: 16px;
line-height: 1;
padding: 10px 11px 10px;
border-bottom: 3px solid transparent;
margin: 0 20px;
cursor: pointer;
&:first-child {
margin-left: 0;
}
&.active {
border-color: #1890FF;
color: #1890FF;
font-weight: 700;
}
&:hover {
border-color: #1890FF;
color: #1890FF;
font-weight: 700;
}
}
}
.formList {
margin: 10px 0;
}
......@@ -291,6 +291,11 @@ const AddLive = props => (
{ AddLive => (<AddLive {...props} />) }
</Bundle>
);
const ClockList = props => (
<Bundle load={() => import(/* webpackChunkName:"ClockList" */'./pages/newthemelist/index')}>
{ ClockList => (<ClockList {...props} />) }
</Bundle>
);
function RouterConfig({ history }) {
return (
<ConfigProvider locale={zhCN}>
......@@ -324,6 +329,7 @@ function RouterConfig({ history }) {
<Route path="/sjd/newtheme/jobclock" exact component={JobClock} />
<Route path="/sjd/newtheme/jobclock/:id" exact component={JobClock} />
<Route path="/sjd/newtheme/jobclock/:id/:isCopy" exact component={JobClock} />
<Route path="/sjd/newtheme/calendarclock" exact component={CalendarClock} />
<Route path="/sjd/newtheme/calendarclock/:id" exact component={CalendarClock} />
<Route path="/sjd/newtheme/calendarclock/:id/:isCopy" exact component={CalendarClock} />
<Route path="/sjd/datacenter" exact component={DataCenter} />
......@@ -348,6 +354,7 @@ function RouterConfig({ history }) {
<Route path="/sjd/liveClass" exact component={LiveClass} />
<Route path="/sjd/addLive" exact component={AddLive} />
<Route path="/sjd/editLive/:id" exact component={AddLive} />
<Route path="/sjd/clockList" exact component={ClockList} />
<Route component={Errorpage} />
</Switch>
</SjdIndex>
......
......@@ -4,7 +4,7 @@ import api from '../common/api';
export function findTheme(params) {
const data = qs.stringify(params);
return request({
url: `${api.createtheme.addTheme}/${params.id}`,
url: `${api.createtheme.addTheme}/${params.id}?${data}`,
method: 'GET',
data,
});
......
import qs from 'qs';
import request from '../utils/request';
import api from '../common/api';
export function clockList(params) {
const data = qs.stringify(params);
return request({
url: `${api.thememgt.themeList}?${data}`,
method: 'GET',
});
}
export function addLive(params) {
const data = qs.stringify(params);
return request({
url: `${api.liveClass.lives}`,
method: 'POST',
data,
});
}
export function editLive(params) {
const data = qs.stringify(params);
return request({
url: `${api.liveClass.lives}/${params.id}`,
method: 'PUT',
data,
});
}
export function liveDetail(params) {
const data = qs.stringify(params);
return request({
url: `${api.liveClass.lives}/${params.id}`,
method: 'GET',
data,
});
}
export function deleteLive(parmas) {
const data = qs.stringify(parmas);
return request({
url: `${api.liveClass.lives}/${parmas.id}`,
method: 'DELETE',
data,
});
}
export function changeStatus(params) {
const data = qs.stringify(params);
return request({
url: `${api.liveClass.livesStatus}`,
method: 'POST',
data,
});
}
export function liveUrl(params) {
const data = qs.stringify(params);
return request({
url: `${api.liveClass.livesUrl}?${data}`,
method: 'GET',
});
}
export function closeLive(params) {
const data = qs.stringify(params);
return request({
url: `${api.liveClass.livesEnd}`,
method: 'POST',
data,
});
}
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