Commit 4feeb229 authored by baixian's avatar baixian

选点

parent 2d224a63
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>轻校</title><link rel="shortcut icon" href="https://cdn.img.shangjiadao.cn/qingxiao/biz/image/qxlogo4.png"><meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0;" name="viewport"><meta http-equiv="X-UA-Compatible" content="IE=edge"><!-- Polyfills --><!--[if lt IE 10]>
<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><link href="https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/index.css?1570874707479" rel="stylesheet"><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/lib/vendor.dll.js?20191012" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/console-polyfill.js?20191012" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es6-shim.min.js?20191012" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-shim.js?20191012" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-sham.min.js?20191012" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/json3.min.js?20191012" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/html5shiv.min.js?20191012" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/polyfill.js?20191012" charset="utf-8"></script></head><body><div id="root"></div><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/index.js?1570874707479" charset="utf-8"></script></body></html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>轻校</title>
<link rel="shortcut icon" href="https://cdn.img.shangjiadao.cn/qingxiao/biz/image/qxlogo4.png">
<meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0;" name="viewport">
<meta http-equiv="X-UA-Compatible" content="IE=edge"><!-- Polyfills --><!--[if lt IE 10]>
<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&libraries=searchAddress"></script>-->
<script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=XSZBZ-5LHCV-5I2P7-UQHPW-6456F-JBB3B&libraries=place"></script>
<link href="https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/index.css?1570874707479" rel="stylesheet">
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/lib/vendor.dll.js?20191012" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/console-polyfill.js?20191012" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es6-shim.min.js?20191012" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-shim.js?20191012" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-sham.min.js?20191012" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/json3.min.js?20191012" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/html5shiv.min.js?20191012" charset="utf-8"></script>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/polyfill.js?20191012" charset="utf-8"></script>
</head>
<body>
<div id="root"></div>
<script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/index.js?1570874707479" charset="utf-8"></script>
</body>
</html>
This diff is collapsed.
......@@ -35,6 +35,7 @@
"lodash": "^4.17.5",
"mockjs": "^1.0.1-beta3",
"path-to-regexp": "^2.1.0",
"qqmap": "^1.0.1",
"qrcode.react": "^0.8.0",
"qs": "^6.5.1",
"react": "^16.2.0",
......
......@@ -4,15 +4,15 @@ const basepath = `${location.protocol}//${pathify(window.location.host)}/`;
let api = '';
let dakaapi = '';
if (ENVIRONMENT == 'pro') {
// api = 'https://test.wp53.cn/v2/api/';
// dakaapi = 'https:clock.wp53.cn/v3/';
api = 'https://wx.m.shangjiadao.cn/v2/api/';
dakaapi = 'https://qxapi.qingxiao.online/daka/v3/';
api = 'https://test.wp53.cn/v2/api/';
dakaapi = 'https:clock.wp53.cn/v3/';
// api = 'https://wx.m.shangjiadao.cn/v2/api/';
// dakaapi = 'https://qxapi.qingxiao.online/daka/v3/';
} else if (ENVIRONMENT == 'dev') {
api = 'https://wx.m.shangjiadao.cn/v2/api/';
dakaapi = 'https://qxapi.qingxiao.online/daka/v3/';
// api = 'https://test.wp53.cn/v2/api/';
// dakaapi = 'https:clock.wp53.cn/v3/';
// api = 'https://wx.m.shangjiadao.cn/v2/api/';
// dakaapi = 'https://qxapi.qingxiao.online/daka/v3/';
api = 'https://test.wp53.cn/v2/api/';
dakaapi = 'https:clock.wp53.cn/v3/';
} else if (ENVIRONMENT == 'testenv') {
api = 'https://test.wp53.cn/v2/api/';
dakaapi = 'https:clock.wp53.cn/v3/';
......
......@@ -37,7 +37,7 @@ export default {
activeurl: `${__IMGCDN__}menu/classactive.png`,
notactiveurl: `${__IMGCDN__}menu/class.png`,
path: '/sjd/classmgt',
relativePath: ['/sjd/classmgt', '/sjd/classdetail/:classid', '/sjd/newtheme/jobclock/:id', '/sjd/newtheme/calendarclock/:id', '/sjd/newtheme/jobclock/:id/:isCopy', '/sjd/newtheme/calendarclock/:id/:isCopy', '/sjd/thememgt/:classid', '/sjd/clockmgt/:themetype/:classid/:themeid'],
relativePath: ['/sjd/classmgt', '/sjd/classdetail/:classid', '/sjd/newtheme/jobclock/:id', '/sjd/newtheme/calendarclock/:id', '/sjd/newtheme/jobclock/:id/:isCopy', '/sjd/newtheme/calendarclock/:id/:isCopy', '/sjd/thememgt/:classid', '/sjd/clockmgt/:themetype/:classid/:themeid', '/sjd/classdetail/studentinfo/:id'],
},
{
id: '4',
......@@ -78,6 +78,19 @@ export default {
path: '/sjd/institutions',
relativePath: ['/sjd/institutions', '/sjd/schooledit'],
},
{
id: '10',
name: '地图',
isFather: false,
style: {
width: '20px',
height: '20px',
},
activeurl: `${__IMGCDN__}menu/orgmgtactive.png`,
notactiveurl: `${__IMGCDN__}menu/orgmgt.png`,
path: '/sjd/newmap/index',
relativePath: ['/sjd/newmap/index'],
},
{
id: '2',
name: '小程序管理',
......
......@@ -212,6 +212,7 @@ class classRoomMgt extends React.Component {
widthClassSelect,
timeArr,
edittype,
manageCourseTime,
} = this.props;
const { errorMsg } = this.state;
const { getFieldDecorator } = this.props.form;
......@@ -349,8 +350,20 @@ class classRoomMgt extends React.Component {
{timeArr.map(ele => <Option value={`${ele.start_time}-${ele.end_time}`}>{`${ele.start_time}-${ele.end_time}`}</Option>)}
</Select>)}
</Col>
<Col span={5} onClick={addCourseTime} style={{ color: '#1890FF', cursor: 'pointer', fontSize: '14px' }}>
配置时间段
<Col
span={3}
onClick={addCourseTime}
style={{
color: '#1890FF',
cursor: 'pointer',
fontSize: '14px',
marginLeft: 20,
}}
>
添加
</Col>
<Col span={3} onClick={manageCourseTime} style={{ color: '#1890FF', cursor: 'pointer', fontSize: '14px' }}>
管理
</Col>
</Row>
</Form.Item>
......@@ -521,8 +534,20 @@ class classRoomMgt extends React.Component {
{timeArr.map(ele => <Option value={`${ele.start_time}-${ele.end_time}`}>{`${ele.start_time}-${ele.end_time}`}</Option>)}
</Select>)}
</Col>
<Col span={5} onClick={addCourseTime} style={{ color: '#1890FF', cursor: 'pointer', fontSize: '14px' }}>
配置时间段
<Col
span={3}
onClick={addCourseTime}
style={{
color: '#1890FF',
cursor: 'pointer',
fontSize: '14px',
marginLeft: 20,
}}
>
添加
</Col>
<Col span={3} onClick={manageCourseTime} style={{ color: '#1890FF', cursor: 'pointer', fontSize: '14px' }}>
管理
</Col>
</Row>
</Form.Item>
......
......@@ -149,6 +149,7 @@ export default {
selectChangeScheduleStudent: {},
timeArr: [],
addTimeSubmitting: false,
courseTimeListShow: false,
},
subscriptions: {
setup({ dispatch, history }) { // eslint-disable-line
......@@ -1104,6 +1105,10 @@ export default {
});
}
},
* toDetail({ payload }, { call, put, select }) {
const { id } = payload;
yield put(routerRedux.push(`/sjd/classdetail/studentinfo/${id}`));
},
* delTime({ payload }, { call, put, select }) {
const { timeArr } = yield select(state => state.classdetail);
const { sid } = yield select(state => state.webapp);
......@@ -1112,6 +1117,7 @@ export default {
id: time.id,
});
if (timeArrtdata.code == 200) {
message.success('删除成功', 1);
yield put({
type: 'updateState',
payload: {
......@@ -1265,6 +1271,7 @@ export default {
},
* saveCourseTime({ payload }, { call, put, select }) {
const { value } = payload;
const { callBack } = value;
const { sid } = yield select(state => state.webapp);
const { timeArr, addTimeSubmitting } = yield select(state => state.classdetail);
if (addTimeSubmitting) {
......@@ -1288,16 +1295,20 @@ export default {
},
});
if (timePutData.code == 200) {
message.success('添加成功', 1);
timeArr.push({
start_time: value.start_time,
end_time: value.end_time,
id: timePutData.data.id,
});
if (callBack && (typeof callBack == 'function')) {
callBack();
}
yield put({
type: 'updateState',
payload: {
timeArr: [...timeArr],
// addCourseTimeShow: false,
addCourseTimeShow: false,
},
});
} else {
......@@ -1441,6 +1452,7 @@ export default {
selectChangeScheduleStudent: {},
timeArr: [],
addTimeSubmitting: false,
courseTimeListShow: false,
},
});
},
......
......@@ -65,6 +65,7 @@ export default {
start_time: '',
end_time: '',
tabIndex: 1,
courseTimeListShow: false,
},
subscriptions: {
setup({ dispatch, history }) { // eslint-disable-line
......@@ -96,6 +97,7 @@ export default {
},
* saveCourseTime({ payload }, { call, put, select }) {
const { value } = payload;
const { callBack } = value;
const { sid } = yield select(state => state.webapp);
const { timeArr, addTimeSubmitting } = yield select(state => state.indexstaic);
if (addTimeSubmitting) {
......@@ -119,16 +121,20 @@ export default {
},
});
if (timePutData.code == 200) {
message.success('添加成功', 1);
timeArr.push({
start_time: value.start_time,
end_time: value.end_time,
id: timePutData.data.id,
});
if (callBack && (typeof callBack == 'function')) {
callBack();
}
yield put({
type: 'updateState',
payload: {
timeArr: [...timeArr],
// addCourseTimeShow: false,
addCourseTimeShow: false,
},
});
} else {
......@@ -288,6 +294,7 @@ export default {
id: time.id,
});
if (timeArrtdata.code == 200) {
message.success('删除成功', 1);
yield put({
type: 'updateState',
payload: {
......@@ -625,6 +632,7 @@ export default {
chartEndDate: '',
start_time: '',
end_time: '',
courseTimeListShow: false,
},
});
},
......
......@@ -163,6 +163,28 @@ export default {
},
});
},
* updateAddress({ payload }, { call, put, select }) {
const {
latitude,
longitude,
locationAddress,
province,
city,
district,
} = payload;
console.log(payload, 'payload');
yield put({
type: 'updateState',
payload: {
latitude,
longitude,
locationAddress,
province,
city,
district,
},
});
},
* setschoollocation({ payload }, { call, put, select }) {
const {
longitude, latitude, locationAddress, province, city, district,
......
......@@ -596,7 +596,6 @@ export default {
* unbindWxPost({ payload }, { call, put, select }) {
const { studentsdetail, checkoutVerifyCode } = yield select(state => state.studentsinfo);
const { verify_code, callBack, student_id } = payload;
console.log('进来了');
if (checkoutVerifyCode) {
return;
}
......@@ -608,7 +607,6 @@ export default {
});
const unbindWxData = yield call(studentsAjax.studentsUnBindWx, {
student_id,
code: verify_code,
});
yield put({
type: 'updateState',
......
......@@ -458,6 +458,34 @@ export default {
},
});
}
const classStudentActive = pathToRegexp('/sjd/classdetail/studentinfo/:id').exec(pathname);
if (classStudentActive) {
dispatch({
type: 'studentsinfo/queryinfo',
payload: {
id: classStudentActive[1],
},
});
dispatch({
type: 'webapp/updateState',
payload: {
breadcrumbList: [
{
path: 'sjd/classmgt',
name: '班级管理',
},
{
path: pathname,
name: '班级详情',
},
{
path: pathname,
name: '学生详情',
},
],
},
});
}
const thememgtactive = pathToRegexp('/sjd/thememgt/:classid').exec(pathname);
if (thememgtactive) {
dispatch({
......
......@@ -27,31 +27,38 @@ class AddCourseTime extends React.Component {
saveCourseTime({
start_time: start_time.format('HH:mm'),
end_time: end_time.format('HH:mm'),
callBack: () => {
form.resetFields();
},
});
});
}
close = () => {
const { form, close } = this.props;
form.resetFields();
close();
}
render() {
const {
visible,
close,
addTimeSubmitting,
timeArr,
delTime,
} = this.props;
const { getFieldDecorator } = this.props.form;
return (
<Modal
visible={visible}
centered
title="配置时间段"
onCancel={close}
footer={null}
title="添加上课时间段"
onCancel={this.close}
width={500}
zIndex={111}
zIndex={140}
className="modifyclassModal"
maskClosable={false}
bodyStyle={{ paddingLeft: '0', paddingRight: '0' }}
confirmLoading={addTimeSubmitting}
onOk={this.submit}
closable={false}
>
<Row style={{ paddingLeft: '20px', paddingBottom: '20px' }}>
<Col style={{ lineHeight: '40px' }} lg={{ span: 4 }} md={{ span: 8 }} xs={{ span: 24 }}>
......@@ -81,28 +88,6 @@ class AddCourseTime extends React.Component {
</Form.Item>
</Form>
</Col>
<Col style={{ lineHeight: '40px' }} lg={{ span: 2 }} md={{ span: 8 }} xs={{ span: 24 }}>
<Button type="primary" onClick={this.submit}>添加</Button>
</Col>
</Row>
<Row
style={{
paddingLeft: '20px',
paddingTop: '20px',
borderTop: '1px solid rgba(0,0,0,.1)',
}}
>
<Col style={{ lineHeight: '40px' }} lg={{ span: 5 }} md={{ span: 8 }} xs={{ span: 24 }}>
<span style={{ color: '#000' }}>已配置时间段:</span>
</Col>
<Col lg={{ span: 19 }} md={{ span: 20 }} xs={{ span: 24 }} style={{ }}>
{timeArr && timeArr.map(ele => (
<div className={pageStyle.timeitem}>
<span className={pageStyle.itemContent}>{ele.start_time}{ele.end_time}</span>
<Icon onClick={() => delTime(ele)} type="close-circle" theme="twoTone" style={{ color: '#FF5252', fontSize: '12px' }} twoToneColor="#FF5252" />
</div>
))}
</Col>
</Row>
</Modal>
);
......
import { connect } from 'dva';
import React from 'react';
import { TimePicker, Row, Col, Input, Modal, Form, message, Button, Icon } from 'antd';
import { pageIn } from '../../utils/index';
import pageStyle from './AddCourseTime.less';
class AddCourseTime extends React.Component {
componentDidMount() { // 挂载
pageIn('班级管理');
// 初始化地图函数 自定义函数名init
// 定义map变量 调用 qq.maps.Map() 构造函数 获取地图显示容器
}
componentWillUnmount() { // 卸载
}
render() {
const {
visible,
close,
timeArr,
delTime,
addCourseTime,
} = this.props;
const { getFieldDecorator } = this.props.form;
return (
<Modal
visible={visible}
centered
title="管理上课时间段"
closable={false}
onCancel={close}
width={500}
zIndex={134}
className="modifyclassModal"
maskClosable={false}
bodyStyle={{ paddingLeft: '0', paddingRight: '0' }}
cancelText="关闭"
okText="添加"
onOk={addCourseTime}
>
<Row
style={{
paddingLeft: '20px',
}}
>
<Col style={{ lineHeight: '40px' }} lg={{ span: 5 }} md={{ span: 8 }} xs={{ span: 24 }}>
<span style={{ color: '#000' }}>已配置时间段:</span>
</Col>
<Col lg={{ span: 19 }} md={{ span: 20 }} xs={{ span: 24 }} style={{ }}>
{timeArr && timeArr.map(ele => (
<div className={pageStyle.timeitem}>
<span className={pageStyle.itemContent}>{ele.start_time}{ele.end_time}</span>
<Icon onClick={() => delTime(ele)} type="close-circle" theme="twoTone" style={{ color: '#FF5252', fontSize: '12px' }} twoToneColor="#FF5252" />
</div>
))}
</Col>
</Row>
</Modal>
);
}
}
AddCourseTime.propTypes = {
};
const classRoomMgtForm = Form.create()(AddCourseTime);
export default classRoomMgtForm;
......@@ -4,6 +4,7 @@ import { message, Icon, Button, Row, Col, Input, Select, Table, Tabs, Form, Moda
import EditClassModal from '../classmgt/EditClassModal';
import ClassRoomMgt from '../classmgt/classRoomMgt';
import AddCourseTime from './AddCourseTime';
import CourseTimeList from './CourseTimeList';
import PlanCourse from '../../components/PlanCourse';
import CallStudents from '../../components/CallStudents';
import ChangeCourse from './ChangeCourse';
......@@ -163,6 +164,24 @@ class ClassDetailForm extends React.Component {
},
});
}
manageCourseTime = () => {
const { dispatch } = this.props;
dispatch({
type: 'classdetail/updateState',
payload: {
courseTimeListShow: true,
},
});
}
closeCourseTimeList = () => {
const { dispatch } = this.props;
dispatch({
type: 'classdetail/updateState',
payload: {
courseTimeListShow: false,
},
});
}
addCourseTime = () => {
const { dispatch } = this.props;
dispatch({
......@@ -941,6 +960,7 @@ class ClassDetailForm extends React.Component {
tab,
timeArr,
addTimeSubmitting,
courseTimeListShow,
} = this.props;
const courseplancolumns = [
{
......@@ -1336,10 +1356,10 @@ class ClassDetailForm extends React.Component {
title: '姓名',
dataIndex: 'name',
key: 'name',
render: (text, record, index) => {
render: (text, record) => {
return (
<div className={pageStyle.classNamebox}>
{record.name}
<div>
<a href="javascript:;" onClick={() => this.toDetail(record.id)}>{record.name}</a>
</div>
);
},
......@@ -1401,6 +1421,7 @@ class ClassDetailForm extends React.Component {
classroomList={classroomList}
classroomMgt={this.classroomMgt}
addCourseTime={this.addCourseTime}
manageCourseTime={this.manageCourseTime}
classId={classId}
saveSubmit={this.plancoursesaveSubmit}
timeArr={timeArr}
......@@ -1410,8 +1431,13 @@ class ClassDetailForm extends React.Component {
saveCourseTime={this.saveCourseTime}
close={this.closeAddCourseTime}
addTimeSubmitting={addTimeSubmitting}
delTime={this.delTime}
/>
<CourseTimeList
visible={courseTimeListShow}
close={this.closeCourseTimeList}
timeArr={timeArr}
delTime={this.delTime}
addCourseTime={this.addCourseTime}
/>
<div className={pageStyle.classDetail}>
<div className={pageStyle.classdetailheader}>
......@@ -1768,6 +1794,7 @@ function mapStateToProps(state) {
datetime,
timeArr,
addTimeSubmitting,
courseTimeListShow,
} = state.classdetail;
return {
classDetail,
......@@ -1817,6 +1844,7 @@ function mapStateToProps(state) {
datetime,
timeArr,
addTimeSubmitting,
courseTimeListShow,
};
}
export default connect(mapStateToProps)(ClassDetail);
......
......@@ -33,6 +33,7 @@ import CourseChart from '../../components/CourseChart';
import PlanCourse from '../../components/PlanCourse';
import ClassRoomMgt from '../classmgt/classRoomMgt';
import AddCourseTime from '../classdetail/AddCourseTime';
import CourseTimeList from '../classdetail/CourseTimeList';
const { RangePicker } = DatePicker;
const echarts = require('echarts');
......@@ -207,6 +208,24 @@ class StaticCenter extends React.Component {
},
});
}
manageCourseTime = () => {
const { dispatch } = this.props;
dispatch({
type: 'indexstaic/updateState',
payload: {
courseTimeListShow: true,
},
});
}
closeCourseTimeList = () => {
const { dispatch } = this.props;
dispatch({
type: 'indexstaic/updateState',
payload: {
courseTimeListShow: false,
},
});
}
addCourseTime = () => {
const { dispatch } = this.props;
dispatch({
......@@ -267,6 +286,7 @@ class StaticCenter extends React.Component {
chartEndDate,
chartStartDate,
scheduleCount,
courseTimeListShow,
} = this.props;
const dataArray = clockCharts;
const month = dataArray.dates;
......@@ -319,9 +339,23 @@ class StaticCenter extends React.Component {
classroomMgt={this.classroomMgt}
addCourseTime={this.addCourseTime}
saveSubmit={this.plancoursesaveSubmit}
manageCourseTime={this.manageCourseTime}
teacherList={teacherList}
timeArr={timeArr}
/>
<AddCourseTime
visible={addCourseTimeShow}
saveCourseTime={this.saveCourseTime}
close={this.closeAddCourseTime}
addTimeSubmitting={addTimeSubmitting}
/>
<CourseTimeList
visible={courseTimeListShow}
close={this.closeCourseTimeList}
timeArr={timeArr}
delTime={this.delTime}
addCourseTime={this.addCourseTime}
/>
<div className={pageStyle.topbox}>
<Row gutter={24}>
<Col xs={{ span: 24 }} sm={{ span: 24 }} lg={{ span: 16 }} md={{ span: 24 }} style={{ marginBottom: '20px' }}>
......@@ -557,14 +591,15 @@ class StaticCenter extends React.Component {
</Col>
</Row>
<AddCourseTime
visible={addCourseTimeShow}
saveCourseTime={this.saveCourseTime}
close={this.closeAddCourseTime}
timeArr={timeArr}
addTimeSubmitting={addTimeSubmitting}
delTime={this.delTime}
/>
{/* <AddCourseTime */}
{/* visible={addCourseTimeShow} */}
{/* saveCourseTime={this.saveCourseTime} */}
{/* close={this.closeAddCourseTime} */}
{/* timeArr={timeArr} */}
{/* addTimeSubmitting={addTimeSubmitting} */}
{/* delTime={this.delTime} */}
{/* /> */}
</div>
);
}
......@@ -595,6 +630,7 @@ function mapStateToProps(state) {
chartEndDate,
chartStartDate,
scheduleCount,
courseTimeListShow,
} = state.indexstaic;
// eslint-disable-next-line no-empty-pattern
const {} = state.createtheme;
......@@ -619,6 +655,7 @@ function mapStateToProps(state) {
chartEndDate,
chartStartDate,
scheduleCount,
courseTimeListShow,
};
}
export default connect(mapStateToProps)(StaticCenter);
......
import { connect } from 'dva';
import React from 'react';
import { Icon, Button, Tabs, Select, Form, InputNumber, Row, Col, Input, Radio, Modal, message } from 'antd';
import $ from 'jquery';
import moment from 'moment';
import QQMap from 'qqmap';
import { pageIn, hasBtnPower } from '../../utils/index';
import pageStyle from './index.less';
const { TabPane } = Tabs;
class NewThemeForm extends React.Component {
constructor(props) {
super(props);
this.state = {
latitude: 39.90736606309809,
longitude: 116.39774322509766,
resultInfo: '',
};
}
componentDidMount() { // 挂载
pageIn('轻校-地图');
this.initQQMap();
// this.bindEvent();
}
componentDidUpdate() {
}
componentWillUnmount() { // 卸载
}
tabChange=(key) => {
const { dispatch, tabIndex } = this.props;
if (Number(key) === 3) {
message.warning('功能即将开放,敬请期待', 1);
return;
}
dispatch({
type: 'createtheme/tabChange',
payload: {
tabIndex: key,
},
});
}
initQQMap = () => {
const { latitude, longitude, resultInfo } = this.state;
const me = this;
this.map = new qq.maps.Map(document.getElementById('container'), {
center: new qq.maps.LatLng(latitude || 39.916527, longitude || 116.397128),
zoom: 16,
mapTypeId: qq.maps.MapTypeId.ROADMAP,
disableDefaultUI: true,
scaleControl: true,
});
const markersArray = [];
const infoArray = [];
// 点击事件
qq.maps.event.addListener(this.map, 'click', (event) => {
const showLatlng = new qq.maps.LatLng(event.latLng.getLat(), event.latLng.getLng());
let info;
let marker;
$.ajax({
url: `https://apis.map.qq.com/ws/geocoder/v1/?key=XSZBZ-5LHCV-5I2P7-UQHPW-6456F-JBB3B&output=jsonp&location=${event.latLng.getLat()},${event.latLng.getLng()}`,
data: null,
type: 'get',
dataType: 'jsonp',
success: (result) => {
// eslint-disable-next-line no-use-before-define
deleteOverlays(markersArray);
// eslint-disable-next-line no-use-before-define
deleteOverlays(infoArray);
console.log(result, 'result');
info = new qq.maps.InfoWindow({
map: this.map,
content: result.result.formatted_addresses.rough,
position: showLatlng,
zIndex: 99,
visible: true,
});
marker = new qq.maps.Marker({
position: showLatlng,
map: this.map,
animation: qq.maps.MarkerAnimation.DROP,
});
markersArray.push(marker);
infoArray.push(info);
console.log(markersArray, 'markersArray222222222');
},
});
});
function deleteOverlays(array) {
if (array) {
let k;
// eslint-disable-next-line no-undef
for (k in array) {
// eslint-disable-next-line no-undef
if (k > 0) {
// eslint-disable-next-line no-undef
array[k].setMap(null);
}
}
// eslint-disable-next-line no-param-reassign
array.length = 1;
}
}
// qq.maps.event.addListener(marker, 'click', () => {
// info.open();
// info.setContent('<div style="text-align:center;white-space:nowrap;' +
// 'margin:10px;">单击标记</div>');
// info.setPosition(showLatlng);
// });
// });
// });
}
// 删除覆盖物
// 地图选点 根据经纬度地址逆解析
parsingAddress = () => {
}
searchService = (keyword) => {
const me = this;
let searchService;
// eslint-disable-next-line prefer-const
searchService = new qq.maps.SearchService({
complete(results) {
if (results.type === 'CITY_LIST') {
searchService.setLocation(results.detail.cities[0].cityName);
searchService.search(keyword);
return;
}
// eslint-disable-next-line prefer-destructuring
const pois = results.detail.pois;
const latlngBounds = new qq.maps.LatLngBounds();
for (let i = 0, l = pois.length; i < l; i++) {
const poi = pois[i];
latlngBounds.extend(poi.latLng);
const marker = new qq.maps.Marker({
map: me.map,
position: poi.latLng,
});
marker.setTitle(poi.name);
}
me.map.fitBounds(latlngBounds);
},
});
}
bindEvent = () => {
console.log(this.map, '11111');
this.autocomplete();
}
searchAddress = (e) => {
console.log(e);
}
autocomplete = () => {
const { latitude, longitude, resultInfo } = this.state;
// eslint-disable-next-line prefer-const
let ap = new qq.maps.place.Autocomplete(document.getElementById('place'), {
offset: new qq.maps.Size(0, 5),
location: '北京市',
});
let keyword = '';
qq.maps.event.addListener(ap, 'confirm', (res) => {
keyword = res.value;
this.searchService.search(keyword);
});
}
render() {
const {
tabIndex,
} = this.props;
const { tarLat, tarLng, resultInfo } = this.state;
return (
<div className={pageStyle.container}>
<div className={pageStyle.mapwrap}>
<div id="container" style={{ height: 320, width: 600 }}></div>
<div className={pageStyle.mapsearch}>
{/* <Input */}
{/* id="searchAddress" */}
{/* prefix={<Icon type="search" />} */}
{/* placeholder="搜索地址" */}
{/* style={{ width: 200 }} */}
{/* // onChange={e => this.searchAddress(e)} */}
{/* /> */}
{/* eslint-disable-next-line react/style-prop-object */}
<input type="text" id="place" />
</div>
</div>
</div>
);
}
}
NewThemeForm.propTypes = {
};
const NewTheme = Form.create()(NewThemeForm);
function mapStateToProps(state) {
const {
tabIndex,
} = state.createtheme;
return {
tabIndex,
};
}
export default connect(mapStateToProps)(NewTheme);
.mapwrap {
width: 600px;
height: 320px;
position: relative;
border-radius: 4px;
.mapsearch {
position: absolute;
top: 15px;
left: 15px;
}
}
This diff is collapsed.
@import '../../less/variables.less';
@images: '@{imagesroot}/login/';
.loginbg{
min-width: 600px;
height: ~"calc(100vh - 64px)";
display: flex;
align-items: center;
justify-content: center;
}
.container {
min-height: 100vh;
background-color: #fff;
padding-left: 24px;
}
.content {
padding: 23px 25px 27px;
background-color: #F0F2F5;
}
.header {
height: 64px;
padding-left: 34px;
background-color: #fff;
display: flex;
align-items: center;
}
.headerlogo {
height: 28px;
display: block;
}
.contentbox {
background-color: #fff;
min-height: 800px;
}
.titlebox {
line-height: 50px;
display: flex;
align-items: center;
justify-content: space-between;
}
.pagetitle {
color: #000;
font-size: 16px;
font-weight: 600;
}
.titlecontent {
border-bottom: 1px solid #E9E9E9;
}
.formcontent {
padding-top: 30px;
}
.delmobile {
position: absolute;
height: 30px;
line-height: 30px;
top: -5px;
right: -70px;
}
.addmobile {
line-height: 30px;
position: absolute;
right: -15%;
text-align: right;
top: -5px;
}
@media (max-width: 768px){
.content {
padding: 23px 8px 27px;
}
}
.categotyitem {
display: inline-block;
width: 55px;
height: 22px;
color: #9F9F9F;
border:1px solid #D9D9D9;
font-size: 12px;
color:rgba(0,0,0,0.5);
text-align: center;
line-height: 20px;
border-radius: 4px;
margin: 0 10px 11px 0px;
cursor: pointer;
&.categotyitemactive {
color: #1890FF;
border-color: #1890FF;
background-color: rgba(230,247,255,1);;
}
}
:global {
.schooladdcontainer {
.ant-form-explain {
padding-left: 0;
}
}
}
.boxtitle {
text-align: center;
color: #19B5FE;
font-size: 40px;
line-height: 1;
padding-top: 50px;
margin-bottom: 40px;
}
.loginformcontent{
width: 810px;
height: 700px;
background-color: #fff;
margin: 0 auto;
border-radius: 20px;
box-shadow:0px 6px 24px 0px rgba(0,0,0,0.08);
overflow: hidden;
padding: 0 117px;
}
.qxdescbox {
flex: 1;
background-color: #19B5FE;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
.qxbiglogo {
width: 91px;
height: 162px;
display: block;
margin-bottom: 100px;
}
.qxdesc {
font-size: 14px;
width: 383px;
color: #fff;
text-align: center;
}
}
.loginbox {
flex: 1;
padding-top: 42px;
}
.sjd_logo{
text-align: center;
margin-bottom: 10px;
img{
width: 200px;
}
}
.sjd_name {
text-align: center;
font-size: 40px;
font-weight: 700;
line-height: 1;
margin-bottom: 45px;
color: #1BB6FF;
letter-spacing: 2px;
}
.loginform {
// max-width: 400px;
margin-bottom: 20px;
margin: 0 auto;
}
.loginformforgot {
color: #22B8FF;
font-size: 14px;
padding-left: 11px;
margin-bottom: 72px;
line-height: 1;
margin-top: 24px;
cursor: pointer;
}
.loginformforgotbox {
color: #22B8FF;
font-size: 14px;
padding-left: 11px;
margin-bottom: 72px;
line-height: 1;
margin-top: 24px;
display: flex;
align-items: center;
justify-content: space-between;
div {
cursor: pointer;
}
.resetpsd {
color: #959595;
}
}
.forgotpwd {
float: right;
padding: 8px 10px;
}
.loginformbutton {
height: 52px;
line-height: 52px;
width: 100%;
background-color: #1BB6FE;
border: none;
}
.loginformbutton:hover {
background-color: #1BB6FE;
}
.loginformbutton:active {
background-color: #1BB6FE;
}
.loginformbutton:focus {
background-color: #1BB6FE;
}
.verycodebtn {
width: 100%;
height: 40px;
line-height: 40px;
text-align: right;
// border-color: #0000ff;
color: rgba(27,182,254,0.5);;
border-radius: none;
padding-right: 14px;
font-size: 14px;
cursor: pointer;
}
.verycodeinput {
border-bottom: none!important;
.ant-row{
margin-bottom: 0!important;
}
.ant-form-item{
margin-bottom: 0!important;
}
}
.btncontent{
margin-top: 30px;
text-align: left;
}
.registerformbutton {
float: right;
width: 178px;
height: 55px;
border-color: #0000ff;
color: #0000ff;
}
:global {
.register {
min-height: 700px;
.ant-input{
border: none;
border-bottom: 1px solid #cccccc;
border-radius: 0;
outline: none;
}
.no_border {
&.ant-input {
border-bottom: none!important;
}
}
.ant-input:focus{
box-shadow: initial;
}
.ant-checkbox{
.ant-checkbox-inner{
border-radius: 50%;
}
}
.ant-checkbox::after{
border-radius: 50%;
}
.ant-form-item{
margin-bottom: 0;
}
.ant-select-selection {
border: none;
border-bottom: 1px solid #d9d9d9;
border-radius: 0;
}
.loginrow{
margin-bottom: 15px;
}
.ant-form-explain {
padding-left: 11px;
}
}
.bg_icon {
display: inline-block;
width: 27px;
height: 27px;
background: url('@{images}phone.png') no-repeat;
background-size: 100%;
margin-left: -10px;
&.verify {
background-image: url('@{images}verify.png');
}
}
}
@media (max-width: @screen-small-min){
.loginformcontent{
box-shadow: none;
}
.header {
height: 50px;
padding-left: 34px;
}
.headerlogo {
height: 50px;
display: block;
}
}
.shifttbbox {
display: flex;
align-items: center;
justify-content: space-around;
}
.shifttb {
cursor: pointer;
}
.tabname {
color: #1BB6FF;
color: #000000;
font-size: 18px;
line-height: 1;
margin-bottom: 17px;
text-align: center;
}
.tabborder {
width: 107px;
height: 3px;
background-color: transparent;
margin: 0 auto;
}
.active .tabname {
color: #1BB6FF;
}
.shifttb.active .tabborder {
background-color: #1BB6FF;
}
.teacherloginbox {
padding-top: 87px;
text-align: center;
}
.loginwarntext {
color: #969696;
font-size: 14px;
line-height: 1;
margin-bottom: 43px;
}
.loginqrcode {
width: 240px;
height: 240px;
}
.businessloginbox {
}
.registerbox {
display: flex;
align-items: center;
justify-content: center;
line-height: 1;
margin-top: 47px;
}
.noaccount {
color: #959595;
font-size: 14px;
}
.goregister {
color: #1BB6FE;
cursor: pointer;
font-size: 14px;
}
.eyebox {
text-align: right;
display: flex;
align-items: flex-end;
justify-content: flex-end;
height: 32px;
}
.eyeopen {
width: 23px;
height: 15px;
cursor: pointer;
}
.eyeclose {
width: 22px;
height: 11px;
cursor: pointer;
}
.categotytitle {
font-size: 16px;
color: #000;
font-weight: 700;
margin-bottom: 24px;
line-height: 1;
}
.categotybox {
// margin-left: -11px;
}
.mapbox {
display: flex;
}
.locationlistbox {
width: 253px;
overflow-y: scroll;
border: 1px solid rgba(0,0,0,0.1);
height: 400px;
}
.mapcontainer {
width: 700px;
display: flex;
align-items: center;
justify-content: center;
}
.locationitem {
border-bottom: 1px solid rgba(0,0,0,0.1);
cursor: pointer;
display: flex;
padding: 7px 10px 10px 4px;
}
.locationiconbox {
width: 25px;
height: 30px;
background-image: url('@{imagesroot}locationdefault.png?x-oss-process=image/resize,w_25,h_29');
background-size: 100% 100%;
text-align: center;
line-height: 26px;
color: #fff;
font-size: 16px;
font-weight: 700;
margin-right: 6px;
}
.locationinfo {
width: 180px;
.province {
color: #000000;
font-size: 13px;
}
}
.locationitemselect {
background-color: #F9F9F9;
// color: white;
}
.schooladdressempty {
line-height: 39px;
padding-left: 12px;
color: rgba(0,0,0,0.4);
cursor: pointer;
}
.schooladdress {
line-height: 39px;
padding-left: 12px;
color: rgba(0,0,0,1);
cursor: pointer;
}
.cityselect {
width: 400px!important;
}
.addressinput {
width: 400px;
margin-right: 24px;
}
.searchbtn {
background-color: #19B5FE;
border: none;
}
.locationinfo {
color: #646363;
font-size: 13px;
}
This diff is collapsed.
......@@ -20,8 +20,6 @@ class UserSettingForm extends React.Component {
sureBindWx = () => {
const { form, bindWxPost } = this.props;
form.validateFields((err, values) => {
console.log(err, 'err');
console.log(values, 'values');
if (!err) {
bindWxPost(values, () => {
form.resetFields();
......@@ -96,31 +94,31 @@ class UserSettingForm extends React.Component {
>
{userInfo.consumer && userInfo.consumer.nickname}
</Form.Item>
<Form.Item
label={<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>}
labelCol={{
xs: { span: 24 },
sm: { span: 5 },
}}
wrapperCol={{
xs: { span: 24 },
sm: { span: 19 },
}}
>
<Row gutter={8}>
<Col span={12}>
{getFieldDecorator('verify_code', {
rules: [
{ required: true, message: '请输入四位数字验证码' },
{ pattern: /^[0-9]{4}$/, message: '验证码是4位数字验证码' },
],
})(<Input type="text" maxLength={4} placeholder="请输入验证码" />)}
</Col>
<Col span={12}>
<div style={{ color: '#1890FF', cursor: 'pointer', fontSize: '14px' }} className={`${pageStyles.verycodebtn} ${erpCounting ? pageStyles.verycodebtndisable : ''}`} onClick={sendVerifyCode}>{erpCounting ? `${erpCountdown}秒后重新获取` : '发送验证码'}</div>
</Col>
</Row>
</Form.Item>
{/* <Form.Item */}
{/* label={<span>&nbsp;&nbsp;验&nbsp;&nbsp;证&nbsp;&nbsp;码</span>} */}
{/* labelCol={{ */}
{/* xs: { span: 24 }, */}
{/* sm: { span: 5 }, */}
{/* }} */}
{/* wrapperCol={{ */}
{/* xs: { span: 24 }, */}
{/* sm: { span: 19 }, */}
{/* }} */}
{/* > */}
{/* <Row gutter={8}> */}
{/* <Col span={12}> */}
{/* {getFieldDecorator('verify_code', { */}
{/* rules: [ */}
{/* { required: true, message: '请输入四位数字验证码' }, */}
{/* { pattern: /^[0-9]{4}$/, message: '验证码是4位数字验证码' }, */}
{/* ], */}
{/* })(<Input type="text" maxLength={4} placeholder="请输入验证码" />)} */}
{/* </Col> */}
{/* <Col span={12}> */}
{/* <div style={{ color: '#1890FF', cursor: 'pointer', fontSize: '14px' }} className={`${pageStyles.verycodebtn} ${erpCounting ? pageStyles.verycodebtndisable : ''}`} onClick={sendVerifyCode}>{erpCounting ? `${erpCountdown}秒后重新获取` : '发送验证码'}</div> */}
{/* </Col> */}
{/* </Row> */}
{/* </Form.Item> */}
</Form>
</Modal>
</div>
......
......@@ -185,6 +185,11 @@ const CalendarClock = props => (
{ CalendarClock => (<CalendarClock {...props} />) }
</Bundle>
);
const NewMap = props => (
<Bundle load={() => import(/* webpackChunkName:"JobClock" */'./pages/newmap/index')}>
{ NewMap => (<NewMap {...props} />) }
</Bundle>
);
function RouterConfig({ history }) {
return (
<LocaleProvider locale={zhCN}>
......@@ -208,6 +213,7 @@ function RouterConfig({ history }) {
<Route path="/sjd/clockmgt/:themetype/:classid/:themeid" exact component={ClockMgt} />
<Route path="/sjd/student" exact component={Student} />
<Route path="/sjd/studentinfo/:id" exact component={Studentinfo} />
<Route path="/sjd/classdetail/studentinfo/:id" exact component={Studentinfo} />
<Route path="/sjd/teacher" exact component={Teacher} />
<Route path="/sjd/teacherinfo/:id" exact component={Teacherinfo} />
<Route path="/sjd/course" exact component={Course} />
......@@ -218,6 +224,7 @@ function RouterConfig({ history }) {
<Route path="/sjd/newtheme/jobclock/:id/:isCopy" exact component={JobClock} />
<Route path="/sjd/newtheme/calendarclock/:id" exact component={CalendarClock} />
<Route path="/sjd/newtheme/calendarclock/:id/:isCopy" exact component={CalendarClock} />
<Route path="/sjd/newmap/index" exact component={NewMap} />
</SjdIndex>
)}
/>
......
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