dev_cs_new
杨树林 6 years ago
commit c603e8c32c

@ -39,6 +39,7 @@ class ApplicationController < ActionController::Base
@user_course_identity = current_user.course_identity(@course) @user_course_identity = current_user.course_identity(@course)
if @user_course_identity > Course::STUDENT && @course.is_public == 0 if @user_course_identity > Course::STUDENT && @course.is_public == 0
tip_exception(401, "..") unless User.current.logged? tip_exception(401, "..") unless User.current.logged?
check_account
tip_exception(409, "您没有权限进入") tip_exception(409, "您没有权限进入")
end end
uid_logger("###############user_course_identity:#{@user_course_identity}") uid_logger("###############user_course_identity:#{@user_course_identity}")

@ -17,6 +17,7 @@ module Searchable::Dependents::User
# reindex subject # reindex subject
created_subjects.each(&:reindex) created_subjects.each(&:reindex)
subjects.each(&:reindex)
end end
end end
end end

@ -27,6 +27,7 @@ module Searchable::Subject
{ {
author_name: user.real_name, author_name: user.real_name,
author_school_name: user.school_name, author_school_name: user.school_name,
member_user_names: users.map(&:real_name).join(' ')
} }
end end

@ -246,6 +246,10 @@ class Shixun < ApplicationRecord
Game.joins(:myshixun).where(user_id: user.id, status: 2, myshixuns: { shixun_id: id }).count Game.joins(:myshixun).where(user_id: user.id, status: 2, myshixuns: { shixun_id: id }).count
end end
def has_web_route?
self.mirror_name.include?('JFinal') || self.mirror_name.include?('PHP') && self.mirror_name.include?('Mysql') || self.mirror_name.include?('Web')
end
private private
def send_tiding def send_tiding

@ -29,6 +29,7 @@ module ElasticsearchAble
subject_stages: { type: 'plain' }, subject_stages: { type: 'plain' },
content: { type: 'plain' }, content: { type: 'plain' },
descendants_contents: { type: 'plain' }, descendants_contents: { type: 'plain' },
member_user_names: { type: 'plain' }
} }
} }
end end

@ -169,7 +169,7 @@ input::-ms-clear{display:none;}
.newContainer{ min-height:100%; height: auto !important; height: 100%; /*IE6不识别min-height*/position: relative;} .newContainer{ min-height:100%; height: auto !important; height: 100%; /*IE6不识别min-height*/position: relative;}
.educontent{width: 1200px;margin:0px auto;box-sizing: border-box}/*中间部分宽度固定为1200*/ .educontent{width: 1200px;margin:0px auto;box-sizing: border-box}/*中间部分宽度固定为1200*/
.newMain{ margin: 0 auto; padding-bottom: 235px; min-width:1200px;padding-top: 60px}/*padding-bottom根据底部的高度而定*/ .newMain{ margin: 0 auto; padding-bottom: 235px; min-width:1200px;}/*padding-bottom根据底部的高度而定*/
/*高度*/ /*高度*/
.height-100{height: 100%;} .height-100{height: 100%;}

@ -13,6 +13,7 @@ elsif @tab == 1
# 评测设置的编辑模式 # 评测设置的编辑模式
json.(@challenge, :id, :path, :exec_path, :show_type, :original_picture_path, :expect_picture_path, :picture_path, json.(@challenge, :id, :path, :exec_path, :show_type, :original_picture_path, :expect_picture_path, :picture_path,
:web_route, :test_set_score, :test_set_average) :web_route, :test_set_score, :test_set_average)
json.has_web_route @shixun.has_web_route?
json.test_sets @challenge.test_sets do |set| json.test_sets @challenge.test_sets do |set|
json.hidden (set.is_public ? 0 : 1) json.hidden (set.is_public ? 0 : 1)
json.(set, :input, :output, :score) json.(set, :input, :output, :score)

@ -3,6 +3,7 @@ json.candidates do
json.id user.id json.id user.id
json.name user.real_name json.name user.real_name
json.nickname user.nickname json.nickname user.nickname
json.login user.login
json.school_name user.user_extension.school.try(:name) json.school_name user.user_extension.school.try(:name)
json.school_id user.user_extension.school.try(:id) json.school_id user.user_extension.school.try(:id)
json.added @course.course_member?(user.id, [1, 2, 3]) json.added @course.course_member?(user.id, [1, 2, 3])

@ -7,7 +7,8 @@ json.group_list do
end end
end end
# 未分班展示情况放在最后 # 未分班展示情况放在最后
if @course_groups.count != (@page.to_i - 1)*@limit.to_i && @course_groups.count < @limit.to_i if (@course_groups.count != (@page.to_i - 1)*@limit.to_i && @course_groups.count < @limit.to_i) ||
(@page.to_i == 1 && @course_groups.count == 0)
ungroup_work_count = homework_ungroup_works_count(@homework, @ungroup_user_ids) ungroup_work_count = homework_ungroup_works_count(@homework, @ungroup_user_ids)
if ungroup_work_count > 0 if ungroup_work_count > 0
json.ungroup_list do json.ungroup_list do

@ -301,8 +301,8 @@ module.exports = {
}, },
warnings: false, warnings: false,
compress: { compress: {
drop_debugger: false, drop_debugger: true,
drop_console: false drop_console: true
} }
} }
}), }),

@ -10,7 +10,6 @@ broadcastChannelOnmessage('refreshPage', () => {
}) })
function locationurl(list){ function locationurl(list){
debugger
if (window.location.port === "3007") { if (window.location.port === "3007") {
} else { } else {
@ -44,6 +43,10 @@ export function initAxiosInterceptors(props) {
// proxy = "https://testeduplus2.educoder.net" // proxy = "https://testeduplus2.educoder.net"
proxy="http://47.96.87.25:48080" proxy="http://47.96.87.25:48080"
// wy
// proxy="http://192.168.2.63:3001"
// 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求 // 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求
// 如果需要支持重复的请求考虑config里面自定义一个allowRepeat参考来控制 // 如果需要支持重复的请求考虑config里面自定义一个allowRepeat参考来控制
const requestMap = {}; const requestMap = {};

@ -68,7 +68,7 @@ class ListPageIndex extends Component{
constructor(props) { constructor(props) {
super(props); super(props);
this.state={ this.state={
yslGuideone:true, yslGuideone:null,
} }
} }
@ -96,9 +96,8 @@ class ListPageIndex extends Component{
} }
render() { render() {
let {yslGuideone} =this.state; let {yslGuideone} =this.state;
console.log("98"); // console.log("98");
console.log(yslGuideone); // console.log(yslGuideone);
// console.log(this.props.isAdmin());
return ( return (
<div> <div>
<div className="newMain clearfix"> <div className="newMain clearfix">

@ -85,9 +85,9 @@ function buildColumns(that, student_works) {
overflow: 'hidden', overflow: 'hidden',
textOverflow: 'ellipsis', textOverflow: 'ellipsis',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
width: '98px', width: '74px',
margin: '0 auto' margin: '0 auto'
}} title={text}> }} title={text && text.length > 5 ? text : ''}>
{/* <Tooltip placement="bottom" title={text}> {/* <Tooltip placement="bottom" title={text}>
</Tooltip> */} </Tooltip> */}
{text} {text}
@ -136,7 +136,7 @@ function buildColumns(that, student_works) {
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a href="javascript:;" style={{color:'#4CACFF'}}>{record.work_group}</a> <a href="javascript:void(0);" style={{color:'#4CACFF'}}>{record.work_group}</a>
</span> </span>
), ),
}) })
@ -150,7 +150,8 @@ function buildColumns(that, student_works) {
render: (project_info, record) => ( render: (project_info, record) => (
<span> <span>
{project_info && project_info.name && <a href={`/projects/${project_info.id}`} target="_blank" {project_info && project_info.name && <a href={project_info.id == -1 ? 'javascript:void(0)' : `/projects/${project_info.id}`}
target={ project_info.id == -1 ? '' : "_blank" }
className="overflowHidden1" style={{color:'#4CACFF', width: '80px', margin: '0 auto', display: 'block'}} title={project_info.name} className="overflowHidden1" style={{color:'#4CACFF', width: '80px', margin: '0 auto', display: 'block'}} title={project_info.name}
>{project_info.name}</a>} >{project_info.name}</a>}
</span> </span>
@ -184,7 +185,7 @@ function buildColumns(that, student_works) {
</span> </span>
)}, )},
}, { }, {
width: 150, width: 106,
title: '更新时间', title: '更新时间',
dataIndex: 'update_time', dataIndex: 'update_time',
key: 'update_time', key: 'update_time',
@ -249,7 +250,8 @@ function buildColumns(that, student_works) {
*/ */
columns.push({ columns.push({
width: 84, width: 84,
title: <div style={{color: 'rgba(0,0,0,.85)'}}><div style={{color: 'rgba(0,0,0,.85)'}}>匿评</div></div>, // title: <div style={{color: 'rgba(0,0,0,.85)'}}><div style={{color: 'rgba(0,0,0,.85)'}}>匿评</div>评分</div>,
title: <div style={{color: 'rgba(0,0,0,.85)'}}>匿评评分</div>,
key: 'student_score', key: 'student_score',
dataIndex: 'student_score', dataIndex: 'student_score',
@ -323,7 +325,7 @@ function buildColumns(that, student_works) {
} }
if (isAdminOrStudent || that.props.work_public == true) { if (isAdminOrStudent || that.props.work_public == true) {
columns.push({ columns.push({
width: 92, width: 72,
title: '操作', title: '操作',
key: 'operation', key: 'operation',
dataIndex: 'operation', dataIndex: 'operation',
@ -614,6 +616,7 @@ class CommonWorkList extends Component{
ref="checkCodeModal" ref="checkCodeModal"
{...this.props} {...this.props}
></CheckCodeModal> ></CheckCodeModal>
<AccessoryModal <AccessoryModal
{...this.props} {...this.props}
modalname={"补交附件"} modalname={"补交附件"}
@ -649,6 +652,10 @@ class CommonWorkList extends Component{
position: absolute; position: absolute;
right: 18px; right: 18px;
} }
.workListContent .ant-table-thead > tr > th, .workListContent .ant-table-tbody > tr > td {
padding: 10px 1px;
}
`}</style> `}</style>
<div style={{ background: '#fff'}} className="workListContent"> <div style={{ background: '#fff'}} className="workListContent">
{ isAdmin && <ul className="clearfix" style={{padding: "20px 40px 10px", position: 'relative', paddingLeft: '24px'}}> { isAdmin && <ul className="clearfix" style={{padding: "20px 40px 10px", position: 'relative', paddingLeft: '24px'}}>

@ -498,13 +498,13 @@ class CoursesBanner extends Component {
</style> </style>
<Breadcrumb separator="|" className={"mt5"}> <Breadcrumb separator="|" className={"mt5"}>
<Breadcrumb.Item href={"/courses/"+this.props.match.params.coursesId+"/teachers"}> <Breadcrumb.Item href={"/courses/"+this.props.match.params.coursesId+"/teachers"}>
<span className="color-grey-c font-16">教师 {coursedata.teacher_count}</span> <span className="color-grey-c font-16"><span className={"mr10"}>教师</span> <span className={"mr10"}>{coursedata.teacher_count}</span></span>
</Breadcrumb.Item> </Breadcrumb.Item>
<Breadcrumb.Item href={"/courses/"+this.props.match.params.coursesId+"/students"}> <Breadcrumb.Item href={"/courses/"+this.props.match.params.coursesId+"/students"}>
<span className="color-grey-c font-16">学生 {coursedata.student_count}</span> <span className="color-grey-c font-16"><span className={"mr10 ml10"}>学生</span> <span className={"mr10"}>{coursedata.student_count}</span></span>
</Breadcrumb.Item> </Breadcrumb.Item>
<Breadcrumb.Item>{coursedata.credit===null?"": <Breadcrumb.Item>{coursedata.credit===null?"":
<span className="color-grey-c font-16">学分 {coursedata.credit}</span> <span className="color-grey-c font-16"><span className={"mr10 ml10"}>学分</span> <span className={"mr10"}>{coursedata.credit}</span></span>
}</Breadcrumb.Item> }</Breadcrumb.Item>
</Breadcrumb> </Breadcrumb>

@ -221,7 +221,7 @@ class AddStudentModal extends Component{
</p> </p>
<Spin size="large" spinning={isSpin}> <Spin size="large" spinning={isSpin}>
{ users && users.length ? <div> { loading || users.length ? <div>
{/* https://github.com/CassetteRocks/react-infinite-scroller/issues/70 */} {/* https://github.com/CassetteRocks/react-infinite-scroller/issues/70 */}
<div className="edu-back-skyblue padding10-15" style={{"height":"300px", overflowY: "scroll", overflowAnchor: 'none' }}> <div className="edu-back-skyblue padding10-15" style={{"height":"300px", overflowY: "scroll", overflowAnchor: 'none' }}>
<InfiniteScroll <InfiniteScroll
@ -242,7 +242,7 @@ class AddStudentModal extends Component{
<ConditionToolTip title={candidate.name} condition={candidate.name && candidate.name.length > 12 }> <ConditionToolTip title={candidate.name} condition={candidate.name && candidate.name.length > 12 }>
<label className="task-hide fl" style={{"maxWidth":"208px;"}}> <label className="task-hide fl" style={{"maxWidth":"208px;"}}>
{ candidate.name ? { candidate.name ?
<a href={`/users/${candidate.login}`} target="_blank"> <a href={`/users/${candidate.login}`} target="_blank" style={{"maxWidth":"208px;"}}>
{ candidate.name } { candidate.name }
</a> : <span> </span> } </a> : <span> </span> }
</label> </label>

@ -205,7 +205,7 @@ class AddTeacherModal extends Component{
{` {`
.demo-loading-container { .demo-loading-container {
position: absolute; position: absolute;
bottom: 93px; bottom: 210px;
width: 82%; width: 82%;
text-align: center; text-align: center;
} }
@ -265,7 +265,7 @@ class AddTeacherModal extends Component{
<span className="fl with10"><label className="task-hide fl" style={{"maxWidth":"48px"}}>{''}</label></span> <span className="fl with10"><label className="task-hide fl" style={{"maxWidth":"48px"}}>{''}</label></span>
</p> </p>
{ candidates && candidates.length ? <div> { loading || candidates.length ? <div>
{/* https://github.com/CassetteRocks/react-infinite-scroller/issues/70 */} {/* https://github.com/CassetteRocks/react-infinite-scroller/issues/70 */}
<div className="edu-back-skyblue padding10-15" style={{"height":"300px", overflowY: "scroll", overflowAnchor: 'none' }}> <div className="edu-back-skyblue padding10-15" style={{"height":"300px", overflowY: "scroll", overflowAnchor: 'none' }}>
<InfiniteScroll <InfiniteScroll
@ -284,7 +284,12 @@ class AddTeacherModal extends Component{
<Checkbox className="fl" value={candidate.id} ></Checkbox> <Checkbox className="fl" value={candidate.id} ></Checkbox>
<span className="fl with25"> <span className="fl with25">
<ConditionToolTip title={candidate.name} condition={candidate.name && candidate.name.length > 12 }> <ConditionToolTip title={candidate.name} condition={candidate.name && candidate.name.length > 12 }>
<label className="task-hide fl" style={{"maxWidth":"208px;"}}>{candidate.name}</label> <label className="task-hide fl" style={{"maxWidth":"208px;"}}
>
<a href={`/users/${candidate.login}`} target="_blank"
style={{"color":"#4c4c4c"}}
>{candidate.name}</a>
</label>
</ConditionToolTip> </ConditionToolTip>
</span> </span>
<span className="fl with25"> <span className="fl with25">

@ -2489,7 +2489,7 @@ class Listofworksstudentone extends Component {
<div className="clearfix"> <div className="clearfix">
<span className="fl color-grey-6 font-12"><span <span className="fl color-grey-6 font-12"><span
className="color-orange-tip">{teacherdata === undefined ? "" : teacherdata.student_works&&teacherdata.student_works.length}</span>{teacherdata === undefined ? "" : teacherdata.all_member_count} </span> className="color-orange-tip">{teacherdata === undefined ? "" :teacherdata.student_works&&teacherdata.student_works.length}</span>{teacherdata === undefined ? "" : teacherdata.all_member_count} </span>
<style> <style>
{ {
` `

@ -132,13 +132,14 @@ class ShixunWorkModal extends Component{
onChange=(e)=>{ onChange=(e)=>{
let{group_list}=this.state; let{group_list}=this.state;
let {data}=this.props; let {data}=this.props;
if(e.target.checked===true){ if(e.target.checked===true){
if(data&&data.length===0){ if(data&&data.length===0){
let id=[] let id=[]
group_list.forEach((item,key)=>{ group_list.forEach((item,key)=>{
if(item.works_count!=0){
id.push(item.id) id.push(item.id)
}
}) })
this.setState({ this.setState({
group_ids:id, group_ids:id,
@ -147,7 +148,9 @@ class ShixunWorkModal extends Component{
}else{ }else{
let id=[] let id=[]
group_list.forEach((item,key)=>{ group_list.forEach((item,key)=>{
if(item.works_count!=0){
id.push(item.id) id.push(item.id)
}
}) })
this.setState({ this.setState({
group_ids:id, group_ids:id,
@ -161,6 +164,9 @@ class ShixunWorkModal extends Component{
}) })
} }
} }

@ -649,7 +649,7 @@ submittojoinclass=(value)=>{
return ( return (
<div className="newHeader" id="nHeader" > <div className="newHeaders" id="nHeader" >
{isRender===true?<LoginDialog {isRender===true?<LoginDialog
Modifyloginvalue={()=>this.Modifyloginvalue()} Modifyloginvalue={()=>this.Modifyloginvalue()}
@ -662,7 +662,7 @@ submittojoinclass=(value)=>{
{...this.props} {...this.props}
{...this.state} {...this.state}
/>:""} />:""}
<a href="/" className={"fl mr60 ml25"}> <a href="/" className={"fl mr60 ml25 mt15"}>
<img alt="高校智能化教学与实训平台" className="logoimg" src={getImageUrl("images/educoder/headNavLogo.png?1526520218")}></img> <img alt="高校智能化教学与实训平台" className="logoimg" src={getImageUrl("images/educoder/headNavLogo.png?1526520218")}></img>
</a> </a>

@ -471,6 +471,21 @@ class TPMBanner extends Component {
}) })
} }
showonMouseOver=()=>{
$("#ratePanel").show();
this.setState({
showradios:true
})
}
hideonMouseOut=()=>{
$("#ratePanel").hide();
this.setState({
showradios:false
})
}
render() { render() {
let { let {
Forkvisible, Forkvisible,
@ -541,21 +556,6 @@ class TPMBanner extends Component {
// } // }
// } // }
// } // }
$("#commentsStar").hover(()=>{
$("#ratePanel").show();
this.setState({
showradios:true
})
},()=>{
$("#ratePanel").hide();
this.setState({
showradios:false
})
})
const radioStyle = { const radioStyle = {
display: 'block', display: 'block',
height: '30px', height: '30px',
@ -617,12 +617,12 @@ class TPMBanner extends Component {
</li> </li>
</ul> </ul>
<div className="pr fl" id="commentsStar"> <div className="pr fl" id="commentsStar" onMouseOver={()=>this.showonMouseOver()}>
<div className={"color-grey-c mb11"} style={{color: "#Fff",textAlign: "center"}}>学员评分</div> <div className={"color-grey-c mb11"} style={{color: "#Fff",textAlign: "center"}}>学员评分</div>
<div className="rateYo"> <div className="rateYo">
<Rating value={star_info[0]} disabled allowHalf/> <Rating value={star_info[0]} disabled allowHalf/>
</div> </div>
<div id="ratePanel" className="showratePanel" style={{"width":"512px"}}> <div id="ratePanel" className="showratePanel" style={{"width":"512px"}} onMouseOut={()=>this.hideonMouseOut()}>
<div className="pr"> <div className="pr">
<span className="rateTrangle"></span> <span className="rateTrangle"></span>
<div className="pr clearfix ratePanelContent" style={{height: '177px'}}> <div className="pr clearfix ratePanelContent" style={{height: '177px'}}>
@ -638,7 +638,7 @@ class TPMBanner extends Component {
</div> </div>
</div> </div>
</div> </div>
<div className="fr"> <div className="fr width360">
<div className="clearfix"> <div className="clearfix">
<div className="rateYo fl mt3"> <div className="rateYo fl mt3">
{showradios === true ? {showradios === true ?

@ -35,14 +35,14 @@ if (!window['indexHOCLoaded']) {
// $('head').append($('<link rel="stylesheet" type="text/css" />') // $('head').append($('<link rel="stylesheet" type="text/css" />')
// .attr('href', `${_url_origin}/stylesheets/educoder/antd.min.css?1525440977`)); // .attr('href', `${_url_origin}/stylesheets/educoder/antd.min.css?1525440977`));
$('head').append($('<link rel="stylesheet" type="text/css" />') $('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/css/edu-common.css?7`)); .attr('href', `${_url_origin}/stylesheets/css/edu-common.css?8`));
$('head').append($('<link rel="stylesheet" type="text/css" />') $('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?7`)); .attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?8`));
// index.html有加载 // index.html有加载
$('head').append($('<link rel="stylesheet" type="text/css" />') $('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?7`)); .attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?8`));
// $('head').append($('<link rel="stylesheet" type="text/css" />') // $('head').append($('<link rel="stylesheet" type="text/css" />')
@ -361,7 +361,16 @@ export function TPMIndexHOC(WrappedComponent) {
max-width: unset; max-width: unset;
overflow: hidden; overflow: hidden;
} }
.newHeaders{
max-width: unset;
background: #24292D !important;
width: 100%;
height: 60px !important;
min-width: 1200px;
z-index: 1000;
-moz-box-shadow: 0px 0px 12px rgba(0,0,0,0.1);
box-shadow: 0px 0px 12px rgba(0,0,0,0.1);
}
` `
}</style> }</style>
<NewHeader {...this.state} {...this.props}></NewHeader> <NewHeader {...this.state} {...this.props}></NewHeader>

@ -15,7 +15,7 @@ import axios from 'axios';
import './css/TPMsettings.css'; import './css/TPMsettings.css';
import { getImageUrl, toPath, getUrl } from 'educoder'; import { getImageUrl, toPath, getUrl ,appendFileSizeToUploadFileAll} from 'educoder';
let origin = getUrl(); let origin = getUrl();
@ -1112,16 +1112,20 @@ export default class TPMsettings extends Component {
// this.deleteAttachment(this.state.file); // this.deleteAttachment(this.state.file);
this.setState({ this.setState({
file:undefined, file:undefined,
deleteisnot:true,
languagewrite:"", languagewrite:"",
systemenvironment:"", systemenvironment:"",
testcoderunmode:"", testcoderunmode:"",
fileList:[]
}) })
}else { }else {
this.setState({ this.setState({
file:undefined, file:undefined,
deleteisnot:true,
languagewrite:"", languagewrite:"",
systemenvironment:"", systemenvironment:"",
testcoderunmode:"", testcoderunmode:"",
fileList:[]
}) })
} }
// this.props.showNotification('提交成功!'); // this.props.showNotification('提交成功!');
@ -1154,16 +1158,20 @@ export default class TPMsettings extends Component {
// this.deleteAttachment(this.state.file); // this.deleteAttachment(this.state.file);
this.setState({ this.setState({
file:undefined, file:undefined,
deleteisnot:true,
languagewrite:"", languagewrite:"",
systemenvironment:"", systemenvironment:"",
testcoderunmode:"", testcoderunmode:"",
fileList:[]
}) })
}else { }else {
this.setState({ this.setState({
file:undefined, file:undefined,
deleteisnot:true,
languagewrite:"", languagewrite:"",
systemenvironment:"", systemenvironment:"",
testcoderunmode:"", testcoderunmode:"",
fileList:[]
}) })
} }
} }
@ -1330,11 +1338,15 @@ export default class TPMsettings extends Component {
} }
handleChange = (info) => { handleChange = (info) => {
console.log("handleChange1"); console.log("handleChange1");
let fileList = info.fileList; let {fileList}=this.state;
this.setState({ fileList:fileList, if(fileList.length===0){
let fileLists = info.fileList;
this.setState({ fileList:fileLists,
deleteisnot:false}); deleteisnot:false});
} }
}
onAttachmentRemove = (file) => { onAttachmentRemove = (file) => {
confirm({ confirm({
title: '确定要删除这个附件吗?', title: '确定要删除这个附件吗?',
@ -1660,22 +1672,11 @@ export default class TPMsettings extends Component {
<div className="mt10" style={{ <div className="mt10" style={{
display: "inline-block" display: "inline-block"
}}> }}>
{
this.state.deleteisnot=== true?
<Upload {...uploadProps} > <Upload {...uploadProps} >
<Icon type="upload" className="fl mt3" > </Icon> <Icon type="upload" className="fl mt3" > </Icon>
<span className="color-blue fl cdefault">上传附件</span> <span className="color-blue fl cdefault">上传附件</span>
<span className="color-grey-c fl ml10 ">(单个文件50M以内)</span> <span className="color-grey-c fl ml10 ">(单个文件50M以内)</span>
</Upload> </Upload>
:
<Upload {...uploadProps} disabled={true} >
<Icon type="upload" className="fl mt3" > </Icon>
<span className="color-grey-c fl">上传附件</span>
<span className="color-grey-c fl ml10 ">(单个文件50M以内)</span>
</Upload>
}
</div> </div>
</li> </li>
<div className={"color-red shixunspanred"}> <div className={"color-red shixunspanred"}>

@ -2,7 +2,7 @@ import React, {Component} from 'react';
import {TPMIndexHOC} from '../TPMIndexHOC'; import {TPMIndexHOC} from '../TPMIndexHOC';
import {SnackbarHOC} from 'educoder'; import {SnackbarHOC,appendFileSizeToUploadFileAll} from 'educoder';
import {Input, Select, Radio, Checkbox, Modal, Icon, DatePicker,Upload,Button,message,Form,notification} from 'antd'; import {Input, Select, Radio, Checkbox, Modal, Icon, DatePicker,Upload,Button,message,Form,notification} from 'antd';
@ -635,16 +635,20 @@ class Newshixuns extends Component {
// this.deleteAttachment(this.state.file); // this.deleteAttachment(this.state.file);
this.setState({ this.setState({
file:undefined, file:undefined,
deleteisnot:true,
languagewrite:"", languagewrite:"",
systemenvironment:"", systemenvironment:"",
testcoderunmode:"", testcoderunmode:"",
fileList:[]
}) })
}else { }else {
this.setState({ this.setState({
file:undefined, file:undefined,
deleteisnot:true,
languagewrite:"", languagewrite:"",
systemenvironment:"", systemenvironment:"",
testcoderunmode:"", testcoderunmode:"",
fileList:[]
}) })
} }
// this.props.showNotification('提交成功!'); // this.props.showNotification('提交成功!');
@ -676,16 +680,20 @@ class Newshixuns extends Component {
// this.deleteAttachment(this.state.file); // this.deleteAttachment(this.state.file);
this.setState({ this.setState({
file:undefined, file:undefined,
deleteisnot:true,
languagewrite:"", languagewrite:"",
systemenvironment:"", systemenvironment:"",
testcoderunmode:"", testcoderunmode:"",
fileList:[]
}) })
}else { }else {
this.setState({ this.setState({
file:undefined, file:undefined,
deleteisnot:true,
languagewrite:"", languagewrite:"",
systemenvironment:"", systemenvironment:"",
testcoderunmode:"", testcoderunmode:"",
fileList:[]
}) })
} }
} }
@ -752,11 +760,17 @@ class Newshixuns extends Component {
// 附件相关 START // 附件相关 START
handleChange = (info) => { handleChange = (info) => {
let {fileList}=this.state;
console.log("handleChange1"); console.log("handleChange1");
let fileList = info.fileList; if(fileList.length===0){
this.setState({ fileList:fileList, let fileLists = info.fileList;
this.setState({
// fileList:appendFileSizeToUploadFileAll(fileList),
fileList:fileLists,
deleteisnot:false}); deleteisnot:false});
} }
}
onAttachmentRemove = (file) => { onAttachmentRemove = (file) => {
confirm({ confirm({
title: '确定要删除这个附件吗?', title: '确定要删除这个附件吗?',
@ -1042,32 +1056,12 @@ class Newshixuns extends Component {
<div className="mt10" style={{ <div className="mt10" style={{
display: "inline-block" display: "inline-block"
}}> }}>
{/*<Form.Item>*/} <Upload {...uploadProps}>
{/* {*/}
{/* getFieldDecorator('file',{*/}
{/* rules:[{*/}
{/* }]*/}
{/* })(*/}
{
deleteisnot=== true?
<Upload {...uploadProps} >
<Icon type="upload" className="fl mt3" > </Icon> <Icon type="upload" className="fl mt3" > </Icon>
<span className="color-blue fl cdefault">上传附件</span> <span className="color-blue fl cdefault">上传附件</span>
<span className="color-grey-c fl ml10 ">(单个文件50M以内)</span> <span className="color-grey-c fl ml10 ">(单个文件50M以内)</span>
</Upload> </Upload>
:
<Upload {...uploadProps} disabled={true} >
<Icon type="upload" className="fl mt3" > </Icon>
<span className="color-grey-c fl">上传附件</span>
<span className="color-grey-c fl ml10 ">(单个文件50M以内)</span>
</Upload>
}
{/* )*/}
{/* }*/}
{/*</Form.Item>*/}
</div> </div>
</li> </li>

@ -106,3 +106,7 @@ a:active{text-decoration:none;}
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
} }
.width360{
width:360px;
}

@ -247,7 +247,19 @@ class SearchPage extends Component{
}) })
} }
</div> </div>
<div>
{/*合作单位*/}
{item.content.member_user_names === undefined || item.content.member_user_names===0?"": item.content.member_user_names.map((item7, key7) => {
return (
<div className={"df"}>
<span style={{flex: '0 0 82px'}}>合作单位</span>
<span className={key7>1?" tzbq ":" tzbqx"}
dangerouslySetInnerHTML={{__html:item7}} />
</div>
)
})
}
</div>
<div className="mt20"> <div className="mt20">

@ -169,7 +169,7 @@ input::-ms-clear{display:none;}
.newContainer{ min-height:100%; height: auto !important; height: 100%; /*IE6不识别min-height*/position: relative;} .newContainer{ min-height:100%; height: auto !important; height: 100%; /*IE6不识别min-height*/position: relative;}
.educontent{width: 1200px;margin:0px auto;box-sizing: border-box}/*中间部分宽度固定为1200*/ .educontent{width: 1200px;margin:0px auto;box-sizing: border-box}/*中间部分宽度固定为1200*/
.newMain{ margin: 0 auto; padding-bottom: 235px; min-width:1200px;padding-top: 60px}/*padding-bottom根据底部的高度而定*/ .newMain{ margin: 0 auto; padding-bottom: 235px; min-width:1200px;}/*padding-bottom根据底部的高度而定*/
.newMain{ padding-bottom: 120px !important; } .newMain{ padding-bottom: 120px !important; }
/*高度*/ /*高度*/

Loading…
Cancel
Save