Commit 31bdb910e54636decf997f2909eb22240f8485ba
1 parent
b250ae27
修复第二次播放播放区域代码重复
Showing
4 changed files
with
20 additions
and
12 deletions
dist/gxb-ide/CodingEditer.js
| ... | ... | @@ -260,28 +260,30 @@ |
| 260 | 260 | if (_thisNum == 0) { |
| 261 | 261 | for (var i = 0; i < treeLinkEditor.length; i++) { |
| 262 | 262 | var _path = treeLinkEditor[i].filePath; |
| 263 | - console.log(treeLinkEditor) | |
| 264 | 263 | Dir.showEdite({'treeNode': {'name': treeLinkEditor[i].file}}); |
| 264 | + treeLinkEditor[i].CodeMirrorRecord.setValue(''); | |
| 265 | 265 | treeLinkEditor[i].CodeMirrorRecord.setValue(_template); |
| 266 | 266 | } |
| 267 | 267 | } else if (_thisNum == 1) { |
| 268 | 268 | for (var i = 0; i < treeLinkEditor.length; i++) { |
| 269 | 269 | if (treeLinkEditor[i].CodeMirrorReplay.getValue()) { |
| 270 | 270 | Dir.showEdite({'treeNode': {'name': treeLinkEditor[i].file}, 'replay': true}); |
| 271 | - treeLinkEditor[i].CodeMirrorReplay.setValue(_template); | |
| 271 | + treeLinkEditor[i].CodeMirrorReplay.setValue(''); | |
| 272 | 272 | } |
| 273 | 273 | } |
| 274 | 274 | } else { |
| 275 | - console.log('------------------------------------------------') | |
| 276 | - console.log(treeLinkEditor) | |
| 277 | - console.log('------------------------------------------------') | |
| 275 | + // console.log('------------------------------------------------') | |
| 276 | + // console.log(treeLinkEditor) | |
| 277 | + // console.log('------------------------------------------------') | |
| 278 | 278 | |
| 279 | 279 | for (var i = 0; i < treeLinkEditor.length; i++) { |
| 280 | 280 | if(treeLinkEditor[i].CodeMirrorRecord){ |
| 281 | 281 | Dir.showEdite({'treeNode': {'name': treeLinkEditor[i].file}}); |
| 282 | + treeLinkEditor[i].CodeMirrorRecord.setValue(''); | |
| 282 | 283 | treeLinkEditor[i].CodeMirrorRecord.setValue(_template); |
| 283 | 284 | }else if(treeLinkEditor[i].CodeMirrorReplay.getValue()){ |
| 284 | 285 | Dir.showEdite({'treeNode': {'name': treeLinkEditor[i].file}, 'replay': true}); |
| 286 | + treeLinkEditor[i].CodeMirrorReplay.setValue(''); | |
| 285 | 287 | treeLinkEditor[i].CodeMirrorReplay.setValue(_template); |
| 286 | 288 | } |
| 287 | 289 | } | ... | ... |
dist/gxb-ide/Dir.js
| ... | ... | @@ -640,7 +640,9 @@ |
| 640 | 640 | // TODO 如何设置模板内容 |
| 641 | 641 | if(getQuery('autoscore')){ |
| 642 | 642 | CodingEditer.template = res.programmingList[0].codeModel; |
| 643 | - Dir.treeLinkEditor[0].CodeMirrorRecord.setValue(res.programmingList[0].codeModel); | |
| 643 | + if(!Dir.isReplayPage){ | |
| 644 | + Dir.treeLinkEditor[0].CodeMirrorRecord.setValue(res.programmingList[0].codeModel); | |
| 645 | + } | |
| 644 | 646 | } |
| 645 | 647 | questionTitle.html(res.programmingList[0].title) |
| 646 | 648 | questionDescribe.html(res.programmingList[0].titleDesc) | ... | ... |
src/gxb-ide/CodingEditer.js
| ... | ... | @@ -260,28 +260,30 @@ |
| 260 | 260 | if (_thisNum == 0) { |
| 261 | 261 | for (var i = 0; i < treeLinkEditor.length; i++) { |
| 262 | 262 | var _path = treeLinkEditor[i].filePath; |
| 263 | - console.log(treeLinkEditor) | |
| 264 | 263 | Dir.showEdite({'treeNode': {'name': treeLinkEditor[i].file}}); |
| 264 | + treeLinkEditor[i].CodeMirrorRecord.setValue(''); | |
| 265 | 265 | treeLinkEditor[i].CodeMirrorRecord.setValue(_template); |
| 266 | 266 | } |
| 267 | 267 | } else if (_thisNum == 1) { |
| 268 | 268 | for (var i = 0; i < treeLinkEditor.length; i++) { |
| 269 | 269 | if (treeLinkEditor[i].CodeMirrorReplay.getValue()) { |
| 270 | 270 | Dir.showEdite({'treeNode': {'name': treeLinkEditor[i].file}, 'replay': true}); |
| 271 | - treeLinkEditor[i].CodeMirrorReplay.setValue(_template); | |
| 271 | + treeLinkEditor[i].CodeMirrorReplay.setValue(''); | |
| 272 | 272 | } |
| 273 | 273 | } |
| 274 | 274 | } else { |
| 275 | - console.log('------------------------------------------------') | |
| 276 | - console.log(treeLinkEditor) | |
| 277 | - console.log('------------------------------------------------') | |
| 275 | + // console.log('------------------------------------------------') | |
| 276 | + // console.log(treeLinkEditor) | |
| 277 | + // console.log('------------------------------------------------') | |
| 278 | 278 | |
| 279 | 279 | for (var i = 0; i < treeLinkEditor.length; i++) { |
| 280 | 280 | if(treeLinkEditor[i].CodeMirrorRecord){ |
| 281 | 281 | Dir.showEdite({'treeNode': {'name': treeLinkEditor[i].file}}); |
| 282 | + treeLinkEditor[i].CodeMirrorRecord.setValue(''); | |
| 282 | 283 | treeLinkEditor[i].CodeMirrorRecord.setValue(_template); |
| 283 | 284 | }else if(treeLinkEditor[i].CodeMirrorReplay.getValue()){ |
| 284 | 285 | Dir.showEdite({'treeNode': {'name': treeLinkEditor[i].file}, 'replay': true}); |
| 286 | + treeLinkEditor[i].CodeMirrorReplay.setValue(''); | |
| 285 | 287 | treeLinkEditor[i].CodeMirrorReplay.setValue(_template); |
| 286 | 288 | } |
| 287 | 289 | } | ... | ... |
src/gxb-ide/Dir.js
| ... | ... | @@ -640,7 +640,9 @@ |
| 640 | 640 | // TODO 如何设置模板内容 |
| 641 | 641 | if(getQuery('autoscore')){ |
| 642 | 642 | CodingEditer.template = res.programmingList[0].codeModel; |
| 643 | - Dir.treeLinkEditor[0].CodeMirrorRecord.setValue(res.programmingList[0].codeModel); | |
| 643 | + if(!Dir.isReplayPage){ | |
| 644 | + Dir.treeLinkEditor[0].CodeMirrorRecord.setValue(res.programmingList[0].codeModel); | |
| 645 | + } | |
| 644 | 646 | } |
| 645 | 647 | questionTitle.html(res.programmingList[0].title) |
| 646 | 648 | questionDescribe.html(res.programmingList[0].titleDesc) | ... | ... |