dev_forum
杨树林 6 years ago
parent be61ab77ee
commit d3c515392f

@ -16,7 +16,8 @@ class AccessoryModal extends Component{
ModalCancel:"", ModalCancel:"",
ModalSave:"", ModalSave:"",
loadtype:false, loadtype:false,
updatas:false updatas:false,
shixunsreplace:false
} }
} }
@ -103,7 +104,8 @@ class AccessoryModal extends Component{
Modalstype:false, Modalstype:false,
Modalstopval:"", Modalstopval:"",
ModalSave:this.ModalCancelModalCancel, ModalSave:this.ModalCancelModalCancel,
loadtype:false loadtype:false,
shixunsreplace:false,
}) })
this.props.Cancel() this.props.Cancel()
} }
@ -115,11 +117,11 @@ class AccessoryModal extends Component{
for(var list of fileList){ for(var list of fileList){
newfileList.push(list.response.id) newfileList.push(list.response.id)
} }
debugger
if (newfileList.length == 0) { if (newfileList.length == 0) {
// this.props.showNotification('请先上传附件') // this.props.showNotification('请先上传附件')
this.setState({ this.setState({
updatas:true shixunsreplace:true,
}) })
return; return;
} }
@ -130,7 +132,7 @@ debugger
attachment_ids:newfileList attachment_ids:newfileList
}).then((result)=>{ }).then((result)=>{
console.log(result) console.log(result)
if(result.data.status===0){ if(result !== undefined){
this.props.setupdate() this.props.setupdate()
this.props.showNotification('提交成功') this.props.showNotification('提交成功')
// this.setState({ // this.setState({
@ -139,7 +141,6 @@ debugger
// ModalSave:this.ModalCancelModalCancel, // ModalSave:this.ModalCancelModalCancel,
// loadtype:true // loadtype:true
// }) // })
this.ModalCancelModalCancel() this.ModalCancelModalCancel()
if(this.props.seeworks!=undefined){ if(this.props.seeworks!=undefined){
this.props.history.push(this.props.seeworks); this.props.history.push(this.props.seeworks);
@ -155,6 +156,46 @@ debugger
description:e.target.value description:e.target.value
}) })
} }
//确认
hidestartshixunsreplace=()=>{
let id=this.props.categoryid;
let {fileList,description} =this.state;
let newfileList=[];
for(var list of fileList){
newfileList.push(list.response.id)
}
let url= this.props.reviseAttachmentUrl || "/graduation_works/"+id+"/revise_attachment.json"
axios.post(url,{
description:description,
attachment_ids:newfileList
}).then((result)=>{
console.log(result)
if(result.data.status===0){
this.props.setupdate()
this.props.showNotification('提交成功')
// this.setState({
// Modalstype:true,
// Modalstopval:result.data.message,
// ModalSave:this.ModalCancelModalCancel,
// loadtype:true
// })
this.ModalCancelModalCancel()
if(this.props.seeworks!=undefined){
this.props.history.push(this.props.seeworks);
}
}
}).catch((error)=>{
})
}
//取消
hidestartshixunsreplacetwo=()=>{
this.setState({
shixunsreplace:false,
})
}
render(){ render(){
let {settextarea,fileList, let {settextarea,fileList,
@ -163,6 +204,7 @@ debugger
ModalCancel, ModalCancel,
ModalSave, ModalSave,
loadtype, loadtype,
shixunsreplace,
}=this.state; }=this.state;
let {course_groups}=this.props; let {course_groups}=this.props;
const uploadProps = { const uploadProps = {
@ -186,6 +228,25 @@ debugger
return( return(
<React.Fragment> <React.Fragment>
<Modal
keyboard={false}
title="提示"
visible={shixunsreplace}
closable={false}
footer={null}
>
<div className="task-popup-content">
<p className="task-popup-text-center font-16 ">还未上传附件</p>
<p className="task-popup-text-center font-16 pb20">是否确认提交作品?</p>
</div>
<div className="task-popup-submit clearfix">
<a className="task-btn task-btn-orange fr "
onClick={() => this.hidestartshixunsreplace()}>确认</a>
<a className="task-btn fr mr50"
onClick={() => this.hidestartshixunsreplacetwo()}>取消</a>
</div>
</Modal>
{/*提示*/} {/*提示*/}
<Modals <Modals
modalsType={Modalstype} modalsType={Modalstype}

@ -561,7 +561,7 @@ class Exercisesetting extends Component{
<div className="edu-back-white"> <div className="edu-back-white">
<div className="bor-bottom-greyE" style={{padding: "20px 30px 0px 30px"}}> <div className="bor-bottom-greyE" style={{padding: "20px 30px 0px 30px"}}>
<p className="mb30 clearfix"> <p className="mb30 clearfix">
<span className="font-16 fl">发布设置<span className="color-grey-c font-14">(课堂管理员教师助教拥有发布设置权限</span></span> <span className="font-16 fl">发布设置<span className="color-grey-c font-14"></span></span>
{ {
!flagPageEdit&&this.props.isAdmin()===true ? !flagPageEdit&&this.props.isAdmin()===true ?
<a className="fr mr6" onClick={this.editSetting}> <a className="fr mr6" onClick={this.editSetting}>
@ -660,7 +660,7 @@ class Exercisesetting extends Component{
<Form.Item className="fl pollForm"> <Form.Item className="fl pollForm">
{getFieldDecorator('time') {getFieldDecorator('time')
( (
<Input disabled={!flagPageEdit} className="mr10" style={{width:"100px" }} <Input disabled={!flagPageEdit} className="mr10" style={{width:"100px",height:"35px" }}
value={time===-1?"":time} value={time===-1?"":time}
onInput={this.funlatepenalty}/> onInput={this.funlatepenalty}/>
)} )}

@ -253,7 +253,7 @@ class GraduationTasksappraise extends Component{
<div className={"color-grey-6 mb10 "}> <div className={"color-grey-6 mb10 "}>
补交附件 补交附件
</div> </div>
<div className={"ml20"}> <div className={"ml20"} style={{"white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word"}}>
补交原因{firelistdata&&firelistdata.revise_reason} 补交原因{firelistdata&&firelistdata.revise_reason}
</div> </div>

@ -640,6 +640,7 @@ class GraduationTaskssettinglist extends Component{
title: '姓名', title: '姓名',
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
className:'edu-txt-center' className:'edu-txt-center'
}, { }, {
title: '学号', title: '学号',

@ -45,7 +45,16 @@ class ShixunWorkReport extends Component {
shixuntypes:type[3] shixuntypes:type[3]
}) })
} }
jumptopic=(anchorName)=>{
; if (anchorName) {
// 找到锚点
let anchorElement = document.getElementById(anchorName);
// 如果对应id的锚点存在就跳转到锚点
if(anchorElement) {
anchorElement.scrollIntoView();
}
}
}
render() { render() {
let{data} =this.state; let{data} =this.state;
let category_id=data===undefined?"":data.category.category_id; let category_id=data===undefined?"":data.category.category_id;
@ -100,6 +109,7 @@ class ShixunWorkReport extends Component {
<OfficialAcademicTranscript <OfficialAcademicTranscript
data={data} data={data}
jumptopic={this.jumptopic}
/> />
</div> </div>
@ -167,7 +177,7 @@ class ShixunWorkReport extends Component {
{ {
data&&data.shixun_detail===undefined?"":data.shixun_detail.map((item,key)=>{ data&&data.shixun_detail===undefined?"":data.shixun_detail.map((item,key)=>{
return( return(
<div key={key} className={"mb20"}> <div id={"id"+item.position} key={key} className={"mb20"}>
<div className="font-16 color-dark-21 ml20 mr20"> <div className="font-16 color-dark-21 ml20 mr20">
<p className="clearfix mb20"> <p className="clearfix mb20">
<span className="panel-inner-icon mr15 fl mt3 backgroud4CACFF"> <span className="panel-inner-icon mr15 fl mt3 backgroud4CACFF">
@ -175,7 +185,7 @@ class ShixunWorkReport extends Component {
</span> </span>
<span className="fl mt3 font-14"> <span className="fl mt3 font-14">
<span className="font-bd mr15">{item.position}</span> <span className="font-bd mr15">{item.position}</span>
<Link to={/tasks/+item.game_identifier}> <Link to={/tasks/+item.game_identifier} >
<span className={"font-14"}>{item.subject}</span> <span className={"font-14"}>{item.subject}</span>
</Link> </Link>
</span> </span>
@ -185,8 +195,8 @@ class ShixunWorkReport extends Component {
/> />
</div> </div>
{item.st===0?<div className="font-16 color-dark-21 ml20 mr20"> {item.st===0?<div className="font-16 color-dark-21 ml20 mr20">
<div className="bor-grey-e mt15"> <div className="bor-grey-e mt15" >
<p className="clearfix pt5 pb5 pl15 pr15 back-f6-grey codebox"> <p className="clearfix pt5 pb5 pl15 pr15 back-f6-grey codebox">
<span className="fl">最近通过的代码</span> <span className="fl">最近通过的代码</span>
<span className="fr codeboxright">{item.path}</span> <span className="fr codeboxright">{item.path}</span>

@ -74,6 +74,9 @@ class ShixunWorkModal extends Component{
response.data. course_groups.group_list&&response.data.group_list.map((item,key)=>{ response.data. course_groups.group_list&&response.data.group_list.map((item,key)=>{
newgroup_list.push(item) newgroup_list.push(item)
}) })
response.data. course_groups.ungroup_list&&response.data.ungroup_list.map((items,keys)=>{
newgroup_list.push(items)
})
this.setState({ this.setState({
course_groups:response.data, course_groups:response.data,
group_list:newgroup_list, group_list:newgroup_list,
@ -123,6 +126,15 @@ class ShixunWorkModal extends Component{
isSave=()=>{ isSave=()=>{
let{group_ids}=this.state; let{group_ids}=this.state;
if(group_ids&&group_ids.length === 0){
this.props.showNotification(`请先选择分班`);
return
}
if(group_ids&&group_ids.length < 2){
this.props.showNotification(`有效作品数少于2个无法查重`);
return
}
let url="/homework_commons/"+this.props.match.params.homeworkid+"/homework_code_repeat.json"; let url="/homework_commons/"+this.props.match.params.homeworkid+"/homework_code_repeat.json";
axios.post(url, { axios.post(url, {
group_ids: group_ids, group_ids: group_ids,

@ -1,173 +1,181 @@
import React, {Component} from "react"; import React, {Component} from "react";
import {WordsBtn} from 'educoder'; import {WordsBtn} from 'educoder';
import {Table} from "antd"; import {Table} from "antd";
import {Link,Switch,Route,Redirect} from 'react-router-dom'; import {Link,Switch,Route,Redirect} from 'react-router-dom';
class OfficialAcademicTranscript extends Component { class OfficialAcademicTranscript extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
loadingstate:true, loadingstate:true,
datas:undefined datas:undefined
} }
} }
componentDidMount() { componentDidMount() {
} }
myjumptopic=(e)=>{
render() { console.log("获取到值");
console.log(e);
let {data}=this.props; this.props.jumptopic(e);
}
let datas=[];
if(data!=undefined){ render() {
data.stage_list===undefined?"":data.stage_list.forEach((item,key)=>{
datas.push({ let {data}=this.props;
customs: key+1,
taskname:{name:item.name,complete_status:item.complete_status}, let datas=[];
openingtime:item.open_time, if(data!=undefined){
evaluating: item.evaluate_count, data.stage_list===undefined?"":data.stage_list.forEach((item,key)=>{
finishtime:item.finished_time, datas.push({
elapsedtime:item.time_consuming, customs: key+1,
empvalue:{myself:item.myself_experience,experience:item.experience}, taskname:{name:item.name,complete_status:item.complete_status},
// adjustmentminute:asdasd openingtime:item.open_time,
}) evaluating: item.evaluate_count,
}) finishtime:item.finished_time,
} elapsedtime:item.time_consuming,
empvalue:{myself:item.myself_experience,experience:item.experience},
// adjustmentminute:asdasd
})
let columns=[{ })
title: '关卡', }
dataIndex: 'customs',
key: 'customs',
render: (text, record) => (
<span className={"color-grey-9"}> let columns=[{
{record.customs} title: '关卡',
</span> dataIndex: 'customs',
), key: 'customs',
}, { render: (text, record) => (
title: '任务名称', <span className={"color-grey-9"}>
dataIndex: 'taskname', {record.customs}
key: 'taskname', </span>
render: (text, record) => ( ),
<span> }, {
<span className={"task-hide"}>{record.taskname.name}</span> title: '任务名称',
{record.taskname.complete_status===2?<span className={"tasknamebox ml10"}>延时</span>:record.taskname.complete_status===3?<span className={"tasknameboxs ml10"}></span>:""} dataIndex: 'taskname',
</span> key: 'taskname',
), render: (text, record) => (
}, { <span>
title: '开启时间', <span className={"task-hide"} style={{color:"#676767"}}><a className="tasknameName font-14" onClick={()=>this.myjumptopic("id"+record.customs)} >{record.taskname.name}</a></span>
dataIndex: 'openingtime', {record.taskname.complete_status===2?<span className={"tasknamebox ml10"}>延时</span>:record.taskname.complete_status===3?<span className={"tasknameboxs ml10"}></span>:""}
key: 'openingtime', </span>
render: (text, record) => ( ),
<span className={"color-grey-9"}> }, {
{record.openingtime} title: '开启时间',
</span> dataIndex: 'openingtime',
), key: 'openingtime',
}, { render: (text, record) => (
title: '评测次数', <span className={"color-grey-9"}>
key: 'evaluating', {record.openingtime}
dataIndex: 'evaluating', </span>
),
render: (text, record) => ( }, {
<span className={"color-grey-9"}> title: '评测次数',
{record.evaluating} key: 'evaluating',
</span> dataIndex: 'evaluating',
),
}, { render: (text, record) => (
title: '完成时间', <span className={"color-grey-9"}>
key: 'finishtime', {record.evaluating}
dataIndex: 'finishtime', </span>
render: (text, record) => ( ),
<span className={"color-grey-9"}> }, {
{record.finishtime} title: '完成时间',
</span> key: 'finishtime',
), dataIndex: 'finishtime',
}, { render: (text, record) => (
title: '耗时', <span className={"color-grey-9"}>
key: 'elapsedtime', {record.finishtime}
dataIndex: 'elapsedtime', </span>
),
render: (text, record) => ( }, {
<span> title: '耗时',
{record.elapsedtime} key: 'elapsedtime',
</span> dataIndex: 'elapsedtime',
),
}, { render: (text, record) => (
title: '经验值', <span>
key: 'empvalue', {record.elapsedtime}
dataIndex: 'empvalue', </span>
),
render: (text, record) => ( }, {
<span> title: '经验值',
<span style={{color:'#29BD8B'}}>{record.empvalue.myself}</span><span className={"color-grey-9"}>/{record.empvalue.experience}</span> key: 'empvalue',
</span> dataIndex: 'empvalue',
),
}]; render: (text, record) => (
// { <span>
// title: '调分', <span style={{color:'#29BD8B'}}>{record.empvalue.myself}</span><span className={"color-grey-9"}>/{record.empvalue.experience}</span>
// key: 'adjustmentminute', </span>
// dataIndex: 'adjustmentminute', ),
// }];
// render: (text, record) => ( // {
// <span> // title: '调分',
// <a>6小时 50分钟 6秒</a> // key: 'adjustmentminute',
// </span> // dataIndex: 'adjustmentminute',
// ), //
// }, // render: (text, record) => (
// <span>
// <a>6小时 50分钟 6秒</a>
// </span>
return ( // ),
<div> // },
{/*{data===undefined?"":""}*/}
<style>{`
.ant-table-thead > tr > th{
text-align: center; return (
} <div>
.tasknamebox{ {/*{data===undefined?"":""}*/}
width: 50px; <style>{`
height: 24px; .ant-table-thead > tr > th{
border: 1px solid rgba(221,23,23,1); text-align: center;
border-radius: 12px; }
color: rgba(221,23,23,1); .tasknamebox{
display: inline-block; width: 50px;
line-height: 24px; height: 24px;
} border: 1px solid rgba(221,23,23,1);
border-radius: 12px;
.tasknameboxs{ color: rgba(221,23,23,1);
color: #666666 !important; display: inline-block;
background:rgba(237,237,237,1) !important; line-height: 24px;
} }
.ant-table-tbody > tr > td{ .tasknameboxs{
font-size:14px; color: #666666 !important;
} background:rgba(237,237,237,1) !important;
.task-hide{ }
max-width: 345px;
overflow: hidden; .ant-table-tbody > tr > td{
white-space: nowrap; font-size:14px;
text-overflow: ellipsis; }
} .task-hide{
.ant-table-tbody > tr{ max-width: 345px;
height:64px; overflow: hidden;
} white-space: nowrap;
`} text-overflow: ellipsis;
</style> }
{datas===undefined?"":<Table .ant-table-tbody > tr{
dataSource={datas} height:64px;
columns={columns} }
pagination={false} .tasknameName:link{color:#676767}
// loading={loadingstate} .tasknameName:hover{color:#4CACFF}
// onChange={this.TablePagination}
/>} `}
</div> </style>
{datas===undefined?"":<Table
) dataSource={datas}
} columns={columns}
} pagination={false}
// loading={loadingstate}
// onChange={this.TablePagination}
/>}
</div>
)
}
}
export default OfficialAcademicTranscript; export default OfficialAcademicTranscript;
Loading…
Cancel
Save