调整毕设弹窗

dev_cs
杨树明 5 years ago
parent 2553f71eef
commit ab211b4b74

@ -21,16 +21,16 @@ let hashTimeout
// TODO 开发期多个身份切换
let debugType =""
if (isDev) {
const _search = window.location.search;
let parsed = {};
if (_search) {
parsed = queryString.parse(_search);
}
debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
window.location.search.indexOf('debug=s') != -1 ? 'student' :
window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin'
}
// if (isDev) {
// const _search = window.location.search;
// let parsed = {};
// if (_search) {
// parsed = queryString.parse(_search);
// }
// debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
// window.location.search.indexOf('debug=s') != -1 ? 'student' :
// window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin'
// }
window._debugType = debugType;
export function initAxiosInterceptors(props) {

@ -63,10 +63,10 @@ class BoardsListItem extends Component{
<div className="clearfix ds pr pt5 contentSection" onClick={() => onItemClick(discussMessage)}>
<h6>
<Tooltip title={canNotLink?"私有属性,非课堂成员不能访问":`${discussMessage.subject.length > 40 ? discussMessage.subject : ''}`} placement="bottom">
<a className="panel-list-title hide fl mt5 color-dark font-bd pointer"
style={{ fontWeight: 'bold', cursor: (canNotLink ? 'poninter' : 'poninter'), maxWidth: '700px' }}
{canNotLink?<span className="fl mt3 font-16 font-bd color-dark maxwidth580 pointer">{discussMessage.subject}</span>:<a className="panel-list-title hide fl mt5 color-dark font-bd pointer"
style={{ fontWeight: 'bold', maxWidth: '700px' }}
onClick={canNotLink ? () => {} : () => this.onTitleClick(discussMessage)}
>{discussMessage.subject}</a>
>{discussMessage.subject}</a>}
</Tooltip>
{ !!discussMessage.sticky && <span className="btn-cir btn-cir-red fl mt5 ml5">置顶</span> }
{

@ -144,6 +144,9 @@ class CommonWorkItem extends Component{
text-overflow: ellipsis;
white-space: nowrap;
}
a:hover{
color: #4cacff;
}
`
}
</style>
@ -158,12 +161,15 @@ class CommonWorkItem extends Component{
mainList && isAdmin &&
<span className="fl mr12"><Checkbox value={item.homework_id} key={item.homework_id}></Checkbox></span>
}
<div className="flex1" onClick={() => this.props.onItemClick(Object.assign({}, item, {id: item.homework_id})) }>
<p className="clearfix mb20">
<Tooltip title={ canNotLink ? "私有属性,非课堂成员不能访问" : item.name} placement="bottom" >
<span className="fl font-16 font-bd mt2 comnonwidth580 pointer" style={{cursor: canNotLink ? 'poninter' : 'poninter'}}
{canNotLink?<span className={"fl font-16 font-bd mt2 comnonwidth580 pointer color-grey-name"}>
{item.name}
</span>:<a className={"fl font-16 font-bd mt2 comnonwidth580 pointer"}
onClick={ canNotLink ? () => {} : () => this.onItemClick(item)}
>{item.name}</span>
>{item.name}</a>}
</Tooltip>
{/* 只有非课堂成员且作业是私有的情况下才会为true */}
{

@ -83,12 +83,16 @@ class GraduateTopicItem extends Component{
text-overflow:ellipsis;
white-space:nowrap
}
a:hover{
color: #4cacff;
}
`}</style>
<h6>
{
isNotMember?
<Tooltip title={ discussMessage.private_icon===true?"私有属性,非课堂成员不能访问":discussMessage.name} placement="bottom">
<span className="fl mt3 font-16 font-bd color-dark maxwidth580 pointer">{discussMessage.name}</span>
{discussMessage.private_icon===true?<span className="fl mt3 font-16 font-bd color-dark maxwidth580 pointer">{discussMessage.name}</span>:
<a className="fl mt3 font-16 font-bd color-dark maxwidth580 pointer">{discussMessage.name}</a>}
</Tooltip>:""
}

@ -41,7 +41,8 @@ class CaseNew extends Component{
loading: false,
checkTag:false,
checkFile:false,
coverID:undefined
coverID:undefined,
library_tags:undefined
}
}
@ -132,6 +133,17 @@ class CaseNew extends Component{
if(this.props.match.params.caseID){
this.InitEditData();
}
let url=`/library_tags.json`;
axios.get(url).then((result) => {
console.log(result)
if(result.data.status===0){
this.setState({
library_tags:result.data.library_tags
})
}
}).catch((error) => {
console.log(error);
})
}
componentDidUpdate=(prevState)=>{
@ -263,7 +275,7 @@ class CaseNew extends Component{
render(){
let { caseID } = this.props.match.params;
let { CaseDetail } = this.props;
let { casesTags , contentFileList , imageUrl , checkTag , checkFile } = this.state;
let { casesTags , contentFileList , imageUrl , checkTag , checkFile,library_tags } = this.state;
const {getFieldDecorator} = this.props.form;
@ -301,8 +313,8 @@ class CaseNew extends Component{
action:`${getUploadActionUrl()}`,
onChange:this.handleChange,
}
console.log('111');
console.log(!caseID || (CaseDetail && CaseDetail.status == "pending"));
// console.log('111');
// console.log(!caseID || (CaseDetail && CaseDetail.status == "pending"));
return(
<div className="educontent mt10 mb50">
<style>
@ -380,9 +392,11 @@ class CaseNew extends Component{
<div className={checkTag==true ? "clearfix mb20 pr has-error" : "clearfix mb20"} id="tagFormItem">
<span className="upload_Title must">标签</span>
<ul className="fl libraries_tab">
<li className={ casesTags.indexOf(1) > -1 ? "active" :"" } onClick={()=>this.changeType(1)}>获奖案例</li>
<li className={ casesTags.indexOf(2) > -1 ? "active" :"" } onClick={()=>this.changeType(2)}>入库案例</li>
<li className={ casesTags.indexOf(3) > -1 ? "active" :"" } onClick={()=>this.changeType(3)}>企业案例</li>
{library_tags&&library_tags.map((item,key)=>{
return(
<li key={key} className={ casesTags.indexOf(item.id) > -1 ? "active" :"" } onClick={()=>this.changeType(item.id)}>{item.name}</li>
)
})}
</ul>
{
checkTag && <div class="ant-form-explain">请选择标签</div>

@ -1,36 +1,37 @@
import React,{ Component } from "react";
import './css/moopCases.css'
import '../courses/css/Courses.css'
class CaseTags extends Component{
constructor(props){
super(props);
}
render(){
let { tags } = this.props;
return(
<React.Fragment>
{
tags && tags.map((item,key)=>{
return(
<React.Fragment>
{
item.name == "获奖案例" ?
<span key={key} className="edu-filter-btn fl cdefault edu-activity-red ml10">{item.name}</span>
:
item.name == "入库案例" ?
<span key={key} className="edu-filter-btn fl cdefault edu-activity-blue ml10">{item.name}</span>
:
<span key={key} className="edu-filter-btn fl cdefault edu-activity-orange-sub ml10">{item.name}</span>
}
</React.Fragment>
)
})
}
</React.Fragment>
)
}
}
import React,{ Component } from "react";
import './css/moopCases.css'
import '../courses/css/Courses.css'
class CaseTags extends Component{
constructor(props){
super(props);
}
render(){
let { tags } = this.props;
return(
<React.Fragment>
{
tags && tags.map((item,key)=>{
return(
<React.Fragment>
{
item.name == "获奖案例" ?
<span key={key} className="edu-filter-btn fl cdefault edu-activity-red ml10">{item.name}</span>
:
item.name == "入库案例" ?
<span key={key} className="edu-filter-btn fl cdefault edu-activity-blue ml10">{item.name}</span>
:item.name =='企业案例'?
<span key={key} className="edu-filter-btn fl cdefault edu-activity-orange-sub ml10">{item.name}</span>
: <span key={key} className="edu-filter-btn fl cdefault edu-activity-36c53c-sub ml10">{item.name}</span>
}
</React.Fragment>
)
})
}
</React.Fragment>
)
}
}
export default CaseTags;

@ -69,7 +69,13 @@
border: 1px solid #ff6800;
line-height: 17px;
}
.edu-activity-36c53c-sub {
background-color: #36c53c;
color: #fff!important;
cursor: pointer;
border: 1px solid #36c53c;
line-height: 17px;
}
.pointsBtn {
width: 70px;
height: 70px;

Loading…
Cancel
Save