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

dd

parent f66ec063
......@@ -161,5 +161,5 @@ export default {
createtheme: {
addTheme: `${dakaapi}member/subject`,
},
getschooluuid: `${dakaapi}member/school_uuid`,
};
......@@ -11,13 +11,13 @@ class InviteCodeDialog extends React.Component {
};
}
componentDidMount() { // 挂载
const clipboard = new ClipboardJS('#btnCopyLink'); // 点击按钮复制到粘贴板
clipboard.on('success', () => {
this.clipboard = new ClipboardJS('#btnCopyLink'); // 点击按钮复制到粘贴板
this.clipboard.on('success', () => {
message.success('复制成功');
});
}
componentWillUnmount() { // 卸载
this.clipboard.destroy();
}
render() {
const {
......
......@@ -990,21 +990,27 @@ export default {
},
* createInviteQrcode({ payload }, { call, put, select }) {
const { sid } = yield select(state => state.webapp);
const qrcodeData = yield call(commonAjax.generateQrcode, {
scene: `s=${sid}`,
page: 'src/pages/setting/bindmobile',
const scholluuidData = yield call(commonAjax.getschooluuid, {
school_id: sid,
});
if (qrcodeData.code == 200) {
message.success('小程序码生成成功', 1);
yield put({
type: 'updateState',
payload: {
inviteCode: qrcodeData.data.url,
inviteCodeShow: true,
},
console.log(scholluuidData, 'scholluuidData');
if (scholluuidData.code == 200) {
const qrcodeData = yield call(commonAjax.generateQrcode, {
scene: `s=${sid}uuid=${scholluuidData.data}`,
page: 'src/pages/setting/bindmobile',
});
} else {
message.error('小程序码生成失败', 1);
if (qrcodeData.code == 200) {
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 {
pageIn('班级管理');
// 初始化地图函数 自定义函数名init
// 定义map变量 调用 qq.maps.Map() 构造函数 获取地图显示容器
const clipboard = new ClipboardJS('#btnCopyLink'); // 点击按钮复制到粘贴板
clipboard.on('success', () => {
this.clipboard = new ClipboardJS('#btnCopyLink'); // 点击按钮复制到粘贴板
this.clipboard.on('success', () => {
message.success('复制成功');
});
}
componentWillUnmount() { // 卸载
this.clipboard.destroy();
}
componentWillReceiveProps(nextProps) {
}
......
......@@ -40,6 +40,7 @@ class StudentMgt extends React.Component {
},
},
},
isExpendMore: false,
};
componentDidMount() { // 挂载
pageIn('学员管理');
......@@ -516,6 +517,11 @@ class StudentMgt extends React.Component {
},
});
}
expendMore = () => {
this.setState({
isExpendMore: !this.state.isExpendMore,
});
}
render() {
const { getFieldDecorator } = this.props.form;
const {
......@@ -563,7 +569,7 @@ class StudentMgt extends React.Component {
inviteCodeShow,
inviteCode,
} = this.props;
const { qrCodeTitle } = this.state;
const { qrCodeTitle, isExpendMore } = this.state;
const columns = [
{
title: '学员姓名',
......@@ -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>}
</div>
<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}>
<Row
gutter={{
......@@ -711,56 +720,58 @@ class StudentMgt extends React.Component {
</Select>
</Col>
</Row>
<Row
gutter={{
sm: 24, xs: 24, md: 24, lg: 24,
}}
className={pageStyle.searchrow}
>
<Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}>
<div className={pageStyle.formitemlabel}>生日月份</div>
<Select className={pageStyle.selectitem} placeholder="请选择月份" value={searchstudentListQueryParams.birthday_month} onChange={e => this.searchParamsChange(e, 'Select', 'birthday_month')}>
<Option value="">全部</Option>
<Option value={1}>一月</Option>
<Option value={2}>二月</Option>
<Option value={3}>三月</Option>
<Option value={4}>四月</Option>
<Option value={5}>五月</Option>
<Option value={6}>六月</Option>
<Option value={7}>七月</Option>
<Option value={8}>八月</Option>
<Option value={9}>九月</Option>
<Option value={10}>十月</Option>
<Option value={11}>十一月</Option>
<Option value={12}>十二月</Option>
</Select>
</Col>
<Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}>
<div className={pageStyle.formitemlabel}>微信绑定</div>
<Select className={pageStyle.selectitem} placeholder="请选择结业状态" value={searchstudentListQueryParams.wechat_status} onChange={e => this.searchParamsChange(e, 'Select', 'wechat_status')}>
<Option value="">全部</Option>
<Option value={1}>已绑定</Option>
<Option value={2}>未绑定</Option>
</Select>
</Col>
<Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 3 }}>
<div className={pageStyle.formitemlabel} >是否选班</div>
<Select className={pageStyle.selectitem} style={{ width: 74 }} placeholder="是" value={searchstudentListQueryParams.assign_class_status} onChange={e => this.searchParamsChange(e, 'Select', 'assign_class_status')}>
<Option value="">全部</Option>
<Option value={1}></Option>
<Option value={2}></Option>
</Select>
</Col>
<Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 3 }}>
<div className={pageStyle.formitemlabel} >学员年龄</div>
<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>
<Col className={pageStyle.searchbtnbox} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}>
<Button className={pageStyle.resetbtn} onClick={this.reset}>重置</Button>
<Button className={pageStyle.searchbtn} type="primary" onClick={this.search}>搜索</Button>
<Button icon="download" className={pageStyle.downloadbtn} onClick={() => this.exportExcel(columns)} >导出</Button>
</Col>
</Row>
{isExpendMore &&
<Row
gutter={{
sm: 24, xs: 24, md: 24, lg: 24,
}}
className={pageStyle.searchrow}
>
<Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}>
<div className={pageStyle.formitemlabel}>生日月份</div>
<Select className={pageStyle.selectitem} placeholder="请选择月份" value={searchstudentListQueryParams.birthday_month} onChange={e => this.searchParamsChange(e, 'Select', 'birthday_month')}>
<Option value="">全部</Option>
<Option value={1}>一月</Option>
<Option value={2}>二月</Option>
<Option value={3}>三月</Option>
<Option value={4}>四月</Option>
<Option value={5}>五月</Option>
<Option value={6}>六月</Option>
<Option value={7}>七月</Option>
<Option value={8}>八月</Option>
<Option value={9}>九月</Option>
<Option value={10}>十月</Option>
<Option value={11}>十一月</Option>
<Option value={12}>十二月</Option>
</Select>
</Col>
<Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}>
<div className={pageStyle.formitemlabel}>微信绑定</div>
<Select className={pageStyle.selectitem} placeholder="请选择结业状态" value={searchstudentListQueryParams.wechat_status} onChange={e => this.searchParamsChange(e, 'Select', 'wechat_status')}>
<Option value="">全部</Option>
<Option value={1}>已绑定</Option>
<Option value={2}>未绑定</Option>
</Select>
</Col>
<Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 3 }}>
<div className={pageStyle.formitemlabel} >是否选班</div>
<Select className={pageStyle.selectitem} style={{ width: 74 }} placeholder="是" value={searchstudentListQueryParams.assign_class_status} onChange={e => this.searchParamsChange(e, 'Select', 'assign_class_status')}>
<Option value="">全部</Option>
<Option value={1}></Option>
<Option value={2}></Option>
</Select>
</Col>
<Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 3 }}>
<div className={pageStyle.formitemlabel} >学员年龄</div>
<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>
<Col className={pageStyle.searchbtnbox} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}>
<Button className={pageStyle.resetbtn} onClick={this.reset}>重置</Button>
<Button className={pageStyle.searchbtn} type="primary" onClick={this.search}>搜索</Button>
<Button icon="download" className={pageStyle.downloadbtn} onClick={() => this.exportExcel(columns)} >导出</Button>
</Col>
</Row>
}
</div>
</div>
<div className={pageStyle.table}>
......
......@@ -30,7 +30,25 @@
line-height:55px;
padding-left: 32px;
border-bottom: solid 1px rgba(233,233,233,1);
position: relative;
// 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 {
padding: 24px 34px 0;
......
......@@ -84,11 +84,11 @@ class EditClassModal extends React.Component {
rules: [
{
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>
}
{editType == 'edit' &&
......
......@@ -89,3 +89,10 @@ export function schoolLoginTime(params) {
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