# 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=()=>{
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,
showmodel:false,
child:undefined,
DownloadType:false,
DownloadMessageval:undefined,
}
}
@ -86,9 +84,14 @@ class ShixunHomeworkPage extends Component {
}
// confirmysl(child,url) {
// confirmysl(url);
// }
confirmysl(child,i) {
if(i===1){
child.daochushixunbaogao();
}
if(i===2){
child.daochuzuoye();
}
}
homeworkendss(child){
child.homeworkends();
@ -199,10 +202,10 @@ class ShixunHomeworkPage extends Component {
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}>
<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><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>
</ul>

@ -3,6 +3,7 @@ import CoursesListType from '../coursesPublic/CoursesListType';
import {WordsBtn,ActionBtn} from 'educoder';
import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal';
import HomeworkModal from "../coursesPublic/HomeworkModal";
import DownloadMessageysl from '../../modals/DownloadMessageysl';
import NoneData from '../coursesPublic/NoneData';
import {
Form,
@ -69,6 +70,8 @@ class ShixunStudentWork extends Component {
datalist:undefined,
showmodel:false,
jobsettingsdata:undefined,
DownloadType:false,
DownloadMessageval:undefined
}
}
@ -507,6 +510,52 @@ class ShixunStudentWork extends Component {
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() {
let {
data,
@ -596,6 +645,13 @@ class ShixunStudentWork extends Component {
issCancel={()=>this.hideshowmodel()}
updatas={()=>this.getupdata()}
/>:""}
<DownloadMessageysl
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
{/*<DownloadMessage*/}
{/* {...this.props}*/}

@ -27,6 +27,7 @@ import moment from 'moment';
import 'moment/locale/zh-cn';
import Modals from "../../modals/Modals";
import Startshixuntask from "../coursesPublic/Startshixuntask";
import DownloadMessageysl from "../../modals/DownloadMessageysl";
const RadioGroup = Radio.Group;
//GraduationTaskssetting.js
@ -1730,6 +1731,52 @@ class Trainingjobsetting extends Component {
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() {
@ -1776,7 +1823,13 @@ class Trainingjobsetting extends Component {
{/* {...this.props}*/}
{/* ref="DownloadMessage"*/}
{/*/>*/}
<DownloadMessageysl
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
{/*立即发布*/}
<HomeworkModal
modaltype={this.state.modaltype}

@ -35,6 +35,7 @@ import Homeworddescription from "../shixunHomework/Homeworddescription";
import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal';
import HomeworkModal from "../coursesPublic/HomeworkModal";
import Startshixuntask from "../coursesPublic/Startshixuntask";
import DownloadMessageysl from "../../modals/DownloadMessageysl";
const TextArea = Input.TextArea
//作业问答页面
@ -319,6 +320,52 @@ class Workquestionandanswer extends Component {
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() {
const dateFormat = 'YYYY-MM-DD HH:mm:ss';
let {
@ -352,6 +399,13 @@ class Workquestionandanswer extends Component {
{/* ref="DownloadMessage"*/}
{/*/>*/}
{/*立即发布*/}
<DownloadMessageysl
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
<HomeworkModal
modaltype={this.state.modaltype}
modalname={this.state.modalname}

Loading…
Cancel
Save