dev_aliyun2
harry 5 years ago
parent 2de7a09759
commit 98024231e1

@ -1,107 +0,0 @@
.App {
text-align: center;
}
.App-logo {
animation: App-logo-spin infinite 20s linear;
height: 80px;
}
.App-header {
background-color: #222;
height: 150px;
padding: 20px;
color: white;
}
.App-title {
font-size: 1.5em;
}
.App-intro {
font-size: large;
}
@keyframes App-logo-spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
/* md
codermirror maybeUpdateLineNumberWidth
*/
.editormd .CodeMirror-linenumbers {
padding: 0;
}
.editormd-html-preview hr, .editormd-preview-container hr {
/* 颜色加深 */
border-top: 1px solid #ccc;
}
/* 重置掉antd的一些样式 */
html, body {
-webkit-font-smoothing: auto !important;
}
.ant-progress-textyes {
color: #52c41a;
}
.ant-progress-textno{
color: #f5222d;
}
/* md多空格 */
.markdown-body p {
white-space: pre-wrap;
font-size: 16px!important
}
.markdown-body > p {
line-height: 25px;
}
/* https://www.educoder.net/courses/2346/group_homeworks/34405/question */
.renderAsHtml.markdown-body p {
white-space: inherit;
}
/* resize */
.editormd .CodeMirror {
border-right: none !important;
}
.editormd-preview {
border-left: 1px solid rgb(221, 221, 221);
/* 某些情况下被cm盖住了 */
z-index: 99;
}
/* 图片点击放大的场景,隐藏图片链接 */
.editormd-image-click-expand .editormd-image-dialog {
height: 234px !important;
}
.editormd-image-click-expand .editormd-image-dialog .image-link {
display: none;
}
/* 解决鼠标框选时,左边第一列没高亮的问题 */
.CodeMirror .CodeMirror-lines pre.CodeMirror-line, .CodeMirror .CodeMirror-lines pre.CodeMirror-line-like {
padding: 0 12px ;
}
/* antd扩展 */
.formItemInline.ant-form-item {
display: flex;
}
.formItemInline .ant-form-item-control-wrapper {
flex: 1;
}
/* AutoComplete placeholder 不显示的问题 */
.ant-select-auto-complete.ant-select .ant-select-selection__placeholder {
z-index: 2;
}
/* 兼容性 */
/* 火狐有滚动条时高度问题 */
@-moz-document url-prefix() {
.newContainers {
min-height: calc(100% - 60px) !important;
}
}

@ -53,6 +53,7 @@ ul {
html,
body {
-webkit-font-smoothing: auto !important;
font-size: 16px;
}
.ant-progress-textyes {

@ -51,12 +51,12 @@ class TPMBanner extends Component {
isSpin: false,
Senttothevcaluetype: false,
jupyterbool: false,
openknow:false,
openshowpublictype:false,
Radiovalue:1,
TextAreaintshow:false,
cancelText:undefined,
okText:undefined,
openknow: false,
openshowpublictype: false,
Radiovalue: 1,
TextAreaintshow: false,
cancelText: undefined,
okText: undefined,
}
}
@ -410,12 +410,12 @@ class TPMBanner extends Component {
this.setState({
Modalstype: false,
Modalstopval: "",
modalsMidval:undefined,
ModalsBottomval:"",
modalstyles:"",
cancelText:undefined,
okText:undefined,
Loadtype:false,
modalsMidval: undefined,
ModalsBottomval: "",
modalstyles: "",
cancelText: undefined,
okText: undefined,
Loadtype: false,
})
}
ModalSave = () => {
@ -446,18 +446,18 @@ class TPMBanner extends Component {
ModalSaveopenpublic = () => {
this.setState({
Modalstype: true,
Modalstopval:"公开实训需经过平台标准化审核审核周期为1-2天",
modalsMidval:"公开的实训将对平台所有人可见。若仅本人教学使用",
ModalsBottomval:"则无需申请公开, 直接发送到课堂即可。",
cancelText:"取消申请",
okText:"确定申请",
Modalstopval: "公开实训需经过平台标准化审核审核周期为1-2天",
modalsMidval: "公开的实训将对平台所有人可见。若仅本人教学使用",
ModalsBottomval: "则无需申请公开, 直接发送到课堂即可。",
cancelText: "取消申请",
okText: "确定申请",
ModalCancel: this.ModalCancel,
ModalSave: this.eopenpublicupdatadata,
// Loadtype:true,
// modalstyles:"848282"
})
}
eopenpublicupdatadata=()=>{
eopenpublicupdatadata = () => {
// window.location.reload()
this.ModalCancel()
this.props.getcomponentdidmount()
@ -479,8 +479,8 @@ class TPMBanner extends Component {
let id = this.props.match.params.shixunId;
let url = `/shixuns/${id}/cancel_apply_public.json`;
axios.get(url).then((response) => {
if(response.data.status===0){
// window.location.reload()
if (response.data.status === 0) {
// window.location.reload()
this.ModalCancel()
this.props.getcomponentdidmount()
}
@ -513,12 +513,12 @@ class TPMBanner extends Component {
} else {
evaluation_set_position = response.data.evaluation_set_position
}
if(response.data.status===0){
if (response.data.status === 0) {
// window.location.reload()
this.applyreleaseopen()
// this.ModalCancel()
this.props.getcomponentdidmount()
}else{
} else {
this.setState({
Issuevisible: true,
tag_position: response.data.tag_position,
@ -535,7 +535,7 @@ class TPMBanner extends Component {
this.setState({
Modalstype: true,
Loadtype:true,
Loadtype: true,
Modalstopval: "实训发布后即可发送课堂使用",
ModalSave: this.ModalCancel,
})
@ -785,7 +785,7 @@ class TPMBanner extends Component {
const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />;
const MyRate = ({ defaultValue, ...rest }) => {
let myValue = defaultValue;
return <Rate {...rest} value={myValue} />;
return <Rate {...rest} value={myValue} style={{ fontSize: 14 }} />;
};
return (
@ -878,35 +878,35 @@ class TPMBanner extends Component {
<div className="rateYo fl mt3">
<MyRate allowHalf defaultValue={5} disabled />
</div>
<Progress percent={star_infos[1]} showInfo={false}></Progress>
<Progress percent={star_infos[1]} size='small' showInfo={false}></Progress>
<span className="fr ml10 color-grey-6 font-12 mt4">{star_infos[1]}%</span>
</div>
<div className="clearfix">
<div className="rateYo fl mt3">
<MyRate allowHalf defaultValue={4} disabled />
</div>
<Progress percent={star_infos[2]} showInfo={false}></Progress>
<Progress percent={star_infos[2]} size='small' showInfo={false}></Progress>
<span className="fr ml10 color-grey-6 font-12 mt4">{star_infos[2]}%</span>
</div>
<div className="clearfix">
<div className="rateYo fl mt3">
<MyRate allowHalf defaultValue={3} disabled />
</div>
<Progress percent={star_infos[3]} showInfo={false}></Progress>
<Progress percent={star_infos[3]} size='small' showInfo={false}></Progress>
<span className="fr ml10 color-grey-6 font-12 mt4">{star_infos[3]}%</span>
</div>
<div className="clearfix">
<div className="rateYo fl mt3">
<MyRate allowHalf defaultValue={2} disabled />
</div>
<Progress percent={star_infos[4]} showInfo={false}></Progress>
<Progress percent={star_infos[4]} size='small' showInfo={false}></Progress>
<span className="fr ml10 color-grey-6 font-12 mt4">{star_infos[4]}%</span>
</div>
<div className="clearfix">
<div className="rateYo fl mt3">
<MyRate allowHalf defaultValue={1} disabled />
</div>
<Progress percent={star_infos[5]} showInfo={false}></Progress>
<Progress percent={star_infos[5]} size='small' showInfo={false}></Progress>
<span className="fr ml10 color-grey-6 font-12 mt4">{star_infos[5]}%</span>
</div>
</div>

@ -1,5 +1,4 @@
import React, { Component } from 'react';
import { Redirect } from 'react-router';
import TPMChallenge from './TPMChallenge';
class TPMChallengeContainer extends Component {
constructor(props) {
@ -12,26 +11,24 @@ class TPMChallengeContainer extends Component {
}
}
render() {
const { tpmLoading } = this.props;
const user = this.props.current_user;
// console.log("TPMChallengeContainerTPMChallengeContainer");
// console.log(this.props);
render() {
const { tpmLoading } = this.props;
const user = this.props.current_user;
return (
<React.Fragment>
return (
<React.Fragment>
{ tpmLoading ? <div style={{ minHeight: '886px'}}></div> :
<TPMChallenge
{...this.props}
is_jupyter={this.props.is_jupyter}
>
</TPMChallenge>
}
{tpmLoading ? <div style={{ minHeight: '886px' }}></div> :
<TPMChallenge
{...this.props}
is_jupyter={this.props.is_jupyter}
>
</TPMChallenge>
}
</React.Fragment>
);
}
</React.Fragment>
);
}
}
export default TPMChallengeContainer;

Loading…
Cancel
Save