Merge remote-tracking branch 'origin/master'

dev_forum
杨树明 5 years ago
commit ec97d5aff9

@ -122,21 +122,21 @@ module.exports = {
// First, run the linter. // First, run the linter.
// It's important to do this before Babel processes the JS. // It's important to do this before Babel processes the JS.
// { {
// test: /\.(js|jsx|mjs)$/, test: /\.(js|jsx|mjs)$/,
// enforce: 'pre', enforce: 'pre',
// use: [ use: [
// { {
// options: { options: {
// formatter: eslintFormatter, formatter: eslintFormatter,
// eslintPath: require.resolve('eslint'), eslintPath: require.resolve('eslint'),
//
// }, },
// loader: require.resolve('eslint-loader'), loader: require.resolve('eslint-loader'),
// }, },
// ], ],
// include: paths.appSrc, include: paths.appSrc,
// }, },
{ {
// "oneOf" will traverse all following loaders until one will // "oneOf" will traverse all following loaders until one will
// match the requirements. When no loader matches it will fall // match the requirements. When no loader matches it will fall

@ -32,6 +32,7 @@ const dataSource = [{
}]; }];
const buildColumns = (that) => { const buildColumns = (that) => {
const { course_groups } = that.state
const columns=[{ const columns=[{
title: '序号', title: '序号',
dataIndex: 'id', dataIndex: 'id',
@ -72,14 +73,17 @@ const buildColumns = (that) => {
return <span className="color-dark overflowHidden1" return <span className="color-dark overflowHidden1"
style={{maxWidth: '110px'}} >{student_id}</span> style={{maxWidth: '110px'}} >{student_id}</span>
} }
}, { }];
if (course_groups && course_groups.length) {
columns.push({
title: '分班', title: '分班',
dataIndex: 'course_group_name', dataIndex: 'course_group_name',
key: 'course_group_name', key: 'course_group_name',
align:'center', align:'center',
width:"50%", width:"50%",
className:"color-grey-6" className:"color-grey-6"
}]; })
}
const isAdminOrStudent = that.props.isAdminOrStudent() const isAdminOrStudent = that.props.isAdminOrStudent()
if (!isAdminOrStudent) { if (!isAdminOrStudent) {
columns.some((item,key)=> { columns.some((item,key)=> {

Loading…
Cancel
Save