dev_forum
杨树明 6 years ago
parent 6e184654e8
commit 819bfed857

@ -342,8 +342,17 @@ class GraduationTasksnew extends Component {
</style>
{/*内容*/}
<div className="stud-class-set bor-bottom-greyE pt20 pl20 pr20 pb25 edu-back-white">
<Form.Item label="类型" >
<style>
{
`
.tasktype .ant-form-explain{
margin-top: -20px;
margin-bottom: 15px;
}
`
}
</style>
<Form.Item label="类型" className={"tasktype"}>
{getFieldDecorator('tasktype', {
rules: [{required: true, message: "请选择任务类型"}],
})(<Select className={"greyInput mb20"}
@ -355,8 +364,17 @@ class GraduationTasksnew extends Component {
<input type="hidden" id='tasktypes'/>
<span className={"newcoursestitle"}>选择确认后无法修改</span>
</Form.Item>
<Form.Item label="任务标题" >
<style>
{
`
.taskname .ant-form-explain{
margin-top: 0px;
margin-bottom: 0px;
}
`
}
</style>
<Form.Item label="任务标题" className={"taskname"} >
{getFieldDecorator('name', {
rules: [{required: true, message: "不能为空"}],
})(<Input placeholder="请输入任务名称最大限制60个字符" value={title_value} onInput={this.changeTitle}

@ -1195,7 +1195,7 @@ export default class TPMsettings extends Component {
}
</Select>
<p
className="edu-txt-right font-12"
className="edu-txt-left font-12"
style={{display:operateauthority?"block":'none'}}
>
列表中没有
@ -1214,6 +1214,7 @@ export default class TPMsettings extends Component {
<label className="panel-form-label fl"><span
className="color-red fl mt3">*</span>&nbsp;&nbsp;</label>
<textarea className="fl task-form-80 task-height-150"
style={{width:'100%'}}
onInput={this.sendsure_applyvalues}
value={sendsure_applyvalue}
placeholder="请输入新增镜像需要安装的软件及版本等信息" id="demand_info"></textarea>
@ -1354,10 +1355,11 @@ export default class TPMsettings extends Component {
<textarea className="task-form-80 task-height-150 panel-box-sizing fl mt10"
onInput={this.Executiveorder}
value={Executiveordervalue}
style={{width:'100%'}}
id="executive_command"
>
</textarea>
<p className="-text-danger fl mt10 ml95"
<p className="-text-danger fl mt5"
id="executive_command_notice"
style={{display: Executivetyoe === false ? "none" : "block"}}
>执行命令不能为空</p>
@ -1369,6 +1371,7 @@ export default class TPMsettings extends Component {
value={Compilecommandvalue}
onInput={this.Compilecommand}
id="compile_command"
style={{width:'100%'}}
>
</textarea>
</li>

@ -381,7 +381,7 @@ export default class TPMevaluation extends Component {
// })
// }
savegetfilepath=(value)=>{
let {selectpath} = this.state
let {selectpath,saveshixunfilepath} = this.state
// let newarr =selectpatharr;
// let arrtype=false;
// let arrsum=0;
@ -403,9 +403,28 @@ export default class TPMevaluation extends Component {
// newselectpath=newselectpath+newarr[z]+ ""
// }
// let newselectpath=selectpath+value+ ""
let newselectpath=value
let newselectpath;
if(saveshixunfilepath==="shixunfilepathplay"){
newselectpath=value
}else{
const type = selectpath.split('');
let types=false;
for(var i=0; i<type.length; i++){
if(type[i]===value){
types=true
return
}
}
if(types===false){
newselectpath=selectpath+value+ ""
}else{
newselectpath=selectpath
}
}
this.setState({
// selectpatharr:newarr,
selectpath: newselectpath,

@ -4,7 +4,7 @@ import {TPMIndexHOC} from '../TPMIndexHOC';
import {SnackbarHOC} from 'educoder';
import {Input, Select, Radio, Checkbox, Modal, Icon, DatePicker,Upload,Button,message,Form} from 'antd';
import {Input, Select, Radio, Checkbox, Modal, Icon, DatePicker,Upload,Button,message,Form,notification} from 'antd';
// import "antd/dist/antd.css";
@ -523,9 +523,17 @@ class Newshixuns extends Component {
return item.response ? item.response.id : item.id
})
}
debugger
if( attachment_ids === undefined || attachment_ids.length===0){
this.props.showNotification(`请上传附件`);
notification.open(
{
message: '提示',
description:
'请上传附件!',
}
)
return;
}
// console.log("attachment_ids"+attachment_ids);
@ -563,7 +571,16 @@ class Newshixuns extends Component {
testcoderunmode:"",
})
}
this.props.showNotification('提交成功!');
// this.props.showNotification('提交成功!');
notification.open(
{
message: '提示',
description:
'提交成功!',
}
)
this.sendhideModaly()
// this.props.history.push(`/courses/${cid}/graduation_topics`);
// }
}
@ -763,8 +780,15 @@ class Newshixuns extends Component {
// console.log('beforeUpload', file.name);
const isLt150M = file.size / 1024 / 1024 < 50;
if (!isLt150M) {
this.props.showNotification(`文件大小必须小于50MB`);
// this.props.showNotification(`文件大小必须小于50MB`);
notification.open(
{
message: '提示',
description:
'文件大小必须小于50MB',
}
)
}
if(thiss.state.file !== undefined){
console.log("763")
@ -881,7 +905,7 @@ class Newshixuns extends Component {
})
}
</Select>
<p className="edu-txt-right font-12">
<p className="edu-txt-left font-12">
列表中没有
<a className="color-blue" onClick={this.post_apply}> 申请新建</a>
</p>

@ -33,6 +33,7 @@ class Collaborators extends Component {
Collaboratorsvisible: false,
Collaboratorsvisibleadmin: false,
value: 1,
page: 1,
Searchadmin: [],
allChangechecked: false,
Collaboratorslist: [],
@ -155,6 +156,9 @@ class Collaborators extends Component {
}
onSearchadmin = (value) => {
let {collaboratorList,user_name,school_name} = this.state;
this.setState({
Searchadmin: [],
})
// if (value === "") {
// this.setState({
// Searchadmin: [],
@ -172,7 +176,7 @@ class Collaborators extends Component {
if (response.data.status === 403||response.data.status === 401||response.data.status === 500) {
}else{
let newlist = response.data;
let newlist = response.data.users;
for (var i = 0; i < newlist.length; i++) {
newlist[i].checked = false
}
@ -336,7 +340,48 @@ class Collaborators extends Component {
collaboratorListsumtype:false
})
}
render() {
contentViewScrolledit=(e)=>{
//滑动到底判断
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){
let {page,collaboratorList,user_name,school_name,Searchadmin} = this.state;
let newpage=page+1;
let newSearchadmin=Searchadmin
let id = this.props.match.params.shixunId;
let url = "/shixuns/" + id + "/add_collaborators.json";
axios.get(url,{params:{
user_name:user_name ,
school_name:school_name,
page:newpage
}}).then((response) => {
if (response.data.status === 403||response.data.status === 401||response.data.status === 500) {
}else{
let newlist = response.data.users;
for (var i = 0; i < newlist.length; i++) {
newlist[i].checked = false
newSearchadmin.push(newlist[i])
}
console.log(newSearchadmin)
this.setState({
Searchadmin: newSearchadmin,
collaboratorList: collaboratorList,
page:newpage
})
}
}).catch((error) => {
console.log(error)
});
}
}
render() {
let {
collaboratorList,
Collaboratorsvisible,
@ -445,13 +490,13 @@ class Collaborators extends Component {
>搜索</a>
<p className="clearfix pl35 mt20">
<span className="fl edu-txt-w80 task-hide font-bd ml10 edu-txt-left">姓名</span>
<span className="fl edu-txt-w80 task-hide font-bd">呢称</span>
<span className="fl edu-txt-w80 task-hide font-bd">职业</span>
<span className="fl edu-txt-w180 task-hide font-bd ml50">单位</span>
</p>
<div className="mt5" style={{background: '#f7f9fd'}}>
<div className="clearfix">
<ul className="upload_select_box fl" id="search_not_teachers_list">
<ul className="upload_select_box fl" id="search_not_teachers_list" onScroll={this.contentViewScrolledit}>
{Searchadmin.length === 0 ? <li style={{textAlign: 'center'}}>
<span>请试试搜索一下</span>
</li> : Searchadmin.map((item, key) => {
@ -460,10 +505,12 @@ class Collaborators extends Component {
<Checkbox className="fl mr20" checked={item.checked}
onChange={(e) => this.selectChangenickname(e, key)}
id={item.user_id}></Checkbox>
<a className="task-hide color-grey3 ml20 fl span1 edu-txt-w80">{item.nickname}</a>
<a className="task-hide color-grey3 fl span1 edu-txt-w80 edu-txt-left">{item.nickname}</a>
<span className="task-hide fl color-grey edu-txt-w80 span2">{item.identify}</span>
<span
className="span3 color-grey fl edu-txt-w260 task-hide">{item.school_name}</span>
title={item.school_name}
style={{width: '150px'}}
className="span3 color-grey fl edu-txt-w260 task-hide ml50 task-hide" >{item.school_name}</span>
</li>
)
})

Loading…
Cancel
Save