From 8aab67c9207fdfcd4271a1b6ed1a8eb601cda164 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 19 Sep 2019 16:26:52 +0800 Subject: [PATCH 01/55] setting init --- .../EditableCourseSupportSetting.js | 475 ++++++++++++++++++ .../ShowTableCourseSupportSetting.js | 150 ++++++ .../subroute/ecCourseSupportSetting/index.js | 324 ++++++++++++ .../subroute/ecCourseSupportSetting/style.css | 44 ++ 4 files changed, 993 insertions(+) create mode 100644 public/react/src/modules/ecs/subroute/ecCourseSupportSetting/EditableCourseSupportSetting.js create mode 100644 public/react/src/modules/ecs/subroute/ecCourseSupportSetting/ShowTableCourseSupportSetting.js create mode 100644 public/react/src/modules/ecs/subroute/ecCourseSupportSetting/index.js create mode 100644 public/react/src/modules/ecs/subroute/ecCourseSupportSetting/style.css diff --git a/public/react/src/modules/ecs/subroute/ecCourseSupportSetting/EditableCourseSupportSetting.js b/public/react/src/modules/ecs/subroute/ecCourseSupportSetting/EditableCourseSupportSetting.js new file mode 100644 index 000000000..ec5805947 --- /dev/null +++ b/public/react/src/modules/ecs/subroute/ecCourseSupportSetting/EditableCourseSupportSetting.js @@ -0,0 +1,475 @@ +import React, { Component } from 'react'; + +import moment from 'moment' +import { getUrl } from 'educoder' +import { Form, Input, Icon, Button, Select, InputNumber } from 'antd'; +const { TextArea } = Input; +const { Option } = Select; + +let _url_origin = getUrl() +const $ = window.$ +// https://www.educoder.net/stylesheets/css/common.css?1546618720 +if (!window['EcLoaded']) { + $('head').append( $('') + .attr('href', `${_url_origin}/stylesheets/css/common.css?1525440977`) ); + window['EcLoaded'] = true +} + +let id = 0; + + +/** + target_id + position + target_weight + target_contents + + subitem_id + index + subitem_contents + +*/ +const data = +[{"position":0,"target_weight":0.02,"target_contents":"12","standard_grade":2,"subitem_id":"65"},{"position":3,"target_id":"0","target_weight":0.1,"target_contents":"理解数据管理技术和数据库技术的发展,区分不同数据模型的作用和特点,描述数据库系统的类型、结构、数据独立性。","standard_grade":60,"subitem_id":"66"},{"position":4,"target_weight":1,"target_contents":"22","standard_grade":33,"subitem_id":"66"},{"position":11,"target_id":"1","target_weight":0.1,"target_contents":"理解数据管理技术和数据库技术的发展,区分不同数据模型的作用和特点,描述数据库系统的类型、结构、数据独立性。","standard_grade":61,"subitem_id":"65"}] +; +let _data = [ + { + target_id: 0, + position: 1, + target_weight: 0.1, + target_contents: '理解数据管理技术和数据库技术的发展,区分不同数据模型的作用和特点,描述数据库系统的类型、结构、数据独立性。', + standard_grade: 60, + // biyeYaoqiuZhibiaodian: ':能够运用相关的工程基础和专业知识辨别材料生产中出现的技术、工艺、质量等问题', + "subitem_id": 64, + "index": "1-1", + "subitem_contents": "能够运用相关的工程基础和专业知识辨别材料生产中出现的技术、工艺、质量等问题" + }, + { + target_id: 1, + position: 2, + target_weight: 0.1, + target_contents: '理解数据管理技术和数据库技术的发展,区分不同数据模型的作用和特点,描述数据库系统的类型、结构、数据独立性。', + standard_grade: 61, + // biyeYaoqiuZhibiaodian: ':能够运用相关的工程基础和专业知识辨别材料生产中出现的技术、工艺、质量等问题', + "subitem_id": 65, + "index": "1-2", + "subitem_contents": "222能够运用相关的工程基础和专业知识辨别材料生产中出现的技术、工艺、质量等问题" + } +] +const item = {} + +class EditableCourseSupportSetting extends Component { + constructor(props) { + super(props) + this.state = { + addOrDeleting: false, + errorMsg: '' + } + } + onRemove = (k) => { + let fValues = this.props.form.getFieldsValue(); + if ( + // fValues.standard_grade[k] && fValues.standard_grade[k] != 75 + // || fValues.subitem_id[k] + // || + fValues.target_contents[k] + // || fValues.target_weight[k] + ) { + this.props.showModal('提示', '确定要删除吗?', () => { + this.remove(k) + }) + } else { + this.remove(k) + } + } + remove = (k) => { + const { form } = this.props; + // can use data-binding to get + const keys = form.getFieldValue('keys'); + // We need at least one passenger + // if (keys.length === 1) { + // return; + // } + if (keys.length === 1) { + this.setState({ errorMsg: '至少得保留一条数据' }) + return; + } + // 清除悬浮tip + window.$('.data-tip-down').hide() + + console.log('remove :' , k , this.position2Target_idMap[k]) + delete this.position2Target_idMap[k] + // can use data-binding to set + form.setFieldsValue({ + keys: keys.filter(key => key !== k), + }); + } + _reverseMap = (map) => { + let newMap = {} + for (var k in map) { + newMap[map[k]] = k; + } + return newMap + } + addIfNewKeyExist = (newKey, index_arg) => { + this.setState({ addOrDeleting: true }) + const { form } = this.props; + const keys = form.getFieldValue('keys'); + /** + [0,1,2,3] + ['11', '22', '33', '44'] + -> + [0,1,2,3,4] + ['11', '22', empty, '33', '44'] + + */ + const target_weight = form.getFieldValue('target_weight'); + const target_contents = form.getFieldValue('target_contents'); + const standard_grade = form.getFieldValue('standard_grade'); + const subitem_id = form.getFieldValue('subitem_id'); + keys.splice(index_arg, 0, newKey); + + // position2Target_idMap + // {1:2, 2:3, 3:4, 4:6 } --> {1:2, 2:3, 3:7, 4:4, 5:6 } + // 更新key/position 映射到target_id的map + // 两次revers,用这个结构,达到给position加1的效果 + let reverseMap = this._reverseMap(this.position2Target_idMap); + for (let i = index_arg ; i < keys.length; i++) { + if(keys[i] === keys[i+1]) { // 找到开始+1的行 + continue; + } + let target_id = this.position2Target_idMap[keys[i]]; + reverseMap[target_id] = parseInt(reverseMap[target_id]) + 1; + keys[i] = keys[i] + 1; + } + for (let i = 0 ; i < keys.length - 1; i++) { + if (keys[i] == keys[i + 1]) { + debugger; + } + } + this.position2Target_idMap = this._reverseMap(reverseMap); + + + target_weight.splice(newKey, 0, undefined); + target_contents.splice(newKey, 0, undefined); + standard_grade.splice(newKey, 0, undefined); + subitem_id.splice(newKey, 0, undefined); + + setTimeout(() => { + form.setFieldsValue({ + target_weight, + target_contents, + standard_grade, + subitem_id + }); + window.$('.data-tip-down').hide() + this.setState({ addOrDeleting: false }) + + }, 300) + form.setFieldsValue({ + keys: keys + }); + + } + add = (k, index) => { + this.setState({ errorMsg: '' }) + + const { form } = this.props; + // can use data-binding to get + const keys = form.getFieldValue('keys'); + let nextKeys ; + let newKey = k + 1; + + const newKeyIndex = keys.indexOf(newKey) + if (newKeyIndex != -1) { + // 新key存在,将新key位置及以后的row后移,直到找到一个之后的空位置 + this.addIfNewKeyExist(newKey, index) + } else { // 如果这个新key不存在 + // keys[newIndex] = newKey + keys.splice(index === 0 && k === -1 ? 0 : index, 0, newKey); + } + // can use data-binding to set + // important! notify form to detect changes + form.setFieldsValue({ + keys: keys, + }); + } + + handleSubmit = (e) => { + if (!this.props.is_manager) { + this.props.showModal('提示', '您没权限编辑,请联系管理员。') + return; + } + this.setState({ errorMsg: '' }) + e.preventDefault && e.preventDefault(); + this.props.form.validateFieldsAndScroll((err, values) => { + if (!err) { + let keysLen = values.keys.length + if (keysLen < 1) { + this.setState({ errorMsg: '至少得保留一条数据' }) + } + var data = [] + while( keysLen-- ) { + data.push({}) + } + for (var valKey in values) { + + let dataIndex = 0 + values[valKey].forEach( (item,index) => { + let _val = values[valKey][index]; + if (_val || _val == 0) { + data[dataIndex][valKey === 'keys' ? 'position' : valKey] = _val + if (valKey === 'keys' && (this.position2Target_idMap[_val] || this.position2Target_idMap[_val] === 0) ) { + data[dataIndex].target_id = this.position2Target_idMap[_val] + } + dataIndex++; + } + }) + } + + console.log('Received values of form: ', values, data); + + let totalWeight = 0; + values.target_weight.forEach(item => { + if (item) { + totalWeight += item + } + }) + // 精度问题 0.2 + 0.7 = 0.8999999999 + if (parseInt((totalWeight * 100).toFixed(1)) != 100) { + this.setState({ errorMsg: '请先保证权重和等于1' }) + return; + } + + this.props.updateCourseTargets(data) + } else { + + const keyRowNumMap = {} + let rowNum = 1; + for (var key in values.target_contents) { + keyRowNumMap[key] = rowNum; + rowNum++; + } + + // err.target_contents[1].errors[0] + // {message: "请填入目标内容", field: "target_contents[1]"} + for (var key in err) { + for (var _k in err[key]) { + let errorObj = err[key][_k].errors[0]; + + let _key = errorObj.field.match(`[(0-9)]`) + this.setState({ errorMsg: `第${keyRowNumMap[_key]}行,${errorObj.message}` }) + return; + // console.log(`第${keyRowNumMap[_key]}行,${errorObj.message}`); + } + } + } + + + }); + } + + componentDidMount = () => { + this.position2Target_idMap = {} + const { form } = this.props; + + const data = this.props.course_targets + + let target_weight = [] + let target_contents = [] + let standard_grade = [] + // let biyeYaoqiuZhibiaodian = [] + let subitem_id = [] + let keys = [] + + data.forEach(item => { + keys.push(item.position); + target_weight[item.position] = (item.target_weight) + target_contents[item.position] = (item.target_contents); + standard_grade[item.position] = (item.standard_grade); + // biyeYaoqiuZhibiaodian[item.position] = (item.biyeYaoqiuZhibiaodian); + + subitem_id[item.position] = item.subitem_id ? (item.subitem_id).toString() : item.subitem_id; + + this.position2Target_idMap[item.position] = item.target_id + }) + form.setFieldsValue({ + keys + }); + setTimeout(() => { + form.setFieldsValue({ + target_weight, + target_contents, + standard_grade, + // biyeYaoqiuZhibiaodian, + subitem_id, + }); + // this.forceUpdate() + }, 300) + + + } + + + render() { + const { getFieldDecorator, getFieldValue } = this.props.form; + const { requirements } = this.props; + const { addOrDeleting } = this.state; + const formItemLayout = { + labelCol: { + xs: { span: 24 }, + sm: { span: 4 }, + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 20 }, + }, + }; + const formItemLayoutWithOutLabel = { + wrapperCol: { + xs: { span: 24, offset: 0 }, + sm: { span: 20, offset: 4 }, + }, + }; + getFieldDecorator('keys', { initialValue: [] }); + const keys = getFieldValue('keys'); + const formItems = keys.map((k, index) => ( +
  • + + { index + 1 } + + {getFieldDecorator(`target_weight[${k}]`, { + // validateTrigger: ['onChange', 'onBlur'], + rules: [{ + required: true, + whitespace: true, + type: 'number', + message: "请填入权重", + }], + })( + + )} + + + {getFieldDecorator(`target_contents[${k}]`, { + // validateTrigger: ['onChange', 'onBlur'], + rules: [{ + required: true, + // whitespace: true, + message: "请填入目标内容", + }], + })( + ' + + $(".newMain").after(html).hide(); + + editormd.markdownToHTML("MDContent", { + htmlDecode: "style,script,iframe", // you can filter tags decode + taskList: true, + tex: true, // 默认不解析 + flowChart: true, // 默认不解析 + sequenceDiagram: true // 默认不解析 + }); +} +function removeElasticLayer(){ + $(".layerContent").hide(); + $(".newMain").show(); +} +window.elasticLayer = elasticLayer +window.doElasticLayer = doElasticLayer +window.removeElasticLayer = removeElasticLayer + class Ecs extends React.Component { render() { From 4e61419e9c8ba7c3b9ba05aa07df502d460056b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 26 Sep 2019 10:53:09 +0800 Subject: [PATCH 29/55] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 4de5d9d88..be734a82e 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -22,14 +22,14 @@ let hashTimeout // TODO 开发期多个身份切换 let debugType ="" if (isDev) { - const _search = window.location.search; - let parsed = {}; - if (_search) { - parsed = queryString.parse(_search); - } - debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' : - window.location.search.indexOf('debug=s') != -1 ? 'student' : - window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin' + const _search = window.location.search; + let parsed = {}; + if (_search) { + parsed = queryString.parse(_search); + } + debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' : + window.location.search.indexOf('debug=s') != -1 ? 'student' : + window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin' } window._debugType = debugType; export function initAxiosInterceptors(props) { @@ -83,9 +83,9 @@ export function initAxiosInterceptors(props) { } config.url = `${proxy}${url}`; if (config.url.indexOf('?') == -1) { - config.url = `${config.url}?debug=${'student'}` + config.url = `${config.url}?debug=${'admin'}` } else { - config.url = `${config.url}&debug=${'student'}` + config.url = `${config.url}&debug=${'admin'}` } } else { // 加api前缀 From 7032fa8ea7973fbd8bdc4864d05639815d41ff97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 26 Sep 2019 11:49:02 +0800 Subject: [PATCH 30/55] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/ecs/EcSetting/index.js | 8 ++++---- public/react/src/modules/ecs/curriculum/Curriculum.js | 10 +++++----- .../src/modules/ecs/curriculum/CurriculumSubpage.js | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/public/react/src/modules/ecs/EcSetting/index.js b/public/react/src/modules/ecs/EcSetting/index.js index 69d309c46..601c68790 100644 --- a/public/react/src/modules/ecs/EcSetting/index.js +++ b/public/react/src/modules/ecs/EcSetting/index.js @@ -75,11 +75,11 @@ class EcSetting extends React.Component { let type = stepTypes[stepIndex]; this.setState({ stepIndex: stepIndex }); - if(type==="courses"){ - this.props.history.push(`/ecs/major_schools/${majorId}/years/${yearId}/${type}/ec_course_support_setting/1`); - }else { + // if(type==="courses"){ + // this.props.history.push(`/ecs/major_schools/${majorId}/years/${yearId}/${type}/ec_course_support_setting/1`); + // }else { this.props.history.push(`/ecs/major_schools/${majorId}/years/${yearId}/${type}`); - } + // } } setupStep = () => { diff --git a/public/react/src/modules/ecs/curriculum/Curriculum.js b/public/react/src/modules/ecs/curriculum/Curriculum.js index e75d118da..f00589781 100644 --- a/public/react/src/modules/ecs/curriculum/Curriculum.js +++ b/public/react/src/modules/ecs/curriculum/Curriculum.js @@ -233,19 +233,19 @@ class Curriculum extends Component { {/*Curriculumtwo 测试用*/} {/*课程目标*/} - (this.Ontitine(i)} />) }> {/*课程考核方式与数据来源*/} - (this.Ontitine(i)}/>) }> {/*成绩等级设置*/} - (this.Ontitine(i)}/>) }> {/*4课程目标评价方法*/} - (this.Ontitine(i)}/>) }> {/*5课程达成评价结果*/} - (this.Ontitine(i)}/>) }> diff --git a/public/react/src/modules/ecs/curriculum/CurriculumSubpage.js b/public/react/src/modules/ecs/curriculum/CurriculumSubpage.js index 9037705d7..a0df7f63b 100644 --- a/public/react/src/modules/ecs/curriculum/CurriculumSubpage.js +++ b/public/react/src/modules/ecs/curriculum/CurriculumSubpage.js @@ -16,7 +16,7 @@ class CurriculumSubpage extends Component { console.log(this.props.match.params); } Curriculumstructure=()=>{ - this.props.history.push('/ecs/major_schools/:majorId/years/:yearId/subpage/courses') + this.props.history.push(`/ecs/major_schools/${this.props.match.params.majorId}/years/${this.props.match.params.yearId}/subpage/courses`); } From 25941dbcf468c8bb18fc08464fc0db40c273af79 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 26 Sep 2019 14:59:57 +0800 Subject: [PATCH 31/55] =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RequirementVsObjective/SelectTable.js | 123 +++++++++++++++ .../EcSetting/RequirementVsObjective/index.js | 144 ++++++++++++++++++ .../react/src/modules/ecs/EcSetting/index.js | 12 +- 3 files changed, 278 insertions(+), 1 deletion(-) create mode 100644 public/react/src/modules/ecs/EcSetting/RequirementVsObjective/SelectTable.js create mode 100644 public/react/src/modules/ecs/EcSetting/RequirementVsObjective/index.js diff --git a/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/SelectTable.js b/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/SelectTable.js new file mode 100644 index 000000000..9e95d9eb8 --- /dev/null +++ b/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/SelectTable.js @@ -0,0 +1,123 @@ +import React, { Component } from 'react'; + +import classNames from 'classnames' + +import axios from 'axios'; + +import { Table, Divider, Tag, Checkbox, InputNumber, Spin, Icon, Tooltip } from 'antd'; + +class SelectTable extends Component { + constructor(props) { + super(props) + this.state={ + + } + } + + componentDidMount(){ + + } + + render() { + const { match, columns, tableData } = this.props + if (!tableData || !tableData.length) return ''; + return ( + + + + + + {columns.map((item, index) => { + if (index == 0) return ; + return ( + + + + ) + })} + {/* + + + + */} + + { tableData.map((item, rowIndex) => { + const cells = item.map((cell, colIndex) => { + if(colIndex == 0) return + + + return ( + + ) + }) + return ( + + {cells} + + ) + })} + {/* + + + + + + + */} + {/* + + + + + + + + + + + + + + + */} + +
    {columns[0][0]}{columns[0][1]}目标{index}目标1目标2目标3目标4目标5
    指标点{rowIndex + 1} this.props.onCellClick(rowIndex, colIndex, !!cell)}> + +
    指标点1 + + + + + + + + + +
    指标点2 + + + + + + + + + +
    指标点3 + + + + + + + + + +
    + + + ); + } +} + +export default (SelectTable) ; diff --git a/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/index.js b/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/index.js new file mode 100644 index 000000000..49b056950 --- /dev/null +++ b/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/index.js @@ -0,0 +1,144 @@ +import React, { Component } from 'react'; + +import classNames from 'classnames' + +import axios from 'axios'; + +import { Table, Divider, Tag, Checkbox, InputNumber, Spin, Icon } from 'antd'; +import SelectTable from './SelectTable' +import update from 'immutability-helper' +const testState = { + "graduation_requirements": [ + { + "id": 1, + "position": 1, + "content": "毕业要求一" + }, + { + "id": 2, + "position": 2, + "content": "毕业要求二" + } + ], + "training_subitems": [ + { + "id": 1, + "content": "培养目标一" + }, + { + "id": 2, + "content": "培养目标二" + } + ], + "requirement_support_objectives": [ + { + "graduation_requirement_id": 1, + "training_subitem_id": 1 + }, + { + "graduation_requirement_id": 2, + "training_subitem_id": 2 + }, + ] +} +class RequirementVsObjective extends Component { + constructor(props) { + super(props) + this.state={ + ...testState + } + } + + componentDidMount(){ + // this.init() + // return; + + const yearId = this.props.match.params.yearId + const url = `/ec_years/${yearId}/requirement_support_objectives.json` + axios.get(url).then((response) => { + if (response.data.graduation_requirements) { + this.setState( {...response.data} , () => { + this.init() + }) + } + }).catch((e) => { + + }) + } + init = () => { + this.graduationRequirementsIdIndexMap = {} + this.trainingSubitemsIdIndexMap = {} + this.state.graduation_requirements.forEach((item, index) => { + this.graduationRequirementsIdIndexMap[item.id] = index + }) + this.state.training_subitems.forEach((item, index) => { + this.trainingSubitemsIdIndexMap[item.id] = index + }) + const tableData = [] + this.state.graduation_requirements.forEach((item, index) => { + tableData.push([item.content, ...Array(this.state.training_subitems.length)]) + }) + this.state.requirement_support_objectives.forEach(item => { + tableData[this.graduationRequirementsIdIndexMap[item.graduation_requirement_id]][this.trainingSubitemsIdIndexMap[item.training_subitem_id]] + = true + }) + this.setState({ tableData }) + } + onCellClick = (rowIndex, colIndex, select) => { + console.log( rowIndex, colIndex, select ) + const ec_graduation_requirement_id = this.state.graduation_requirements[rowIndex].id + const ec_training_subitem_id = this.state.training_subitems[colIndex].id + const yearId = this.props.match.params.yearId + const url = `/ec_years/${yearId}/requirement_support_objectives.json` + const method = select ? axios.delete : axios.post + method(url, + select ? { + params: { + ec_graduation_requirement_id, + ec_training_subitem_id + } + } : { + ec_graduation_requirement_id, + ec_training_subitem_id + } + ).then((response) => { + if (response.data.status == 0) { + this.setState( + (prevState) => ({ + tableData : update(prevState.tableData, {[rowIndex]: {[colIndex]: {$set: select ? false : true}}}) + }) + ) + this.props.showNotification(`${select ? '取消' : '选择'}成功`) + } + }).catch((e) => { + + }) + if (select) { // 取消 + + } else { // 选择 + + } + } + render() { + const { match, history, current_user } = this.props + const { tableData, training_subitems, graduation_requirements, is_manager } = this.state + + const columns = training_subitems && [['毕业要求', '培养目标'], ...training_subitems.map(item => item.content)] + const columnIdIndexMap = {} + console.log(columns, tableData) + return ( + +
    + requirementVsObjective + +
    + + ); + } +} + +export default (RequirementVsObjective) ; diff --git a/public/react/src/modules/ecs/EcSetting/index.js b/public/react/src/modules/ecs/EcSetting/index.js index 69d309c46..fd3ac436a 100644 --- a/public/react/src/modules/ecs/EcSetting/index.js +++ b/public/react/src/modules/ecs/EcSetting/index.js @@ -40,6 +40,11 @@ const ReachCalculationInfo=Loadable({ loader: () => import('./reachCalculationInfo/index'), loading: Loading, }); +const RequirementVsObjective=Loadable({ + loader: () => import('./RequirementVsObjective/index'), + loading: Loading, +}); + class EcSetting extends React.Component { @@ -132,8 +137,13 @@ class EcSetting extends React.Component { render={ (props) => () }> () }> + () }> - + {/* 毕业要求对培养目标的支撑 */} + () }> + {/*学生*/} () }> From 12f28bcfae2766af5905d758d0545bf1eadb5f20 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 26 Sep 2019 15:08:22 +0800 Subject: [PATCH 32/55] place --- .../modules/ecs/EcSetting/RequirementVsObjective/SelectTable.js | 1 + 1 file changed, 1 insertion(+) diff --git a/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/SelectTable.js b/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/SelectTable.js index 9e95d9eb8..5975cafb3 100644 --- a/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/SelectTable.js +++ b/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/SelectTable.js @@ -43,6 +43,7 @@ class SelectTable extends Component { { tableData.map((item, rowIndex) => { const cells = item.map((cell, colIndex) => { + // placement="bottom" if(colIndex == 0) return 指标点{rowIndex + 1} From 018c2a3ee70ef43106d6cba0cb201e83c9714060 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 26 Sep 2019 16:16:57 +0800 Subject: [PATCH 33/55] =?UTF-8?q?=E5=88=97=E6=95=B0=E4=B8=8D=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RequirementVsObjective/SelectTable.js | 2 +- .../EcSetting/RequirementVsObjective/index.js | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/SelectTable.js b/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/SelectTable.js index 5975cafb3..81021cf88 100644 --- a/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/SelectTable.js +++ b/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/SelectTable.js @@ -48,7 +48,7 @@ class SelectTable extends Component { 指标点{rowIndex + 1} return ( - this.props.onCellClick(rowIndex, colIndex, !!cell)}> + this.props.onCellClick(rowIndex, colIndex , !!cell)}> ) diff --git a/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/index.js b/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/index.js index 49b056950..cfd264cbe 100644 --- a/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/index.js +++ b/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/index.js @@ -72,7 +72,8 @@ class RequirementVsObjective extends Component { this.graduationRequirementsIdIndexMap[item.id] = index }) this.state.training_subitems.forEach((item, index) => { - this.trainingSubitemsIdIndexMap[item.id] = index + // 对应table的列数 + this.trainingSubitemsIdIndexMap[item.id] = index + 1 }) const tableData = [] this.state.graduation_requirements.forEach((item, index) => { @@ -87,7 +88,7 @@ class RequirementVsObjective extends Component { onCellClick = (rowIndex, colIndex, select) => { console.log( rowIndex, colIndex, select ) const ec_graduation_requirement_id = this.state.graduation_requirements[rowIndex].id - const ec_training_subitem_id = this.state.training_subitems[colIndex].id + const ec_training_subitem_id = this.state.training_subitems[colIndex - 1].id const yearId = this.props.match.params.yearId const url = `/ec_years/${yearId}/requirement_support_objectives.json` const method = select ? axios.delete : axios.post @@ -129,7 +130,17 @@ class RequirementVsObjective extends Component { return (
    - requirementVsObjective + Date: Thu, 26 Sep 2019 16:30:38 +0800 Subject: [PATCH 34/55] =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EcSetting/RequirementVsObjective/index.js | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/index.js b/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/index.js index cfd264cbe..e4a944d95 100644 --- a/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/index.js +++ b/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/index.js @@ -129,23 +129,29 @@ class RequirementVsObjective extends Component { console.log(columns, tableData) return ( -
    +
    - +
    +

    + 表示支撑 + 表示不支撑 +

    + +
    ); From d7008219e9eba7f5ed5326ee919ffa9cc14b3e25 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 26 Sep 2019 16:48:40 +0800 Subject: [PATCH 35/55] init --- .../EcSetting/RequirementVsObjective/index.js | 2 +- .../EcSetting/RequirementVsStandard/index.js | 128 ++++++++++++++++++ .../react/src/modules/ecs/EcSetting/index.js | 8 +- 3 files changed, 136 insertions(+), 2 deletions(-) create mode 100644 public/react/src/modules/ecs/EcSetting/RequirementVsStandard/index.js diff --git a/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/index.js b/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/index.js index e4a944d95..dfc4aa663 100644 --- a/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/index.js +++ b/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/index.js @@ -45,7 +45,7 @@ class RequirementVsObjective extends Component { constructor(props) { super(props) this.state={ - ...testState + // ...testState } } diff --git a/public/react/src/modules/ecs/EcSetting/RequirementVsStandard/index.js b/public/react/src/modules/ecs/EcSetting/RequirementVsStandard/index.js new file mode 100644 index 000000000..45ea17811 --- /dev/null +++ b/public/react/src/modules/ecs/EcSetting/RequirementVsStandard/index.js @@ -0,0 +1,128 @@ +import React, { Component } from 'react'; + +import classNames from 'classnames' + +import axios from 'axios'; + +import { Table, Divider, Tag, Checkbox, InputNumber, Spin, Icon } from 'antd'; +import SelectTable from '../RequirementVsObjective/SelectTable' +import update from 'immutability-helper' + +class RequirementVsObjective extends Component { + constructor(props) { + super(props) + this.state={ + + } + } + + componentDidMount(){ + // this.init() + // return; + + const yearId = this.props.match.params.yearId + const url = `/ec_years/${yearId}/requirement_support_objectives.json` + axios.get(url).then((response) => { + if (response.data.graduation_requirements) { + this.setState( {...response.data} , () => { + this.init() + }) + } + }).catch((e) => { + + }) + } + init = () => { + this.graduationRequirementsIdIndexMap = {} + this.trainingSubitemsIdIndexMap = {} + this.state.graduation_requirements.forEach((item, index) => { + this.graduationRequirementsIdIndexMap[item.id] = index + }) + this.state.training_subitems.forEach((item, index) => { + // 对应table的列数 + this.trainingSubitemsIdIndexMap[item.id] = index + 1 + }) + const tableData = [] + this.state.graduation_requirements.forEach((item, index) => { + tableData.push([item.content, ...Array(this.state.training_subitems.length)]) + }) + this.state.requirement_support_objectives.forEach(item => { + tableData[this.graduationRequirementsIdIndexMap[item.graduation_requirement_id]][this.trainingSubitemsIdIndexMap[item.training_subitem_id]] + = true + }) + this.setState({ tableData }) + } + onCellClick = (rowIndex, colIndex, select) => { + console.log( rowIndex, colIndex, select ) + const ec_graduation_requirement_id = this.state.graduation_requirements[rowIndex].id + const ec_training_subitem_id = this.state.training_subitems[colIndex - 1].id + const yearId = this.props.match.params.yearId + const url = `/ec_years/${yearId}/requirement_support_objectives.json` + const method = select ? axios.delete : axios.post + method(url, + select ? { + params: { + ec_graduation_requirement_id, + ec_training_subitem_id + } + } : { + ec_graduation_requirement_id, + ec_training_subitem_id + } + ).then((response) => { + if (response.data.status == 0) { + this.setState( + (prevState) => ({ + tableData : update(prevState.tableData, {[rowIndex]: {[colIndex]: {$set: select ? false : true}}}) + }) + ) + this.props.showNotification(`${select ? '取消' : '选择'}成功`) + } + }).catch((e) => { + + }) + if (select) { // 取消 + + } else { // 选择 + + } + } + render() { + const { match, history, current_user } = this.props + const { tableData, training_subitems, graduation_requirements, is_manager } = this.state + + const columns = training_subitems && [['毕业要求', '培养目标'], ...training_subitems.map(item => item.content)] + const columnIdIndexMap = {} + console.log(columns, tableData) + return ( + +
    + +
    +

    + 表示支撑 + 表示不支撑 +

    + +
    +
    + + ); + } +} + +export default (RequirementVsObjective) ; diff --git a/public/react/src/modules/ecs/EcSetting/index.js b/public/react/src/modules/ecs/EcSetting/index.js index ad3e4caf0..b4a388744 100644 --- a/public/react/src/modules/ecs/EcSetting/index.js +++ b/public/react/src/modules/ecs/EcSetting/index.js @@ -44,7 +44,10 @@ const RequirementVsObjective=Loadable({ loader: () => import('./RequirementVsObjective/index'), loading: Loading, }); - +const RequirementVsStandard=Loadable({ + loader: () => import('./RequirementVsStandard/index'), + loading: Loading, +}); class EcSetting extends React.Component { @@ -143,6 +146,9 @@ class EcSetting extends React.Component { {/* 毕业要求对培养目标的支撑 */} () }> + {/* 毕业要求对通用标准的支撑 */} + () }> {/*学生*/} Date: Thu, 26 Sep 2019 17:22:54 +0800 Subject: [PATCH 36/55] =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RequirementVsObjective/SelectTable.js | 4 +- .../EcSetting/RequirementVsStandard/index.js | 40 ++++++++++--------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/SelectTable.js b/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/SelectTable.js index 81021cf88..9e357aebd 100644 --- a/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/SelectTable.js +++ b/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/SelectTable.js @@ -31,7 +31,7 @@ class SelectTable extends Component { if (index == 0) return {columns[0][0]}{columns[0][1]}; return ( - 目标{index} + {this.props.columnName || '目标'}{index} ) })} @@ -45,7 +45,7 @@ class SelectTable extends Component { const cells = item.map((cell, colIndex) => { // placement="bottom" if(colIndex == 0) return - 指标点{rowIndex + 1} + 指标点{this.props.firstColIndexArray ? this.props.firstColIndexArray[rowIndex] : rowIndex + 1} return ( this.props.onCellClick(rowIndex, colIndex , !!cell)}> diff --git a/public/react/src/modules/ecs/EcSetting/RequirementVsStandard/index.js b/public/react/src/modules/ecs/EcSetting/RequirementVsStandard/index.js index 45ea17811..a1d652cf2 100644 --- a/public/react/src/modules/ecs/EcSetting/RequirementVsStandard/index.js +++ b/public/react/src/modules/ecs/EcSetting/RequirementVsStandard/index.js @@ -21,9 +21,9 @@ class RequirementVsObjective extends Component { // return; const yearId = this.props.match.params.yearId - const url = `/ec_years/${yearId}/requirement_support_objectives.json` + const url = `/ec_years/${yearId}/subitem_support_standards.json` axios.get(url).then((response) => { - if (response.data.graduation_requirements) { + if (response.data.graduation_subitems) { this.setState( {...response.data} , () => { this.init() }) @@ -35,39 +35,41 @@ class RequirementVsObjective extends Component { init = () => { this.graduationRequirementsIdIndexMap = {} this.trainingSubitemsIdIndexMap = {} - this.state.graduation_requirements.forEach((item, index) => { + this.state.graduation_subitems.forEach((item, index) => { this.graduationRequirementsIdIndexMap[item.id] = index }) - this.state.training_subitems.forEach((item, index) => { + this.state.graduation_standards.forEach((item, index) => { // 对应table的列数 this.trainingSubitemsIdIndexMap[item.id] = index + 1 }) const tableData = [] - this.state.graduation_requirements.forEach((item, index) => { - tableData.push([item.content, ...Array(this.state.training_subitems.length)]) + const firstColIndexArray = [] + this.state.graduation_subitems.forEach((item, index) => { + tableData.push([item.content, ...Array(this.state.graduation_standards.length)]) + firstColIndexArray.push(`${item.position}-${item.graduation_requirement_position}`) }) - this.state.requirement_support_objectives.forEach(item => { - tableData[this.graduationRequirementsIdIndexMap[item.graduation_requirement_id]][this.trainingSubitemsIdIndexMap[item.training_subitem_id]] + this.state.subitem_support_standards.forEach(item => { + tableData[this.graduationRequirementsIdIndexMap[item.graduation_subitem_id]][this.trainingSubitemsIdIndexMap[item.graduation_standard_id]] = true }) - this.setState({ tableData }) + this.setState({ tableData, firstColIndexArray }) } onCellClick = (rowIndex, colIndex, select) => { console.log( rowIndex, colIndex, select ) - const ec_graduation_requirement_id = this.state.graduation_requirements[rowIndex].id - const ec_training_subitem_id = this.state.training_subitems[colIndex - 1].id + const ec_graduation_subitem_id = this.state.graduation_subitems[rowIndex].id + const ec_graduation_standard_id = this.state.graduation_standards[colIndex - 1].id const yearId = this.props.match.params.yearId - const url = `/ec_years/${yearId}/requirement_support_objectives.json` + const url = `/ec_years/${yearId}/subitem_support_standards.json` const method = select ? axios.delete : axios.post method(url, select ? { params: { - ec_graduation_requirement_id, - ec_training_subitem_id + ec_graduation_subitem_id, + ec_graduation_standard_id } } : { - ec_graduation_requirement_id, - ec_training_subitem_id + ec_graduation_subitem_id, + ec_graduation_standard_id } ).then((response) => { if (response.data.status == 0) { @@ -89,9 +91,9 @@ class RequirementVsObjective extends Component { } render() { const { match, history, current_user } = this.props - const { tableData, training_subitems, graduation_requirements, is_manager } = this.state + const { tableData, graduation_standards, graduation_subitems, is_manager, firstColIndexArray } = this.state - const columns = training_subitems && [['毕业要求', '培养目标'], ...training_subitems.map(item => item.content)] + const columns = graduation_standards && [['毕业要求', '通用标准'], ...graduation_standards.map(item => item.content)] const columnIdIndexMap = {} console.log(columns, tableData) return ( @@ -116,7 +118,9 @@ class RequirementVsObjective extends Component {
    From 9bd98fb62d5ee4257dc62385f629b1f126d5fc1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 27 Sep 2019 09:14:40 +0800 Subject: [PATCH 37/55] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/ecs/curriculum/CurriculumSubpage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/ecs/curriculum/CurriculumSubpage.js b/public/react/src/modules/ecs/curriculum/CurriculumSubpage.js index a0df7f63b..a187e688d 100644 --- a/public/react/src/modules/ecs/curriculum/CurriculumSubpage.js +++ b/public/react/src/modules/ecs/curriculum/CurriculumSubpage.js @@ -16,7 +16,7 @@ class CurriculumSubpage extends Component { console.log(this.props.match.params); } Curriculumstructure=()=>{ - this.props.history.push(`/ecs/major_schools/${this.props.match.params.majorId}/years/${this.props.match.params.yearId}/subpage/courses`); + this.props.history.push(`/ecs/major_schools/${this.props.match.params.majorId}/years/${this.props.match.params.yearId}/subpage/courses/ec_course_support_setting/1`); } @@ -25,7 +25,7 @@ class CurriculumSubpage extends Component { // console.log(this.props); return (
    - this.Curriculumstructure()}>测试 + this.Curriculumstructure()}>点我进去课程体系
    ) } From 2e00d1413bf0ce6acf8ea295818a0327961ac021 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 27 Sep 2019 09:53:38 +0800 Subject: [PATCH 38/55] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/favicon.ico | Bin 0 -> 9049 bytes .../src/modules/ecs/curriculum/Curriculum.js | 1 + .../EcCompletionCalculation.js | 7 ++++--- .../EcCourseEvaluationsbottom.js | 16 +++++++++++----- .../subroute/ecCourseSupportSetting/index.js | 11 +++++++++-- 5 files changed, 25 insertions(+), 10 deletions(-) mode change 100644 => 100755 public/favicon.ico diff --git a/public/favicon.ico b/public/favicon.ico old mode 100644 new mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..05b9d163e5267afb1d933b189a1d6210fc2fe634 GIT binary patch literal 9049 zcmaKSbyOVB)-4G>1b2tQ-GW2rh#|Ab}7vxI=)! zEd+bye)o63_s6@h*XpjS?z8vV=hRuXdUbW8o{kzmfChkuhK8@9u59qoUOb#9I9LzY zh-itWhlbiu#njIb;^-F$@&ThMI6&;cOd1{_C$Iq+R!NH;~E2K^ABtsx7GPr37|%Q4jF} z8;0l@*@w8U#TEj;J13;Z8Z zrrLT;N)R6~lPJF!pS_TX1e3TVzmTY;gz!^dCSgG#F#$nI0imaSf~O#eQB z58iwn9Hk7DRsZelVI&K5_Ve?S5)cRs4CD_K;fMG*2?$9_N(u-H3kVDIJy`J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>m^{q{A&+%aSkVy8=q@xF*BW(8_AOtcZ}homh_i82z#W`<016n{~Poow*WCDLU#N zmJcOSIPgn|uC`}!C%&|!lKoiV==Z}?Um^?F=?}Plp$w54*AtxZN<6ZX%ZWT#P&;I2 zGGejQ1cc3Va5dPD7hZJiiOWT{!^9Dn&ayH(Scb6ls_GUjYa z@y}AOOyr{(=p?UrL>Spas21`jF%=y<*6JHG!uANHNCL>$)U45rKB+sjNxuCJf*$oW zcM&uj8YmZXf|6RY5pfL}pfv7nd&1`93FlKh+r&987g+y{D$Dn@t5vF^%V#07AIwFG z>e=H8ourA1E|8PN5{vXAt{8pS6UMR#-oaGdE5lrQk|K=ec>PO|F3pOn(rbW0bOxh#y3b*~H0JKAvyK(^H7 zom?p6b@NTS literal 0 HcmV?d00001 diff --git a/public/react/src/modules/ecs/curriculum/Curriculum.js b/public/react/src/modules/ecs/curriculum/Curriculum.js index f00589781..025f6740f 100644 --- a/public/react/src/modules/ecs/curriculum/Curriculum.js +++ b/public/react/src/modules/ecs/curriculum/Curriculum.js @@ -59,6 +59,7 @@ class Curriculum extends Component { // window.document.title = '课程达成评价结果'; } componentDidMount(){ + console.log("Curriculum"); console.log(this.props); } sync_course_data=()=>{ diff --git a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js index 4be7c11d3..7480d3b83 100644 --- a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js +++ b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js @@ -54,9 +54,9 @@ class EcCompletionCalculation extends Component { let ec_course_id =this.props.match.params.ec_course_id; this.UpdateClassData(true); const Url =`/ec_major_schools/get_navigation_data?ec_course_id=`+ec_course_id; - axios.get(Url, { - withCredentials: true, - }) + axios.get(Url, { + withCredentials: true, + }) .then((response) => { if(response.status===200){ // if(response.data.allow_visit===false){ @@ -71,6 +71,7 @@ class EcCompletionCalculation extends Component { .catch(function (error) { console.log(error); }); + this.props.Ontitine("competition_calculation_info"); } targetsget_navigation_data=(ec_year_id,ec_course_id)=>{ diff --git a/public/react/src/modules/ecs/subroute/ecCourseEvaluations/EcCourseEvaluationsbottom.js b/public/react/src/modules/ecs/subroute/ecCourseEvaluations/EcCourseEvaluationsbottom.js index 59a8a560e..afce608f8 100644 --- a/public/react/src/modules/ecs/subroute/ecCourseEvaluations/EcCourseEvaluationsbottom.js +++ b/public/react/src/modules/ecs/subroute/ecCourseEvaluations/EcCourseEvaluationsbottom.js @@ -56,6 +56,7 @@ class EcCourseEvaluationsbottom extends Component { if(newec_course_idbottom!=undefined){ // const url ='ec_courses/:course_id/course_targets.json'; // const url = `/ec_course_achievement_methods?ec_course_id=`+newec_course_idbottom; + const url =`/ec_courses/${course_id}/course_targets/course_achievement_methods.json`; axios.get(url, { withCredentials: true, }) @@ -114,8 +115,10 @@ class EcCourseEvaluationsbottom extends Component { }); } componentDidMount(){ - let ec_course_id=this.props.match.params.ec_course_id; - const url = `/ec_course_achievement_methods?ec_course_id=`+ec_course_id; + let ec_course_id=this.props.match.params.ec_course_id; + const course_id = 706 + const url =`/ec_courses/${course_id}/course_targets/course_achievement_methods.json`; + // const url = `/ec_course_achievement_methods?ec_course_id=`+course_id; axios.get(url, { withCredentials: true, }) @@ -129,10 +132,11 @@ class EcCourseEvaluationsbottom extends Component { console.log(error); }); - this.getNavigationData(ec_course_id); + // this.getNavigationData(ec_course_id); this.setState({ - newec_course_idbottom:ec_course_id + newec_course_idbottom:course_id }) + this.props.Ontitine("evaluation_methods"); } editecCourseEvaluationslist=(e)=>{ let id =e.target.getAttribute("target_id"); @@ -555,7 +559,9 @@ class EcCourseEvaluationsbottom extends Component { } - var Url = '/ec_course_achievement_methods/create_evaluation_methods'; + // var Url = '/ec_course_achievement_methods/create_evaluation_methods'; + var Url = '/ec_courses/:course_id/course_targets/:target_id/course_achievement_methods.json'; + axios.post(Url, { ec_course_target_id: newec_course_target_id, achievement_methods:achievement_methods diff --git a/public/react/src/modules/ecs/subroute/ecCourseSupportSetting/index.js b/public/react/src/modules/ecs/subroute/ecCourseSupportSetting/index.js index bb6c2f5d9..dd6a72fe9 100644 --- a/public/react/src/modules/ecs/subroute/ecCourseSupportSetting/index.js +++ b/public/react/src/modules/ecs/subroute/ecCourseSupportSetting/index.js @@ -109,6 +109,7 @@ class EcCourseSupportSetting extends Component { } fetchCourseTargets = () => { const ec_course_id = this.props.match.params.ec_course_id; + //这里给了一个默认的参数。。。。。。。。。。。。。 const course_id = 706 const url = `/ec_courses/${course_id}/course_targets.json` // `/ec_courses/${ec_course_id}/ec_course_support_setting_data` @@ -179,11 +180,17 @@ class EcCourseSupportSetting extends Component { }); } componentDidMount = () => { - console.log('componentDidMount ' + this.props) + // console.log('componentDidMountEcCourseSupportSetting'); + // console.log(this.props); + // console.log(this.props.match); + // console.log(this.props.match.params); + // console.log(this.props.match.params.ec_course_id); + this.fetchCourseTargets(); const ec_course_id = this.props.match.params.ec_course_id; - this.getNavigationData(ec_course_id) + this.getNavigationData(ec_course_id); + this.props.Ontitine("ec_course_support_setting"); } setEditableMode = (mode) => { From 611dc5d29c599f48625036fee67560d92b595bdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 27 Sep 2019 10:00:22 +0800 Subject: [PATCH 39/55] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EcCompletionCalculation.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js index 7480d3b83..05ec1805b 100644 --- a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js +++ b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js @@ -51,12 +51,13 @@ class EcCompletionCalculation extends Component { } componentDidMount(){ - let ec_course_id =this.props.match.params.ec_course_id; - this.UpdateClassData(true); - const Url =`/ec_major_schools/get_navigation_data?ec_course_id=`+ec_course_id; - axios.get(Url, { - withCredentials: true, - }) + // let ec_course_id =this.props.match.params.ec_course_id; + // this.UpdateClassData(true); + + // const url =`/ec_major_schools/get_navigation_data?ec_course_id=`+ec_course_id; + const ec_course_id=706; + const url =`/ec_courses/${ec_course_id}/evaluation.json`; + axios.get(url) .then((response) => { if(response.status===200){ // if(response.data.allow_visit===false){ From 2561d437a33f6843e710752e1c18d6b72568950b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 27 Sep 2019 10:17:05 +0800 Subject: [PATCH 40/55] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EcCompletionCalculation.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js index 05ec1805b..4525afe7e 100644 --- a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js +++ b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js @@ -268,11 +268,11 @@ class EcCompletionCalculation extends Component { this.setState({ Spintype:true }) - let {ec_course_id}=this.state; - const Orl =`/ec_courses/`+ec_course_id+`/sync_data`; - axios.get(Orl, { - withCredentials:true, - }) + // let {ec_course_id}=this.state; + const ec_course_id=706; + // const Orl =`/ec_courses/`+ec_course_id+`/sync_data`; + const Orl =`/ec_courses/${ec_course_id}/evaluation.json`; + axios.get(Orl) .then((response) => { if(response.data.status===1){ this.setState({ From 032e5dd3f264fc3692b470ba56efb34ae5ebf17b Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 27 Sep 2019 10:53:09 +0800 Subject: [PATCH 41/55] =?UTF-8?q?=E8=BF=99=E9=87=8C=E4=BC=9A=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=E5=BE=88=E9=95=BF=E7=9A=84=E5=AD=97=E7=AC=A6=E4=B8=B2?= =?UTF-8?q?=EF=BC=8C=E5=A6=82=E6=9E=9C=E4=B8=8D=E6=8A=98=E8=A1=8C=E4=BC=9A?= =?UTF-8?q?=E5=BD=B1=E5=93=8D=E9=98=85=E8=AF=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/educoder/edu-all.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css index c20b648db..0b3f53503 100644 --- a/public/stylesheets/educoder/edu-all.css +++ b/public/stylesheets/educoder/edu-all.css @@ -3739,7 +3739,8 @@ a.singlepublishtwo{ } .ant-tooltip{ - max-width: 100% !important; + /* 这里会存在很长的字符串,如果不折行会影响阅读 */ + max-width: 600px !important; } .square-main p{ From c08eaf8012912e7284c586eaa4fe5f0cb85e3d03 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 27 Sep 2019 11:01:43 +0800 Subject: [PATCH 42/55] =?UTF-8?q?=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/ecs/EcSetting/RequirementVsObjective/index.js | 2 ++ .../src/modules/ecs/EcSetting/RequirementVsStandard/index.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/index.js b/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/index.js index dfc4aa663..ce78eb54f 100644 --- a/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/index.js +++ b/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/index.js @@ -140,6 +140,8 @@ class RequirementVsObjective extends Component {

  • + 导出矩阵

    diff --git a/public/react/src/modules/ecs/EcSetting/RequirementVsStandard/index.js b/public/react/src/modules/ecs/EcSetting/RequirementVsStandard/index.js index a1d652cf2..dbc40a621 100644 --- a/public/react/src/modules/ecs/EcSetting/RequirementVsStandard/index.js +++ b/public/react/src/modules/ecs/EcSetting/RequirementVsStandard/index.js @@ -109,6 +109,8 @@ class RequirementVsObjective extends Component {

    + 导出矩阵

    From 9594cd31e85759138044197bce56c04a826a0165 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sun, 29 Sep 2019 14:27:34 +0800 Subject: [PATCH 43/55] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EcCompletionCalculation.js | 50 ++++++++++++------- .../EcCourseEvaluationsbottom.js | 16 +++--- 2 files changed, 40 insertions(+), 26 deletions(-) diff --git a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js index 4525afe7e..65cac4540 100644 --- a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js +++ b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js @@ -56,17 +56,28 @@ class EcCompletionCalculation extends Component { // const url =`/ec_major_schools/get_navigation_data?ec_course_id=`+ec_course_id; const ec_course_id=706; - const url =`/ec_courses/${ec_course_id}/evaluation.json`; + const url =`/ec_courses/${ec_course_id}/evaluation.json`; axios.get(url) .then((response) => { if(response.status===200){ // if(response.data.allow_visit===false){ // window.location.href="/403" // } - this.setState({ - schooldata:response.data, - ec_course_id:ec_course_id - }) + + this.setState({ + schooldata:response.data, + ec_course_id:ec_course_id, + // evaluate_result:response.data.evaluate_result, + // course_total_score:response.data.course_total_score[response.data.course_total_score.length-1].total_rate, + // total_rate_data:response.data.course_total_score[response.data.course_total_score.length-1].total_rate.length, + // graduation_list:response.data.graduation_list, + target_list:response.data.course_targets, + // target_score:response.data.target_score, + ec_course_targets_count:response.data.graduation_subitem_evaluations, + // morelisttype:newmorelisttype, + // course_total_scoreaverage:course_total_scoreaverage, + // ismanager:response.data.is_manager + }) } }) .catch(function (error) { @@ -103,10 +114,11 @@ class EcCompletionCalculation extends Component { } UpdateClassData=(key)=>{ let {calculatetype} =this.state; - let ec_course_id =this.props.match.params.ec_course_id; + // let ec_course_id =this.props.match.params.ec_course_id; this.setState({ ec_course_id:ec_course_id }) + const ec_course_id=706; const Arl =`/ec_courses/`+ec_course_id+`/calculation_info_data`; axios.get(Arl, { withCredentials: true, @@ -140,16 +152,16 @@ class EcCompletionCalculation extends Component { } this.setState({ - evaluate_result:response.data.evaluate_result, - course_total_score:response.data.course_total_score[response.data.course_total_score.length-1].total_rate, - total_rate_data:response.data.course_total_score[response.data.course_total_score.length-1].total_rate.length, - graduation_list:response.data.graduation_list, - target_list:response.data.target_list, - target_score:response.data.target_score, - ec_course_targets_count:response.data.ec_course_targets_count, - morelisttype:newmorelisttype, - course_total_scoreaverage:course_total_scoreaverage, - ismanager:response.data.is_manager + // evaluate_result:response.data.evaluate_result, + // course_total_score:response.data.course_total_score[response.data.course_total_score.length-1].total_rate, + // total_rate_data:response.data.course_total_score[response.data.course_total_score.length-1].total_rate.length, + // graduation_list:response.data.graduation_list, + target_list:response.data.course_targets, + // target_score:response.data.target_score, + ec_course_targets_count:response.data.graduation_subitem_evaluations, + // morelisttype:newmorelisttype, + // course_total_scoreaverage:course_total_scoreaverage, + // ismanager:response.data.is_manager }) @@ -513,10 +525,10 @@ class EcCompletionCalculation extends Component {

  • {key+1} {item.content} - {item.result} + {item.status==="not_achieved"?"未达成":"已达成"} {item.standard_grade} - {item.real_grade} - {item.weigths} + {item.actually_grade} + {item.weight}
  • ) diff --git a/public/react/src/modules/ecs/subroute/ecCourseEvaluations/EcCourseEvaluationsbottom.js b/public/react/src/modules/ecs/subroute/ecCourseEvaluations/EcCourseEvaluationsbottom.js index afce608f8..ae09b7886 100644 --- a/public/react/src/modules/ecs/subroute/ecCourseEvaluations/EcCourseEvaluationsbottom.js +++ b/public/react/src/modules/ecs/subroute/ecCourseEvaluations/EcCourseEvaluationsbottom.js @@ -117,8 +117,9 @@ class EcCourseEvaluationsbottom extends Component { componentDidMount(){ let ec_course_id=this.props.match.params.ec_course_id; const course_id = 706 - const url =`/ec_courses/${course_id}/course_targets/course_achievement_methods.json`; - // const url = `/ec_course_achievement_methods?ec_course_id=`+course_id; + const url =`/ec_courses/${course_id}/course_targets/with_achievement_methods.json`; + // /ec_courses//course_targets/course_achievement_methods.json + // const url = `/ec_course_achievement_methods?ec_course_id=`+course_id; axios.get(url, { withCredentials: true, }) @@ -432,7 +433,8 @@ class EcCourseEvaluationsbottom extends Component { EvaluationsSaveonloadgetdata=(id)=>{ - const url = `/ec_course_achievement_methods?ec_course_id=`+id + const course_id = 706; + const url = `/ec_courses/${course_id}/course_targets/with_achievement_methods.json`; axios.get(url, { withCredentials: true, }) @@ -775,7 +777,7 @@ class EcCourseEvaluationsbottom extends Component { { item.target_evaluate_data.length===0?
  • -
    +
    {key+1} @@ -787,7 +789,7 @@ class EcCourseEvaluationsbottom extends Component {
    - +
    @@ -806,9 +808,9 @@ class EcCourseEvaluationsbottom extends Component { {/* 修改start*/}
    -
    +
    {/*
    */} -
    +
    {/* 课程目标{sequenceid}:{ec_course_target_name} */} 课程目标{key+1}:{ec_course_target_name} From 9f4ac8147a7b3daeb580ae64eecbaa29333dbda6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sun, 29 Sep 2019 16:09:21 +0800 Subject: [PATCH 44/55] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/ecs/EcSetting/index.js | 2 -- .../EcCompletionCalculation.js | 13 +++++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/ecs/EcSetting/index.js b/public/react/src/modules/ecs/EcSetting/index.js index b4a388744..0c6d1ab88 100644 --- a/public/react/src/modules/ecs/EcSetting/index.js +++ b/public/react/src/modules/ecs/EcSetting/index.js @@ -162,8 +162,6 @@ class EcSetting extends React.Component { {/*课程体系VS毕业要求*/} () }> - - {/*达成度评价结果*/} () }> diff --git a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js index 65cac4540..be2a46145 100644 --- a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js +++ b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js @@ -70,10 +70,10 @@ class EcCompletionCalculation extends Component { // evaluate_result:response.data.evaluate_result, // course_total_score:response.data.course_total_score[response.data.course_total_score.length-1].total_rate, // total_rate_data:response.data.course_total_score[response.data.course_total_score.length-1].total_rate.length, - // graduation_list:response.data.graduation_list, + graduation_list:response.data.graduation_subitem_evaluations, target_list:response.data.course_targets, // target_score:response.data.target_score, - ec_course_targets_count:response.data.graduation_subitem_evaluations, + // ec_course_targets_count:response.data.graduation_subitem_evaluations, // morelisttype:newmorelisttype, // course_total_scoreaverage:course_total_scoreaverage, // ismanager:response.data.is_manager @@ -155,10 +155,10 @@ class EcCompletionCalculation extends Component { // evaluate_result:response.data.evaluate_result, // course_total_score:response.data.course_total_score[response.data.course_total_score.length-1].total_rate, // total_rate_data:response.data.course_total_score[response.data.course_total_score.length-1].total_rate.length, - // graduation_list:response.data.graduation_list, + graduation_list:response.data.graduation_subitem_evaluations, target_list:response.data.course_targets, // target_score:response.data.target_score, - ec_course_targets_count:response.data.graduation_subitem_evaluations, + //ec_course_targets_count:response.data.graduation_subitem_evaluations, // morelisttype:newmorelisttype, // course_total_scoreaverage:course_total_scoreaverage, // ismanager:response.data.is_manager @@ -495,7 +495,7 @@ class EcCompletionCalculation extends Component { {/* */} {/*
    */} {/*
    */} - + {/*课程目标*/}

    @@ -537,7 +537,7 @@ class EcCompletionCalculation extends Component {

    - + {/*毕业要求指标点达成评价结果*/}
    @@ -620,6 +620,7 @@ class EcCompletionCalculation extends Component { }
    + {/*课程总评成绩表*/}
    From 1d1e56731e994f9187ca7ce3e012d27dc2d8c358 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sun, 29 Sep 2019 17:59:37 +0800 Subject: [PATCH 45/55] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/ecs/css/ecCourseEvaluations.css | 16 +++++-- .../src/modules/ecs/css/ecCourseSupports.css | 4 ++ .../EcCompletionCalculation.js | 42 ++++++++++--------- 3 files changed, 40 insertions(+), 22 deletions(-) diff --git a/public/react/src/modules/ecs/css/ecCourseEvaluations.css b/public/react/src/modules/ecs/css/ecCourseEvaluations.css index f27ad7313..1b75574a1 100644 --- a/public/react/src/modules/ecs/css/ecCourseEvaluations.css +++ b/public/react/src/modules/ecs/css/ecCourseEvaluations.css @@ -246,12 +246,22 @@ input{ padding: 10px 0px !important; margin: 0px 20px !important; } - +.newSystem .newtarget_scoreclassysl{ + padding: 10px 0px !important; +} +.mynewtarget_scoreclassysls{ + padding: 10px 20px!important; +} .newSystem .newtarget_target{ padding: 10px 0px !important; margin: 0px 30px !important; border-bottom:1px solid transparent !important; } +.newSystem .newtarget_targets{ + padding: 10px 0px !important; + + border-bottom:1px solid transparent !important; +} .nowrap329{ max-width: 329px !important; @@ -263,9 +273,9 @@ input{ min-width: 329px !important; } .ListTableLine li>.column-500{ - max-width: 360px !important; + max-width: 310px !important; text-align: left; - min-width: 360px !important; + min-width: 310px !important; } .color-666{ color:#666666 !important; diff --git a/public/react/src/modules/ecs/css/ecCourseSupports.css b/public/react/src/modules/ecs/css/ecCourseSupports.css index 10b6ebd91..5f53aa0f8 100644 --- a/public/react/src/modules/ecs/css/ecCourseSupports.css +++ b/public/react/src/modules/ecs/css/ecCourseSupports.css @@ -234,6 +234,10 @@ input{ .color-05101A{ color:#05101A !important; } +/*边框*/ +bordertopsolid{ + border:1px solid #000; + } .ec_graduation_name{ margin-right:20px !important; } diff --git a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js index be2a46145..e33037d15 100644 --- a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js +++ b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js @@ -526,7 +526,7 @@ class EcCompletionCalculation extends Component { {key+1} {item.content} {item.status==="not_achieved"?"未达成":"已达成"} - {item.standard_grade} + {item.standard_grade} {item.actually_grade} {item.weight}
  • @@ -547,7 +547,7 @@ class EcCompletionCalculation extends Component {
    -
    +
    { graduation_list.length===0? @@ -599,25 +599,29 @@ class EcCompletionCalculation extends Component { }):"" } - - { - Spintype===false?graduation_list.map((item,key)=>{ +
    + { + Spintype===false?graduation_list.map((item,key)=>{ - return( -
  • 5 ? (76*(ec_course_targets_count+4)+380):1200+"px"}}> - {/* {item.ec_graduation_name} */} - {key+1} - {item.ec_subitem_content} - {item.result} - {item.reach_target===null?0:item.reach_target} - {item.reach_real_target===null?0:item.reach_real_target} - {item.weight===null||item.weight===0?立即配置:{item.weight}} - {TargetresContentList(ec_course_targets_count,item.target_position)} -
  • - ) + return( +
  • 5 ? (76*(ec_course_targets_count+4)+380):1160+"px"}}> + {/* {item.ec_graduation_name} */} + {key+1} + {item.content} + {item.status==="not_achieved"?"未完成":"完成"} + {item.objective_achievement===null?0:item.objective_achievement} + {item.actually_achievement===null?0:item.actually_achievement} + {item.weights===null||item.weights===0?立即配置:{item.weights}} + {TargetresContentList(ec_course_targets_count,item.target_position)} +
  • + ) + + }):"" + } + + +
    - }):"" - }
    {/*课程总评成绩表*/} From a25b193015f671c7319eca96199a148e14168c61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 30 Sep 2019 10:13:16 +0800 Subject: [PATCH 46/55] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EcCompletionCalculation.js | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js index e33037d15..bbb810429 100644 --- a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js +++ b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js @@ -547,7 +547,7 @@ class EcCompletionCalculation extends Component {
    -
    +
    { graduation_list.length===0? @@ -604,16 +604,28 @@ class EcCompletionCalculation extends Component { Spintype===false?graduation_list.map((item,key)=>{ return( -
  • 5 ? (76*(ec_course_targets_count+4)+380):1160+"px"}}> - {/* {item.ec_graduation_name} */} + +

    5 ? (76*(ec_course_targets_count+4)+380+15):1200+"px"}}> {key+1} {item.content} {item.status==="not_achieved"?"未完成":"完成"} - {item.objective_achievement===null?0:item.objective_achievement} - {item.actually_achievement===null?0:item.actually_achievement} - {item.weights===null||item.weights===0?立即配置:{item.weights}} + {item.objective_achievement===null?0:item.objective_achievement} + {item.actually_achievement===null?0:item.actually_achievement} + {item.weights===null||item.weights===0?立即配置:{item.weights}} {TargetresContentList(ec_course_targets_count,item.target_position)} -

  • +

    + + + //
  • 5 ? (76*(ec_course_targets_count+4)+380):1200+"px"}}> + // {/* {item.ec_graduation_name} */} + // {key+1} + // {item.content} + // {item.status==="not_achieved"?"未完成":"完成"} + // {item.objective_achievement===null?0:item.objective_achievement} + // {item.actually_achievement===null?0:item.actually_achievement} + // {item.weights===null||item.weights===0?立即配置:{item.weights}} + // {TargetresContentList(ec_course_targets_count,item.target_position)} + //
  • ) }):"" From cef1ca9799abe87fb671bf53caf480fa14033cba 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, 2 Oct 2019 12:44:48 +0800 Subject: [PATCH 47/55] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/ecs/css/ecCourseEvaluations.css | 9 +- .../EcCompletionCalculation.js | 244 +++++++++++------- 2 files changed, 160 insertions(+), 93 deletions(-) diff --git a/public/react/src/modules/ecs/css/ecCourseEvaluations.css b/public/react/src/modules/ecs/css/ecCourseEvaluations.css index 1b75574a1..8c8452b43 100644 --- a/public/react/src/modules/ecs/css/ecCourseEvaluations.css +++ b/public/react/src/modules/ecs/css/ecCourseEvaluations.css @@ -9,7 +9,12 @@ font-family:MicrosoftYaHei; font-weight:400; color:#05101A !important; + +} +.marginleft76{ + margin-left: 76px; } + #SystemParameters{ height: 81px; line-height: 40px; @@ -273,9 +278,9 @@ input{ min-width: 329px !important; } .ListTableLine li>.column-500{ - max-width: 310px !important; + max-width: 366px !important; text-align: left; - min-width: 310px !important; + min-width: 366px !important; } .color-666{ color:#666666 !important; diff --git a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js index bbb810429..04250c19e 100644 --- a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js +++ b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js @@ -42,7 +42,11 @@ class EcCompletionCalculation extends Component { course_total_scoreaverage:0, calculatesetype:false, Spintype:false, - ismanager:false + ismanager:false, + course_achievement:"--", + course_rate:"--", + score_levels:[], + score_levelsdata:[], } } @@ -73,11 +77,18 @@ class EcCompletionCalculation extends Component { graduation_list:response.data.graduation_subitem_evaluations, target_list:response.data.course_targets, // target_score:response.data.target_score, - // ec_course_targets_count:response.data.graduation_subitem_evaluations, + ec_course_targets_count:response.data.course_targets.length, + course_achievement:response.data.course_achievement, + course_rate:response.data.course_rate, + score_levels:response.data.score_levels, + // score_levelsdata:response.data.course_targets.score_levels, // morelisttype:newmorelisttype, // course_total_scoreaverage:course_total_scoreaverage, // ismanager:response.data.is_manager }) + // console.log("componentDidMount"); + // console.log(response.data.score_levels); + // console.log(response.data.course_targets.score_levels); } }) .catch(function (error) { @@ -158,13 +169,23 @@ class EcCompletionCalculation extends Component { graduation_list:response.data.graduation_subitem_evaluations, target_list:response.data.course_targets, // target_score:response.data.target_score, - //ec_course_targets_count:response.data.graduation_subitem_evaluations, + ec_course_targets_count:response.data.course_targets.length, + course_achievement:response.data.course_achievement, + course_rate:response.data.course_rate, + score_levels:response.data.score_levels, + // score_levelsdata:, // morelisttype:newmorelisttype, // course_total_scoreaverage:course_total_scoreaverage, // ismanager:response.data.is_manager - }) - - + }); + // console.log("componentDidMount"); + // console.log(response.data.score_levels_map); + // Object.getOwnPropertyNames(response.data.score_levels_map).forEach(function(val) { + // console.log("正在循环"); + // console.log(val); + // }); + console.log(response.data.course_targets.score_levels); + // ec_course_targets:response.data.ec_course_targets, this.targetsget_navigation_data(response.data.ec_year_id,ec_course_id) if(calculatetype===true){ @@ -309,14 +330,14 @@ class EcCompletionCalculation extends Component { }) } render() { - let {Spintype,calculatesetype,ec_course_id,course_total_scoreaverage,ec_course_targets_count,schooldata,ecComponentState,course_total_score,total_rate_data,ec_course_targets,graduation_list,target_list,target_score,evaluate_result,morelisttype,titlemessage,completiontype,completionlist,ismanager} = this.state; + let {Spintype,calculatesetype,ec_course_id,course_total_scoreaverage,score_levels,ec_course_targets_count,course_achievement,schooldata,course_rate,ecComponentState,course_total_score,total_rate_data,ec_course_targets,graduation_list,target_list,target_score,evaluate_result,morelisttype,titlemessage,completiontype,completionlist,ismanager} = this.state; let TargetresList = (length) => { let target_listres = []; for(let i = 0; i < length; i++) { // target_listres.push(目标{length-i}) // target_listres.push(目标{i+1}) - target_listres.push(目标{length-i}) + target_listres.push(目标{i+1}) } return target_listres } @@ -325,28 +346,30 @@ class EcCompletionCalculation extends Component { let target_listress = []; for(let i = 0; i < length; i++) { // target_listres.push(目标{length-i}) - target_listress.push(目标{i+1}) + target_listress.push(目标{i+1}) // target_listres.push(目标{length-i}) } return target_listress } - let TargetresContentList = (length,value) => { - let target_listres = []; - if(value!=undefined){ - for(let i = 0; i < length; i++) { - - if(value[i]===1){ - target_listres.push() - }else{ - target_listres.push() - } - - } - target_listres.reverse() - return target_listres - } - } + let TargetresContentList = (data,value) => { + let target_listres = []; + if(data){ + if(data.length>0){ + for(var i=0;i) + } else{ + target_listres.push() + + } + } + } + } + // target_listres.reverse() + return target_listres + }; @@ -407,7 +430,9 @@ class EcCompletionCalculation extends Component { } return target_listres } - } + }; + // console.log(ec_course_targets_count); + // console.log("EcCompletionCalculation"); return (
    毕业要求 {5} + 达成结果 达成目标值 达成实际值 @@ -579,41 +605,75 @@ class EcCompletionCalculation extends Component { :"" } + { Spintype===false?graduation_list.map((item,key)=>{ if(key===0){ return( -

    5 ? (76*(ec_course_targets_count+4)+380+15):1200+"px"}}> - 毕业要求 - {item.ec_subitem_content} - 达成结果 - 达成目标值 - 达成实际值 - 课程权重 +

  • 5 ? (76*(ec_course_targets_count+4)+380+15):1200+"px"}}> +
    + 毕业要求 +
    + {item.ec_subitem_content} +
    {TargetresList(ec_course_targets_count)} -

    +
    +
    + 达成结果 + 达成目标值 + 达成实际值 + 课程权重 +
    +
  • ) } }):"" } - -
    + {/*mynewtarget_scoreclassysls*/} + +
    { Spintype===false?graduation_list.map((item,key)=>{ return( -

    5 ? (76*(ec_course_targets_count+4)+380+15):1200+"px"}}> - {key+1} +

  • 5 ? (76*(ec_course_targets_count+4)+380+15):1200+"px"}}> +
    + {key+1} +
    {item.content} - {item.status==="not_achieved"?"未完成":"完成"} - {item.objective_achievement===null?0:item.objective_achievement} - {item.actually_achievement===null?0:item.actually_achievement} - {item.weights===null||item.weights===0?立即配置:{item.weights}} - {TargetresContentList(ec_course_targets_count,item.target_position)} -

    +
    + {TargetresContentList(target_list,item.support_course_target_ids)} +
    +
    + {item.weights===null||item.weights===0?立即配置:{item.weights}} + {item.actually_achievement===null?0:item.actually_achievement} + {item.objective_achievement===null?0:item.objective_achievement} + {item.status==="not_achieved"?"未完成":"完成"} +
    +
  • //
  • 5 ? (76*(ec_course_targets_count+4)+380):1200+"px"}}> @@ -683,9 +743,9 @@ class EcCompletionCalculation extends Component { {/* 平均数 */} {/* 平均数 */} {Total_rate_dataList(course_total_score)} - { - course_total_score.length===0? --:"" - } + { + course_rate===undefined||course_rate===null||course_rate===""||course_rate==="0"||course_rate===0? --:{course_rate} + }
  • :"" } {/*style={{width: 113*(total_rate_data+4)>1136?113*(total_rate_data+4):1136+"px"}}*/} @@ -718,7 +778,7 @@ class EcCompletionCalculation extends Component { {newTotal_rate_dataList(course_total_score-1,course_total_score)} {/* {course_total_score.length===0?"":course_total_score[course_total_score-1].total_score} */} { - course_total_score.length===0? --:{course_total_scoreaverage} + course_achievement===undefined||course_achievement===null||course_achievement===""||course_achievement==="0"||course_achievement===0? --:{course_achievement} } :"" } @@ -747,23 +807,24 @@ class EcCompletionCalculation extends Component { 平均分 最高分数 最低分数 - 90分以上 - 80-89分 - 70-79分 - 60-69分 - 50-59分 - 低于50分 + { + score_levels&&score_levels.map((i,k)=>{ + return( + {i.description} + ) + }) + }

    { - Spintype===false?target_score.map((i,k)=>{ + Spintype===false?target_list.map((i,k)=>{ return(
  • {k+1} - {i.average_score} - {i.top_score} - {i.low_score} + {i.standard_grade} + {i.maximum_score} + {i.minimum_score}
    {i.from90[0]}人
    {(i.from90[1]).toFixed(2)}%
    @@ -788,45 +849,46 @@ class EcCompletionCalculation extends Component {
    {i.from_down[0]}人
    {(i.from_down[1]).toFixed(2)}%
    +
  • ) }):"" } - { Spintype===true?}/>:"" } - - {target_score.length===0&&Spintype===false? -
  • - -- - -- - -- - -- - -
    --人
    -
    --%
    -
    - -
    --人
    -
    --%
    -
    - -
    --人
    -
    --%
    -
    - -
    --人
    -
    --%
    -
    - -
    --人
    -
    --%
    -
    - -
    --人
    -
    --%
    -
    -
  • :""} + {/*{ Spintype===true?}/>:"" }*/} + + {/*{target_list.length===0&&Spintype===false?*/} + {/*
  • */} + {/*--*/} + {/*--*/} + {/*--*/} + {/*--*/} + {/**/} + {/*
    --人
    */} + {/*
    --%
    */} + {/*
    */} + {/**/} + {/*
    --人
    */} + {/*
    --%
    */} + {/*
    */} + {/**/} + {/*
    --人
    */} + {/*
    --%
    */} + {/*
    */} + {/**/} + {/*
    --人
    */} + {/*
    --%
    */} + {/*
    */} + {/**/} + {/*
    --人
    */} + {/*
    --%
    */} + {/*
    */} + {/**/} + {/*
    --人
    */} + {/*
    --%
    */} + {/*
    */} + {/*
  • :""}*/}
    From 0bbc6a2e28a9c888d617eef5e1e6e3aa0d713e6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 8 Oct 2019 09:05:48 +0800 Subject: [PATCH 48/55] =?UTF-8?q?=E8=87=AA=E5=B7=B1=E7=89=88=E6=9C=AC?= =?UTF-8?q?=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 | 2 +- .../EcCompletionCalculation.js | 78 +++++++++---------- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/public/react/config/webpack.config.dev.js b/public/react/config/webpack.config.dev.js index ef38a18f8..fe525154f 100644 --- a/public/react/config/webpack.config.dev.js +++ b/public/react/config/webpack.config.dev.js @@ -32,7 +32,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/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js index 04250c19e..bc559d6ea 100644 --- a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js +++ b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js @@ -816,45 +816,45 @@ class EcCompletionCalculation extends Component { }

    - { - Spintype===false?target_list.map((i,k)=>{ - - return( -
  • - {k+1} - {i.standard_grade} - {i.maximum_score} - {i.minimum_score} - -
    {i.from90[0]}人
    -
    {(i.from90[1]).toFixed(2)}%
    -
    - -
    {i.from80[0]}人
    -
    {(i.from80[1]).toFixed(2)}%
    -
    - -
    {i.from70[0]}人
    -
    {(i.from70[1]).toFixed(2)}%
    -
    - -
    {i.from60[0]}人
    -
    {(i.from60[1]).toFixed(2)}%
    -
    - -
    {i.from50[0]}人
    -
    {(i.from50[1]).toFixed(2)}%
    -
    - -
    {i.from_down[0]}人
    -
    {(i.from_down[1]).toFixed(2)}%
    -
    - -
  • - ) - - }):"" - } + {/*{*/} + {/* Spintype===false?target_list.map((i,k)=>{*/} + + {/* return(*/} + {/*
  • */} + {/* {k+1}*/} + {/* {i.standard_grade}*/} + {/* {i.maximum_score}*/} + {/* {i.minimum_score}*/} + {/* */} + {/*
    {i.from90[0]}人
    */} + {/*
    {(i.from90[1]).toFixed(2)}%
    */} + {/*
    */} + {/* */} + {/*
    {i.from80[0]}人
    */} + {/*
    {(i.from80[1]).toFixed(2)}%
    */} + {/*
    */} + {/* */} + {/*
    {i.from70[0]}人
    */} + {/*
    {(i.from70[1]).toFixed(2)}%
    */} + {/*
    */} + {/* */} + {/*
    {i.from60[0]}人
    */} + {/*
    {(i.from60[1]).toFixed(2)}%
    */} + {/*
    */} + {/* */} + {/*
    {i.from50[0]}人
    */} + {/*
    {(i.from50[1]).toFixed(2)}%
    */} + {/*
    */} + {/* */} + {/*
    {i.from_down[0]}人
    */} + {/*
    {(i.from_down[1]).toFixed(2)}%
    */} + {/*
    */} + + {/*
  • */} + {/* )*/} + + {/* }):""*/} + {/*}*/} {/*{ Spintype===true?}/>:"" }*/} From 5892c28916659822d2751b553862a9a778b9204e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 8 Oct 2019 09:43:11 +0800 Subject: [PATCH 49/55] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EcCompletionCalculation.js | 138 ++++++++++-------- 1 file changed, 76 insertions(+), 62 deletions(-) diff --git a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js index bc559d6ea..82912f406 100644 --- a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js +++ b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js @@ -184,7 +184,7 @@ class EcCompletionCalculation extends Component { // console.log("正在循环"); // console.log(val); // }); - console.log(response.data.course_targets.score_levels); + // console.log(response.data.course_targets.score_levels); // ec_course_targets:response.data.ec_course_targets, this.targetsget_navigation_data(response.data.ec_year_id,ec_course_id) @@ -816,79 +816,93 @@ class EcCompletionCalculation extends Component { }

    - {/*{*/} - {/* Spintype===false?target_list.map((i,k)=>{*/} - - {/* return(*/} - {/*
  • */} - {/* {k+1}*/} - {/* {i.standard_grade}*/} - {/* {i.maximum_score}*/} - {/* {i.minimum_score}*/} - {/* */} - {/*
    {i.from90[0]}人
    */} - {/*
    {(i.from90[1]).toFixed(2)}%
    */} - {/*
    */} - {/* */} - {/*
    {i.from80[0]}人
    */} - {/*
    {(i.from80[1]).toFixed(2)}%
    */} - {/*
    */} - {/* */} - {/*
    {i.from70[0]}人
    */} - {/*
    {(i.from70[1]).toFixed(2)}%
    */} - {/*
    */} - {/* */} - {/*
    {i.from60[0]}人
    */} - {/*
    {(i.from60[1]).toFixed(2)}%
    */} - {/*
    */} - {/* */} - {/*
    {i.from50[0]}人
    */} - {/*
    {(i.from50[1]).toFixed(2)}%
    */} - {/*
    */} - {/* */} - {/*
    {i.from_down[0]}人
    */} - {/*
    {(i.from_down[1]).toFixed(2)}%
    */} - {/*
    */} - - {/*
  • */} - {/* )*/} - - {/* }):""*/} - {/*}*/} - - {/*{ Spintype===true?}/>:"" }*/} - - {/*{target_list.length===0&&Spintype===false?*/} - {/*
  • */} - {/*--*/} - {/*--*/} - {/*--*/} - {/*--*/} + { + Spintype===false?target_list.map((i,k)=>{ + + return( +
  • + {k+1} + {i.standard_grade} + {i.maximum_score===null || i.maximum_score===undefined ||i.maximum_score===""?"--":i.maximum_score} + {i.minimum_score===null || i.minimum_score===undefined || i.minimum_score===""?"--":i.minimum_score} + { + i.score_levels.map((j,l)=>{ + + return( + +
    {j.count}人
    +
    {j.rate===null||j.rate===undefined||j.rate===""||j.rate===0?0.00:j.rate}%
    +
    + ) + } + ) + } + + {/*}*/} {/**/} - {/*
    --人
    */} - {/*
    --%
    */} + {/*
    {i.from90[0]}人
    */} + {/*
    {(i.from90[1]).toFixed(2)}%
    */} {/*
    */} {/**/} - {/*
    --人
    */} - {/*
    --%
    */} + {/*
    {i.from80[0]}人
    */} + {/*
    {(i.from80[1]).toFixed(2)}%
    */} {/*
    */} {/**/} - {/*
    --人
    */} - {/*
    --%
    */} + {/*
    {i.from70[0]}人
    */} + {/*
    {(i.from70[1]).toFixed(2)}%
    */} {/*
    */} {/**/} - {/*
    --人
    */} - {/*
    --%
    */} + {/*
    {i.from60[0]}人
    */} + {/*
    {(i.from60[1]).toFixed(2)}%
    */} {/*
    */} {/**/} - {/*
    --人
    */} - {/*
    --%
    */} + {/*
    {i.from50[0]}人
    */} + {/*
    {(i.from50[1]).toFixed(2)}%
    */} {/*
    */} {/**/} - {/*
    --人
    */} - {/*
    --%
    */} + {/*
    {i.from_down[0]}人
    */} + {/*
    {(i.from_down[1]).toFixed(2)}%
    */} {/*
    */} - {/*
  • :""}*/} + + + ) + + }):"" + } + + { Spintype===true?}/>:"" } + + {target_list.length===0&&Spintype===false? +
  • + -- + -- + -- + -- + +
    --人
    +
    --%
    +
    + +
    --人
    +
    --%
    +
    + +
    --人
    +
    --%
    +
    + +
    --人
    +
    --%
    +
    + +
    --人
    +
    --%
    +
    + +
    --人
    +
    --%
    +
    +
  • :""}
    From 107909bdb39cd719134aa2bf563797831e33987e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 8 Oct 2019 10:41:07 +0800 Subject: [PATCH 50/55] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ecCompletion_calculation/EcCompletionCalculation.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js index 82912f406..a0744cc6c 100644 --- a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js +++ b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js @@ -630,10 +630,10 @@ class EcCompletionCalculation extends Component { {TargetresList(ec_course_targets_count)}
    - 达成结果 + 课程权重 达成目标值 达成实际值 - 课程权重 + 达成结果
    ) From 720e8c9403947d5b77963ecabfe8752f79cda5d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 8 Oct 2019 10:56:19 +0800 Subject: [PATCH 51/55] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ecCompletion_calculation/EcCompletionCalculation.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js index a0744cc6c..b99131754 100644 --- a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js +++ b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js @@ -47,6 +47,7 @@ class EcCompletionCalculation extends Component { course_rate:"--", score_levels:[], score_levelsdata:[], + hife:"/ecs/major_schools/3/years/60/requirement_vs_courses", } } @@ -55,6 +56,8 @@ class EcCompletionCalculation extends Component { } componentDidMount(){ + console.log("componentDidMount"); + // console.log(this.props); // let ec_course_id =this.props.match.params.ec_course_id; // this.UpdateClassData(true); @@ -600,7 +603,7 @@ class EcCompletionCalculation extends Component { {"--"} {"--"} {"--"} - 立即配置 + 立即配置 {TargetresContentList(5,[2,2,2,2,2])} :"" @@ -668,7 +671,7 @@ class EcCompletionCalculation extends Component { {TargetresContentList(target_list,item.support_course_target_ids)}
    - {item.weights===null||item.weights===0?立即配置:{item.weights}} + {item.weights===null||item.weights===undefined||item.weights==="0.00"||item.weights===0.00||item.weights===0?立即配置:{item.weights}} {item.actually_achievement===null?0:item.actually_achievement} {item.objective_achievement===null?0:item.objective_achievement} {item.status==="not_achieved"?"未完成":"完成"} From 5dc87e6b5adc0eefd57c4c62abbe29da721d8404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 8 Oct 2019 11:22:42 +0800 Subject: [PATCH 52/55] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/ecs/curriculum/Curriculum.js | 15 ++++++++-- .../EcCompletionCalculation.js | 29 +++++++++++++------ 2 files changed, 32 insertions(+), 12 deletions(-) diff --git a/public/react/src/modules/ecs/curriculum/Curriculum.js b/public/react/src/modules/ecs/curriculum/Curriculum.js index 025f6740f..064d964eb 100644 --- a/public/react/src/modules/ecs/curriculum/Curriculum.js +++ b/public/react/src/modules/ecs/curriculum/Curriculum.js @@ -95,7 +95,16 @@ class Curriculum extends Component { // }) } - + bindRef = ref => { + console.log(ref); + console.log("调用了子对象1"); + this.child = ref + }; + newrightcalculatebuttonysl=(child)=>{ + console.log("调用了子对象2"); + console.log(child); + child.newrightcalculatebutton(); + } onAclick=(i)=>{ console.log("onAclick"); console.log(i); @@ -215,7 +224,7 @@ class Curriculum extends Component { 导出评价详情 计算 + onClick={()=>this.newrightcalculatebuttonysl(this.child)}>计算 :titine===4? (各环节平均得分*占比)之和/(各环节总分*占比)之和 @@ -247,7 +256,7 @@ class Curriculum extends Component { render={ (props) => (this.Ontitine(i)}/>) }> {/*5课程达成评价结果*/} (this.Ontitine(i)}/>) }> + render={ (props) => (this.Ontitine(i)} triggerRef={this.bindRef}/>) }>
    diff --git a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js index b99131754..fd6be2959 100644 --- a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js +++ b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js @@ -57,6 +57,8 @@ class EcCompletionCalculation extends Component { componentDidMount(){ console.log("componentDidMount"); + + // console.log(this.props); // let ec_course_id =this.props.match.params.ec_course_id; // this.UpdateClassData(true); @@ -98,6 +100,11 @@ class EcCompletionCalculation extends Component { console.log(error); }); this.props.Ontitine("competition_calculation_info"); + try { + this.props.triggerRef(this); + }catch (e) { + + } } targetsget_navigation_data=(ec_year_id,ec_course_id)=>{ @@ -301,6 +308,7 @@ class EcCompletionCalculation extends Component { } newrightcalculatebutton=()=>{ + console.log("调用了计算"); this.setState({ Spintype:true }) @@ -310,16 +318,19 @@ class EcCompletionCalculation extends Component { const Orl =`/ec_courses/${ec_course_id}/evaluation.json`; axios.get(Orl) .then((response) => { - if(response.data.status===1){ - this.setState({ - calculatetype:true, - completiontype:true, - completionlist:'计算成功', - calculatesetype:true, - Spintype:false - }) - this.UpdateClassData(true); + if(response){ + if(response.data.status===1){ + this.setState({ + calculatetype:true, + completiontype:true, + completionlist:'计算成功', + calculatesetype:true, + Spintype:false + }) + this.UpdateClassData(true); + } } + }) .catch(function (error) { console.log(error) From a49eb656dbf4b94b03c856d619e9e7d6e0740360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 8 Oct 2019 11:31:59 +0800 Subject: [PATCH 53/55] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/ecs/curriculum/Curriculum.js | 8 ++++---- .../ecCompletion_calculation/EcCompletionCalculation.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/ecs/curriculum/Curriculum.js b/public/react/src/modules/ecs/curriculum/Curriculum.js index 064d964eb..df7857501 100644 --- a/public/react/src/modules/ecs/curriculum/Curriculum.js +++ b/public/react/src/modules/ecs/curriculum/Curriculum.js @@ -97,12 +97,12 @@ class Curriculum extends Component { } bindRef = ref => { console.log(ref); - console.log("调用了子对象1"); + // console.log("调用了子对象1"); this.child = ref }; newrightcalculatebuttonysl=(child)=>{ - console.log("调用了子对象2"); - console.log(child); + // console.log("调用了子对象2"); + // console.log(child); child.newrightcalculatebutton(); } onAclick=(i)=>{ @@ -221,7 +221,7 @@ class Curriculum extends Component { titine===5? - 导出评价详情 + 导出评价详情 this.newrightcalculatebuttonysl(this.child)}>计算 diff --git a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js index fd6be2959..4149839a2 100644 --- a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js +++ b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js @@ -482,7 +482,7 @@ class EcCompletionCalculation extends Component { -
    +
    {/* Date: Tue, 8 Oct 2019 13:53:41 +0800 Subject: [PATCH 54/55] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/ecs/EcSetting/index.js | 2 +- .../react/src/modules/ecs/curriculum/Curriculum.js | 14 ++++++++------ .../modules/ecs/curriculum/CurriculumSubpage.js | 2 +- .../EcCompletionCalculation.js | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/public/react/src/modules/ecs/EcSetting/index.js b/public/react/src/modules/ecs/EcSetting/index.js index 0c6d1ab88..28c176f01 100644 --- a/public/react/src/modules/ecs/EcSetting/index.js +++ b/public/react/src/modules/ecs/EcSetting/index.js @@ -154,7 +154,7 @@ class EcSetting extends React.Component { () }> {/*课程体系*/} - () }> {/*课程体系资源子页面Subpage*/} { + console.log("CurriculumCurriculum"); + console.log(s); if(s==="ec_course_support_setting"){ this.setState({ titine:1, @@ -243,19 +245,19 @@ class Curriculum extends Component { {/*Curriculumtwo 测试用*/} {/*课程目标*/} - (this.Ontitine(i)} />) }> {/*课程考核方式与数据来源*/} - (this.Ontitine(i)}/>) }> {/*成绩等级设置*/} - (this.Ontitine(i)}/>) }> - {/*4课程目标评价方法*/} - (this.Ontitine(i)}/>) }> {/*5课程达成评价结果*/} - (this.Ontitine(i)} triggerRef={this.bindRef}/>) }>
    diff --git a/public/react/src/modules/ecs/curriculum/CurriculumSubpage.js b/public/react/src/modules/ecs/curriculum/CurriculumSubpage.js index a187e688d..f7efffd8a 100644 --- a/public/react/src/modules/ecs/curriculum/CurriculumSubpage.js +++ b/public/react/src/modules/ecs/curriculum/CurriculumSubpage.js @@ -16,7 +16,7 @@ class CurriculumSubpage extends Component { console.log(this.props.match.params); } Curriculumstructure=()=>{ - this.props.history.push(`/ecs/major_schools/${this.props.match.params.majorId}/years/${this.props.match.params.yearId}/subpage/courses/ec_course_support_setting/1`); + this.props.history.push(`/ecs/major_schools/${this.props.match.params.majorId}/years/${this.props.match.params.yearId}/courses/subpage/ec_course_support_setting/1`); } diff --git a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js index 4149839a2..2b525284a 100644 --- a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js +++ b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js @@ -57,7 +57,7 @@ class EcCompletionCalculation extends Component { componentDidMount(){ console.log("componentDidMount"); - + console.log("EcCompletionCalculation"); // console.log(this.props); // let ec_course_id =this.props.match.params.ec_course_id; From 17043017d607b7eddc45cc3d0c221eee9fdc8af3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 8 Oct 2019 15:27:58 +0800 Subject: [PATCH 55/55] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/ecs/css/ecCourseEvaluations.css | 12 +++ .../EcCourseEvaluationsbottom.js | 74 +++++++++---------- .../ecCourseEvaluations/eccourseevalut.css | 8 ++ 3 files changed, 56 insertions(+), 38 deletions(-) create mode 100644 public/react/src/modules/ecs/subroute/ecCourseEvaluations/eccourseevalut.css diff --git a/public/react/src/modules/ecs/css/ecCourseEvaluations.css b/public/react/src/modules/ecs/css/ecCourseEvaluations.css index 8c8452b43..cb6c29a01 100644 --- a/public/react/src/modules/ecs/css/ecCourseEvaluations.css +++ b/public/react/src/modules/ecs/css/ecCourseEvaluations.css @@ -165,6 +165,9 @@ input{ margin-left: 8px; padding-left: 25px !important; } +.percentages{ + margin-left: 8px; +} .Coursetitle{ margin-bottom:0px !important; } @@ -172,6 +175,11 @@ input{ padding-left: 30px !important; width: 70px !important; } +.textaligncenters{ + width: 133px !important; + display: block; + float: left; +} .ml72{ margin-left:72px; } @@ -218,6 +226,10 @@ input{ width: 589px !important; display: inline-block; } +.evaluationdataClassy{ + width: 589px !important; + display: inline-block; +} .absolute{ position:absolute; } diff --git a/public/react/src/modules/ecs/subroute/ecCourseEvaluations/EcCourseEvaluationsbottom.js b/public/react/src/modules/ecs/subroute/ecCourseEvaluations/EcCourseEvaluationsbottom.js index ae09b7886..3c2014bf2 100644 --- a/public/react/src/modules/ecs/subroute/ecCourseEvaluations/EcCourseEvaluationsbottom.js +++ b/public/react/src/modules/ecs/subroute/ecCourseEvaluations/EcCourseEvaluationsbottom.js @@ -16,7 +16,7 @@ import 'antd/dist/antd.css'; import '../../css/ecCourseEvaluations.css'; import EcTitleCourseEvaluations from "../../ecTitle/ecTitle"; - +import './eccourseevalut.css' const $ = window.$; // 课程目标评价方法 @@ -48,7 +48,7 @@ class EcCourseEvaluationsbottom extends Component { meweacoursetype:false, newshowredvalue:false, percentagetype:false, - ismanager:false + ismanager:true } } getec_course_achievement_methods=()=>{ @@ -62,9 +62,9 @@ class EcCourseEvaluationsbottom extends Component { }) .then((response)=>{ this.setState({ - achievement_list:response.data.achievement_list, + achievement_list:response.data.course_targets, spinningstate:false, - ismanager:response.data.is_manager + ismanager:true }) }).catch(function (error) { console.log(error); @@ -72,11 +72,11 @@ class EcCourseEvaluationsbottom extends Component { } // this.setState({ // achievement_list:[ - // {target_evaluate_data: [ + // {course_achievement_methods: [ // { // evaluate_id: 24, // evaluate_name: "期末考试", - // evaluation_relates_data: [ + // course_evaluation_subitems: [ // {evaluation_relates_id: 31, evaluation_relates_name: "期末考试1目标1考题"}, // {evaluation_relates_id: 32, evaluation_relates_name: "期末考试1目标2考题"} // ], @@ -120,14 +120,12 @@ class EcCourseEvaluationsbottom extends Component { const url =`/ec_courses/${course_id}/course_targets/with_achievement_methods.json`; // /ec_courses//course_targets/course_achievement_methods.json // const url = `/ec_course_achievement_methods?ec_course_id=`+course_id; - axios.get(url, { - withCredentials: true, - }) + axios.get(url) .then((response)=>{ this.setState({ - achievement_list:response.data.achievement_list, + achievement_list:response.data.course_targets, spinningstate:false, - ismanager:response.data.is_manager + ismanager:true }) }).catch(function (error) { console.log(error); @@ -232,7 +230,7 @@ class EcCourseEvaluationsbottom extends Component { newec_course_target_id:id, methodologytype:true, ec_course_target_name:response.data.ec_course_target_name, - ismanager:response.data.is_manager + ismanager:true }) // this.setState({ @@ -440,9 +438,9 @@ class EcCourseEvaluationsbottom extends Component { }) .then((response)=>{ this.setState({ - achievement_list:response.data.achievement_list, + achievement_list:response.data.course_targets, spinningstate:false, - ismanager:response.data.is_manager + ismanager:true }) }).catch(function (error) { @@ -584,7 +582,7 @@ class EcCourseEvaluationsbottom extends Component { achievement_methods:undefined, eacoursesavetypes:false, newshowredvalue:false, - ismanager:response.data.is_manager + ismanager:true }) // $("#ecCourseEvaluationsbottomsubmit").hide(); // $("#SystemParametersbottom").hide(); @@ -671,8 +669,8 @@ class EcCourseEvaluationsbottom extends Component { percentagetype, ismanager } = this.state; - console.log("EcCourseEvaluationsbottom12345"); - console.log(achievement_list); + // console.log("EcCourseEvaluationsbottom12345"); + // console.log(achievement_list); return (
    @@ -775,15 +773,15 @@ class EcCourseEvaluationsbottom extends Component { return(
    { - item.target_evaluate_data.length===0? -
  • -
    - {key+1} + item.course_achievement_methods.length===0? +
  • +
    + {key+1} - + - + @@ -795,11 +793,11 @@ class EcCourseEvaluationsbottom extends Component { - +
    - +
    @@ -894,20 +892,20 @@ class EcCourseEvaluationsbottom extends Component {
  • - :item.target_evaluate_data.map((i,k)=>{ + :item.course_achievement_methods.map((i,k)=>{ return( -
  • -
    - {key-k===key?key+1:""} +
  • +
    + {key-k===key?key+1:""} - - {i.evaluate_name} + + {i.course_evaluation.name} - + { - i.evaluation_relates_data.map((y,e)=>{ + i.course_evaluation_subitems.map((y,e)=>{ return( -
    {y.evaluation_relates_name+" "}
    +
    {y.name+" "}
    ) }) } @@ -930,11 +928,11 @@ class EcCourseEvaluationsbottom extends Component { } - +
    {i.percentage+"%"}
    - +
    {i.score}
    @@ -942,8 +940,8 @@ class EcCourseEvaluationsbottom extends Component {
    {/* 修改start*/}
    -
    -
    +
    +
    {/* 课程目标{sequenceid}:{ec_course_target_name} */} 课程目标{key+1}:{ec_course_target_name} diff --git a/public/react/src/modules/ecs/subroute/ecCourseEvaluations/eccourseevalut.css b/public/react/src/modules/ecs/subroute/ecCourseEvaluations/eccourseevalut.css new file mode 100644 index 000000000..c9a05d7ec --- /dev/null +++ b/public/react/src/modules/ecs/subroute/ecCourseEvaluations/eccourseevalut.css @@ -0,0 +1,8 @@ +.yslinitials{ + + display: flex; + flex-direction:initial; +} +.yslpadding{ + padding: 0px 30px; +} \ No newline at end of file