Merge remote-tracking branch 'origin/master'

dev_forum
杨树明 5 years ago
commit 6a9cd9ba15

@ -51,16 +51,16 @@ class EvaluateSuccessEffectDisplay extends Component {
</div>
<div className="clearfix" id="picture-content">
<div className="fl with33 mr03precent pt10 mb50">
<img alt="Icon"
src={orignal_picture[0].pic_url}/>
{orignal_picture[0] && <img alt="Icon"
src={ orignal_picture[0].pic_url}/>}
</div>
<div className="fl with33 mr03precent pt10 mb50">
<img alt="Icon"
src={user_picture[0].pic_url}/>
{user_picture[0] && <img alt="Icon"
src={ user_picture[0].pic_url }/>}
</div>
<div className="fl with33 mr03precent pt10 mb50">
<img alt="Icon"
src={answer_picture[0].pic_url}/>
{ answer_picture[0] && <img alt="Icon"
src={ answer_picture[0].pic_url}/> }
</div>
</div>
</div>

@ -896,7 +896,7 @@ pop_box_new(htmlvalue, 480, 182);
{/* mb20 加了有样式问题 */}
<DialogActions className={""} id="dialog-actions">
{ this.isSingleButton ? <div className="task-popup-submit clearfix"
style={{ textAlign: 'center' }}>
style={{ textAlign: 'center', 'margin-bottom': '14px'}}>
<a className="task-btn task-btn-orange"
onClick={this.handleGdialogClose}
>知道啦</a>

@ -58,8 +58,9 @@ function buildColumns(that, student_works) {
const isAdminOrStudent = that.props.isAdminOrStudent()
const isStudent = that.props.isStudent()
const isNiPing = homework_status && homework_status.indexOf('匿评中') != -1
const isAppeal = homework_status && homework_status.indexOf('申诉中') != -1
// https://www.trustie.net/issues/21450 分组作业作品列表 学时视角,匿评阶段的列表显示信息不正确
const niPingAndIsStudent = isStudent && isNiPing
const niPingAndIsStudent = isStudent && (isNiPing || isAppeal)
let columns = [{
width: 60,

@ -1149,7 +1149,8 @@ class CommonWorkSetting extends Component{
<div className={" mb10 ml30"}>
<span>结束时间</span>
<ConditionToolTip condition={moment(init_late_time) < this.fetchMoment} title={"时间已过,不能再修改"}>
{/* <ConditionToolTip condition={moment(init_late_time) < this.fetchMoment} title={""}>
</ConditionToolTip> */}
<span>
<DatePicker
showToday={false}
@ -1163,7 +1164,8 @@ class CommonWorkSetting extends Component{
value={!late_time ? undefined :moment(late_time, dateFormat)}
onChange={this.onChangeTimelatetime}
disabledTime={disabledDateTime}
disabled={!allow_late || noAuth || moment(init_late_time) < moment()}
// || moment(init_late_time) < moment()
disabled={!allow_late || noAuth }
// disabledDate={ (late_time) =>
// {
// const end_time = this.state.end_time
@ -1172,7 +1174,7 @@ class CommonWorkSetting extends Component{
// }
/>
</span>
</ConditionToolTip>
<span className={"font-14 color-grey-9 ml10"}>学生延时提交作品的时间截点</span>
{<div className={"latetimetype color-red "}>{latetimetype}</div>}
</div>

@ -38,7 +38,8 @@ class NewWork extends Component{
}
}
fetchCourseData = (courseId) => {
const url = `/courses/${courseId}/homework_commons/new.json?type=1`
const isGroup = this.props.isGroup()
const url = `/courses/${courseId}/homework_commons/new.json?type=${isGroup ? 3 : 1}`
axios.get(url, {
})
.then((response) => {
@ -369,7 +370,8 @@ class NewWork extends Component{
</p> */}
<CBreadcrumb items={[
{ to: `/courses/${courseId}`, name: this.state.course_name},
{ to: `/courses/${courseId}/${moduleEngName}/${category && category.category_id ? category.category_id : ''}`, name: moduleName },
{ to: `/courses/${courseId}/${moduleEngName}/${category && category.category_id ? category.category_id : ''}`
, name: category && category.category_name },
{ name: `${ this.isEdit ? '编辑' : '新建'}` }
]}></CBreadcrumb>

@ -0,0 +1,21 @@
import {Base64} from 'js-base64';
import axios from 'axios';
// 导出实习报告批量zip 、xlsx 类型
export function Internshipreportsy (url,struy,types,stingtype){
axios.get((url),{responseType: 'blob'}).then((response) => {
const blob = new Blob([response.data], { type: stingtype });
const downloadElement = document.createElement('a');
const href = window.URL.createObjectURL(blob);
const string = Base64.decode(response.headers['content-disposition'].split('=')[1]);
downloadElement.href = href;
downloadElement.download = string+struy+types;
document.body.appendChild(downloadElement);
downloadElement.click();
document.body.removeChild(downloadElement) ;// 下载完成移除元素
window.URL.revokeObjectURL(href) // 释放掉blob对象
}).catch((error) => {
console.log(error)
});
}

@ -5,6 +5,7 @@ import TraineetraininginformationModal from './TraineetraininginformationModal';
import ModulationModal from "../coursesPublic/ModulationModal";
import HomeworkModal from "../coursesPublic/HomeworkModal";
import {Base64} from 'js-base64';
import {Internshipreportsy} from './Httpdownloads'
import {
Form,
Select,
@ -1336,7 +1337,7 @@ class Listofworks extends Component {
});
}
/// 确认是否下
/// 确认是否下
confirmysl(url,type){
var struy="";
try {
@ -1348,6 +1349,7 @@ class Listofworks extends Component {
}
axios.get(url).then((response) => {
if(response !== undefined){
if(response.data.status&&response.data.status===-1){
console.log("1352");
console.log(response);
@ -1357,60 +1359,61 @@ class Listofworks extends Component {
console.log(response);
}else {
if(type === 1){
this.internshipreport(url,struy)
Internshipreportsy(url,struy,".zip",'application/zip');
}else{
this.Classstudentachievement(url,struy);
Internshipreportsy(url,struy,".xlsx",'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
}
}
}).catch((error) => {
console.log(error)
});
}
// 导出实习报告批量
internshipreport = (url,struy)=>{
console.log("internshipreport");
axios.get((url),{responseType: 'blob'}).then((response) => {
console.log("1350");
console.log(response);
const type='application/zip'//ZIP文件
const blob = new Blob([response.data], { type: type });
const downloadElement = document.createElement('a');
const href = window.URL.createObjectURL(blob);
const string = Base64.decode(response.headers['content-disposition'].split('=')[1]);
console.log(response.headers['content-disposition'].split('=')[1]);
downloadElement.href = href;
downloadElement.download = string+struy+".zip";
document.body.appendChild(downloadElement);
downloadElement.click();
document.body.removeChild(downloadElement) ;// 下载完成移除元素
window.URL.revokeObjectURL(href) // 释放掉blob对象
}).catch((error) => {
console.log(error)
});
}
// 课堂学生成绩的导出下载
Classstudentachievement=(url,struy)=>{
console.log("Classstudentachievement");
axios.get((url),{responseType: 'blob'}).then((response) => {
console.log("1374");
console.log(response);
const type='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' //excel文件
const blob = new Blob([response.data], { type: type });
const downloadElement = document.createElement('a');
const href = window.URL.createObjectURL(blob);
const string = Base64.decode(response.headers['content-disposition'].split('=')[1]);
console.log(response.headers['content-disposition'].split('=')[1]);
downloadElement.href = href;
downloadElement.download =string+struy+".xlsx";
document.body.appendChild(downloadElement);
downloadElement.click();
document.body.removeChild(downloadElement); // 下载完成移除元素
window.URL.revokeObjectURL(href) // 释放掉blob对象
}).catch((error) => {
console.log(error)
});
}
// 导出实习报告批量
// internshipreport = (url,struy,types,stingtype)=>{
// console.log("internshipreport");
//
// axios.get((url),{responseType: 'blob'}).then((response) => {
// console.log("1350");
// console.log(response);
// const type='application/zip'//ZIP文件
// const blob = new Blob([response.data], { type: stingtype });
// const downloadElement = document.createElement('a');
// const href = window.URL.createObjectURL(blob);
// const string = Base64.decode(response.headers['content-disposition'].split('=')[1]);
// console.log(response.headers['content-disposition'].split('=')[1]);
// downloadElement.href = href;
// downloadElement.download = string+struy+types;
// document.body.appendChild(downloadElement);
// downloadElement.click();
// document.body.removeChild(downloadElement) ;// 下载完成移除元素
// window.URL.revokeObjectURL(href) // 释放掉blob对象
// }).catch((error) => {
// console.log(error)
// });
// }
// // 课堂学生成绩的导出下载
// Classstudentachievement=(url,struy)=>{
// console.log("Classstudentachievement");
// axios.get((url),{responseType: 'blob'}).then((response) => {
// console.log("1374");
// console.log(response);
// const type='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' //excel文件
// const blob = new Blob([response.data], { type: type });
// const downloadElement = document.createElement('a');
// const href = window.URL.createObjectURL(blob);
// const string = Base64.decode(response.headers['content-disposition'].split('=')[1]);
// console.log(response.headers['content-disposition'].split('=')[1]);
// downloadElement.href = href;
// downloadElement.download =string+struy+".xlsx";
// document.body.appendChild(downloadElement);
// downloadElement.click();
// document.body.removeChild(downloadElement); // 下载完成移除元素
// window.URL.revokeObjectURL(href) // 释放掉blob对象
// }).catch((error) => {
// console.log(error)
// });
// }
render() {
// console.log("Listofworks.js000")

@ -79,7 +79,6 @@ class InterestpageComponent extends Component {
if (response.data.status === 402) {
window.location.href = response.data.url;
} else {
broadcastChannelPostMessage('refreshPage')
this.setState({
isRender: false
})

Loading…
Cancel
Save