ysl 6 years ago
commit fffcdd6270

@ -1,7 +1,7 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import {Tooltip} from 'antd' import {Tooltip} from 'antd'
import moment from 'moment' import moment from 'moment'
import { getUrl } from 'educoder' import { getUrl, WordsBtn } from 'educoder'
class BoardsListItem extends Component{ class BoardsListItem extends Component{
constructor(props){ constructor(props){
super(props); super(props);
@ -61,34 +61,37 @@ class BoardsListItem extends Component{
</h6> </h6>
<div className="cl"></div> <div className="cl"></div>
<p className="color-grey panel-lightgrey mt10 fl"> <p className="color-grey panel-lightgrey mt18 fl">
<span className="mr50"> <span className="mr50">
<a href={`/users/${discussMessage.author.login}`} className="panel-name-small hide fl mr15 mr30 color-grey3">{discussMessage.author.name}</a> <a href={`/users/${discussMessage.author.login}`} className="panel-name-small hide fl mr15 mr30 color-grey3 font-14">{discussMessage.author.name}</a>
{ discussMessage.total_replies_count != 0 && <span className="mr15 color-grey9">{discussMessage.total_replies_count} 回复</span> } { discussMessage.total_replies_count != 0 && <span className="mr15 color-grey9 font-14">{discussMessage.total_replies_count} 回复</span> }
{ discussMessage.total_praises_count != 0 && <span className="mr15 color-grey9">{discussMessage.total_praises_count} 点赞</span> } { discussMessage.total_praises_count != 0 && <span className="mr15 color-grey9 font-14">{discussMessage.total_praises_count} 点赞</span> }
{ discussMessage.visits != 0 && <span className="mr15 color-grey9">{discussMessage.visits} 浏览</span> } { discussMessage.visits != 0 && <span className="mr15 color-grey9 font-14">{discussMessage.visits} 浏览</span> }
<span className="mr15 color-light-grey-C">{moment(discussMessage.created_on).fromNow()} </span> <span className="mr15 color-light-grey-C font-14">{moment(discussMessage.created_on).fromNow()} </span>
</span> </span>
{/* <span className="mr10">最后回复<span className="ml10 mr10">社区导师</span>10个月前</span> */}
</p> </p>
<div className="fr mt15">
{(isAdmin || discussMessage.author.login == current_user.login) &&
<WordsBtn style="blue" className="fl font-16 ml28"
onClick={(e) => { this.props.toEditPage(this.props.match.params.coursesId, this.props.match.params.boardId, discussMessage.id )} }>编辑</WordsBtn> }
{ isAdmin && <WordsBtn style="blue" className="fl font-16 ml28"
onClick={(e) => { debugger; onSticky(discussMessage); e.cancelBubble = true; e.stopPropagation();}}>
{ discussMessage.sticky ? '取消置顶' : '置顶' }</WordsBtn> }
</div>
{/* <span className="mr10"><i className="fa fa-eye color-grey mr5 "></i>473</span> */}
{/* <p className="fr panel-lightgrey mt10">
<span className="mr10"><i className="fa fa-eye color-grey mr5" data-tip-down="浏览数"></i>82</span>
<span className="mr10"><i className="fa fa-thumbs-up color-grey mr5" data-tip-down="点赞数"></i>1</span>
<span className="mr10"><i className="fa fa-comments-o color-grey mr5" data-tip-down="回复数"></i>4</span>
</p> */}
{ (isAdmin || discussMessage.author.login == current_user.login) && {/* { (isAdmin || discussMessage.author.login == current_user.login) &&
<div className="homepagePostSetting" style={{"right":"4px","top":"5px","display":"block"}}> <div className="homepagePostSetting" style={{"right":"4px","top":"5px","display":"block"}}>
<ul> <ul>
<li className="edu-position edu-position-hidebox"> <li className="edu-position edu-position-hidebox">
<i className="fa fa-bars color-grey-b"></i> <i className="fa fa-bars color-grey-b"></i>
<ul className="edu-position-hide undis"> <ul className="edu-position-hide undis">
{/* <li><a href="javascript:void(0)" onclick="show_send(34255, 1, 'message');">发送</a></li> */}
{(isAdmin || discussMessage.author.login == current_user.login) && <li><a href="javascript:void(0)" onClick={(e) => { {(isAdmin || discussMessage.author.login == current_user.login) && <li><a href="javascript:void(0)" onClick={(e) => {
this.props.toEditPage(this.props.match.params.coursesId, this.props.match.params.boardId, discussMessage.id )} } >编辑</a></li> this.props.toEditPage(this.props.match.params.coursesId, this.props.match.params.boardId, discussMessage.id )} } >编辑</a></li>
} }
@ -96,14 +99,13 @@ class BoardsListItem extends Component{
{ discussMessage.sticky ? '取消置顶' : '置顶' } { discussMessage.sticky ? '取消置顶' : '置顶' }
</a></li> </a></li>
} }
{/* <li>
<a href="javascript:void(0);" onclick="delete_confirm_box_3('/boards/5464/topics/34255/destroy', '确定要删除该帖子吗?')">删除</a>
</li> */}
</ul> </ul>
</li> </li>
</ul> </ul>
</div> </div>
} } */}
</div> </div>
</div> </div>
) )

@ -280,7 +280,7 @@ class BoardsNew extends Component{
{ name: this.isEdit ? '帖子编辑' : '帖子新建'} { name: this.isEdit ? '帖子编辑' : '帖子新建'}
]}></CBreadcrumb> ]}></CBreadcrumb>
<p className="clearfix mt30 mb30"> <p className="clearfix mt20 mb20">
<span className="fl font-24 color-grey-3">{this.isEdit ? "编辑" : "新建"}帖子</span> <span className="fl font-24 color-grey-3">{this.isEdit ? "编辑" : "新建"}帖子</span>
<a href="javascript:void(0)" className="color-grey-6 fr font-16 mr2" <a href="javascript:void(0)" className="color-grey-6 fr font-16 mr2"
onClick={() => this.props.history.goBack()}> onClick={() => this.props.history.goBack()}>

@ -227,15 +227,30 @@ class TopicDetail extends Component {
// filesize = bytesToSize(item.filesize) // filesize = bytesToSize(item.filesize)
} }
attachments.push( attachments.push(
<p className="clearfix" key={index} > // <p className="clearfix" key={index} >
<a href={item.url} className="color-green clearfix notefileDownload"> // <a href={item.url} className="color-green clearfix notefileDownload">
<i className="iconfont icon-xiazai color-green ml5 fl"></i> // <i className="iconfont icon-fujian color-green ml5 fl"></i>
{fileName && <ConditionToolTip title={fileName} condition={fileName.length > 30 }> // {fileName && <ConditionToolTip title={fileName} condition={fileName.length > 30 }>
<span className="fl task-hide upload_item" style={{ color: '#333'}}>{fileName}</span> // <span className="fl task-hide upload_item" style={{ color: '#333'}}>{fileName}</span>
</ConditionToolTip>} // </ConditionToolTip>}
<span className="fl" style={{ color: '#999', marginLeft: '6px'}}>{filesize? ` ${filesize.replace(' ', '')}` : ''}</span> // <span className="fl" style={{ color: '#999', marginLeft: '6px'}}>{filesize? ` ${filesize.replace(' ', '')}` : ''}</span>
// </a>
// </p>
<div className="color-grey" key={index}>
<a className="color-grey ml20">
<i className="font-14 color-green iconfont icon-fujian mr8" aria-hidden="true"></i>
</a> </a>
</p> {fileName && <ConditionToolTip title={fileName} condition={fileName.length > 30 }>
<a href={item.url}
className="mr12 color9B9B" length="58">
{fileName}
</a>
</ConditionToolTip>}
<span className="color656565 mt2 color-grey-6 font-12 mr8">{item.filesize}</span>
</div>
) )
}) })
return attachments; return attachments;
@ -542,7 +557,7 @@ class TopicDetail extends Component {
</span> } </span> }
{/* || current_user.user_id === author_info.user_id */} {/* || current_user.user_id === author_info.user_id */}
{ current_user && (isAdmin || isCurrentUserTheAuthor) && { current_user && (isAdmin || isCurrentUserTheAuthor) &&
<div className="edu-position-hidebox" style={{position: 'absolute', right: '18px',top:'4px'}}> <div className="edu-position-hidebox" style={{position: 'absolute', right: '2px',top:'4px'}}>
<a href="javascript:void(0);"><i className="fa fa-bars font-16"></i></a> <a href="javascript:void(0);"><i className="fa fa-bars font-16"></i></a>
<ul className="edu-position-hide undis"> <ul className="edu-position-hide undis">
@ -619,10 +634,10 @@ class TopicDetail extends Component {
</div> </div>
<div className="padding40 memoContent new_li"> <div className="padding30 memoContent new_li" style={{ paddingBottom: '10px'}}>
<MarkdownToHtml content={memo.content}></MarkdownToHtml> <MarkdownToHtml content={memo.content}></MarkdownToHtml>
</div> </div>
<div className="padding40 bor-bottom-greyE" > <div className="padding40 bor-bottom-greyE" style={{paddingTop: '2px'}}>
<div className="mt10 mb20"> <div className="mt10 mb20">
{/* ${memo.user_praise ? '' : ''} */} {/* ${memo.user_praise ? '' : ''} */}
<Tooltip title={`${memo.liked ? '取消点赞' : '点赞'}`}> <Tooltip title={`${memo.liked ? '取消点赞' : '点赞'}`}>

@ -156,7 +156,7 @@ class CommonWorkItem extends Component{
<span className="fl"> <span className="fl">
<CoursesListType typelist={item.status} /> <CoursesListType typelist={item.status} />
</span> </span>
{ {/* {
mainList && isAdmin && mainList && isAdmin &&
<li className="fr drop_down"> <li className="fr drop_down">
<i className="iconfont icon-caidan font-16 color-grey-c"></i> <i className="iconfont icon-caidan font-16 color-grey-c"></i>
@ -170,7 +170,7 @@ class CommonWorkItem extends Component{
</li> </li>
</ul> </ul>
</li> </li>
} } */}
</p> </p>
<p className="color-grey-9 clearfix"> <p className="color-grey-9 clearfix">
{item.commit_count===undefined?"":<span className="mr20 fl">{item.commit_count} 已交</span>} {item.commit_count===undefined?"":<span className="mr20 fl">{item.commit_count} 已交</span>}
@ -184,6 +184,12 @@ class CommonWorkItem extends Component{
<span className="mr20 fl">{item.status_time}</span> <span className="mr20 fl">{item.status_time}</span>
</Tooltip> </Tooltip>
} }
{this.props.isAdmin && <div className="fr">
<WordsBtn style="blue" className="fl font-16 ml28" onClick={ () => { this.props.toEditPage(this.props.match.params, item.homework_id) }}>编辑</WordsBtn>
<WordsBtn style="blue" className="fl font-16 ml28" onClick={ () => { this.props.toWorkSettingPage(this.props.match.params, item.homework_id) }}>设置</WordsBtn>
</div>}
{ {
// //
isStudent && isStudent &&

@ -70,10 +70,10 @@ function buildColumns(that, student_works) {
overflow: 'hidden', overflow: 'hidden',
textOverflow: 'ellipsis', textOverflow: 'ellipsis',
whiteSpace: 'nowrap' whiteSpace: 'nowrap'
}}> }} title={text}>
<Tooltip placement="bottom" title={text}> {/* <Tooltip placement="bottom" title={text}>
</Tooltip> */}
{text} {text}
</Tooltip>
</div> </div>
), ),
}, { }, {

@ -36,6 +36,10 @@ const CommonWorkAnswer = Loadable({
loader: () => import('./CommonWorkAnswer'), loader: () => import('./CommonWorkAnswer'),
loading:Loading, loading:Loading,
}) })
const CommonWorkAppraise = Loadable({
loader: () => import('./CommonWorkAppraise'),
loading:Loading,
})
const CommonWork = Loadable({ const CommonWork = Loadable({
@ -87,6 +91,12 @@ class CoursesWorkIndex extends Component{
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 评阅 */}
<Route exact path="/courses/:coursesId/group_homeworks/:workId/:studentWorkId/appraise"
render={
(props) => (<CommonWorkAppraise {...this.props} {...props} {...this.state} />)
}
></Route>
<Route exact path="/courses/:coursesId/group_homeworks/:workId/post" <Route exact path="/courses/:coursesId/group_homeworks/:workId/post"

@ -373,7 +373,7 @@ class NewWork extends Component{
{ name: `${ this.isEdit ? '编辑' : '新建'}` } { name: `${ this.isEdit ? '编辑' : '新建'}` }
]}></CBreadcrumb> ]}></CBreadcrumb>
<p className="clearfix mt30 mb30"> <p className="clearfix mt20 mb20">
<span className="fl font-24 color-grey-3">{this.isEdit ?"编辑":"新建"}{ moduleName }</span> <span className="fl font-24 color-grey-3">{this.isEdit ?"编辑":"新建"}{ moduleName }</span>
{/* history.goBack() {/* history.goBack()
this.props.toListPage(this.props.match.params, category.category_id)} this.props.toListPage(this.props.match.params, category.category_id)}

@ -25,7 +25,7 @@
} */ } */
#forum_list .return_btn.no_mr { #forum_list .return_btn.no_mr {
margin-right: 15px /* margin-right: 15px */
} }
/* md编辑器拖拽调整 */ /* md编辑器拖拽调整 */

@ -405,10 +405,10 @@ class ExerciceNew extends Component{
{ name: this.isEdit ? '编辑试卷' : '新建试卷'} { name: this.isEdit ? '编辑试卷' : '新建试卷'}
]}></CBreadcrumb> ]}></CBreadcrumb>
<p className="clearfix mt30 mb30"> <p className="clearfix mt20 mb20">
<span className="fl font-24 color-grey-3">{this.isEdit ? "编辑" : "新建"}试卷</span> <span className="fl font-24 color-grey-3">{this.isEdit ? "编辑" : "新建"}试卷</span>
<a href="javascript:void(0)" className="color-grey-6 fr font-16 mr2" <a href="javascript:void(0)" className="color-grey-6 fr font-16 mr2"
onClick={() => this.props.history.goBack()}> onClick={() => this.props.history.length == 1 ? this.props.history.push(`/courses/${courseId}/exercises/${left_banner_id}`): this.props.history.goBack()}>
返回 返回
</a> </a>
</p> </p>

@ -79,7 +79,12 @@ class GraduationTasksedit extends Component{
let listid=[] let listid=[]
let graduation_id=this.state.data.graduation_id; let graduation_id=this.state.data.graduation_id;
for(var list of fileList){ for(var list of fileList){
listid.push(list.response.id) if(list.response!=undefined){
listid.push(list.response.id)
}else{
listid.push(list.uid)
}
} }
// console.log(listid) // console.log(listid)
@ -125,7 +130,7 @@ class GraduationTasksedit extends Component{
GraduationTasksedittype=false; GraduationTasksedittype=false;
// window.location.href="/courses/"+course_id+"/graduation/"+graduationId+"/graduation_tasks/"+category_id+"/questions"; // window.location.href="/courses/"+course_id+"/graduation/"+graduationId+"/graduation_tasks/"+category_id+"/questions";
// this.goback() // this.goback()
window.location.href="/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+graduation_id+"/"+this.props.match.params.category_id +"/setting"; this.props.history.push("/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+graduation_id+"/"+this.props.match.params.category_id +"/setting");
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)

@ -314,7 +314,7 @@ class CoursesNew extends Component {
} }
}).then((result)=>{ }).then((result)=>{
this.setState({ this.setState({
searchlistscholl:result.data.shools_name, searchlistscholl:result.data.school_names,
scholl:value scholl:value
}) })
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({

Loading…
Cancel
Save