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

dev_static
cxt 5 years ago
commit 0476f94387

@ -82,8 +82,8 @@ export function initAxiosInterceptors(props) {
// proxy = "https://testeduplus2.educoder.net" // proxy = "https://testeduplus2.educoder.net"
//proxy="http://47.96.87.25:48080" //proxy="http://47.96.87.25:48080"
proxy="https://pre-newweb.educoder.net" proxy="https://pre-newweb.educoder.net"
// proxy="https://test-newweb.educoder.net" proxy="https://test-newweb.educoder.net"
proxy="https://test-jupyterweb.educoder.net" //proxy="https://test-jupyterweb.educoder.net"
//proxy="http://192.168.2.63:3001" //proxy="http://192.168.2.63:3001"
// 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求 // 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求

@ -100,22 +100,31 @@ export function getUploadActionUrl(path, goTest) {
let anewopens=md5(newopens+newtimestamp); let anewopens=md5(newopens+newtimestamp);
return `${getUrl()}/api/attachments.json${isDev ? `?debug=${window._debugType || 'admin'}&randomcode=${newtimestamp}&client_key=${anewopens}` : `?randomcode=${newtimestamp}&client_key=${anewopens}`}`; return `${getUrl()}/api/attachments.json${isDev ? `?debug=${window._debugType || 'admin'}&randomcode=${newtimestamp}&client_key=${anewopens}` : `?randomcode=${newtimestamp}&client_key=${anewopens}`}`;
} }
export function getUploadActionUrltwo(id) { export function getUploadActionUrltwo(id) {
Railsgettimes() Railsgettimes()
let anewopens=md5(newopens+newtimestamp); let anewopens=md5(newopens+newtimestamp);
return `${getUrlmys()}/api/shixuns/${id}/upload_data_sets.json${isDev ? `?debug=${window._debugType || 'admin'}&randomcode=${newtimestamp}&client_key=${anewopens}` : `?randomcode=${newtimestamp}&client_key=${anewopens}`}` return `${getUrlmys()}/api/shixuns/${id}/upload_data_sets.json${isDev ? `?debug=${window._debugType || 'admin'}&randomcode=${newtimestamp}&client_key=${anewopens}` : `?randomcode=${newtimestamp}&client_key=${anewopens}`}`
} }
export function getUploadActionUrlthree() { export function getUploadActionUrlthree() {
Railsgettimes() Railsgettimes()
let anewopens=md5(newopens+newtimestamp); let anewopens=md5(newopens+newtimestamp);
return `${getUrlmys()}/api/jupyters/import_with_tpm.json${isDev ? `?debug=${window._debugType || 'admin'}&randomcode=${newtimestamp}&client_key=${anewopens}` : `?randomcode=${newtimestamp}&client_key=${anewopens}`}` return `${getUrlmys()}/api/jupyters/import_with_tpm.json${isDev ? `?debug=${window._debugType || 'admin'}&randomcode=${newtimestamp}&client_key=${anewopens}` : `?randomcode=${newtimestamp}&client_key=${anewopens}`}`
} }
export function getUploadActionUrlOfAuth(id) { export function getUploadActionUrlOfAuth(id) {
Railsgettimes() Railsgettimes()
let anewopens=md5(newopens+newtimestamp); let anewopens=md5(newopens+newtimestamp);
return `${getUrl()}/api/users/accounts/${id}/auth_attachment.json${isDev ? `?debug=${window._debugType || 'admin'}&randomcode=${newtimestamp}&client_key=${anewopens}` : `?randomcode=${newtimestamp}&client_key=${anewopens}`}` return `${getUrl()}/api/users/accounts/${id}/auth_attachment.json${isDev ? `?debug=${window._debugType || 'admin'}&randomcode=${newtimestamp}&client_key=${anewopens}` : `?randomcode=${newtimestamp}&client_key=${anewopens}`}`
} }
export function getRandomNumber(type) {
Railsgettimes()
let anewopens=md5(newopens+newtimestamp);
return type===true?`&randomcode=${newtimestamp}&client_key=${anewopens}`:`?randomcode=${newtimestamp}&client_key=${anewopens}`
}
export function test(path) { export function test(path) {
return `${path}`; return `${path}`;
} }

@ -2,7 +2,7 @@
// export { default as OrderStateUtil } from '../routes/Order/components/OrderStateUtil'; // export { default as OrderStateUtil } from '../routes/Order/components/OrderStateUtil';
export { getImageUrl as getImageUrl, getUrl as getUrl, publicSearchs as publicSearchs,getRandomcode as getRandomcode,getUrlmys as getUrlmys, getUrl2 as getUrl2, setImagesUrl as setImagesUrl export { getImageUrl as getImageUrl, getRandomNumber as getRandomNumber,getUrl as getUrl, publicSearchs as publicSearchs,getRandomcode as getRandomcode,getUrlmys as getUrlmys, getUrl2 as getUrl2, setImagesUrl as setImagesUrl
, getUploadActionUrl as getUploadActionUrl,getUploadActionUrltwo as getUploadActionUrltwo ,getUploadActionUrlthree as getUploadActionUrlthree, getUploadActionUrlOfAuth as getUploadActionUrlOfAuth , getUploadActionUrl as getUploadActionUrl,getUploadActionUrltwo as getUploadActionUrltwo ,getUploadActionUrlthree as getUploadActionUrlthree, getUploadActionUrlOfAuth as getUploadActionUrlOfAuth
, getTaskUrlById as getTaskUrlById, TEST_HOST ,htmlEncode as htmlEncode } from './UrlTool'; , getTaskUrlById as getTaskUrlById, TEST_HOST ,htmlEncode as htmlEncode } from './UrlTool';
export { default as queryString } from './UrlTool2'; export { default as queryString } from './UrlTool2';

@ -1,5 +1,5 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import {getRandomNumber,queryString} from 'educoder';
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import {Tooltip,Menu} from 'antd'; import {Tooltip,Menu} from 'antd';
import Loadable from 'react-loadable'; import Loadable from 'react-loadable';
@ -62,7 +62,8 @@ class GraduationTaskDetail extends Component{
ModalCancel:undefined, ModalCancel:undefined,
ModalSave:undefined, ModalSave:undefined,
acrossVisible:undefined, acrossVisible:undefined,
OneSelftype:false OneSelftype:false,
taskdatas:undefined
} }
} }
componentDidMount(){ componentDidMount(){
@ -249,11 +250,13 @@ class GraduationTaskDetail extends Component{
visibles:true visibles:true
}) })
} }
Cancel=()=>{ Cancel=()=>{
this.setState({ this.setState({
visibles:false visibles:false
}) })
} }
// 取消关联 // 取消关联
cannelAssociation=()=>{ cannelAssociation=()=>{
this.setState({ this.setState({
@ -263,6 +266,7 @@ class GraduationTaskDetail extends Component{
ModalSave:this.savetassociton ModalSave:this.savetassociton
}) })
} }
savetassociton=()=>{ savetassociton=()=>{
this.cannerassocition(); this.cannerassocition();
let {questionslist}=this.state; let {questionslist}=this.state;
@ -277,6 +281,7 @@ class GraduationTaskDetail extends Component{
}) })
} }
cannerassocition=()=>{ cannerassocition=()=>{
this.setState({ this.setState({
Modalstype:false, Modalstype:false,
@ -287,6 +292,7 @@ class GraduationTaskDetail extends Component{
visibles:false visibles:false
}) })
} }
// 补交附件 // 补交附件
handaccessory=()=>{ handaccessory=()=>{
// let {taskslistdata}=this.state; // let {taskslistdata}=this.state;
@ -299,14 +305,35 @@ class GraduationTaskDetail extends Component{
avisible:true avisible:true
}) })
} }
Cancelvisible=()=>{ Cancelvisible=()=>{
this.setState({ this.setState({
avisible:false avisible:false
}) })
} }
CodeReview=()=>{
this.props.showNotification("正在导出中...");
const task_Id = this.props.match.params.task_Id;
console.log(this.state.taskdatas)
window.open(`https://test-newweb.educoder.net/api/graduation_tasks/${task_Id}/sonar?teacher_comment=${this.state.taskdatas.teacher_comment}&task_status=${this.state.taskdatas.task_status}&course_group=${this.state.taskdatas.course_group}&cross_comment=${this.state.taskdatas.cross_comment}&search=${this.state.taskdatas.search}&${getRandomNumber(true)}`)
}
getsonars=(teacher_comment,task_status,course_group,cross_comment,search)=>{
let data={
teacher_comment:teacher_comment,
task_status:task_status,
course_group:course_group,
cross_comment:cross_comment,
search:search
}
this.setState({
taskdatas:data
})
}
bindRef = ref => { this.child = ref } ; bindRef = ref => { this.child = ref } ;
render(){ render(){
let courseId=this.props.match.params.coursesId; let courseId=this.props.match.params.coursesId;
@ -512,13 +539,15 @@ class GraduationTaskDetail extends Component{
{ this.props.isAdmin() ? questionslist.status===0 ? <a className={"fr color-blue font-16 mr20"} onClick={() => { this.publish()} }>立即发布</a> : "" : "" } { this.props.isAdmin() ? questionslist.status===0 ? <a className={"fr color-blue font-16 mr20"} onClick={() => { this.publish()} }>立即发布</a> : "" : "" }
{ this.props.isAdmin() && questionslist.cross_comment ? <a className={"fr color-blue font-16"} onClick={this.openAcross}>交叉评阅设置</a> : "" } { this.props.isAdmin() && questionslist.cross_comment ? <a className={"fr color-blue font-16"} onClick={this.openAcross}>交叉评阅设置</a> : "" }
{ this.props.isAdmin() ? <a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation_tasks/"+task_Id+"/edit"}>编辑任务</a> : "" } { this.props.isAdmin() ? <a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation_tasks/"+task_Id+"/edit"}>编辑任务</a> : "" }
{ this.props.user&&this.props.user.admin===true || this.props.user&&this.props.user.business===true ? <a className={"fr color-blue font-16"} onClick={()=>this.CodeReview()}>代码评测</a> : "" }
</div> </div>
</div> </div>
<Switch {...this.props}> <Switch {...this.props}>
{/*//毕设任务列表*/} {/*//毕设任务列表*/}
<Route exact path="/courses/:coursesId/graduation_tasks/:category_id/detail/:task_Id/list" <Route exact path="/courses/:coursesId/graduation_tasks/:category_id/detail/:task_Id/list"
render={ render={
(props) => (<GraduationTaskslist {...this.props} {...props} {...this.state} {...commom} triggerRef={this.bindRef} setend_time={(time)=>this.setend_time(time)} tab={`list`}/>) (props) => (<GraduationTaskslist getsonar={(teacher_comment,task_status,course_group,cross_comment,search)=>this.getsonars(teacher_comment,task_status,course_group,cross_comment,search)}{...this.props} {...props} {...this.state} {...commom} triggerRef={this.bindRef} setend_time={(time)=>this.setend_time(time)} tab={`list`}/>)
} }
></Route> ></Route>

@ -62,6 +62,8 @@ class GraduationTaskssettinglist extends Component{
let{teacher_comment,task_status,course_group,cross_comment,order,b_order,search}=this.state; let{teacher_comment,task_status,course_group,cross_comment,order,b_order,search}=this.state;
this.seacthdata(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,this.state.page); this.seacthdata(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,this.state.page);
this.props.getsonar(teacher_comment, task_status, course_group, cross_comment, search)
try{ try{
this.props.triggerRef(this) this.props.triggerRef(this)
}catch(e){ }catch(e){
@ -88,6 +90,8 @@ class GraduationTaskssettinglist extends Component{
}) })
let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search} = this.state; let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search} = this.state;
this.seacthdata(teacher_comment, task_status, course_group, cross_comment, order, b_order, search,this.state.page); this.seacthdata(teacher_comment, task_status, course_group, cross_comment, order, b_order, search,this.state.page);
this.props.getsonar(teacher_comment, task_status, course_group, cross_comment, search)
} }
seacthdata=(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,pages)=>{ seacthdata=(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,pages)=>{
@ -244,8 +248,10 @@ class GraduationTaskssettinglist extends Component{
if(list.length===key){ if(list.length===key){
this.seacthdata(undefined, task_status, course_group, cross_comment, order, b_order, search,this.state.page); this.seacthdata(undefined, task_status, course_group, cross_comment, order, b_order, search,this.state.page);
this.props.getsonar(undefined, task_status, course_group, cross_comment, search)
}else{ }else{
this.seacthdata(list[0], task_status, course_group, cross_comment, order, b_order, search,this.state.page); this.seacthdata(list[0], task_status, course_group, cross_comment, order, b_order, search,this.state.page);
this.props.getsonar(list[0], task_status, course_group, cross_comment, search)
} }
@ -262,7 +268,7 @@ class GraduationTaskssettinglist extends Component{
loadingstate:true loadingstate:true
}) })
this.seacthdata(teacher_comment, task_status, course_group, e.target.value===undefined||e.target.value===false?"":e.target.value, order, b_order, search,this.state.page); this.seacthdata(teacher_comment, task_status, course_group, e.target.value===undefined||e.target.value===false?"":e.target.value, order, b_order, search,this.state.page);
this.props.getsonar(teacher_comment, task_status, course_group, e.target.value===undefined||e.target.value===false?"":e.target.value, search)
} }
inputSearchValue=(e)=>{ inputSearchValue=(e)=>{
@ -287,7 +293,7 @@ class GraduationTaskssettinglist extends Component{
loadingstate:true loadingstate:true
}) })
this.seacthdata(teacher_comment, task_status, course_group, cross_comment, order, b_order, search,this.state.page); this.seacthdata(teacher_comment, task_status, course_group, cross_comment, order, b_order, search,this.state.page);
this.props.getsonar(teacher_comment, task_status, course_group, cross_comment, search)
} }
funorder = (value, newb_order) => { funorder = (value, newb_order) => {
@ -299,7 +305,7 @@ class GraduationTaskssettinglist extends Component{
loadingstate: true loadingstate: true
}) })
this.seacthdata(teacher_comment, task_status, course_group, cross_comment, value, newb_order, search,this.state.page); this.seacthdata(teacher_comment, task_status, course_group, cross_comment, value, newb_order, search,this.state.page);
this.props.getsonar(teacher_comment, task_status, course_group, cross_comment, search)
} }
@ -320,6 +326,7 @@ class GraduationTaskssettinglist extends Component{
loadingstate:true loadingstate:true
}) })
this.seacthdata(teacher_comment, null, course_group, cross_comment, order, b_order, search,this.state.page); this.seacthdata(teacher_comment, null, course_group, cross_comment, order, b_order, search,this.state.page);
this.props.getsonar(teacher_comment, null, course_group, cross_comment, search)
} }
// else if(checkedValues.length ===key){ // else if(checkedValues.length ===key){
// // 全部抖选中 自然就是查找全部 就是空 // // 全部抖选中 自然就是查找全部 就是空
@ -336,7 +343,7 @@ class GraduationTaskssettinglist extends Component{
loadingstate:true loadingstate:true
}) })
this.seacthdata(teacher_comment, checkedValues===key?undefined:checkedValues, course_group, cross_comment, order, b_order, search,this.state.page); this.seacthdata(teacher_comment, checkedValues===key?undefined:checkedValues, course_group, cross_comment, order, b_order, search,this.state.page);
this.props.getsonar(teacher_comment, checkedValues===key?undefined:checkedValues, course_group, cross_comment, search)
} }
@ -355,6 +362,7 @@ class GraduationTaskssettinglist extends Component{
loadingstate:true loadingstate:true
}) })
this.seacthdata(teacher_comment, task_status, null, cross_comment, order, b_order, search,this.state.page); this.seacthdata(teacher_comment, task_status, null, cross_comment, order, b_order, search,this.state.page);
this.props.getsonar(teacher_comment,task_status, null, cross_comment, search)
} }
// else if(checkedValues.length ===key){ // else if(checkedValues.length ===key){
// // 全部抖选中 自然就是查找全部 就是空 // // 全部抖选中 自然就是查找全部 就是空
@ -372,6 +380,7 @@ class GraduationTaskssettinglist extends Component{
loadingstate:true loadingstate:true
}) })
this.seacthdata(teacher_comment, task_status, checkedValues===key?undefined:checkedValues, cross_comment, order, b_order, search,this.state.page); this.seacthdata(teacher_comment, task_status, checkedValues===key?undefined:checkedValues, cross_comment, order, b_order, search,this.state.page);
this.props.getsonar(teacher_comment,task_status, checkedValues===key?undefined:checkedValues, cross_comment, search)
} }
@ -564,6 +573,7 @@ class GraduationTaskssettinglist extends Component{
// console.log(result) // console.log(result)
if(result.data.status===0){ if(result.data.status===0){
this.seacthdata(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,this.state.page); this.seacthdata(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,this.state.page);
this.props.getsonar(teacher_comment,task_status, course_group, cross_comment, search)
this.props.showNotification(result.data.message); this.props.showNotification(result.data.message);
this.cancelmodel(); this.cancelmodel();
this.setState({ this.setState({
@ -681,7 +691,7 @@ class GraduationTaskssettinglist extends Component{
}) })
let{teacher_comment,task_status,course_group,cross_comment,order,b_order,search}=this.state; let{teacher_comment,task_status,course_group,cross_comment,order,b_order,search}=this.state;
this.seacthdata(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,pageNumber); this.seacthdata(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,pageNumber);
this.props.getsonar(teacher_comment,task_status, course_group, cross_comment, search)
} }
/// 确认是否下载 /// 确认是否下载

@ -465,6 +465,7 @@ class TPMBanner extends Component {
modalsMidval:"• 我们将在1-2个工作日内完成审核", modalsMidval:"• 我们将在1-2个工作日内完成审核",
ModalCancel: this.eopenpublicupdatadata, ModalCancel: this.eopenpublicupdatadata,
ModalSave: this.eopenpublicupdatadata, ModalSave: this.eopenpublicupdatadata,
Loadtype:true,
modalstyles:"848282" modalstyles:"848282"
}) })
} }

Loading…
Cancel
Save