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/AppConfig.js b/public/react/src/AppConfig.js index bc7fa8070..19563052c 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) { @@ -217,7 +217,7 @@ function initOnlineOfflineListener() { description: '网络恢复正常,感谢使用。', }) - }); + }); $(window).bind("offline", () => { notification.destroy() 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..9e357aebd --- /dev/null +++ b/public/react/src/modules/ecs/EcSetting/RequirementVsObjective/SelectTable.js @@ -0,0 +1,124 @@ +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[0][0]}{columns[0][1]} | ; + return ( +{this.props.columnName || '目标'}{index} | +目标1 | +目标2 | +目标3 | +目标4 | +目标5 | */} +指标点{this.props.firstColIndexArray ? this.props.firstColIndexArray[rowIndex] : rowIndex + 1} | +this.props.onCellClick(rowIndex, colIndex , !!cell)}> + + | +
指标点1 | ++ + | ++ + | ++ + | ++ + | ++ + | +|
指标点2 | ++ + | ++ + | ++ + | ++ + | ++ + | +|
指标点3 | ++ + | ++ + | ++ + | ++ + | ++ + | +
毕业要求对培养目标的支撑
++ 用矩阵图的形式说明本专业毕业要求对培养目标的支撑关系,鼠标左键单击单元格即可 + window.elasticLayer(3531)} className="color-blue">查看详情 +
+ ++ 表示支撑 + 表示不支撑 +
+毕业要求对通用标准的支撑
++ 用矩阵图的形式说明本专业毕业要求对12项通用标准的覆盖关系,鼠标左键单击单元格即可 + window.elasticLayer(3532)} className="color-blue">查看详情 +
+ ++ 表示支撑 + 表示不支撑 +
+毕业要求指标点达成计算
++ 系统根据课程体系与毕业要求的支持关系,以课程的考核与成绩判定方式,一键计算毕业要求的达成度情况 + window.elasticLayer(3535)} class="color-blue">查看详情 +
+ +
+ 达成阈值:
+ { daChengYuZhiEditableMode ?
+
'+ subject +'' + + '返回
' + + '' + + $(".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() { diff --git a/public/react/src/modules/ecs/common/ECModalHOC.js b/public/react/src/modules/ecs/common/ECModalHOC.js new file mode 100644 index 000000000..650c10cbe --- /dev/null +++ b/public/react/src/modules/ecs/common/ECModalHOC.js @@ -0,0 +1,91 @@ +import React, { Component } from 'react'; +import { Modal } from 'antd'; + + +export function ECModalHOC(options = {}) { + return function wrap(WrappedComponent) { + return class Wrapper extends Component { + constructor(props) { + super(props); + + this.state = { + titlemessage: '', + Modallist: false, + Modallisttype: false, + singleButton: false + } + } + + // 全局的modal this.props.showModal 调用即可 + showModal = (title, content, okCallback) => { + this.okCallback = okCallback; + this.setState({ + titlemessage: title, + Modallist: content, + Modallisttype: true, + singleButton: false, + + }) + } + + showSingleButtonModal = (title, content) => { + this.setState({ + titlemessage: title, + Modallist: content, + Modallisttype: true, + singleButton: true, + }) + } + + onCancel = () => { + this.setState({ + Modallisttype:false + }) + } + hidemodeldelete = () => { + if (this.okCallback) { + this.okCallback() + } + + this.onCancel() + } + render() { + const { titlemessage, Modallisttype, Modallist, singleButton } = this.state; + + return ( +@@ -511,10 +564,10 @@ class EcCompletionCalculation extends Component {
毕业要求 {5} + 达成结果 达成目标值 达成实际值 @@ -560,52 +614,103 @@ class EcCompletionCalculation extends Component { {"--"} {"--"} {"--"} - 立即配置 + 立即配置 {TargetresContentList(5,[2,2,2,2,2])} :"" } + { 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} - 达成结果 - 达成目标值 - 达成实际值 - 课程权重 +
+ { this.state.errorMsg && + {this.state.errorMsg} + } + + 保存 + { this.props.setEditableMode(false) } }>取消 +
+ + ); + } +} +const WrappedEditableCourseSupportSetting = Form.create({ name: 'dynamic_form_item' })(EditableCourseSupportSetting); +export default WrappedEditableCourseSupportSetting; diff --git a/public/react/src/modules/ecs/subroute/ecCourseSupportSetting/ShowTableCourseSupportSetting.js b/public/react/src/modules/ecs/subroute/ecCourseSupportSetting/ShowTableCourseSupportSetting.js new file mode 100644 index 000000000..25551b728 --- /dev/null +++ b/public/react/src/modules/ecs/subroute/ecCourseSupportSetting/ShowTableCourseSupportSetting.js @@ -0,0 +1,150 @@ +import React, { Component } from 'react'; + +import moment from 'moment' + +import EditableCourseSupportSetting from './EditableCourseSupportSetting' +import { Form, Input, Icon, Button, Select } from 'antd'; + +const { Option } = Select; + + +const data = [ + { + id: 0, + ecPosition: 1, + target_weight: 0.1, + target_contents: '理解数据管理技术和数据库技术的发展,区分不同数据模型的作用和特点,描述数据库系统的类型、结构、数据独立性。', + standard_grade: 60, + subitem_contents: ':能够运用相关的工程基础和专业知识辨别材料生产中出现的技术、工艺、质量等问题' + }, + { + id: 1, + ecPosition: 2, + target_weight: 0.1, + target_contents: '理解数据管理技术和数据库技术的发展,区分不同数据模型的作用和特点,描述数据库系统的类型、结构、数据独立性。', + standard_grade: 60, + subitem_contents: ':能够运用相关的工程基础和专业知识辨别材料生产中出现的技术、工艺、质量等问题' + } +] +class ShowTableCourseSupportSetting extends Component { + componentDidMount = () => { + const course_targets = this.props.course_targets; + } + + render() { + const course_targets = this.props.course_targets; + const is_manager = this.props.year && this.props.year.can_manager; + return ( ++ 项 + 权重 + 课程目标内容 + 达成标准(分) + 对应毕业要求指标点 + + {/* + + */} + + { is_manager && { this.props.setEditableMode(true)} } + class="color-green EditCourse" data-id="5" data-tip-down="编辑"> + + } + +
++ + 课程体系 + > + {schooldata && ( schooldata.ec_course_name || '')} + + 导出课程目标 +
*/} + + {/*+ 课程体系 > + {schooldata.ec_course_name} + + + 导出课程目标 + +
+ + +
-
-
学生数据为空,请导入数据
-学生数据为空,请导入数据
-
+
+
学生数据为空,请导入数据
+学生数据为空,请导入数据
+