# Conflicts:
#	public/react/src/modules/login/Trialapplicationysl.js
dev_forum
杨树林 5 years ago
parent 8464485db3
commit b45569f497

@ -2204,8 +2204,13 @@ class Listofworksstudentone extends Component {
// } // }
daochushixunbaogao=()=>{ daochushixunbaogao=()=>{
let url =`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}&work_status=${this.state.course_groupyslstwo===undefined ||this.state.course_groupyslstwo===null? "": this.state.course_groupyslstwo}&course_group=${this.state.checkedValuesineinfo===undefined||this.state.checkedValuesineinfo===null? "":this.state.checkedValuesineinfo}&search=${this.state.searchtext===undefined||this.state.searchtext===null?"":this.state.searchtext}`
this.confirmysl(url);
}
daochuzuoye =() =>{
let url = `/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx?group_id=${this.state.checkedValuesineinfo===undefined||this.state.checkedValuesineinfo===null?"":this.state.checkedValuesineinfo}&search=${this.state.searchtext===undefined||this.state.searchtext=== null?"":this.state.searchtext}`
this.confirmysl(url);
} }

@ -32,8 +32,6 @@ class ShixunHomeworkPage extends Component {
visible: false, visible: false,
showmodel:false, showmodel:false,
child:undefined, child:undefined,
DownloadType:false,
DownloadMessageval:undefined,
} }
} }
@ -86,9 +84,14 @@ class ShixunHomeworkPage extends Component {
} }
// confirmysl(child,url) { confirmysl(child,i) {
// confirmysl(url); if(i===1){
// } child.daochushixunbaogao();
}
if(i===2){
child.daochuzuoye();
}
}
homeworkendss(child){ homeworkendss(child){
child.homeworkends(); child.homeworkends();
@ -199,10 +202,10 @@ class ShixunHomeworkPage extends Component {
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i> 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}> <ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}>
<li><a <li><a
onClick={(url) => this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}&work_status=${this.state.course_groupyslstwo===undefined ||this.state.course_groupyslstwo===null? null: this.state.course_groupyslstwo}&course_group=${this.state.checkedValuesineinfo===undefined||this.state.checkedValuesineinfo===null? null:this.state.checkedValuesineinfo}&search=${this.state.searchtext===undefined||this.state.searchtext===null?null:this.state.searchtext}`)}>实训报告</a> onClick={(child,i) => this.confirmysl(this.child,1)}>实训报告</a>
</li> </li>
<li><a <li><a
onClick={(url) => this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx?group_id=${this.state.checkedValuesineinfo===undefined||this.state.checkedValuesineinfo===null?null:this.state.checkedValuesineinfo}&search=${this.state.searchtext===undefined||this.state.searchtext=== null?null:this.state.searchtext}`)}>学生成绩</a> onClick={(child,i) => this.confirmysl(this.child,2)}>学生成绩</a>
</li> </li>
</ul> </ul>

@ -3,6 +3,7 @@ import CoursesListType from '../coursesPublic/CoursesListType';
import {WordsBtn,ActionBtn} from 'educoder'; import {WordsBtn,ActionBtn} from 'educoder';
import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal'; import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal';
import HomeworkModal from "../coursesPublic/HomeworkModal"; import HomeworkModal from "../coursesPublic/HomeworkModal";
import DownloadMessageysl from '../../modals/DownloadMessageysl';
import NoneData from '../coursesPublic/NoneData'; import NoneData from '../coursesPublic/NoneData';
import { import {
Form, Form,
@ -69,6 +70,8 @@ class ShixunStudentWork extends Component {
datalist:undefined, datalist:undefined,
showmodel:false, showmodel:false,
jobsettingsdata:undefined, jobsettingsdata:undefined,
DownloadType:false,
DownloadMessageval:undefined
} }
} }
@ -507,6 +510,52 @@ class ShixunStudentWork extends Component {
ChangeTab=(e)=>{ ChangeTab=(e)=>{
this.props.ChangeTab(e); this.props.ChangeTab(e);
} }
daochushixunbaogao=()=>{
let url =`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`;
this.confirmysl(url);
}
daochuzuoye =() =>{
let url = `/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`;
this.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){
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({
DownloadType:false,
DownloadMessageval:undefined
})
}
render() { render() {
let { let {
data, data,
@ -596,6 +645,13 @@ class ShixunStudentWork extends Component {
issCancel={()=>this.hideshowmodel()} issCancel={()=>this.hideshowmodel()}
updatas={()=>this.getupdata()} updatas={()=>this.getupdata()}
/>:""} />:""}
<DownloadMessageysl
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
{/*<DownloadMessage*/} {/*<DownloadMessage*/}
{/* {...this.props}*/} {/* {...this.props}*/}

@ -27,6 +27,7 @@ import moment from 'moment';
import 'moment/locale/zh-cn'; import 'moment/locale/zh-cn';
import Modals from "../../modals/Modals"; import Modals from "../../modals/Modals";
import Startshixuntask from "../coursesPublic/Startshixuntask"; import Startshixuntask from "../coursesPublic/Startshixuntask";
import DownloadMessageysl from "../../modals/DownloadMessageysl";
const RadioGroup = Radio.Group; const RadioGroup = Radio.Group;
//GraduationTaskssetting.js //GraduationTaskssetting.js
@ -1730,6 +1731,52 @@ class Trainingjobsetting extends Component {
ChangeTab=(e)=>{ ChangeTab=(e)=>{
this.props.ChangeTab(e); this.props.ChangeTab(e);
} }
daochushixunbaogao=()=>{
let url =`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`;
this.confirmysl(url);
}
daochuzuoye =() =>{
let url = `/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`;
this.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){
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({
DownloadType:false,
DownloadMessageval:undefined
})
}
render() { render() {
@ -1776,7 +1823,13 @@ class Trainingjobsetting extends Component {
{/* {...this.props}*/} {/* {...this.props}*/}
{/* ref="DownloadMessage"*/} {/* ref="DownloadMessage"*/}
{/*/>*/} {/*/>*/}
<DownloadMessageysl
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
{/*立即发布*/} {/*立即发布*/}
<HomeworkModal <HomeworkModal
modaltype={this.state.modaltype} modaltype={this.state.modaltype}

@ -35,6 +35,7 @@ import Homeworddescription from "../shixunHomework/Homeworddescription";
import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal'; import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal';
import HomeworkModal from "../coursesPublic/HomeworkModal"; import HomeworkModal from "../coursesPublic/HomeworkModal";
import Startshixuntask from "../coursesPublic/Startshixuntask"; import Startshixuntask from "../coursesPublic/Startshixuntask";
import DownloadMessageysl from "../../modals/DownloadMessageysl";
const TextArea = Input.TextArea const TextArea = Input.TextArea
//作业问答页面 //作业问答页面
@ -319,6 +320,52 @@ class Workquestionandanswer extends Component {
ChangeTab=(e)=>{ ChangeTab=(e)=>{
this.props.ChangeTab(e); this.props.ChangeTab(e);
} }
daochushixunbaogao=()=>{
let url =`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`;
this.confirmysl(url);
}
daochuzuoye =() =>{
let url = `/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`;
this.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){
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({
DownloadType:false,
DownloadMessageval:undefined
})
}
render() { render() {
const dateFormat = 'YYYY-MM-DD HH:mm:ss'; const dateFormat = 'YYYY-MM-DD HH:mm:ss';
let { let {
@ -352,6 +399,13 @@ class Workquestionandanswer extends Component {
{/* ref="DownloadMessage"*/} {/* ref="DownloadMessage"*/}
{/*/>*/} {/*/>*/}
{/*立即发布*/} {/*立即发布*/}
<DownloadMessageysl
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
<HomeworkModal <HomeworkModal
modaltype={this.state.modaltype} modaltype={this.state.modaltype}
modalname={this.state.modalname} modalname={this.state.modalname}

Loading…
Cancel
Save