From 208a5071ebb7d6775322f183aa912aaa47de6f5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Wed, 26 Jun 2019 15:22:27 +0800 Subject: [PATCH] =?UTF-8?q?=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/config/webpack.config.dev.js | 30 ++++++------- .../shixunHomework/ShixunhomeWorkItem.js | 4 +- .../shixunreport/Shixunechart.js | 25 ++++++++--- public/react/src/modules/tpm/TPMBanner.js | 44 ++++++++++++++----- .../tpm/shixunchild/Challenges/Challenges.js | 6 +-- 5 files changed, 73 insertions(+), 36 deletions(-) diff --git a/public/react/config/webpack.config.dev.js b/public/react/config/webpack.config.dev.js index dfd54f38b..ceddbd81b 100644 --- a/public/react/config/webpack.config.dev.js +++ b/public/react/config/webpack.config.dev.js @@ -114,21 +114,21 @@ module.exports = { // First, run the linter. // It's important to do this before Babel processes the JS. // 上线然后要注释回来 - { - test: /\.(js|jsx|mjs)$/, - enforce: 'pre', - use: [ - { - options: { - formatter: eslintFormatter, - eslintPath: require.resolve('eslint'), - - }, - loader: require.resolve('eslint-loader'), - }, - ], - include: paths.appSrc, - }, + // { + // test: /\.(js|jsx|mjs)$/, + // enforce: 'pre', + // use: [ + // { + // options: { + // formatter: eslintFormatter, + // eslintPath: require.resolve('eslint'), + // + // }, + // loader: require.resolve('eslint-loader'), + // }, + // ], + // include: paths.appSrc, + // }, { // "oneOf" will traverse all following loaders until one will // match the requirements. When no loader matches it will fall diff --git a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js index 013d6d5e4..b63e210ef 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js @@ -304,7 +304,7 @@ class ShixunhomeWorkItem extends Component{ } { - this.props.isNotMember?this.props.discussMessage.private_icon===false? + this.props.isNotMember?this.props.discussMessage.private_icon===true? {discussMessage.name} : diff --git a/public/react/src/modules/courses/shixunHomework/shixunreport/Shixunechart.js b/public/react/src/modules/courses/shixunHomework/shixunreport/Shixunechart.js index 9fe14dc02..99b9d5748 100644 --- a/public/react/src/modules/courses/shixunHomework/shixunreport/Shixunechart.js +++ b/public/react/src/modules/courses/shixunHomework/shixunreport/Shixunechart.js @@ -10,6 +10,9 @@ function startechart(data){ var effChart = echarts.init(document.getElementById('shixun_skill_chart')); var option = { + title: { + text: '工作效率', + }, grid:{ left: '3%', right: '9%', @@ -42,7 +45,7 @@ function startechart(data){ xAxis: [ { type : 'value', - name: '学生序号', + name: '学生排名', scale:true, axisLabel : { formatter: ' ', @@ -57,11 +60,16 @@ function startechart(data){ ], yAxis: [ { - type : 'value', - name : '工作效率 = log(实训总得分/实训总耗时)', + type : "value", + name : " 实训总得分/实训总耗时", + nameGap: 20, + nameTextStyle: { + color: '#000', + fontSize:12 + }, scale:true, axisLabel : { - formatter: '{value} ' + formatter: '{value}' }, splitLine: { show: false @@ -100,6 +108,7 @@ function startechart(data){ name: data.username, xAxis:data.echart_data.myself_eff[0], yAxis:data.echart_data.myself_eff[1], + value:data.echart_data.myself_eff[1], } ], itemStyle: { @@ -158,6 +167,9 @@ function startechart(data){ var option1 = { + title: { + text: '能力值', + }, backgroundColor: '#fff', color: [ '#dd4444', '#fec42c', '#80F1BE' @@ -200,7 +212,7 @@ function startechart(data){ }, yAxis: { type: 'value', - name: '能力值(实训获得经验值/实训评测次数)', + name: " 实训获得经验值/实训评测次数", nameLocation: 'end', nameGap: 20, nameTextStyle: { @@ -230,7 +242,8 @@ function startechart(data){ { name: data.username, xAxis: data.echart_data.myself_object[0], - yAxis:data.echart_data.myself_object[1] + yAxis:data.echart_data.myself_object[1], + value:data.echart_data.myself_object[1] } ], itemStyle: { diff --git a/public/react/src/modules/tpm/TPMBanner.js b/public/react/src/modules/tpm/TPMBanner.js index 25a6ab9c7..64c2b39dd 100644 --- a/public/react/src/modules/tpm/TPMBanner.js +++ b/public/react/src/modules/tpm/TPMBanner.js @@ -10,7 +10,9 @@ import {Modal,Input,Radio,Pagination,message,Spin,Icon,Tooltip} from 'antd'; import 'antd/lib/pagination/style/index.css'; -import axios from 'axios'; +import axios from 'axios' + +import Modals from '../modals/Modals'; // import { Rating,Progress } from '@icedesign/base'; @@ -264,16 +266,29 @@ class TPMBanner extends Component { /* * 撤销发布按钮 * */ - cancel_publish=()=>{ - let id = this.props.match.params.shixunId; - let url="/shixuns/" + id +"/cancel_publish.json"; - axios.get(url).then((response) => { - this.props.showSnackbar(response.data.message); - window.location.reload() - }).catch((error) => { - console.log(error) - }); + ModalCancel=()=>{ + this.setState({ + Modalstype:false + }) + } + ModalSave=()=>{ + let id = this.props.match.params.shixunId; + let url="/shixuns/" + id +"/cancel_publish.json"; + axios.get(url).then((response) => { + this.props.showSnackbar(response.data.message); + window.location.reload() + }).catch((error) => { + console.log(error) + }); + } + cancel_publish=()=>{ + this.setState({ + Modalstype:true, + Modalstopval:"是否确认撤销发布?", + ModalCancel:this.ModalCancel, + ModalSave:this.ModalSave, + }) } @@ -523,6 +538,15 @@ class TPMBanner extends Component {
this.startshixunCombat(this.props.identity, item.challenge_id, "/editquestion")}
- className="font-16 color05101a">{item.name+1}
+ className="font-16 color05101a">{item.name}
:
this.startshixunCombat(this.props.identity, item.challenge_id, "/editcheckpoint")}
- className="font-16 color05101a">{item.name+2}:{item.name}: this.startshixunCombat(this.props.identity, item.challenge_id, "/editcheckpoint")}
- className="font-16 color05101a">{item.name+2}
+ className="font-16 color05101a">{item.name}
}