hjm 5 years ago
commit ce5678913c

@ -28,8 +28,8 @@ const env = getClientEnvironment(publicUrl);
// The production configuration is different and lives in a separate file.
module.exports = {
// You may want 'eval' instead if you prefer to see the compiled output in DevTools.
// See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.
devtool: 'cheap-module-source-map',
// See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s
devtool: "source-map", // 开启调试
// These are the "entry points" to our application.
// This means they will be the "root" imports that are included in JS bundle.
// The first two entry points enable "hot" CSS and auto-refreshes for JS.

@ -42,6 +42,7 @@
"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",
@ -164,6 +165,7 @@
"babel-plugin-import": "^1.11.0",
"concat": "^1.0.3",
"happypack": "^5.0.1",
"js-base64": "^2.5.1",
"videojs-for-react": "^0.0.3",
"webpack-bundle-analyzer": "^3.0.3",
"webpack-parallel-uglify-plugin": "^1.1.0"

@ -1,103 +0,0 @@
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;
}
}

@ -1,7 +1,7 @@
import React, { Component } from 'react';
import Snackbar from 'material-ui/Snackbar';
import Fade from 'material-ui/transitions/Fade';
import { notification } from 'antd'
export function SnackbarHOC(options = {}) {
return function wrap(WrappedComponent) {
return class Wrapper extends Component {
@ -23,14 +23,23 @@ export function SnackbarHOC(options = {}) {
}
// 全局的snackbar this.props.showSnackbar调用即可
showSnackbar(text, vertical, horizontal) {
this.setState({
snackbarOpen: true,
snackbarText: text,
snackbarVertical: vertical,
snackbarHorizontal: horizontal,
})
showSnackbar(description, message = "提示",icon) {
// this.setState({
// snackbarOpen: true,
// snackbarText: text,
// snackbarVertical: vertical,
// snackbarHorizontal: horizontal,
// })
const data = {
message,
description
}
if (icon) {
data.icon = icon;
}
notification.open(data);
}
render() {
const { snackbarOpen, snackbarText, snackbarHorizontal, snackbarVertical } = this.state;

@ -26,7 +26,8 @@ class Fileslistitem extends Component{
})
this.props.Settingtypes(discussMessage.id)
}
showfiles=()=>{
showfiles=(value)=>{
let {discussMessage,coursesId}=this.props
let file_id=discussMessage.id
let url="/files/"+file_id+"/histories.json"
@ -35,12 +36,14 @@ class Fileslistitem extends Component{
course_id:coursesId
},
}).then((result)=>{
if(result.data.attachment_histories.length===0){
let link = document.createElement('a');
document.body.appendChild(link);
link.href = result.data.url;
link.download = result.data.title;
console.log(value)
link.download = value;
//兼容火狐浏览器
let evt = document.createEvent("MouseEvents");
evt.initEvent("click", false, false);
@ -203,25 +206,21 @@ class Fileslistitem extends Component{
{
this.props.isAdmin ? <a
// href={"/courses/" + coursesId + "/graduation/graduation_tasks/" + categoryid + "/" + taskid + "/list"}
onClick={this.showfiles}
onClick={()=>this.showfiles(discussMessage.title)}
title={discussMessage.title}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title}</a> : ""
}
{
this.props.isStudent? <a
onClick={this.showfiles}
onClick={()=>this.showfiles(discussMessage.title)}
title={discussMessage.title}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title}</a> :""
}
{
this.props.isNotMember ? discussMessage.is_lock === true ?
this.props.isNotMember ?
<span className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title}</span>
:
<a
onClick={this.showfiles}
// href={"/courses/" + coursesId + "/graduation/graduation_tasks/" + categoryid + "/" + taskid + "/list"}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title}</a> :""
:""
}

@ -954,8 +954,8 @@ class Fileslists extends Component{
}
}
>
<div className="edu-tab-con-box clearfix edu-txt-center"><img className="edu-nodata-img mb20"
src="https://www.educoder.net/images/educoder/nodata.png" />
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src="https://www.educoder.net/images/educoder/nodata.png" />
<p className="edu-nodata-p mb20">暂无数据哦~</p></div>
</div>

@ -171,11 +171,11 @@ class Ecerciseallbackagain extends Component{
}
.fontlefts{text-align: left;}
`}</style>
<div className="clearfix edu-txt-center mb10" style={{color:"#333333",fontSize: '15px'}}>学生仅限提交中将得到一次重新答题的机会现有的答题情况将被清空</div>
<div className="clearfix edu-txt-center mb10" style={{color:"#333333",fontSize: '15px'}}>学生将得到一次重新答题的机会现有的答题情况将被清空</div>
<ul className="clearfix edu-txt-center ml35">
<li className="fl paddingleft22 fontlefts" style={{width:'130px'}}>姓名</li>
<li className="fl paddingleft22 fontlefts" style={{width:'160px'}}>姓名</li>
<li className="fl edu-txt-left" style={{width:'124px'}}>学号</li>
<li className="fl" style={{width:'100px'}}>成绩</li>
<li className="fr" style={{width:'170px'}}>成绩</li>
</ul>
{datalist===undefined?"":
@ -187,8 +187,8 @@ class Ecerciseallbackagain extends Component{
{ datalist.map((item,key)=>{
return(
<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" key={key}>
<li className="fl" style={{width: '100px'}}>
<div className="clearfix edu-txt-center lineh-40" key={key}>
<li className="fl" style={{width: '158px'}}>
<Checkbox
className="fl task-hide edu-txt-left"
name="shixun_homework[]"
@ -201,7 +201,7 @@ class Ecerciseallbackagain extends Component{
<li className="fl" style={{width: '150px'}}>
{item.student_id}
</li>
<li className="fl" style={{width: '160px',color:'#FF6800'}}>
<li className="fr" style={{width: '170px',color:'#FF6800'}}>
{item.user_score}
</li>
</div>

@ -107,11 +107,9 @@ class ExerciseListItem extends Component{
}
{
this.props.isNotMember()? item.lock_status === 0 ?
this.props.isNotMember()?
<span className="fl mt3 font-16 font-bd color-dark comnonwidth580" title={item.exercise_name}>{item.exercise_name}</span>
:
<a className="fl font-16 font-bd mt2 color-grey-3 task-hide comnonwidth580" title={item.exercise_name} href={`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`}>{item.exercise_name}</a>:""
:""
}
{

@ -1,5 +1,5 @@
import React,{ Component } from "react";
import {Checkbox,Radio, Input,InputNumber} from "antd";
import {Checkbox,Radio, Input,InputNumber,Spin} from "antd";
import '../css/members.css'
import '../css/busyWork.css'
@ -75,7 +75,10 @@ class ExerciseReviewAndAnswer extends Component{
Id:undefined,
// 试卷总分
exerciseTotalScore:undefined
exerciseTotalScore:undefined,
// 加载效果
isSpin:false
}
}
componentDidUpdate (prevProps) {
@ -163,7 +166,8 @@ class ExerciseReviewAndAnswer extends Component{
getInfo=()=>{
this.setState({
courseName:this.props.current_user.course_name,
userName:this.props.current_user.username
userName:this.props.current_user.username,
isSpin:true
})
let eId=this.props.match.params.Id;
@ -187,7 +191,8 @@ class ExerciseReviewAndAnswer extends Component{
exercise_questions:result.data.exercise_questions,
user_exercise_status:1,
Id:result.data.exercise_answer_user.user_id,
exerciseTotalScore:result.data.exercise_answer_user.score
exerciseTotalScore:result.data.exercise_answer_user.score,
isSpin:false
})
}
}).catch((error)=>{
@ -210,7 +215,8 @@ class ExerciseReviewAndAnswer extends Component{
exercise_questions:result.data.exercise_questions,
user_exercise_status:result.data.exercise.user_exercise_status,
time:result.data.exercise.left_time,
exerciseTotalScore:result.data.user_score
exerciseTotalScore:result.data.user_score,
isSpin:false
})
if(result.data.exercise.left_time != null){
this.remainTime();
@ -498,7 +504,8 @@ class ExerciseReviewAndAnswer extends Component{
ModalCancel,
ModalSave,
Loadtype,
exerciseTotalScore
exerciseTotalScore,
isSpin
}=this.state
let isAdmin = this.props.isAdmin();
let isStudent =this.props.isStudent();
@ -506,6 +513,7 @@ class ExerciseReviewAndAnswer extends Component{
console.log(data&&data.exercise.user_name)
return(
<div className="newMain" style={{paddingTop:"0px"}}>
<Spin size="large" spinning={isSpin}>
<style>{`
.inputNumber30{
height:30px;
@ -834,6 +842,7 @@ class ExerciseReviewAndAnswer extends Component{
</p>:""
}
</div>
</Spin>
</div>
)
}

@ -760,6 +760,8 @@ class Studentshavecompletedthelist extends Component {
<span>
{record.operating==="--"?
<span style={{"text-align": "center","color": '#999999',}}>{record.operating}</span>
:record.submitstate === "未提交"?
<span style={{"text-align": "center","color": '#999999',}}>--</span>
:
<a style={{"text-align": "center"}} className="color-blue"
href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.operating}</a>
@ -954,6 +956,9 @@ class Studentshavecompletedthelist extends Component {
{record.finalscore==="--"?
<span style={{"text-align": "center","color": '#999999'}}
>--</span>
:record.submitstate === "未提交"?
<span style={{"text-align": "center","color": '#999999'}}
>--</span>
:
<a style={{"text-align": "center"}} className="color-blue"
href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.finalscore}</a>
@ -1141,6 +1146,9 @@ class Studentshavecompletedthelist extends Component {
{record.finalscore==="--"?
<span style={{"text-align": "center","color": '#999999'}}
>--</span>
:record.submitstate === "未提交"?
<span style={{"text-align": "center","color": '#999999'}}
>--</span>
:
<a style={{"text-align": "center"}} className="color-blue"
href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.finalscore}</a>

@ -229,12 +229,9 @@ class GraduateTaskItem extends Component{
}
{
this.props.isNotMember?this.props.discussMessage.private_icon===true?
this.props.isNotMember?
<span className="fl mt3 font-16 font-bd color-dark maxwidth580" title={discussMessage.name}>{discussMessage.name}</span>
:
<a href={"/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/"+taskid+"/list"}
title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:""
:""
}

@ -70,15 +70,17 @@ class GraduateTopicItem extends Component{
`}</style>
<h6>
{
isNotMember && discussMessage.private_icon===true ?
<a className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:
<a onClick={() => this.toDetailPage(`${discussMessage.id}`)} className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>
isNotMember?
<a className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:""
}
{
isStudent?<a onClick={() => this.toDetailPage(`${discussMessage.id}`)}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:""
}
{
isAdmin?<a onClick={() => this.toDetailPage(`${discussMessage.id}`)} className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:""
}
{
discussMessage.private_icon===true?
<Tooltip title={ this.props.isNotMember()===true?"私有属性,非课堂成员不能访问":"私有属性"} placement="bottom">

@ -352,8 +352,8 @@ onBoardsNew=()=>{
(<React.Fragment>
{/* 参考普通作业 - 题库选用 */}
{/* <WordsBtn style="blue" className="mr30" onClick={()=>this.useFromBank()}>题库选用</WordsBtn> 正式版没有,先隐藏*/}
< a href={`/api/courses/${this.props.match.params.coursesId}/graduation_topics/export.xlsx`} className={"fl color-blue mr30 font-16"}>导出</a>
<p className="fl"><UseBank {...this.props} {...this.state} object_type={"gtopic"} useBankSuccess={this.useBankSuccess}></UseBank></p>
< a href={`/api/courses/${this.props.match.params.coursesId}/graduation_topics/export.xlsx`} className={"color-blue mr20 font-16"}>导出</a>
<WordsBtn style="blue" className="font-16" onClick={()=>this.onBoardsNew()}>新建</WordsBtn>
</React.Fragment>):""
}

@ -187,56 +187,6 @@ class PollDetailTabForth extends Component{
}
UnifiedSetting=()=>{
let { unit_e_tip , unit_p_tip , publish_time , end_time ,course_group }=this.state
// 如果两个时间都没有填写或者只选择了截止时间则先保存设置然后弹出立即发布弹框
// if ( !publish_time ){
// if(moment(end_time,dataformat)<=moment()){
// this.setState({
// unit_e_tip:"截止时间不能小于当前时间"
// })
// }else{
// this.setState({
// unit_e_tip:""
// })
// let list=[];
// let pollId=this.props.match.params.pollId;
// let coursesId=this.props.match.params.coursesId;
// let url=`/courses/${coursesId}/polls/publish_modal.json`;
// axios.get(url,{
// params:{
// check_ids:[pollId]
// }
// }).then((response) => {
// if(response.data.course_info){
// for(var i=0;i<response.data.course_info.length;i++){
// list.push({
// id:response.data.course_info[i].course_group_id,
// name:response.data.course_info[i].course_group_name,
// })
// }
// this.setState({
// modalname:"立即发布",
// modaltype:list.length > 0 ? 1 : 2,
// visible:true,
// Topval:"本操作只对“未发布”的对象生效",
// Botvalleft:"暂不发布",
// Botval:"则通过后续手动设置,定时发布",
// starttime:"发布时间:"+this.props.getNowFormatDates(1),
// endtime:"截止时间:" + moment(end_time || this.props.getNowFormatDates(2)).format(dataformat),
// Cancelname:"暂不发布",
// Savesname:"立即发布",
// Cancel:this.homeworkhide,
// Saves:this.homeworkstartend,
// publishCourse:list,
// publish_time:this.props.getNowFormatDates(1)
// })
// }
// }).catch((error)=>{
// console.log(error);
// })
// }
// }
if( this.state.un_change_unified == false){
if ( !publish_time ){
this.setState({
@ -275,6 +225,7 @@ class PollDetailTabForth extends Component{
unit_e_tip:""
})
}
}
this.commitSetting((result)=>{
if(result.status==200){
this.props.showNotification(`${result.data.message}`);
@ -285,7 +236,6 @@ class PollDetailTabForth extends Component{
}
})
}
}
// 非统一设置提交
NotUnifiedSetting=()=>{

@ -8,7 +8,7 @@ import './pollStyle.css'
import axios from 'axios';
const map={1:"单选题",2:"多选题",3:"主观题"}
const map={1:"单选题",2:"多选题",3:"主观题",4:"主观题"}
class PollDetailTabThird extends Component{
constructor(props){
super(props);

@ -60,7 +60,7 @@ class PollListItem extends Component{
}
{
item.polls_status ==1 && item.publish_time ==null && item.created_at &&
<span className="mr20 fl mt3">创建于{moment(item.created_at).format(dataformat)}</span>
<span className="mr20 fl mt3">创建于{moment(item.created_at).fromNow()}</span>
}
{
item.polls_status ==1 && item.publish_time !=null &&

@ -2763,7 +2763,17 @@ class PollNew extends Component {
</div>
: ""
:
<div className="clearfix mt30" >
<span className="fr mt5">
<ActionBtn style="greyBack" className=" mr20 w100"
onClick={() => this.deleteadddom(indexo)}>取消</ActionBtn>
<ActionBtn style="blue" className="mr20 w100"
onClick={() => this.deleteadddomthree(indexo, itemo)}>保存</ActionBtn>
<ActionBtn style="blue" className=" w100"
onClick={() => this.deleteadddomtwo(indexo, itemo)}>保存并继续</ActionBtn>
</span>
</div>
)
: itemo.question.question_type === 3 ?

@ -4,6 +4,7 @@ import {WordsBtn, ActionBtn} from 'educoder';
import TraineetraininginformationModal from './TraineetraininginformationModal';
import ModulationModal from "../coursesPublic/ModulationModal";
import HomeworkModal from "../coursesPublic/HomeworkModal";
import {Base64} from 'js-base64';
import {
Form,
Select,
@ -32,7 +33,6 @@ import moment from 'moment';
import 'moment/locale/zh-cn';
import {getImageUrl, toPath} from 'educoder';
import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal';
const Search = Input.Search;
const RadioGroup = Radio.Group;
const CheckboxGroup = Checkbox.Group;
@ -115,6 +115,7 @@ class Listofworks extends Component {
key: 'name',
align: 'center',
className:'font-14',
width:'120px',
render: (text, record) => (
<span style={{"color": '#07111B', "text-align": "center"}}>{record.name}</span>
)
@ -139,7 +140,7 @@ class Listofworks extends Component {
dataIndex: 'classroom',
align: 'center',
className:'font-14',
width:'288px',
width:"260px",
render: (text, record) => (
<span style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</span>
)
@ -239,9 +240,9 @@ class Listofworks extends Component {
</span>
</Tooltip>
:
<a style={{color:"#9A9A9A"}}>
<span style={{color:"#9A9A9A"}}>
--
</a>
</span>
)
:
<span style={parseInt(record.efficiencyscore) <= 60 ? {
@ -367,6 +368,7 @@ class Listofworks extends Component {
key: 'name',
align: 'center',
className:'font-14',
width:'120px',
render: (text, record) => (
<span style={{"color": '#07111B', "text-align": "center"}}>{record.name}</span>
)
@ -391,7 +393,7 @@ class Listofworks extends Component {
dataIndex: 'classroom',
align: 'center',
className:'font-14',
width:'288px',
width:"260px",
render: (text, record) => (
<span style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</span>
)
@ -491,9 +493,9 @@ class Listofworks extends Component {
</span>
</Tooltip>
:
<a style={{color:"#9A9A9A"}}>
<span style={{color:"#9A9A9A"}}>
--
</a>
</span>
)
:
<span style={parseInt(record.efficiencyscore) <= 60 ? {
@ -1338,33 +1340,34 @@ class Listofworks extends Component {
// 导出实习报告批量
internshipreport = (url)=>{
console.log("internshipreport");
// params: {
// homework_common_id: homeworkid,
// work_status: this.state.course_groupyslstwo,
// course_group: this.state.checkedValuesineinfo,
// search: this.state.searchtext,
// }
// let url = "/zip/shixun_report";
// let homeworkid = this.props.match.params.homeworkid;
var struy="";
try {
struy = moment().format('YYYY-MM-DD')+"-"+moment().format('hh-mm');
struy=struy.replace(/-/g,"");
}catch (e) {
console.log(1347);
console.log(e);
}
axios.get((url),{responseType: 'blob'}).then((response) => {
console.log("1350");
console.log(response);
if(response.data.status&&response.data.status===-1){
if(response.status&&response.status===-1){
}else if(response.data.status&&response.data.status===-2){
}else if(response.status&&response.status===-2){
}else{
// window.location.href("/api"+url);
console.log("开始下载zip文件")
// console.log("开始下载zip文件")
const type='application/zip'//ZIP文件
const blob = new Blob([response.data], { type: type })
const downloadElement = document.createElement('a')
const href = window.URL.createObjectURL(blob)
//后台再header中传文件名
const name = decodeURI(response.headers['content-disposition'].split('=')[1])
const string = Base64.decode(response.headers['content-disposition'].split('=')[1]);
console.log(response.headers['content-disposition'].split('=')[1]);
downloadElement.href = href
downloadElement.download = name
downloadElement.download = string+struy+".zip"
document.body.appendChild(downloadElement)
downloadElement.click()
document.body.removeChild(downloadElement) // 下载完成移除元素
@ -1377,38 +1380,38 @@ class Listofworks extends Component {
// 课堂学生成绩的导出下载
Classstudentachievement=(url)=>{
console.log("Classstudentachievement");
// const course_id = this.props.match.params.coursesId;
// let url = "/courses/"+course_id+"/export_member_scores_excel.xlsx";
// ,{
// params: {
// group_id: this.state.checkedValuesineinfo,
// search: this.state.searchtext,
// }
// },{responseType: 'blob'})
// console.log();
var struy="";
try {
struy = moment().format('YYYY-MM-DD')+"-"+moment().format('hh-mm');
struy=struy.replace(/-/g,"");
}catch (e) {
console.log(1397);
console.log(e);
}
axios.get((url),{responseType: 'blob'}).then((response) => {
console.log("1374");
console.log(response);
if(response.data.status&&response.data.status===-1){
if(response.status&&response.status===-1){
}else if(response.data.status&&response.data.status===-2){
}else if(response.status&&response.status===-2){
}else{
const type='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' //excel文件
const blob = new Blob([response.data], { type: type })
const downloadElement = document.createElement('a')
const href = window.URL.createObjectURL(blob)
//后台再header中传文件名
const name = decodeURI(response.headers['content-disposition'].split('=')[1])
const string = Base64.decode(response.headers['content-disposition'].split('=')[1]);
console.log(response.headers['content-disposition'].split('=')[1]);
console.log(name);
downloadElement.href = href
downloadElement.download = name
downloadElement.download =string+struy+".xlsx";
document.body.appendChild(downloadElement)
downloadElement.click()
document.body.removeChild(downloadElement) // 下载完成移除元素
window.URL.revokeObjectURL(href) // 释放掉blob对象
}
}).catch((error) => {
console.log(error)
@ -1512,7 +1515,7 @@ class Listofworks extends Component {
typelist={teacherdata === undefined ? [""] : teacherdata.homework_status}
/>
<a className="color-grey-9 fr font-16 summaryname ml20 mr20"
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id}`}>返回</a>
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id===undefined?"": jobsettingsdata.data.category.category_id}`}>返回</a>
<a className="color-grey-9 fr font-16 mr20"
href={`/shixuns/${teacherdata === undefined ? "" : teacherdata.shixun_identifier}/challenges`}
target={"_blank"}>实训详情</a>
@ -1565,6 +1568,7 @@ class Listofworks extends Component {
<ul className="drop_down_menu" style={{"right":"-0px","left":"unset","height":"auto"}}>
<li><a onClick={()=>this.internshipreport(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}&work_status=${this.state.course_groupyslstwo}&course_group=${this.state.checkedValuesineinfo}&search=${this.state.searchtext}`)}>实训报告</a></li>
<li><a onClick={()=>this.Classstudentachievement(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx?group_id=${this.state.checkedValuesineinfo}&search=${this.state.searchtext}`)} >学生成绩</a></li>
</ul>
</li>:""}
{this.props.isAdmin() ?

@ -1005,7 +1005,7 @@ class Listofworksstudentone extends Component {
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<ActionBtn
className=" fl "
to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id}`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name}</ActionBtn>
to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id === undefined ? "" : jobsettingsdata.data.category.category_id}`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn className="fl">作业详情</WordsBtn>
</p>

@ -21,7 +21,8 @@ import {
DatePicker,
Radio,
Tooltip,
notification
notification,
Pagination
} from "antd";
import {Link, Switch, Route, Redirect} from 'react-router-dom';
import axios from 'axios';
@ -31,6 +32,7 @@ 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;
@ -89,11 +91,22 @@ class ShixunStudentWork extends Component {
})
}
getupdata=()=>{
getupdata=(pages)=>{
let {order,b_order,page,limit,group_infolist,search}=this.state;
var homeworkid = this.props.match.params.homeworkid;
let url = "/homework_commons/" + homeworkid + "/code_review_results.json";
axios.get(url).then((response) => {
axios.get(url,{params:{
order:order,
sort:b_order,
page:pages===undefined?page:pages,
limit:limit,
group_ids:group_infolist,
search:search
},
paramsSerializer: function(params) {
return qs.stringify(params, {arrayFormat: 'brackets'})
}}).then((response) => {
if (response.data.status === undefined || response.data.status === 0) {
if(response.data!=undefined){
if(response.data.status!=-2){
@ -198,12 +211,12 @@ class ShixunStudentWork extends Component {
}
TablePagination = (e) => {
TablePagination = (pages) => {
this.setState({
page:e.current
page:pages
})
this.getupdata(pages)
}
inputSearchValue=(e)=>{
@ -443,7 +456,91 @@ class ShixunStudentWork extends Component {
starttimes:undefined,
})
}
// 导出实习报告批量
internshipreport = (url) => {
console.log("internshipreport");
// var homeworkid = this.props.match.params.homeworkid;
// let url = "/zip/shixun_report";
axios.get(url).then((response) => {
console.log("326");
console.log(response);
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
}else{
const type='application/zip'//ZIP文件
const blob = new Blob([response.data], { type: type })
const downloadElement = document.createElement('a')
const href = window.URL.createObjectURL(blob)
//后台再header中传文件名
// console.log(Base64.decode(response.headers['content-disposition'].split('=')[1]));
const string = Base64.decode(response.headers['content-disposition'].split('=')[1]);
downloadElement.href = href
var now="";
try {
now = moment().year()+""+(moment().month()+1)+""+moment().date()+""+moment().hour()+""+moment().minute()+""
console.log(now);
} catch (e) {
console.log("1376");
}
downloadElement.download = string+now+".zip"
document.body.appendChild(downloadElement)
downloadElement.click()
document.body.removeChild(downloadElement) // 下载完成移除元素
window.URL.revokeObjectURL(href) // 释放掉blob对象
}
}).catch((error) => {
console.log(error)
});
}
// 课堂学生成绩的导出下载
Classstudentachievement = (url) => {
console.log("Classstudentachievement");
// const course_id = this.props.match.params.coursesId;
// let url = "/courses/" + course_id + "/export_member_scores_excel.xlsx";
axios.get(url).then((response) => {
console.log("1374");
console.log(response);
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
}else{
const type='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' //excel文件
const blob = new Blob([response.data], { type: type })
const downloadElement = document.createElement('a')
const href = window.URL.createObjectURL(blob)
//后台再header中传文件名
// console.log("1409");
// console.log(Base64.decode(response.headers['content-disposition'].split('=')[1]));
const string = Base64.decode(response.headers['content-disposition'].split('=')[1]);
var now="";
try {
now = moment().year()+""+(moment().month()+1)+""+moment().date()+""+moment().hour()+""+moment().minute()+""
console.log("1422");
console.log(now);
} catch (e) {
console.log("1432");
}
downloadElement.href = href
downloadElement.download =string+now+".xlsx";
document.body.appendChild(downloadElement)
downloadElement.click()
document.body.removeChild(downloadElement) // 下载完成移除元素
window.URL.revokeObjectURL(href) // 释放掉blob对象
}
}).catch((error) => {
console.log(error)
});
}
render() {
let {
@ -606,10 +703,35 @@ class ShixunStudentWork extends Component {
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
>设置</Link>
{this.props.isAdmin() ? <a
className="fr color-blue font-16"
href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xlsx`}
>导出</a> : ""}
<style>{`
.drop_down_menu li a {
padding: 0px;
font-size: 14px;
}
.drop_down_menu {
width: 93px;
}
.drop_down_menu li {
overflow: visible;
width: 93px;
}
.drop_down_menu, .drop_down_normal {
padding-top: 10px;
padding-bottom: 8px;
}
a:hover {
color:#1A0B00 !important;
}
`}</style>
{this.props.isAdmin() ? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding": "0 20px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}>
<li><a onClick={()=>this.internshipreport(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`)}>实训报告</a>
</li>
<li><a onClick={()=>this.Classstudentachievement(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`)}>学生成绩</a>
</li>
</ul>
</li> : ""}
{this.props.isAdmin()?
data&&data.end_immediately===true?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a> : "" : ""}
@ -751,6 +873,7 @@ class ShixunStudentWork extends Component {
</div>
<div className={"justify break_full_word new_li edu-back-white"} style={{minHeight: "480px"}}>
<style>{`
.ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {
top: 72%;}
@ -759,22 +882,24 @@ class ShixunStudentWork extends Component {
{datalist === undefined ? "" : <Table
dataSource={datalist}
columns={columns}
pagination={ datalist.length<11?false:{ //分页
total: datalist.length===0?0:data&&data.all_reviews_count, //数据总数量
pageSize: 10, //显示几条一页
current:page,
}}
onChange={this.TablePagination}
pagination={false}
/>}
</div>
</div>
</div>:""}
</div>
</div></div>
{
datalist === undefined ? "":datalist.length<11?
<div className="edu-txt-center mt30 mb20">
<Pagination showQuickJumper current={page}
onChange={this.TablePagination} pageSize={10}
total={datalist.length===0?0:data&&data.copy_reviews_count}></Pagination>
</div>
: ""
}
</div>
</div>

@ -63,8 +63,9 @@ class ShixunWorkDetails extends Component {
render() {
let{data}=this.state;
return (
<Spin size="large" spinning={this.state.spinning}>
{data===undefined? "":<div className="newMain clearfix ">
<Spin size="large" spinning={this.state.spinning} style={{marginTop:"13%"}}>
<div className="newMain clearfix ">
{data===undefined? "":
<div className={"educontent mb20"}>
<div className="educontent">
@ -111,11 +112,9 @@ class ShixunWorkDetails extends Component {
/>
</div>
</div>
</div>
</div>}
}
</div>
</Spin>
)
}

@ -17,7 +17,9 @@ 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 {
@ -28,7 +30,47 @@ class ShixunWorkReport extends Component {
spinning:true
}
}
// 导出实习报告批量
internshipreport = (url) => {
console.log("internshipreport");
// var homeworkid = this.props.match.params.homeworkid;
// let url = "/zip/shixun_report";
axios.get(url).then((response) => {
console.log("326");
console.log(response);
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
}else{
const type='application/zip'//ZIP文件
const blob = new Blob([response.data], { type: type })
const downloadElement = document.createElement('a')
const href = window.URL.createObjectURL(blob)
//后台再header中传文件名
// console.log(Base64.decode(response.headers['content-disposition'].split('=')[1]));
const string = Base64.decode(response.headers['content-disposition'].split('=')[1]);
downloadElement.href = href
var now="";
try {
now = moment().year()+""+(moment().month()+1)+""+moment().date()+""+moment().hour()+""+moment().minute()+""
console.log(now);
} catch (e) {
console.log("1376");
}
downloadElement.download = string+now+".zip"
document.body.appendChild(downloadElement)
downloadElement.click()
document.body.removeChild(downloadElement) // 下载完成移除元素
window.URL.revokeObjectURL(href) // 释放掉blob对象
}
}).catch((error) => {
console.log(error)
});
}
componentDidMount() {
this.setState({
spinning:true
@ -93,9 +135,7 @@ class ShixunWorkReport extends Component {
{/*{this.props.isAdmin()?<a className=" fr font-14 ml30 mt10 mr20 color-grey-9 ">导出实训报告数据</a>:""}*/}
{this.props.isAdmin() ? <a
className="fr color-blue font-16"
href={`
/api/student_works/${homeworkid}/export_shixun_work_report.pdf
`}
onClick={()=>this.internshipreport(`/zip/shixun_report?homework_common_id=${homeworkid}`)}
>导出实训报告数据</a> : ""}
</div>

@ -304,11 +304,9 @@ class ShixunhomeWorkItem extends Component{
}
{
this.props.isNotMember?this.props.discussMessage.private_icon===true?
this.props.isNotMember?
<span className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</span>
:
<Link to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/openlist`}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</Link>:""
:""
}

@ -4,6 +4,7 @@ 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,
@ -24,6 +25,7 @@ import './style.css';
import '../css/busyWork.css'
import '../poll/pollStyle.css'
import moment from 'moment';
import 'moment/locale/zh-cn';
import Modals from "../../modals/Modals";
const RadioGroup = Radio.Group;
@ -1621,7 +1623,27 @@ class Trainingjobsetting extends Component {
}else if(response.data.status&&response.data.status===-2){
}else{
window.open("/api"+url, '_blank');
const type='application/zip'//ZIP文件
const blob = new Blob([response.data], { type: type })
const downloadElement = document.createElement('a')
const href = window.URL.createObjectURL(blob)
//后台再header中传文件名
// console.log(Base64.decode(response.headers['content-disposition'].split('=')[1]));
const string = Base64.decode(response.headers['content-disposition'].split('=')[1]);
downloadElement.href = href
var now="";
try {
now = moment().year()+""+(moment().month()+1)+""+moment().date()+""+moment().hour()+""+moment().minute()+""
console.log(now);
} catch (e) {
console.log("1376");
}
downloadElement.download = string+now+".zip"
document.body.appendChild(downloadElement)
downloadElement.click()
document.body.removeChild(downloadElement) // 下载完成移除元素
window.URL.revokeObjectURL(href) // 释放掉blob对象
}
}).catch((error) => {
@ -1643,7 +1665,29 @@ class Trainingjobsetting extends Component {
}else if(response.data.status&&response.data.status===-2){
}else{
window.open("/api"+url, '_blank');
const type='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' //excel文件
const blob = new Blob([response.data], { type: type })
const downloadElement = document.createElement('a')
const href = window.URL.createObjectURL(blob)
//后台再header中传文件名
// console.log("1409");
// console.log(Base64.decode(response.headers['content-disposition'].split('=')[1]));
const string = Base64.decode(response.headers['content-disposition'].split('=')[1]);
var now="";
try {
now = moment().year()+""+(moment().month()+1)+""+moment().date()+""+moment().hour()+""+moment().minute()+""
console.log("1422");
console.log(now);
} catch (e) {
console.log("1432");
}
downloadElement.href = href
downloadElement.download =string+now+".xlsx";
document.body.appendChild(downloadElement)
downloadElement.click()
document.body.removeChild(downloadElement) // 下载完成移除元素
window.URL.revokeObjectURL(href) // 释放掉blob对象
}
}).catch((error) => {

@ -23,7 +23,9 @@ import {
notification
} from "antd";
import {Link, Switch, Route, Redirect} from 'react-router-dom';
import moment from 'moment'
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"
@ -332,7 +334,27 @@ class Workquestionandanswer extends Component {
}else if(response.data.status&&response.data.status===-2){
}else{
window.open("/api"+url, '_blank');
const type='application/zip'//ZIP文件
const blob = new Blob([response.data], { type: type })
const downloadElement = document.createElement('a')
const href = window.URL.createObjectURL(blob)
//后台再header中传文件名
// console.log(Base64.decode(response.headers['content-disposition'].split('=')[1]));
const string = Base64.decode(response.headers['content-disposition'].split('=')[1]);
downloadElement.href = href
var now="";
try {
now = moment().year()+""+(moment().month()+1)+""+moment().date()+""+moment().hour()+""+moment().minute()+""
console.log(now);
} catch (e) {
console.log("1376");
}
downloadElement.download = string+now+".zip"
document.body.appendChild(downloadElement)
downloadElement.click()
document.body.removeChild(downloadElement) // 下载完成移除元素
window.URL.revokeObjectURL(href) // 释放掉blob对象
}
}).catch((error) => {
@ -354,7 +376,29 @@ class Workquestionandanswer extends Component {
}else if(response.data.status&&response.data.status===-2){
}else{
window.open("/api"+url, '_blank');
const type='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' //excel文件
const blob = new Blob([response.data], { type: type })
const downloadElement = document.createElement('a')
const href = window.URL.createObjectURL(blob)
//后台再header中传文件名
// console.log("1409");
// console.log(Base64.decode(response.headers['content-disposition'].split('=')[1]));
const string = Base64.decode(response.headers['content-disposition'].split('=')[1]);
var now="";
try {
now = moment().year()+""+(moment().month()+1)+""+moment().date()+""+moment().hour()+""+moment().minute()+""
console.log("1422");
console.log(now);
} catch (e) {
console.log("1432");
}
downloadElement.href = href
downloadElement.download =string+now+".xlsx";
document.body.appendChild(downloadElement)
downloadElement.click()
document.body.removeChild(downloadElement) // 下载完成移除元素
window.URL.revokeObjectURL(href) // 释放掉blob对象
}
}).catch((error) => {

@ -1132,7 +1132,7 @@ class ShixunHomework extends Component{
{course_modules&&course_modules.main_category.map((item,key)=>{
return(
datas&&datas.category_id===null?"":<li key={key} id={item.main_category_id} onClick={() => this.moveTos(item.main_category_id)}>{item.main_category_name}</li>:""
datas&&datas.category_id===null?"":<li key={key} id={item.main_category_id} onClick={() => this.moveTos(item.main_category_id)}>{item.main_category_name}</li>
)
})}

@ -317,10 +317,13 @@ class LoginDialog extends Component {
});
}
handleDialogClose() {
if(this.props.match.path==="/"){
this.setState({
isRender: false
})
// window.location.href="/";
}else{
window.location.href="/";
}
}
loginEDU=()=>{

@ -613,6 +613,7 @@ submittojoinclass=(value)=>{
{/* isRender&& isRender === true?*/}
<LoginDialog
{...this.state}
{...this.props}
/>
{/* :""*/}
{/*}*/}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,220 @@
import React, {Component} from 'react';
import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal,Tooltip} from 'antd';
import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom";
import TPMMDEditor from '../../tpm/challengesnew/TPMMDEditor';
const Option = Select.Option;
const RadioGroup = Radio.Group;
export default class TpmQuestionEdit extends Component {
constructor(props) {
super(props)
this.state = {
}
}
componentDidMount() {
}
render() {
console.log( this.props.questionlists)
return (
<div>
<div className="edu-back-white mb10 clearfix">
<div className="padding40-20">
<p className="color-grey-6 font-16 mb30">题干</p>
<div className="df">
<span className="mr30 color-orange pt10">*</span>
<div className="flex1 mr20">
<TPMMDEditor ref={this.props.neweditanswerRef} placeholder="请输入选择题的题干内容" mdID={'newquestioMDid'} refreshTimeout={1500}
watch={true} className="courseMessageMD" initValue={this.props.neweditanswerRefval}></TPMMDEditor>
</div>
<div style={{width: '57px'}} style={{display:this.props.newquestioMDvaluetype===true?"block":"none"}}>
<span className="color-orange mt8 fl" id="choose_name"
style={{display: 'inline'}}><i className="fa fa-exclamation-circle mr3"></i></span>
</div>
</div>
<p id="e_tip_neweditanswerQuestion" className="edu-txt-right color-grey-cd font-12 pdr20"></p>
<p id="e_tips_neweditanswerQuestion" className="edu-txt-right color-grey-cd font-12 pdr20"></p>
<div id="shixun_form" className="mt10">
{
this.props.questionlists===undefined||this.props.questionlists.length===0?"":this.props.questionlists.map((item,key)=>{
return(
<li className="clearfix pr mb20 df questionli" key={key}>
<label className="fl"><span
className={item.type===true?"option-item fr mr10 color-grey select-choice check-option-bg":"option-item fr mr10 color-grey select-choice"}
onClick={()=>this.props.selquestionlists(key)}
name="option_span"
data-tip-down="点击设置答案"
>{item.str}</span></label>
<textarea className="input-flex-40 fl candiate_answer"
name="question[cnt][]"
placeholder="请输入选项内容"
value={item.val}
autoHeight="true"
id={"question"+key}
onInput={(e)=>this.props.onInputoquestionption(e,key)}
style={{resize: 'none', height: '62px'}}></textarea>
<a className="position-delete option_icon_remove" onClick={()=>this.props.delquestionlists(key)}>
<i className="fa fa-times-circle color-grey-c font-16 fl"></i>
</a>
</li>
)
})
}
<p className="clearfix ml40">
<a onClick={()=>this.props.addquestionlists()}
className="fl edu-default-btn edu-greyline-btn mb20 option_icon_add">新增选项</a>
<span className="color-orange mt8 fr mr20" style={{display:this.props.newcnttype===true?"block":"none"}}id="chooce_error">
<i className="fa fa-exclamation-circle mr3"></i>
{this.props.newcnttypesum===0?"请选择答案":"选项内容不能为空"}
</span>
</p>
<li className="clearfix color-grey-9 ">
<label className="fl ml40">温馨提示点击选项标题可以直接设置答案选择多个答案即为多选题</label>
<label className="fr mr20">标准答案
<span d="current-option" className="color-orange">{this.props.questionlistss===undefined?"请点击正确选项":this.props.questionlistss.length===0? <span>{this.props.standard_answer}</span>:this.props.questionlistss.map((item,key)=>{
return(
<span key={key}>{item}</span>
)
})}</span>
</label>
</li>
</div>
</div>
</div>
<div className={"edu-back-white mb10 clearfix"}>
<div className={"padding40-20"}>
<p className="color-grey-6 font-16 mb30">参考答案</p>
<div className={"df mr20"}>
<div className={"flex1 mr20"}>
<TPMMDEditor ref={this.props.editanswersRef} placeholder="请输入各个选项的具体解析或其他相关信息" mdID={'editanswersRefConts'} refreshTimeout={1500}
watch={true} className="courseMessageMD" initValue={this.props.editanswersRefval}></TPMMDEditor>
</div>
<div className={"choose_names"} style={{display:this.props.newquestioMDvaluetypes===true?"block":"none"}}>
<span className="color-orange mt8 fl" id="choose_name"
style={{display: 'inline'}}><i className="fa fa-exclamation-circle mr3"></i></span>
</div>
</div>
<p id="e_tip_editanswersQuestion" className="edu-txt-right color-grey-cd font-12 pdr20"></p>
<p id="e_tips_editanswersQuestion" className="edu-txt-right color-grey-cd font-12 pdr20"></p>
</div>
</div>
<div className="edu-back-white padding40-20 mb20">
<p className="color-grey-6 font-16 mb30">难度系数</p>
<div className="clearfix mb40">
<RadioGroup value={this.props.answeshixunsGroup} className="fl mr40"
disabled={this.props.status===2?true:false}
onChange={this.props.status===2?"":(e)=>this.props.onshixunGroupanswe(e)}>
<Radio value={1}>简单</Radio>
<Radio value={2}>中等</Radio>
<Radio value={3}>困难</Radio>
</RadioGroup>
</div>
<p className="color-grey-6 font-16 mb30">奖励经验值</p>
<div className="clearfix"
// onMouseLeave={this.onshixunsmarkss}
>
<span className="fl mr30 color-orange pt10">*</span>
<style>
{`
.ant-select-dropdown{
top:2295px !important;
}
`}
</style>
<Select style={{width: 120}} className="winput-240-40 fl"
id="challenge_score"
disabled={this.props.status===2?true:false}
onChange={this.props.status===2?"":(e)=>this.props.onshixunsansweSelect(e)}
// onMouseEnter={this.onshixunsmarks}
value={this.props.answeonshixunsmark}
// open={marktype}
>
{this.props.options}
</Select>
<p className="fl color-grey-9 font-12 ml20">
如果学员答题错误则不能得到相应的经验值<br/>
如果学员成功得到经验值那么将同时获得等值的金币奖励+10经验值+10金币
</p>
<span className="color-orange mt7 fl ml20 none" id="ex_value_notice"><i
className="fa fa-exclamation-circle mr3"></i></span>
</div>
</div>
<div className="edu-back-white padding40-20 mb20">
<p className="color-grey-6 font-16 mb30">技能标签</p>
<div className="clearfix df">
<span className="mr30 color-orange pt10">*</span>
<div className="flex1">
<Input type="text"
className="winput-240-40 fl mr20"
id="input_task_tag"
placeholder="添加标签"
onInput={(e)=>this.props.shixunssanswerkill(e)}
value={this.props.shixunssanswerkillvalue}
onPressEnter={(e)=>this.props.clickshixunsanswerskill(e)}
onBlur={(e)=>this.props.clickshixunsanswerskill(e)}
/>
{/*<a className="white-btn orange-btn fl mt1 use_scope-btn ml20 mt5 mr20"*/}
{/*onClick={this.clickshixunsanswerskill}>+ 添加</a>*/}
<div className="ml15 color-grey-9 mt5">学员答题正确将获得技能否则不能获得技能
<span className=" color-orange ml20" style={{display:this.props.challenge_tagtype===true?"inline-block":"none"}} id="stage_name_notice">
<i className="fa fa-exclamation-circle mr3"></i>
</span>
</div>
<div className="mt20 clearfix" id="task_tag_content">
{
this.props.shixunsskillanswerlist.length === 0 ? "" : this.props.shixunsskillanswerlist.map((itme, key) => {
return (
<li className="task_tag_span" key={key}><span>{itme}</span>
<a onClick={() =>this.props.delshixunssnswerllist(key)}>×</a>
</li>
)
})
}
</div>
</div>
</div>
</div>
<div className="clearfix mt30" style={{display:this.props.identity>4||this.props.identity===undefined||this.props.power===false?"none":"block"}}>
<a className="defalutSubmitbtn fl mr20"
onClick={()=>this.props.answer_subit()}>提交</a>
<a href={this.props.go_back_url}
className="defalutCancelbtn fl">取消</a>
</div>
</div>
)
}
}

@ -0,0 +1,84 @@
import React, {Component} from 'react';
import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom";
import TPMMDEditor from '../../tpm/challengesnew/TPMMDEditor';
export default class TpmQuestionMain extends Component {
constructor(props) {
super(props)
this.state = {
}
}
componentDidMount() {
}
render() {
return (
<div>
<div className="edu-back-white mb10 clearfix">
<div className="padding40-20">
<p className="color-grey-6 font-16 mb30">任务名称</p>
<div className="df">
<span className="mr30 color-orange pt10">*</span>
<div className="flex1 mr20">
<input type="text"
className={this.props.questionInputvaluetype === true ? "input-100-45 greyInpus wind100" : "input-100-45 greyInput "}
maxLength="50"
name="challenge[subject]"
value={this.props.questionsInputvalue}
placeholder="请输入任务名称(此信息将提前展示给学员),例:计算学生的课程成绩绩点"
onInput={this.props.questionInputvalue}
/>
</div>
<div style={{width: '57px'}}>
<span
className={this.props.questionInputvaluetype === true ? "color-orange mt8 fl" : "color-orange mt8 fl none"}
id="new_shixun_name"><i className="fa fa-exclamation-circle mr3"></i></span>
</div>
</div>
</div>
</div>
<div className="edu-back-white padding40-20 mb20">
<p className="color-grey-6 font-16 mb30">过关任务</p>
<div className="df">
<span className="mr30 color-orange pt10">*</span>
<div className="flex1 mr20">
<TPMMDEditor ref={this.props.contentMdRef} placeholder="请输入选择题的过关任务内容" mdID={'courseContentMD'} refreshTimeout={1500}
watch={true} className="courseMessageMD" initValue={this.props.contentMdRefval}></TPMMDEditor>
</div>
<div>
<span
className={this.props.questionInputvaluetypes === true ? "color-orange mt8 fl" : "color-orange mt8 fl none"}
id="new_shixun_pass"><i
className="fa fa-exclamation-circle mr3"></i></span>
</div>
</div>
<p id="e_tip_questioMDQuestion" className="edu-txt-right color-grey-cd font-12 pdr20"></p>
<p id="e_tips_questioMDQuestion" className="edu-txt-right color-grey-cd font-12 pdr20"></p>
</div>
<div className="clearfix mt30"
style={{display: this.props.identity > 4 || this.props.identity === undefined || this.props.power === false ? "none" : "block"}}>
<a className="defalutSubmitbtn fl mr20"
onClick={this.props.sumittype === true ? "" : this.props.clickquestionsumit}>提交</a>
<a href={this.props.go_back_url}
className="defalutCancelbtn fl">取消</a>
</div>
</div>
)
}
}

@ -0,0 +1,225 @@
import React, {Component} from 'react';
import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal,Tooltip} from 'antd';
import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom";
import TPMMDEditor from '../../tpm/challengesnew/TPMMDEditor';
const Option = Select.Option;
const RadioGroup = Radio.Group;
export default class TpmQuestionNew extends Component {
constructor(props) {
super(props)
this.state = {
}
}
componentDidMount() {
}
render() {
console.log( this.props.questionlists)
return (
<div>
<div className="edu-back-white mb10 clearfix">
<div className="padding40-20">
<p className="color-grey-6 font-16 mb30">题干</p>
<div className="df">
<span className="mr30 color-orange pt10">*</span>
<div className="flex1 mr20">
<TPMMDEditor ref={this.props.newquestioMDMdRef} placeholder="请输入选择题的题干内容" mdID={'newquestioMDid'} refreshTimeout={1500}
watch={true} className="courseMessageMD" initValue={this.props.contentMdRefval}></TPMMDEditor>
</div>
<div style={{width: '57px'}} style={{display:this.props.newquestioMDvaluetype===true?"block":"none"}}>
<span className="color-orange mt8 fl" id="choose_name"
style={{display: 'inline'}}><i className="fa fa-exclamation-circle mr3"></i></span>
</div>
</div>
<p id="e_tip_newquestioMDsQuestion" className="edu-txt-right color-grey-cd font-12 pdr20"></p>
<p id="e_tips_newquestioMDsQuestion" className="edu-txt-right color-grey-cd font-12 pdr20"></p>
<div id="shixun_form" className="mt10">
{
this.props.questionlists===undefined||this.props.questionlists.length===0?"":this.props.questionlists.map((item,key)=>{
return(
<li className="clearfix pr mb20 df questionli" key={key}>
<label className="fl"><span
className={item.type===true?"option-item fr mr10 color-grey select-choice check-option-bg":"option-item fr mr10 color-grey select-choice"}
onClick={()=>this.props.selquestionlists(key)}
name="option_span"
data-tip-down="点击设置答案"
>{item.str}</span></label>
<textarea className="input-flex-40 fl candiate_answer"
name="question[cnt][]"
placeholder="请输入选项内容"
value={item.val}
autoHeight="true"
id={"question"+key}
onInput={(e)=>this.props.onInputoquestionption(e,key)}
style={{resize: 'none', height: '62px'}}></textarea>
<a className="position-delete option_icon_remove" onClick={()=>this.props.delquestionlists(key)}>
<Tooltip placement="bottom" title={"删除"}>
<i className="fa fa-times-circle color-grey-c font-16 fl"></i>
</Tooltip>
</a>
</li>
)
})
}
<p className="clearfix ml40">
<a onClick={()=>this.props.addquestionlists()}
className="fl edu-default-btn edu-greyline-btn mb20 option_icon_add">新增选项</a>
<span className="color-orange mt8 fr mr20" style={{display:this.props.newcnttype===true?"block":"none"}}id="chooce_error">
<i className="fa fa-exclamation-circle mr3"></i>
{this.props.newcnttypesum===0?"请选择答案":"选项内容不能为空"}
</span>
</p>
<li className="clearfix color-grey-9 ">
<label className="fl ml40">温馨提示点击选项标题可以直接设置答案选择多个答案即为多选题</label>
<label className="fr mr20">标准答案
<span id="current-option" className="color-orange">{this.props.questionlistss===undefined?"请点击正确选项":this.props.questionlistss.length===0? <span>{this.props.standard_answer}</span>:this.props.questionlistss.map((item,key)=>{
return(
<span key={key}>{item}</span>
)
})}</span>
</label>
</li>
</div>
</div>
</div>
<div className={"edu-back-white mb10 clearfix"}>
<div className={"padding40-20"}>
<p className="color-grey-6 font-16 mb30">参考答案</p>
<div className={"df"}>
<div className={"flex1 mr20"}>
<TPMMDEditor ref={this.props.newquestioMDMdCont} placeholder="请输入各个选项的具体解析或其他相关信息" mdID={'newquestioMDMdConts'} refreshTimeout={1500}
watch={true} className="courseMessageMD" initValue={this.props.newquestioMDMdContval}></TPMMDEditor>
</div>
<div className={"choose_names"} style={{display:this.props.newquestioMDvaluetypes===true?"block":"none"}}>
<span className="color-orange mt8 fl" id="choose_name" style={{display: 'inline'}}><i className="fa fa-exclamation-circle mr3"></i></span>
</div>
</div>
<p id="e_tip_challenge_choose_answerQuestion" className="edu-txt-right color-grey-cd font-12 pdr20"></p>
<p id="e_tips_challenge_choose_answerQuestion" className="edu-txt-right color-grey-cd font-12 pdr20"></p>
</div>
</div>
<div className="edu-back-white padding40-20 mb20">
<p className="color-grey-6 font-16 mb30">难度系数</p>
<div className="clearfix mb40">
<RadioGroup value={this.props.answeshixunsGroup} className="fl mr40"
onChange={(e)=>this.props.onshixunGroupanswe(e)}
>
<Radio value={1}>简单</Radio>
<Radio value={2}>中等</Radio>
<Radio value={3}>困难</Radio>
</RadioGroup>
</div>
<p className="color-grey-6 font-16 mb30">奖励经验值</p>
<div className="clearfix"
// onMouseLeave={this.onshixunsmarkss}
>
<span className="fl mr30 color-orange pt10">*</span>
<style>
{`
.ant-select-dropdown{
top:2295px !important;
}
`}
</style>
<Select style={{width: 120}} className="winput-240-40 fl"
id="challenge_score"
onChange={(e)=>this.props.onshixunsansweSelect(e)}
// onMouseEnter={this.onshixunsmarks}
// open={marktype}
value={this.props.answeonshixunsmark}
>
{this.props.options}
</Select>
<p className="fl color-grey-9 font-12 ml20">
如果学员答题错误则不能得到相应的经验值<br/>
如果学员成功得到经验值那么将同时获得等值的金币奖励+10经验值+10金币
</p>
<span className="color-orange mt7 fl ml20 none" id="ex_value_notice"><i
className="fa fa-exclamation-circle mr3"></i></span>
</div>
</div>
<div className="edu-back-white padding40-20 mb20">
<p className="color-grey-6 font-16 mb30">技能标签</p>
<div className="clearfix df">
<span className="mr30 color-orange pt10">*</span>
<div className="flex1">
<Input type="text"
className="winput-240-40 fl mr20"
id="input_task_tag"
placeholder="添加标签"
onInput={(e)=>this.props.shixunssanswerkill(e)}
value={this.props.shixunssanswerkillvalue}
onPressEnter={(e)=>this.props.clickshixunsanswerskill(e)}
onBlur={(e)=>this.props.clickshixunsanswerskill(e)}
/>
{/*<a className="white-btn orange-btn fl mt1 use_scope-btn ml20 mt5 mr20"*/}
{/*onClick={this.clickshixunsanswerskill}>+ 添加</a>*/}
<div className="ml15 color-grey-9 mt5">学员答题正确将获得技能否则不能获得技能
<span className=" color-orange ml20" style={{display:this.props.challenge_tagtype===true?"inline-block":"none"}} id="stage_name_notice">
<i className="fa fa-exclamation-circle mr3"></i>
</span>
</div>
<div className="mt20 clearfix" id="task_tag_content">
{
this.props.shixunsskillanswerlist.length === 0 ? "" : this.props.shixunsskillanswerlist.map((itme, key) => {
return (
<li className="task_tag_span" key={key}><span>{itme}</span>
<a onClick={()=>this.props.delshixunssnswerllist(key)}>×</a>
</li>
)
})
}
</div>
</div>
</div>
</div>
<div className="clearfix mt30" style={{display:this.props.identity>4||this.props.identity===undefined||this.props.power===false?"none":"block"}}>
<a className="defalutSubmitbtn fl mr20"
onClick={this.props.answer_subit}>提交</a>
<a href={this.props.go_back_url}
className="defalutCancelbtn fl">取消</a>
</div>
</div>
)
}
}

@ -60,21 +60,21 @@ a{
#exercisememoMD .CodeMirror {
margin-top: 31px !important;
height: 658px !important;
height: 370px !important;
/*width: 579px !important;*/
}
#exercisememoMD .editormd-preview {
top: 40px !important;
height: 700px !important;
height: 370px !important;
width: 578px !important;
}
#exercisememoMD{
height: 700px !important;
/*height: 700px !important;*/
}
#questioMD{
/*width: 95% !important;*/
height: 586px !important;
height: 417px !important;
margin-left: 0% !important;
}
@ -82,13 +82,13 @@ a{
#questioMD .CodeMirror {
/*width: 550.5px !important;*/
margin-top: 31px !important;
height: 550px !important;
height: 374px !important;
}
#questioMD .editormd-preview {
top: 40px !important;
height: 550px !important;
width: 578px !important;
height: 375px !important;
width: 550px !important;
}
#newquestioMD .CodeMirror {

@ -77,7 +77,7 @@ class AccountPage extends Component {
}
`}</style>
<AccountNav {...this.props} {...common}></AccountNav>
<div className="basicFormWrap">
<Switch {...this.props}>
<Route exact path="/account/basic"
render={
@ -110,6 +110,7 @@ class AccountPage extends Component {
</Switch>
</div>
</div>
</div>
);
}
}

@ -22,7 +22,7 @@ class AccountBasicEdit extends Component {
const {basicInfo} =this.props
const showRealName = false;
return (
<div className="basicFormWrap">
<div>
<div className="basicForm">
<style>{`
.formItemInline {

@ -279,7 +279,7 @@ class AccountBasic extends Component {
let{basicInfo}=this.props
return (
<div className="basicFormWrap">
<div>
<ApplyForAddOrgModal ref="applyForAddOrgModal" wrappedComponentRef={(form) => this.applyForAddOrgForm = form} schoolName={school}
{...this.props}></ApplyForAddOrgModal>
<ApplyForAddChildOrgModal ref="applyForAddChildOrgModal" schoolName={school} schoolId={school_id} departmentName={departmentsName}

@ -24,7 +24,7 @@ class AccountCertification extends Component {
let {certification}=this.state
let {basicInfo} = this.props;
return (
<div className="basicFormWrap">
<div>
<RealNameCertificationModal ref="realNameCertificationModal" {...this.props}
wrappedComponentRef={(form) => this.realNameCertificationModal = form} certification={certification}
></RealNameCertificationModal>

@ -211,7 +211,7 @@ class AccountSecure extends Component {
const { getFieldDecorator } = this.props.form;
const { updating,seconds,secondsFlag } = this.state
return (
<div className="basicFormWrap">
<div>
<div className="basicForm settingForm">
<style>{`

Loading…
Cancel
Save