Commit 2484af9c authored by sujie@126.com's avatar sujie@126.com

dd

parent f66ec063
...@@ -161,5 +161,5 @@ export default { ...@@ -161,5 +161,5 @@ export default {
createtheme: { createtheme: {
addTheme: `${dakaapi}member/subject`, addTheme: `${dakaapi}member/subject`,
}, },
getschooluuid: `${dakaapi}member/school_uuid`,
}; };
...@@ -11,13 +11,13 @@ class InviteCodeDialog extends React.Component { ...@@ -11,13 +11,13 @@ class InviteCodeDialog extends React.Component {
}; };
} }
componentDidMount() { // 挂载 componentDidMount() { // 挂载
const clipboard = new ClipboardJS('#btnCopyLink'); // 点击按钮复制到粘贴板 this.clipboard = new ClipboardJS('#btnCopyLink'); // 点击按钮复制到粘贴板
clipboard.on('success', () => { this.clipboard.on('success', () => {
message.success('复制成功'); message.success('复制成功');
}); });
} }
componentWillUnmount() { // 卸载 componentWillUnmount() { // 卸载
this.clipboard.destroy();
} }
render() { render() {
const { const {
......
...@@ -990,21 +990,27 @@ export default { ...@@ -990,21 +990,27 @@ export default {
}, },
* createInviteQrcode({ payload }, { call, put, select }) { * createInviteQrcode({ payload }, { call, put, select }) {
const { sid } = yield select(state => state.webapp); const { sid } = yield select(state => state.webapp);
const qrcodeData = yield call(commonAjax.generateQrcode, { const scholluuidData = yield call(commonAjax.getschooluuid, {
scene: `s=${sid}`, school_id: sid,
page: 'src/pages/setting/bindmobile',
}); });
if (qrcodeData.code == 200) { console.log(scholluuidData, 'scholluuidData');
message.success('小程序码生成成功', 1); if (scholluuidData.code == 200) {
yield put({ const qrcodeData = yield call(commonAjax.generateQrcode, {
type: 'updateState', scene: `s=${sid}uuid=${scholluuidData.data}`,
payload: { page: 'src/pages/setting/bindmobile',
inviteCode: qrcodeData.data.url,
inviteCodeShow: true,
},
}); });
} else { if (qrcodeData.code == 200) {
message.error('小程序码生成失败', 1); message.success('小程序码生成成功', 1);
yield put({
type: 'updateState',
payload: {
inviteCode: qrcodeData.data.url,
inviteCodeShow: true,
},
});
} else {
message.error('小程序码生成失败', 1);
}
} }
}, },
}, },
......
...@@ -25,14 +25,14 @@ class ClassrRgistration extends React.Component { ...@@ -25,14 +25,14 @@ class ClassrRgistration extends React.Component {
pageIn('班级管理'); pageIn('班级管理');
// 初始化地图函数 自定义函数名init // 初始化地图函数 自定义函数名init
// 定义map变量 调用 qq.maps.Map() 构造函数 获取地图显示容器 // 定义map变量 调用 qq.maps.Map() 构造函数 获取地图显示容器
const clipboard = new ClipboardJS('#btnCopyLink'); // 点击按钮复制到粘贴板 this.clipboard = new ClipboardJS('#btnCopyLink'); // 点击按钮复制到粘贴板
clipboard.on('success', () => { this.clipboard.on('success', () => {
message.success('复制成功'); message.success('复制成功');
}); });
} }
componentWillUnmount() { // 卸载 componentWillUnmount() { // 卸载
this.clipboard.destroy();
} }
componentWillReceiveProps(nextProps) { componentWillReceiveProps(nextProps) {
} }
......
...@@ -40,6 +40,7 @@ class StudentMgt extends React.Component { ...@@ -40,6 +40,7 @@ class StudentMgt extends React.Component {
}, },
}, },
}, },
isExpendMore: false,
}; };
componentDidMount() { // 挂载 componentDidMount() { // 挂载
pageIn('学员管理'); pageIn('学员管理');
...@@ -516,6 +517,11 @@ class StudentMgt extends React.Component { ...@@ -516,6 +517,11 @@ class StudentMgt extends React.Component {
}, },
}); });
} }
expendMore = () => {
this.setState({
isExpendMore: !this.state.isExpendMore,
});
}
render() { render() {
const { getFieldDecorator } = this.props.form; const { getFieldDecorator } = this.props.form;
const { const {
...@@ -563,7 +569,7 @@ class StudentMgt extends React.Component { ...@@ -563,7 +569,7 @@ class StudentMgt extends React.Component {
inviteCodeShow, inviteCodeShow,
inviteCode, inviteCode,
} = this.props; } = this.props;
const { qrCodeTitle } = this.state; const { qrCodeTitle, isExpendMore } = this.state;
const columns = [ const columns = [
{ {
title: '学员姓名', title: '学员姓名',
...@@ -676,7 +682,10 @@ class StudentMgt extends React.Component { ...@@ -676,7 +682,10 @@ class StudentMgt extends React.Component {
{hasBtnPower('sjd/student', 'bundlingCode') && <Button id={pageStyle.headerself} className={pageStyle.headerbtn} onClick={() => this.inviteCodeDialogVisible(true)}>快捷邀请学员</Button>} {hasBtnPower('sjd/student', 'bundlingCode') && <Button id={pageStyle.headerself} className={pageStyle.headerbtn} onClick={() => this.inviteCodeDialogVisible(true)}>快捷邀请学员</Button>}
</div> </div>
<div className={pageStyle.search}> <div className={pageStyle.search}>
<div className={pageStyle.title}>学员搜索</div> <div className={pageStyle.title}>
学员搜索
<div className={pageStyle.expendMore} onClick={this.expendMore}>{isExpendMore ? '收起' : '展开'}更多筛选选项 {isExpendMore ? '-' : '+'}</div>
</div>
<div className={pageStyle.searchbox}> <div className={pageStyle.searchbox}>
<Row <Row
gutter={{ gutter={{
...@@ -711,56 +720,58 @@ class StudentMgt extends React.Component { ...@@ -711,56 +720,58 @@ class StudentMgt extends React.Component {
</Select> </Select>
</Col> </Col>
</Row> </Row>
<Row {isExpendMore &&
gutter={{ <Row
sm: 24, xs: 24, md: 24, lg: 24, gutter={{
}} sm: 24, xs: 24, md: 24, lg: 24,
className={pageStyle.searchrow} }}
> className={pageStyle.searchrow}
<Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}> >
<div className={pageStyle.formitemlabel}>生日月份</div> <Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}>
<Select className={pageStyle.selectitem} placeholder="请选择月份" value={searchstudentListQueryParams.birthday_month} onChange={e => this.searchParamsChange(e, 'Select', 'birthday_month')}> <div className={pageStyle.formitemlabel}>生日月份</div>
<Option value="">全部</Option> <Select className={pageStyle.selectitem} placeholder="请选择月份" value={searchstudentListQueryParams.birthday_month} onChange={e => this.searchParamsChange(e, 'Select', 'birthday_month')}>
<Option value={1}>一月</Option> <Option value="">全部</Option>
<Option value={2}>二月</Option> <Option value={1}>一月</Option>
<Option value={3}>三月</Option> <Option value={2}>二月</Option>
<Option value={4}>四月</Option> <Option value={3}>三月</Option>
<Option value={5}>五月</Option> <Option value={4}>四月</Option>
<Option value={6}>六月</Option> <Option value={5}>五月</Option>
<Option value={7}>七月</Option> <Option value={6}>六月</Option>
<Option value={8}>八月</Option> <Option value={7}>七月</Option>
<Option value={9}>九月</Option> <Option value={8}>八月</Option>
<Option value={10}>十月</Option> <Option value={9}>九月</Option>
<Option value={11}>十一月</Option> <Option value={10}>十月</Option>
<Option value={12}>十二月</Option> <Option value={11}>十一月</Option>
</Select> <Option value={12}>十二月</Option>
</Col> </Select>
<Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}> </Col>
<div className={pageStyle.formitemlabel}>微信绑定</div> <Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}>
<Select className={pageStyle.selectitem} placeholder="请选择结业状态" value={searchstudentListQueryParams.wechat_status} onChange={e => this.searchParamsChange(e, 'Select', 'wechat_status')}> <div className={pageStyle.formitemlabel}>微信绑定</div>
<Option value="">全部</Option> <Select className={pageStyle.selectitem} placeholder="请选择结业状态" value={searchstudentListQueryParams.wechat_status} onChange={e => this.searchParamsChange(e, 'Select', 'wechat_status')}>
<Option value={1}>已绑定</Option> <Option value="">全部</Option>
<Option value={2}>未绑定</Option> <Option value={1}>已绑定</Option>
</Select> <Option value={2}>未绑定</Option>
</Col> </Select>
<Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 3 }}> </Col>
<div className={pageStyle.formitemlabel} >是否选班</div> <Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 3 }}>
<Select className={pageStyle.selectitem} style={{ width: 74 }} placeholder="是" value={searchstudentListQueryParams.assign_class_status} onChange={e => this.searchParamsChange(e, 'Select', 'assign_class_status')}> <div className={pageStyle.formitemlabel} >是否选班</div>
<Option value="">全部</Option> <Select className={pageStyle.selectitem} style={{ width: 74 }} placeholder="是" value={searchstudentListQueryParams.assign_class_status} onChange={e => this.searchParamsChange(e, 'Select', 'assign_class_status')}>
<Option value={1}></Option> <Option value="">全部</Option>
<Option value={2}></Option> <Option value={1}></Option>
</Select> <Option value={2}></Option>
</Col> </Select>
<Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 3 }}> </Col>
<div className={pageStyle.formitemlabel} >学员年龄</div> <Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 3 }}>
<InputNumber style={{ width: 50 }} value={searchstudentListQueryParams.age_start} min="0" onChange={e => this.searchParamsChange(e, 'Select', 'age_start')} /> ~ <InputNumber style={{ width: 50 }} min="0" value={searchstudentListQueryParams.age_end} onChange={e => this.searchParamsChange(e, 'Select', 'age_end')} /> <div className={pageStyle.formitemlabel} >学员年龄</div>
</Col> <InputNumber style={{ width: 50 }} value={searchstudentListQueryParams.age_start} min="0" onChange={e => this.searchParamsChange(e, 'Select', 'age_start')} /> ~ <InputNumber style={{ width: 50 }} min="0" value={searchstudentListQueryParams.age_end} onChange={e => this.searchParamsChange(e, 'Select', 'age_end')} />
<Col className={pageStyle.searchbtnbox} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}> </Col>
<Button className={pageStyle.resetbtn} onClick={this.reset}>重置</Button> <Col className={pageStyle.searchbtnbox} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}>
<Button className={pageStyle.searchbtn} type="primary" onClick={this.search}>搜索</Button> <Button className={pageStyle.resetbtn} onClick={this.reset}>重置</Button>
<Button icon="download" className={pageStyle.downloadbtn} onClick={() => this.exportExcel(columns)} >导出</Button> <Button className={pageStyle.searchbtn} type="primary" onClick={this.search}>搜索</Button>
</Col> <Button icon="download" className={pageStyle.downloadbtn} onClick={() => this.exportExcel(columns)} >导出</Button>
</Row> </Col>
</Row>
}
</div> </div>
</div> </div>
<div className={pageStyle.table}> <div className={pageStyle.table}>
......
...@@ -30,7 +30,25 @@ ...@@ -30,7 +30,25 @@
line-height:55px; line-height:55px;
padding-left: 32px; padding-left: 32px;
border-bottom: solid 1px rgba(233,233,233,1); border-bottom: solid 1px rgba(233,233,233,1);
position: relative;
// margin-bottom: 24px; // margin-bottom: 24px;
.expendMore{
position: absolute;
right: 24px;
top: 10px;
width:153px;
height:32px;
background:rgba(255,255,255,1);
border-radius:4px;
border:1px solid rgba(24,144,255,1);
line-height: 32px;
text-align: center;
font-size:14px;
color:rgba(24,144,255,1);
font-family:PingFangSC-Regular,PingFangSC;
font-weight:400;
cursor: pointer;
}
} }
.tablebox { .tablebox {
padding: 24px 34px 0; padding: 24px 34px 0;
......
...@@ -84,11 +84,11 @@ class EditClassModal extends React.Component { ...@@ -84,11 +84,11 @@ class EditClassModal extends React.Component {
rules: [ rules: [
{ {
required: true, required: true,
message: '请输入号', message: '请输入老师手机号',
}, },
{ pattern: /^1[3456789]{1}[0-9]{9}$/, message: '请输入正确号!' }, { pattern: /^1[3456789]{1}[0-9]{9}$/, message: '请输入正确手机号!' },
], ],
})(<Input style={{ width: 200 }} placeholder="请输入号" />)} })(<Input style={{ width: 200 }} placeholder="请输入老师手机号" />)}
</Form.Item> </Form.Item>
} }
{editType == 'edit' && {editType == 'edit' &&
......
...@@ -89,3 +89,10 @@ export function schoolLoginTime(params) { ...@@ -89,3 +89,10 @@ export function schoolLoginTime(params) {
data, data,
}); });
} }
export function getschooluuid(params) {
const data = qs.stringify(params);
return request({
url: `${api.getschooluuid}?${data}`,
method: 'GET',
});
}
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