diff --git a/public/react/package.json b/public/react/package.json index d2b6a23ea..e0989f47c 100644 --- a/public/react/package.json +++ b/public/react/package.json @@ -42,8 +42,6 @@ "immutability-helper": "^2.6.6", "install": "^0.12.2", "jest": "20.0.4", - "js-base64": "^2.5.1", - "js-file-download": "^0.4.7", "lodash": "^4.17.5", "loglevel": "^1.6.1", "material-ui": "^1.0.0-beta.40", @@ -165,7 +163,6 @@ "babel-plugin-import": "^1.11.0", "concat": "^1.0.3", "happypack": "^5.0.1", - "videojs-for-react": "^0.0.3", "webpack-bundle-analyzer": "^3.0.3", "webpack-parallel-uglify-plugin": "^1.1.0" } diff --git a/public/react/public/js/jsFromMiddleLayer/base64.js b/public/react/public/js/jsFromMiddleLayer/base64.js new file mode 100644 index 000000000..4494a50e3 --- /dev/null +++ b/public/react/public/js/jsFromMiddleLayer/base64.js @@ -0,0 +1,103 @@ +function Base64() { + + // private property + _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; + + // public method for encoding + this.encode = function (input) { + var output = ""; + var chr1, chr2, chr3, enc1, enc2, enc3, enc4; + var i = 0; + input = _utf8_encode(input); + while (i < input.length) { + chr1 = input.charCodeAt(i++); + chr2 = input.charCodeAt(i++); + chr3 = input.charCodeAt(i++); + enc1 = chr1 >> 2; + enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); + enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); + enc4 = chr3 & 63; + if (isNaN(chr2)) { + enc3 = enc4 = 64; + } else if (isNaN(chr3)) { + enc4 = 64; + } + output = output + + _keyStr.charAt(enc1) + _keyStr.charAt(enc2) + + _keyStr.charAt(enc3) + _keyStr.charAt(enc4); + } + return output; + } + + // public method for decoding + this.decode = function (input) { + var output = ""; + var chr1, chr2, chr3; + var enc1, enc2, enc3, enc4; + var i = 0; + input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); + while (i < input.length) { + enc1 = _keyStr.indexOf(input.charAt(i++)); + enc2 = _keyStr.indexOf(input.charAt(i++)); + enc3 = _keyStr.indexOf(input.charAt(i++)); + enc4 = _keyStr.indexOf(input.charAt(i++)); + chr1 = (enc1 << 2) | (enc2 >> 4); + chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); + chr3 = ((enc3 & 3) << 6) | enc4; + output = output + String.fromCharCode(chr1); + if (enc3 != 64) { + output = output + String.fromCharCode(chr2); + } + if (enc4 != 64) { + output = output + String.fromCharCode(chr3); + } + } + output = _utf8_decode(output); + return output; + } + + // private method for UTF-8 encoding + _utf8_encode = function (string) { + string = string.replace(/\r\n/g,"\n"); + var utftext = ""; + for (var n = 0; n < string.length; n++) { + var c = string.charCodeAt(n); + if (c < 128) { + utftext += String.fromCharCode(c); + } else if((c > 127) && (c < 2048)) { + utftext += String.fromCharCode((c >> 6) | 192); + utftext += String.fromCharCode((c & 63) | 128); + } else { + utftext += String.fromCharCode((c >> 12) | 224); + utftext += String.fromCharCode(((c >> 6) & 63) | 128); + utftext += String.fromCharCode((c & 63) | 128); + } + + } + return utftext; + } + + // private method for UTF-8 decoding + _utf8_decode = function (utftext) { + var string = ""; + var i = 0; + var c = c1 = c2 = 0; + while ( i < utftext.length ) { + c = utftext.charCodeAt(i); + if (c < 128) { + string += String.fromCharCode(c); + i++; + } else if((c > 191) && (c < 224)) { + c2 = utftext.charCodeAt(i+1); + string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); + i += 2; + } else { + c2 = utftext.charCodeAt(i+1); + c3 = utftext.charCodeAt(i+2); + string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); + i += 3; + } + } + return string; + } +} \ No newline at end of file diff --git a/public/react/public/js/js_min_all.js b/public/react/public/js/js_min_all.js index 79134fc55..0d7a8988e 100755 --- a/public/react/public/js/js_min_all.js +++ b/public/react/public/js/js_min_all.js @@ -211,20 +211,35 @@ $(function(){ var FF = !(window.mozInnerScreenX == null); var websshLineHeight = FF ? 19 : 18 - + function throttle(method, delay, duration){ + var timer = null, begin = new Date(); + return function(){ + var context = this, args = arguments, current = new Date(); + clearTimeout(timer); + if(current-begin >= duration){ + method.apply(context, args); + begin = current; + } else { + timer = setTimeout(function(){ + method.apply(context, args); + }, delay); + } + } + } doc.live('mousemove touchmove',function(e){ $(".-brother").show();// 代码行的遮罩显示 if(dragging) { clickX = e.pageX || e.originalEvent.touches[0].pageX;; if(clickX > leftOffset+0&&clickX { - this.setState({mdMode: true}, () => { - this.mdRef.current.resize() - this.mdRef.current.setValue(this.props.initValue) - }) - this.props.toMDMode(this) - } - toShowMode = () => { - this.setState({mdMode: false}) - this.props.toShowMode && this.props.toShowMode(this) - } - onCMBlur = () => { - this.toShowMode() - } - onChange = (val) => { - // this.setState({ value: val }) - this.props.onChange(val) - if (this.state.showError == true) { - this.setState({showError: false}) - } - } - showError = () => { - this.mdRef.current.showError() - this.setState({showError: true}) - } - render(){ - const { mdMode, showError } = this.state; - const { initValue } = this.props; - let _style = {} - if (showError) { - _style.border = '1px solid red' - } - _style = Object.assign(_style, {display: mdMode == true ? 'none' : '', color: initValue? '': '#999', alignItems: 'center', wordBreak: 'break-all'}) - return( - - -
- -
- {/* - onCMBlur={this.onCMBlur} */} - -
- ) - } -} +import React,{ Component } from "react"; +import TPMMDEditor from '../../../modules/tpm/challengesnew/TPMMDEditor' +import {markdownToHTML} from 'educoder' +import './DMDEditor.css' +// 需要父组件通过toShowMode、toMDMode 来控制,一次只能打开一个DMDEditor +class DMDEditor extends Component{ + constructor(props){ + super(props); + this.mdRef = React.createRef() + this.state={ + mdMode: false, + // value: this.props.initValue + } + } + componentDidUpdate(prevProps, prevState) { + + } + componentDidMount() { + // if(this.props.initValue != this.mdRef.current.getValue()) { + // this.mdRef.current.setValue(this.props.initValue) + // } + } + + + toMDMode = () => { + this.setState({mdMode: true}, () => { + this.mdRef.current.resize() + this.mdRef.current.setValue(this.props.initValue) + }) + this.props.toMDMode(this) + } + toShowMode = () => { + this.setState({mdMode: false}) + this.props.toShowMode && this.props.toShowMode(this) + } + onCMBlur = () => { + this.toShowMode() + } + onChange = (val) => { + // this.setState({ value: val }) + this.props.onChange(val) + if (this.state.showError == true) { + this.setState({showError: false}) + } + } + showError = () => { + this.mdRef.current.showError() + this.setState({showError: true}) + } + render(){ + const { mdMode, showError } = this.state; + const { initValue } = this.props; + let _style = {} + if (showError) { + _style.border = '1px solid red' + } + _style = Object.assign(_style, {display: mdMode == true ? 'none' : '', color: initValue? '': '#999', alignItems: 'center', wordBreak: 'break-all'}) + return( + + +
+ +
+ {/* + onCMBlur={this.onCMBlur} */} + +
+ ) + } +} export default DMDEditor; \ No newline at end of file diff --git a/public/react/src/modules/courses/Resource/Fileslistitem.js b/public/react/src/modules/courses/Resource/Fileslistitem.js index 8a8ff674c..c3998700f 100644 --- a/public/react/src/modules/courses/Resource/Fileslistitem.js +++ b/public/react/src/modules/courses/Resource/Fileslistitem.js @@ -6,7 +6,6 @@ import {getImageUrl} from 'educoder'; import axios from 'axios' import {getUrl} from 'educoder'; import moment from 'moment' -import { Base64 } from 'js-base64'; import CoursesListType from '../coursesPublic/CoursesListType'; import Showoldfiles from "../coursesPublic/Showoldfiles"; import Modals from '../../modals/Modals'; diff --git a/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js b/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js index 51b8ae98b..f2098feb0 100644 --- a/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js +++ b/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js @@ -186,7 +186,7 @@ class Exercisestatisticalresult extends Component { {item.ques_position+"."}{item.ques_type===0?"单选":item.ques_type===1?"多选":item.ques_type===2?"判断":item.ques_type===3?"填空":item.ques_type===4?"主观":item.ques_type===5?"实训":""}题
{/*Q{item.ques_position}:*/} -
+
{/**/}
diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js index 1fce4d1bb..e92fb8c74 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js @@ -293,7 +293,20 @@ class GraduationTasksSubmitedit extends Component{ funtaskstatus=(checkedValues)=>{ - let{memberslist,selectobjct}=this.state; + + let{memberslist,selectobjct,workslist}=this.state; + if(selectobjct.length>workslist.max_num){ + this.setState({ + minvalue:workslist.max_num, + setvalue:"大于", + minmaxtype:true + }) + return + }else{ + this.setState({ + minmaxtype:false + }) + } let newlist =memberslist; let newcheckedValues=checkedValues; let selects=[]; @@ -309,6 +322,7 @@ class GraduationTasksSubmitedit extends Component{ } } + this.setState({ task_status:checkedValues, selectmemberslist:selects @@ -347,12 +361,7 @@ class GraduationTasksSubmitedit extends Component{ handleSubmit=(e) => { let {fileList,selectmemberslist,workslist}=this.state; - if(fileList.length===0){ - this.setState({ - shixunsreplace:true, - }) - return - } + this.Commoninterface(fileList,selectmemberslist,workslist); // setTimeout(function () { @@ -361,6 +370,7 @@ class GraduationTasksSubmitedit extends Component{ } Commoninterface =(fileList,selectmemberslist,workslist)=>{ + let userids=[]; for(var list of selectmemberslist){ @@ -386,17 +396,16 @@ class GraduationTasksSubmitedit extends Component{ return } if(workslist.task_type===2){ - if(userids.length<2){ + if(userids.length5){ + }else if(userids.length>workslist.max_num){ this.setState({ - minvalue:5, + minvalue:workslist.max_num, setvalue:"大于", minmaxtype:true }) @@ -409,6 +418,13 @@ class GraduationTasksSubmitedit extends Component{ }) let workId=this.props.match.params.work_Id; + if(fileList.length===0){ + this.setState({ + shixunsreplace:true, + }) + return + } + let url="/graduation_works/"+workId+".json"; axios.put(url, { description:values.description, @@ -474,7 +490,7 @@ class GraduationTasksSubmitedit extends Component{ multiple: true, // https://github.com/ant-design/ant-design/issues/15505 // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 - showUploadList: false, + // showUploadList: false, action: `${getUrl()}/api/attachments.json`, onChange: this.handleChange, onRemove: this.onAttachmentRemove, @@ -628,37 +644,37 @@ class GraduationTasksSubmitedit extends Component{ ) })} - - {this.state.fileList.length===0?"":this.state.fileList.map((item,key)=>{ - return( -

- - - - - {item.name} - - - {item.response===undefined?"":bytesToSize(item.size)} - - -

- ) - })} + {/**/} + {/*{this.state.fileList.length===0?"":this.state.fileList.map((item,key)=>{*/} + {/*return(*/} + {/*

*/} + {/**/} + {/**/} + {/**/} + {/**/} + {/*{item.name}*/} + {/**/} + {/**/} + {/*{item.response===undefined?"":bytesToSize(item.size)}*/} + {/**/} + {/*this.onAttachmentRemove(item.response===undefined?"":item.response.id&&item.response.id)}>*/} + {/*

*/} + {/*)*/} + {/*})}*/} @@ -675,7 +691,7 @@ class GraduationTasksSubmitedit extends Component{ >
-
成员要求:2~5人
+
成员要求:{workslist&&workslist.min_num}~{workslist&&workslist.max_num}人
:memberslist&&memberslist.map((item,key)=>{ return(
{item.user_name}
-
{item.group_name}
-
{item.student_id}
+
{item.group_name}
+
{item.student_id}
{item.commit_status===false?已提交 :""}
) @@ -760,7 +776,7 @@ class GraduationTasksSubmitedit extends Component{ height: '30px', display: item.user_name === undefined ? "none" : "" }}> -
{item.user_name}
{item.group_name}
{item.student_id}
@@ -769,6 +785,7 @@ class GraduationTasksSubmitedit extends Component{ style={{marginTop: '-4px'}} onClick={() => this.delecttask_status(item.user_id)}>
: ""} +
) } diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js index b50b302d2..2d75a9af8 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js @@ -85,15 +85,9 @@ class GraduationTasksSubmitnew extends Component{ } handleSubmit=(e) => { - console.log("86"); + let {fileList,selectmemberslist,workslist}=this.state; - if(fileList.length === 0){ - this.setState({ - shixunsreplace:true, - }) - return - } this.Commoninterface(fileList,selectmemberslist,workslist); } @@ -280,7 +274,19 @@ class GraduationTasksSubmitnew extends Component{ funtaskstatus=(checkedValues)=>{ - let{memberslist,selectobjct}=this.state; + let{memberslist,selectobjct,workslist}=this.state; + if(selectobjct.length>workslist.max_num){ + this.setState({ + minvalue:workslist.max_num, + setvalue:"大于", + minmaxtype:true + }) + return + }else{ + this.setState({ + minmaxtype:false + }) + } let newlist =memberslist; let newcheckedValues=checkedValues; let selects=[]; @@ -382,17 +388,17 @@ class GraduationTasksSubmitnew extends Component{ } if(workslist&&workslist.task_type===2){ if(userids!=undefined){ - if(userids.length<2){ + if(userids.length5){ + }else if(userids.length>workslist.max_num){ this.setState({ - minvalue:5, + minvalue:workslist.max_num, setvalue:"大于", minmaxtype:true }) @@ -405,8 +411,16 @@ class GraduationTasksSubmitnew extends Component{ spinnings:true }) + let id=this.props.match.params.task_Id; + if(fileList.length === 0){ + this.setState({ + shixunsreplace:true, + }) + return + } +debugger let url="/graduation_tasks/"+id+"/graduation_works.json"; axios.post(url, { description:values.description, @@ -471,7 +485,7 @@ render(){ multiple: true, // https://github.com/ant-design/ant-design/issues/15505 // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 - showUploadList: false, + // showUploadList: false, action: `${getUrl()}/api/attachments.json`, onChange: this.handleChange, onRemove: this.onAttachmentRemove, @@ -593,37 +607,37 @@ render(){ (单个文件150M以内) - - {this.state.fileList.length===0?"":this.state.fileList.map((item,key)=>{ - return( -

- - - - - {item.name} - - - {item.response===undefined?"":bytesToSize(item.size)} - - -

- ) - })} + {/**/} + {/*{this.state.fileList.length===0?"":this.state.fileList.map((item,key)=>{*/} + {/*return(*/} + {/*

*/} + {/**/} + {/**/} + {/**/} + {/**/} + {/*{item.name}*/} + {/**/} + {/**/} + {/*{item.response===undefined?"":bytesToSize(item.size)}*/} + {/**/} + {/*this.onAttachmentRemove(item.response===undefined?"":item.response.id&&item.response.id)}>*/} + {/*

*/} + {/*)*/} + {/*})}*/} @@ -638,7 +652,7 @@ render(){ >
-
成员要求:2~5人
+
成员要求:{workslist&&workslist.min_num}~{workslist&&workslist.max_num}人
this.onSearchKeywordKeyUp(e)} onkeydown={(e)=>this.onSearchKeywordKeyUps(e)}/> diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js index ba80918dc..e01dfbb68 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js @@ -7,15 +7,9 @@ import axios from 'axios'; import Modals from '../../../modals/Modals'; import DownloadMessage from '../../../modals/DownloadMessage'; import CoursesListType from '../../coursesPublic/CoursesListType'; -import PublishModals from "../../coursesPublic/PublishModals"; import HomeworkModal from "../../coursesPublic/HomeworkModal"; import moment from 'moment'; const { Option} = Select; -const CheckboxGroup = Checkbox.Group; -const confirm = Modal.confirm; -let GraduationTasksnewtype=true; -// const $ = window.$; -const Search = Input.Search; const RadioGroup = Radio.Group; function range(start, end) { diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js index 7c1a1474a..abe4c0804 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js @@ -376,7 +376,7 @@ class GraduationTasksquestions extends Component{ width: '100%', border: '1px solid transparent' }}> -
+
:"" } diff --git a/public/react/src/modules/courses/members/CourseGroupChooser.js b/public/react/src/modules/courses/members/CourseGroupChooser.js new file mode 100644 index 000000000..7974b70dd --- /dev/null +++ b/public/react/src/modules/courses/members/CourseGroupChooser.js @@ -0,0 +1,80 @@ +import React, { useState, useEffect } from 'react' +import { trigger } from 'educoder' +import { Input, Checkbox } from "antd"; + +function CourseGroupChooser({ course_groups, isAdminOrCreator, item, index, arg_course_groups, checkAllValue + , coursesids, onCheckAllChange, joinCourseGroup }) { + const [state, setState] = useState({counter: 0}) + const [search, setSearch] = useState('') + // useEffect(() => { + // console.log(' cdm') + // return () => { + // console.log(' cwum') + // }; + // // , [state.counter] 加了这个后,onClick就消失了 加错位置了? + // }, [state.counter] ) + // TODO 为什么每次onClick都会执行 cwum + + // const add1ToCounter = () => { + // const newCounterValue = state.counter + 1 + // setState({ counter: newCounterValue }) + // } + + /** + that.state.groupSearchValue + that.setState({groupSearchValue: e.target.value}) + + that.onCheckAllChange(e, item, index) - onCheckAllChange(e, item, index) + that.joinCourseGroup(checkedValues, item, index) - joinCourseGroup(checkedValues, item, index) + + that.state.checkAllArray[index] - checkAllValue + */ + + return ( +
    + { + course_groups && course_groups.length > 10? + (

    + {setSearch(e.target.value)}} allowClear/> +

    ): + '' + } + + joinCourseGroup(checkedValues, item, index)} + value={arg_course_groups.map(item => item.id)} + disabled={!isAdminOrCreator} className="mainGroup" + > + {course_groups && course_groups.length > 1 &&
  • + {/* 防止被外面group包裹 */} + + onCheckAllChange(e, item, index)} onChange={() => {}} + >全选 + +
  • } + { + course_groups && course_groups.filter((item) => { + return (!search || item.name.indexOf(search) != -1) + }).map((item,key)=>{ + return( +
  • + + {item.name} +
  • + ) + }) + } + +
    +

    + trigger('groupAdd', coursesids)} + >添加分班... +

    +
+ ) +} +export default CourseGroupChooser \ No newline at end of file diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js index 2c5108f8d..95d5148c9 100644 --- a/public/react/src/modules/courses/members/teacherList.js +++ b/public/react/src/modules/courses/members/teacherList.js @@ -1,5 +1,5 @@ import React,{ Component } from "react"; -import { Input,Checkbox,Table, Divider, Tooltip,Spin } from "antd"; +import { Input,Checkbox,Table, Divider, Tooltip,Spin, Menu } from "antd"; import CourseLayoutcomponent from '../common/CourseLayoutComponent' @@ -21,24 +21,29 @@ import { from } from "array-flatten"; import AddGraduationGroupModal from './modal/AddGraduationGroupModal' import AddAdminModal from './modal/AddAdminModal' import { ROLE_TEACHER_NUM, ROLE_ASSISTANT_NUM } from './common' +import CourseGroupChooser from './CourseGroupChooser' const Search = Input.Search; const ROLE_ADMIN = "管理员" const ROLE_TEACHER = "教师" const ROLE_TEACHER_ASSISTANT = "助教" const pageSize = 20; + function buildColumns(that) { + let sortedInfo = that.state.sortedInfo || {} const isAdmin = that.props.isAdmin() const isAdminOrCreator = that.props.isAdminOrCreator(); const isAdminOrTeacher = that.props.isAdminOrTeacher() - const { course_groups } = that.state + const { course_groups, filterKey } = that.state + const showSorter = filterKey == '1' const columns = [{ title: '序号', dataIndex: 'name', key: 'index', render: (content, item, index) => { - return item.isApply == true ? '' : {(that.state.page - 1) * 20 + index + 1 - - (that.state.application_list ? that.state.application_list.length : 0)}  + return index + 1 + // return item.isApply == true ? '' : {(that.state.page - 1) * 20 + index + 1 + // - (that.state.application_list ? that.state.application_list.length : 0)}  } } // ,{ @@ -55,6 +60,8 @@ function buildColumns(that) { dataIndex: 'name', width: 120, key: 'name', + sorter: showSorter, + sortOrder: sortedInfo.columnKey === 'name' && sortedInfo.order, render: (name, record) => { return 4 ? name : ''}`}>{name} @@ -63,6 +70,11 @@ function buildColumns(that) { title: '角色', dataIndex: 'role', key: 'role', + sorter: showSorter, + // 'ascend' | 'descend' + defaultSortOrder: 'ascend', + sortOrder: sortedInfo.columnKey === 'role' && sortedInfo.order, + }] that.state.course_groups && that.state.course_groups.length && columns.push({ title: 管理权限, @@ -84,49 +96,13 @@ function buildColumns(that) { { isAdmin && - {!noGroups &&
    - { - course_groups && course_groups.length > 10? - (

    - {that.setState({groupSearchValue: e.target.value})}} allowClear/> -

    ): - '' - } - {course_groups && course_groups.length > 1 &&
  • - {/* 防止被外面group包裹 */} - - that.onCheckAllChange(e, item, index)} onChange={() => {}} - >全选 - -
  • } - that.joinCourseGroup(checkedValues, item, index)} - value={arg_course_groups.map(item => item.id)} - disabled={!isAdminOrCreator} - > - - { - course_groups && course_groups.filter((item) => { - return (!that.state.groupSearchValue || item.name.indexOf(that.state.groupSearchValue) != -1) - }).map((item,key)=>{ - return( -
  • - - {item.name} -
  • - ) - }) - } -

    - trigger('groupAdd', that.props.coursesids)} - >添加分班... -

    -
    -
} + {!noGroups && }
} ) @@ -138,8 +114,11 @@ function buildColumns(that) { columns.push({ title: '答辩组', // width: 90, + sorter: showSorter, key: 'graduation_group', dataIndex: 'graduation_group', + sortOrder: sortedInfo.columnKey === 'graduation_group' && sortedInfo.order, + render: text => ( {text} @@ -200,6 +179,7 @@ class studentsList extends Component{ this.state={ headIndex:"1", page:1, + sortedInfo: { columnKey: 'role', order: 'ascend'}, totalPage:undefined, searchValue:"", order: ORDER_BY_DATE, @@ -209,7 +189,8 @@ class studentsList extends Component{ checkBoxValues: [], isSpin:false, application_list: [], - checkAllArray: [] + checkAllArray: [], + filterKey: 1, // 1 已审批 2 待审批 } } onCheckAllChange = (e, item, index) => { @@ -312,7 +293,7 @@ class studentsList extends Component{ }); } joinCourseGroup = (ids, item, index) => { - console.log('join ', ids, item) + // console.log('join ', ids, item) const courseId = this.props.match.params.coursesId @@ -339,7 +320,7 @@ class studentsList extends Component{ console.log(error); }); } - fetchAll=(argPage)=>{ + fetchAll = async (argPage) => { this.setState({ isSpin:true }) @@ -347,28 +328,57 @@ class studentsList extends Component{ if (argPage) { this.setState({ page: argPage }) } + + const sortedInfo = this.state.sortedInfo; let page = argPage || this.state.page - let { order, searchValue }=this.state - let url=`/courses/${id}/teachers.json?order=${order}&page=${page}`; + let { searchValue, filterKey }=this.state + let order = 1; + if (sortedInfo.columnKey == 'role') { + order = 1; + } else if (sortedInfo.columnKey == 'name') { + order = 2; + } else if (sortedInfo.columnKey == 'graduation_group') { + order = 3; + } + let sort = 'desc' + if (sortedInfo.order == 'ascend') { + sort = 'asc' + } + let url=`/courses/${id}/teachers.json?order=${order}&page=${page}&sort=${sort}`; + if (filterKey == '1') { + + } else if (filterKey == '2') { + url = `/courses/${id}/apply_teachers.json?_a=1` + } if(searchValue!=""){ url+='&search='+searchValue; } - axios.get((url)).then((result)=>{ + const result = await axios.get(url) + // axios.get((url)).then((result)=>{ if (result.data.teacher_list) { this.setState({ teachers: result.data.teacher_list, total_count: result.data.teacher_list_size, - application_list: result.data.application_list, + application_list: result.data.application_list || [], is_admin: result.data.is_admin, + apply_size: result.data.apply_size, + isSpin:false + }) + } else if (result.data.application_list) { + this.setState({ + total_count: result.data.teacher_list_size, + application_list: result.data.application_list || [], + is_admin: result.data.is_admin, + apply_size: result.data.apply_size, isSpin:false }) } - }).catch((error)=>{ - console.log(error); - this.setState({ - isSpin:false - }) - }) + // }).catch((error)=>{ + // console.log(error); + // this.setState({ + // isSpin:false + // }) + // }) } getGroupList(){ let id = this.props.match.params.coursesId @@ -529,13 +539,33 @@ class studentsList extends Component{ }) return result && result.length > 0 } - + onTableChange = (pagination, filters, sorter) => { + console.log('Various parameters', pagination, filters, sorter); + this.setState({ + sortedInfo: sorter, + }, () => { + this.fetchAll() + }); + }; + clearSelection = () => { + this.setState({ checkBoxValues: [] }) + } + selectedStatus=(e)=>{ + this.clearSelection() + this.setState({ + filterKey: e.key, + page:1, + isSpin:true + }, () => { + this.fetchAll(); + }) + } render(){ const isAdmin = this.props.isAdmin() const columns = buildColumns(this) let { searchValue, checkBoxValues, checkAllValue, - groupList, total_count, teachers, order, page + groupList, total_count, teachers, order, page, apply_size, filterKey }=this.state let currentOrderName = '加入时间排序' @@ -544,12 +574,13 @@ class studentsList extends Component{ } else if (order == ORDER_BY_GRADUATION_GROUP) { currentOrderName = '答辩组排序' } - const combineArray = teachers.slice(0) - if (page == 1) { - this.state.application_list && this.state.application_list.slice(0).reverse().forEach(item => { - item.isApply = true - combineArray.unshift(item) - }) + let combineArray = teachers.slice(0) + if (page == 1 && filterKey == '2') { + // this.state.application_list && this.state.application_list.slice(0).reverse().forEach(item => { + // item.isApply = true + // combineArray.unshift(item) + // }) + combineArray = this.state.application_list } const isAdminOrTeacher = this.props.isAdminOrTeacher() const hasGraduationModule = this.hasGraduationModule() @@ -585,21 +616,39 @@ class studentsList extends Component{ } secondRowLeft={ - total_count ? : '' + isAdminOrTeacher ?
+ + 已审批({total_count}) + 待审批({apply_size}) + +
: + (total_count ? : '') } onPressEnter={this.onPressEnter} >
-
+ {filterKey == '1' &&
{ isAdminOrTeacher && hasGraduationModule && 已选 {checkBoxValues.length} 个 } - {
+ { filterKey == '1' &&
{ hasGraduationModule && isAdminOrTeacher &&
  • 加入答辩组
      @@ -627,22 +676,23 @@ class studentsList extends Component{

  • } -
  • + {/*
  • {currentOrderName}
    • this.onSortTypeChange(ORDER_BY_NAME)} >姓名排序
    • this.onSortTypeChange(ORDER_BY_DATE)} style={{width: '125px'}}>加入时间排序
    • {this.hasGraduationModule() &&
    • this.onSortTypeChange(ORDER_BY_GRADUATION_GROUP)} >答辩组排序
    • }
    -
  • + */}
    } -
    +
    }
    {/* pagination={{ current: page, total: total_count, pageSize:20, onChange: this.onPageChange }} */} 20 ? { //分页 + onChange={this.onTableChange} + pagination={total_count > 20 && filterKey == '1' ? { //分页 total: page == 1 && this.state.application_list.length ? total_count + total_count / Math.floor(this.state.application_list.length + 20) : total_count , //数据总数量 pageSize: page == 1 && this.state.application_list.length ? this.state.application_list.length + 20 : 20, //显示几条一页 current: page, diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js index 63143c59a..de0a5bbeb 100644 --- a/public/react/src/modules/courses/poll/PollNew.js +++ b/public/react/src/modules/courses/poll/PollNew.js @@ -10,7 +10,6 @@ import axios from 'axios' import moment from "../new/CoursesNew"; import Modals from "../../modals/Modals"; - const TextArea = Input.TextArea const RadioGroup = Radio.Group const CheckboxGroup = Checkbox.Group @@ -64,6 +63,8 @@ class PollNew extends Component { problemtopicbool: false, newoption: false, cancellation: false, + bindingid:undefined, + Newdisplay:false, } // console.log("试卷新建和编辑"); // console.log(JSON.stringify(props)); @@ -312,7 +313,9 @@ class PollNew extends Component { newoption: false }) } - + this.setState({ + Newdisplay:true, + }) var Insertposition = this.state.poll_questions.length; // console.log(JSON.stringify(this.state.poll_questions)); for (var i = 0; i < this.state.poll_questions.length; i++) { @@ -333,7 +336,9 @@ class PollNew extends Component { newoption: false }) } - + this.setState({ + Newdisplay:true, + }) var Insertposition = this.state.poll_questions.length; // console.log(JSON.stringify(this.state.poll_questions)); for (var i = 0; i < this.state.poll_questions.length; i++) { @@ -350,7 +355,9 @@ class PollNew extends Component { //添加主观题目 addmymainsint = () => { - + this.setState({ + Newdisplay:true, + }) var Insertposition = this.state.poll_questions.length; // console.log(JSON.stringify(this.state.poll_questions)); for (var i = 0; i < this.state.poll_questions.length; i++) { @@ -376,8 +383,9 @@ class PollNew extends Component { var anserbool = false; this.setState({ q_countst: 1, + bindingid:object.question.id }) - window.scrollTo(0, this.refs.targetElement.offsetTop) + // window.scrollTo(0, this.refs.targetElement.offsetTops) let {adddom} = this.state; // var arr =new Object(objects); // console.log(arr) @@ -523,7 +531,8 @@ class PollNew extends Component { // console.log(pollid) // console.log(Insertposition) // console.log(Whether) - // console.log(id) + console.log("addMytopic"); + console.log(id); if (this.state.q_countst > 0) { this.props.showNotification(`不能同时编辑两题`); @@ -538,7 +547,7 @@ class PollNew extends Component { Insertposition: Insertposition, q_countst: 1, }) - window.scrollTo(0, this.refs.targetElement.offsetTop) + // window.scrollTo(0, this.refs.targetElement.offsetTop) var arrr = this.state.adddom; let newarrr = [...arrr]; @@ -552,12 +561,13 @@ class PollNew extends Component { var question = {} var questiontwo = { // "id": this.state.poll_questions[arr.length - 1].question.id + 1 + arrr.length, - "id": this.state.poll_questions[newarr.length - 1].question.id + 1, + "id": Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id, "is_necessary": 1, "question_number": 1, "question_title": "", "question_type": 1, "new": "new", + "newid":Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id + 1, "answers": [ {"answer_id": 1, "answer_position": 1, "answer_text": ""}, {"answer_id": 2, "answer_position": 2, "answer_text": ""}, @@ -579,7 +589,7 @@ class PollNew extends Component { //插入多选题 var question = {} var questiontwo = { - "id": this.state.poll_questions[newarr.length - 1].question.id + 1, + "id": Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id, "is_necessary": 1, "question_number": 2, "question_title": "", @@ -587,6 +597,7 @@ class PollNew extends Component { "max_choices": 0, "min_choices": 0, "new": "new", + "newid":Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id + 1, "answers": [ {"answer_id": 1, "answer_position": 1, "answer_text": ""}, {"answer_id": 2, "answer_position": 2, "answer_text": ""}, @@ -609,12 +620,13 @@ class PollNew extends Component { // console.log(this.state.poll_questions[newarr.length - 1].question.id); var question = {} var questiontwo = { - "id": this.state.poll_questions[newarr.length - 1].question.id + 1, + "id": Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id, "is_necessary": 1, "question_number": 3, "question_title": "", "question_type": 3, "new": "new", + "newid":Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id + 1, "answers": [] }; question = {"question": questiontwo}; @@ -630,20 +642,21 @@ class PollNew extends Component { /////上面视图全部删除后 要加载的 if (index === 1) { // 插入单选题 - var id; + var ids; try { - id = this.state.poll_questions[newarr.length - 1].question.id + 1 + ids = this.state.poll_questions[newarr.length - 1].question.id; } catch (e) { - id = 1; + ids= 1; } var questiontwo = { // "id": this.state.poll_questions[arr.length - 1].question.id + 1 + arrr.length, - "id": id, + "id": Whether=== true? id :ids, "is_necessary": 1, "question_number": 1, "question_title": "", "question_type": 1, "new": "new", + "newid":Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id + 1, "answers": [ {"answer_id": 1, "answer_position": 1, "answer_text": ""}, {"answer_id": 2, "answer_position": 2, "answer_text": ""}, @@ -663,14 +676,14 @@ class PollNew extends Component { } else if (index === 2) { //插入多选题 - var id; + var ids; try { - id = this.state.poll_questions[newarr.length - 1].question.id + 1 + ids = this.state.poll_questions[newarr.length - 1].question.id; } catch (e) { - id = 1; + ids = 1; } var questiontwo = { - "id": id, + "id": Whether=== true? id :ids, "is_necessary": 1, "question_number": 2, "question_title": "", @@ -678,6 +691,7 @@ class PollNew extends Component { "max_choices": 0, "min_choices": 0, "new": "new", + "newid":Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id + 1, "answers": [ {"answer_id": 1, "answer_position": 1, "answer_text": ""}, {"answer_id": 2, "answer_position": 2, "answer_text": ""}, @@ -697,19 +711,20 @@ class PollNew extends Component { } else if (index === 3) { //插入主观题 - var id; + var ids; try { - id = this.state.poll_questions[newarr.length - 1].question.id + 1 + ids= this.state.poll_questions[newarr.length - 1].question.id; } catch (e) { - id = 1; + ids = 1; } var questiontwo = { - "id": id, + "id":Whether=== true? id : ids, "is_necessary": 1, "question_number": 3, "question_title": "", "question_type": 3, "new": "new", + "newid":Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id + 1, "answers": [] }; question = {"question": questiontwo}; @@ -724,26 +739,51 @@ class PollNew extends Component { } //删除指定条目 - deleteadddom = (indexo) => { + Deleteadddom = (indexo,bool) => { // console.log("deleteadddom 259") + var arr = this.state.adddom; let newarr = [...arr]; - newarr.splice(indexo, 1); - this.setState({ - adddom: newarr, - q_countst: 0, - problemtopic: null, - problemtopicbool: false, - }) + if(bool === true) { + this.setState({ + adddom: newarr, + q_countst: 0, + problemtopic: null, + problemtopicbool: false, + bindingid:undefined, + Newdisplay:false, + }) + + }else{ + this.setState({ + adddom: newarr, + q_countst: 0, + problemtopic: null, + problemtopicbool: false, + Newdisplay:false, + }) + } + } //保存并继续 //保存并继续,即提交本题的新建并继续创建一个相同的题(该新题处于编辑模式,题目和选项不要清空) - deleteadddomtwo = (indexo, object) => { + Deleteadddomtwo = (indexo, object,bool) => { var thiss = this; - this.setState({ - q_countst: 1, - }) + if(bool === true){ + this.setState({ + q_countst: 1, + bindingid:undefined, + Newdisplay:false, + + }) + }else { + this.setState({ + q_countst: 1, + Newdisplay:false, + }) + } + var poll_questionslength = this.state.poll_questions.length; // console.log("deleteadddomtwo|||||||||||||||||||||||||||||||||||||||||\\"); // console.log(indexo); @@ -1230,7 +1270,15 @@ class PollNew extends Component { //保存,即完成新建并退出本题编辑 // indexo 第几个数组 //object 单个数组数据 - deleteadddomthree = (indexo, object) => { + Deleteadddomthree = (indexo, object,bool) => { + if(bool === true) { + this.setState({ + bindingid:undefined, + }) + } + this.setState({ + Newdisplay:false, + }) // console.log("deleteadddom 349") var thiss = this; let arr = this.state.adddom; @@ -1648,7 +1696,7 @@ class PollNew extends Component { q_countst: 0, }) } - this.deleteadddom(indexo); + this.Deleteadddom(indexo); // console.log(indexo) } @@ -1814,7 +1862,7 @@ class PollNew extends Component { //删除编辑新增条目 //id 条目的唯一id //i 为要删除的子条目 - deleteentrys = (id, i, stirngname) => { + Deleteentrys = (id, i, stirngname) => { // console.log(id) // console.log(stirngname); var arrtwoy = this.state.adddom; @@ -1851,7 +1899,7 @@ class PollNew extends Component { // 新增选项 - ewoption = (id, object) => { + Ewoption = (id, object) => { // console.log("ewoption 440") // console.log("是否是新建题目还是编辑") // console.log(object.question.new) @@ -1913,7 +1961,7 @@ class PollNew extends Component { } //新增其他选项 - addanotheroption = (id) => { + Addanotheroption = (id) => { // console.log("addanotheroption 457") let arrtwo = this.state.adddom; let newarrtwo = [...arrtwo]; @@ -1989,7 +2037,10 @@ class PollNew extends Component { //e为获取组件对象 //i外层数组 //k为内层数组 - handleInputChanges = (e, i, k) => { + HandleInputChanges = (e, i, k) => { + console.log("handleInputChanges"+" "+e); + console.log("handleInputChanges"+" "+i); + console.log("handleInputChanges"+" "+k); // console.log("handleInputChanges 612") let value = e.target.value;//取到input的数据 @@ -2006,7 +2057,7 @@ class PollNew extends Component { } //标题输入监听 - handleInputTopic = (e, i) => { + HandleInputTopic = (e, i) => { // console.log("handleInputTopic 633") let value = e.target.value;//取到input的数据 @@ -2021,7 +2072,7 @@ class PollNew extends Component { } //最小值 - handleGradationGroupChangee = (value, index, max, length) => { + HandleGradationGroupChangee = (value, index, max, length) => { debugger var minbool = false; @@ -2058,7 +2109,7 @@ class PollNew extends Component { } //最大值 - handleGradationGroupChangeee = (value, index) => { + HandleGradationGroupChangeee = (value, index) => { let arr = this.state.adddom; for (var i = 0; i < arr.length; i++) { @@ -2151,7 +2202,7 @@ class PollNew extends Component { } //必答选项 - onCheckAllChange = (e, index) => { + OnCheckAllChange = (e, index) => { // console.log("onCheckAllChange"); // console.log(e.target.checked); // console.log(e.target.value); @@ -2479,10 +2530,11 @@ class PollNew extends Component { {/*自动生成修改好的获取到的*/} {/**************************************************************************/} {this.state.poll_questions === undefined ? "" : this.state.poll_questions.map((item, index) => { - // console.log('打印this.state.poll_questions') - // console.log(item.question) + console.log('打印this.state.poll_questions'); + console.log(this.state.poll_questions); + console.log(this.state.adddom); let resultDom; - resultDom =
    + resultDom =

    第{index + 1}题: {item.question.question_title}

    {/*
    {item.question.question_title}
    */} {item.question.question_type === 1 ? - ( +
    + {item.question.answers === undefined ? "" : item.question.answers.map((items, i) => { return (
    - {/*
    {items.answer_text}
    */} - {/*
    {items.answer_text}
    */} {items.answer_text}
    ) })} -
    ) + + {/*单选题*/} + + +
    : item.question.question_type === 2 ? - ( +
    + {item.question.answers === undefined ? "" : item.question.answers.map((items, i) => { return (
    {items.answer_text} - - {/*{items.answer_text}*/}
    ) })} -
    ) - : item.question.question_type === 3 ? (
    ) : (
    )} + + {/*多选题*/} +
    + + : item.question.question_type === 3 ? + // 主观题 + (
    +
    ) : (
    )}
    return (
    - {resultDom} -
    - ) - })} - {/**************************************************************************/} - {/*编辑用的新增用的*/} - {/**************************************************************************/} - - {this.state.adddom === undefined ? "" : this.state.adddom.map((itemo, indexo) => { - // console.log('打印this.state.adddom') - // console.log(this.state.adddom); - let arrid = itemo.question.id; - let resultDomtwo; - resultDomtwo = -
    + {/*这里是编辑和新增的地方*/} + { + this.state.bindingid && this.state.bindingid===item.question.id? + (this.state.Newdisplay === false? +
    +
    + {this.state.adddom === undefined ? "" :this.state.adddom===undefined?"": this.state.adddom.length===0?"":item.question.id === this.state.adddom[0].question.id&&this.state.adddom.map((itemo, indexo) => { + let arrid = itemo.question.id; + let resultDomtwo; + resultDomtwo = +
    {itemo.question.question_type === 1 ? "单选题" : itemo.question.question_type === 2 ? "多选题" : "主观题"} this.onCheckAllChange(e, indexo)} + onChange={(e) => this.OnCheckAllChange(e, indexo)} className="lineh-40" style={{"marginLeft": "20px"}}>必答 - - - {itemo.question.answers === undefined ? "" : itemo.question.answers.map((itemt, indext) => { - return ( -
    - {itemt.answer_text === undefined ? ( -
    ) : itemt.answer_text === "其他" ? ( -

    + + + {itemo.question.answers === undefined ? "" : itemo.question.answers.map((itemt, indext) => { + return ( +

    + {itemt.answer_text === undefined ? ( +
    ) : itemt.answer_text === "其他" ? ( +

    其它 - - {polls_status === undefined || polls_status === 1 ? - this.deleteentrys(arrid, indext, true)}> - : ""} -

    ) : (

    + + {this.state.polls_status === undefined || this.state.polls_status === 1 ? + this.Deleteentrys(arrid, indext, true)}> + : ""} +

    ) : (

    选项 - - {polls_status === undefined || polls_status === 1 ? - this.deleteentrys(arrid, indext, false)}> - : ""} -

    )} -
    - ) - })} + + {this.state.polls_status === undefined || this.state.polls_status === 1 ? + this.Deleteentrys(arrid, indext, false)}> + : ""} +

    )} +
    + ) + })} + +
    + {itemo.question.question_type === 1 ? ( +
    +
    + {this.state.polls_status === undefined || this.state.polls_status === 1 ? + this.Ewoption(itemo.question.id, itemo)}>新增选项 + + : ""} + {this.state.polls_status === undefined || this.state.polls_status === 1 ? + + (this.state.newoption === false ? + this.Addanotheroption(itemo.question.id)}>新增其他选项 + : "") + : ""} + + this.Deleteadddom(indexo,true)}>取消 + this.Deleteadddomthree(indexo, itemo,true)}>保存 + this.Deleteadddomtwo(indexo, itemo,true)}>保存并继续 + +
    +
    -
    - {itemo.question.question_type === 1 ? ( -
    -
    - {polls_status === undefined || polls_status === 1 ? - this.ewoption(itemo.question.id, itemo)}>新增选项 - - : ""} - {polls_status === undefined || polls_status === 1 ? - - (newoption === false ? - this.addanotheroption(itemo.question.id)}>新增其他选项 - : "") - : ""} + + ) + + + : itemo.question.question_type === 2 ? ( + //////////////////////////////////////////// 可选 +
    +
    +
    + 可选 +
    + {/*可选最小*/} + + + ~ + {/*可选最大*/} + + + (学生答题时,系统对其选择的选项个数进行限制,--表示不限制) +
    + +
    +
    +
    + ) + + : (
    ) + + } +
    +
    + {itemo.question.question_type === 2 ? + ( + this.state.polls_status === undefined || this.state.polls_status === 1 ? +
    + +
    this.Ewoption(itemo.question.id, itemo)}>新增选项 + + { + this.state.newoption === false ? this.Addanotheroption(itemo.question.id)}>新增其他选项 : "" + } + +
    + + + + this.Deleteadddom(indexo,true)}>取消 + this.Deleteadddomthree(indexo, itemo,true)}>保存 + this.Deleteadddomtwo(indexo, itemo,true)}>保存并继续 + +
    + + + : +
    + this.Deleteadddom(indexo,true)}>取消 + this.Deleteadddomthree(indexo, itemo,true)}>保存 + this.Deleteadddomtwo(indexo, itemo,true)}>保存并继续 + +
    + ) + + : itemo.question.question_type === 3 ? +
    + this.deleteadddom(indexo)}>取消 + onClick={() => this.Deleteadddom(indexo,true)}>取消 this.deleteadddomthree(indexo, itemo)}>保存 + onClick={() => this.Deleteadddomthree(indexo, itemo,true)}>保存 this.deleteadddomtwo(indexo, itemo)}>保存并继续 + onClick={() => this.Deleteadddomtwo(indexo, itemo,true)}>保存并继续 -
    -
    +
    + : + ""} - ) +
    +
    - : itemo.question.question_type === 2 ? ( - //////////////////////////////////////////// 可选 -
    -
    -
    + return ( +
    + {resultDomtwo} +
    + ) + })} +
    +
    :"") + : +
    + {resultDom} + {this.state.Newdisplay === false? + +
    + {this.state.adddom === undefined ? "" :this.state.adddom===undefined?"": this.state.adddom.length===0?"":item.question.id === this.state.adddom[0].question.id&&this.state.adddom.map((itemo, indexo) => { + let arrid = itemo.question.id; + let resultDomtwo; + resultDomtwo = +
    + {itemo.question.question_type === 1 ? "单选题" : itemo.question.question_type === 2 ? "多选题" : "主观题"} + this.OnCheckAllChange(e, indexo)} + className="lineh-40" + style={{"marginLeft": "20px"}}>必答 + + + + + {itemo.question.answers === undefined ? "" : itemo.question.answers.map((itemt, indext) => { + return ( +
    + {itemt.answer_text === undefined ? ( +
    ) : itemt.answer_text === "其他" ? ( +

    + 其它 + + + {this.state.polls_status === undefined || this.state.polls_status === 1 ? + this.Deleteentrys(arrid, indext, true)}> + : ""} +

    ) : (

    + 选项 + + + {this.state.polls_status === undefined || this.state.polls_status === 1 ? + this.Deleteentrys(arrid, indext, false)}> + : ""} +

    )} +
    + ) + })} + +
    + {itemo.question.question_type === 1 ? ( +
    +
    + {this.state.polls_status === undefined || this.state.polls_status === 1 ? + this.Ewoption(itemo.question.id, itemo)}>新增选项 + + : ""} + {this.state.polls_status === undefined || this.state.polls_status === 1 ? + + (this.state.newoption === false ? + this.Addanotheroption(itemo.question.id)}>新增其他选项 + : "") + : ""} + + this.Deleteadddom(indexo,true)}>取消 + this.Deleteadddomthree(indexo, itemo,true)}>保存 + this.Deleteadddomtwo(indexo, itemo,true)}>保存并继续 + +
    +
    + + + ) + + + : itemo.question.question_type === 2 ? ( + //////////////////////////////////////////// 可选 +
    +
    +
    可选 -
    - {/*可选最小*/} - - this.HandleGradationGroupChangee(value, indexo, itemo.question.max_choices, itemo.question.answers.length)} + value={itemo.question.min_choices === 0 || itemo.question.min_choices === "0" ? "--" : itemo.question.min_choices === null ? "--" : itemo.question.min_choices === undefined ? "--" : itemo.question.min_choices} + + > + + {itemo.question.answers === undefined ? "" : itemo.question.answers.map((itemt, indext) => { + return ( + indext >= 1 ? : "" + ) + })} + + ~ + {/*可选最大*/} + + + (学生答题时,系统对其选择的选项个数进行限制,--表示不限制) +
    + +
    +
    +
    ) - })} - - ~ - {/*可选最大*/} - - - (学生答题时,系统对其选择的选项个数进行限制,--表示不限制) + : (
    ) + + } +
    +
    + {itemo.question.question_type === 2 ? + ( + this.state.polls_status === undefined || this.state.polls_status === 1 ? +
    + +
    this.Ewoption(itemo.question.id, itemo)}>新增选项 + + { + this.state.newoption === false ? this.Addanotheroption(itemo.question.id)}>新增其他选项 : "" + } + +
    + + + + this.Deleteadddom(indexo,true)}>取消 + this.Deleteadddomthree(indexo, itemo,true)}>保存 + this.Deleteadddomtwo(indexo, itemo,true)}>保存并继续 + +
    + + + : +
    + + this.Deleteadddom(indexo,true)}>取消 + this.Deleteadddomthree(indexo, itemo,true)}>保存 + this.Deleteadddomtwo(indexo, itemo,true)}>保存并继续 + +
    + ) + + : itemo.question.question_type === 3 ? +
    + + this.Deleteadddom(indexo,true)}>取消 + this.Deleteadddomthree(indexo, itemo,true)}>保存 + this.Deleteadddomtwo(indexo, itemo,true)}>保存并继续 + +
    + : + ""} + +
    +
    + + return ( +
    + {resultDomtwo}
    -
    -
    - ) + ) + })} +
    :""} +
    + } +
    + + ) + })} - : (
    ) - } -
    + + {/*新建单选多选2*/} +
    + { + this.state.Newdisplay === true?
    - {itemo.question.question_type === 2 ? - ( - polls_status === undefined || polls_status === 1 ? -
    + {this.state.adddom === undefined ? "" : this.state.adddom.map((itemo, indexo) => { + // console.log('打印this.state.adddom') + // console.log(this.state.adddom); + let arrid = itemo.question.id; + let resultDomtwo; + resultDomtwo = +
    + {itemo.question.question_type === 1 ? "单选题" : itemo.question.question_type === 2 ? "多选题" : "主观题"} + this.OnCheckAllChange(e, indexo)} + className="lineh-40" + style={{"marginLeft": "20px"}}>必答 + -
    this.ewoption(itemo.question.id, itemo)}>新增选项 + -
    + {itemo.question.answers === undefined ? "" : itemo.question.answers.map((itemt, indext) => { + return ( +
    + {itemt.answer_text === undefined ? ( +
    ) : itemt.answer_text === "其他" ? ( +

    + 其它 + + {polls_status === undefined || polls_status === 1 ? + this.Deleteentrys(arrid, indext, true)}> + : ""} +

    ) : (

    + 选项 - - this.deleteadddom(indexo)}>取消 + + {polls_status === undefined || polls_status === 1 ? + this.Deleteentrys(arrid, indext, false)}> + : ""} +

    )} +
    + ) + })} + +
    + {itemo.question.question_type === 1 ? ( +
    +
    + {polls_status === undefined || polls_status === 1 ? + this.Ewoption(itemo.question.id, itemo)}>新增选项 + + : ""} + {polls_status === undefined || polls_status === 1 ? + + (newoption === false ? + this.Addanotheroption(itemo.question.id)}>新增其他选项 + : "") + : ""} + + this.Deleteadddom(indexo)}>取消 this.deleteadddomthree(indexo, itemo)}>保存 + onClick={() => this.Deleteadddomthree(indexo, itemo)}>保存 this.deleteadddomtwo(indexo, itemo)}>保存并继续 + onClick={() => this.Deleteadddomtwo(indexo, itemo)}>保存并继续 +
    +
    + + + ) + + + : itemo.question.question_type === 2 ? ( + //////////////////////////////////////////// 可选 +
    +
    +
    + 可选 +
    + {/*可选最小*/} + + + ~ + {/*可选最大*/} + + + (学生答题时,系统对其选择的选项个数进行限制,--表示不限制) +
    + +
    +
    +
    + ) + + : (
    ) + + }
    +
    + {itemo.question.question_type === 2 ? + ( + polls_status === undefined || polls_status === 1 ? +
    + +
    this.Ewoption(itemo.question.id, itemo)}>新增选项 + + { + newoption === false ? this.Addanotheroption(itemo.question.id)}>新增其他选项 : "" + } + +
    - : -
    + + this.Deleteadddom(indexo)}>取消 + this.Deleteadddomthree(indexo, itemo)}>保存 + this.Deleteadddomtwo(indexo, itemo)}>保存并继续 + +
    + + + : +
    this.deleteadddom(indexo)}>取消 + onClick={() => this.Deleteadddom(indexo)}>取消 this.deleteadddomthree(indexo, itemo)}>保存 + onClick={() => this.Deleteadddomthree(indexo, itemo)}>保存 this.deleteadddomtwo(indexo, itemo)}>保存并继续 + onClick={() => this.Deleteadddomtwo(indexo, itemo)}>保存并继续 -
    - ) +
    + ) - : itemo.question.question_type === 3 ? -
    + : itemo.question.question_type === 3 ? +
    this.deleteadddom(indexo)}>取消 + onClick={() => this.Deleteadddom(indexo)}>取消 this.deleteadddomthree(indexo, itemo)}>保存 + onClick={() => this.Deleteadddomthree(indexo, itemo)}>保存 this.deleteadddomtwo(indexo, itemo)}>保存并继续 + onClick={() => this.Deleteadddomtwo(indexo, itemo)}>保存并继续 +
    + : + ""} + + +
    - : - ""} + return ( +
    + {resultDomtwo} +
    + ) + })}
    -
    + : + "" + } - return ( -
    - {resultDomtwo} -
    - ) - })} - {/**************************************************************************/} {polls_status === undefined || polls_status === 1 ?
    @@ -2809,7 +3362,7 @@ class PollNew extends Component { this.props.match.params.news === "new" ? this.state.Newedit === false ?
    -
    +
    this.addmysingles()}>主观题
    - : "" :
    -
    -
    - this.addmysingles()}>单选题 - this.addmydoubles()}>多选题 - this.addmymainsint()}>主观题 -
    +
    +
    + this.addmysingles()}>单选题 + this.addmydoubles()}>多选题 + this.addmymainsint()}>主观题 +
    }
    :
    }
    +
    { this.props.match.params.news === "new" ? (this.state.Newedit === false ? diff --git a/public/react/src/modules/courses/poll/pollStyle.css b/public/react/src/modules/courses/poll/pollStyle.css index ffe13eb10..27a88b95e 100644 --- a/public/react/src/modules/courses/poll/pollStyle.css +++ b/public/react/src/modules/courses/poll/pollStyle.css @@ -1,342 +1,345 @@ -/* 单选或多选 */ -.ant-form{ - color:#05101A; -} -.ant-radio-disabled + span,.ant-checkbox-disabled + span{ - color: #666!important; - cursor: default -} -.ant-radio-wrapper { - color: #666!important; -} -.ant-checkbox-wrapper + .ant-checkbox-wrapper{ - margin-left: 0px!important; -} -/* 下拉 */ -.ant-select-selection,.ant-select-selection-selected-value{ - min-height: 40px; - min-line-height: 40px; -} - -/* 选答 */ -.chooseAnswer{ - display: inline-block; - width: 68px; - text-align: center; - height: 24px; - line-height: 24px; - background: #EDEDED; - color: #666; - margin-left: 10px; - border-radius: 12px; -} - -.problemShow{ - padding:30px; - border-bottom: 1px solid #eee; -} -.problemShow:last-child{ - border-bottom: none; -} - -/* 问卷详情 */ -/* 答题列表 */ -.unlimit{ - height: 24px; - line-height: 24px; - padding:0px 10px; - border-radius: 12px; - cursor: pointer; - border:1px solid #cdcdcd; - color:#666; -} -.unlimit.active{ - background-color: #4CACFF; - border:1px solid #4CACFF; - color: #fff; -} -.edu-table thead th,.edu-table tbody tr:last-child td{ - border-bottom: none!important; -} -.edu-table tbody tr:hover td{ - background-color: #fff!important; -} -/* 统计结果 */ -.countList p.countHeader{ - background-color: #f8f8f8; - color: #666; - height: 38px; - font-size: 16px; - justify-content: center; - align-items: center; - display: -webkit-flex; -} -.countList p.countHeader ul{ - width: 100%; - padding:0px 30px -} -.countList p.countHeader span,.countList div.countBody span{ - float: left; -} -.countList div.countBody{ - margin:0px 30px; - border-bottom:1px solid #EBEBEB; - padding:12px 0px; -} -.countList div.countBody:last-child{ - border-bottom: none; -} -.countList p.countHeader span:nth-child(1),.countList div.countBody span:nth-child(1){ - width: 50%; - text-align: left; -} -.countList p.countHeader span:nth-child(2),.countList div.countBody span:nth-child(2){ - width:15%; - text-align: center; -} -.countList p.countHeader span:nth-child(3),.countList div.countBody span:nth-child(3){ - width:35%; - text-align: left; -} -.percentForm{ - width: 340px; - height: 11px; - background: #F5F5F5; - border-radius: 6px; - position: relative; - margin-top: 7px; -} -.percentValue{ - position: absolute; - top:0px; - left: 0px; - height: 11px; - background: #29BD8B; - border-radius: 6px; -} -.answerTxt{ - max-height: 500px; - background-color: #F2F9FF; - width: 100%; - margin-top: 10px; - padding:10px; - box-sizing: border-box; - color: #4c4c4c; -} -.otherTxt{ - border:none!important; - border-bottom: 1px solid #eee!important; - background: transparent!important; - flex:1; - height: 20px!important; - line-height: 20px!important; -} -.otherTxt.ant-input:hover,.otherTxt.ant-input:focus{ - border:none!important; - border-bottom: 1px solid #eee!important; - background: #F8F8F8!important; -} - -/* 必答 */ -.mustAnswer{ - padding:0px 10px; - border-radius: 15px; - height: 22px; - line-height: 22px; - background: #eaeaea; - color: #999; - font-size: 14px; -} -/* 问卷内容 */ -.previewList{ - border-bottom: 1px solid #ebebeb; -} -.previewList:last-child{ - border-bottom:none; -} -.textLine{ - flex: 1; - height:22px; - border-bottom: 1px solid #ebebeb; -} -.answerList{ - box-sizing: border-box; - width: 100%; - margin-bottom: 20px; -} -.answerList li{ - padding:10px 30px; - box-sizing: border-box; - line-height:20px; - width: 100%; -} -.answerList li:hover{ - background: #F8F8F8; -} -textarea:read-only{ - background: #f3f3f3; -} -.ant-calendar-picker-input{ - height: 40px; -} - -/* 问卷答题 */ -.questionsNo{ - position: relative; - padding: 30px; - border-bottom: 1px solid #ebebeb; -} -.questionsfixed{ - position: fixed; - padding: 30px; - z-index: 12; - top: 60px; - width: 1200px; - background: #fff; -} -.answered,.unanswer,.answerTure,.answerFalse,.answerHalf{ - position: relative; -} -.answered::after{ - position: absolute; - right:35px; - top:4px; - width: 12px; - height: 12px; - border-radius: 50%; - background: #CBCBCB; - content: ""; -} -.unanswer::after{ - position: absolute; - right:35px; - top:4px; - width: 12px; - height: 12px; - border-radius: 50%; - background: #fff; - content: ""; - border:1px solid rgba(203,203,203,1); -} -.answerTure::after{ - position: absolute; - right:35px; - top:4px; - width: 20px; - height: 10px; - border-radius: 5px; - background: #29BD8B; - content: ""; -} -.answerFalse::after{ - position: absolute; - right:35px; - top:4px; - width: 20px; - height: 10px; - border-radius: 5px; - background: #FF3756; - content: ""; -} -.color-red{color: #FF3756!important} -.answerHalf::after{ - position: absolute; - left:-25px; - top:4px; - width: 20px; - height: 10px; - border-radius: 5px; - background: #FF6800; - content: ""; -} -.leaderNav,.leaderMainNav{ - margin-top: 20px; -} -.leaderNav a,.leaderMainNav a{ - display: block; - float: left; - margin-right: 10px; - border-radius: 50%; - border:1px solid #CBCBCB; - height: 40px; - line-height: 40px; - width: 40px; - text-align: center; - color: #999999; - cursor: pointer; - margin-bottom: 5px; -} -.leaderMainNav a{ - background: #FF3756; - color: #fff; - border:1px solid #FF3756; -} -.leaderNav a.acted{ - background:rgba(203,203,203,1); - color: #fff; -} -.leaderMainNav a.acted{ - background-color: #29BD8B; - color: #fff; - border:1px solid #29BD8B; -} -.leaderMainNav a.half{ - background-color: #FF6800; - color: #fff; - border:1px solid #FF6800; -} - -/* 问卷设置 */ -.pollForm .ant-form-item-control{ - line-height: 20px; -} -.pollForm.ant-form-item{ - margin-bottom: 0px -} -.setInfo .ant-select-selection__rendered{ - line-height: 40px; -} - -/* 下拉搜索框 */ -.ant-select-dropdown-menu .ant-select-dropdown-menu-item{ - padding:5px 15px; -} -.ant-select-dropdown.ant-select-dropdown--multiple .ant-select-dropdown-menu-item .ant-select-selected-icon{ - right: 15px; -} - -.noticeTip{ - border:1px solid #FF0000; - border-radius: 5px; -} - -/* 试卷 */ -.setScoreInput{ - width: 60px!important;height: 30px!important;box-sizing: border-box; - text-align: center!important; - background: #F8F8F8; - color:#666; -} -.setScoreInput:focus{ - background: #fff; - color:#FF6800 -} -.standardAnswer p{ - line-height: 20px!important; -} -/* 倒计时 */ -.remainingTime li{ - float: left; - width: 40px; - line-height: 40px; - background-color: #111C24; - color: #fff; - border-radius: 4px; - text-align: center -} -.remainingTime span{ - float: left; - width: 20px; - line-height: 40px; - text-align: center; -} +/* 单选或多选 */ +.ant-form{ + color:#05101A; +} +.ant-radio-disabled + span,.ant-checkbox-disabled + span{ + color: #666!important; + cursor: default +} +.ant-radio-wrapper { + color: #666!important; +} +.ant-checkbox-wrapper + .ant-checkbox-wrapper{ + margin-left: 0px!important; +} +/* 下拉 */ +.ant-select-selection,.ant-select-selection-selected-value{ + min-height: 40px; + min-line-height: 40px; +} + +/* 选答 */ +.chooseAnswer{ + display: inline-block; + width: 68px; + text-align: center; + height: 24px; + line-height: 24px; + background: #EDEDED; + color: #666; + margin-left: 10px; + border-radius: 12px; +} + +.problemShow{ + padding:30px; + border-bottom: 1px solid #eee; +} +.problemShow:last-child{ + border-bottom: none; +} + +/* 问卷详情 */ +/* 答题列表 */ +.unlimit{ + height: 24px; + line-height: 24px; + padding:0px 10px; + border-radius: 12px; + cursor: pointer; + border:1px solid #cdcdcd; + color:#666; +} +.unlimit.active{ + background-color: #4CACFF; + border:1px solid #4CACFF; + color: #fff; +} +.edu-table thead th,.edu-table tbody tr:last-child td{ + border-bottom: none!important; +} +.edu-table tbody tr:hover td{ + background-color: #fff!important; +} +/* 统计结果 */ +.countList p.countHeader{ + background-color: #f8f8f8; + color: #666; + height: 38px; + font-size: 16px; + justify-content: center; + align-items: center; + display: -webkit-flex; +} +.countList p.countHeader ul{ + width: 100%; + padding:0px 30px +} +.countList p.countHeader span,.countList div.countBody span{ + float: left; +} +.countList div.countBody{ + margin:0px 30px; + border-bottom:1px solid #EBEBEB; + padding:12px 0px; +} +.countList div.countBody:last-child{ + border-bottom: none; +} +.countList p.countHeader span:nth-child(1),.countList div.countBody span:nth-child(1){ + width: 50%; + text-align: left; +} +.countList p.countHeader span:nth-child(2),.countList div.countBody span:nth-child(2){ + width:15%; + text-align: center; +} +.countList p.countHeader span:nth-child(3),.countList div.countBody span:nth-child(3){ + width:35%; + text-align: left; +} +.percentForm{ + width: 340px; + height: 11px; + background: #F5F5F5; + border-radius: 6px; + position: relative; + margin-top: 7px; +} +.percentValue{ + position: absolute; + top:0px; + left: 0px; + height: 11px; + background: #29BD8B; + border-radius: 6px; +} +.answerTxt{ + max-height: 500px; + background-color: #F2F9FF; + width: 100%; + margin-top: 10px; + padding:10px; + box-sizing: border-box; + color: #4c4c4c; +} +.otherTxt{ + border:none!important; + border-bottom: 1px solid #eee!important; + background: transparent!important; + flex:1; + height: 20px!important; + line-height: 20px!important; +} +.otherTxt.ant-input:hover,.otherTxt.ant-input:focus{ + border:none!important; + border-bottom: 1px solid #eee!important; + background: #F8F8F8!important; +} + +/* 必答 */ +.mustAnswer{ + padding:0px 10px; + border-radius: 15px; + height: 22px; + line-height: 22px; + background: #eaeaea; + color: #999; + font-size: 14px; +} +/* 问卷内容 */ +.previewList{ + border-bottom: 1px solid #ebebeb; +} +.previewList:last-child{ + border-bottom:none; +} +.textLine{ + flex: 1; + height:22px; + border-bottom: 1px solid #ebebeb; +} +.answerList{ + box-sizing: border-box; + width: 100%; + margin-bottom: 20px; +} +.answerList li{ + padding:10px 30px; + box-sizing: border-box; + line-height:20px; + width: 100%; +} +.answerList li:hover{ + background: #F8F8F8; +} +textarea:read-only{ + background: #f3f3f3; +} +.ant-calendar-picker-input{ + height: 40px; +} + +/* 问卷答题 */ +.questionsNo{ + position: relative; + padding: 30px; + border-bottom: 1px solid #ebebeb; +} +.questionsfixed{ + position: fixed; + padding: 30px; + z-index: 12; + top: 60px; + width: 1200px; + background: #fff; +} +.answered,.unanswer,.answerTure,.answerFalse,.answerHalf{ + position: relative; +} +.answered::after{ + position: absolute; + right:35px; + top:4px; + width: 12px; + height: 12px; + border-radius: 50%; + background: #CBCBCB; + content: ""; +} +.unanswer::after{ + position: absolute; + right:35px; + top:4px; + width: 12px; + height: 12px; + border-radius: 50%; + background: #fff; + content: ""; + border:1px solid rgba(203,203,203,1); +} +.answerTure::after{ + position: absolute; + right:35px; + top:4px; + width: 20px; + height: 10px; + border-radius: 5px; + background: #29BD8B; + content: ""; +} +.answerFalse::after{ + position: absolute; + right:35px; + top:4px; + width: 20px; + height: 10px; + border-radius: 5px; + background: #FF3756; + content: ""; +} +.color-red{color: #FF3756!important} +.answerHalf::after{ + position: absolute; + left:-25px; + top:4px; + width: 20px; + height: 10px; + border-radius: 5px; + background: #FF6800; + content: ""; +} +.leaderNav,.leaderMainNav{ + margin-top: 20px; +} +.leaderNav a,.leaderMainNav a{ + display: block; + float: left; + margin-right: 10px; + border-radius: 50%; + border:1px solid #CBCBCB; + height: 40px; + line-height: 40px; + width: 40px; + text-align: center; + color: #999999; + cursor: pointer; + margin-bottom: 5px; +} +.leaderMainNav a{ + background: #FF3756; + color: #fff; + border:1px solid #FF3756; +} +.leaderNav a.acted{ + background:rgba(203,203,203,1); + color: #fff; +} +.leaderMainNav a.acted{ + background-color: #29BD8B; + color: #fff; + border:1px solid #29BD8B; +} +.leaderMainNav a.half{ + background-color: #FF6800; + color: #fff; + border:1px solid #FF6800; +} + +/* 问卷设置 */ +.pollForm .ant-form-item-control{ + line-height: 20px; +} +.pollForm.ant-form-item{ + margin-bottom: 0px +} +.setInfo .ant-select-selection__rendered{ + line-height: 40px; +} + +/* 下拉搜索框 */ +.ant-select-dropdown-menu .ant-select-dropdown-menu-item{ + padding:5px 15px; +} +.ant-select-dropdown.ant-select-dropdown--multiple .ant-select-dropdown-menu-item .ant-select-selected-icon{ + right: 15px; +} + +.noticeTip{ + border:1px solid #FF0000; + border-radius: 5px; +} + +/* 试卷 */ +.setScoreInput{ + width: 60px!important;height: 30px!important;box-sizing: border-box; + text-align: center!important; + background: #F8F8F8; + color:#666; +} +.setScoreInput:focus{ + background: #fff; + color:#FF6800 +} +.standardAnswer p{ + line-height: 20px!important; +} +/* 倒计时 */ +.remainingTime li{ + float: left; + width: 40px; + line-height: 40px; + background-color: #111C24; + color: #fff; + border-radius: 4px; + text-align: center +} +.remainingTime span{ + float: left; + width: 20px; + line-height: 40px; + text-align: center; +} +.myyslwidth { + min-width:1200px +} \ No newline at end of file diff --git a/public/react/src/modules/courses/shixunHomework/CommitSummary.js b/public/react/src/modules/courses/shixunHomework/CommitSummary.js index 0eb1bad0b..c2900e538 100644 --- a/public/react/src/modules/courses/shixunHomework/CommitSummary.js +++ b/public/react/src/modules/courses/shixunHomework/CommitSummary.js @@ -160,7 +160,7 @@ class CommitSummary extends Component{ max: 5000, message: '最大限制为5000个字符', }], })( - )}
    diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index 33bb37a6e..d9abecd72 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -337,13 +337,6 @@ class Listofworks extends Component { render: (text, record) => ( record.submitstate === "未提交" ? -- : - -
    直接调整最终成绩的分数
    -
    其它评分全部作废
    -
    }> - this.Viewstudenttraininginformations(record)}>调分 - this.Viewstudenttraininginformation(record)}>{record.operating} @@ -590,13 +583,6 @@ class Listofworks extends Component { render: (text, record) => ( record.submitstate === "未提交" ? -- : - -
    直接调整最终成绩的分数
    -
    其它评分全部作废
    - }> - this.Viewstudenttraininginformations(record)}>调分 -
    this.Viewstudenttraininginformation(record)}>{record.operating}
    diff --git a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js index 90bc23d99..5a16e21a5 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js @@ -33,7 +33,6 @@ import '../css/Courses.css' import './style.css' import moment from 'moment'; import 'moment/locale/zh-cn'; -import {Base64} from 'js-base64'; const Search = Input.Search; const CheckboxGroup = Checkbox.Group; @@ -752,7 +751,7 @@ class ShixunStudentWork extends Component { {data&&data? -
    +
    • diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js index fc34e0667..55d9cf60a 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js @@ -1,5 +1,5 @@ import React, {Component} from "react"; -import {WordsBtn} from 'educoder'; +import {WordsBtn,markdownToHTML} from 'educoder'; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider,InputNumber, Tag,DatePicker,Radio,Tooltip,Spin} from "antd"; import {Link,Switch,Route,Redirect} from 'react-router-dom'; import axios from 'axios'; @@ -13,14 +13,11 @@ import 'codemirror/mode/cmake/cmake'; import 'codemirror/mode/xml/xml'; import 'codemirror/mode/javascript/javascript'; import 'codemirror/mode/clike/clike'; - import '../css/members.css'; import "../common/formCommon.css"; import '../css/Courses.css'; import './style.css'; -import moment from 'moment'; import 'moment/locale/zh-cn'; -import {Base64} from 'js-base64'; class ShixunWorkReport extends Component { @@ -173,7 +170,6 @@ class ShixunWorkReport extends Component {
      - {data&&data.work_description} + +
    diff --git a/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunWorkModal.js b/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunWorkModal.js index 9cf381455..630b6861d 100644 --- a/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunWorkModal.js +++ b/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunWorkModal.js @@ -184,10 +184,10 @@ class ShixunWorkModal extends Component{ if (response.data.status === 0) { this.props.updatas() this.props.issCancel() - notification.open({ - message:"提示", - description: response.data.message - }); + // notification.open({ + // message:"提示", + // description: response.data.message + // }); this.props.history.replace(`/courses/${this.props.match.params.coursesId}/shixun_homeworks/${this.props.match.params.homeworkid}/student_work`); }else if(response.data.status === -1){ notification.open({ diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 51b491861..06c4dfba2 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -4,7 +4,6 @@ import HomeworkModal from "../coursesPublic/HomeworkModal"; import {WordsBtn, ActionBtn, handleDateString} from 'educoder'; import PollDetailTabForthRules from '../poll/PollDetailTabForthRules'; import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal'; -import {Base64} from 'js-base64'; import { Button, Checkbox, diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js index 5cb496847..da13cd330 100644 --- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js +++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js @@ -23,7 +23,6 @@ import { import {Link, Switch, Route, Redirect} from 'react-router-dom'; import moment from 'moment'; import 'moment/locale/zh-cn'; -import {Base64} from 'js-base64'; import axios from 'axios'; import '../css/members.css' import "../common/formCommon.css" @@ -510,7 +509,7 @@ class Workquestionandanswer extends Component { }
    -
    {/* /!*{}}>
    {/* /!*{jobsettingsdata.data.description}*!/*/} @@ -560,7 +559,7 @@ class Workquestionandanswer extends Component {
    {jobsettingsdata === undefined ? "无" : jobsettingsdata === null ? "无" : jobsettingsdata === "null" ? "无" : jobsettingsdata.data.explanation === undefined ? "无" : jobsettingsdata.data.explanation === null ? "无" : -
    } diff --git a/public/react/src/modules/page/MainContent.js b/public/react/src/modules/page/MainContent.js index 3fcaa55fd..c3d6b1384 100644 --- a/public/react/src/modules/page/MainContent.js +++ b/public/react/src/modules/page/MainContent.js @@ -58,6 +58,14 @@ class MainContent extends Component { font-family: 微软雅黑,宋体 !important; overflow: hidden !important; } + .can-drag { + width: 100%; + height: 100%; + z-index: 100; + position: fixed; + cursor: col-resize; + top: 0px; + } `}
    - +