Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

video_transcode
dinglink 5 years ago
commit 02812dd699

@ -0,0 +1,22 @@
#coding=utf-8
desc "纠正学生实训耗时不准的问题"
namespace :shixuns do
task correct_the_shixun_cost_time: :environment do
puts "myshixun_id: #{ENV['myshixun_id']}"
if ENV['myshixun_id'].present?
myshixun = Myshixun.find(ENV['myshixun_id'])
myshixun.games.where(status: 2).each do |game|
puts "open_time: #{game.open_time.to_i}"
puts "end_time: #{game.end_time.to_i}"
puts "game_id: #{game.id}"
cost_time = game.end_time.to_i - game.open_time.to_i
puts "cost_time: #{cost_time}"
game.update_attributes!(cost_time: cost_time)
end
end
end
end

@ -3,8 +3,9 @@ desc "统计每个学校使用数据"
namespace :static_all do
task :repo => :environment do
school_alls = School.includes(:courses, user_extensions: :user).all
proc_num = ENV['processes'].blank? ? 5 : ENV['processes'].to_i
school_alls.find_in_batches(batch_size: 50) do |schools|
Parallel.each(schools, in_processes: 5) do |school|
Parallel.each(schools, in_processes: proc_num) do |school|
puts("school_id: #{school.id}")
data = Schools::SchoolStatisticService.new(school)
sta_all = StaAll.find_or_initialize_by(school_id: school.id)

@ -98,12 +98,12 @@ class Boards extends Component{
this.fetchBoards()
this.fetchAll()
on('updateNavSuccess', this.updateNavSuccess)
// on('updateNavSuccess', this.updateNavSuccess)
}
componentWillUnmount() {
off('updateNavSuccess', this.updateNavSuccess)
}
// componentWillUnmount() {
// off('updateNavSuccess', this.updateNavSuccess)
// }
updateNavSuccess = () => {
this.fetchBoards()
if (this.props.match.params.boardId == this.state.boardid) {
@ -112,7 +112,7 @@ class Boards extends Component{
}
componentDidUpdate = (prevProps) => {
if ( prevProps.match.params.boardId != this.props.match.params.boardId ) {
if ( prevProps.match.params.boardId !== this.props.match.params.boardId ) {
this.setState({
isSpin:true
})

@ -499,7 +499,6 @@ class Coursesleftnav extends Component{
}
cannerNavmoda=()=>{
this.setState({
Navmodalnametype:false,
NavmodalValuetype:false,
@ -525,6 +524,7 @@ class Coursesleftnav extends Component{
}
saveNavmodapost=(url,value,positiontype,coursesId)=>{
axios.post(url,
{name:value}).then((result)=>{
if(result!=undefined){
@ -539,13 +539,13 @@ class Coursesleftnav extends Component{
if(positiontype==="files"){
this.updasaveNavmoda()
trigger('updateNavSuccess')
window.location.href=`/courses/${coursesId}/file/${result.data.category_id}`;
this.props.history.push(`/courses/${coursesId}/file/${result.data.category_id}`);
}
if(positiontype==="boards"){
this.updasaveNavmoda()
trigger('updateNavSuccess')
window.location.href=`/courses/${coursesId}/boards/${result.data.category_id}`;
this.props.history.push(`/courses/${coursesId}/boards/${result.data.category_id}`);
}
if(positiontype!="course_groups"){
@ -585,7 +585,6 @@ class Coursesleftnav extends Component{
}
saveNavmoda=()=>{
debugger;
let {Navmodaltypename,setnavid,NavmodalValue}=this.state;
let id =setnavid;
@ -950,17 +949,15 @@ class Coursesleftnav extends Component{
{/* ""*/}
{/*}*/}
{
Navmodalnametype===true?<style>
{
<style>
{
`
body {
width: calc(100%) !important;
width: calc(100%) !important;
}
`
}
</style>:""
}
</style>
<Modal
keyboard={false}
title={Navmodalname}

@ -269,13 +269,18 @@ class Addcourses extends Component{
this.props.history.push('/courses/2704/boards/8367/messages/42072')
return;
}
if(response.data.course_id!=undefined){
this.submitasyn(response.data.course_id)
}
notification.open({
message:"提示",
description:response.data.message
});
});
if(response.data.course_id!=undefined){
this.submitasyn(response.data.course_id)
}else{
// 无返回课程id则是选择的教师或者助教身份成功后跳转到课堂首页
// console.log(this.props);
// console.log(this.props.history.push);
window.location.href="/courses";
}
if(Addcoursestype===true){
this.props.hideAddcoursestype();
}

@ -73,8 +73,8 @@ class CoursesNew extends Component {
period: data.class_period===undefined?'':data.class_period===null?'':data.class_period===null?'':data.class_period==="null"?'':data.class_period+"",
credit: data.credit===undefined?'':data.credit===null?'':data.credit===null?'':data.credit==="null"?'':data.credit+"",
checkboxgroup: data.course_module_types,
Realnamecertification: data.authentication,
Professionalcertification:data.professional_certification,
// Realnamecertification: data.authentication,
// Professionalcertification:data.professional_certification,
endtime: data.end_date === undefined ? "" : moment(data.end_date, dateFormat),
school:data.school
@ -84,8 +84,8 @@ class CoursesNew extends Component {
datatime: data.end_date,
dataname:data.name,
is_public: data.is_public === 1 ? true : false,
Realnamecertification: data.authentication,
Professionalcertification:data.professional_certification,
// Realnamecertification: data.authentication,
// Professionalcertification:data.professional_certification,
addonAfteronelenone: data.class_period===undefined?'':data.class_period===null?'':data.class_period===null?'':data.class_period==="null"?'':data.class_period,
addonAfteronelentwo:data.credit===undefined?'':data.credit===null?'':data.credit===null?'':data.credit==="null"?'':data.credit,
@ -237,8 +237,8 @@ class CoursesNew extends Component {
end_date: datatime===undefined?"":datatime,
is_public: is_public === true || is_public === 1 ? 1 : 0,
course_module_types: values.checkboxgroup,
authentication: this.state.Realnamecertification,
professional_certification: this.state.Professionalcertification,
// authentication: this.state.Realnamecertification,
// professional_certification: this.state.Professionalcertification,
school:values.school
}
).then((response) => {
@ -313,8 +313,8 @@ class CoursesNew extends Component {
end_date: datatime===undefined?"":datatime,
is_public: is_public === true || is_public === 1 ? 1 : 0,
course_module_types: values.checkboxgroup,
authentication: this.state.Realnamecertification,
professional_certification: this.state.Professionalcertification,
// authentication: this.state.Realnamecertification,
// professional_certification: this.state.Professionalcertification,
school:values.school
}
).then((response) => {
@ -953,7 +953,7 @@ class CoursesNew extends Component {
)}
</Form.Item>
</div>
<div className="stud-class-set bor-bottom-greyE padding10200 coursenavbox height100px" >
{/* <div className="stud-class-set bor-bottom-greyE padding10200 coursenavbox height100px" >
<span className={"fl"}>
<Form.Item
label="加入课堂条件"
@ -978,7 +978,7 @@ class CoursesNew extends Component {
)}
</Form.Item>
</span>
</div>
</div> */}
<div className="stud-class-set padding10200 coursenavbox bor-bottom-greyE">
<Form.Item
label="公开设置"

@ -729,7 +729,35 @@ class NewMyShixunModel extends Component {
}
//选用
// 不选用 Question.js页面也有个
NOgetitem_baskets=(data)=>{
let url="/examination_banks/cancel_items.json";
axios.post(url, data)
.then((result) => {
if (result.data.status == 0) {
var data = {
discipline_id:this.state.discipline_id,
sub_discipline_id:this.state.sub_discipline_id,
tag_discipline_id:this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: this.state.item_type,
keyword: this.state.keywords,
page: this.state.page,
per_page:10,
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
};
this.getdatasy(data);
this.getbasket_listdata();
}
}).catch((error) => {
////console.log(error);
})
}
//选用 Question.js页面也有个
getitem_baskets=(data)=>{
//选用题型可以上传单个 或者多个题型
let url="";
@ -743,7 +771,6 @@ class NewMyShixunModel extends Component {
axios.post(url, data)
.then((result) => {
if (result.data.status == 0) {
// this.props.showNotification(`选用成功`);
var data = {
discipline_id:this.state.discipline_id,
sub_discipline_id:this.state.sub_discipline_id,
@ -758,9 +785,6 @@ class NewMyShixunModel extends Component {
};
this.getdatasy(data);
this.getbasket_listdata();
// this.setState({
// visible:true
// })
}
}).catch((error) => {
////console.log(error);
@ -845,7 +869,7 @@ class NewMyShixunModel extends Component {
}
//全选试题库
selectallquestionsonthispage=()=>{
selectallquestionsonthispage=(bool)=>{
var item_idsdata=[];
var arr= this.state.Contentdata.items;
@ -853,6 +877,10 @@ class NewMyShixunModel extends Component {
if(data.item_type==="PROGRAM"){
//编程题
if(data.choosed===true){
if(data.program_attr.status===1){
//已发布
item_idsdata.push(data.id);
}
}else{
//未选用
@ -866,7 +894,7 @@ class NewMyShixunModel extends Component {
}else{
//不是编程题
if(data.choosed===true){
item_idsdata.push(data.id);
}else{
//未选用
item_idsdata.push(data.id);
@ -878,10 +906,21 @@ class NewMyShixunModel extends Component {
item_ids:item_idsdata,
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
}
this.getitem_baskets(data);
this.setState({
selectallquestionsonthispages:true,
})
if(bool===false){
this.getitem_baskets(data);
this.setState({
selectallquestionsonthispages:true,
})
}else{
this.NOgetitem_baskets(data);
this.setState({
selectallquestionsonthispages:false,
})
}
}
//全选的状态
@ -1040,7 +1079,7 @@ class NewMyShixunModel extends Component {
chakanjiexiboolindex={this.state.chakanjiexiboolindex}
chakanjiexibool={(e)=>this.chakanjiexibool(e)}
getitem_basketss={(id)=>this.getitem_basketss(id)}
selectallquestionsonthispage={()=>this.selectallquestionsonthispage()}
selectallquestionsonthispage={(bool)=>this.selectallquestionsonthispage(bool)}
getitem_baskets={(e)=>this.getitem_baskets(e)}
setdatafuns={(e) => this.setdatafuns(e)}
setdatafunsval={(e) => this.setdatafunsval(e)}

@ -659,9 +659,37 @@ class Question extends Component {
})
}
// 不选用 NewMyShixunModel.js 页面也有个
NOgetitem_baskets=(data)=>{
let url="/examination_banks/cancel_items.json";
axios.post(url, data)
.then((result) => {
if (result.data.status == 0) {
// this.props.showNotification(`选用成功`);
var data = {
discipline_id:this.state.discipline_id,
sub_discipline_id:this.state.sub_discipline_id,
tag_discipline_id:this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: this.state.item_type,
keyword: this.state.keywords,
page: this.state.page,
per_page:10,
};
this.getdatasy(data);
this.getbasket_listdata();
// this.setState({
// visible:true
// })
}
}).catch((error) => {
////console.log(error);
})
}
//选用
//选用 NewMyShixunModel.js 页面也有个
getitem_baskets=(data)=>{
//选用题型可以上传单个 或者多个题型
let url="/item_baskets.json";
@ -738,7 +766,7 @@ class Question extends Component {
}
//全选试题库
selectallquestionsonthispage=()=>{
selectallquestionsonthispage=(bool)=>{
var item_idsdata=[];
var arr= this.state.Contentdata.items;
@ -746,7 +774,10 @@ class Question extends Component {
if(data.item_type==="PROGRAM"){
//编程题
if(data.choosed===true){
if(data.program_attr.status===1){
//已发布
item_idsdata.push(data.id);
}
}else{
//未选用
if(data.program_attr.status===1){
@ -759,7 +790,7 @@ class Question extends Component {
}else{
//不是编程题
if(data.choosed===true){
item_idsdata.push(data.id);
}else{
//未选用
item_idsdata.push(data.id);
@ -770,10 +801,18 @@ class Question extends Component {
const data={
item_ids:item_idsdata
}
this.getitem_baskets(data);
this.setState({
selectallquestionsonthispages:true,
})
if(bool===false){
this.getitem_baskets(data);
this.setState({
selectallquestionsonthispages:true,
})
}else{
this.NOgetitem_baskets(data);
this.setState({
selectallquestionsonthispages:false,
})
}
}
//全选的状态
@ -1016,7 +1055,7 @@ class Question extends Component {
chakanjiexiboolindex={this.state.chakanjiexiboolindex}
chakanjiexibool={(e)=>this.chakanjiexibool(e)}
getitem_basketss={(id)=>this.getitem_basketss(id)}
selectallquestionsonthispage={()=>this.selectallquestionsonthispage()}
selectallquestionsonthispage={(bool)=>this.selectallquestionsonthispage(bool)}
getitem_baskets={(e)=>this.getitem_baskets(e)}
setdatafuns={(e) => this.setdatafuns(e)}
setdatafunsval={(e) => this.setdatafunsval(e)}
@ -1047,7 +1086,7 @@ class Question extends Component {
{
`
.ant-drawer-content-wrapper{
width: 200px !important;
width: 160px !important;
overflowhidden;
margin-top: 62px;
}
@ -1095,8 +1134,8 @@ class Question extends Component {
""
: <div className="sortinxdirection " >
<p
className="w50s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">单选题{'('}{single_questions_count}{')'}</p>
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
className="w80s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">单选题{'('}{single_questions_count}{')'}</p>
<p className="w20s intermediatecenterysls xaxisreverseorder"><i
className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor " onClick={()=>this.showQuestionModals("SINGLE")}></i></p>
</div>
}
@ -1106,8 +1145,8 @@ class Question extends Component {
:
<div className="sortinxdirection" >
<p
className="w50s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">多选题{'('}{multiple_questions_count}{')'}</p>
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
className="w80s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">多选题{'('}{multiple_questions_count}{')'}</p>
<p className="w20s intermediatecenterysls xaxisreverseorder"><i
className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor " onClick={()=>this.showQuestionModals("MULTIPLE")}></i></p>
</div>
}
@ -1117,8 +1156,8 @@ class Question extends Component {
:
<div className="sortinxdirection" >
<p
className="w50s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">判断题{'('}{judgement_questions_count}{')'}</p>
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
className="w80s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">判断题{'('}{judgement_questions_count}{')'}</p>
<p className="w20s intermediatecenterysls xaxisreverseorder"><i
className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor " onClick={()=>this.showQuestionModals("JUDGMENT")}></i></p>
</div>
}
@ -1128,8 +1167,8 @@ class Question extends Component {
:
<div className="sortinxdirection" >
<p
className="w50s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">填空题{'('}{completion_questions_count}{')'}</p>
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
className="w80s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">填空题{'('}{completion_questions_count}{')'}</p>
<p className="w20s intermediatecenterysls xaxisreverseorder"><i
className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor " onClick={()=>this.showQuestionModals("COMPLETION")}></i></p>
</div>
}
@ -1139,8 +1178,8 @@ class Question extends Component {
:
<div className="sortinxdirection" >
<p
className="w50s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">简答题{'('}{subjective_questions_count}{')'}</p>
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
className="w80s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">简答题{'('}{subjective_questions_count}{')'}</p>
<p className="w20s intermediatecenterysls xaxisreverseorder"><i
className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor " onClick={()=>this.showQuestionModals("SUBJECTIVE")}></i></p>
</div>
}
@ -1150,8 +1189,8 @@ class Question extends Component {
:
<div className="sortinxdirection">
<p
className="w50s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">实训题{'('}{practical_questions_count}{')'}</p>
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
className="w80s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">实训题{'('}{practical_questions_count}{')'}</p>
<p className="w20s intermediatecenterysls xaxisreverseorder"><i
className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor "></i></p>
</div>
}
@ -1161,8 +1200,8 @@ class Question extends Component {
:
<div className="sortinxdirection" >
<p
className="w50s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">编程题{'('}{program_questions_count}{')'}</p>
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
className="w80s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">编程题{'('}{program_questions_count}{')'}</p>
<p className="w20s intermediatecenterysls xaxisreverseorder"><i
className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor " onClick={()=>this.showQuestionModals("PROGRAM")}></i></p>
</div>
}

@ -440,12 +440,12 @@ class Contentpart extends Component {
<div className=" w100s mb10">
{
defaultActiveKey===1||defaultActiveKey==="1"?
<Contentquestionbank {...this.props} {...this.state} selectallquestionsonthispage={()=>this.props.selectallquestionsonthispage()} ></Contentquestionbank>
<Contentquestionbank {...this.props} {...this.state} selectallquestionsonthispage={(bool)=>this.props.selectallquestionsonthispage(bool)} ></Contentquestionbank>
:""
}
{
defaultActiveKey===0||defaultActiveKey==="0"?
<Contentquestionbank {...this.props} {...this.state} selectallquestionsonthispage={()=>this.props.selectallquestionsonthispage()}></Contentquestionbank>
<Contentquestionbank {...this.props} {...this.state} selectallquestionsonthispage={(bool)=>this.props.selectallquestionsonthispage(bool)}></Contentquestionbank>
:""
}
</div>

@ -50,9 +50,9 @@ class Contentquestionbank extends Component {
<div className="sortinxdirection w50s">
{
selectionbools===true?
<Checkbox checked={this.props.selectallquestionsonthispages} onChange={()=>this.props.selectallquestionsonthispage()} disabled></Checkbox>
<Checkbox checked={this.props.selectallquestionsonthispages} onChange={()=>this.props.selectallquestionsonthispage(this.props.selectallquestionsonthispages)} ></Checkbox>
:
<Checkbox checked={this.props.selectallquestionsonthispages} onChange={()=>this.props.selectallquestionsonthispage()}></Checkbox>
<Checkbox checked={this.props.selectallquestionsonthispages} onChange={()=>this.props.selectallquestionsonthispage(this.props.selectallquestionsonthispages)}></Checkbox>
}
<p className="setequesbank ml20">选用本页全部试题</p>

@ -271,6 +271,12 @@
width:30%;
}
.w80s{
width:80%;
}
.w20s{
width:20%;
}
.w50s{
width: 50%;
@ -913,7 +919,7 @@
width: 40px !important;
position: absolute;
border-radius: 4px;
top: -50%;
top: -79%;
}
.shitikussmys{
width:29px !important;

@ -282,6 +282,34 @@ class Intecomponents extends Component {
}
preservation = () => {
let mylistcour=1;
try {
mylistcour=this.state.single_question_count+this.state.multiple_question_count+this.state.judgement_question_count+this.state.program_question_count
}catch (e) {
}
if(mylistcour===0){
this.props.showNotification(`没有题不能组卷`);
return;
}
let arraycour=1;
try {
arraycour=this.Judquestio.Getdatas()[3].rbdxt+this.Judquestio.Getdatas()[4].rbdxtx+ this.Judquestio.Getdatas()[5].rbpdt+this.Judquestio.Getdatas()[6].rbbct
}catch (e) {
}
if(arraycour===0){
this.props.showNotification(`没有设置题型及数量不能组卷`);
return;
}
if (this.Judquestio.Getdatas().length === 0) {
this.scrollToAnchor("Itembankstopid");
return;

@ -1075,21 +1075,21 @@ submittojoinclass=(value)=>{
`
}
</style>
{
Periofters===true?
<li className={`pr questionbanks`} >
<Popover className="queyppors" id={"yslpopovers"} placement="bottom" content={contents} trigger="click" >
<div className=" sortinxdirection mr10">
<div style={{
color:"#fff"
}}>
题库
</div>
</div>
</Popover>
</li>
:""
}
{/*{*/}
{/* Periofters===true?*/}
{/* <li className={`pr questionbanks`} >*/}
{/* <Popover className="queyppors" id={"yslpopovers"} placement="bottom" content={contents} trigger="click" >*/}
{/* <div className=" sortinxdirection mr10">*/}
{/* <div style={{*/}
{/* color:"#fff"*/}
{/* }}>*/}
{/* 题库*/}
{/* </div>*/}
{/* </div>*/}
{/* </Popover>*/}
{/* </li>*/}
{/* :""*/}
{/*}*/}
<li

@ -268,7 +268,7 @@ body>.-task-title {
background: #EEEEEE;
}
.mystask-sidebar{
right: 220px !important;
right: 181px !important;
}
.mystask-sidebars{
right: 20px !important;

@ -53,8 +53,11 @@ class RepositoryAddFileupload_files extends Component {
if(info.file.response){
if(info.file.response.status===-1) {
this.props.showNotification(info.file.response.message)
this.props.showNotification(info.file.response.message);
return
}else{
this.props.showNotification("上传成功!");
return;
}
}
@ -62,7 +65,6 @@ class RepositoryAddFileupload_files extends Component {
fileList = fileList.map(file => {
if (file.response) {
if (file.response.status===0) {
}
}
return file;
@ -73,45 +75,54 @@ class RepositoryAddFileupload_files extends Component {
};
onAttachmentRemove=(info)=>{
let shixunId = this.props.match.params.shixunId;
let {message,filspath}=this.state;
if(message===""||message===undefined){
this.props.showNotification('删除文件请先填写提交信息');
return
}
console.log(info);
if(info.response){
let shixunId = this.props.match.params.shixunId;
let {message,filspath}=this.state;
if(message===""||message===undefined){
this.props.showNotification('删除文件请先填写提交信息');
return;
}
let matchpath =this.props.match.path;
let matchpath =this.props.match.path;
let Repositoryflag =undefined;
let Repositoryflag =undefined;
if( matchpath.indexOf("repository")>-1){
Repositoryflag =undefined;
}
if(matchpath.indexOf("secret_repository")>-1){
Repositoryflag =true;
}
if( matchpath.indexOf("repository")>-1){
Repositoryflag =undefined;
}
if(matchpath.indexOf("secret_repository")>-1){
Repositoryflag =true;
}
let newfilspath=filspath;
let newfilspath=filspath;
if(newfilspath===""){
newfilspath=info.name
}else{
newfilspath=filspath+"/"+info.name
}
const url = `/shixuns//${shixunId}/delete_git_file.json`;
axios.delete(url, { data: {
if(newfilspath===""){
newfilspath=info.name
}else{
newfilspath=filspath+"/"+info.name
}
const url = `/shixuns//${shixunId}/delete_git_file.json`;
axios.delete(url, { data: {
path:newfilspath,
message:message,
secret_repository:Repositoryflag
}})
.then((response) => {
if (response.data.status == 0) {
this.props.showNotification("删除成功")
if (response.data.status === 0) {
let fileList = this.state.fileList.filter(item=>item.uid !== info.uid);
this.setState({
fileList
})
this.props.showNotification("删除成功");
}
})
.catch(function (error) {
console.log(error);
});
}else{
this.props.showNotification("还未上传完成,无法进行删除操作!");
}
}
FormInput=(e)=>{
@ -195,7 +206,7 @@ class RepositoryAddFileupload_files extends Component {
return false
}
this.props.showNotification("上传成功")
// this.props.showNotification("上传成功");
},
};

Loading…
Cancel
Save