Commit 60176430 by yuananting

fix:修复新建考试白屏、考试设置按钮统一、培训计划简介改文本

parent 3fc2dbee
......@@ -2,7 +2,7 @@
* @Author: zhangleyuan
* @Date: 2021-02-20 16:13:39
* @LastEditors: yuananting
* @LastEditTime: 2021-07-18 16:06:17
* @LastEditTime: 2021-07-20 17:17:12
* @Description: 描述一下
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -286,7 +286,7 @@ function AddPlan() {
<div className='add-plan-page__form'>
<div className='basic-info__wrap'>
<div className='title'>基本信息</div>
<BasicInfo data={{ ...basicData, id}} onChange={handleChangeBasicInfo} />
<BasicInfo data={basicData} onChange={handleChangeBasicInfo} />
</div>
<div className='basic-info__wrap'>
<div className='title'>培训任务</div>
......
......@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-07-05 10:48:08
* @LastEditors: yuananting
* @LastEditTime: 2021-07-18 16:07:34
* @LastEditTime: 2021-07-20 17:23:13
* @Description: 描述一下咯
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
......@@ -133,14 +133,10 @@ class BasicInfo extends React.Component {
this.props.onChange(field, _percentCompleteLive);
};
changeIntro = (value) => {
this.props.onChange('instro', value);
};
render() {
const { operatorModalVisible, showSelectFileModal, visible, imageFile } = this.state;
const { data } = this.props;
const { planName, coverUrl, instro, enableState, operateType, selectOperatorList, percentCompleteLive, percentCompleteVideo, percentCompletePicture, planId, id } =
const { planName, coverUrl, instro, enableState, operateType, selectOperatorList, percentCompleteLive, percentCompleteVideo, percentCompletePicture } =
data;
// 当前是否使用的是默认图片
const isDefaultCover = coverUrl === defaultCover;
......@@ -183,17 +179,14 @@ class BasicInfo extends React.Component {
</div>
<div className='introduction'>
<span className='label'>简介:</span>
{(!id || planId ) && (<GraphicsEditor
id='intro'
isIntro={true}
maxLimit={1000}
detail={{
content: instro,
}}
onChange={(val) => {
this.changeIntro(val);
}}
/>)}
<TextArea
placeholder='请输入培训计划简介'
maxLength={200}
style={{ width: '552px', height: '110px' }}
className='instro-textarea'
value={instro}
onChange={(e) => this.props.onChange('instro', e.target.value)}
/>
</div>
<div className='wether-use'>
<span className='label'>是否启用:</span>
......
......@@ -454,24 +454,25 @@ function AddExam(props: any) {
<div className="title" style={{ marginTop: 40 }}>考试设置</div>
<Form.Item label="身份验证" required>
<div style={{ display: 'flex', marginLeft: 4, }}>
<Switch style={{ position: 'relative', top: 6 }}
<Switch
checked={needPhone == 'NEED_PHONE_VERIFY'}
onChange={(val) => { setNeedPhone(val ? 'NEED_PHONE_VERIFY' : 'DO_NOT_NEED_PHONE_VERIFY') }}
></Switch>
<div style={{ position: 'relative', top: 3, left: 8, color: "#999" }}><p>开启:需要绑定手机号的学员才能参加考试</p>
<p>关闭:微信/企业微信登陆直接参加考试</p></div>
<div style={{ position: 'relative', left: 8, color: "#999" }}>
{needPhone == 'NEED_PHONE_VERIFY' ? '已开启,学员需绑定手机号才可参与考试' : '已关闭,学员无需绑定手机号即可参与考试'}
</div>
</div>
</Form.Item>
<Form.Item label="选项乱序" required>
<div style={{ display: 'flex', marginLeft: 4, }}>
<Switch style={{ position: 'relative', top: 6 }}
<Switch
checked={needOptionDisorder == 'OPTION_RANDOM'}
onChange={(val) => { setNeedOptionDisorder(val ? 'OPTION_RANDOM' : 'OPTION_SORT') }}
></Switch>
<div style={{ position: 'relative', top: 3, left: 8, color: "#999" }}><p>开启:选择题的选项随机排序</p>
<p>关闭:选择题按题目原有顺序展示</p></div>
<div style={{ position: 'relative', left: 8, color: "#999" }}>
{needOptionDisorder == 'OPTION_RANDOM' ? '已开启,选项随机排序' : '已关闭,选项按设置顺序排序'}
</div>
</div>
</Form.Item>
......
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