From b8556d869465594434d070557b0b52da11012637 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, 27 Jul 2019 10:50:54 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../courses/exercise/question/shixunAnswer.js | 4 +-
.../graduation/topics/GraduateTopicNew.js | 1226 +++++++--------
public/react/src/modules/courses/poll/Poll.js | 2 +-
.../modules/courses/poll/PollDetailIndex.js | 2 +-
.../modules/tpm/TPMsettings/TPMsettings.js | 1359 +++++++++--------
.../react/src/modules/tpm/component/TPMNav.js | 2 +-
.../src/modules/user/account/AccountNav.js | 2 +-
7 files changed, 1301 insertions(+), 1296 deletions(-)
diff --git a/public/react/src/modules/courses/exercise/question/shixunAnswer.js b/public/react/src/modules/courses/exercise/question/shixunAnswer.js
index 5897ebd79..f1fb09227 100644
--- a/public/react/src/modules/courses/exercise/question/shixunAnswer.js
+++ b/public/react/src/modules/courses/exercise/question/shixunAnswer.js
@@ -135,8 +135,8 @@ class shixunAnswer extends Component{
let url=`/exercise_questions/${this.props.questionType.question_id}/adjust_score.json`
const list = Object.assign({}, this.state.dataCopy[key])
- console.log("111111111111111111111111");
- console.log(this.props);
+ // console.log("111111111111111111111111");
+ // console.log(this.props);
// 调分值为0,且和第一次的数据相同则不修改
if(parseInt(e.target.value)==parseInt(list.my_score)){
return;
diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicNew.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicNew.js
index 569c76331..43a0e31f5 100644
--- a/public/react/src/modules/courses/graduation/topics/GraduateTopicNew.js
+++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicNew.js
@@ -1,614 +1,614 @@
-import React,{ Component } from "react";
-
-import {
- Form, Input, InputNumber, Switch, Radio,
- Slider, Button, Upload, Icon, Rate, Checkbox, message,
- Row, Col, Select, Modal,Cascader
-} from 'antd';
-import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor';
-import axios from 'axios'
-import {getUrl} from 'educoder';
-import "../../common/formCommon.css"
-import '../style.css'
-import '../../css/Courses.css'
-import { WordsBtn, City } from 'educoder'
-// import City from './City'
-
-// import './board.css'
-// import { RouteHOC } from './common.js'
-
-const confirm = Modal.confirm;
-const $ = window.$
-const { Option } = Select;
-// 新建毕设选题
-// https://lanhuapp.com/web/#/item/project/board/detail?pid=a3bcd4b1-99ce-4e43-8ead-5b8b0a410807&project_id=a3bcd4b1-99ce-4e43-8ead-5b8b0a410807&image_id=c6d9b36f-7701-4035-afdb-62404681108c
-class GraduateTopicNew extends Component{
- constructor(props){
- super(props);
-
- this.mdRef = React.createRef();
-
- this.state = {
- fileList: [],
- boards: [],
- teacherList:[],
- topic_property_first:[],
- topic_property_second:[],
- topic_repeat:[],
- topic_source:[],
- topic_type:[],
- attachments:undefined,
- addonAfter:60,
- left_banner_id:undefined,
- course_name:undefined
- }
- }
- // 获取老师列表
- getTeacherList=()=>{
- const cid = this.props.match.params.coursesId
- let url=`/courses/${cid}/graduation_topics/new.json`;
- axios.get((url)).then((result)=>{
- if(result.status==200){
- this.setState({
- teacherList:result.data.teacher_list,
- left_banner_id:result.data.left_banner_id,
- course_name:result.data.course_name,
- left_banner_name:result.data.left_banner_name,
- topic_property_first:result.data.topic_property_first,
- topic_property_second:result.data.topic_property_second,
- topic_repeat:result.data.topic_repeat,
- topic_source:result.data.topic_source,
- topic_type:result.data.topic_type
- })
- console.log("sdfds");
- console.log(this.props.current_user && this.props.current_user.user_id);
- this.props.form.setFieldsValue({
- tea_id:this.props.current_user && this.props.current_user.user_id
- })
- }
- }).catch((error)=>{
- console.log(error);
- })
- }
- componentDidMount = () => {
- //新建or编辑
- let topicId=this.props.match.params.topicId;
-
- if(topicId==undefined){
- this.getTeacherList();
- }else{
- this.getEditInfo();
-
- }
- }
- //编辑,信息显示
- getEditInfo=()=>{
- const cid = this.props.match.params.coursesId
- let topicId=this.props.match.params.topicId
- let url=`/courses/${cid}/graduation_topics/${topicId}/edit.json`;
- axios.get((url)).then((result)=>{
- if(result){
- this.setState({
- left_banner_id:result.data.left_banner_id,
- course_name:result.data.course_name,
- left_banner_name:result.data.left_banner_name,
- teacherList:result.data.teacher_list,
- topic_property_first:result.data.topic_property_first,
- topic_property_second:result.data.topic_property_second,
- topic_repeat:result.data.topic_repeat,
- topic_source:result.data.topic_source,
- topic_type:result.data.topic_type,
- attachments:result.data.attachments,
- addonAfter:20-parseInt(result.data.selected_data.name.length)
- })
- this.props.form.setFieldsValue({
- tea_id:result.data.selected_data.tea_id,
- name:result.data.selected_data.name,
- city: [result.data.selected_data.province,result.data.selected_data.city],
- topic_type:result.data.selected_data.topic_type || undefined,
- topic_source:result.data.selected_data.topic_source || undefined,
- topic_property_first:result.data.selected_data.topic_property_first || undefined,
- topic_property_second:result.data.selected_data.topic_property_second || undefined,
- source_unit:result.data.selected_data.source_unit,
- topic_repeat:result.data.selected_data.topic_repeat || undefined
- });
- this.mdRef.current.setValue(result.data.selected_data.description)
- const _fileList = result.data.attachments.map(item => {
- return {
- id: item.id,
- uid: item.id,
- name: item.title,
- url: item.url,
- status: 'done'
- }
- })
- this.setState({ fileList: _fileList, cityDefaultValue: [result.data.selected_data.province,result.data.selected_data.city] })
- }
- }).catch((error)=>{
- console.log(error);
- })
- }
-
- handleSubmit = (e) => {
- e.preventDefault();
- const cid = this.props.match.params.coursesId
- const topicId = this.props.match.params.topicId
- console.log(this.props);
-
- this.props.form.validateFieldsAndScroll((err, values) => {
- if (!err) {
- console.log('Received values of form: ', values);
- if (topicId !=undefined) {
- const editTopic = this.editTopic
- const editUrl = `/courses/${cid}/graduation_topics/${topicId}.json`
-
- let attachment_ids = undefined
- if (this.state.fileList) {
- attachment_ids = this.state.fileList.map(item => {
- return item.response ? item.response.id : item.id
- })
- }
- axios.put(editUrl, {
- graduation_topic:{
- ...values,
- province: values.city==undefined?"":values.city[0],
- city: values.city==undefined?"":values.city[1],
- },
- attachment_ids
- }).then((response) => {
- if (response.status == 200) {
- const { id } = response.data;
- if (id) {
- this.props.showNotification('保存成功!');
- this.props.history.push(`/courses/${cid}/graduation_topics/${this.state.left_banner_id}`);
- }
- }
- }).catch(function (error) {
- console.log(error);
- });
- } else {
- const url = `/courses/${cid}/graduation_topics.json`
- let attachment_ids = undefined
- if (this.state.fileList) {
- attachment_ids = this.state.fileList.map(item => {
- return item.response.id
- })
- }
-
- axios.post(url, {
- graduation_topic:{
- ...values,
- province: values.city==undefined?"":values.city[0],
- city: values.city==undefined?"":values.city[1],
- },
- attachment_ids,
- }).then((response) => {
- if (response.data) {
- const { id } = response.data;
- if (id) {
- this.props.showNotification('提交成功!');
- this.props.history.push(`/courses/${cid}/graduation_topics/${this.state.left_banner_id}`);
- }
- }
- })
- .catch(function (error) {
- console.log(error);
- });
- }
- } else {
- $("html").animate({ scrollTop: $('html').scrollTop() - 100 })
- }
- });
- }
-
- // 选择省市
- ChangeCity=(value, selectedOptions)=>{
- console.log(selectedOptions);
- }
-
- // 附件相关 START
- handleChange = (info) => {
- let fileList = info.fileList;
- this.setState({ fileList });
- }
- onAttachmentRemove = (file) => {
- confirm({
- title: '确定要删除这个附件吗?',
- okText: '确定',
- cancelText: '取消',
- // content: 'Some descriptions',
- onOk: () => {
- this.deleteAttachment(file)
- },
- onCancel() {
- console.log('Cancel');
- },
- });
- return false;
- }
- deleteAttachment = (file) => {
- console.log(file);
- let id=file.response ==undefined ? file.id : file.response.id
- const url = `/attachments/${id}.json`
- axios.delete(url, {
- })
- .then((response) => {
- if (response.data) {
- const { status } = response.data;
- if (status == 0) {
- console.log('--- success')
-
- this.setState((state) => {
- const index = state.fileList.indexOf(file);
- const newFileList = state.fileList.slice();
- newFileList.splice(index, 1);
- return {
- fileList: newFileList,
- };
- });
- }
- }
- })
- .catch(function (error) {
- console.log(error);
- });
- }
-
- // 附件相关 ------------ END
-
- changeTopicName=(e)=>{
- let num= 60 - parseInt(e.target.value.length);
- this.setState({
- addonAfter:num < 0 ? 0 : num
- })
- }
- render() {
- let {
- fileList,
- teacherList,
- topic_property_first,
- topic_property_second,
- topic_repeat,
- topic_source,
- topic_type,
- addonAfter,
- left_banner_id,
- course_name,
- left_banner_name
- } = this.state;
- const { current_user } = this.props
- const { getFieldDecorator } = this.props.form;
- let{ topicId,coursesId }=this.props.match.params
- console.log(this.props);
-
- const formItemLayout = {
- labelCol: {
- xs: { span: 24 },
- // sm: { span: 8 },
- sm: { span: 24 },
- },
- wrapperCol: {
- xs: { span: 24 },
- // sm: { span: 16 },
- sm: { span: 24 },
- },
- };
- const uploadProps = {
- width: 600,
- fileList,
- multiple: true,
- // https://github.com/ant-design/ant-design/issues/15505
- // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。
- // showUploadList: false,
- action: `${getUrl()}/api/attachments.json`,
- onChange: this.handleChange,
- onRemove: this.onAttachmentRemove,
- beforeUpload: (file) => {
- console.log('beforeUpload', file.name);
- const isLt150M = file.size / 1024 / 1024 < 150;
- if (!isLt150M) {
- message.error('文件大小必须小于150MB!');
- }
- return isLt150M;
- },
- };
- console.log("dfsf");
- console.log(this.props);
- return(
-
-
-
-
- {course_name}
- >
- {left_banner_name}
- >
- {topicId==undefined?"新建":"编辑"}
-
-
-
-
-
-
-
-
-
- )
- }
-}
-
-const WrappedGraduateTopicNew = Form.create({ name: 'topicPostWorksNew' })(GraduateTopicNew);
-// RouteHOC()
+import React,{ Component } from "react";
+
+import {
+ Form, Input, InputNumber, Switch, Radio,
+ Slider, Button, Upload, Icon, Rate, Checkbox, message,
+ Row, Col, Select, Modal,Cascader
+} from 'antd';
+import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor';
+import axios from 'axios'
+import {getUrl} from 'educoder';
+import "../../common/formCommon.css"
+import '../style.css'
+import '../../css/Courses.css'
+import { WordsBtn, City } from 'educoder'
+// import City from './City'
+
+// import './board.css'
+// import { RouteHOC } from './common.js'
+
+const confirm = Modal.confirm;
+const $ = window.$
+const { Option } = Select;
+// 新建毕设选题
+// https://lanhuapp.com/web/#/item/project/board/detail?pid=a3bcd4b1-99ce-4e43-8ead-5b8b0a410807&project_id=a3bcd4b1-99ce-4e43-8ead-5b8b0a410807&image_id=c6d9b36f-7701-4035-afdb-62404681108c
+class GraduateTopicNew extends Component{
+ constructor(props){
+ super(props);
+
+ this.mdRef = React.createRef();
+
+ this.state = {
+ fileList: [],
+ boards: [],
+ teacherList:[],
+ topic_property_first:[],
+ topic_property_second:[],
+ topic_repeat:[],
+ topic_source:[],
+ topic_type:[],
+ attachments:undefined,
+ addonAfter:60,
+ left_banner_id:undefined,
+ course_name:undefined
+ }
+ }
+ // 获取老师列表
+ getTeacherList=()=>{
+ const cid = this.props.match.params.coursesId
+ let url=`/courses/${cid}/graduation_topics/new.json`;
+ axios.get((url)).then((result)=>{
+ if(result.status==200){
+ this.setState({
+ teacherList:result.data.teacher_list,
+ left_banner_id:result.data.left_banner_id,
+ course_name:result.data.course_name,
+ left_banner_name:result.data.left_banner_name,
+ topic_property_first:result.data.topic_property_first,
+ topic_property_second:result.data.topic_property_second,
+ topic_repeat:result.data.topic_repeat,
+ topic_source:result.data.topic_source,
+ topic_type:result.data.topic_type
+ })
+ console.log("sdfds");
+ console.log(this.props.current_user && this.props.current_user.user_id);
+ this.props.form.setFieldsValue({
+ tea_id:this.props.current_user && this.props.current_user.user_id
+ })
+ }
+ }).catch((error)=>{
+ console.log(error);
+ })
+ }
+ componentDidMount = () => {
+ //新建or编辑
+ let topicId=this.props.match.params.topicId;
+
+ if(topicId==undefined){
+ this.getTeacherList();
+ }else{
+ this.getEditInfo();
+
+ }
+ }
+ //编辑,信息显示
+ getEditInfo=()=>{
+ const cid = this.props.match.params.coursesId
+ let topicId=this.props.match.params.topicId
+ let url=`/courses/${cid}/graduation_topics/${topicId}/edit.json`;
+ axios.get((url)).then((result)=>{
+ if(result){
+ this.setState({
+ left_banner_id:result.data.left_banner_id,
+ course_name:result.data.course_name,
+ left_banner_name:result.data.left_banner_name,
+ teacherList:result.data.teacher_list,
+ topic_property_first:result.data.topic_property_first,
+ topic_property_second:result.data.topic_property_second,
+ topic_repeat:result.data.topic_repeat,
+ topic_source:result.data.topic_source,
+ topic_type:result.data.topic_type,
+ attachments:result.data.attachments,
+ addonAfter:20-parseInt(result.data.selected_data.name.length)
+ })
+ this.props.form.setFieldsValue({
+ tea_id:result.data.selected_data.tea_id,
+ name:result.data.selected_data.name,
+ city: [result.data.selected_data.province,result.data.selected_data.city],
+ topic_type:result.data.selected_data.topic_type || undefined,
+ topic_source:result.data.selected_data.topic_source || undefined,
+ topic_property_first:result.data.selected_data.topic_property_first || undefined,
+ topic_property_second:result.data.selected_data.topic_property_second || undefined,
+ source_unit:result.data.selected_data.source_unit,
+ topic_repeat:result.data.selected_data.topic_repeat || undefined
+ });
+ this.mdRef.current.setValue(result.data.selected_data.description)
+ const _fileList = result.data.attachments.map(item => {
+ return {
+ id: item.id,
+ uid: item.id,
+ name: item.title,
+ url: item.url,
+ status: 'done'
+ }
+ })
+ this.setState({ fileList: _fileList, cityDefaultValue: [result.data.selected_data.province,result.data.selected_data.city] })
+ }
+ }).catch((error)=>{
+ console.log(error);
+ })
+ }
+
+ handleSubmit = (e) => {
+ e.preventDefault();
+ const cid = this.props.match.params.coursesId
+ const topicId = this.props.match.params.topicId
+ // console.log(this.props);
+
+ this.props.form.validateFieldsAndScroll((err, values) => {
+ if (!err) {
+ console.log('Received values of form: ', values);
+ if (topicId !=undefined) {
+ const editTopic = this.editTopic
+ const editUrl = `/courses/${cid}/graduation_topics/${topicId}.json`
+
+ let attachment_ids = undefined
+ if (this.state.fileList) {
+ attachment_ids = this.state.fileList.map(item => {
+ return item.response ? item.response.id : item.id
+ })
+ }
+ axios.put(editUrl, {
+ graduation_topic:{
+ ...values,
+ province: values.city==undefined?"":values.city[0],
+ city: values.city==undefined?"":values.city[1],
+ },
+ attachment_ids
+ }).then((response) => {
+ if (response.status == 200) {
+ const { id } = response.data;
+ if (id) {
+ this.props.showNotification('保存成功!');
+ this.props.history.push(`/courses/${cid}/graduation_topics/${this.state.left_banner_id}`);
+ }
+ }
+ }).catch(function (error) {
+ console.log(error);
+ });
+ } else {
+ const url = `/courses/${cid}/graduation_topics.json`
+ let attachment_ids = undefined
+ if (this.state.fileList) {
+ attachment_ids = this.state.fileList.map(item => {
+ return item.response.id
+ })
+ }
+
+ axios.post(url, {
+ graduation_topic:{
+ ...values,
+ province: values.city==undefined?"":values.city[0],
+ city: values.city==undefined?"":values.city[1],
+ },
+ attachment_ids,
+ }).then((response) => {
+ if (response.data) {
+ const { id } = response.data;
+ if (id) {
+ this.props.showNotification('提交成功!');
+ this.props.history.push(`/courses/${cid}/graduation_topics/${this.state.left_banner_id}`);
+ }
+ }
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+ }
+ } else {
+ $("html").animate({ scrollTop: $('html').scrollTop() - 100 })
+ }
+ });
+ }
+
+ // 选择省市
+ ChangeCity=(value, selectedOptions)=>{
+ console.log(selectedOptions);
+ }
+
+ // 附件相关 START
+ handleChange = (info) => {
+ let fileList = info.fileList;
+ this.setState({ fileList });
+ }
+ onAttachmentRemove = (file) => {
+ confirm({
+ title: '确定要删除这个附件吗?',
+ okText: '确定',
+ cancelText: '取消',
+ // content: 'Some descriptions',
+ onOk: () => {
+ this.deleteAttachment(file)
+ },
+ onCancel() {
+ console.log('Cancel');
+ },
+ });
+ return false;
+ }
+ deleteAttachment = (file) => {
+ console.log(file);
+ let id=file.response ==undefined ? file.id : file.response.id
+ const url = `/attachments/${id}.json`
+ axios.delete(url, {
+ })
+ .then((response) => {
+ if (response.data) {
+ const { status } = response.data;
+ if (status == 0) {
+ console.log('--- success')
+
+ this.setState((state) => {
+ const index = state.fileList.indexOf(file);
+ const newFileList = state.fileList.slice();
+ newFileList.splice(index, 1);
+ return {
+ fileList: newFileList,
+ };
+ });
+ }
+ }
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+ }
+
+ // 附件相关 ------------ END
+
+ changeTopicName=(e)=>{
+ let num= 60 - parseInt(e.target.value.length);
+ this.setState({
+ addonAfter:num < 0 ? 0 : num
+ })
+ }
+ render() {
+ let {
+ fileList,
+ teacherList,
+ topic_property_first,
+ topic_property_second,
+ topic_repeat,
+ topic_source,
+ topic_type,
+ addonAfter,
+ left_banner_id,
+ course_name,
+ left_banner_name
+ } = this.state;
+ const { current_user } = this.props
+ const { getFieldDecorator } = this.props.form;
+ let{ topicId,coursesId }=this.props.match.params
+ // console.log(this.props);
+
+ const formItemLayout = {
+ labelCol: {
+ xs: { span: 24 },
+ // sm: { span: 8 },
+ sm: { span: 24 },
+ },
+ wrapperCol: {
+ xs: { span: 24 },
+ // sm: { span: 16 },
+ sm: { span: 24 },
+ },
+ };
+ const uploadProps = {
+ width: 600,
+ fileList,
+ multiple: true,
+ // https://github.com/ant-design/ant-design/issues/15505
+ // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。
+ // showUploadList: false,
+ action: `${getUrl()}/api/attachments.json`,
+ onChange: this.handleChange,
+ onRemove: this.onAttachmentRemove,
+ beforeUpload: (file) => {
+ console.log('beforeUpload', file.name);
+ const isLt150M = file.size / 1024 / 1024 < 150;
+ if (!isLt150M) {
+ message.error('文件大小必须小于150MB!');
+ }
+ return isLt150M;
+ },
+ };
+ // console.log("dfsf");
+ // console.log(this.props);
+ return(
+
+
+
+
+ {course_name}
+ >
+ {left_banner_name}
+ >
+ {topicId==undefined?"新建":"编辑"}
+
+
+
+
+
+
+
+
+
+ )
+ }
+}
+
+const WrappedGraduateTopicNew = Form.create({ name: 'topicPostWorksNew' })(GraduateTopicNew);
+// RouteHOC()
export default (WrappedGraduateTopicNew);
\ No newline at end of file
diff --git a/public/react/src/modules/courses/poll/Poll.js b/public/react/src/modules/courses/poll/Poll.js
index 92b69a9d1..926cd9b1d 100644
--- a/public/react/src/modules/courses/poll/Poll.js
+++ b/public/react/src/modules/courses/poll/Poll.js
@@ -464,7 +464,7 @@ class Poll extends Component{
modalsBottomval,
loadtype
}=this.state;
- console.log(this.props);
+ // console.log(this.props);
let {child}=this.props;
let {coursesId,Id}=this.props.match.params
const isAdmin = this.props.isAdmin()
diff --git a/public/react/src/modules/courses/poll/PollDetailIndex.js b/public/react/src/modules/courses/poll/PollDetailIndex.js
index 9119b7902..a1c98b07b 100644
--- a/public/react/src/modules/courses/poll/PollDetailIndex.js
+++ b/public/react/src/modules/courses/poll/PollDetailIndex.js
@@ -34,7 +34,7 @@ class PollDetailIndex extends Component{
}
getPollInfo=()=>{
- console.log(this.props);
+ // console.log(this.props);
let pollId=this.props.match.params.pollId;
let url=`/polls/${pollId}/common_header.json`
axios.get(url).then((result)=>{
diff --git a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js
index b89990420..8eb2c76dd 100644
--- a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js
+++ b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js
@@ -3,7 +3,7 @@ import React, { Component } from 'react';
import MonacoEditor from 'react-monaco-editor';
//MonacoDiffEditor 对比模式
-import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal,Icon,DatePicker} from 'antd';
+import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal,Icon,DatePicker,Breadcrumb} from 'antd';
// import "antd/dist/antd.css";
@@ -1256,701 +1256,706 @@ export default class TPMsettings extends Component {
let operateauthority=this.props.identity===1?true:this.props.identity<5&&this.state.status==0?true:false;
return (
-
-
-
-
-
-
-
实训名称
-
-
-
*
-
-
- {settingsData === undefined ? "" :
- }
-
-
- 必填项
-
-
-
-
-
-
-
-
-
-
-
-
-
-
技术平台
-
-
-
-
*
-
+
+ 实训详情
+ 配置
+
+
+
+
+
配置
+ {
+ this.props.identity===1&&this.state.status==2?
+
this.operateshixuns(2)}>
+ 永久关闭
+ :""
+ }
+ {
+ this.props.identity < 5 && this.state.status==0?
+
this.operateshixuns(1)}>
+ 删除实训
+ :""
+ }
+ {
+ this.props.identity == 1 && this.state.status == 2 ?
+
this.operateshixuns(1)}>
+ 删除实训
+ :""
+ }
+
+
-
- {
- settingsData === undefined ? "" : settingsData.shixun.main_type.map((item, key) => {
-
- return(
-
- )
- })
- }
-
-
- 列表中没有?
- 申请新建
-
-
-
-
-
-
-
-
-
新建申请已提交,请等待管理员的审核
-
我们将在1-2个工作日内与您联系
-
-
-
-
-
-
-
-
-
-
-
- 必填项
-
- {/*
请在配置页面完成后续的评测脚本设置操作
*/}
-
-
-
- {/*
*/}
- {/*
*/}
-
-
评测脚本
-
-
-
-
-
原有脚本将被新的脚本覆盖,无法撤销
-
是否确认执行覆盖操作
-
-
-
-
-
-
-
-
-
-
- {
- this.props.identity<5||this.props.power==true?
-
使用自定义脚本 : ""
- }
-
-
this.testscripttip(0)}>
-
-
-
-
- 使用自定义模板,平台无法自动更新脚本,
- 请在关卡创建完后手动更新脚本中的必填参
- 数和以下2个数组元素:
- challengeProgramNames
- sourceClassNames
- 示例:有2个关卡的实训
- 各关卡的待编译文件为:
- src/step1/HelloWorld.java
- src/step2/Other.java
- 各关卡的编译后生成的执行文件为:
- step1.HelloWorld
- step2.Other
- 则数组元素更新如下:
- challengeProgramNames=("src/step1/
- HelloWorld.java" "src/step2/Other.java")
- sourceClassNames=("step1.HelloWorld
- " "step2.Other")
- 其它参数可按实际需求定制
-
+
+
+
+
+
实训名称
+
+
-
-
-
-
-
- 执行命令不能为空
-
-
-
-
-
-
-
-
-
-
-
-
-
-
*
-
-
-
-
- {/**/}
-
-
-
-
- {/*
*/}
- {/*{evaluate_script===undefined?"":evaluate_script}*/}
-
- {/*
*/}
-
-
-
-
-
-
-
-
-
- {/*
*/}
- {/*
**/}
-
- {/*
程序最大执行时间
*/}
-
- {/*
秒*/}
-
- {/*
*/}
- {/*必填项*/}
- {/*
*/}
- {/*
*/}
-
- {/*
-
*
-
-
Pod存活时间
-
-
秒
-
-
- 必填项
-
-
*/}
-
-
-
-
命令行
-
- 无命令行窗口 (选中则不给学员的实践任务提供命令窗口)
- 命令行练习窗口 (选中则给学员提供用于练习操作的命令行窗口)
- 命令行评测窗口 (选中则给学员提供用于关卡评测的命令行窗口)
-
- 多个命令行窗口(选中则允许学员同时开启多个命令行窗口)
-
-
-
-
-
-
公开程度
-
- 对所有公开 (选中则所有已被试用授权的用户可以学习)
- 对指定单位公开 (选中则下方指定单位的已被试用授权的用户可以学习)
-
-
-
-
-
-
-
-
- {/*{*/}
- {/*scope_partment===undefined?"":scope_partment.map((item,key)=>{*/}
- {/*return(*/}
- {/*
*/}
- {/*this.deleteScopeInput(key)} style={{ color: 'rgba(0,0,0,.25)' }} />}*/}
- {/*value={item}*/}
- {/*/>*/}
- {/*
*/}
-
- {/*)*/}
- {/*})*/}
- {/*}*/}
-
-
-
- 请选择需要公开的单位
-
-
-
-
-
-
-
发布信息
-
-
-
*
-
面向学员:
-
-
-
-
-
实训难易度定位,不限定用户群体
-
- 必填项
-
-
-
-
- 复制:
-
-
-
-
-
-
-
- 跳关:
-
-
-
-
-
-
- 测试集解锁:
-
-
-
-
-
-
-
- 隐藏代码窗口:
-
-
-
-
-
-
-
- 代码目录隐藏:
-
-
-
-
-
-
-
- 禁用复制粘贴:
-
-
-
-
-
-
-
- 开启时间:
-
-
-
-
-
-
- {this.props.identity<3?
- VNC图形化:
-
-
-
-
-
:""}
+
+
-
- {/*"name": "我是镜像名", # 镜像名称*/}
- {/*"cpu_limit": 1, # cpu核*/}
- {/*"lower_cpu_limit": 0.1, # 最低cpu核 浮点数*/}
- {/*"memory_limit": 1024 ,#内存限制*/}
- {/*"request_limit": 10, # 内存要求*/}
- {/*"mirror_repository_id": 12, # 镜像id*/}
- {this.props.identity<3?
-
服务配置
- { shixun_service_configs&&shixun_service_configs.map((item,key)=>{
- return(
-
-
-
{item.name}
-
-
-
-
this.setConfigsInputs(e,key,1)}
- className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
+
+
+
+
+
技术平台
+
+
+
+
*
+
+
+
+ 列表中没有?
+ 申请新建
+
+
+
+
+
+
+
+
+
新建申请已提交,请等待管理员的审核
+
我们将在1-2个工作日内与您联系
+
+
+
+
+
+
+
+
+
+
+
+ 必填项
+
+ {/*
请在配置页面完成后续的评测脚本设置操作
*/}
+
+
+
+ {/*
*/}
+ {/*
*/}
+
+
评测脚本
+
+
+
+
+
原有脚本将被新的脚本覆盖,无法撤销
+
是否确认执行覆盖操作
+
+
+
+
+
+
+
+
+
+
+ {
+ this.props.identity<5||this.props.power==true?
+
使用自定义脚本 : ""
+ }
+
+
this.testscripttip(0)}>
+
+
+
+
+ 使用自定义模板,平台无法自动更新脚本,
+ 请在关卡创建完后手动更新脚本中的必填参
+ 数和以下2个数组元素:
+ challengeProgramNames
+ sourceClassNames
+ 示例:有2个关卡的实训
+ 各关卡的待编译文件为:
+ src/step1/HelloWorld.java
+ src/step2/Other.java
+ 各关卡的编译后生成的执行文件为:
+ step1.HelloWorld
+ step2.Other
+ 则数组元素更新如下:
+ challengeProgramNames=("src/step1/
+ HelloWorld.java" "src/step2/Other.java")
+ sourceClassNames=("step1.HelloWorld
+ " "step2.Other")
+ 其它参数可按实际需求定制
+
+
+
+ this.testscripttip(1)}>知道了
+
-
-
-
-
-
this.setConfigsInputs(e,key,2)}
- className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
+
+
+
+
+
+
+ 执行命令不能为空
+
+
+
+
+
+
-
+
+
+
+
+
+
+
*
+
+
+
+
+ {/**/}
+
-
-
-
-
this.setConfigsInputs(e,key,3)}
- className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
+
+
+ {/*
*/}
+ {/*{evaluate_script===undefined?"":evaluate_script}*/}
+
+ {/*
*/}
+
+
+
+
+
+
+
+
+
+ {/*
*/}
+ {/*
**/}
+
+ {/*
程序最大执行时间
*/}
+
+ {/*
秒*/}
+
+ {/*
*/}
+ {/*必填项*/}
+ {/*
*/}
+ {/*
*/}
+
+ {/*
+
*
+
+
Pod存活时间
+
+
秒
+
+
+ 必填项
+
+
*/}
+
+
+
+
命令行
+
+ 无命令行窗口 (选中则不给学员的实践任务提供命令窗口)
+ 命令行练习窗口 (选中则给学员提供用于练习操作的命令行窗口)
+ 命令行评测窗口 (选中则给学员提供用于关卡评测的命令行窗口)
+
+ 多个命令行窗口(选中则允许学员同时开启多个命令行窗口)
+
+
+
+
+
+
公开程度
+
+ 对所有公开 (选中则所有已被试用授权的用户可以学习)
+ 对指定单位公开 (选中则下方指定单位的已被试用授权的用户可以学习)
+
+
+
+
+
-
-
-
-
this.setConfigsInputs(e,key,4)}
- className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
+
+
+
-
-
+ {/*{*/}
+ {/*scope_partment===undefined?"":scope_partment.map((item,key)=>{*/}
+ {/*return(*/}
+ {/*
*/}
+ {/*this.deleteScopeInput(key)} style={{ color: 'rgba(0,0,0,.25)' }} />}*/}
+ {/*value={item}*/}
+ {/*/>*/}
+ {/*
*/}
+
+ {/*)*/}
+ {/*})*/}
+ {/*}*/}
+
+
+ 请选择需要公开的单位
+
+
+
+
+
+
+
发布信息
+
+
+
*
+
面向学员:
+
+
+
+
+
实训难易度定位,不限定用户群体
+
+ 必填项
-
- )
-
- })}
-
:""}
-
- {
- // this.props.identity<4&&this.props.status==0?
- this.props.identity<5?
-
:""
- }
+
+
+ 复制:
+
+
+
+
+
+
+
+ 跳关:
+
+
+
+
+
+
+ 测试集解锁:
+
+
+
+
+
+
+
+ 隐藏代码窗口:
+
+
+
+
+
+
+
+ 代码目录隐藏:
+
+
+
+
+
+
+
+ 禁用复制粘贴:
+
+
+
+
+
+
+
+ 开启时间:
+
+
+
+
+
+
+ {this.props.identity<3?
+ VNC图形化:
+
+
+
+
+
:""}
+
+
+ {/*"name": "我是镜像名", # 镜像名称*/}
+ {/*"cpu_limit": 1, # cpu核*/}
+ {/*"lower_cpu_limit": 0.1, # 最低cpu核 浮点数*/}
+ {/*"memory_limit": 1024 ,#内存限制*/}
+ {/*"request_limit": 10, # 内存要求*/}
+ {/*"mirror_repository_id": 12, # 镜像id*/}
+ {this.props.identity<3?
+
服务配置
+ { shixun_service_configs&&shixun_service_configs.map((item,key)=>{
+ return(
+
+
+
{item.name}
+
+
+
+ this.setConfigsInputs(e,key,1)}
+ className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
+
+
+
+
+
+
+ this.setConfigsInputs(e,key,2)}
+ className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
+
+
+
+
+
+
+ this.setConfigsInputs(e,key,3)}
+ className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
+
+
+
+
+
+
+ this.setConfigsInputs(e,key,4)}
+ className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
+
+
+
+
+
+
+ )
+
+ })}
+
:""}
+
+
+ {
+ // this.props.identity<4&&this.props.status==0?
+ this.props.identity<5?
+
:""
+ }
-
+
-
+
);
}
}
diff --git a/public/react/src/modules/tpm/component/TPMNav.js b/public/react/src/modules/tpm/component/TPMNav.js
index 7bcc858e2..1683c59a0 100644
--- a/public/react/src/modules/tpm/component/TPMNav.js
+++ b/public/react/src/modules/tpm/component/TPMNav.js
@@ -42,7 +42,7 @@ class TPMNav extends Component {
className={`${match.url.indexOf('ranking_list') != -1 ? 'active' : ''} fl`}>排行榜
{/* target="_blank"*/}
4||this.props.identity===undefined ? "none" : 'block'}}
>配置
diff --git a/public/react/src/modules/user/account/AccountNav.js b/public/react/src/modules/user/account/AccountNav.js
index b0038e43b..e14921d34 100644
--- a/public/react/src/modules/user/account/AccountNav.js
+++ b/public/react/src/modules/user/account/AccountNav.js
@@ -14,7 +14,7 @@ class AccountNav extends Component {
}
render() {
let { basicInfo } = this.props
- console.log(this.props);
+ // console.log(this.props);
const path = window.location.pathname
const isBasic = path.indexOf('profile') != -1 || path == "/account"
const isCertification = path.indexOf('certification') != -1