Commit 2cde7958 authored by baixian's avatar baixian

微官网

parents ee0b95fa 85c724c2
......@@ -20,3 +20,4 @@
<div id="root"></div>
<script type="text/javascript" src="/dist/main.31c1eb.js"></script></body>
</html>
</html>
......@@ -125,6 +125,12 @@ export default {
clockList: `${dakaapi}common/clock`,
ads: `${dakaapi}member/website/ads`,
adsSave: `${dakaapi}member/website/ad/save`,
moments: `${dakaapi}member/website/moments`,
momentSave: `${dakaapi}member/website/moment/save`,
onlineClass: `${dakaapi}member/website/online_course`,
onlineClassSave: `${dakaapi}member/website/online_course/save`,
subjectMixture: `${dakaapi}member/website/subject_mixture`,
subjectMixtureSave: `${dakaapi}member/website/subject_mixture/save`,
},
schedule: `${dakaapi}member/erp/schedules`,
scheduleMgt: {
......
......@@ -20,6 +20,7 @@ import * as classMgtAjax from '../services/classmgt';
import * as uploader from '../services/uploader';
import { calendar } from '../utils/calendar';
import * as commonAjax from '../services/common';
import * as memberListAjax from '../services/clockmember';
import exportExcel from '../utils/exportexcel';
export default {
namespace: 'createtheme',
......@@ -2294,17 +2295,54 @@ export default {
},
// 闯关学员导出 UnlockStudentExport
* exportStudentExcel({ payload }, { call, put, select }) {
const { columns } = payload;
const {
columns, subject_id, subject_type, checkpoint_id,
} = payload;
const { emigratedObj } = yield select(state => state.createtheme);
const { sid } = yield select(state => state.webapp);
let newParams = '';
switch (subject_type) {
case 1:
newParams = {
subject_id,
subject_type,
school_id: sid,
extra: 'need_statistic',
};
break;
case 2:
newParams = {
subject_id,
subject_type,
school_id: sid,
extra: 'need_statistic',
};
break;
case 3:
newParams = {
subject_id,
subject_type,
school_id: sid,
checkpoint_id,
extra: 'need_statistic',
};
break;
default:
break;
}
const loading = message.loading('导出数据中...', 1);
const data = yield call(themeAjax.UnlockStudentExport, {
mode_id: emigratedObj.id,
});
const data = yield call(memberListAjax.memberList, newParams);
setTimeout(loading);
if (data.code == 200) {
const list = (data.data && data.data.list) || [];
if (list.length > 0) {
exportExcel(columns, list, '闯关打卡学员列表.xlsx', 'unlockStudent');
if (newParams.subject_type == 1) {
exportExcel(columns, list, '作业打卡学员列表.xlsx', 'jobClockStudent');
} else if (newParams.subject_type == 2) {
exportExcel(columns, list, '日历打卡学员列表.xlsx', 'unlockStudent');
} else if (newParams.subject_type == 3) {
exportExcel(columns, list, '闯关打卡学员列表.xlsx', 'unlockStudent');
}
} else {
message.error('暂时没有数据可以导出!', 0.5);
}
......
This diff is collapsed.
......@@ -172,6 +172,7 @@ export default {
const {
bannerImg, course, orgdescs,
adCarousel,
classMoment,
} = yield select(state => state.officialweb);
const {
cropperUrl, filename, uploadtype, orgType, orgIndex, imgIndex, action,
......@@ -252,6 +253,17 @@ export default {
adCarousel: [...adCarousel],
},
});
} else if (uploadtype == 'uploadClassMomentImg') {
classMoment[imgIndex].content.push({
type: 'img',
value: `${filename}?x-oss-process=${cropperUrl}`,
});
yield put({
type: 'officialweb/updateState',
payload: {
classMoment: [...classMoment],
},
});
}
},
* unloadstates({ payload }, { call, put }) { // 释放该页面存储的所有状态
......
......@@ -12,7 +12,7 @@ import {
Divider,
Switch,
TimePicker,
Collapse,
Tooltip,
DatePicker,
Select, Radio, InputNumber, Input, message, Table,
} from 'antd';
......@@ -152,12 +152,15 @@ class SuccessStoreForm extends React.Component {
},
});
}
exportExcelStudent = (columns) => {
exportExcelStudent = (columns, subject_id, checkpoint_id) => {
const { dispatch } = this.props;
dispatch({
type: 'createtheme/exportStudentExcel',
payload: {
columns,
subject_id,
subject_type: 3,
checkpoint_id,
},
});
}
......@@ -185,6 +188,63 @@ class SuccessStoreForm extends React.Component {
previewQrcode,
downloadTitle,
} = this.props;
const exportColumns = [
{
title: '微信昵称',
dataIndex: 'wechat_user',
key: 'wechat_user',
},
{
title: '闯关数',
dataIndex: 'unlock_count',
key: 'unlock_count',
},
{
title: '被点评',
dataIndex: 'review_count',
key: 'review_count',
},
{
title: '点评分数',
dataIndex: 'review_score',
key: 'review_score',
},
{
title: '被点赞',
dataIndex: 'passive_like_count',
key: 'passive_like_count',
},
{
title: '精选数量',
dataIndex: 'place_top_at_count',
key: 'place_top_at_count',
},
{
title: '积分数',
dataIndex: 'integral_count',
key: 'integral_count',
},
{
title: '分享数',
dataIndex: 'share_count',
key: 'share_count',
},
{
title: '姓名',
dataIndex: 'name',
key: 'name',
},
{
title: '手机号',
dataIndex: 'mobile',
key: 'mobile',
},
{
title: '信息收集',
dataIndex: 'value',
key: 'value',
},
];
const columns = [
{
title: '关卡名称',
......@@ -235,6 +295,8 @@ class SuccessStoreForm extends React.Component {
render: (text, record, index) => {
return (
<div>
<span className="hreflink" onClick={() => this.exportExcelStudent(exportColumns, emigratedObj.id, record.id)}>导出数据</span>
<Divider type="vertical" />
<span className="hreflink" onClick={() => this.edit(record)}>编辑</span>
<Divider type="vertical" />
<span className="hreflink" onClick={() => this.delete(record)}>删除</span>
......@@ -243,79 +305,6 @@ class SuccessStoreForm extends React.Component {
},
},
];
const exportColumns = [
{
title: '微信昵称',
dataIndex: 'wechat_user',
key: 'wechat_user',
render: (text, record) => {
return (
<span>{ record.wechat_user && record.wechat_user.nickname ? record.wechat_user.nickname : '-' }</span>
);
},
},
{
title: '闯关数',
dataIndex: 'unlock_count',
key: 'unlock_count',
},
{
title: '被点评',
dataIndex: 'review_count',
key: 'review_count',
},
{
title: '点评分数',
dataIndex: 'review_score',
key: 'review_score',
},
{
title: '被点赞',
dataIndex: 'passive_like_count',
key: 'passive_like_count',
},
{
title: '精选数量',
dataIndex: 'place_top_at_count',
key: 'place_top_at_count',
},
{
title: '带来访客',
dataIndex: 'total_share_uv',
key: 'total_share_uv',
},
{
title: '姓名',
dataIndex: 'name',
key: 'name',
render: (text, record) => {
return (
<span>{ record.infoCollection && record.infoCollection.name ? record.infoCollection.name : '-' }</span>
);
},
},
{
title: '手机号',
dataIndex: 'mobile',
key: 'mobile',
render: (text, record) => {
return (
<span>{ record.infoCollection && record.infoCollection.mobile ? record.infoCollection.mobile : '-' }</span>
);
},
},
{
title: '信息收集',
dataIndex: 'value',
key: 'value',
render: (text, record) => {
return (
<span>{ record.subjectStudent && record.subjectStudent.content ? JSON.parse(record.subjectStudent.content).value : '-' }</span>
);
},
},
];
return (
<div className={pageStyle.container}>
<div className={pageStyle.head}>
......@@ -327,7 +316,7 @@ class SuccessStoreForm extends React.Component {
</div>
</div>
<div>
<span className="hreflink" onClick={() => this.exportExcelStudent(exportColumns)}>导出数据</span>
<span className="hreflink" onClick={() => this.exportExcelStudent(exportColumns, emigratedObj.id, 0)}><Tooltip title="导出全部关卡数据">导出数据</Tooltip></span>
<Divider type="vertical" />
<span className="hreflink" onClick={() => this.handleRemark(emigratedObj)}>点评作业</span>
<Divider type="vertical" />
......
......@@ -251,6 +251,17 @@ class LiveClass extends React.Component {
},
});
}
exportExcelStudent = (columns, subject_id, subject_type) => {
const { dispatch } = this.props;
dispatch({
type: 'createtheme/exportStudentExcel',
payload: {
columns,
subject_id,
subject_type,
},
});
}
render() {
const {
userPermission,
......@@ -262,6 +273,115 @@ class LiveClass extends React.Component {
downloadTitle,
classList,
} = this.props;
const exportJobColumns = [
{
title: '微信昵称',
dataIndex: 'wechat_user',
key: 'wechat_user',
},
{
title: '被点评',
dataIndex: 'review_count',
key: 'review_count',
},
{
title: '点评分数',
dataIndex: 'review_score',
key: 'review_score',
},
{
title: '被点赞',
dataIndex: 'passive_like_count',
key: 'passive_like_count',
},
{
title: '精选数量',
dataIndex: 'place_top_at_count',
key: 'place_top_at_count',
},
{
title: '积分数',
dataIndex: 'integral_count',
key: 'integral_count',
},
{
title: '分享数',
dataIndex: 'share_count',
key: 'share_count',
},
{
title: '姓名',
dataIndex: 'name',
key: 'name',
},
{
title: '手机号',
dataIndex: 'mobile',
key: 'mobile',
},
{
title: '信息收集',
dataIndex: 'value',
key: 'value',
},
];
const exportColumns = [
{
title: '微信昵称',
dataIndex: 'wechat_user',
key: 'wechat_user',
},
{
title: '打卡天数',
dataIndex: 'unlock_count',
key: 'unlock_count',
},
{
title: '被点评',
dataIndex: 'review_count',
key: 'review_count',
},
{
title: '点评分数',
dataIndex: 'review_score',
key: 'review_score',
},
{
title: '被点赞',
dataIndex: 'passive_like_count',
key: 'passive_like_count',
},
{
title: '精选数量',
dataIndex: 'place_top_at_count',
key: 'place_top_at_count',
},
{
title: '积分数',
dataIndex: 'integral_count',
key: 'integral_count',
},
{
title: '分享数',
dataIndex: 'share_count',
key: 'share_count',
},
{
title: '姓名',
dataIndex: 'name',
key: 'name',
},
{
title: '手机号',
dataIndex: 'mobile',
key: 'mobile',
},
{
title: '信息收集',
dataIndex: 'value',
key: 'value',
},
];
const columns = [
{
title: '打卡名称',
......@@ -335,6 +455,10 @@ class LiveClass extends React.Component {
<div className={pageStyle.tableoperatebox}>
<span className="hreflink" onClick={() => this.editTheme(record)}>{record.subject_type == 3 ? '查看详情' : '编辑'}</span>
<Divider type="vertical" />
{
record.subject_type != 3 &&
<span className="hreflink" onClick={() => this.exportExcelStudent(record.subject_type == 1 ? exportJobColumns : exportColumns, record.id, record.subject_type)}>导出数据<Divider type="vertical" /></span>
}
{
record.subject_type != 3 &&
<span className="hreflink" onClick={() => this.copyClockMgt(record, 1)}>复制<Divider type="vertical" /></span>
......
......@@ -16,6 +16,10 @@ import AdCarousel from './pagecomponent/AdCarousel';
import AdCarouselEditor from './pagecomponent/AdCarouselEditor';
import ClassMoments from './pagecomponent/ClassMoments';
import ClassMomentsEditor from './pagecomponent/ClassMomentsEditor';
import OnlineClass from './pagecomponent/OnlineClass';
import OnlineClassEditor from './pagecomponent/OnlineClassEditor';
import TogetherClock from './pagecomponent/TogetherClock';
import TogetherClockEditor from './pagecomponent/TogetherClockEditor';
import Cropper from '../../components/Cropper';
class Officialweb extends React.Component {
componentDidMount() { // 挂载
......@@ -299,6 +303,60 @@ class Officialweb extends React.Component {
</div>
);
break;
case 'onlineclass':
renderDom = (
<div className={pageStyle.box} key={ele.type}>
<div
className={`${pageStyle.ContentBox} ${index == moduleSelect ? pageStyle.moduleSelect : ''}`}
key={ele.type}
onClick={event => this.moduleSelect(index, event)}
>
<OnlineClass />
{dragoverindex == index && <div className={pageStyle.dropendbox}>松开鼠标,模块会放在这里</div>}
</div>
{moduleSelect == index &&
<div className={pageStyle.blockOperateBox}>
{index == 6 && <div className={`${pageStyle.blockOperateItem} ${pageStyle.blockOperateItemGrey}`}><Icon className={pageStyle.blockOperateItemIcon} type="arrow-up" /></div>}
{index > 6 && <div className={pageStyle.blockOperateItem} onClick={() => this.pageBlockMove(index, 'up')}><Icon className={pageStyle.blockOperateItemIcon} type="arrow-up" /></div>}
{index < (newPageInfo.length - 1) && <div className={pageStyle.blockOperateItem} onClick={() => this.pageBlockMove(index, 'down')}><Icon className={pageStyle.blockOperateItemIcon} type="arrow-down" /></div>}
{index == (newPageInfo.length - 1) && <div className={`${pageStyle.blockOperateItem} ${pageStyle.blockOperateItemGrey}`}><Icon className={pageStyle.blockOperateItemIcon} type="arrow-down" /></div>}
</div>
}
{moduleSelect == index &&
<div className={pageStyle.editbox}>
<OnlineClassEditor />
</div>
}
</div>
);
break;
case 'togetherclock':
renderDom = (
<div className={pageStyle.box} key={ele.type}>
<div
className={`${pageStyle.ContentBox} ${index == moduleSelect ? pageStyle.moduleSelect : ''}`}
key={ele.type}
onClick={event => this.moduleSelect(index, event)}
>
<TogetherClock />
{dragoverindex == index && <div className={pageStyle.dropendbox}>松开鼠标,模块会放在这里</div>}
</div>
{moduleSelect == index &&
<div className={pageStyle.blockOperateBox}>
{index == 6 && <div className={`${pageStyle.blockOperateItem} ${pageStyle.blockOperateItemGrey}`}><Icon className={pageStyle.blockOperateItemIcon} type="arrow-up" /></div>}
{index > 6 && <div className={pageStyle.blockOperateItem} onClick={() => this.pageBlockMove(index, 'up')}><Icon className={pageStyle.blockOperateItemIcon} type="arrow-up" /></div>}
{index < (newPageInfo.length - 1) && <div className={pageStyle.blockOperateItem} onClick={() => this.pageBlockMove(index, 'down')}><Icon className={pageStyle.blockOperateItemIcon} type="arrow-down" /></div>}
{index == (newPageInfo.length - 1) && <div className={`${pageStyle.blockOperateItem} ${pageStyle.blockOperateItemGrey}`}><Icon className={pageStyle.blockOperateItemIcon} type="arrow-down" /></div>}
</div>
}
{moduleSelect == index &&
<div className={pageStyle.editbox}>
<TogetherClockEditor />
</div>
}
</div>
);
break;
case 'course':
renderDom = (
<div className={pageStyle.box} key={ele.type}>
......@@ -315,19 +373,6 @@ class Officialweb extends React.Component {
/>
{dragoverindex == index && <div className={pageStyle.dropendbox}>松开鼠标,模块会放在这里</div>}
</div>
{/* moduleSelect == index &&
<div className={pageStyle.blockOperateBox}>
{index == 2 && <div className={`${pageStyle.blockOperateItem} ${pageStyle.blockOperateItemGrey}`}><Icon className={pageStyle.blockOperateItemIcon} type="arrow-up" /></div>}
{index > 2 && <div className={pageStyle.blockOperateItem} onClick={() => this.pageBlockMove(index, 'up')}><Icon className={pageStyle.blockOperateItemIcon} type="arrow-up" /></div>}
{index < (newPageInfo.length - 1) && <div className={pageStyle.blockOperateItem} onClick={() => this.pageBlockMove(index, 'down')}><Icon className={pageStyle.blockOperateItemIcon} type="arrow-down" /></div>}
{index == (newPageInfo.length - 1) && <div className={`${pageStyle.blockOperateItem} ${pageStyle.blockOperateItemGrey}`}><Icon className={pageStyle.blockOperateItemIcon} type="arrow-down" /></div>}
</div>
*/}
{/* moduleSelect == index &&
<div className={pageStyle.editbox}>
<CourseEditor />
</div>
*/}
</div>
);
break;
......
......@@ -66,48 +66,64 @@
width: 350px;
}
.formRightImg {
width: 86px;
height: 86px;
position: relative;
border: 1px solid #979797;
margin-right: 15px;
display: flex;
align-items: center;
justify-content: center;
color: #0091FF;
text-align: center;
font-size: 14px;
margin-bottom: 15px;
.formItemTypeText {
font-size: 16px;
color: #000;
font-weight: 600;
margin-bottom: 10px;
}
.imgList {
width: 100%;
height: 100%;
margin-right: 10px;
display: flex;
align-items: center;
.imgItem {
width: 86px;
height: 86px;
margin-right: 10px;
position: relative;
.img {
width: 100%;
height: 100%;
display: block;
}
.closeAdIcon {
width: 30px;
height: 30px;
position: absolute;
right: 0;
top: 0;
color: #fff;
font-size: 20px;
cursor: pointer;
background-color: rgba(0,0,0,0.8);
line-height: 30px;
text-align: center;
}
}
}
.formItemInputBox {
position: relative;
width: 86px;
height: 86px;
border: 1px solid #979797;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
text-align: center;
.uploadInput {
position: absolute;
width: 100%;
height: 100%;
display: block;
left: 0;
top: 0;
opacity: 0;
z-index: 5;
}
}
.uploadInput {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
opacity: 0;
z-index: 5;
}
.closeAdIcon {
width: 30px;
height: 30px;
position: absolute;
right: 0;
top: 0;
color: #fff;
font-size: 20px;
cursor: pointer;
background-color: rgba(0,0,0,0.8);
line-height: 30px;
}
&>img {
width: 100%;
height: 100%;
......@@ -165,6 +181,7 @@
background-color: #fff;
border:1px dashed rgba(151,151,151,1);
margin-left: 75px;
cursor: pointer;
&:hover {
.AddFloatbox {
display: block;
......@@ -208,3 +225,23 @@
-webkit-transition: all .4s ease;
-o-transition: all .4s ease;
}
.progressWrap {
width: 300px;
height: 300px;
position: fixed;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-color: #f1f1f1;
border-radius: 15px;
z-index: 9999;
&>p {
font-size: 18px;
margin-top: 30px;
color: #1e8bff;
}
}
import React from 'react';
import { connect } from 'dva';
import { Carousel, Icon } from 'antd';
import PageStyle from './OnlineClass.less';
import { ossVideofy, imagify, videoPoster } from '../../../utils/index';
class OnlineClass extends React.Component {
constructor(props) {
super(props);
this.state = {
};
}
componentWillMount() {
}
componentWillUnmount() {
}
render() {
const { banner } = this.props;
return (
<div className={PageStyle.Bannercontainer}>
在线课堂
</div>
);
}
}
OnlineClass.propTypes = {
};
function mapStateToProps(state) {
const {
menus, defaultMenu, collapsed,
} = state.webapp;
return {
menus,
defaultMenu,
collapsed,
};
}
export default connect(mapStateToProps)(OnlineClass);
import React from 'react';
import { connect } from 'dva';
import { Form, Layout, Transfer, Button, Icon, message, Modal, Popconfirm, Progress } from 'antd';
import { videoPoster, imagify, ossVideofy } from '../../../utils/index';
import PageStyle from './OnlineClassEditor.less';
const FormItem = Form.Item;
const { Sider } = Layout;
class OnlineClassEditor extends React.Component {
constructor(props) {
super(props);
this.state = {
};
}
componentWillMount() {
}
componentWillUnmount() {
}
saveOnlinePlate = () => {
const { dispatch } = this.props;
dispatch({
type: 'officialweb/saveOnlinePlate',
});
}
handleChangeOnline = (nextTargetKeys, direction, moveKeys) => {
if (nextTargetKeys.length > 4) {
message.error('首页只能推荐4个噢!', 0.5);
return;
}
const { dispatch } = this.props;
dispatch({
type: 'officialweb/updateState',
payload: {
onlineClassTargetKeys: [...nextTargetKeys],
},
});
};
render() {
const {
onlineClassList,
onlineClassStatus,
onlineClassTargetKeys,
} = this.props;
console.log(onlineClassTargetKeys, 'onlineClassTargetKeys');
return (
<div className={`${PageStyle.SchoolInfoEditorcontainer} SchoolInfoEditorcontainer`}>
<div className={PageStyle.header}><span>在线课堂 </span><p>您可以从课堂列表中最多选择4个课程在微官网首页【在线课堂】展示</p></div>
<div className={PageStyle.FormBox} id="listbox">
<div className={PageStyle.transferBox}>
<Transfer
dataSource={onlineClassList}
titles={['全部课堂', '首页推荐']}
onChange={this.handleChangeOnline}
targetKeys={onlineClassTargetKeys}
render={item => item.title}
rowKey={record => record.id}
showSearch
lazy
/>
</div>
</div>
<div className={PageStyle.btnbox}>
<Button type="primary" htmlType="submit" className={PageStyle.SubmitBtn} loading={onlineClassStatus} onClick={this.saveOnlinePlate}>{onlineClassStatus ? '保存中...' : '保存'}</Button>
</div>
</div>
);
}
}
OnlineClassEditor.propTypes = {
};
function mapStateToProps(state) {
const {
onlineClassList,
onlineClassStatus,
onlineClassTargetKeys,
} = state.officialweb;
return {
onlineClassList,
onlineClassStatus,
onlineClassTargetKeys,
};
}
export default connect(mapStateToProps)(OnlineClassEditor);
@import '../../../less/variables.less';
@images: '@{imagesroot}/webapp/';
.SchoolInfoEditorcontainer {
}
.header {
color: #000;
font-size: 14px;
&>span {
font-weight: 700;
line-height: 50px;
}
padding-left: 20px;
border-bottom: 1px solid rgba(0,0,0,0.05);
}
.FormBox {
padding-top: 30px;
padding-bottom: 30px;
max-height: 400px;
overflow-y: scroll;
}
.FormItemClass {
padding-left: 30px;
margin-bottom: 8px;
display: flex;
align-items: center;
}
.btnbox {
text-align: right;
padding: 14px 35px 12px 0;
.SubmitBtn {
height: 34px;
line-height: 34px;
background-color: #FFFFFF;
color: #000000;
font-size: 14px;
border: 1px solid #ECECEC;
&:hover {
background-color: #FFFFFF;
color: #000000;
font-size: 14px;
border: 1px solid #ECECEC;
}
&:active {
background-color: #FFFFFF;
color: #000000;
font-size: 14px;
border: 1px solid #ECECEC;
}
&:focus {
background-color: #FFFFFF;
color: #000000;
font-size: 14px;
border: 1px solid #ECECEC;
}
}
}
::-webkit-scrollbar {
width: 8px;
height: 10px;
background-color: rgba(0,0,0,0);
}
::-webkit-scrollbar-thumb {
border-radius: 6px;
background-color: rgba(0,0,0,.2);
transition: all .4s ease;
-moz-transition: all .4s ease;
-webkit-transition: all .4s ease;
-o-transition: all .4s ease;
}
.progressWrap {
width: 300px;
height: 300px;
position: fixed;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-color: #f1f1f1;
border-radius: 15px;
z-index: 9999;
&>p {
font-size: 18px;
margin-top: 30px;
color: #1e8bff;
}
}
.transferBox {
margin-left: 27px;
margin-top: 20px;
background-color: #fff;
padding: 10px;
:global {
.ant-transfer-list {
width: 240px;
}
.ant-transfer-list-header {
border-top: 1px solid #e8e8e8;
}
}
}
import React from 'react';
import { connect } from 'dva';
import { Carousel, Icon } from 'antd';
import PageStyle from './TogetherClock.less';
import { ossVideofy, imagify, videoPoster } from '../../../utils/index';
class TogetherClock extends React.Component {
constructor(props) {
super(props);
this.state = {
};
}
componentWillMount() {
}
componentWillUnmount() {
}
render() {
const { banner } = this.props;
return (
<div className={PageStyle.Bannercontainer}>
一起打卡
</div>
);
}
}
TogetherClock.propTypes = {
};
function mapStateToProps(state) {
const {
menus, defaultMenu, collapsed,
} = state.webapp;
return {
menus,
defaultMenu,
collapsed,
};
}
export default connect(mapStateToProps)(TogetherClock);
import React from 'react';
import { connect } from 'dva';
import { Form, Layout, Transfer, Button, Icon, message, Modal, Popconfirm, Progress } from 'antd';
import { videoPoster, imagify, ossVideofy } from '../../../utils/index';
import PageStyle from './TogetherClockEditor.less';
const FormItem = Form.Item;
const { Sider } = Layout;
class TogetherClockEditor extends React.Component {
constructor(props) {
super(props);
this.state = {
};
}
componentWillMount() {
}
componentWillUnmount() {
}
saveClockPlate = () => {
const { dispatch } = this.props;
dispatch({
type: 'officialweb/saveClockPlate',
});
}
handleChangeClock = (nextTargetKeys, direction, moveKeys) => {
if (nextTargetKeys.length > 4) {
message.error('首页只能推荐4个噢!', 0.5);
return;
}
const { dispatch } = this.props;
dispatch({
type: 'officialweb/updateState',
payload: {
togetherClockTargetKeys: [...nextTargetKeys],
},
});
};
render() {
const {
togetherClockList,
togetherClockStatus,
togetherClockTargetKeys,
} = this.props;
return (
<div className={`${PageStyle.SchoolInfoEditorcontainer} SchoolInfoEditorcontainer`}>
<div className={PageStyle.header}><span>一起打卡 </span><p>您可以从打卡主题列表中最多选择4个主题在微官网首页【一起打卡】展示</p></div>
<div className={PageStyle.FormBox} id="listbox">
<div className={PageStyle.transferBox}>
<Transfer
dataSource={togetherClockList}
titles={['全部打卡', '首页推荐']}
onChange={this.handleChangeClock}
targetKeys={togetherClockTargetKeys}
render={item => item.title}
rowKey={record => record.id}
showSearch
lazy
/>
</div>
</div>
<div className={PageStyle.btnbox}>
<Button type="primary" htmlType="submit" className={PageStyle.SubmitBtn} loading={togetherClockStatus} onClick={this.saveClockPlate}>{togetherClockStatus ? '保存中...' : '保存'}</Button>
</div>
</div>
);
}
}
TogetherClockEditor.propTypes = {
};
function mapStateToProps(state) {
const {
togetherClockList,
togetherClockStatus,
togetherClockTargetKeys,
} = state.officialweb;
return {
togetherClockList,
togetherClockStatus,
togetherClockTargetKeys,
};
}
export default connect(mapStateToProps)(TogetherClockEditor);
@import '../../../less/variables.less';
@images: '@{imagesroot}/webapp/';
.SchoolInfoEditorcontainer {
}
.header {
color: #000;
font-size: 14px;
&>span {
font-weight: 700;
line-height: 50px;
}
padding-left: 20px;
border-bottom: 1px solid rgba(0,0,0,0.05);
}
.FormBox {
padding-top: 30px;
padding-bottom: 30px;
max-height: 400px;
overflow-y: scroll;
}
.FormItemClass {
padding-left: 30px;
margin-bottom: 8px;
display: flex;
align-items: center;
}
.btnbox {
text-align: right;
padding: 14px 35px 12px 0;
.SubmitBtn {
height: 34px;
line-height: 34px;
background-color: #FFFFFF;
color: #000000;
font-size: 14px;
border: 1px solid #ECECEC;
&:hover {
background-color: #FFFFFF;
color: #000000;
font-size: 14px;
border: 1px solid #ECECEC;
}
&:active {
background-color: #FFFFFF;
color: #000000;
font-size: 14px;
border: 1px solid #ECECEC;
}
&:focus {
background-color: #FFFFFF;
color: #000000;
font-size: 14px;
border: 1px solid #ECECEC;
}
}
}
::-webkit-scrollbar {
width: 8px;
height: 10px;
background-color: rgba(0,0,0,0);
}
::-webkit-scrollbar-thumb {
border-radius: 6px;
background-color: rgba(0,0,0,.2);
transition: all .4s ease;
-moz-transition: all .4s ease;
-webkit-transition: all .4s ease;
-o-transition: all .4s ease;
}
.progressWrap {
width: 300px;
height: 300px;
position: fixed;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-color: #f1f1f1;
border-radius: 15px;
z-index: 9999;
&>p {
font-size: 18px;
margin-top: 30px;
color: #1e8bff;
}
}
.transferBox {
margin-left: 27px;
margin-top: 20px;
background-color: #fff;
padding: 10px;
:global {
.ant-transfer-list {
width: 240px;
}
.ant-transfer-list-header {
border-top: 1px solid #e8e8e8;
}
}
}
......@@ -119,3 +119,48 @@ export function adsSave(params) {
data,
});
}
export function momentList(params) {
const data = qs.stringify(params);
return request({
url: `${api.officaialweb.moments}?${data}`,
method: 'GET',
});
}
export function momentSave(params) {
const data = qs.stringify(params);
return request({
url: `${api.officaialweb.momentSave}`,
method: 'POST',
data,
});
}
export function onlineClassList(params) {
const data = qs.stringify(params);
return request({
url: `${api.officaialweb.onlineClass}?${data}`,
method: 'GET',
});
}
export function onlineClassSave(params) {
const data = qs.stringify(params);
return request({
url: `${api.officaialweb.onlineClassSave}`,
method: 'POST',
data,
});
}
export function subjectMixture(params) {
const data = qs.stringify(params);
return request({
url: `${api.officaialweb.subjectMixture}?${data}`,
method: 'GET',
});
}
export function subjectMixtureSave(params) {
const data = qs.stringify(params);
return request({
url: `${api.officaialweb.subjectMixtureSave}`,
method: 'POST',
data,
});
}
......@@ -40,16 +40,34 @@ function exportExcel(headers, data, fileName = 'XXX.xlsx', type) {
// eslint-disable-next-line array-callback-return
thisdata = data.map((item) => {
return {
wechat_user: item.wechat_user && item.wechat_user.nickname ? item.wechat_user.nickname : '',
unlock_count: item.unlock_count ? item.unlock_count : '-',
wechat_user: item.school_student && item.school_student.nickname ? item.school_student.nickname : '',
unlock_count: item.max_clock_count ? item.max_clock_count : '-',
review_count: item.review_count,
review_score: Number(item.review_score) / 5,
passive_like_count: item.passive_like_count,
passive_like_count: item.like_count,
place_top_at_count: item.place_top_at_count,
total_share_uv: item.total_share_uv,
name: item.subjectStudent && item.subjectStudent.name ? item.subjectStudent.name : '',
mobile: item.subjectStudent && item.subjectStudent.mobile ? item.subjectStudent.mobile : '',
value: item.subjectStudent && item.subjectStudent.content ? JSON.parse(item.subjectStudent.content).value : '',
integral_count: item.integral_count,
share_count: item.share_count,
name: item.name ? item.name : '',
mobile: item.mobile ? item.mobile : '',
value: item.content && item.content ? JSON.parse(item.content).value : '',
};
});
break;
case 'jobClockStudent':
// eslint-disable-next-line array-callback-return
thisdata = data.map((item) => {
return {
wechat_user: item.school_student && item.school_student.nickname ? item.school_student.nickname : '',
review_count: item.review_count,
review_score: Number(item.review_score) / 5,
passive_like_count: item.like_count,
place_top_at_count: item.place_top_at_count,
integral_count: item.integral_count,
share_count: item.share_count,
name: item.name ? item.name : '',
mobile: item.mobile ? item.mobile : '',
value: item.content && item.content ? JSON.parse(item.content).value : '',
};
});
break;
......
......@@ -25,7 +25,7 @@ axios.interceptors.request.use((config) => {
return Promise.reject(error);
});
// axios.defaults.timeout = 30000;
axios.defaults.timeout = 30000;
axios.defaults.timeout = 1000 * 60 * 2;
axios.defaults.retry = 1;
axios.defaults.retryDelay = 3000;
// Add a response interceptor
......
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