修复选择题遗留问题

dev_cxt
杨树明 5 years ago
parent 655768b9bf
commit 054e6a946d

@ -30,7 +30,7 @@ const env = getClientEnvironment(publicUrl);
module.exports = {
// You may want 'eval' instead if you prefer to see the compiled output in DevTools.
// See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s
devtool: "cheap-module-eval-source-map",
//devtool: "cheap-module-eval-source-map",
// 开启调试
//devtool: "source-map", // 开启调试
// These are the "entry points" to our application.

@ -326,8 +326,8 @@ module.exports = {
comments: false
},
compress: {
drop_debugger: false,
drop_console: false
drop_debugger: true,
drop_console: true
}
}
}),

@ -21,8 +21,16 @@ import './tpiPageForMobile.css';
import actions from '../../redux/actions';
const $ = window.$;
class MainContent extends Component {
constructor(props) {
super(props)
this.chooseQ = React.createRef();
}
chooseQfun = (Ref) => {
this.chooseQ = Ref;
}
componentDidMount() {
// ios下图标位置有问题
this.props.mainContentfun(this)
setTimeout(()=>{
if (window.$('.b-label>.resize-helper').position().top < 100) {
window.$('.b-label>.resize-helper').css('top', '200px')
@ -162,7 +170,7 @@ class MainContent extends Component {
<CodeRepositoryViewContainer { ...this.props } ></CodeRepositoryViewContainer>
</div>
</React.Fragment>
: <ChooseRepositoryView ref="chooseQ" { ...this.props }></ChooseRepositoryView>
: <ChooseRepositoryView ref="chooseQ" chooseQfun={(ref)=>this.chooseQfun(ref)}{ ...this.props }></ChooseRepositoryView>
}
{/* */}

@ -158,7 +158,7 @@ class MainContentContainer extends Component {
this.showResetCodeDialog = this.showResetCodeDialog.bind(this)
this.showResetPassedCodeDialog = this.showResetPassedCodeDialog.bind(this)
this.mainContent = React.createRef();
this.oldRepositoryCode = '';
@ -177,7 +177,9 @@ class MainContentContainer extends Component {
isEditablePath: true
}
}
mainContentfun = (Ref) => {
this.mainContent = Ref;
}
// ------------------------------------------------
// static childContextTypes = {
// muiTheme: PropTypes.object
@ -589,7 +591,9 @@ class MainContentContainer extends Component {
onRunChooseTest() {
const { st, game, onRunChooseTestFinish, showSnackbar } = this.props;
// 获取form表单值
var value = this.refs.mainContent.refs.chooseQ.getForm().getFieldsValue();
// console.log(this.mainContent.chooseQ.props.form.getFieldsValue())
var value = this.mainContent.chooseQ.props.form.getFieldsValue();
// this.refs.mainContent.refs.chooseQ.getForm().getFieldsValue();
var valueArray = []; // map转array
var unSelectOptionIndexArray = [] // 自己做未选提示
@ -984,7 +988,7 @@ class MainContentContainer extends Component {
</Dialog>
<UpdateDrawer {...this.props} fetchRepositoryCode={this.fetchRepositoryCode}></UpdateDrawer>
<MainContent ref="mainContent" {...this.props} output_sets={output_sets} {...this.state}
<MainContent ref="mainContent" mainContentfun={(ref)=>this.mainContentfun(ref)} {...this.props} output_sets={output_sets} {...this.state}
onRepositoryCodeUpdate={this.onRepositoryCodeUpdate} onRunCodeTest={this.onRunCodeTest}
codemirrorDidMount={this.codemirrorDidMount} fetchRepositoryCode={this.fetchRepositoryCode}
showResetCodeDialog={this.showResetCodeDialog} showResetPassedCodeDialog={this.showResetPassedCodeDialog}

@ -70,6 +70,9 @@ subject:"计算机中的应用软件是指:"
option_name:"所有计算机上都应使用的软件"
positon:0
*/
componentDidMount() {
this.props.chooseQfun(this)
}
renderChooseQuestions() {
const { getFieldDecorator } = this.props.form;
const { choose, choose_test_cases } = this.props;

@ -510,9 +510,10 @@ class DetailCards extends Component{
{this.props.current_user&&this.props.current_user.admin===true||this.props.current_user&&this.props.current_user.business===true?
item.shixuns_list && item.shixuns_list.map((line,index)=>{
return(
<div className="clearfix paragraph lineh-30" onMouseEnter>
<div className="clearfix paragraph lineh-30" onMouseEnter={()=>this.showparagraph(key,index)} onMouseLeave={this.hideparagraph}>
<li className="fl li-width63">
<li className="fl li-width63">
<span className="progressRing mr10">
{
@ -531,7 +532,8 @@ class DetailCards extends Component{
{
showparagraphkey===key&&showparagraphindex===index?<div>
<Link to={'/shixuns/'+line.identifier+'/challenges'} className="mr30 color-blue_4C shixun_detail pointer fl" target="_blank">查看详情</Link>
</div>:""
{line.shixun_status==="暂未公开"?"":<a onClick={()=>this.startgameid(line.identifier)} className="btn_auto user_bluebg_btn fl" id="shixun_operation" >开始实战</a>}
</div>:""
}
</li>

Loading…
Cancel
Save