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

chromesetting
杨树林 5 years ago
commit f3f0d57da4

@ -326,8 +326,8 @@ module.exports = {
comments: false
},
compress: {
drop_debugger: false,
drop_console: false
drop_debugger: true,
drop_console: true
}
}
}),

@ -554,6 +554,17 @@ class MessagChat extends Component{
{myuserl!==undefined?myuserl.name:""}与你的私信
</p>
{/*聊天页面*/}
<style>
{
`
.dialogPanel{
padding: 0px 20px;
height: 400px !important;
overflow-y: auto;
}
`
}
</style>
<div className="dialogPanel"
onScroll={this.contentViewScrolltop}
ref={(div) => {
@ -637,6 +648,18 @@ class MessagChat extends Component{
{/*右边头部*/}
<p className="pt30 pb30 pl30 edu-txt-left font-16 bor-bottom-greyE">私信列表</p>
<Spin size="large" className="myw100baifenbi" spinning={isSpins}>
<style>
{
`
.private-list{
min-height: 680px !important;
max-height: 680px !important;
overflow-y: auto;
overflow-x: hidden;
}
`
}
</style>
<div className="private-list" onScroll={this.contentViewScrolledit}>
{/*列表数据*/}
{

@ -366,7 +366,7 @@ class TPMBanner extends Component {
Modalstype: true,
Modalstopval: "是否确认撤销发布?",
modalsMidval:"撤销发布后,学员将无法进行练习,若您新增关",
ModalsBottomval:"卡,学员需要重新体验课程",
ModalsBottomval:"卡,学员需要重新体验实训",
ModalCancel: this.ModalCancel,
ModalSave: this.ModalSave,
modalstyles:"848282"
@ -1223,7 +1223,7 @@ class TPMBanner extends Component {
}
{this.props.identity < 5 && shixunsDetails.shixun_status != -1 && shixunsDetails.shixun_status != 0?
{this.props.identity < 8 && shixunsDetails.shixun_status != -1 && shixunsDetails.shixun_status != 0?
<div className="fr kaike kkbth mr20"
style={{display: shixunsDetails.can_copy === false || shixunsDetails.can_copy === null ? "none" : "flex"}}>
<Tooltip placement="bottom" title={"基于这个实训修改形成新的实训"}>

@ -156,8 +156,10 @@ class TPMDataset extends Component {
selectedRowKeysdata:[],
selectedRowKeys: [],
checked:false,
page:1,
});
}
}
@ -181,7 +183,7 @@ class TPMDataset extends Component {
getdatastwo = (page,limit) => {
let id=this.props.match.params.shixunId;
let collaborators=`/shixuns/${id}/jupyter_data_sets.json`;
let collaborators=`/shixuns/${id}/get_data_sets.json`;
axios.get(collaborators,{params:{
page:page,
limit:limit,
@ -209,6 +211,7 @@ class TPMDataset extends Component {
selectedRowKeysdata:[],
selectedRowKeys: [],
checked:false,
page:page,
});
}
@ -233,7 +236,7 @@ class TPMDataset extends Component {
getdatasthree = (page,limit) => {
let id=this.props.match.params.shixunId;
let collaborators=`/shixuns/${id}/jupyter_data_sets.json`;
let collaborators=`/shixuns/${id}/get_data_sets.json`;
axios.get(collaborators,{params:{
page:page,
limit:limit,
@ -298,10 +301,19 @@ class TPMDataset extends Component {
this.setState({
fileList: appendFileSizeToUploadFileAll(fileList),
});
if(info.file.status === 'done'){
//done 成功就会调用这个方法
this.getdatas();
if(info.file.response){
if(info.file.response.status===-1||info.file.response.status==="-1"){
}else{
this.getdatas();
}
}
}
if(info.file.response){
if(info.file.response.status===-1||info.file.response.status==="-1"){
// console.log("准备显示弹框了");
@ -318,6 +330,8 @@ class TPMDataset extends Component {
tittest:info.file.response.message,
itemtypebool:itemtype>-1?true:itemtype<=-1?false:false,
})
}else{
}
}

@ -72,11 +72,18 @@ export default class Shixuninformation extends Component {
componentDidMount() {
if (this.props.data) {
if (this.props.data.shixun) {
let time =this.props.data && this.props.data.shixun.opening_time;
let timetype=false;
if(!time){
timetype=false;
}else{
timetype=true;
}
this.setState({
can_copy: this.props.data && this.props.data.shixun.can_copy === undefined ? false : this.props.data && this.props.data.shixun.can_copy,
use_scope: this.props.data && this.props.data.shixun.use_scope,
opening_time: this.props.data && this.props.data.shixun.opening_time,
opentime: !this.props.data && this.props.data.shixun.opening_time ? false : true,
opentime: timetype,
oldscope_partment: this.props.data && this.props.data.shixun.scope_partment,
})
}
@ -100,11 +107,18 @@ export default class Shixuninformation extends Component {
if (prevProps.data != this.props.data) {
if (this.props.data) {
if (this.props.data.shixun) {
let time =this.props.data && this.props.data.shixun.opening_time;
let timetype=false;
if(!time){
timetype=false;
}else{
timetype=true;
}
this.setState({
can_copy: this.props.data && this.props.data.shixun.can_copy === undefined ? false : this.props.data && this.props.data.shixun.can_copy,
use_scope: this.props.data && this.props.data.shixun.use_scope,
opening_time: this.props.data && this.props.data.shixun.opening_time,
opentime: !this.props.data && this.props.data.shixun.opening_time ? false : true,
opentime: timetype,
oldscope_partment: this.props.data && this.props.data.shixun.scope_partment,
})
}
@ -257,9 +271,15 @@ export default class Shixuninformation extends Component {
}
setopentime = (e) => {
if(e.target.checked===false){
this.setState({
opening_time:null
})
}
this.setState({
opentime: e.target.checked
})
}
render() {

@ -57,14 +57,14 @@ export default class TPMsettings extends Component {
});
if(key==="3"&&this.props.shixunsDetails&&this.props.shixunsDetails.is_jupyter === true){
this.props.history.replace(`/shixuns/${this.props.match.params.shixunId}/challenges`);
window.location.href =`/shixuns/${this.props.match.params.shixunId}/challenges`;
}else{
if(key){
this.setState({
activeKeys:key
})
}else{
this.props.history.replace(`/shixuns/${this.props.match.params.shixunId}/challenges`);
window.location.href =`/shixuns/${this.props.match.params.shixunId}/challenges`;
}
}

@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-12-12 10:34:03
* @LastEditors: tangjiang
* @LastEditTime: 2019-12-13 21:19:30
* @LastEditTime: 2019-12-13 22:46:51
*/
import './index.scss';
import React, { useState, useEffect } from 'react';
@ -71,7 +71,7 @@ function LeftPane (props) {
{/* <span className="iconfont icon-java jupyter_data_icon"></span>数据集 */}
</h2>
{ renderCtx }
<div className='jupyter_pagination' style={{ display: dataSets > 0 ? 'flex' : 'none'}}>
<div className='jupyter_pagination'>
<Pagination
simple
current={pagination.page}

@ -456,14 +456,14 @@ class Newshixuns extends Component {
</div>
<div className="padding10-20 color-grey-3 clearfix">
<Form>
{this.props.user&&this.props.user.admin===true||this.props.user&&this.props.user.business===true?<Form.Item label="实训类型">
<Form.Item label="实训类型">
{getFieldDecorator('is_jupyter')(
<Radio.Group onChange={this.RadiovalueonChange}>
<Radio.Group onChange={this.RadiovalueonChange} value={this.state.Radiovalue}>
<Radio value="1">普通实训</Radio>
<Radio value="2">Jupyter实训</Radio>
{this.props.user&&this.props.user.admin===true||this.props.user&&this.props.user.business===true?<Radio value="2" >Jupyter实训</Radio>:""}
</Radio.Group>,
)}
</Form.Item>:""}
</Form.Item>
<Form.Item
label="名称"
className="mt15"

@ -183,9 +183,18 @@ class Challengesjupyter extends Component {
render() {
let{ChallengesDataList,booljupyterurls}=this.state;
let id = this.props.match.params.shixunId;
//老师
const is_teacher = this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false;
//运营人员
const business = this.props&&this.props.current_user&&this.props.current_user.business?this.props.current_user.business:false;
//管理员
const admin = this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false;
let mysidentity =false;
try {
mysidentity =this.props.identity < 5 &&ChallengesDataList&& ChallengesDataList.shixun_status< 3?true:false;
}catch (e) {
}
return (
<React.Fragment>
@ -254,7 +263,7 @@ class Challengesjupyter extends Component {
""
:
(
is_teacher===true?
is_teacher===true||admin===true||business===true||mysidentity===true?
<div className="sortinxdirection mt60">
<div className="renwuxiangssi sortinxdirection">
<div><p className="renwuxiangqdiv">任务详情</p></div>
@ -297,7 +306,7 @@ class Challengesjupyter extends Component {
}
</style>
{
is_teacher===true?
is_teacher===true||admin===true||business===true||mysidentity===true?
<div className="mt35">
<div className="pb47">
{

@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-12-12 09:01:30
* @LastEditors: tangjiang
* @LastEditTime: 2019-12-13 21:02:48
* @LastEditTime: 2019-12-13 23:03:27
*/
import types from "./actionTypes";
import { message } from 'antd';
@ -100,7 +100,12 @@ export const syncJupyterCode = (identifier, msg) => {
if (res.data.status === 401) return;
if (res.status === 200) {
const {status} = res.data
if (status === 0) message.success(msg);
if (status === 0) {
message.success(msg);
setTimeout(() => {
window.location.reload();
}, 300);
}
}
})
}

Loading…
Cancel
Save