所有导出统计

dev_forum
caishi 5 years ago
parent 9946062dbe
commit e3e0a6873a

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

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

@ -9,6 +9,8 @@ import PollTabSecond from './PollDetailTabSecond'
import PollTabThird from './PollDetailTabThird' import PollTabThird from './PollDetailTabThird'
import PollTabForth from './PollDetailTabForth' import PollTabForth from './PollDetailTabForth'
import DownloadMessage from '../../modals/DownloadMessage';
import ImmediatelyPublish from './pollPublicBtn/ImmediatelyPublish' import ImmediatelyPublish from './pollPublicBtn/ImmediatelyPublish'
import ImmediatelyEnd from './pollPublicBtn/ImmediatelyEnd' import ImmediatelyEnd from './pollPublicBtn/ImmediatelyEnd'
import CancelPublish from './pollPublicBtn/CancelPublish' import CancelPublish from './pollPublicBtn/CancelPublish'
@ -69,6 +71,10 @@ class PollDetailIndex extends Component{
}) })
} }
confirmysl(url){
this.refs.DownloadMessage.confirmysl(url);
}
render(){ render(){
let {tab,pollDetail,user_permission}=this.state; let {tab,pollDetail,user_permission}=this.state;
@ -76,6 +82,7 @@ class PollDetailIndex extends Component{
const isStudent = this.props.isStudent(); const isStudent = this.props.isStudent();
return( return(
<div className="newMain"> <div className="newMain">
<DownloadMessage {...this.props} ref="DownloadMessage" />
<div className="educontent mt10 mb50"> <div className="educontent mt10 mb50">
<p className="clearfix mb20"> <p className="clearfix mb20">
<WordsBtn style="grey" className="fl" to={`/courses/${this.props.match.params.coursesId}/students`}>{this.props.coursedata.name}</WordsBtn> <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> </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> </span>
} }
{ {

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

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

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

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

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

Loading…
Cancel
Save