From 78d7ad5f74eb9d9eaf398fe79ab6ab4d1f227515 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 7 Sep 2019 13:57:17 +0800 Subject: [PATCH 01/18] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/user/usersInfo/InfosTopics.js | 51 +++++++++---------- 1 file changed, 24 insertions(+), 27 deletions(-) diff --git a/public/react/src/modules/user/usersInfo/InfosTopics.js b/public/react/src/modules/user/usersInfo/InfosTopics.js index 565f42a3d..db96818e5 100644 --- a/public/react/src/modules/user/usersInfo/InfosTopics.js +++ b/public/react/src/modules/user/usersInfo/InfosTopics.js @@ -84,36 +84,33 @@ class InfosTopics extends Component{ if(user_id===undefined){ - user_id=this.props.match.params&&this.props.match.params.username; + user_id=1 } - - if(user_id!=undefined){ - let {per_page}=this.state; - let url=`/users/${user_id}/question_banks.json`; - - axios.get(encodeURI(url),{params:{ - type, - object_type:category, - course_list_id, - sort_by, - sort_direction, - page, - per_page - } - }).then((response) => { - this.setState({ - data:response.data, - checkBoxValues:[], - isSpin:false - }) - }).catch((error) => { - this.setState({ - isSpin:false - }) - }); - } + let {per_page}=this.state; + let url=`/users/${user_id}/question_banks.json`; + + axios.get(encodeURI(url),{params:{ + type, + object_type:category, + course_list_id, + sort_by, + sort_direction, + page, + per_page + } + }).then((response) => { + this.setState({ + data:response.data, + checkBoxValues:[], + isSpin:false + }) + }).catch((error) => { + this.setState({ + isSpin:false + }) + }); } From 478e23d7393cd8bd5ed8f125489b00ba4c9e15e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 7 Sep 2019 14:08:41 +0800 Subject: [PATCH 02/18] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/page/main/ActionView.js | 410 ++++++------ .../page/main/CodeRepositoryViewContainer.js | 621 +++++++++--------- 2 files changed, 518 insertions(+), 513 deletions(-) diff --git a/public/react/src/modules/page/main/ActionView.js b/public/react/src/modules/page/main/ActionView.js index e475b999c..0fa4dd267 100644 --- a/public/react/src/modules/page/main/ActionView.js +++ b/public/react/src/modules/page/main/ActionView.js @@ -1,204 +1,206 @@ -import React, { Component } from 'react'; -import { Link } from 'react-router-dom' - -import { withStyles } from 'material-ui/styles'; -import Button from 'material-ui/Button'; - -import Tooltip from 'material-ui/Tooltip'; - -import './ActionView.css' - -/* - - color: #1B4061 !important; - background-color: transparent; - border: 1px solid #1B4061 !important; - */ -const styles = theme => ({ - button: { - margin: theme.spacing.unit, - border: '1px solid #1B4061', - color: '#1B4061', - height: '30px', - padding: '0 16px', - '&:hover': { - color: '#4CACFF', - border: '1px solid #4CACFF' - } - }, - hoverButton: { - margin: theme.spacing.unit, - height: '30px', - padding: '0 16px', - - color: '#4CACFF', - border: '1px solid #4CACFF' - }, - buttonText: { - color: '#1B4061 !important', - '&:hover': { - color: '#1B4061', - } - } -}); - -class ActionView extends Component { - - constructor(props) { - super(props) - - } - - componentDidMount() { - // request - window._tpiWidthResize = () => { - const _w = window.$('#actionView').width(); - // if (_w < 446) { - // window.$('#time-consuming').hide() - // // window.$('#time-consuming').hide() - // } else if (_w < 746) { - // // 文字放出来之前是 580 - // window.$('#time-consuming').show() - // window.$('.time_limit').hide() - // } else { - // window.$('#time-consuming').show() - // window.$('.time_limit').show() - // } - } - } - - showWebDisplay(challenge) { - window.open(challenge.webDisplayUrl, '_blank'); - } - /*耗时:0 天 3 小时 11 分钟 57 秒 */ - render() { - const { onRunCodeTest, onShowPrevStage, onShowNextStage, gameBuilding - , game, classes, st, shixun, record, challenge, time_limit, real_time_limit } = this.props; - return ( -
- - - {!!time_limit && - {`本关最大执行时间:${real_time_limit}秒`} - {!gameBuilding && record && } - } - {!gameBuilding && record ? - // - 本次评测耗时(编译、运行总时间):{ record } 秒 - - : ""} - - - {/*将第一个按钮改为visibility方式隐藏,不然加载时测评按钮会出现没有垂直居中的情况*/} - - - - - { - !gameBuilding && - (game && !!game.prev_game) ? - - - - : ''} - - {/*未发布的都能跳转*/} - { !gameBuilding && - ((game && (game.status === 2 || shixun.status < 2) || shixun && shixun.task_pass ) && !!game.next_game) ? - - - - : ''} - - - - {(!shixun.vnc || shixun.vnc_evaluate) &&
- { - st === 1 && game.status === 2 ? - - - - 测评 - - - : - gameBuilding ? - - - - 测评 - - : - - - 测评 - } -
} -
- ); - /* - 离开 - - 下一关 - - onclick="training_task_submmit();" - - - {game && !!game.prev_game ? -
- 上一关 -
- : ''} - - {game && !!game.next_game ? -
- 下一关 -
- : ''} - */ - } -} - -export default withStyles(styles)( ActionView ); +import React, { Component } from 'react'; +import { Link } from 'react-router-dom' + +import { withStyles } from 'material-ui/styles'; +import Button from 'material-ui/Button'; + +import Tooltip from 'material-ui/Tooltip'; + +import './ActionView.css' + +/* + + color: #1B4061 !important; + background-color: transparent; + border: 1px solid #1B4061 !important; + */ +const styles = theme => ({ + button: { + margin: theme.spacing.unit, + border: '1px solid #1B4061', + color: '#1B4061', + height: '30px', + padding: '0 16px', + '&:hover': { + color: '#4CACFF', + border: '1px solid #4CACFF' + } + }, + hoverButton: { + margin: theme.spacing.unit, + height: '30px', + padding: '0 16px', + + color: '#4CACFF', + border: '1px solid #4CACFF' + }, + buttonText: { + color: '#1B4061 !important', + '&:hover': { + color: '#1B4061', + } + } +}); + +class ActionView extends Component { + + constructor(props) { + super(props) + + } + + componentDidMount() { + // request + window._tpiWidthResize = () => { + const _w = window.$('#actionView').width(); + // if (_w < 446) { + // window.$('#time-consuming').hide() + // // window.$('#time-consuming').hide() + // } else if (_w < 746) { + // // 文字放出来之前是 580 + // window.$('#time-consuming').show() + // window.$('.time_limit').hide() + // } else { + // window.$('#time-consuming').show() + // window.$('.time_limit').show() + // } + } + } + + showWebDisplay(challenge) { + window.open(challenge.webDisplayUrl, '_blank'); + } + /*耗时:0 天 3 小时 11 分钟 57 秒 */ + render() { + const { onRunCodeTest, onShowPrevStage, onShowNextStage, gameBuilding + , game, classes, st, shixun, record, challenge, time_limit, real_time_limit } = this.props; + + console.log(shixun) + return ( +
+ + + {!!time_limit && + {`本关最大执行时间:${real_time_limit}秒`} + {!gameBuilding && record && } + } + {!gameBuilding && record ? + // + 本次评测耗时(编译、运行总时间):{ record } 秒 + + : ""} + + + {/*将第一个按钮改为visibility方式隐藏,不然加载时测评按钮会出现没有垂直居中的情况*/} + + + + + { + !gameBuilding && + (game && !!game.prev_game) ? + + + + : ''} + + {/*未发布的都能跳转*/} + { !gameBuilding && + ((game && (game.status === 2 || shixun.status < 2) || shixun && shixun.task_pass ) && !!game.next_game) ? + + + + : ''} + + + + {(shixun&&shixun.vnc || shixun&&shixun.vnc_evaluate) &&
+ { + st === 1 && game.status === 2 ? + + + + 测评 + + + : + gameBuilding ? + + + + 测评 + + : + + + 测评 + } +
} +
+ ); + /* + 离开 + + 下一关 + + onclick="training_task_submmit();" + + + {game && !!game.prev_game ? +
+ 上一关 +
+ : ''} + + {game && !!game.next_game ? +
+ 下一关 +
+ : ''} + */ + } +} + +export default withStyles(styles)( ActionView ); diff --git a/public/react/src/modules/page/main/CodeRepositoryViewContainer.js b/public/react/src/modules/page/main/CodeRepositoryViewContainer.js index 0a5be59e0..5d6be306f 100644 --- a/public/react/src/modules/page/main/CodeRepositoryViewContainer.js +++ b/public/react/src/modules/page/main/CodeRepositoryViewContainer.js @@ -1,309 +1,312 @@ - -import React, { Component } from 'react'; - -import CodeRepositoryView from './CodeRepositoryView' - -import axios from 'axios' - -import './CodeRepositoryView.css' - -// 自己处理path,加上父节点的path, 这里是处理树节点了,所以是set key -function addPrePath(treeData, parentNodePath) { - return treeData.map(item => { - return { - ...item, - key: `${parentNodePath}/${item.name}` - } - }) -} -function getNewTreeData(treeData, curKey, child, level) { - const loop = (data) => { - data.forEach((item) => { - // 这里不能用indexOf 同一级可能出现test目录和test.py文件 - if (item.key == curKey) { - child = addPrePath(child, curKey); - item.children = child; - } else { - if (item.children) { - loop(item.children); - } - } - }); - }; - loop(treeData); -} - -function fileData2TreeData(repoFilesData) { - const fileTreeData = []; - repoFilesData.forEach((item) => { - if (item.kind === 'file') { - fileTreeData.push({ - key: item.path, - name: item.name, - isLeaf: true - }) - } else { - fileTreeData.push({ - key: item.path, - name: item.name, - // isLeaf: false - }) - } - }) - return fileTreeData; -} - -class CodeRepositoryViewContainer extends Component { - - constructor(props) { - super(props) - - this.showFilesDrawer = this.showFilesDrawer.bind(this) - this.onRepositoryViewExpand = this.onRepositoryViewExpand.bind(this) - - this.state = { - drawerOpen: false, - loadingFirstRepoFiles: false, - fileTreeData: "", - fileTreeSelectedKeys: [], - codeRepositoryViewExpanded: false, - tabIndex: 0, - - settingDrawerOpen: false - } - } - showSettingDrawer = (open) => { - this.setState({settingDrawerOpen: open}) - } - tabIndexChange = (index) => { - this.setState({tabIndex: index}); - } - onRepositoryViewExpand() { - window.repository_extend_and_zoom(); - this.setState({ - evaluateViewExpanded: !this.state.evaluateViewExpanded - }, () => { - setTimeout(()=>{ - window.__tpiOnResize() - }, 300) - }) - } - - showFilesDrawer(open) { - if (this.props.loading === true) { - return; - } - if (!this.state.fileTreeData) { - this.fetchRepoFiles(); - } - - this.setState({ - drawerOpen: open, - }) - } - loadRepoFiles = () => { - if (!this.state.fileTreeData) { - this.fetchRepoFiles(); - } - } - - componentWillReceiveProps(newProps, oldProps) { - - } - componentDidMount() { - - } - - componentDidUpdate(prevProps, prevState, snapshot) { - const { game, challenge } = this.props - if (this.props.game && (!prevProps.game || prevProps.game.identifier !== this.props.game.identifier) ) { - this.setState({ - fileTreeSelectedKeys: [ challenge.multiPath ? challenge.path[0] : challenge.path ] - }) - // 初始化 - } else if (this.state.fileTreeSelectedKeys.length === 0 && challenge && challenge.path) { - this.setState({ - fileTreeSelectedKeys: [ challenge.multiPath ? challenge.path[0] : challenge.path ] - }) - } else if (challenge && prevProps && prevProps.challenge - && challenge.pathIndex != prevProps.challenge.pathIndex - && challenge.pathIndex !== -1) { - this.setState({ - fileTreeSelectedKeys: [ challenge.multiPath ? challenge.path[challenge.pathIndex] : challenge.path ] - }) - } - } - - handleDialogClose() { - this.setState({ - dialogOpen: false - }) - } - onLoadData = (treeNode) => { - if (treeNode.props.children && treeNode.props.children.length) { - return new Promise((resolve) => { - resolve(); - }); - } - return new Promise((resolve, reject) => { - this.fetchRepoFiles(treeNode, resolve, reject) - }); - } - map2OldData = (treeData) => { - if (!treeData || treeData.length === 0) return treeData; - treeData = treeData.map(item => { - return { - kind: item.type == "blob" ? "file" : "dir", // blob->file tree->dir - path: item.name, - name: item.name - } - }) - return treeData; - } - - fetchRepoFiles(treeNode, resolve, reject) { - // http://localhost:3000/api/v1/games/829al3mst4fy/entries?path=src/step1&rev=master - if (!this.props.challenge || !this.props.game) { - return; - } - // var ar = this.props.challenge.path.split('/'); - // ar.length = ar.length - 2; - // var _path = ar.join('/'); - var _path = treeNode ? treeNode.props.eventKey : '' ; - if (_path.charAt(0) === '/') { - _path = _path.substring(1) - } - // var url = `/api/v1/games/${this.props.game.identifier}/entries?path=${_path}&rev=master&gpid=${this.props.myshixun.gpid}` - let url = `/myshixuns/${this.props.myshixun.identifier}/repository.json` - - - if (!this.state.fileTreeData || this.state.fileTreeData.length === 0) { - this.setState({ - loadingFirstRepoFiles: true, - }) - } - var that = this; - axios.post(url, { - path: _path - // withCredentials: true, - }) - .then((response) => { - const repoFilesData = this.map2OldData(response.data.trees) - if (!this.state.fileTreeData || this.state.fileTreeData.length === 0) { // 还没树节点,没加载过 - - const fileTreeData = fileData2TreeData(repoFilesData) - this.setState({ - fileTreeData, - loadingFirstRepoFiles: false, - }); - } else { - var _treeNode = treeNode; - var _eventKey = _treeNode.props.eventKey; - - const fileTreeData = that.state.fileTreeData; - // 新的数组放置到treenode下 - - const tempFileTreeData = fileData2TreeData(repoFilesData) - - getNewTreeData(fileTreeData, _eventKey, tempFileTreeData, 2); - this.setState({ - fileTreeData, - }) - } - - resolve && resolve(); - - }) - .catch(function (error) { - console.log(error); - reject && reject(); - }); - } - onTreeSelect = (selectedKeys, info) => { - const isLeaf = info.node.props.isLeaf; - if (isLeaf) { // 叶子节点 - selectedKeys.length && this.setState({ - fileTreeSelectedKeys: selectedKeys - }) - const { fetchRepositoryCode, onPathChange, showSnackbar, challenge } = this.props; - - const nodePath = info.node.props.eventKey; - // 设置pathIndex为-1,那么代码文件下拉可以切回可编辑的文件 - if (!challenge.multiPath) { // 单path任务 多path任务 path是数组 - if (challenge.path.trim() == nodePath.trim()) { - if (challenge.pathIndex === 0) { - showSnackbar(`当前编辑文件已经是${nodePath}`) - } else { - onPathChange(0) - } - return; - } else { - onPathChange(-1) - } - } else { - let isCurrentFile = false; - let cur_index = -1; - if (challenge.path && challenge.path.forEach) { - challenge.path.forEach((item, index) => { - if (nodePath == item) { - isCurrentFile = true; - cur_index = index; - } - }) - } - if (isCurrentFile) { - onPathChange(cur_index) - showSnackbar(`当前编辑文件已经是${nodePath}`) - } else { - onPathChange(-1) - } - } - if (nodePath) { - const filetype = nodePath.split('.').pop().toLowerCase(); - if (filetype == 'jpg' || filetype == 'png' || filetype == 'gif' || filetype == 'jpeg' - || filetype == 'jar' - || filetype == 'doc' || filetype == 'pdf' || filetype == 'xsl' || filetype == 'ppt') { - showSnackbar(`不支持加载${filetype}类型的文件。`) - return; - } - fetchRepositoryCode(null, nodePath, 1); - } else { - console.error('no eventKey:', info.node) - } - } - } -// /shixuns/mnf6b7z3/shixun_discuss?challenge_id=88 - render() { - - return ( - - {this.props.isOnlyContainer == true ? - React.Children.map(this.props.children, child => { - if(!child) { - return '' - } - return React.cloneElement(child, Object.assign({...this.state}, { - loadRepoFiles: this.loadRepoFiles, - onTreeSelect: this.onTreeSelect, - onLoadData: this.onLoadData, - })) - }) - - : - - } - - ); - } -} - -export default CodeRepositoryViewContainer; + +import React, { Component } from 'react'; + +import CodeRepositoryView from './CodeRepositoryView' + +import axios from 'axios' + +import './CodeRepositoryView.css' + +// 自己处理path,加上父节点的path, 这里是处理树节点了,所以是set key +function addPrePath(treeData, parentNodePath) { + return treeData.map(item => { + return { + ...item, + key: `${parentNodePath}/${item.name}` + } + }) +} +function getNewTreeData(treeData, curKey, child, level) { + const loop = (data) => { + data.forEach((item) => { + // 这里不能用indexOf 同一级可能出现test目录和test.py文件 + if (item.key == curKey) { + child = addPrePath(child, curKey); + item.children = child; + } else { + if (item.children) { + loop(item.children); + } + } + }); + }; + loop(treeData); +} + +function fileData2TreeData(repoFilesData) { + if(repoFilesData!=null){ + const fileTreeData = []; + repoFilesData.forEach((item) => { + if (item.kind === 'file') { + fileTreeData.push({ + key: item.path, + name: item.name, + isLeaf: true + }) + } else { + fileTreeData.push({ + key: item.path, + name: item.name, + // isLeaf: false + }) + } + }) + return fileTreeData; + } + +} + +class CodeRepositoryViewContainer extends Component { + + constructor(props) { + super(props) + + this.showFilesDrawer = this.showFilesDrawer.bind(this) + this.onRepositoryViewExpand = this.onRepositoryViewExpand.bind(this) + + this.state = { + drawerOpen: false, + loadingFirstRepoFiles: false, + fileTreeData: "", + fileTreeSelectedKeys: [], + codeRepositoryViewExpanded: false, + tabIndex: 0, + + settingDrawerOpen: false + } + } + showSettingDrawer = (open) => { + this.setState({settingDrawerOpen: open}) + } + tabIndexChange = (index) => { + this.setState({tabIndex: index}); + } + onRepositoryViewExpand() { + window.repository_extend_and_zoom(); + this.setState({ + evaluateViewExpanded: !this.state.evaluateViewExpanded + }, () => { + setTimeout(()=>{ + window.__tpiOnResize() + }, 300) + }) + } + + showFilesDrawer(open) { + if (this.props.loading === true) { + return; + } + if (!this.state.fileTreeData) { + this.fetchRepoFiles(); + } + + this.setState({ + drawerOpen: open, + }) + } + loadRepoFiles = () => { + if (!this.state.fileTreeData) { + this.fetchRepoFiles(); + } + } + + componentWillReceiveProps(newProps, oldProps) { + + } + componentDidMount() { + + } + + componentDidUpdate(prevProps, prevState, snapshot) { + const { game, challenge } = this.props + if (this.props.game && (!prevProps.game || prevProps.game.identifier !== this.props.game.identifier) ) { + this.setState({ + fileTreeSelectedKeys: [ challenge.multiPath ? challenge.path[0] : challenge.path ] + }) + // 初始化 + } else if (this.state.fileTreeSelectedKeys.length === 0 && challenge && challenge.path) { + this.setState({ + fileTreeSelectedKeys: [ challenge.multiPath ? challenge.path[0] : challenge.path ] + }) + } else if (challenge && prevProps && prevProps.challenge + && challenge.pathIndex != prevProps.challenge.pathIndex + && challenge.pathIndex !== -1) { + this.setState({ + fileTreeSelectedKeys: [ challenge.multiPath ? challenge.path[challenge.pathIndex] : challenge.path ] + }) + } + } + + handleDialogClose() { + this.setState({ + dialogOpen: false + }) + } + onLoadData = (treeNode) => { + if (treeNode.props.children && treeNode.props.children.length) { + return new Promise((resolve) => { + resolve(); + }); + } + return new Promise((resolve, reject) => { + this.fetchRepoFiles(treeNode, resolve, reject) + }); + } + map2OldData = (treeData) => { + if (!treeData || treeData.length === 0) return treeData; + treeData = treeData.map(item => { + return { + kind: item.type == "blob" ? "file" : "dir", // blob->file tree->dir + path: item.name, + name: item.name + } + }) + return treeData; + } + + fetchRepoFiles(treeNode, resolve, reject) { + // http://localhost:3000/api/v1/games/829al3mst4fy/entries?path=src/step1&rev=master + if (!this.props.challenge || !this.props.game) { + return; + } + // var ar = this.props.challenge.path.split('/'); + // ar.length = ar.length - 2; + // var _path = ar.join('/'); + var _path = treeNode ? treeNode.props.eventKey : '' ; + if (_path.charAt(0) === '/') { + _path = _path.substring(1) + } + // var url = `/api/v1/games/${this.props.game.identifier}/entries?path=${_path}&rev=master&gpid=${this.props.myshixun.gpid}` + let url = `/myshixuns/${this.props.myshixun.identifier}/repository.json` + + + if (!this.state.fileTreeData || this.state.fileTreeData.length === 0) { + this.setState({ + loadingFirstRepoFiles: true, + }) + } + var that = this; + axios.post(url, { + path: _path + // withCredentials: true, + }) + .then((response) => { + const repoFilesData = this.map2OldData(response.data.trees) + if (!this.state.fileTreeData || this.state.fileTreeData.length === 0) { // 还没树节点,没加载过 + + const fileTreeData = fileData2TreeData(repoFilesData) + this.setState({ + fileTreeData, + loadingFirstRepoFiles: false, + }); + } else { + var _treeNode = treeNode; + var _eventKey = _treeNode.props.eventKey; + + const fileTreeData = that.state.fileTreeData; + // 新的数组放置到treenode下 + + const tempFileTreeData = fileData2TreeData(repoFilesData) + + getNewTreeData(fileTreeData, _eventKey, tempFileTreeData, 2); + this.setState({ + fileTreeData, + }) + } + + resolve && resolve(); + + }) + .catch(function (error) { + console.log(error); + reject && reject(); + }); + } + onTreeSelect = (selectedKeys, info) => { + const isLeaf = info.node.props.isLeaf; + if (isLeaf) { // 叶子节点 + selectedKeys.length && this.setState({ + fileTreeSelectedKeys: selectedKeys + }) + const { fetchRepositoryCode, onPathChange, showSnackbar, challenge } = this.props; + + const nodePath = info.node.props.eventKey; + // 设置pathIndex为-1,那么代码文件下拉可以切回可编辑的文件 + if (!challenge.multiPath) { // 单path任务 多path任务 path是数组 + if (challenge.path.trim() == nodePath.trim()) { + if (challenge.pathIndex === 0) { + showSnackbar(`当前编辑文件已经是${nodePath}`) + } else { + onPathChange(0) + } + return; + } else { + onPathChange(-1) + } + } else { + let isCurrentFile = false; + let cur_index = -1; + if (challenge.path && challenge.path.forEach) { + challenge.path.forEach((item, index) => { + if (nodePath == item) { + isCurrentFile = true; + cur_index = index; + } + }) + } + if (isCurrentFile) { + onPathChange(cur_index) + showSnackbar(`当前编辑文件已经是${nodePath}`) + } else { + onPathChange(-1) + } + } + if (nodePath) { + const filetype = nodePath.split('.').pop().toLowerCase(); + if (filetype == 'jpg' || filetype == 'png' || filetype == 'gif' || filetype == 'jpeg' + || filetype == 'jar' + || filetype == 'doc' || filetype == 'pdf' || filetype == 'xsl' || filetype == 'ppt') { + showSnackbar(`不支持加载${filetype}类型的文件。`) + return; + } + fetchRepositoryCode(null, nodePath, 1); + } else { + console.error('no eventKey:', info.node) + } + } + } +// /shixuns/mnf6b7z3/shixun_discuss?challenge_id=88 + render() { + + return ( + + {this.props.isOnlyContainer == true ? + React.Children.map(this.props.children, child => { + if(!child) { + return '' + } + return React.cloneElement(child, Object.assign({...this.state}, { + loadRepoFiles: this.loadRepoFiles, + onTreeSelect: this.onTreeSelect, + onLoadData: this.onLoadData, + })) + }) + + : + + } + + ); + } +} + +export default CodeRepositoryViewContainer; From 08a21cb577a1685b384cb5cd4671cf5c402162d8 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Sat, 7 Sep 2019 14:10:58 +0800 Subject: [PATCH 03/18] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E8=AF=BE=E5=A0=82?= =?UTF-8?q?=E7=9A=84=E6=88=90=E5=91=98=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/searchable/course.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/searchable/course.rb b/app/models/searchable/course.rb index 5060d9ddd..794dec0e2 100644 --- a/app/models/searchable/course.rb +++ b/app/models/searchable/course.rb @@ -24,7 +24,7 @@ module Searchable::Course author_name: teacher&.real_name, author_school_name: teacher&.school_name, visits_count: visits, - members_count: members_count, + members_count: course_members_count, is_public: is_public == 1, first_category_url: ApplicationController.helpers.module_url(none_hidden_course_modules.first, self) } From baa1e581fb37f755f36b2e6e287a9bc7d97d8357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 7 Sep 2019 14:17:59 +0800 Subject: [PATCH 04/18] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/gradinforms/Bullsubdirectory.js | 85 ++++++++++++++++++- 1 file changed, 82 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js b/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js index bc45eeece..d7a07f4d8 100644 --- a/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js +++ b/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js @@ -6,6 +6,7 @@ import axios from 'axios'; import TPMMDEditor from "../../tpm/challengesnew/TPMMDEditor"; import moment from "../new/CoursesNew"; import Fileslistitem from "../Resource/Fileslistitem"; +import Modals from "../../modals/Modals"; // 公告栏 class Bullsubdirectory extends Component{ constructor(props){ @@ -19,6 +20,10 @@ class Bullsubdirectory extends Component{ addonAfter:0, eduintits:"", informs:[], + Modalstype:false, + Modalstopval:"是否确认删除?", + ModalCancel:"", + ModalSave:"", } @@ -47,6 +52,61 @@ class Bullsubdirectory extends Component{ } + setModeltrue=()=>{ + this.setState({ + Modalstype:true, + Modalstopval:"是否确认删除?", + ModalCancel:this.cancelmodel, + ModalSave:this.saveonOpen, + }) + } + + cancelmodel=()=>{ + //取消 + this.setState({ + Modalstype:false, + Modalstopval:"是否确认删除?", + ModalCancel:"", + ModalSave:"", + }) + } + + saveonOpen=()=>{ + //确认 + // / + // 删除公告 + var id=this.props.match.params.coursesId + const url =`/courses/${id}/delete_informs.json`; + axios.delete(url, { data: { + inform_id: this.props.id + }}) + .then((response) => { + if(response){ + if(response.data){ + if(response.data.status===0){ + this.setState({ + Modalstype:false, + Modalstopval:"是否确认删除?", + ModalCancel:"", + ModalSave:"", + }) + this.props.showNotification(`删除成功`); + this.props.getinputdata(); + }else{ + this.props.showNotification(`删除失败`); + } + }else{ + this.props.showNotification(`删除失败`); + } + } + + }) + .catch(function (error) { + console.log(error); + this.props.showNotification(`删除失败`); + }); + } + bianji = (bians)=>{ this.setState({ @@ -154,12 +214,18 @@ class Bullsubdirectory extends Component{ render(){ let{description,whethertoeditysl,addonAfter,eduintits,informs,isSpinysl} =this.state; - let{myname,mydescription}=this.props; + let{myname,mydescription,id}=this.props; const {getFieldDecorator} = this.props.form; return(
+ {this.state.Modalstype&&this.state.Modalstype===true?:""}
{ @@ -171,16 +237,29 @@ class Bullsubdirectory extends Component{ {myname}
- + { - this.props.isAdmin() === true ? + this.props.isClassManagement() === true ? (this.props.yslbool===false? + this.bianji(true)}> : "" ) :"" } + + + { + this.props.isClassManagement() === true ? + (this.props.yslbool===false? + + this.setModeltrue(true)}> + : + "" + ) + :"" + }
From 2d8b5196b4a8d13c530f1a413a8181535495e98c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 7 Sep 2019 14:21:11 +0800 Subject: [PATCH 05/18] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/user/usersInfo/InfosTopics.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/user/usersInfo/InfosTopics.js b/public/react/src/modules/user/usersInfo/InfosTopics.js index db96818e5..5b344270e 100644 --- a/public/react/src/modules/user/usersInfo/InfosTopics.js +++ b/public/react/src/modules/user/usersInfo/InfosTopics.js @@ -70,6 +70,14 @@ class InfosTopics extends Component{ // }else{ // // } + + let types=this.props.match.params.topicstype; + let professional_certification=this.props.current_user&&this.props.current_user.professional_certification; + + + if(professional_certification===false&&types==="publicly"){ + + }else{ this.setState({ isSpin:true }) @@ -77,9 +85,9 @@ class InfosTopics extends Component{ let user_id=""; if(types==="publicly"){ - user_id=this.props.current_user&&this.props.current_user.login; + user_id=this.props.current_user&&this.props.current_user.login; }else{ - user_id=this.props.match.params&&this.props.match.params.username; + user_id=this.props.match.params&&this.props.match.params.username; } @@ -112,6 +120,8 @@ class InfosTopics extends Component{ }) }); + } + } searchCategory=(type)=>{ From 67395e72a7bea1b005375995a858542e87207aea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 7 Sep 2019 14:22:13 +0800 Subject: [PATCH 06/18] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/user/usersInfo/banks/BanksIndex.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/user/usersInfo/banks/BanksIndex.js b/public/react/src/modules/user/usersInfo/banks/BanksIndex.js index e921022c3..121119a0d 100644 --- a/public/react/src/modules/user/usersInfo/banks/BanksIndex.js +++ b/public/react/src/modules/user/usersInfo/banks/BanksIndex.js @@ -127,7 +127,7 @@ class BanksIndex extends Component{ { crumbData && - { crumbData && crumbData.is_public == true ? '公共' : '我的' }题库 + { crumbData && crumbData.is_public == true ? '公共' : '我的' }题库 { crumbData.crumbArray && crumbData.crumbArray.map((item,key)=>{ return( From a7cfb3b078feb99b4416219864ee737c83ff46be Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Sat, 7 Sep 2019 14:22:51 +0800 Subject: [PATCH 07/18] =?UTF-8?q?=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../users/question_banks_controller.rb | 2 +- .../20190907061918_migrate_bank_quotes.rb | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20190907061918_migrate_bank_quotes.rb diff --git a/app/controllers/users/question_banks_controller.rb b/app/controllers/users/question_banks_controller.rb index 76523eca4..5c8e69a29 100644 --- a/app/controllers/users/question_banks_controller.rb +++ b/app/controllers/users/question_banks_controller.rb @@ -30,7 +30,7 @@ class Users::QuestionBanksController < Users::BaseController .where(commit_status: 1, exercises: { exercise_bank_id: question_bank_ids }) .group('exercises.exercise_bank_id').count when 'poll' then - PollUser.joins(:poll).where(polls: { exercise_bank_id: question_bank_ids }) + PollUser.joins(:poll).where(commit_status: 1, polls: { exercise_bank_id: question_bank_ids }) .group('polls.exercise_bank_id').count when 'gtask' then GraduationWork.has_committed.joins(:graduation_task) diff --git a/db/migrate/20190907061918_migrate_bank_quotes.rb b/db/migrate/20190907061918_migrate_bank_quotes.rb new file mode 100644 index 000000000..34b2e53a1 --- /dev/null +++ b/db/migrate/20190907061918_migrate_bank_quotes.rb @@ -0,0 +1,23 @@ +class MigrateBankQuotes < ActiveRecord::Migration[5.2] + def change + HomeworkBank.all.each do |bank| + bank.update_column("quotes", bank.homework_commons.count) + end + + GtopicBank.all.each do |bank| + bank.update_column("quotes", bank.graduation_topics.count) + end + + GtaskBank.all.each do |bank| + bank.update_column("quotes", bank.graduation_tasks.count) + end + + ExerciseBank.all.each do |bank| + if bank.container_type == 'Exercise' + bank.update_column("quotes", bank.exercises.count) + elsif bank.container_type == 'Poll' + bank.update_column("quotes", bank.polls.count) + end + end + end +end From cac08350c681ff220d536b76430e047ddcbbcbdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 7 Sep 2019 14:24:08 +0800 Subject: [PATCH 08/18] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=85=AC=E5=91=8A?= =?UTF-8?q?=E6=A0=8F=E7=9A=84=E5=8A=9F=E8=83=BD=E5=88=A0=E9=99=A4=E5=92=8C?= =?UTF-8?q?=E6=9D=83=E9=99=90=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/courses/gradinforms/Bullsubdirectory.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js b/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js index d7a07f4d8..3e7522e31 100644 --- a/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js +++ b/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js @@ -173,7 +173,7 @@ class Bullsubdirectory extends Component{ } var url = `/courses/${id}/update_informs.json`; axios.post(url,{ - inform_id:this.state.id, + inform_id:this.props.id, name:titname, description:values.description, }).then((result) => { From 2c74f3edd70f081bf862a3f52a543361569198aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 7 Sep 2019 14:26:42 +0800 Subject: [PATCH 09/18] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/page/main/ActionView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/page/main/ActionView.js b/public/react/src/modules/page/main/ActionView.js index 0fa4dd267..1bd30940b 100644 --- a/public/react/src/modules/page/main/ActionView.js +++ b/public/react/src/modules/page/main/ActionView.js @@ -152,7 +152,7 @@ class ActionView extends Component { - {(shixun&&shixun.vnc || shixun&&shixun.vnc_evaluate) &&
+ {(!shixun&&shixun.vnc || shixun&&shixun.vnc_evaluate) &&
{ st === 1 && game.status === 2 ? From cd43ed17f06c1fac4f36cebd35d7bcc6a7eafc43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 7 Sep 2019 14:29:36 +0800 Subject: [PATCH 10/18] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/page/main/ActionView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/page/main/ActionView.js b/public/react/src/modules/page/main/ActionView.js index 1bd30940b..5504b5e7e 100644 --- a/public/react/src/modules/page/main/ActionView.js +++ b/public/react/src/modules/page/main/ActionView.js @@ -152,7 +152,7 @@ class ActionView extends Component { - {(!shixun&&shixun.vnc || shixun&&shixun.vnc_evaluate) &&
+ {(shixun&&!shixun.vnc || shixun&&shixun.vnc_evaluate) &&
{ st === 1 && game.status === 2 ? From 03dc095074a22836a3df1a9d76f593a5dbc5fff6 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Sat, 7 Sep 2019 14:31:48 +0800 Subject: [PATCH 11/18] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20190907061918_migrate_bank_quotes.rb | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/db/migrate/20190907061918_migrate_bank_quotes.rb b/db/migrate/20190907061918_migrate_bank_quotes.rb index 34b2e53a1..9f278860d 100644 --- a/db/migrate/20190907061918_migrate_bank_quotes.rb +++ b/db/migrate/20190907061918_migrate_bank_quotes.rb @@ -1,22 +1,27 @@ class MigrateBankQuotes < ActiveRecord::Migration[5.2] def change HomeworkBank.all.each do |bank| - bank.update_column("quotes", bank.homework_commons.count) + task_count = bank.homework_commons.count + bank.update_column("quotes", task_count == 0 ? 1 : task_count) end GtopicBank.all.each do |bank| - bank.update_column("quotes", bank.graduation_topics.count) + task_count = bank.graduation_topics.count + bank.update_column("quotes", task_count == 0 ? 1 : task_count) end GtaskBank.all.each do |bank| - bank.update_column("quotes", bank.graduation_tasks.count) + task_count = bank.graduation_tasks.count + bank.update_column("quotes", task_count == 0 ? 1 : task_count) end ExerciseBank.all.each do |bank| if bank.container_type == 'Exercise' - bank.update_column("quotes", bank.exercises.count) + task_count = bank.exercises.count + bank.update_column("quotes", task_count == 0 ? 1 : task_count) elsif bank.container_type == 'Poll' - bank.update_column("quotes", bank.polls.count) + task_count = bank.polls.count + bank.update_column("quotes", task_count == 0 ? 1 : task_count) end end end From d8d7468010316a6aae970063aa38cfdb585f40aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 7 Sep 2019 14:42:04 +0800 Subject: [PATCH 12/18] =?UTF-8?q?=E5=AE=9E=E6=88=98=E8=80=97=E6=97=B6?= =?UTF-8?q?=E5=8A=A0tpi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shixunHomework/Listofworksstudentone.js | 29 ++++++++++++------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 71ce6a4ea..b640f9b37 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -252,15 +252,18 @@ class Listofworksstudentone extends Component { } }> {record.cost_time === null? "--":record.cost_time === undefined?"--": - + 学员在EduCoder做实训花费的时间 +
}> + {record.cost_time === null ? "--":record.cost_time === undefined ?"--":record.cost_time} - + >{record.cost_time === null ? "--":record.cost_time === undefined ?"--":record.cost_time} + + } ) @@ -525,15 +528,18 @@ class Listofworksstudentone extends Component { } }> {record.cost_time === null? "--":record.cost_time === undefined?"--": + + 学员在EduCoder做实训花费的时间 +
}> {record.cost_time === null ? "--":record.cost_time === undefined ?"--":record.cost_time} +
} // {record.cost_time === null ? "--":record.cost_time === undefined ?"--": + + 学员在EduCoder做实训花费的时间 +
}> {record.cost_time === null ? "--":record.cost_time === undefined ?"--":record.cost_time} + } ) From c71577356508a136d5383598a773650538ba4042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 7 Sep 2019 14:46:41 +0800 Subject: [PATCH 13/18] =?UTF-8?q?=E5=AE=9E=E6=88=98=E8=80=97=E6=97=B6?= =?UTF-8?q?=E5=8A=A0tpi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/shixunHomework/Listofworksstudentone.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index b640f9b37..2253cc1f3 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -251,7 +251,7 @@ class Listofworksstudentone extends Component { textAlign: "center" } }> - {record.cost_time === null? "--":record.cost_time === undefined?"--": + {record.cost_time === null? "--":record.cost_time === undefined?"--":record.cost_time === "--"?"--": 学员在EduCoder做实训花费的时间
}> @@ -527,7 +527,7 @@ class Listofworksstudentone extends Component { textAlign: "center" } }> - {record.cost_time === null? "--":record.cost_time === undefined?"--": + {record.cost_time === null? "--":record.cost_time === undefined?"--":record.cost_time === "--"?"--": 学员在EduCoder做实训花费的时间
}> @@ -853,7 +853,7 @@ class Listofworksstudentone extends Component { textAlign: "center" } }> - {record.cost_time === null ? "--":record.cost_time === undefined ?"--": + {record.cost_time === null ? "--":record.cost_time === undefined ?"--":record.cost_time === "--" ?"--": 学员在EduCoder做实训花费的时间 }> From 93af3c7872ee51ac0fcc769be698a7020e3af6da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 7 Sep 2019 15:03:56 +0800 Subject: [PATCH 14/18] b --- public/react/config/webpack.config.prod.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/config/webpack.config.prod.js b/public/react/config/webpack.config.prod.js index 8cab0465f..d5ad7593a 100644 --- a/public/react/config/webpack.config.prod.js +++ b/public/react/config/webpack.config.prod.js @@ -62,7 +62,7 @@ module.exports = { // We generate sourcemaps in production. This is slow but gives good results. // You can exclude the *.map files from the build during deployment. // devtool: shouldUseSourceMap ? 'nosources-source-map' : false, //正式版 - devtool: shouldUseSourceMap ? 'source-map' : false,//测试版 + devtool: shouldUseSourceMap ? 'source-map' : 'source-map',//测试版 // In production, we only want to load the polyfills and the app code. entry: [require.resolve('./polyfills'), paths.appIndexJs], output: { From 9000ee2a3d2647f6de751942983b8e35455b2351 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 7 Sep 2019 15:11:41 +0800 Subject: [PATCH 15/18] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/groupjobbank/GroupPackage2.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/groupjobbank/GroupPackage2.js b/public/react/src/modules/courses/groupjobbank/GroupPackage2.js index da48f3404..f6fa8361a 100644 --- a/public/react/src/modules/courses/groupjobbank/GroupPackage2.js +++ b/public/react/src/modules/courses/groupjobbank/GroupPackage2.js @@ -82,11 +82,16 @@ class GroupPackage extends Component {

} { - datas&&datas.group_info&&datas.group_info.base_on_project? + datas&&datas.group_info&&datas.group_info.base_on_project===1?

基于项目实施 (学生必须在本平台创建项目,项目管理员可以提交作品)

+ :datas&&datas.group_info&&datas.group_info.base_on_project===0? +

+ 基于项目实施 + (无需在平台创建项目,任意小组成员均可以提交作品) +

:"" } From cbf8412a3cffbf35e018f1791601e16f6ebde921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 7 Sep 2019 15:26:41 +0800 Subject: [PATCH 16/18] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=A2=9E=E5=8A=A0tpi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/shixunHomework/ShixunWorkReport.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js index d5ab535e2..5c90d07fe 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js @@ -395,7 +395,10 @@ class ShixunWorkReport extends Component {
通关时间: {data&&data.passed_time===null||data&&data.passed_time=== "--"?'--':moment(data&&data.passed_time).format('YYYY-MM-DD HH:mm')}
-
实战耗时: {data&&data.time_consuming===null?'--':data&&data.time_consuming}
+
实战耗时: + 学员在EduCoder做实训花费的时间 +
}>{data&&data.time_consuming===null?'--': + data&&data.time_consuming}

From b7dee6bf82756d89bb30511c0e69c07c139e42b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 7 Sep 2019 15:28:52 +0800 Subject: [PATCH 17/18] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=A2=9E=E5=8A=A0tpi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/shixunHomework/ShixunWorkReport.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js index 5c90d07fe..d5ab535e2 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js @@ -395,10 +395,7 @@ class ShixunWorkReport extends Component {
通关时间: {data&&data.passed_time===null||data&&data.passed_time=== "--"?'--':moment(data&&data.passed_time).format('YYYY-MM-DD HH:mm')}
-
实战耗时: - 学员在EduCoder做实训花费的时间 -
}>{data&&data.time_consuming===null?'--': - data&&data.time_consuming} +
实战耗时: {data&&data.time_consuming===null?'--':data&&data.time_consuming}

From 0620ef3d536fc141fe5d04d6c27517b702b9cb28 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 7 Sep 2019 15:32:51 +0800 Subject: [PATCH 18/18] =?UTF-8?q?=E5=9F=BA=E4=BA=8E=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=AE=9E=E6=96=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/busyWork/NewWorkForm.js | 1 + 1 file changed, 1 insertion(+) diff --git a/public/react/src/modules/courses/busyWork/NewWorkForm.js b/public/react/src/modules/courses/busyWork/NewWorkForm.js index 6083252bc..1626c5c6a 100644 --- a/public/react/src/modules/courses/busyWork/NewWorkForm.js +++ b/public/react/src/modules/courses/busyWork/NewWorkForm.js @@ -450,6 +450,7 @@ class NewWorkForm extends Component{ className="AboutInputForm groupSetting" > {getFieldDecorator('personNum', { + validateTrigger: 'onNone', rules: [{ // required: true, // message: '人数不能为空'