Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

topic_bank
cxt 5 years ago
commit 737a9e3cab

@ -29,7 +29,7 @@ class HomeController < ApplicationController
@subjects = Subject.where(homepage_show: 1).includes(:shixuns, :repertoire).limit(8)
@tea_users = User.where(homepage_teacher: 1).includes(:user_extension).limit(10).order("experience desc")
@stu_users = User.includes(:user_extension).where(user_extensions: {identity: 1}).limit(10).order("experience desc")
@stu_users = User.where(is_test: 0).includes(:user_extension).where(user_extensions: {identity: 1}).limit(10).order("experience desc")
end
def search

@ -334,8 +334,17 @@ class App extends Component {
})
}
}
disableVideoContextMenu = () => {
window.$( "body" ).on( "mousedown", "video", function() {
if(event.which === 3) {
window.$('video').bind('contextmenu',function () { return false; });
} else {
window.$('video').unbind('contextmenu');
}
});
}
componentDidMount() {
this.disableVideoContextMenu();
// force an update if the URL changes
history.listen(() => {

@ -455,7 +455,7 @@ class NewWork extends Component{
`}</style>
{/* TpmQuestionEdit 这个没出现抖动 */}
{ <Form.Item
label="内容"
className="AboutInputForm workContent mdInForm"

@ -200,19 +200,20 @@ class Testpapersettinghomepage extends Component{
})
}
}else {
this.setState({ donwloading: true })
downloadFile({
url: urll,
successCallback: (url) => {
this.setState({ donwloading: false })
console.log('successCallback')
},
failCallback: (responseHtml, url) => {
this.setState({ donwloading: false })
console.log('failCallback')
}
})
this.props.showNotification(`正在下载中`);
this.props.slowDownload(urll)
// this.setState({ donwloading: true })
// downloadFile({
// url: urll,
// successCallback: (url) => {
// this.setState({ donwloading: false })
// console.log('successCallback')
// },
// failCallback: (responseHtml, url) => {
// this.setState({ donwloading: false })
// console.log('failCallback')
// }
// })
// this.props.showNotification(`正在下载中`);
// window.open("/api"+url+`?${queryString.stringify(params)}`+ '&export=true', '_blank');
}
@ -380,7 +381,8 @@ class Testpapersettinghomepage extends Component{
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a onClick={()=>this.confirmysl(`/exercises/${this.props.match.params.Id}/exercise_lists.xlsx`,this.child)}>学生成绩</a></li>
<li><a onClick={()=>this.confpdf(`/api/exercises/${this.props.match.params.Id}/export_exercise`)} >空白试卷</a></li>
{/* <li><a onClick={()=>this.confpdf(`/api/exercises/${this.props.match.params.Id}/export_exercise`)} >空白试卷</a></li> */}
<li><a href={`/api/exercises/${this.props.match.params.Id}/export_exercise`} target="_blank">空白试卷</a></li>
{/*<li><a onClick={()=>this.confirmysl(`/zip/export_exercises?exercise_id=${this.props.match.params.Id}${this.state.groupyslsval===null||this.state.groupyslsval===undefined?null:this.state.groupyslsval}`)}>学生答题试卷</a></li>*/}
</ul>
</li></Spin>:""}

@ -335,11 +335,19 @@ class CoursesNew extends Component {
// this.props.history.push(this.props.current_user.first_category_url);
// }
// window.history.go(-1)
try {
if(id===undefined){
this.props.history.goBack()
this.props.history.push("/");
}else{
if(this.props.current_user.first_category_url===undefined){
this.props.history.push("/");
}else{
this.props.history.push(this.props.current_user.first_category_url);
}
}
}catch (e) {
this.props.history.push("/");
}
}

@ -168,27 +168,29 @@ class ShixunWorkReport extends Component {
// })
//
// }
let{work_comment,work_comment_hidden}=this.state;
this.setState({
showAppraiseModaltype:true,
work_comment_hidden:work_comment===null||work_comment===undefined?this.state.work_type?true:false:work_comment_hidden,
})
}
hideAppraiseModal=()=>{
let{data,work_comment}=this.state;
let{work_comment,work_comment_hidden}=this.state;
this.setState({
showAppraiseModaltype:false,
work_comment_hidden:data&&data.work_comment_hidden===true?true:work_comment!=null?true:false,
work_comment_hidden:work_comment===null||work_comment===undefined?this.state.work_type===1?true:false:work_comment_hidden,
})
}
showAppraiseModals=(list,type)=>{
let{data,work_comment}=this.state;
this.setState({
showAppraiseModaltype:false,
work_comment_hidden:data&&data.work_comment_hidden===true?true:work_comment!=null?true:false,
work_comment_hidden:type===0?false:true,
work_comment:list,
work_type:type,
showAppraiseModals:true,
showAppraiseModalsshow:true
showAppraiseModalsshow:true,
})
}
isdeleteModal=()=>{
@ -258,7 +260,7 @@ class ShixunWorkReport extends Component {
Cancel={()=>this.hideAppraiseModal()}
showCancel={(list,type)=>this.showAppraiseModals(list,type)}
work_comment={this.state.work_comment}
work_type={this.state.work_type}
work_type={work_comment===null||work_comment===undefined?this.state.work_type:work_comment_hidden===true?1:0}
/>:""}
<div className="newMain clearfix ">
<div className={"educontent mb20" }>

@ -81,7 +81,7 @@ class ConclusionEvaluation extends Component {
</span>
),
}, {
title: '耗时',
title: '实战耗时',
key: 'elapsed',
dataIndex: 'elapsed',

@ -150,7 +150,7 @@ class OfficialAcademicTranscript extends Component {
</span>
),
}, {
title: '耗时',
title: '实战耗时',
key: 'elapsedtime',
dataIndex: 'elapsedtime',

@ -62,7 +62,7 @@ window.md_rec_data = md_rec_data;
function md_elocalStorage(editor,mdu,id){
if (window.sessionStorage){
var oc = window.sessionStorage.getItem('content'+mdu);
if(oc !== null ){
if(oc !== null && oc != editor.getValue()){
console.log("#e_tips_"+id)
$("#e_tips_"+id).data('editor', editor);
var h = '您上次有已保存的数据,是否<a style="cursor: pointer;" class="link-color-blue" onclick="md_rec_data(\'content\',\''+ mdu + '\',\'' + id + '\')">恢复</a> ? / <a style="cursor: pointer;" class="link-color-blue" onclick="md_clear_data(\'content\',\''+ mdu + '\',\'' + id + '\')">不恢复</a>';

Loading…
Cancel
Save