调整报错

dev_hss
杨树明 5 years ago
parent 78d7ad5f74
commit 478e23d739

@ -74,6 +74,8 @@ class ActionView extends Component {
render() { render() {
const { onRunCodeTest, onShowPrevStage, onShowNextStage, gameBuilding const { onRunCodeTest, onShowPrevStage, onShowNextStage, gameBuilding
, game, classes, st, shixun, record, challenge, time_limit, real_time_limit } = this.props; , game, classes, st, shixun, record, challenge, time_limit, real_time_limit } = this.props;
console.log(shixun)
return ( return (
<div className="-flex -layout-h" id="game_operate_action"> <div className="-flex -layout-h" id="game_operate_action">
<style>{` <style>{`
@ -150,7 +152,7 @@ class ActionView extends Component {
{(!shixun.vnc || shixun.vnc_evaluate) && <div id="code_test" className="act_btn"> {(shixun&&shixun.vnc || shixun&&shixun.vnc_evaluate) && <div id="code_test" className="act_btn">
{ {
st === 1 && game.status === 2 ? st === 1 && game.status === 2 ?
<Tooltip title={ "已通关的选择题任务无法再次测评" }> <Tooltip title={ "已通关的选择题任务无法再次测评" }>

@ -34,23 +34,26 @@ function getNewTreeData(treeData, curKey, child, level) {
} }
function fileData2TreeData(repoFilesData) { function fileData2TreeData(repoFilesData) {
const fileTreeData = []; if(repoFilesData!=null){
repoFilesData.forEach((item) => { const fileTreeData = [];
if (item.kind === 'file') { repoFilesData.forEach((item) => {
fileTreeData.push({ if (item.kind === 'file') {
key: item.path, fileTreeData.push({
name: item.name, key: item.path,
isLeaf: true name: item.name,
}) isLeaf: true
} else { })
fileTreeData.push({ } else {
key: item.path, fileTreeData.push({
name: item.name, key: item.path,
// isLeaf: false name: item.name,
}) // isLeaf: false
} })
}) }
return fileTreeData; })
return fileTreeData;
}
} }
class CodeRepositoryViewContainer extends Component { class CodeRepositoryViewContainer extends Component {

Loading…
Cancel
Save