调整毕设弹窗

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

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

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

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

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

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

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

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

Loading…
Cancel
Save