dev_forum
杨树明 6 years ago
parent d8fbe0678c
commit bc58fcd79d

@ -296,7 +296,7 @@ label.infolabel{display: block;float: left;width: 56px;text-align: right;margin-
.subshaicontent a{float: left;margin-right: 20px;color: #999;cursor: pointer} .subshaicontent a{float: left;margin-right: 20px;color: #999;cursor: pointer}
.search-new{width: 248px;height:32px;position: relative} .search-new{width: 248px;height:32px;position: relative;margin-right: 35px;}
.search-span{display: block;position: absolute;width: 100%;height: 100%;left:0px;top:0px;background-color: #F4F4F4;border: 1px solid #EAEAEA; border-radius: 4px;z-index: 1} .search-span{display: block;position: absolute;width: 100%;height: 100%;left:0px;top:0px;background-color: #F4F4F4;border: 1px solid #EAEAEA; border-radius: 4px;z-index: 1}
.search-new-input{height: 32px;padding-left: 5px;width: 225px;border: none;box-sizing: border-box;background: none;outline: none;position: absolute;left:0px;top:1px;z-index: 2} .search-new-input{height: 32px;padding-left: 5px;width: 225px;border: none;box-sizing: border-box;background: none;outline: none;position: absolute;left:0px;top:1px;z-index: 2}
.search-new img,.search-new a,.search-new .searchicon{cursor: pointer;position: absolute;right:2px;top:2px;z-index: 2} .search-new img,.search-new a,.search-new .searchicon{cursor: pointer;position: absolute;right:2px;top:2px;z-index: 2}

@ -28,6 +28,14 @@ export function CNotificationHOC(options = {}) {
notification.open(data); notification.open(data);
} }
bytesToSize = (bytes) => {
if (bytes === 0) return '0 B';
let k = 1024,
sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],
i = Math.floor(Math.log(bytes) / Math.log(k));
return (bytes / Math.pow(k, i)). toFixed(2) + ' ' + sizes[i];
}
configNotification = (placement) => { configNotification = (placement) => {
placement && notification.config({ placement && notification.config({
placement: placement, placement: placement,
@ -127,6 +135,7 @@ export function CNotificationHOC(options = {}) {
</Modals> </Modals>
<WrappedComponent {...this.props} <WrappedComponent {...this.props}
showNotification= { this.showNotification } showNotification= { this.showNotification }
bytesToSize={this.bytesToSize}
getNowFormatDates={(value,type)=>this.getNowFormatDates(value,type)} getNowFormatDates={(value,type)=>this.getNowFormatDates(value,type)}
configNotification={ this.configNotification } configNotification={ this.configNotification }
confirm={ this.confirm } confirm={ this.confirm }

@ -431,7 +431,9 @@ class CoursesBanner extends Component {
<div> <div>
{coursedata.switch_to_student === true ? {coursedata.switch_to_student === true ?
<Tooltip placement="bottom" title={"切换至学生可进行提交作品、答题等操作"}> <Tooltip placement="bottom" title={
<pre>由教师/助教身份切换至学生<br/>可进行提交作品答题等操作</pre>
}>
<a className="fr user_default_btn user_blue_btn mr20 font-18" <a className="fr user_default_btn user_blue_btn mr20 font-18"
onClick={()=>this.switchidentity(1)} onClick={()=>this.switchidentity(1)}
> 切换为学生 </a> > 切换为学生 </a>
@ -439,7 +441,9 @@ class CoursesBanner extends Component {
:""} :""}
{coursedata.switch_to_teacher === true ? {coursedata.switch_to_teacher === true ?
<Tooltip placement="bottom" title={"由学生身份切换至教师"}> <Tooltip placement="bottom" title={
<pre>由学生身份切换至教师<br/>拥有添加成员发布作业等管理权限</pre>
}>
<a className="fr user_default_btn user_blue_btn mr20 font-18" <a className="fr user_default_btn user_blue_btn mr20 font-18"
onClick={()=>this.switchidentity(2)} onClick={()=>this.switchidentity(2)}
> 切换为老师 </a> > 切换为老师 </a>
@ -447,7 +451,9 @@ class CoursesBanner extends Component {
{coursedata.switch_to_assistant === true ? {coursedata.switch_to_assistant === true ?
<Tooltip placement="bottom" title={"由学生身份切换至助教"}> <Tooltip placement="bottom" title={
<pre>由学生身份切换至助教<br/>拥有添加成员发布作业等管理权限</pre>
}>
<a className="fr user_default_btn user_blue_btn mr20 font-18" <a className="fr user_default_btn user_blue_btn mr20 font-18"
onClick={()=>this.switchidentity(3)} onClick={()=>this.switchidentity(3)}
> 切换为助教 </a> > 切换为助教 </a>
@ -486,7 +492,9 @@ class CoursesBanner extends Component {
<Link to={"/courses/"+this.props.match.params.coursesId+"/students"}> <Link to={"/courses/"+this.props.match.params.coursesId+"/students"}>
<span className="color-grey-c fl font-16">学生</span> <span className="color-grey-c fl font-16">学生</span>
<span <span
className={coursedata.credit===null?"color-white fl font-16":"color-white fl font-16 bannerurli"}>{coursedata.student_count}</span> className={coursedata.credit===null?"color-white fl font-16 bannerurlis":"color-white fl font-16 bannerurli"}>
{coursedata.student_count}
</span>
</Link> </Link>
</li> </li>
@ -550,10 +558,13 @@ class CoursesBanner extends Component {
{coursedata.code_halt === true? "已停用" : coursedata.invite_code} {coursedata.code_halt === true? "已停用" : coursedata.invite_code}
{coursedata.code_halt === true ? "" : {coursedata.code_halt === true ? "" :
<Tooltip placement="bottom" title={ <Tooltip placement="bottom" title={
<pre> coursedata.code_halt === true? <pre>
成员可以通过邀请码主动加入课堂<br/> 邀请码已停用<br/>
点击立刻复制邀请码 成员不能主动加入课堂
</pre> </pre>:<pre>
成员可以通过邀请码主动加入课堂<br/>
点击立刻复制邀请码
</pre>
}> }>
<i className="iconfont icon-fuzhi color-white font-14 ml10" <i className="iconfont icon-fuzhi color-white font-14 ml10"
onClick={() => { onClick={() => {

@ -119,14 +119,29 @@ class Addcourses extends Component{
} }
submitasyn=(course_id)=>{ submitasyn=(course_id)=>{
let{professor}=this.state;
if(professor===1){
this.setState({
loadtype:true,
modalsType:true,
modalsTopval:"申请已提交,请等待审核",
modalSave:(course_id)=>this.submitasyns(course_id),
Addcoursestype:false
})
this.props.hideAddcoursestype();
}else{
// let{course_id}=this.state;
this.setState({
Addcoursestype:false
})
this.props.hideAddcoursestype();
window.location.href ="/courses/"+course_id+"/students";
}
// let{course_id}=this.state;
this.setState({
Addcoursestype:false
})
this.props.hideAddcoursestype();
window.location.href ="/courses/"+course_id+"/students";
} }
submitasyns=(course_id)=>{
window.location.href ="/courses/"+course_id+"/students";
}
submittojoinclass=()=>{ submittojoinclass=()=>{
let {invite_code,professor,assistant_professor,student}=this.state; let {invite_code,professor,assistant_professor,student}=this.state;

@ -1,246 +1,246 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import { Modal,Checkbox,Select,Input,Tooltip } from "antd"; import { Modal,Checkbox,Select,Input,Tooltip } from "antd";
import axios from'axios'; import axios from'axios';
import Loading from '@icedesign/base/lib/loading'; import Loading from '@icedesign/base/lib/loading';
import '@icedesign/base/lib/loading/style.js'; import '@icedesign/base/lib/loading/style.js';
import Modals from '../../modals/Modals'; import Modals from '../../modals/Modals';
const Option = Select.Option; const Option = Select.Option;
const Search = Input.Search; const Search = Input.Search;
class PathModal extends Component{ class PathModal extends Component{
constructor(props){ constructor(props){
super(props); super(props);
this.state={ this.state={
StudentList_value:"", StudentList_value:"",
Searchvalue:undefined, Searchvalue:undefined,
type:'all', type:'all',
page:1, page:1,
patheditarry:undefined patheditarry:undefined
} }
} }
hidecouseShixunModal=()=>{ hidecouseShixunModal=()=>{
this.props.hidecouseShixunModal() this.props.hidecouseShixunModal()
} }
//tag //tag
changeTag=(types)=>{ changeTag=(types)=>{
let {Searchvalue}=this.state; let {Searchvalue}=this.state;
this.setState({ this.setState({
type:types, type:types,
page:1, page:1,
}) })
this.props.funshixunpathlist(Searchvalue,types,true,1) this.props.funshixunpathlist(Searchvalue,types,true,1)
} }
//搜索 //搜索
SenttotheValue=(e)=>{ SenttotheValue=(e)=>{
this.setState({ this.setState({
Searchvalue:e.target.value Searchvalue:e.target.value
}) })
} }
SenttotheSearch=(value)=>{ SenttotheSearch=(value)=>{
let{type}=this.state; let{type}=this.state;
this.setState({ this.setState({
page:1, page:1,
}) })
this.props.funshixunpathlist(value,type,true,1) this.props.funshixunpathlist(value,type,true,1)
} }
//勾选实训 //勾选实训
shixunhomeworkedit=(list)=>{ shixunhomeworkedit=(list)=>{
this.setState({ this.setState({
patheditarry:list patheditarry:list
}) })
// this.props.funpatheditarry(newpatheditarry) // this.props.funpatheditarry(newpatheditarry)
} }
contentViewScrolledit=(e)=>{ contentViewScrolledit=(e)=>{
//滑动到底判断 //滑动到底判断
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){ if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){
let {Searchvalue,type,page,shixunpathlist}=this.state; let {Searchvalue,type,page,shixunpathlist}=this.state;
let newpage=page+1 let newpage=page+1
this.props.funshixunpathlist(Searchvalue,type,true,newpage) this.props.funshixunpathlist(Searchvalue,type,true,newpage)
this.setState({ this.setState({
page:newpage page:newpage
}) })
} }
} }
//提交 //提交
savecouseShixunModal=()=>{ savecouseShixunModal=()=>{
let {patheditarry}=this.state; let {patheditarry}=this.state;
let {coursesId,Coursename,page,order,category_id,datas}=this.props; let {coursesId,Coursename,page,order,category_id,datas}=this.props;
let url="/courses/"+coursesId+"/homework_commons/create_subject_homework.json"; let url="/courses/"+coursesId+"/homework_commons/create_subject_homework.json";
if(patheditarry===undefined){ if(patheditarry===undefined){
this.setState({ this.setState({
patheditarrytype:true, patheditarrytype:true,
patheditarryvalue:"请先选择实训课程" patheditarryvalue:"请先选择实训课程"
}) })
return return
}else if(patheditarry.length===0){ }else if(patheditarry.length===0){
this.setState({ this.setState({
patheditarrytype:true, patheditarrytype:true,
patheditarryvalue:"请先选择实训课程" patheditarryvalue:"请先选择实训课程"
}) })
return return
} }
axios.post(url, { axios.post(url, {
// category_id: datas&&datas.category_name===undefined||datas&&datas.category_name===null?undefined:category_id, // category_id: datas&&datas.category_name===undefined||datas&&datas.category_name===null?undefined:category_id,
subject_ids:patheditarry, subject_ids:patheditarry,
} }
).then((response) => { ).then((response) => {
if(response.data.status===-1){ if(response.data.status===-1){
// this.setState({ // this.setState({
// Modalstype:true, // Modalstype:true,
// Modalstopval:response.data.message, // Modalstopval:response.data.message,
// ModalsBottomval:"", // ModalsBottomval:"",
// ModalSave:this.cancelmodel, // ModalSave:this.cancelmodel,
// Loadtype:true // Loadtype:true
// }) // })
this.props.showNotification(response.data.message) this.props.showNotification(response.data.message)
}else{ }else{
// this.homeworkstart // this.homeworkstart
//调用立即发布弹窗 //调用立即发布弹窗
this.props.hidecouseShixunModal(); this.props.hidecouseShixunModal();
this.props.courseshomeworkstart(response.data.category_id,response.data.homework_ids) this.props.courseshomeworkstart(response.data.category_id,response.data.homework_ids)
// this.props.showNotification("选用成功") // this.props.showNotification("选用成功")
// this.props.showNotification(response.data.message) // this.props.showNotification(response.data.message)
// this.props.homeworkupdatalists(Coursename,page,order); // this.props.homeworkupdatalists(Coursename,page,order);
} }
// if(response.status===200) { // if(response.status===200) {
// this.props.courseshomeworkstart(response.data.category_id,response.data.homework_ids) // this.props.courseshomeworkstart(response.data.category_id,response.data.homework_ids)
// } // }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
}) })
} }
render(){ render(){
let {Searchvalue,type,Modalstype}=this.state; let {Searchvalue,type,Modalstype}=this.state;
let {visible,shixunmodallist,hometypepvisible,newshixunmodallist}=this.props; let {visible,shixunmodallist,hometypepvisible,newshixunmodallist}=this.props;
return( return(
<div> <div>
{/*提示*/} {/*提示*/}
{Modalstype&&Modalstype===true?<Modals {Modalstype&&Modalstype===true?<Modals
modalsType={this.state.Modalstype} modalsType={this.state.Modalstype}
modalsTopval={this.state.Modalstopval} modalsTopval={this.state.Modalstopval}
modalCancel={this.state.ModalCancel} modalCancel={this.state.ModalCancel}
modalSave={this.state.ModalSave} modalSave={this.state.ModalSave}
modalsBottomval={this.state.ModalsBottomval} modalsBottomval={this.state.ModalsBottomval}
loadtype={this.state.Loadtype} loadtype={this.state.Loadtype}
/>:""} />:""}
<Modal <Modal
keyboard={false} keyboard={false}
title="选择实训课程" title="选择实训课程"
visible={visible} visible={visible}
closable={false} closable={false}
footer={null} footer={null}
width="840px" width="840px"
destroyOnClose={true} destroyOnClose={true}
> >
<Loading visible={false} shape="dot-circle" color='#4AC7FF'> <Loading visible={false} shape="dot-circle" color='#4AC7FF'>
<div className="newupload_conbox"> <div className="newupload_conbox">
{ shixunmodallist && shixunmodallist.tags.length===0?"":<div className="clearfix mb20 shixun_work_div newshixun_tab_div cdefault" style={{"marginRight":"4px"}} id="shixun_tab_div"> { shixunmodallist && shixunmodallist.tags.length===0?"":<div className="clearfix mb20 shixun_work_div newshixun_tab_div cdefault" style={{"marginRight":"4px"}} id="shixun_tab_div">
<li className="fl mr5 mt5"> <a onClick={()=>this.changeTag("all")} className={ type==="all" ? "active edu-filter-cir-grey font-12":"edu-filter-cir-grey font-12"}>全部</a></li> <li className="fl mr5 mt5"> <a onClick={()=>this.changeTag("all")} className={ type==="all" ? "active edu-filter-cir-grey font-12":"edu-filter-cir-grey font-12"}>全部</a></li>
{ {
shixunmodallist && shixunmodallist.tags.map((item,key)=>{ shixunmodallist && shixunmodallist.tags.map((item,key)=>{
return( return(
<li className="fl mr5 mt5" key={key}> <li className="fl mr5 mt5" key={key}>
<a onClick={()=>this.changeTag(item.tag_id)} className={ parseInt(type) === parseInt(item.tag_id) ? "active edu-filter-cir-grey font-12":"edu-filter-cir-grey font-12"}>{item.tag_name}</a> <a onClick={()=>this.changeTag(item.tag_id)} className={ parseInt(type) === parseInt(item.tag_id) ? "active edu-filter-cir-grey font-12":"edu-filter-cir-grey font-12"}>{item.tag_name}</a>
</li> </li>
) )
}) })
} }
</div>} </div>}
<div className="clearfix mb20" id="shixun_search_form_div" style={{height:"30px"}}> <div className="clearfix mb20" id="shixun_search_form_div" style={{height:"30px"}}>
<span className="fl color-grey-9 font-16 mt3"> <span className="fl color-grey-9 font-16 mt3">
<span></span> <span></span>
<span className="color-orange-tip">{shixunmodallist === undefined ? "":shixunmodallist.subjects_count}</span> <span className="color-orange-tip">{shixunmodallist === undefined ? "":shixunmodallist.subjects_count}</span>
<span>个实训</span> <span>个实训</span>
</span> </span>
<div className="fr search-new"> <div className="fr search-new">
<Search <Search
placeholder="输入实训名称的关键字搜索" placeholder="请输入创建者或者实训名称进行搜索"
value={Searchvalue} value={Searchvalue}
onInput={this.SenttotheValue} onInput={this.SenttotheValue}
onSearch={(value) => this.SenttotheSearch(value)} onSearch={(value) => this.SenttotheSearch(value)}
style={{width: '100%'}} style={{width: '115%'}}
/> />
</div> </div>
</div> </div>
<ul className="clearfix greybackHead edu-txt-center"> <ul className="clearfix greybackHead edu-txt-center">
<li className="fl with40 paddingleft22">实训路径名称</li> <li className="fl with40 paddingleft22">实训路径名称</li>
<li className="fl with30 edu-txt-left">已发布实训数</li> <li className="fl with30 edu-txt-left">已发布实训数</li>
<li className="fl with10">使用人数</li> <li className="fl with10">使用人数</li>
<li className="fl with10"></li> <li className="fl with10"></li>
</ul> </ul>
<style> <style>
{` {`
.pl40{ .pl40{
padding-left:40px padding-left:40px
} }
.newtaskhide{ .newtaskhide{
margin-top:0px !important; margin-top:0px !important;
height: 40px; height: 40px;
} }
`} `}
</style> </style>
<div className="over210 pl20 pr20" <div className="over210 pl20 pr20"
onScroll={this.contentViewScrolledit} onScroll={this.contentViewScrolledit}
style={{"Height":"204px"}}> style={{"Height":"204px"}}>
<Loading visible={hometypepvisible} shape="dot-circle" className="newnext-loading" color='#4AC7FF'> <Loading visible={hometypepvisible} shape="dot-circle" className="newnext-loading" color='#4AC7FF'>
<Checkbox.Group style={{ width: '100%' }} onChange={this.shixunhomeworkedit}> <Checkbox.Group style={{ width: '100%' }} onChange={this.shixunhomeworkedit}>
{ {
newshixunmodallist&&newshixunmodallist.map((item,key)=>{ newshixunmodallist&&newshixunmodallist.map((item,key)=>{
return( return(
<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" key={key}> <div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" key={key}>
<li className="fl with40 newtaskhide"> <li className="fl with40 newtaskhide">
<Checkbox <Checkbox
id={"shixun_input_"+item.subject_id} value={item.subject_id} id={"shixun_input_"+item.subject_id} value={item.subject_id}
className="task-hide edu-txt-left newtaskhide" className="task-hide edu-txt-left newtaskhide"
style={{"width":"280px"}} style={{"width":"280px"}}
name="shixun_homework[]" name="shixun_homework[]"
> >
<label style={{"textAlign":"left","color":"#05101A"}} className="task-hide color-grey-name" title="frerere">{item.subject_name}</label> <label style={{"textAlign":"left","color":"#05101A"}} className="task-hide color-grey-name" title="frerere">{item.subject_name}</label>
</Checkbox> </Checkbox>
</li> </li>
<li className="fl with30 edu-txt-left task-hide pl40">{item.shixun_count}</li> <li className="fl with30 edu-txt-left task-hide pl40">{item.shixun_count}</li>
<li className="fl with10 paddingl10">{item.myshixun_count}</li> <li className="fl with10 paddingl10">{item.myshixun_count}</li>
<Tooltip title="查看详情"> <Tooltip title="查看详情">
<li className="fr with10"><a className="color-blue" href={"/paths/"+item.subject_id} target="_blank">详情</a></li> <li className="fr with10"><a className="color-blue" href={"/paths/"+item.subject_id} target="_blank">详情</a></li>
</Tooltip> </Tooltip>
</div> </div>
) )
}) })
} }
</Checkbox.Group> </Checkbox.Group>
</Loading> </Loading>
</div> </div>
{ this.state.patheditarrytype===true?<span className={"color-red"}>{this.state.patheditarryvalue}</span>:""} { this.state.patheditarrytype===true?<span className={"color-red"}>{this.state.patheditarryvalue}</span>:""}
<div className="mt20 marginauto clearfix edu-txt-center"> <div className="mt20 marginauto clearfix edu-txt-center">
<a className="pop_close task-btn mr30 margin-tp26" onClick={this.hidecouseShixunModal}>取消</a> <a className="pop_close task-btn mr30 margin-tp26" onClick={this.hidecouseShixunModal}>取消</a>
<a className="task-btn task-btn-orange margin-tp26" id="submit_send_shixun" onClick={this.savecouseShixunModal}>确定</a> <a className="task-btn task-btn-orange margin-tp26" id="submit_send_shixun" onClick={this.savecouseShixunModal}>确定</a>
</div> </div>
</div> </div>
</Loading> </Loading>
</Modal> </Modal>
</div> </div>
) )
} }
} }
export default PathModal; export default PathModal;

@ -285,6 +285,11 @@ class Selectresource extends Component{
padding: 0 30px; padding: 0 30px;
padding-top:30px; padding-top:30px;
} }
.search-news{
width: 237px!important;
height: 30px;
margin-bottom: 30px;
}
`}</style> `}</style>
<div className="newupload_conbox newupload_conboxtop"> <div className="newupload_conbox newupload_conboxtop">
@ -292,7 +297,7 @@ class Selectresource extends Component{
<li className="fl mr5 mt5"> <a onClick={()=>this.changeTag("all")} className={ type==="all" ? "active edu-filter-cir-grey font-12":"edu-filter-cir-grey font-12"}>全部</a></li> <li className="fl mr5 mt5"> <a onClick={()=>this.changeTag("all")} className={ type==="all" ? "active edu-filter-cir-grey font-12":"edu-filter-cir-grey font-12"}>全部</a></li>
<li className="fl mr5 mt5 ml15"> <a onClick={()=>this.changeTag("my")} className={ type==="my" ? " active edu-filter-cir-grey font-12":"edu-filter-cir-grey font-12"}>我的资源</a></li> <li className="fl mr5 mt5 ml15"> <a onClick={()=>this.changeTag("my")} className={ type==="my" ? " active edu-filter-cir-grey font-12":"edu-filter-cir-grey font-12"}>我的资源</a></li>
<div className="fr search-new"> <div className="fr search-news" >
<Search <Search
placeholder="请输入发布人或名称进行搜索" placeholder="请输入发布人或名称进行搜索"
value={Searchvalue} value={Searchvalue}

@ -7,13 +7,7 @@ import moment from 'moment';
import Modals from '../../modals/Modals'; import Modals from '../../modals/Modals';
const Option = Select.Option; const Option = Select.Option;
function bytesToSize(bytes) {
if (bytes === 0) return '0 B';
let k = 1024,
sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],
i = Math.floor(Math.log(bytes) / Math.log(k));
return (bytes / Math.pow(k, i)). toFixed(2) + ' ' + sizes[i];
}
const dateFormat ="YYYY-MM-DD HH:mm" const dateFormat ="YYYY-MM-DD HH:mm"
function range(start, end) { function range(start, end) {
const result = []; const result = [];
@ -619,7 +613,7 @@ class Selectsetting extends Component{
{item.name} {item.name}
</span> </span>
<span className="color656565 mt2 color-grey-6 font-12 mr8"> <span className="color656565 mt2 color-grey-6 font-12 mr8">
{item.response===undefined?"":isNaN(bytesToSize(item.response.filesize))?"":bytesToSize(item.response.filesize)} {item.response===undefined?"":isNaN(this.props.bytesToSize(item.response.filesize))?"":this.props.bytesToSize(item.response.filesize)}
</span> </span>
<i className="font-14 iconfont icon-guanbi " <i className="font-14 iconfont icon-guanbi "
id={item.response===undefined?"":item.response.id} id={item.response===undefined?"":item.response.id}

@ -1,320 +1,320 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import { Modal,Checkbox,Select,Input,Tooltip,Spin,Icon} from "antd"; import { Modal,Checkbox,Select,Input,Tooltip,Spin,Icon} from "antd";
import axios from'axios'; import axios from'axios';
// import Loading from '@icedesign/base/lib/loading'; // import Loading from '@icedesign/base/lib/loading';
// import '@icedesign/base/lib/loading/style.js'; // import '@icedesign/base/lib/loading/style.js';
const Option = Select.Option; const Option = Select.Option;
const Search = Input.Search; const Search = Input.Search;
class ShixunModal extends Component{ class ShixunModal extends Component{
constructor(props){ constructor(props){
super(props); super(props);
this.state={ this.state={
Searchvalue:undefined, Searchvalue:undefined,
type:'all', type:'all',
category_id:0, category_id:0,
page:1 page:1
} }
} }
componentDidMount() { componentDidMount() {
} }
//勾选实训 //勾选实训
shixunhomeworkedit=(list)=>{ shixunhomeworkedit=(list)=>{
let newpatheditarry=[]; let newpatheditarry=[];
if (this.props.singleChoose == true) { if (this.props.singleChoose == true) {
if (list.length > 0) { if (list.length > 0) {
newpatheditarry.push(list[list.length - 1]) newpatheditarry.push(list[list.length - 1])
} }
} else { } else {
for(var i=0; i<list.length;i++){ for(var i=0; i<list.length;i++){
newpatheditarry.push(list[i]) newpatheditarry.push(list[i])
} }
} }
// this.setState({ // this.setState({
// patheditarry:newpatheditarry // patheditarry:newpatheditarry
// }) // })
this.props.funpatheditarry(newpatheditarry) this.props.funpatheditarry(newpatheditarry)
} }
contentViewScrolledit=(e)=>{ contentViewScrolledit=(e)=>{
//滑动到底判断 //滑动到底判断
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){ if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){
let {Searchvalue,type,page}=this.state; let {Searchvalue,type,page}=this.state;
let newpage=page+1 let newpage=page+1
this.props.funshixunmodallist(Searchvalue,type,true,newpage) this.props.funshixunmodallist(Searchvalue,type,true,newpage)
this.setState({ this.setState({
page:newpage page:newpage
}) })
} }
} }
//搜索 //搜索
SenttotheValue=(e)=>{ SenttotheValue=(e)=>{
this.setState({ this.setState({
Searchvalue:e.target.value Searchvalue:e.target.value
}) })
} }
SenttotheSearch=(value)=>{ SenttotheSearch=(value)=>{
let{type}=this.state; let{type}=this.state;
this.setState({ this.setState({
page:1, page:1,
}) })
this.props.funshixunmodallist(value,type,true,1) this.props.funshixunmodallist(value,type,true,1)
this.props.funpatheditarry([]) this.props.funpatheditarry([])
} }
//tag //tag
changeTag=(types)=>{ changeTag=(types)=>{
let {Searchvalue}=this.state; let {Searchvalue}=this.state;
this.setState({ this.setState({
type:types, type:types,
page:1, page:1,
}) })
this.props.funshixunmodallist(Searchvalue,types,true,1) this.props.funshixunmodallist(Searchvalue,types,true,1)
this.props.funpatheditarry([]) this.props.funpatheditarry([])
} }
hidecouseShixunModal=()=>{ hidecouseShixunModal=()=>{
this.props.hidecouseShixunModal() this.props.hidecouseShixunModal()
} }
savecouseShixunModal=()=>{ savecouseShixunModal=()=>{
let {coursesId,patheditarry,datas}=this.props; let {coursesId,patheditarry,datas}=this.props;
let{category_id}=this.state; let{category_id}=this.state;
if (this.props.chooseShixun) { if (this.props.chooseShixun) {
this.props.chooseShixun(patheditarry) this.props.chooseShixun(patheditarry)
return; return;
} }
if(patheditarry.length===0){ if(patheditarry.length===0){
this.setState({ this.setState({
shixunmodelchke:true, shixunmodelchke:true,
chekicmessage:"请先选择实训" chekicmessage:"请先选择实训"
}) })
return return
} }
let url="/courses/"+coursesId+"/homework_commons/create_shixun_homework.json"; let url="/courses/"+coursesId+"/homework_commons/create_shixun_homework.json";
axios.post(url, { axios.post(url, {
category_id:this.props.category_id===null||this.props.category_id===undefined?undefined:parseInt(this.props.category_id), category_id:this.props.category_id===null||this.props.category_id===undefined?undefined:parseInt(this.props.category_id),
shixun_ids:patheditarry, shixun_ids:patheditarry,
} }
).then((response) => { ).then((response) => {
if(response.data.status===-1){ if(response.data.status===-1){
// this.props.showNotification(response.data.message) // this.props.showNotification(response.data.message)
}else{ }else{
this.props.courseshomeworkstart(response.data.category_id,response.data.homework_ids) this.props.courseshomeworkstart(response.data.category_id,response.data.homework_ids)
this.props.hidecouseShixunModal() this.props.hidecouseShixunModal()
} }
// category_id: 3 // category_id: 3
// homework_ids: (5) [9171, 9172, 9173, 9174, 9175] // homework_ids: (5) [9171, 9172, 9173, 9174, 9175]
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
}) })
} }
selectCloseList=(value)=>{ selectCloseList=(value)=>{
this.setState({ this.setState({
category_id:value category_id:value
}) })
} }
render(){ render(){
let {Searchvalue,type,category_id}=this.state; let {Searchvalue,type,category_id}=this.state;
let {visible,shixunmodallist,hometypepvisible,newshixunmodallist,patheditarry}=this.props; let {visible,shixunmodallist,hometypepvisible,newshixunmodallist,patheditarry}=this.props;
const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />; const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />;
// console.log(patheditarry) // console.log(patheditarry)
return( return(
<div> <div>
<Modal <Modal
keyboard={false} keyboard={false}
title="选择实训" title="选择实训"
visible={visible} visible={visible}
closable={false} closable={false}
footer={null} footer={null}
width="840px" width="840px"
destroyOnClose={true} destroyOnClose={true}
> >
<style> <style>
{ {
` `
.ant-spin-lg .ant-spin-dot { .ant-spin-lg .ant-spin-dot {
font-size: 32px !important; font-size: 32px !important;
} }
` `
} }
</style> </style>
<Spin indicator={antIcon} spinning={hometypepvisible} className="newnext-loading" color='#4AC7FF' size="large"> <Spin indicator={antIcon} spinning={hometypepvisible} className="newnext-loading" color='#4AC7FF' size="large">
{/*<Spin shape="dot-circle" >*/} {/*<Spin shape="dot-circle" >*/}
{/*{*/} {/*{*/}
{/*shixunmodallist === undefined ? "":shixunmodallist.homework_category.length>0?<div>*/} {/*shixunmodallist === undefined ? "":shixunmodallist.homework_category.length>0?<div>*/}
{/*<div className={"fl"}>选择目录名称:</div>*/} {/*<div className={"fl"}>选择目录名称:</div>*/}
{/*<div className="fl mb20">*/} {/*<div className="fl mb20">*/}
{/*<Select*/} {/*<Select*/}
{/*placeholder="请选择您要发送的课堂"*/} {/*placeholder="请选择您要发送的课堂"*/}
{/*value={isNaN(parseInt(category_id))?"":parseInt(category_id)}*/} {/*value={isNaN(parseInt(category_id))?"":parseInt(category_id)}*/}
{/*style={{"width":"660px","marginTop": "-7px"}}*/} {/*style={{"width":"660px","marginTop": "-7px"}}*/}
{/*onSelect={this.selectCloseList}*/} {/*onSelect={this.selectCloseList}*/}
{/*// onMouseEnter={this.openList}*/} {/*// onMouseEnter={this.openList}*/}
{/*defaultOpen={false}*/} {/*defaultOpen={false}*/}
{/*// open={openSearch}*/} {/*// open={openSearch}*/}
{/*optionLabelProp="name"*/} {/*optionLabelProp="name"*/}
{/*>*/} {/*>*/}
{/*{ shixunmodallist.main_category.map((item,key)=>{*/} {/*{ shixunmodallist.main_category.map((item,key)=>{*/}
{/*return(*/} {/*return(*/}
{/*<Option key={key} value={item.main_category_id} name={item.main_category_name}>{item.main_category_name}</Option>*/} {/*<Option key={key} value={item.main_category_id} name={item.main_category_name}>{item.main_category_name}</Option>*/}
{/*)*/} {/*)*/}
{/*})*/} {/*})*/}
{/*}*/} {/*}*/}
{/*{*/} {/*{*/}
{/*shixunmodallist.homework_category.map((item,key)=>{*/} {/*shixunmodallist.homework_category.map((item,key)=>{*/}
{/*return(*/} {/*return(*/}
{/*<Option key={key} value={item.category_id} name={item.category_name}>{item.category_name}</Option>*/} {/*<Option key={key} value={item.category_id} name={item.category_name}>{item.category_name}</Option>*/}
{/*)*/} {/*)*/}
{/*})*/} {/*})*/}
{/*}*/} {/*}*/}
{/*</Select>*/} {/*</Select>*/}
{/*</div>*/} {/*</div>*/}
{/*</div>:""}*/} {/*</div>:""}*/}
<div className="newupload_conbox"> <div className="newupload_conbox">
<style> <style>
{ {
` `
#shixun_tab_div{ #shixun_tab_div{
max-height: 65px; max-height: 65px;
} }
` `
} }
</style> </style>
<div className="clearfix mb10 shixun_work_div newshixun_tab_div cdefault" style={{"marginRight":"4px"}} id="shixun_tab_div"> <div className="clearfix mb10 shixun_work_div newshixun_tab_div cdefault" style={{"marginRight":"4px"}} id="shixun_tab_div">
<li className="fl mr5 mt5"> <li className="fl mr5 mt5">
<a onClick={()=>this.changeTag("all")} className={ type==="all" ? "active edu-filter-cir-grey font-12":"edu-filter-cir-grey font-12"}>全部</a> <a onClick={()=>this.changeTag("all")} className={ type==="all" ? "active edu-filter-cir-grey font-12":"edu-filter-cir-grey font-12"}>全部</a>
</li> </li>
{ {
shixunmodallist && shixunmodallist.tags.map((item,key)=>{ shixunmodallist && shixunmodallist.tags.map((item,key)=>{
return( return(
<li className="fl mr5 mt5" key={key}> <li className="fl mr5 mt5" key={key}>
<a onClick={()=>this.changeTag(item.tag_id)} className={ parseInt(type) === parseInt(item.tag_id) ? "active edu-filter-cir-grey font-12":"edu-filter-cir-grey font-12"}>{item.tag_name}</a> <a onClick={()=>this.changeTag(item.tag_id)} className={ parseInt(type) === parseInt(item.tag_id) ? "active edu-filter-cir-grey font-12":"edu-filter-cir-grey font-12"}>{item.tag_name}</a>
</li> </li>
) )
}) })
} }
</div> </div>
<div className="clearfix mb10" id="shixun_search_form_div" style={{height:"30px"}}> <div className="clearfix mb10" id="shixun_search_form_div" style={{height:"30px"}}>
<span className="fl color-grey-9 font-16 mt3"> <span className="fl color-grey-9 font-16 mt3">
<span></span> <span></span>
<span className="color-orange-tip">{shixunmodallist === undefined ? "":shixunmodallist.shixuns_count}</span> <span className="color-orange-tip">{shixunmodallist === undefined ? "":shixunmodallist.shixuns_count}</span>
<span>个实训</span> <span>个实训</span>
</span> </span>
<div className="fr search-new"> <div className="fr search-new">
<Search <Search
placeholder="输入实训名称的关键字搜索" placeholder="请输入创建者或者实训名称进行搜索"
value={Searchvalue} value={Searchvalue}
onInput={this.SenttotheValue} onInput={this.SenttotheValue}
onSearch={(value) => this.SenttotheSearch(value)} onSearch={(value) => this.SenttotheSearch(value)}
style={{width: '100%'}} style={{width: '115%'}}
/> />
</div> </div>
</div> </div>
{ {
<style> <style>
{ {
`.paddingleft22{ `.paddingleft22{
text-align: left; text-align: left;
padding-left: 23px; padding-left: 23px;
} }
` `
} }
</style> </style>
} }
<ul className="clearfix greybackHead edu-txt-center"> <ul className="clearfix greybackHead edu-txt-center">
<li className="fl with40 paddingleft22" >实训名称</li> <li className="fl with40 paddingleft22" >实训名称</li>
<li className="fl with30 edu-txt-left">使用院校</li> <li className="fl with30 edu-txt-left">使用院校</li>
<li className="fl with10">使用人数</li> <li className="fl with10">使用人数</li>
<li className="fl with10">评价等级</li> <li className="fl with10">评价等级</li>
<li className="fl with10"></li> <li className="fl with10"></li>
</ul> </ul>
<div className="over210 pl20 pr20" <div className="over210 pl20 pr20"
onScroll={this.contentViewScrolledit} onScroll={this.contentViewScrolledit}
style={{height:"158px"}}> style={{height:"158px"}}>
<style> <style>
{ {
` `
.next-loading{ .next-loading{
width: 100%; width: 100%;
height: 230px; height: 230px;
} }
.newtaskhide{ .newtaskhide{
margin-top:0px !important; margin-top:0px !important;
height: 40px; height: 40px;
} }
` `
} }
</style> </style>
{/*<Loading visible={hometypepvisible} shape="dot-circle" className="newnext-loading" color='#4AC7FF'>*/} {/*<Loading visible={hometypepvisible} shape="dot-circle" className="newnext-loading" color='#4AC7FF'>*/}
<Checkbox.Group style={{ width: '100%' }} value={patheditarry} onChange={this.shixunhomeworkedit}> <Checkbox.Group style={{ width: '100%' }} value={patheditarry} onChange={this.shixunhomeworkedit}>
{ {
newshixunmodallist === undefined ? "": newshixunmodallist.map((item,key)=>{ newshixunmodallist === undefined ? "": newshixunmodallist.map((item,key)=>{
return( return(
<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" key={key}> <div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" key={key}>
<li className="fl with40 edu-txt-left task-hide paddingl5 newtaskhide"> <li className="fl with40 edu-txt-left task-hide paddingl5 newtaskhide">
<Checkbox <Checkbox
id={"shixun_input_"+item.shixun_id} value={item.shixun_id} id={"shixun_input_"+item.shixun_id} value={item.shixun_id}
className=" task-hide edu-txt-left newtaskhide" className=" task-hide edu-txt-left newtaskhide"
style={{"width":"280px"}} style={{"width":"280px"}}
name="shixun_homework[]" name="shixun_homework[]"
> >
<span style={{"textAlign":"left","color":"#05101A"}} className="task-hide color-grey-name">{item.shixun_name}</span> <span style={{"textAlign":"left","color":"#05101A"}} className="task-hide color-grey-name">{item.shixun_name}</span>
</Checkbox> </Checkbox>
</li> </li>
<li className="fl with30 edu-txt-left task-hide paddingl5">{item.school_users}</li> <li className="fl with30 edu-txt-left task-hide paddingl5">{item.school_users}</li>
<li className="fl with10 paddingl10">{item.myshixuns_count}</li> <li className="fl with10 paddingl10">{item.myshixuns_count}</li>
<li className="fl with10 color-orange-tip paddingl10">{item.preference}</li> <li className="fl with10 color-orange-tip paddingl10">{item.preference}</li>
<Tooltip title="新窗口查看详情"> <Tooltip title="新窗口查看详情">
<li className="fl with10"><a className="color-blue" href={"/shixuns/"+item.identifier+"/challenges"} target="_blank">详情</a></li> <li className="fl with10"><a className="color-blue" href={"/shixuns/"+item.identifier+"/challenges"} target="_blank">详情</a></li>
</Tooltip> </Tooltip>
</div> </div>
) )
}) })
} }
</Checkbox.Group> </Checkbox.Group>
{/*</Loading>*/} {/*</Loading>*/}
</div> </div>
</div> </div>
</Spin> </Spin>
{this.state.shixunmodelchke===true?<span className={"color-red"}>{this.state.chekicmessage}</span>:""} {this.state.shixunmodelchke===true?<span className={"color-red"}>{this.state.chekicmessage}</span>:""}
<div className="mt20 marginauto clearfix edu-txt-center"> <div className="mt20 marginauto clearfix edu-txt-center">
<a className="pop_close task-btn mr30 margin-tp26" onClick={this.hidecouseShixunModal}>取消</a> <a className="pop_close task-btn mr30 margin-tp26" onClick={this.hidecouseShixunModal}>取消</a>
<a className="task-btn task-btn-orange margin-tp26" id="submit_send_shixun" onClick={this.savecouseShixunModal}>确定</a> <a className="task-btn task-btn-orange margin-tp26" id="submit_send_shixun" onClick={this.savecouseShixunModal}>确定</a>
</div> </div>
</Modal> </Modal>
</div> </div>
) )
} }
} }
export default ShixunModal; export default ShixunModal;

@ -230,11 +230,11 @@ class ShixunModal extends Component{
</span> </span>
<div className="fr search-new"> <div className="fr search-new">
<Search <Search
placeholder="输入实训名称的关键字搜索" placeholder="请输入创建者或者实训名称进行搜索"
value={Searchvalue} value={Searchvalue}
onInput={this.SenttotheValue} onInput={this.SenttotheValue}
onSearch={(value) => this.SenttotheSearch(value)} onSearch={(value) => this.SenttotheSearch(value)}
style={{width: '100%'}} style={{width: '115%'}}
/> />
</div> </div>
</div> </div>

@ -22,13 +22,6 @@ function disabledDateTime() {
}; };
} }
function bytesToSize(bytes) {
if (bytes === 0) return '0 B';
let k = 1024,
sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],
i = Math.floor(Math.log(bytes) / Math.log(k));
return (bytes / Math.pow(k, i)). toFixed(2) + ' ' + sizes[i];
}
const dateFormat="YYYY-MM-DD HH:mm"; const dateFormat="YYYY-MM-DD HH:mm";
class Sendresource extends Component{ class Sendresource extends Component{
constructor(props){ constructor(props){
@ -456,7 +449,7 @@ class Sendresource extends Component{
{item.name} {item.name}
</span> </span>
<span className="color656565 mt2 color-grey-6 font-12 mr8"> <span className="color656565 mt2 color-grey-6 font-12 mr8">
{item.response===undefined?"":isNaN(bytesToSize(item.response.filesize))?"":bytesToSize(item.response.filesize)} {item.response===undefined?"":isNaN(this.props.bytesToSize(item.response.filesize))?"":this.props.bytesToSize(item.response.filesize)}
</span> </span>
<i className="font-14 iconfont icon-guanbi " <i className="font-14 iconfont icon-guanbi "
id={item.response===undefined?"":item.response.id} id={item.response===undefined?"":item.response.id}

@ -460,6 +460,10 @@ a.white-btn.use_scope-btn:hover{
width: 70px; width: 70px;
margin-left: -10px; margin-left: -10px;
} }
.bannerurlis{
width: 70px;
margin-left: -10px;
}
.pathInfobox li{ .pathInfobox li{
margin-right: 20px; margin-right: 20px;
height: 15px; height: 15px;
@ -1206,6 +1210,7 @@ a.white-btn.use_scope-btn:hover{
width:237px!important; width:237px!important;
height: 30px; height: 30px;
margin-bottom: 30px; margin-bottom: 30px;
margin-right: 35px;
} }
.search-new-input { .search-new-input {
padding-left: 16px; padding-left: 16px;

@ -212,7 +212,7 @@ class GraduationTasksSubmitedit extends Component{
this.setState({ fileList }); this.setState({ fileList });
} }
onAttachmentRemove = (file) => { //onAttachmentRemove = (file) => {
// confirm({ // confirm({
// title: '确定要删除这个附件吗?', // title: '确定要删除这个附件吗?',
@ -228,14 +228,14 @@ class GraduationTasksSubmitedit extends Component{
// }); // });
// return false; // return false;
this.setState({ // this.setState({
Modalstype:true, // Modalstype:true,
Modalstopval:'确定要删除这个附件吗?', // Modalstopval:'确定要删除这个附件吗?',
ModalSave: ()=>this.deleteAttachment(file), // ModalSave: ()=>this.deleteAttachment(file),
ModalCancel:this.cancelAttachment // ModalCancel:this.cancelAttachment
}) // })
return false; // return false;
} //}
cancelAttachment=()=>{ cancelAttachment=()=>{
this.setState({ this.setState({
@ -246,8 +246,8 @@ class GraduationTasksSubmitedit extends Component{
}) })
} }
deleteAttachment = (file) => { onAttachmentRemove = (file) => {
let {attachments}=this.state; let {attachments,fileList}=this.state;
const url = `/attachments/${file.uid===undefined?file.id:file.uid}.json` const url = `/attachments/${file.uid===undefined?file.id:file.uid}.json`
axios.delete(url, { axios.delete(url, {
}) })
@ -426,7 +426,7 @@ class GraduationTasksSubmitedit extends Component{
multiple: true, multiple: true,
// https://github.com/ant-design/ant-design/issues/15505 // https://github.com/ant-design/ant-design/issues/15505
// showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。
// showUploadList: false, showUploadList: false,
action: `${getUrl()}/api/attachments.json`, action: `${getUrl()}/api/attachments.json`,
onChange: this.handleChange, onChange: this.handleChange,
onRemove: this.onAttachmentRemove, onRemove: this.onAttachmentRemove,
@ -553,7 +553,37 @@ class GraduationTasksSubmitedit extends Component{
) )
})} })}
<style>
{
`
.maxwidth500{
max-width:500px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #05101a;
}
`
}
</style>
{this.state.fileList.length===0?"":this.state.fileList.map((item,key)=>{
return(
<p className="color-grey mt10" key={key} >
<a className="color-grey fl">
<i className="font-14 color-green iconfont icon-fujian mr8" aria-hidden="true"></i>
</a>
<span className="mr12 color9B9B maxwidth500 fl" length="58">
{item.name}
</span>
<span className="color656565 mt2 color-grey-6 font-12 mr8">
{item.response===undefined?"":isNaN(this.props.bytesToSize(item.response.filesize))?"":this.props.bytesToSize(item.response.filesize)}
</span>
<i className="font-14 iconfont icon-guanbi "
id={item.response===undefined?"":item.response.id}
aria-hidden="true" onClick={()=>this.onAttachmentRemove(item.response===undefined?"":item.response.id&&item.response.id)}></i>
</p>
)
})}

@ -1,52 +1,53 @@
/* 右侧搜索区域*/ /* 右侧搜索区域*/
.searchFor .searchCon { .searchFor .searchCon {
width: 215px; width: 215px;
} }
.search-new { .search-new {
width:237px!important; width:237px!important;
height: 30px; height: 30px;
margin-bottom: 30px; margin-bottom: 30px;
} margin-right: 35px;
.search-new-input { }
padding-left: 16px; .search-new-input {
height: 30px; padding-left: 16px;
} height: 30px;
.search-span { }
border-radius: 17px; .search-span {
} border-radius: 17px;
}
.search-new img {
right: 10px; .search-new img {
} right: 10px;
}
/* 右侧 热门标签 */
.HotLabelList a{display: block;float: left;padding: 0px 9px;height: 28px;line-height: 28px;border-radius: 14px;background-color: #f5f5f5;color: #666;margin-right: 10px;margin-bottom: 9px;} /* 右侧 热门标签 */
.HotLabelList a.selected { .HotLabelList a{display: block;float: left;padding: 0px 9px;height: 28px;line-height: 28px;border-radius: 14px;background-color: #f5f5f5;color: #666;margin-right: 10px;margin-bottom: 9px;}
background: #4CACFF; .HotLabelList a.selected {
color: #fff; background: #4CACFF;
} color: #fff;
}
/* 右侧 热门问题 */
.hotQuestionItem{padding:20px 0px;border-bottom: 1px solid #eee;} /* 右侧 热门问题 */
.questiontName{max-width: 100%;display: block;} .hotQuestionItem{padding:20px 0px;border-bottom: 1px solid #eee;}
.questiontName{max-width: 100%;display: block;}
/* 用户信息-UserSection*/
.user_default_btn {width: 114px;} /* 用户信息-UserSection*/
.userPrivateName{line-height: 25px;margin-bottom: 9px;} .user_default_btn {width: 114px;}
.userPrivatePost{line-height: 20px;} .userPrivateName{line-height: 25px;margin-bottom: 9px;}
.noteDetailTitle{line-height: 38px;font-size: 24px;font-weight: normal;text-align:justify } .userPrivatePost{line-height: 20px;}
.noteDetailTitle{line-height: 38px;font-size: 24px;font-weight: normal;text-align:justify }
.noteDetailNum{float: left;padding:0px 12px;position: relative;color: #999!important;height: 28px;line-height: 26px;}
.noteDetailNum.rightline:after{position: absolute;content: '';right: 0px;width: 1px;background-color: #EAEAEA;height: 8px;top:10px;} .noteDetailNum{float: left;padding:0px 12px;position: relative;color: #999!important;height: 28px;line-height: 26px;}
.noteDetailNum.rightline:after{position: absolute;content: '';right: 0px;width: 1px;background-color: #EAEAEA;height: 8px;top:10px;}
/*帖子详情点赞*/
.noteDetailPoint{width: 100px;height: 70px;background-color: #4cacff;border-radius: 35px;color: #FFFFff;text-align: center;margin: 0px auto;box-sizing: border-box;padding: 2px 0px;cursor: pointer; line-height: 22px; /*帖子详情点赞*/
padding-top: 12px;} .noteDetailPoint{width: 100px;height: 70px;background-color: #4cacff;border-radius: 35px;color: #FFFFff;text-align: center;margin: 0px auto;box-sizing: border-box;padding: 2px 0px;cursor: pointer; line-height: 22px;
.Pointed{background-color:#f0f0f0;color: #b3b3b3; cursor: default} padding-top: 12px;}
.notefileDownload{height: 25px;line-height: 22px;} .Pointed{background-color:#f0f0f0;color: #b3b3b3; cursor: default}
.notefileDownload{height: 25px;line-height: 22px;}

@ -183,10 +183,12 @@ export function TPMIndexHOC(WrappedComponent) {
// return false // return false
return this.state.coursedata&&this.state.coursedata.course_identity === 0 return this.state.coursedata&&this.state.coursedata.course_identity === 0
} }
// 管理员等
isAdminOrCreator = () => { isAdminOrCreator = () => {
// return this.state.coursedata&&this.state.coursedata.course_identity >= 0 && // return this.state.coursedata&&this.state.coursedata.course_identity >= 0 &&
return this.state.coursedata&&this.state.coursedata.course_identity < 3 return this.state.coursedata&&this.state.coursedata.course_identity < 3
} }
// 助教等
isAdminOrTeacher = () => { isAdminOrTeacher = () => {
// return this.state.coursedata&&this.state.coursedata.course_identity >= 0 && // return this.state.coursedata&&this.state.coursedata.course_identity >= 0 &&
return this.state.coursedata&&this.state.coursedata.course_identity < 4 return this.state.coursedata&&this.state.coursedata.course_identity < 4

@ -296,7 +296,7 @@ label.infolabel{display: block;float: left;width: 56px;text-align: right;margin-
.subshaicontent a{float: left;margin-right: 20px;color: #999;cursor: pointer} .subshaicontent a{float: left;margin-right: 20px;color: #999;cursor: pointer}
.search-new{width: 248px;height:32px;position: relative} .search-new{width: 248px;height:32px;position: relative;margin-right: 35px;}
.search-span{display: block;position: absolute;width: 100%;height: 100%;left:0px;top:0px;background-color: #F4F4F4;border: 1px solid #EAEAEA; border-radius: 4px;z-index: 1} .search-span{display: block;position: absolute;width: 100%;height: 100%;left:0px;top:0px;background-color: #F4F4F4;border: 1px solid #EAEAEA; border-radius: 4px;z-index: 1}
.search-new-input{height: 32px;padding-left: 5px;width: 225px;border: none;box-sizing: border-box;background: none;outline: none;position: absolute;left:0px;top:1px;z-index: 2} .search-new-input{height: 32px;padding-left: 5px;width: 225px;border: none;box-sizing: border-box;background: none;outline: none;position: absolute;left:0px;top:1px;z-index: 2}
.search-new img,.search-new a,.search-new .searchicon{cursor: pointer;position: absolute;right:2px;top:2px;z-index: 2} .search-new img,.search-new a,.search-new .searchicon{cursor: pointer;position: absolute;right:2px;top:2px;z-index: 2}

Loading…
Cancel
Save