dev_forum
hjm 6 years ago
parent cbeafc1c5c
commit 6e91761cce

@ -48,8 +48,9 @@ class BoardsListItem extends Component{
<div className="clearfix ds pr pt5 contentSection" onClick={() => onItemClick(discussMessage)}>
<h6>
<a href="javascript:void(0)" className="panel-list-title hide fl mt5 color-dark font-bd"
style={{ fontWeight: 'bold', cursor: (canNotLink ? 'default' : 'poninter') }}
style={{ fontWeight: 'bold', cursor: (canNotLink ? 'default' : 'poninter'), maxWidth: '700px' }}
onClick={canNotLink ? () => {} : () => this.onTitleClick(discussMessage)}
title={`${discussMessage.subject.length > 40 ? discussMessage.subject : ''}`}
>{discussMessage.subject}</a>
{ !!discussMessage.sticky && <span className="btn-cir btn-cir-red fl mt5 ml5">置顶</span> }
{

@ -446,7 +446,9 @@ class Boards extends Component{
</Tooltip>
</a>
</p> } */}
{pagination.total_count > 15 && <Pagination className="coursePagination" showQuickJumper pageSize={15} total={pagination.total_count} onChange={this.onPageChange} />}
{pagination.total_count > 15 && <Pagination className="coursePagination"
current={pagination.page}
showQuickJumper pageSize={15} total={pagination.total_count} onChange={this.onPageChange} />}
</React.Fragment>
)

@ -150,7 +150,7 @@ class CommonWorkDetailIndex extends Component{
]}></CBreadcrumb>
<div style={{ width:'100%',height:'52px'}} >
<span className=" fl color-black summaryname">
<span className=" fl color-black summaryname" title={`${homework_name && homework_name.length > 36 ? homework_name : ''}`}>
{homework_name}
{/* <Link to={"/courses/"+courseId+"/graduation"+"/graduation_tasks/"}>{homework_name}</Link> */}
</span>

@ -1,5 +1,5 @@
import React,{Component} from "React";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip,Spin} from "antd";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip,Spin, Pagination} from "antd";
import {Link} from 'react-router-dom';
import locale from 'antd/lib/date-picker/locale/zh_CN';
import { WordsBtn, ConditionToolTip, queryString,getImageUrl, on, off} from 'educoder';
@ -77,7 +77,8 @@ function buildColumns(that, student_works) {
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap'
whiteSpace: 'nowrap',
maxWidth: '98px'
}} title={text}>
{/* <Tooltip placement="bottom" title={text}>
</Tooltip> */}
@ -94,7 +95,10 @@ function buildColumns(that, student_works) {
render: (text, record) => (
<span>
<a href="javascript:;" style={{color:'#9A9A9A'}}>{record.student_id}</a>
<a href="javascript:;"
title={record.student_id}
style={{color:'#9A9A9A', 'text-overflow': 'ellipsis', 'white-space': 'nowrap', 'max-width': '100px', display: 'block', overflow: 'hidden'}}
>{record.student_id}</a>
</span>
),
})
@ -330,7 +334,7 @@ const orderMap = {
}
const PAGE_SIZE = 50
// 类似页面 http://localhost:3007/courses/1309/graduation/graduation_tasks/48/76/setting
class CommonWorkSetting extends Component{
class CommonWorkList extends Component{
constructor(props){
super(props)
@ -355,8 +359,8 @@ class CommonWorkSetting extends Component{
category: {},
}
}
onTablePagination = (pageInfo) => {
this.setState({ page: pageInfo.current }, () => {
onTablePagination = (page) => {
this.setState({ page: page }, () => {
this.fetchList()
})
@ -706,7 +710,7 @@ class CommonWorkSetting extends Component{
}
<div className={"justify break_full_word new_li edu-back-white course_table_wrap"} style={{minHeight:"480px"}}>
<div className={"justify break_full_word new_li edu-back-white course_table_wrap"} style={{minHeight:"480px", marginBottom: '30px'}}>
<style>{`
.ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {
top: 72%;}
@ -730,31 +734,35 @@ class CommonWorkSetting extends Component{
</div>
</div>
</Spin>
:<Table
dataSource={student_works}
columns={columns}
showQuickJumper
pagination={work_count > PAGE_SIZE ? { //分页
:
<React.Fragment>
{/* pagination={work_count > PAGE_SIZE ? { //分页
total: work_count, //数据总数量
pageSize: PAGE_SIZE, //显示几条一页
current: page,
} : false}
loading={loadingstate}
onChange={this.onTablePagination}
/>}
</div>
{/* <div className={"justify break_full_word new_li edu-back-white singleLine"} style={{minHeight:"480px"}}>
{data2===undefined?"":<Table
showHeader={false}
dataSource={data2}
onChange={this.onTablePagination}
*/}
<Table
className="stageTable"
dataSource={student_works}
columns={columns}
showQuickJumper
pagination={false}
loading={loadingstate}
/>}
</div> */}
/>
</React.Fragment>
}
</div>
</div>
{work_count > PAGE_SIZE && <Pagination
style={{ textAlign: 'center', marginBottom: '20px' }}
showQuickJumper pageSize={PAGE_SIZE} onChange={this.onTablePagination} current={page} total={work_count} />}
</React.Fragment>
@ -762,5 +770,5 @@ class CommonWorkSetting extends Component{
}
}
const CommonWorkSettingForm = Form.create({ name: 'commonworkSettingForm' })(CommonWorkSetting);
export default CommonWorkSettingForm;
const CommonWorkListForm = Form.create({ name: 'commonworkListForm' })(CommonWorkList);
export default CommonWorkListForm;

@ -982,6 +982,9 @@ class CommonWorkSetting extends Component{
.settingForm .ant-radio-group, .settingForm.ant-form {
color: #666;
}
.settingForm.ant-form {
margin-bottom: 30px;
}
.settingForm input.ant-input {
height: 40px

@ -88,6 +88,7 @@ class TabRightComponents extends Component{
.drop_down_menu li a {
padding: 0px;
font-size: 14px;
color: #333;
}
.drop_down_menu {
width: 121px;

Loading…
Cancel
Save