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

merge oj
chromesetting
tangjiang 5 years ago
commit 3eb3cbf7cc

@ -45,11 +45,13 @@ class College extends Component {
align: 'center',
className: "edu-txt-center font-14 maxnamewidth340",
render: (text, record) => (
<span className="maxnamewidth340">
<a className="maxnamewidth340" title={record.teachers} style={{
color:'#05101A'
}}>
{
record.teachers
}
</span>
</a >
)
},
{

@ -1218,7 +1218,7 @@ submittojoinclass=(value)=>{
}
{
this.props.Headertop && this.props.Headertop.laboratory_user &&
<li><a href="/cooperative">后台管理</a></li>
<li><a href={this.props.Headertop.laboratory_admin_url}>后台管理</a></li>
}
<li><a href={`/account/profile`}>账号管理</a></li>

@ -1016,8 +1016,8 @@ class TPMBanner extends Component {
<Popover
content={
<pre className={"bannerpd201"}>
<div>您编辑完成后可以马上使用到自</div>
<div className={"wechatcenter mt10"}>己的课堂和实训课程</div>
<div>点击发布后可以马上应用到自</div>
<div className={"wechatcenter mt10"}>己的课堂和课程</div>
<div className={"wechatcenter mt15"}><Button type="primary" onClick={this.openknow} >我知道了</Button></div>
</pre>
}

@ -461,7 +461,7 @@ class TPMDataset extends Component {
const uploadProps = {
width: 600,
fileList,
multiple: false,
multiple: true,
//multiple 是否支持多选 查重的时候不能多选 不然弹许多框出来
// https://github.com/ant-design/ant-design/issues/15505
// showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。

@ -59,7 +59,7 @@ class Challenges extends Component {
isopentitletype:"Less",
})
}
this.getjianjiesize()
}
}
}).catch((error) => {
@ -67,31 +67,54 @@ class Challenges extends Component {
});
}
getjianjiesize=()=>{
let {ChallengesDataList}=this.state;
let boxoffsetHeigh;
let box=document.getElementById("shixunchallengesid");
if(box){
boxoffsetHeigh=box.offsetHeight
if(ChallengesDataList === undefined || ChallengesDataList&&ChallengesDataList.description=== ""||ChallengesDataList&&ChallengesDataList.description===null||ChallengesDataList&&ChallengesDataList.description===undefined){
}else{
if(this.state.isopentitletype==="greater"){
}else{
if(boxoffsetHeigh>=300){
this.setState({
opentitletype:true,
isopentitletype:"greater",
boxoffsetHeigh:boxoffsetHeigh
})
}else{
this.setState({
isopentitletype:"Less",
boxoffsetHeigh:boxoffsetHeigh
})
}
}
}
}
}
componentDidMount() {
this.ChallengesList()
if(this.state.isopentitletype==="greater"){
}else {
this.ChallengesList()
}
}
componentDidUpdate = (prevProps,prevState) => {
//防止陷入无限循环
if(prevState.ChallengesDataList!=this.state.ChallengesDataList){
let boxoffsetHeigh;
let box=document.getElementById("shixunchallengesid");
if(box){
boxoffsetHeigh=box.offsetHeight
if(boxoffsetHeigh<300){
this.setState({
isopentitletype:"Less",
boxoffsetHeigh:boxoffsetHeigh
})
}else{
this.setState({
opentitletype:true,
isopentitletype:"greater",
boxoffsetHeigh:boxoffsetHeigh
})
}
console.log(boxoffsetHeigh)
if(this.state.isopentitletype==="greater"){
}else{
this.getjianjiesize()
}
}
@ -333,7 +356,6 @@ class Challenges extends Component {
opentitle=()=>{
this.setState({
opentitletype:!this.state.opentitletype,
})
}
@ -415,16 +437,7 @@ class Challenges extends Component {
this.props.identity < 5?<a className="fr font-14 color-blue mr20" href="/forums/2943"
target="_blank">实训制作指南</a> : "":""}
</div>
{this.state.opentitletype===true?<style>
{
`
#shixunchallengesid{
max-height: 300px;
overflow: hidden;
}
`
}
</style>:""}
<div>
<div className={"pd20"} id={"shixunchallengesid"}>
<style>
@ -436,6 +449,40 @@ class Challenges extends Component {
`
}
</style>
<style>
{
`
.markdown-body img{
min-height: 200px;
}
`
}
</style>
{ChallengesDataList === undefined || ChallengesDataList&&ChallengesDataList.description=== ""||ChallengesDataList&&ChallengesDataList.description===null||ChallengesDataList&&ChallengesDataList.description===undefined?<style>
{
`
#shixunchallengesid{
max-height: 300px;
overflow: hidden;
}
`
}
</style>:""}
{ChallengesDataList === undefined || ChallengesDataList&&ChallengesDataList.description=== ""||ChallengesDataList&&ChallengesDataList.description===null||ChallengesDataList&&ChallengesDataList.description===undefined?"":this.state.isopentitletype==="greater"&&this.state.opentitletype===true?
<style>
{
`
#shixunchallengesid{
max-height:260px;
overflow: hidden;
}
`
}
</style>:""}
<div className="justify break_full_word new_li "
id="challenge_editorMd_description">

@ -47,33 +47,54 @@ class Challengesjupyter extends Component {
isopentitletype:"Less",
})
}
this.getjianjiesize()
}
}
}).catch((error) => {
//console.log(error)
});
}
getjianjiesize=()=>{
let {ChallengesDataList}=this.state;
let boxoffsetHeigh;
let box=document.getElementById("shixunchallengesid");
if(box){
boxoffsetHeigh=box.offsetHeight
if(ChallengesDataList === undefined || ChallengesDataList&&ChallengesDataList.description=== ""||ChallengesDataList&&ChallengesDataList.description===null||ChallengesDataList&&ChallengesDataList.description===undefined){
}else{
if(this.state.isopentitletype==="greater"){
}else{
if(boxoffsetHeigh>=300){
this.setState({
opentitletype:true,
isopentitletype:"greater",
boxoffsetHeigh:boxoffsetHeigh
})
}else{
this.setState({
isopentitletype:"Less",
boxoffsetHeigh:boxoffsetHeigh
})
}
}
}
}
}
componentDidUpdate = (prevProps,prevState) => {
//防止陷入无限循环
if(prevState.ChallengesDataList!=this.state.ChallengesDataList){
let boxoffsetHeigh;
let box=document.getElementById("shixunchallengesid");
if(box){
boxoffsetHeigh=box.offsetHeight
if(boxoffsetHeigh<300){
this.setState({
isopentitletype:"Less",
boxoffsetHeigh:boxoffsetHeigh
})
}else{
this.setState({
isopentitletype:"greater",
opentitletype:true,
boxoffsetHeigh:boxoffsetHeigh
})
}
if(this.state.isopentitletype==="greater"){
}else{
this.getjianjiesize()
}
}
@ -122,6 +143,8 @@ class Challengesjupyter extends Component {
}, 600)
});
setTimeout(this.getjianjiesize(), 1000);
}
updatamakedowns = () => {
@ -233,17 +256,39 @@ class Challengesjupyter extends Component {
</a>
</Tooltip>
</div>
{this.state.opentitletype===true?<style>
{
`
<div>
<style>
{
`
.markdown-body img{
min-height: 200px;
}
`
}
</style>
{ChallengesDataList === undefined || ChallengesDataList&&ChallengesDataList.description=== ""||ChallengesDataList&&ChallengesDataList.description===null||ChallengesDataList&&ChallengesDataList.description===undefined?<style>
{
`
#shixunchallengesid{
max-height: 300px;
overflow: hidden;
}
`
}
</style>:""}
<div>
}
</style>:""}
{ChallengesDataList === undefined || ChallengesDataList&&ChallengesDataList.description=== ""||ChallengesDataList&&ChallengesDataList.description===null||ChallengesDataList&&ChallengesDataList.description===undefined?"":this.state.isopentitletype==="greater"&&this.state.opentitletype===true?
<style>
{
`
#shixunchallengesid{
max-height:260px;
overflow: hidden;
}
`
}
</style>:""}
<div className={"pd20"} id={"shixunchallengesid"}>
<p id="ReactMarkdown" style={{overflow:'hidden'}}>

Loading…
Cancel
Save