所有导出统计

dev_forum
caishi 5 years ago
parent 9946062dbe
commit e3e0a6873a

@ -891,37 +891,34 @@ class GraduationTaskssettingapp extends Component{
}
/// 确认是否下载
confirmysl(url){
axios.get(url).then((response) => {
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.refs.DownloadMessage.confirmysl(url);
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
// axios.get(url).then((response) => {
// if(response.data.status&&response.data.status===-1){
// }else if(response.data.status&&response.data.status===-2){
// if(response.data.messages === "100"){
// // 已超出文件导出的上限数量100 ),建议:
// this.setState({
// DownloadType:true,
// DownloadMessageval:100
// })
// }else {
// //因附件资料超过500M
// this.setState({
// DownloadType:true,
// DownloadMessageval:500
// })
// }
// }else {
// this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank');
// }
// }).catch((error) => {
// console.log(error)
// });
}
render(){
const { getFieldDecorator } = this.props.form;
@ -999,9 +996,7 @@ class GraduationTaskssettingapp extends Component{
{/*/>*/}
<DownloadMessage
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
ref="DownloadMessage"
/>
<HomeworkModal
starttimes={this.state.starttimes}

@ -191,31 +191,32 @@ class GraduationTasksquestions extends Component{
/// 确认是否下载
confirmysl(url){
axios.get(url).then((response) => {
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
this.refs.DownloadMessage.confirmysl(url);
// axios.get(url).then((response) => {
// if(response.data.status&&response.data.status===-1){
// }else if(response.data.status&&response.data.status===-2){
// if(response.data.messages === "100"){
// // 已超出文件导出的上限数量100 ),建议:
// this.setState({
// DownloadType:true,
// DownloadMessageval:100
// })
// }else {
// //因附件资料超过500M
// this.setState({
// DownloadType:true,
// DownloadMessageval:500
// })
// }
// }else {
// this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank');
// }
// }).catch((error) => {
// console.log(error)
// });
}
Downloadcal=()=>{
this.setState({
@ -256,9 +257,7 @@ class GraduationTasksquestions extends Component{
{/*/>*/}
<DownloadMessage
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
ref="DownloadMessage"
/>
<HomeworkModal
starttimes={this.state.starttimes}

@ -9,6 +9,8 @@ import PollTabSecond from './PollDetailTabSecond'
import PollTabThird from './PollDetailTabThird'
import PollTabForth from './PollDetailTabForth'
import DownloadMessage from '../../modals/DownloadMessage';
import ImmediatelyPublish from './pollPublicBtn/ImmediatelyPublish'
import ImmediatelyEnd from './pollPublicBtn/ImmediatelyEnd'
import CancelPublish from './pollPublicBtn/CancelPublish'
@ -69,6 +71,10 @@ class PollDetailIndex extends Component{
})
}
confirmysl(url){
this.refs.DownloadMessage.confirmysl(url);
}
render(){
let {tab,pollDetail,user_permission}=this.state;
@ -76,6 +82,7 @@ class PollDetailIndex extends Component{
const isStudent = this.props.isStudent();
return(
<div className="newMain">
<DownloadMessage {...this.props} ref="DownloadMessage" />
<div className="educontent mt10 mb50">
<p className="clearfix mb20">
<WordsBtn style="grey" className="fl" to={`/courses/${this.props.match.params.coursesId}/students`}>{this.props.coursedata.name}</WordsBtn>
@ -152,7 +159,7 @@ class PollDetailIndex extends Component{
</li>
:""
} */}
<a className="fl color-blue font-16" href={`/api/polls/${this.props.match.params.pollId}/commit_result.xlsx`}>导出统计</a>
<a className="fl color-blue font-16" onClick={()=>this.confirmysl("/polls/"+this.props.match.params.pollId+"/commit_result.xlsx")} href="javascript:void(0);">导出统计</a>
</span>
}
{

@ -1333,31 +1333,32 @@ class Listofworks extends Component {
}
/// 确认是否下载
confirmysl(url){
axios.get(url).then((response) => {
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
this.refs.DownloadMessage.confirmysl(url);
// axios.get(url).then((response) => {
// if(response.data.status&&response.data.status===-1){
// }else if(response.data.status&&response.data.status===-2){
// if(response.data.messages === "100"){
// // 已超出文件导出的上限数量100 ),建议:
// this.setState({
// DownloadType:true,
// DownloadMessageval:100
// })
// }else {
// //因附件资料超过500M
// this.setState({
// DownloadType:true,
// DownloadMessageval:500
// })
// }
// }else {
// this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank');
// }
// }).catch((error) => {
// console.log(error)
// });
}
Downloadcal=()=>{
@ -1397,9 +1398,7 @@ class Listofworks extends Component {
<DownloadMessage
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
ref="DownloadMessage"
/>
{visibles === true ?

@ -473,31 +473,32 @@ class ShixunStudentWork extends Component {
// 导出实习报告批量
/// 确认是否下载
confirmysl(url){
axios.get(url).then((response) => {
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
this.refs.DownloadMessage.confirmysl(url);
// axios.get(url).then((response) => {
// if(response.data.status&&response.data.status===-1){
// }else if(response.data.status&&response.data.status===-2){
// if(response.data.messages === "100"){
// // 已超出文件导出的上限数量100 ),建议:
// this.setState({
// DownloadType:true,
// DownloadMessageval:100
// })
// }else {
// //因附件资料超过500M
// this.setState({
// DownloadType:true,
// DownloadMessageval:500
// })
// }
// }else {
// this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank');
// }
// }).catch((error) => {
// console.log(error)
// });
}
Downloadcal=()=>{
@ -601,9 +602,7 @@ class ShixunStudentWork extends Component {
<DownloadMessage
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
refs="DownloadMessage"
/>
{/*立即发布*/}
<HomeworkModal

@ -30,31 +30,34 @@ class ShixunWorkReport extends Component {
}
/// 确认是否下载
confirmysl(url){
axios.get(url).then((response) => {
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.refs.DownloadMessage.confirmysl(url);
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
// axios.get(url).then((response) => {
// if(response.data.status&&response.data.status===-1){
// }else if(response.data.status&&response.data.status===-2){
// if(response.data.messages === "100"){
// // 已超出文件导出的上限数量100 ),建议:
// this.setState({
// DownloadType:true,
// DownloadMessageval:100
// })
// }else {
// //因附件资料超过500M
// this.setState({
// DownloadType:true,
// DownloadMessageval:500
// })
// }
// }else {
// this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank');
// }
// }).catch((error) => {
// console.log(error)
// });
}
@ -124,9 +127,7 @@ class ShixunWorkReport extends Component {
</div>
<DownloadMessage
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
ref="DownloadMessage"
/>
<div style={{ width:'100%',height:'75px'}} >
<p className=" fl color-black mt25 summaryname">{data&&data.shixun_name}</p>

@ -1677,30 +1677,31 @@ class Trainingjobsetting extends Component {
/// 确认是否下载
confirmysl(url){
axios.get(url).then((response) => {
if(response.data.status&&response.data.status===-1){
this.refs.DownloadMessage.confirmysl(url);
// axios.get(url).then((response) => {
// if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
// }else if(response.data.status&&response.data.status===-2){
// if(response.data.messages === "100"){
// // 已超出文件导出的上限数量100 ),建议:
// this.setState({
// DownloadType:true,
// DownloadMessageval:100
// })
// }else {
// //因附件资料超过500M
// this.setState({
// DownloadType:true,
// DownloadMessageval:500
// })
// }
// }else {
// this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank');
// }
// }).catch((error) => {
// console.log(error)
// });
}
Downloadcal=()=>{
@ -1767,9 +1768,7 @@ class Trainingjobsetting extends Component {
<DownloadMessage
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
ref="DownloadMessage"
/>
{/*立即发布*/}

@ -317,30 +317,31 @@ class Workquestionandanswer extends Component {
/// 确认是否下载
confirmysl(url){
axios.get(url).then((response) => {
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
this.refs.DownloadMessage.confirmysl(url);
// axios.get(url).then((response) => {
// if(response.data.status&&response.data.status===-1){
// }else if(response.data.status&&response.data.status===-2){
// if(response.data.messages === "100"){
// // 已超出文件导出的上限数量100 ),建议:
// this.setState({
// DownloadType:true,
// DownloadMessageval:100
// })
// }else {
// //因附件资料超过500M
// this.setState({
// DownloadType:true,
// DownloadMessageval:500
// })
// }
// }else {
// this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank');
// }
// }).catch((error) => {
// console.log(error)
// });
}
Downloadcal=()=>{
this.setState({
@ -381,9 +382,7 @@ class Workquestionandanswer extends Component {
/> : ""}
<DownloadMessage
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
ref="DownloadMessage"
/>
{/*立即发布*/}
<HomeworkModal

Loading…
Cancel
Save