diff --git a/public/react/config/webpack.config.dev.js b/public/react/config/webpack.config.dev.js index f126bc363..9b9d16406 100644 --- a/public/react/config/webpack.config.dev.js +++ b/public/react/config/webpack.config.dev.js @@ -31,7 +31,7 @@ module.exports = { // See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s // devtool: "cheap-module-eval-source-map", // 开启调试 - devtool: "source-map", // 开启调试 + // devtool: "source-map", // 开启调试 // These are the "entry points" to our application. // This means they will be the "root" imports that are included in JS bundle. // The first two entry points enable "hot" CSS and auto-refreshes for JS. diff --git a/public/react/config/webpack.config.prod.js b/public/react/config/webpack.config.prod.js index 7b9795e80..e1da1d12a 100644 --- a/public/react/config/webpack.config.prod.js +++ b/public/react/config/webpack.config.prod.js @@ -54,6 +54,9 @@ const extractTextPluginOptions = shouldUseRelativeAssetPaths // console.log('publicPath ', publicPath) module.exports = { + externals: { + 'react': 'window.React' + }, // Don't attempt to continue if there are any errors. bail: true, // We generate sourcemaps in production. This is slow but gives good results. diff --git a/public/react/src/modules/courses/members/studentsList.js b/public/react/src/modules/courses/members/studentsList.js index 3462438f8..da95278a6 100644 --- a/public/react/src/modules/courses/members/studentsList.js +++ b/public/react/src/modules/courses/members/studentsList.js @@ -129,7 +129,7 @@ class studentsList extends Component{ } /// 确认是否下载 confirmysl(url){ - axios.get(url + '&export=true').then((response) => { + axios.get(url).then((response) => { if(response === undefined){ return } @@ -506,7 +506,10 @@ class studentsList extends Component{ const { course_group_name, invite_code } = this.state; const courseId = this.props.match.params.coursesId - let exportUrl = `/courses/${courseId}/export_member_scores_excel.xlsx?` + let exportUrl = `/courses/${courseId}/export_member_scores_excel.xlsx?`; //总成绩 + let exportUrltwo = `/courses/${courseId}/export_couser_info.xlsx?`; //课堂信息 + let exportUrlthree = `/courses/${courseId}/export_couser_info.xlsx?`; //活跃度 + const params = {} if (course_group_id) { params.group_id = course_group_id @@ -522,6 +525,8 @@ class studentsList extends Component{ paramsString += `${key}=${params[key]}&` } exportUrl += paramsString; + exportUrltwo+=paramsString; + exportUrlthree+=paramsString; return( this.addDir()}>添加分班 } { isAdmin && !isParent && course_group_id != 0 && this.deleteDir()}>删除分班 } { isAdmin && !isParent && course_group_id != 0 && this.renameDir()}>分班重命名 } - { isAdmin && this.confirmysl(exportUrl)} >导出成绩 } + + { isAdmin && +
  • + 导出 + +
  • + } + {/*this.confirmysl(exportUrl)} >导出成绩*/} {/* */}
    } @@ -576,60 +615,6 @@ class studentsList extends Component{ } onPressEnter={this.onPressEnter} > - {/*
    -

    - 学生列表 - 邀请码:CKPYL -

  • - 导入创建分班 - this.showStuNewBox(1)}>新建分班 - this.delClasses()}>删除分班 - this.showStuNewBox(2)}>分班重命名 - 导出成绩 -
  • -

    -
    - 位学生 -
    - -
    -
    - - - - -
    -
    - 分班: - -
    -
    - 取消 - 确定 -
    -
    -
    -
    */} - - - { total_count > 0 || this.state.isSpin == true ?