|  |  | @ -4,10 +4,10 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |  * @Github:  |  |  |  |  * @Github:  | 
			
		
	
		
		
			
				
					
					|  |  |  |  * @Date: 2019-11-27 16:02:36 |  |  |  |  * @Date: 2019-11-27 16:02:36 | 
			
		
	
		
		
			
				
					
					|  |  |  |  * @LastEditors: tangjiang |  |  |  |  * @LastEditors: tangjiang | 
			
		
	
		
		
			
				
					
					|  |  |  |  * @LastEditTime: 2019-12-19 10:47:44 |  |  |  |  * @LastEditTime: 2019-12-19 19:47:32 | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  */ |  |  |  |  */ | 
			
		
	
		
		
			
				
					
					|  |  |  | import './index.scss'; |  |  |  | import './index.scss'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import React, { useState, useRef } from 'react'; |  |  |  | import React, { useState, useRef, useEffect } from 'react'; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | import { Tabs, Button, Icon  } from 'antd'; |  |  |  | import { Tabs, Button, Icon  } from 'antd'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import { connect } from 'react-redux'; |  |  |  | import { connect } from 'react-redux'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import InitTabCtx from '../initTabCtx'; |  |  |  | import InitTabCtx from '../initTabCtx'; | 
			
		
	
	
		
		
			
				
					|  |  | @ -23,10 +23,11 @@ const ControlSetting = (props) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |     submitLoading, |  |  |  |     submitLoading, | 
			
		
	
		
		
			
				
					
					|  |  |  |     identifier, |  |  |  |     identifier, | 
			
		
	
		
		
			
				
					
					|  |  |  |     excuteState, |  |  |  |     excuteState, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     showOrHideControl, | 
			
		
	
		
		
			
				
					
					|  |  |  |     commitRecordDetail, |  |  |  |     commitRecordDetail, | 
			
		
	
		
		
			
				
					
					|  |  |  |     changeLoadingState, |  |  |  |     changeLoadingState, | 
			
		
	
		
		
			
				
					
					|  |  |  |     changeSubmitLoadingStatus, |  |  |  |     changeSubmitLoadingStatus, | 
			
		
	
		
		
			
				
					
					|  |  |  |     showOrHideControl, |  |  |  |     changeShowOrHideControl, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     // debuggerCode,
 |  |  |  |     // debuggerCode,
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     // startDebuggerCode, // 外部存入
 |  |  |  |     // startDebuggerCode, // 外部存入
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     onDebuggerCode, |  |  |  |     onDebuggerCode, | 
			
		
	
	
		
		
			
				
					|  |  | @ -44,10 +45,14 @@ const ControlSetting = (props) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |     setDefaultActiveKey(key); |  |  |  |     setDefaultActiveKey(key); | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   useEffect(() => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     setShowTextResult(props.showOrHideControl); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   }, [props]); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   // 显示/隐藏tab
 |  |  |  |   // 显示/隐藏tab
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   const handleShowControl = () => { |  |  |  |   const handleShowControl = () => { | 
			
		
	
		
		
			
				
					
					|  |  |  |     setShowTextResult(!showTextResult); |  |  |  |     setShowTextResult(!showTextResult); | 
			
		
	
		
		
			
				
					
					|  |  |  |     showOrHideControl(!showTextResult); |  |  |  |     changeShowOrHideControl(!showTextResult); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   // 调试代码
 |  |  |  |   // 调试代码
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -55,7 +60,7 @@ const ControlSetting = (props) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |     // console.log(formRef.current.handleTestCodeFormSubmit);
 |  |  |  |     // console.log(formRef.current.handleTestCodeFormSubmit);
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     // 调出控制台界面
 |  |  |  |     // 调出控制台界面
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     setShowTextResult(true); |  |  |  |     setShowTextResult(true); | 
			
		
	
		
		
			
				
					
					|  |  |  |     showOrHideControl(true); |  |  |  |     changeShowOrHideControl(true); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     formRef.current.handleTestCodeFormSubmit(() => { |  |  |  |     formRef.current.handleTestCodeFormSubmit(() => { | 
			
		
	
		
		
			
				
					
					|  |  |  |       setDefaultActiveKey('2'); |  |  |  |       setDefaultActiveKey('2'); | 
			
		
	
		
		
			
				
					
					|  |  |  |     }); |  |  |  |     }); | 
			
		
	
	
		
		
			
				
					|  |  | @ -131,19 +136,20 @@ const ControlSetting = (props) => { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | const mapStateToProps = (state) => { |  |  |  | const mapStateToProps = (state) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |   const {commonReducer, ojForUserReducer} = state; |  |  |  |   const {commonReducer, ojForUserReducer} = state; | 
			
		
	
		
		
			
				
					
					|  |  |  |   const {loading, excuteState, submitLoading } = commonReducer; |  |  |  |   const {loading, excuteState, submitLoading, showOrHideControl } = commonReducer; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |   const { commitRecordDetail } = ojForUserReducer;  |  |  |  |   const { commitRecordDetail } = ojForUserReducer;  | 
			
		
	
		
		
			
				
					
					|  |  |  |   return { |  |  |  |   return { | 
			
		
	
		
		
			
				
					
					|  |  |  |     loading, |  |  |  |     loading, | 
			
		
	
		
		
			
				
					
					|  |  |  |     submitLoading, |  |  |  |     submitLoading, | 
			
		
	
		
		
			
				
					
					|  |  |  |     excuteState, |  |  |  |     excuteState, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     showOrHideControl, | 
			
		
	
		
		
			
				
					
					|  |  |  |     // identifier: user_program_identifier,
 |  |  |  |     // identifier: user_program_identifier,
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     commitRecordDetail // 提交详情
 |  |  |  |     commitRecordDetail // 提交详情
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   }; |  |  |  |   }; | 
			
		
	
		
		
			
				
					
					|  |  |  | }; |  |  |  | }; | 
			
		
	
		
		
			
				
					
					|  |  |  | // changeSubmitLoadingStatus
 |  |  |  | // changeSubmitLoadingStatus
 | 
			
		
	
		
		
			
				
					
					|  |  |  | const mapDispatchToProps = (dispatch) => ({ |  |  |  | const mapDispatchToProps = (dispatch) => ({ | 
			
		
	
		
		
			
				
					
					|  |  |  |   showOrHideControl: (flag) => dispatch(actions.showOrHideControl(flag)), |  |  |  |   changeShowOrHideControl: (flag) => dispatch(actions.changeShowOrHideControl(flag)), | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |   changeLoadingState: (flag) => dispatch(actions.changeLoadingState(flag)), |  |  |  |   changeLoadingState: (flag) => dispatch(actions.changeLoadingState(flag)), | 
			
		
	
		
		
			
				
					
					|  |  |  |   changeSubmitLoadingStatus: (flag) => dispatch(actions.changeSubmitLoadingStatus(flag)), |  |  |  |   changeSubmitLoadingStatus: (flag) => dispatch(actions.changeSubmitLoadingStatus(flag)), | 
			
		
	
		
		
			
				
					
					|  |  |  |   debuggerCode: (identifier, values) => dispatch(actions.debuggerCode(identifier, values)), |  |  |  |   debuggerCode: (identifier, values) => dispatch(actions.debuggerCode(identifier, values)), | 
			
		
	
	
		
		
			
				
					|  |  | 
 |