diff --git a/public/react/config/webpack.config.dev.js b/public/react/config/webpack.config.dev.js
index 18d1a4002..a04ec614c 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: "eval", // 开启调试
+ // devtool: "eval", // 开启调试
// 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/package.json b/public/react/package.json
index 8d7362c28..e91e61f03 100644
--- a/public/react/package.json
+++ b/public/react/package.json
@@ -5,7 +5,7 @@
"dependencies": {
"@icedesign/base": "^0.2.5",
"@novnc/novnc": "^1.1.0",
- "antd": "^3.20.1",
+ "antd": "^3.23.2",
"array-flatten": "^2.1.2",
"autoprefixer": "7.1.6",
"axios": "^0.18.0",
diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js
index b6f3bc0df..b90a527ef 100644
--- a/public/react/src/AppConfig.js
+++ b/public/react/src/AppConfig.js
@@ -46,7 +46,7 @@ export function initAxiosInterceptors(props) {
// wy
proxy="https://pre-newweb.educoder.net";
proxy="https://test-newweb.educoder.net";
- proxy="http://192.168.2.63:3001/";
+ proxy="http://192.168.2.63:3001";
// wy
// proxy="http://192.168.2.63:3001"
diff --git a/public/react/src/modules/ecs/EcSetting/index.js b/public/react/src/modules/ecs/EcSetting/index.js
index 238d8474c..9e88446c7 100644
--- a/public/react/src/modules/ecs/EcSetting/index.js
+++ b/public/react/src/modules/ecs/EcSetting/index.js
@@ -6,7 +6,7 @@ import axios from 'axios';
import './index.scss';
import CustomLoadable from "../../../CustomLoadable";
-
+import Curriculum from "../../../modules/ecs/curriculum/Curriculum"
const { Step } = Steps;
const TrainingObjective = CustomLoadable(() => import('./TrainingObjective/index'))
@@ -98,6 +98,12 @@ class EcSetting extends React.Component {
() }>
+ {/*课程体系*/}
+ () }>
+ {/*课程体系VS毕业要求*/}
+ () }>
)
}
diff --git a/public/react/src/modules/ecs/css/ecCourseEvaluations.css b/public/react/src/modules/ecs/css/ecCourseEvaluations.css
index 5931e9f80..f27ad7313 100644
--- a/public/react/src/modules/ecs/css/ecCourseEvaluations.css
+++ b/public/react/src/modules/ecs/css/ecCourseEvaluations.css
@@ -227,6 +227,17 @@ input{
right: 18px;
top: 26px;
}
+.Importclassroomdatas{
+ position: absolute;
+ right: 375px!important;
+ top: 122px !important;
+}
+.Importclassroomdatass {
+ position: absolute;
+ right: 375px !important;
+ top: 248px !important;
+}
+
#SystemParameters{
position: relative;
}
diff --git a/public/react/src/modules/ecs/css/ecCourseSupports.css b/public/react/src/modules/ecs/css/ecCourseSupports.css
index 3f1dc000a..10b6ebd91 100644
--- a/public/react/src/modules/ecs/css/ecCourseSupports.css
+++ b/public/react/src/modules/ecs/css/ecCourseSupports.css
@@ -25,6 +25,12 @@ color:rgba(5,16,26,1);
line-height:45px;
color:rgba(50,50,50,1);
}
+.SystemParametersysls{
+ font-size:14px;
+ font-family:MicrosoftYaHei;
+ font-weight:400;
+ color:rgba(50,50,50,1);
+}
.Systemnum{
font-size:14px;
font-family:MicrosoftYaHei;
@@ -247,18 +253,28 @@ input{
.graduateRequirement .clearfix .column-1 {
width: 76px!important;
}
-
.newrightcalculatebutton{
width: 50px;
- height: 25px;
- border: 1px solid rgba(76,172,255,1);
- border-radius: 1px;
- line-height: 25px;
- text-align: center;
- margin-top: 7px;
- cursor: pointer;
- color: rgba(76,172,255,1);
-}
+ height: 25px;
+ border: 1px solid rgba(76,172,255,1);
+ border-radius: 1px;
+ line-height: 25px;
+ text-align: center;
+ margin-top: 7px;
+ cursor: pointer;
+ color: rgba(76,172,255,1);
+}
+.newrightcalculatebuttons{
+ width: 50px;
+ height: 25px;
+ border: 1px solid rgba(76,172,255,1);
+ border-radius: 1px;
+ line-height: 25px;
+ text-align: center;
+ margin-top:9px;
+ cursor: pointer;
+ color: rgba(76,172,255,1);
+ }
.columnbox{
height: 53px;
overflow: hidden;
diff --git a/public/react/src/modules/ecs/curriculum/Curriculum.js b/public/react/src/modules/ecs/curriculum/Curriculum.js
new file mode 100644
index 000000000..e91ff9eb4
--- /dev/null
+++ b/public/react/src/modules/ecs/curriculum/Curriculum.js
@@ -0,0 +1,245 @@
+import React, { Component } from 'react';
+import classNames from 'classnames'
+
+import axios from 'axios';
+
+import { TPMIndexHOC } from '../../tpm/TPMIndexHOC';
+
+import { SnackbarHOC } from 'educoder'
+
+import { message,Modal,Spin,Icon} from 'antd';
+
+import 'antd/dist/antd.css';
+
+import EcTitleCourseEvaluations from '../ecTitle/ecTitle'
+
+import '../css/ecCourseSupports.css';
+
+import '../css/ecCourseEvaluations.css';
+import {
+ BrowserRouter as Router,
+ Route,
+ Switch
+} from 'react-router-dom';
+import Loadable from 'react-loadable';
+import Loading from "../../../Loading";
+const Curriculumtwo = Loadable({
+ loader: () => import('./Curriculumtwo'),
+ loading: Loading,
+})
+const $ = window.$;
+class Curriculum extends Component {
+ //课程体系
+ constructor(props) {
+ super(props)
+ this.state= {
+ classcalue:5,
+ newec_course_idbottom:"",
+ course_name:undefined,
+ course_url:"a",
+ ecmanager:true,
+ titine:1,
+ }
+ }
+
+ componentWillMount(){
+ // window.document.title = '课程达成评价结果';
+ }
+ componentDidMount(){
+ console.log(this.props);
+ }
+ sync_course_data=()=>{
+ // this.setState({listSpin:true})
+ // let ec_course_id=this.props.match.params.ec_course_id;
+ // let Url ='/ec_course_achievement_methods/sync_course_data';
+ // axios.post(Url, {
+ // ec_course_id:ec_course_id
+ // },
+ // {
+ // withCredentials: true
+ // }
+ // ).then((response) => {
+ // if(response.data.status===0){
+ // this.setState({
+ // // titlemessage: response.data.message+"(支撑关系变更)",
+ // Modallist: response.data.message,
+ // Modallisttype:true,
+ // listSpin:false
+ // })
+ // this.UpdateEvaluations();
+ // }else if(response.data.status===-1){
+ // this.setState({
+ // // titlemessage: response.data.message+"(支撑关系变更)",
+ // Modallist: response.data.message,
+ // Modallisttype:true,
+ // listSpin:false
+ // })
+ //
+ // }
+ // }).catch((error) => {
+ // console.log(error)
+ // })
+
+ }
+
+ onAclick=(i)=>{
+ console.log("onAclick");
+ console.log(i);
+ if(i===1){
+ this.props.history.push(this.props.match.url+"/ec_course_support_setting/1");
+ }else if(i===2){
+ this.props.history.push(this.props.match.url+"/ec_course_reach_setting/2");
+ }else if(i===3){
+ this.props.history.push(this.props.match.url+"/score_level/3");
+ }else if(i===4){
+ this.props.history.push(this.props.match.url+"/evaluation_methods/4");
+ }else{
+ this.props.history.push(this.props.match.url+"/competition_calculation_info/5");
+ }
+ this.setState({
+ titine:i,
+ })
+
+ };
+ Ontitine=(s)=>{
+ if(s==="ec_course_support_setting"){
+ this.setState({
+ titine:1,
+ })
+ }else if(s==="ec_course_reach_setting"){
+ this.setState({
+ titine:2,
+ })
+ }else if(s==="score_level"){
+ this.setState({
+ titine:3,
+ })
+ }else if(s==="evaluation_methods"){
+ this.setState({
+ titine:4,
+ })
+ }else if(s==="competition_calculation_info"){
+ this.setState({
+ titine:5,
+ })
+ }
+
+ };
+ associatedclass=()=>{
+
+ };
+ deleteassociatedclass=()=>{
+
+ }
+ render() {
+ let {newec_course_idbottom,titine,classcalue,course_name,course_url,ecmanager,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;
+ // console.log("Curriculum");
+ // console.log(this.props);
+ console.log(titine);
+ return (
+
+
+
+
+ {/*Curriculumtwo 测试用*/}
+ {/*课程目标*/}
+ (this.Ontitine(i)} />) }>
+ {/*课程考核方式与数据来源*/}
+ (this.Ontitine(i)}/>) }>
+ {/*成绩等级设置*/}
+ (this.Ontitine(i)}/>) }>
+ {/*课程目标评价方法*/}
+ (this.Ontitine(i)}/>) }>
+ {/*课程达成评价结果*/}
+ (this.Ontitine(i)}/>) }>
+
+
+
+ )
+ }
+
+
+}
+export default Curriculum;
\ No newline at end of file
diff --git a/public/react/src/modules/ecs/curriculum/Curriculumtwo.js b/public/react/src/modules/ecs/curriculum/Curriculumtwo.js
new file mode 100644
index 000000000..221b2afb5
--- /dev/null
+++ b/public/react/src/modules/ecs/curriculum/Curriculumtwo.js
@@ -0,0 +1,32 @@
+import React, { Component } from 'react';
+
+class Curriculumtwo extends Component {
+ //测试用
+ constructor(props) {
+ super(props)
+ // console.log(props);
+ }
+
+ componentWillMount(){
+ }
+ componentDidMount(){
+ // console.log(this.props);
+ console.log("Curriculumtwo");
+ console.log(this.props.match.params.type);
+ this.props.Ontitine(this.props.match.params.type);
+ }
+
+
+ render() {
+ // console.log("Curriculumtwo");
+ // console.log(this.props);
+ return (
+
+ 测试
+
+ )
+ }
+
+
+}
+export default Curriculumtwo;
\ No newline at end of file
diff --git a/public/react/src/modules/ecs/subroute/EcCompletionCalculation.js b/public/react/src/modules/ecs/subroute/EcCompletionCalculation.js
deleted file mode 100644
index 51e127ebd..000000000
--- a/public/react/src/modules/ecs/subroute/EcCompletionCalculation.js
+++ /dev/null
@@ -1,814 +0,0 @@
-import React, { Component } from 'react';
-import classNames from 'classnames'
-
-import axios from 'axios';
-
-import { TPMIndexHOC } from '../../tpm/TPMIndexHOC';
-
-import { SnackbarHOC } from 'educoder'
-
-import { message,Modal,Spin,Icon} from 'antd';
-
-import 'antd/dist/antd.css';
-
-import EcTitleCourseEvaluations from '../ecTitle/ecTitle'
-
-import '../css/ecCourseSupports.css';
-
-import '../css/ecCourseEvaluations.css';
-
-const $ = window.$;
-class EcCompletionCalculation extends Component {
- constructor(props) {
- super(props)
- this.state={
- schooldata:{},
- ecComponentState:"ecCompletion",
- course_total_score:[],
- ec_course_targets:0,
- graduation_list:[],
- target_list:[],
- target_score:[],
- evaluate_result:"",
- ec_course_targets_count:0,
- new_target_ec_year_id:0,
- total_rate_data:undefined,
- calculatetype:false,
- ec_course_id:0,
- morelisttype:false,
- titlemessage:"提示",
- completiontype:false,
- completionlist:"",
- course_total_scoreaverage:0,
- calculatesetype:false,
- Spintype:false,
- ismanager:false
- }
- }
-
- componentWillMount(){
- window.document.title = '课程达成评价结果';
- }
-
- 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,
- })
- .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
- })
- }
- })
- .catch(function (error) {
- console.log(error);
- });
- }
-
- targetsget_navigation_data=(ec_year_id,ec_course_id)=>{
- const Url =`/ec_major_schools/get_navigation_data?ec_year_id=`+ec_year_id+"&ec_course_id="+ec_course_id;
- axios.get(Url, {
- withCredentials: true,
- })
- .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
- })
- }
- })
- .catch(function (error) {
- console.log(error);
- });
- }
- showmorelist=()=>{
- this.setState({
- morelisttype:false
- })
- this.UpdateClassData(false)
- }
- UpdateClassData=(key)=>{
- let {calculatetype} =this.state;
- let ec_course_id =this.props.match.params.ec_course_id;
- this.setState({
- ec_course_id:ec_course_id
- })
- const Arl =`/ec_courses/`+ec_course_id+`/calculation_info_data`;
- axios.get(Arl, {
- withCredentials: true,
- })
- .then((response) => {
-
- if(response.status===200){
- // var list=[];
- // if(key===true){
- // for(var i=0; i10){
- newmorelisttype=true
-
- }
-
- let course_total_scoreaverage;
- let newlist=response.data.course_total_score[response.data.course_total_score.length-1].total_rate;
- for(var i=0; i{
- this.setState({
- Spintype:true
- })
- let {ec_course_id}=this.state;
- const Orl =`/ec_courses/`+ec_course_id+`/sync_data`;
- axios.get(Orl, {
- withCredentials:true,
- })
- .then((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)
- });
- }
- hidecompletion=()=>{
- this.setState({
- completiontype:false,
- completionlist:"",
- calculatesetype:false
- })
- }
- 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 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})
- }
- return target_listres
- }
-
- let TargetresLists = (length) => {
- let target_listress = [];
- for(let i = 0; i < length; i++) {
- // target_listres.push(目标{length-i})
- 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 Total_rate_dataList = (value) => {
-
- let target_listres = [];
- if(value!=undefined){
- for(let i = 0; i < value.length; i++) {
-
- if(i===value.length-1){
- target_listres.push(
- {/*{value[i].total_score}
*/}
- 100%
- )
- }else{
- target_listres.push(
- {/*{value[i].score}
*/}
- {/*占比{(value[i].rate*100).toFixed(2)}%
*/}
-
- {(value[i].rate*100).toFixed(2)}%
-
- )
- }
-
- }
- return target_listres
- }else{
- target_listres.push(
- {/*{value[i].total_score}
*/}
- --
- )
- return target_listres
- }
- }
-
- let newTotal_rate_dataList = (length,value) => {
-
- let target_listres = [];
- if(value!=undefined){
- for(let i = 0; i < value.length; i++) {
-
- // if(i===0){
- // target_listres.push(
- // {value[i].score.toFixed(2)}
- // )
- // }else{
- // target_listres.push(
- // {value[i].score.toFixed(2)}
- // )
- // }
-
- if(i
- {value[i].score.toFixed(2)}
- )
- }
-
- }
- return target_listres
- }
- }
- return (
-
-
-
- {
- calculatesetype===true?
-
- :
-
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 课程目标
- 达成结果
- 达成标准(分)
- 实际达成
- 权重
-
-
- { Spintype===true?
}/>:"" }
-
-
- { target_list.length===0&&Spintype===false?
-
- --
- --
- --
- --
- --
- --
- :""}
-
-
- {Spintype===false?target_list.map((item,key)=>{
-
- return(
-
- {key+1}
- {item.content}
- {item.result}
- {item.standard_grade}
- {item.real_grade}
- {item.weigths}
-
- )
-
- }):""
- }
-
-
-
-
-
-
-
- 毕业要求指标点达成评价结果
- 注: 代表支持指标点;代表不支持指标点
-
-
-
-
-
-
- {
- graduation_list.length===0?
-
- 毕业要求
- {5}
- 达成结果
- 达成目标值
- 达成实际值
- 课程权重
- {TargetresList(5)}
-
- :""
- }
-
- { Spintype===true?
}/>:"" }
-
- {
- graduation_list.length===0&&Spintype===false?
-
- {/* {item.ec_graduation_name} */}
- {1}
- {"--"}
- {"--"}
- {"--"}
- {"--"}
- 立即配置
- {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}
- 达成结果
- 达成目标值
- 达成实际值
- 课程权重
- {TargetresList(ec_course_targets_count)}
-
- )
- }
-
- }):""
- }
-
-
- {
- 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)}
-
- )
-
- }):""
- }
-
-
-
-
-
-
-
5 ? (180 * total_rate_data+226+16) : 1200+"px"}}>
- {/*序号*/}
- 课程目标
- {/*姓名*/}
- {/*学号*/}
- {TargetresLists(total_rate_data-1)}
- 总评成绩
-
- {/*style={{width: 113*(total_rate_data+4)>1136?113*(total_rate_data+4.5):1136+"px"}}*/}
- {
- // course_total_score.map((i,k)=>{
-
- // if(k===course_total_score.length-1){
-
- // return(
- //
1200?(113*(total_rate_data+4.5))+63:1200+"px"}}>
- // 占比
- // {/*colorTransparent*/}
- // {/* 平均数 */}
- // {/* 平均数 */}
- // {/* {Total_rate_dataList(total_rate_data-1,i.total_rate)}
- //
- // )
-
- // }
-
- // }) */}
- }
- { Spintype===true?
}/>:"" }
- {
- Spintype===false?
5 ? (180 * total_rate_data+226+16) : 1200 + "px"}}>
- 占比
- {/*colorTransparent*/}
- {/* 平均数 */}
- {/* 平均数 */}
- {Total_rate_dataList(course_total_score)}
- {
- course_total_score.length===0? --:""
- }
- :""
- }
- {/*style={{width: 113*(total_rate_data+4)>1136?113*(total_rate_data+4):1136+"px"}}*/}
- {
- // course_total_score.map((i,k)=>{
-
- // if(k!=course_total_score.length-1){
-
- // return(
- //
1200?(113*(total_rate_data+4.5))+63:1200+"px"}}>
- // {/*{k+1}*/}
- // 平均分
- // {/*{i.student_scores.name}*/}
- // {/*{i.student_scores.student_number}*/}
- // {newTotal_rate_dataList(total_rate_data-1,i.student_scores.target_info)}
- // {i.student_scores.total_score.toFixed(2)}
- //
- // )
-
- // }
-
- // })
- }
- {
- Spintype===false?
1200?(113*(total_rate_data+4.5))+63:1200+"px"}}>
- {/*{k+1}*/}
- 平均分
- {/*{i.student_scores.name}*/}
- {/*{i.student_scores.student_number}*/}
- {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}
- }
- :""
- }
-
-
-
1136?113*(total_rate_data+4):1136+"px",display:morelisttype===true?"block":"none"}}>
- this.showmorelist()}>加载更多
-
-
-
-
-
-
-
-
-
-
-
- 课程目标
- 平均分
- 最高分数
- 最低分数
- 90分以上
- 80-89分
- 70-79分
- 60-69分
- 50-59分
- 低于50分
-
-
- {
- Spintype===false?target_score.map((i,k)=>{
-
- return(
-
- {k+1}
- {i.average_score}
- {i.top_score}
- {i.low_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_score.length===0&&Spintype===false?
-
- --
- --
- --
- --
-
- --人
- --%
-
-
- --人
- --%
-
-
- --人
- --%
-
-
- --人
- --%
-
-
- --人
- --%
-
-
- --人
- --%
-
- :""}
-
-
-
-
-
- );
- }
-}
-
-export default SnackbarHOC() ( TPMIndexHOC ( EcCompletionCalculation ) );
-
diff --git a/public/react/src/modules/ecs/subroute/EcCourseEvaluationsbottom.js b/public/react/src/modules/ecs/subroute/EcCourseEvaluationsbottom.js
deleted file mode 100644
index bf1bda068..000000000
--- a/public/react/src/modules/ecs/subroute/EcCourseEvaluationsbottom.js
+++ /dev/null
@@ -1,1037 +0,0 @@
-import React, { Component } from 'react';
-
-import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
-
-import classNames from 'classnames'
-
-import axios from 'axios';
-
-import { TPMIndexHOC } from '../../tpm/TPMIndexHOC';
-
-import { SnackbarHOC } from 'educoder'
-
-import { Select,InputNumber,message,Modal,Input,Radio,Spin,Icon,Tooltip } from 'antd';
-
-import 'antd/dist/antd.css';
-
-import '../css/ecCourseEvaluations.css';
-import EcTitleCourseEvaluations from "../ecTitle/ecTitle";
-
-const $ = window.$;
-class EcCourseEvaluationsbottom extends Component {
- constructor(props) {
- super(props)
- this.state={
- totalevaluations_list:[],
- ec_course_target_id:0,
- achievement_list:[],
- evaluations_listSelec:[],
- evaluations_lists: [],
- evaluation_subitems_lists: [],
- evaluations_list:[],
- evaluation_subitems_list:{},
- achievement_methods:[],
- ec_course_target_name:"",
- buttomSaveCourseEvaluationsbottom:this.SaveCourseEvaluationsbottom,
- spinningstate:true,
- schooldata:{},
- sequenceid:0,
- target_id:null,
- titlemessages:"提示",
- Modallists:"",
- eacoursetype:false,
- eacoursesavetypes:false,
- newec_course_idbottom:undefined,
- methodologytype:false,
- meweacoursetype:false,
- newshowredvalue:false,
- percentagetype:false,
- ismanager:false
- }
- }
- getec_course_achievement_methods=()=>{
- const {newec_course_idbottom}=this.state;
- if(newec_course_idbottom!=undefined){
- const url = `/ec_course_achievement_methods?ec_course_id=`+newec_course_idbottom;
- axios.get(url, {
- withCredentials: true,
- })
- .then((response)=>{
- this.setState({
- achievement_list:response.data.achievement_list,
- spinningstate:false,
- ismanager:response.data.is_manager
- })
- }).catch(function (error) {
- console.log(error);
- });
- }
- // this.setState({
- // achievement_list:[
- // {target_evaluate_data: [
- // {
- // evaluate_id: 24,
- // evaluate_name: "期末考试",
- // evaluation_relates_data: [
- // {evaluation_relates_id: 31, evaluation_relates_name: "期末考试1目标1考题"},
- // {evaluation_relates_id: 32, evaluation_relates_name: "期末考试1目标2考题"}
- // ],
- // percentage: 100,
- // score: 15
- // }
- // ],
- // target_id: 5
- // },
- // ],
- // spinningstate:false
- // })
-
-
- }
-
- getNavigationData=(ec_course_id)=>{
- // const jol =`/ec_major_schools/get_navigation_data?ec_year_id=`+ec_year_id+"&ec_course_id="+ec_course_id;
- const jol =`/ec_major_schools/get_navigation_data?ec_course_id=`+ec_course_id;
- axios.get(jol, {
- withCredentials: true,
- })
- .then((response) => {
- if(response.status===200){
- // if(response.data.allow_visit===false){
- // window.location.href="/403"
- // }
- this.setState({
- schooldata:response.data
- })
- }
-
- })
- .catch(function (error) {
- console.log(error);
- });
- }
- componentDidMount(){
- let ec_course_id=this.props.match.params.ec_course_id;
- const url = `/ec_course_achievement_methods?ec_course_id=`+ec_course_id;
- axios.get(url, {
- withCredentials: true,
- })
- .then((response)=>{
- this.setState({
- achievement_list:response.data.achievement_list,
- spinningstate:false,
- ismanager:response.data.is_manager
- })
- }).catch(function (error) {
- console.log(error);
- });
-
- this.getNavigationData(ec_course_id);
- this.setState({
- newec_course_idbottom:ec_course_id
- })
- }
- editecCourseEvaluationslist=(e)=>{
- let id =e.target.getAttribute("target_id");
- let newid =e.target.name;
-
- this.setState({
- buttomSaveCourseEvaluationsbottom:this.SaveCourseEvaluationsbottom,
- target_id:id,
- percentagetype:false
- })
- // $("#ecCourseEvaluationsbottomsubmit").show();
- // $("#SystemParametersbottom").show();
- // let offsettop=$("#ecCourseEvaluationsbottomsubmit").position().top||$("#ecCourseEvaluationsbottomsubmit").scrollTop || $("#ecCourseEvaluationsbottomsubmit").pageYOffset;
- // window.scrollTo(0, offsettop)
-
- let {evaluations_list,evaluation_subitems_list,achievement_methods} = this.state;
- this.setState({
- achievement_methods:undefined,
- selectevaluation_phase:[],
- course_select_value:'',
- evaluations_lists:[],
- sequenceid:newid,
- methodologytype:false,
- Modallists:' ',
- meweacoursetype:false,
- eacoursesavetypes:false,
- newshowredvalue:false
- })
-
- let newevaluations_list=[];
- let newevaluation_subitems_list=new Object ();
- let newachievement_methods=[];
- const url = `/ec_course_achievement_methods/edit_course_target?ec_course_target_id=`+id;
- axios.get(url, {
- withCredentials: true,
- })
- .then((response)=>{
- if(response.status===200){
- if(response.data.evaluation_phase_list.length===0){
- this.setState({
- achievement_methods:undefined
- })
- let newObject=new Object ();
- newachievement_methods.push(newObject)
- }
-
- if(response.data.evaluation_phase_list.length>0){
- let evaluation_phase_list=response.data.evaluation_phase_list;
- let evaluations_list=response.data.evaluations_list;
- for(var i=0; i{
-
- let {evaluation_subitems_list,totalevaluations_list,achievement_methods} = this.state;
- let newachievement_methods=achievement_methods;
- let newlist=new Object ();
- let location=keythis.key;
- let list=totalevaluations_list.evaluations_list;
- // 点击切换清空
- for(var z=0; z0){
- if(newachievement_methods[location]===undefined){
- newachievement_methods.push(newlist)
- }
- for(var i=0; i{
- let{totalevaluations_list,achievement_methods}=this.state;
- let newachievement_methods=[];
- let id;
- if(value.length>0){
-
- newachievement_methods=achievement_methods
- for(var j=0; j{
- let id=parseInt(keynum.key);
- let{achievement_methods}=this.state;
- let newachievement_methods=achievement_methods;
- for(var i=0; i{
- let {achievement_methods} = this.state;
- let newachievement_methods=achievement_methods;
- let id=e.target.id;
- var value=parseFloat(e.target.value);
- for(var i=0; i{
- let {achievement_methods} = this.state;
- let newachievement_methods=achievement_methods;
- let id=e.target.id;
- let value=parseFloat(e.target.value);
-
- if(value>100){
- // message.warning('占比请输入0~100的数');
- this.setState({
- Modallists:'占比请输入0~100的数',
- meweacoursetype:true,
- newshowredvalue:true
- })
- value=100
- }
-
- if(value<0){
- // message.warning('占比请输入0~100的数');
- this.setState({
- Modallists:'占比不能小于0',
- meweacoursetype:true,
- newshowredvalue:true
- })
- value=0
- }
-
- if(value===""||value===null||value===undefined){
- // message.warning('占比请输入0~100的数');
- this.setState({
- Modallists:'占比不能为空',
- meweacoursetype:true,
- newshowredvalue:true
- })
- value=0
- }
-
- for(var i=0; i{
- let {achievement_methods} = this.state;
- let newachievement_methods=achievement_methods;
- let newlist=new Object ();
- newachievement_methods.push(newlist);
- this.setState({
- achievement_methods:newachievement_methods
- });
- }
- Delethandevaluation=(e)=>{
- let {achievement_methods} = this.state;
- let id =e.target.getAttribute("index");
- let newachievement_methods=achievement_methods;
- newachievement_methods.splice(id,1);
- this.setState({
- achievement_methods:newachievement_methods
- });
- }
-
-
- EvaluationsSaveonloadgetdata=(id)=>{
- const url = `/ec_course_achievement_methods?ec_course_id=`+id
- axios.get(url, {
- withCredentials: true,
- })
- .then((response)=>{
- this.setState({
- achievement_list:response.data.achievement_list,
- spinningstate:false,
- ismanager:response.data.is_manager
- })
-
- }).catch(function (error) {
- console.log(error);
- this.setState({
- spinningstate:false
- })
- });
-
-
- }
- ecrestoration=()=>{
- this.setState({
- buttomSaveCourseEvaluationsbottom:this.SaveCourseEvaluationsbottom
- })
- }
-
- SaveCourseEvaluationsbottom=()=>{
- let ec_course_id=this.props.match.params.ec_course_id;
- this.setState({
- buttomSaveCourseEvaluationsbottom:'',
- percentagetype:true
- })
- let {newec_course_target_id,achievement_methods} = this.state;
-
-
- for(var j=0; j100){
- // message.error('提交失败!支撑占比不能超过总和100%');
- this.setState({
- Modallists:'提交失败,支撑占比不能超过总和100%',
- meweacoursetype:true,
- newshowredvalue:true,
- percentagetype:true
- })
- this.setState({
- buttomSaveCourseEvaluationsbottom:this.SaveCourseEvaluationsbottom
- })
- return
- }
- if(percentagenum<100){
- // message.error('提交失败!支撑占比不能超过总和100%');
- this.setState({
- Modallists:'提交失败,支撑占比总和要等于100%',
- meweacoursetype:true,
- newshowredvalue:true,
- percentagetype:true
- })
- this.setState({
- buttomSaveCourseEvaluationsbottom:this.SaveCourseEvaluationsbottom
- })
- return
- }
- for(var i=0;i {
- if(response.data.status===0){
- this.setState({
- target_id:null,
- newec_course_idbottom:response.data.ec_course_id,
- buttomSaveCourseEvaluationsbottom:this.SaveCourseEvaluationsbottom,
- // Modallists:response.data.message,
- // eacoursetype:true,
- Modallists:' ',
- meweacoursetype:false,
- achievement_methods:undefined,
- eacoursesavetypes:false,
- newshowredvalue:false,
- ismanager:response.data.is_manager
- })
- // $("#ecCourseEvaluationsbottomsubmit").hide();
- // $("#SystemParametersbottom").hide();
- this.EvaluationsSaveonloadgetdata(response.data.ec_course_id);
- this.getNavigationData(ec_course_id);
-
- }else if(response.data.status===-1){
- this.setState({
- buttomSaveCourseEvaluationsbottom:this.SaveCourseEvaluationsbottom,
- Modallists:response.data.message,
- eacoursetype:true,
- })
- }
- }).catch((error) => {
- console.log(error)
- })
- }
- CancelecCourseEvaluationsbottom=()=>{
- this.setState({
- achievement_methods:undefined,
- target_id:null,
- methodologytype:false,
- Modallists:' ',
- meweacoursetype:false,
- eacoursesavetypes:false,
- newshowredvalue:false,
- percentagetype:false
- })
- // $("#ecCourseEvaluationsbottomsubmit").hide();
- // $("#SystemParametersbottom").hide();
- this.getec_course_achievement_methods();
- }
-
- selectsonFocuslist=(e,key)=>{
- let value =e.course_select_value;
- let {evaluation_subitems_list,totalevaluations_list,achievement_methods} = this.state;
- let newachievement_methods=achievement_methods;
- let newlist=new Object ();
- let location=key;
- let list=totalevaluations_list.evaluations_list;
- this.setState({
- evaluations_lists: evaluation_subitems_list[value],
- evaluation_subitems_lists: evaluation_subitems_list[value][0]
- });
-
- if(newachievement_methods.length===0){
- for(var i=0; i0){
- if(newachievement_methods[location]===undefined){
- newachievement_methods.push(newlist)
- }
- for(var i=0; i{
- this.setState({
- eacoursetype:false
- })
- }
- render() {
- const Option = Select.Option;
- let {schooldata,achievement_list,spinningstate,evaluations_list,evaluations_lists,newec_course_target_id,achievement_methods,ec_course_target_name,buttomSaveCourseEvaluationsbottom,sequenceid,target_id,
- titlemessages,
- Modallists,
- eacoursetype,
- eacoursesavetypes,
- methodologytype,
- newec_course_idbottom,
- meweacoursetype,
- percentagetype,
- ismanager
- } = this.state;
- return (
-
-
-
-
-
-
-
- {/*导航*/}
- {/*
*/}
-
-
-
-
-
-
-
- 课程目标
- 评价环节
- 数据内容
-
- 操作
-
- 评价占比
- 支撑总分值
-
-
- {
- achievement_list.length===0?
}/>:achievement_list.map((item,key)=>{
- return(
-
- {
- item.target_evaluate_data.length===0?
-
-
-
{key+1}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {/* 修改start*/}
-
-
- {/*
*/}
-
-
- {/* 课程目标{sequenceid}:{ec_course_target_name} */}
- 课程目标{key+1}:{ec_course_target_name}
-
-
- {
- achievement_methods===undefined?" ":achievement_methods.map((item,itemkey)=>{
- return(
-
-
-
评价环节
-
-
-
-
-
-
-
-
-
分
-
100&&eacoursesavetypes===true||percentagetype===true?"bor-red": ""}
- onInput={this.handevaluation_CoursePercentag.bind(this)} id={itemkey} style={{ width: '11%' }} placeholder="请输入占比"/>
-
%
-
-
-
-
-
-
- )
- })
- }
-
{Modallists}
-
-
-
- {/* 修改end*/}
-
-
-
-
- :item.target_evaluate_data.map((i,k)=>{
- return(
-
-
-
{key-k===key?key+1:""}
-
-
- {i.evaluate_name}
-
-
- {
- i.evaluation_relates_data.map((y,e)=>{
- return(
- {y.evaluation_relates_name+" "}
- )
- })
- }
-
- {
- key-k===key?
-
- :
-
-
-
- }
-
-
-
- {i.percentage+"%"}
-
-
-
- {i.score}
-
-
-
-
- {/* 修改start*/}
-
-
-
-
- {/* 课程目标{sequenceid}:{ec_course_target_name} */}
- 课程目标{key+1}:{ec_course_target_name}
-
-
- {
- achievement_methods===undefined?" ":achievement_methods.map((item,itemkey)=>{
-
- return(
-
-
-
评价环节
-
-
-
-
-
-
-
-
-
分
-
100&&eacoursesavetypes===true||percentagetype===true?"bor-red": ""}
- onInput={this.handevaluation_CoursePercentag.bind(this)}
- id={itemkey} style={{ width: '11%' }}
- placeholder="请输入占比"/>
-
%
-
-
-
-
-
-
- )
- })
- }
-
{Modallists}
-
-
-
- {/* 修改end*/}
-
-
-
- )
-
- })
- }
-
- )
- })
- }
-
-
-
-
- );
- }
-}
-
-export default SnackbarHOC() ( TPMIndexHOC ( EcCourseEvaluationsbottom ) );
\ No newline at end of file
diff --git a/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js
new file mode 100644
index 000000000..14e104e05
--- /dev/null
+++ b/public/react/src/modules/ecs/subroute/ecCompletion_calculation/EcCompletionCalculation.js
@@ -0,0 +1,814 @@
+import React, { Component } from 'react';
+import classNames from 'classnames'
+
+import axios from 'axios';
+
+import { TPMIndexHOC } from '../../../tpm/TPMIndexHOC';
+
+import { SnackbarHOC } from 'educoder'
+
+import { message,Modal,Spin,Icon} from 'antd';
+
+import 'antd/dist/antd.css';
+
+import EcTitleCourseEvaluations from '../../ecTitle/ecTitle'
+
+import '../../css/ecCourseSupports.css';
+
+import '../../css/ecCourseEvaluations.css';
+
+const $ = window.$;
+class EcCompletionCalculation extends Component {
+ constructor(props) {
+ super(props)
+ this.state={
+ schooldata:{},
+ ecComponentState:"ecCompletion",
+ course_total_score:[],
+ ec_course_targets:0,
+ graduation_list:[],
+ target_list:[],
+ target_score:[],
+ evaluate_result:"",
+ ec_course_targets_count:0,
+ new_target_ec_year_id:0,
+ total_rate_data:undefined,
+ calculatetype:false,
+ ec_course_id:0,
+ morelisttype:false,
+ titlemessage:"提示",
+ completiontype:false,
+ completionlist:"",
+ course_total_scoreaverage:0,
+ calculatesetype:false,
+ Spintype:false,
+ ismanager:false
+ }
+ }
+
+ componentWillMount(){
+ window.document.title = '课程达成评价结果';
+ }
+
+ 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,
+ })
+ .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
+ })
+ }
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+ }
+
+ targetsget_navigation_data=(ec_year_id,ec_course_id)=>{
+ const Url =`/ec_major_schools/get_navigation_data?ec_year_id=`+ec_year_id+"&ec_course_id="+ec_course_id;
+ axios.get(Url, {
+ withCredentials: true,
+ })
+ .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
+ })
+ }
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+ }
+ showmorelist=()=>{
+ this.setState({
+ morelisttype:false
+ })
+ this.UpdateClassData(false)
+ }
+ UpdateClassData=(key)=>{
+ let {calculatetype} =this.state;
+ let ec_course_id =this.props.match.params.ec_course_id;
+ this.setState({
+ ec_course_id:ec_course_id
+ })
+ const Arl =`/ec_courses/`+ec_course_id+`/calculation_info_data`;
+ axios.get(Arl, {
+ withCredentials: true,
+ })
+ .then((response) => {
+
+ if(response.status===200){
+ // var list=[];
+ // if(key===true){
+ // for(var i=0; i
10){
+ newmorelisttype=true
+
+ }
+
+ let course_total_scoreaverage;
+ let newlist=response.data.course_total_score[response.data.course_total_score.length-1].total_rate;
+ for(var i=0; i{
+ this.setState({
+ Spintype:true
+ })
+ let {ec_course_id}=this.state;
+ const Orl =`/ec_courses/`+ec_course_id+`/sync_data`;
+ axios.get(Orl, {
+ withCredentials:true,
+ })
+ .then((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)
+ });
+ }
+ hidecompletion=()=>{
+ this.setState({
+ completiontype:false,
+ completionlist:"",
+ calculatesetype:false
+ })
+ }
+ 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 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})
+ }
+ return target_listres
+ }
+
+ let TargetresLists = (length) => {
+ let target_listress = [];
+ for(let i = 0; i < length; i++) {
+ // target_listres.push(目标{length-i})
+ 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 Total_rate_dataList = (value) => {
+
+ let target_listres = [];
+ if(value!=undefined){
+ for(let i = 0; i < value.length; i++) {
+
+ if(i===value.length-1){
+ target_listres.push(
+ {/*{value[i].total_score}
*/}
+ 100%
+ )
+ }else{
+ target_listres.push(
+ {/*{value[i].score}
*/}
+ {/*占比{(value[i].rate*100).toFixed(2)}%
*/}
+
+ {(value[i].rate*100).toFixed(2)}%
+
+ )
+ }
+
+ }
+ return target_listres
+ }else{
+ target_listres.push(
+ {/*{value[i].total_score}
*/}
+ --
+ )
+ return target_listres
+ }
+ }
+
+ let newTotal_rate_dataList = (length,value) => {
+
+ let target_listres = [];
+ if(value!=undefined){
+ for(let i = 0; i < value.length; i++) {
+
+ // if(i===0){
+ // target_listres.push(
+ // {value[i].score.toFixed(2)}
+ // )
+ // }else{
+ // target_listres.push(
+ // {value[i].score.toFixed(2)}
+ // )
+ // }
+
+ if(i
+ {value[i].score.toFixed(2)}
+ )
+ }
+
+ }
+ return target_listres
+ }
+ }
+ return (
+
+
+
+ {
+ calculatesetype===true?
+
+ :
+
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 课程目标
+ 达成结果
+ 达成标准(分)
+ 实际达成
+ 权重
+
+
+ { Spintype===true?
}/>:"" }
+
+
+ { target_list.length===0&&Spintype===false?
+
+ --
+ --
+ --
+ --
+ --
+ --
+ :""}
+
+
+ {Spintype===false?target_list.map((item,key)=>{
+
+ return(
+
+ {key+1}
+ {item.content}
+ {item.result}
+ {item.standard_grade}
+ {item.real_grade}
+ {item.weigths}
+
+ )
+
+ }):""
+ }
+
+
+
+
+
+
+
+ 毕业要求指标点达成评价结果
+ 注: 代表支持指标点;代表不支持指标点
+
+
+
+
+
+
+ {
+ graduation_list.length===0?
+
+ 毕业要求
+ {5}
+ 达成结果
+ 达成目标值
+ 达成实际值
+ 课程权重
+ {TargetresList(5)}
+
+ :""
+ }
+
+ { Spintype===true?
}/>:"" }
+
+ {
+ graduation_list.length===0&&Spintype===false?
+
+ {/* {item.ec_graduation_name} */}
+ {1}
+ {"--"}
+ {"--"}
+ {"--"}
+ {"--"}
+ 立即配置
+ {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}
+ 达成结果
+ 达成目标值
+ 达成实际值
+ 课程权重
+ {TargetresList(ec_course_targets_count)}
+
+ )
+ }
+
+ }):""
+ }
+
+
+ {
+ 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)}
+
+ )
+
+ }):""
+ }
+
+
+
+
+
+
+
5 ? (180 * total_rate_data+226+16) : 1200+"px"}}>
+ {/*序号*/}
+ 课程目标
+ {/*姓名*/}
+ {/*学号*/}
+ {TargetresLists(total_rate_data-1)}
+ 总评成绩
+
+ {/*style={{width: 113*(total_rate_data+4)>1136?113*(total_rate_data+4.5):1136+"px"}}*/}
+ {
+ // course_total_score.map((i,k)=>{
+
+ // if(k===course_total_score.length-1){
+
+ // return(
+ //
1200?(113*(total_rate_data+4.5))+63:1200+"px"}}>
+ // 占比
+ // {/*colorTransparent*/}
+ // {/* 平均数 */}
+ // {/* 平均数 */}
+ // {/* {Total_rate_dataList(total_rate_data-1,i.total_rate)}
+ //
+ // )
+
+ // }
+
+ // }) */}
+ }
+ { Spintype===true?
}/>:"" }
+ {
+ Spintype===false?
5 ? (180 * total_rate_data+226+16) : 1200 + "px"}}>
+ 占比
+ {/*colorTransparent*/}
+ {/* 平均数 */}
+ {/* 平均数 */}
+ {Total_rate_dataList(course_total_score)}
+ {
+ course_total_score.length===0? --:""
+ }
+ :""
+ }
+ {/*style={{width: 113*(total_rate_data+4)>1136?113*(total_rate_data+4):1136+"px"}}*/}
+ {
+ // course_total_score.map((i,k)=>{
+
+ // if(k!=course_total_score.length-1){
+
+ // return(
+ //
1200?(113*(total_rate_data+4.5))+63:1200+"px"}}>
+ // {/*{k+1}*/}
+ // 平均分
+ // {/*{i.student_scores.name}*/}
+ // {/*{i.student_scores.student_number}*/}
+ // {newTotal_rate_dataList(total_rate_data-1,i.student_scores.target_info)}
+ // {i.student_scores.total_score.toFixed(2)}
+ //
+ // )
+
+ // }
+
+ // })
+ }
+ {
+ Spintype===false?
1200?(113*(total_rate_data+4.5))+63:1200+"px"}}>
+ {/*{k+1}*/}
+ 平均分
+ {/*{i.student_scores.name}*/}
+ {/*{i.student_scores.student_number}*/}
+ {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}
+ }
+ :""
+ }
+
+
+
1136?113*(total_rate_data+4):1136+"px",display:morelisttype===true?"block":"none"}}>
+ this.showmorelist()}>加载更多
+
+
+
+
+
+
+
+
+
+
+
+ 课程目标
+ 平均分
+ 最高分数
+ 最低分数
+ 90分以上
+ 80-89分
+ 70-79分
+ 60-69分
+ 50-59分
+ 低于50分
+
+
+ {
+ Spintype===false?target_score.map((i,k)=>{
+
+ return(
+
+ {k+1}
+ {i.average_score}
+ {i.top_score}
+ {i.low_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_score.length===0&&Spintype===false?
+
+ --
+ --
+ --
+ --
+
+ --人
+ --%
+
+
+ --人
+ --%
+
+
+ --人
+ --%
+
+
+ --人
+ --%
+
+
+ --人
+ --%
+
+
+ --人
+ --%
+
+ :""}
+
+
+
+
+
+ );
+ }
+}
+
+export default SnackbarHOC() ( TPMIndexHOC ( EcCompletionCalculation ) );
+
diff --git a/public/react/src/modules/ecs/subroute/ecCourseEvaluations/EcCourseEvaluationsbottom.js b/public/react/src/modules/ecs/subroute/ecCourseEvaluations/EcCourseEvaluationsbottom.js
new file mode 100644
index 000000000..a8b3e19a7
--- /dev/null
+++ b/public/react/src/modules/ecs/subroute/ecCourseEvaluations/EcCourseEvaluationsbottom.js
@@ -0,0 +1,1039 @@
+import React, { Component } from 'react';
+
+import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
+
+import classNames from 'classnames'
+
+import axios from 'axios';
+
+import { TPMIndexHOC } from '../../tpm/TPMIndexHOC';
+
+import { SnackbarHOC } from 'educoder'
+
+import { Select,InputNumber,message,Modal,Input,Radio,Spin,Icon,Tooltip } from 'antd';
+
+import 'antd/dist/antd.css';
+
+import '../../css/ecCourseEvaluations.css';
+import EcTitleCourseEvaluations from "../../ecTitle/ecTitle";
+
+const $ = window.$;
+
+// 课程目标评价方法
+class EcCourseEvaluationsbottom extends Component {
+ constructor(props) {
+ super(props)
+ this.state={
+ totalevaluations_list:[],
+ ec_course_target_id:0,
+ achievement_list:[],
+ evaluations_listSelec:[],
+ evaluations_lists: [],
+ evaluation_subitems_lists: [],
+ evaluations_list:[],
+ evaluation_subitems_list:{},
+ achievement_methods:[],
+ ec_course_target_name:"",
+ buttomSaveCourseEvaluationsbottom:this.SaveCourseEvaluationsbottom,
+ spinningstate:true,
+ schooldata:{},
+ sequenceid:0,
+ target_id:null,
+ titlemessages:"提示",
+ Modallists:"",
+ eacoursetype:false,
+ eacoursesavetypes:false,
+ newec_course_idbottom:undefined,
+ methodologytype:false,
+ meweacoursetype:false,
+ newshowredvalue:false,
+ percentagetype:false,
+ ismanager:false
+ }
+ }
+ getec_course_achievement_methods=()=>{
+ const {newec_course_idbottom}=this.state;
+ if(newec_course_idbottom!=undefined){
+ const url = `/ec_course_achievement_methods?ec_course_id=`+newec_course_idbottom;
+ axios.get(url, {
+ withCredentials: true,
+ })
+ .then((response)=>{
+ this.setState({
+ achievement_list:response.data.achievement_list,
+ spinningstate:false,
+ ismanager:response.data.is_manager
+ })
+ }).catch(function (error) {
+ console.log(error);
+ });
+ }
+ // this.setState({
+ // achievement_list:[
+ // {target_evaluate_data: [
+ // {
+ // evaluate_id: 24,
+ // evaluate_name: "期末考试",
+ // evaluation_relates_data: [
+ // {evaluation_relates_id: 31, evaluation_relates_name: "期末考试1目标1考题"},
+ // {evaluation_relates_id: 32, evaluation_relates_name: "期末考试1目标2考题"}
+ // ],
+ // percentage: 100,
+ // score: 15
+ // }
+ // ],
+ // target_id: 5
+ // },
+ // ],
+ // spinningstate:false
+ // })
+
+
+ }
+
+ getNavigationData=(ec_course_id)=>{
+ // const jol =`/ec_major_schools/get_navigation_data?ec_year_id=`+ec_year_id+"&ec_course_id="+ec_course_id;
+ const jol =`/ec_major_schools/get_navigation_data?ec_course_id=`+ec_course_id;
+ axios.get(jol, {
+ withCredentials: true,
+ })
+ .then((response) => {
+ if(response.status===200){
+ // if(response.data.allow_visit===false){
+ // window.location.href="/403"
+ // }
+ this.setState({
+ schooldata:response.data
+ })
+ }
+
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+ }
+ componentDidMount(){
+ let ec_course_id=this.props.match.params.ec_course_id;
+ const url = `/ec_course_achievement_methods?ec_course_id=`+ec_course_id;
+ axios.get(url, {
+ withCredentials: true,
+ })
+ .then((response)=>{
+ this.setState({
+ achievement_list:response.data.achievement_list,
+ spinningstate:false,
+ ismanager:response.data.is_manager
+ })
+ }).catch(function (error) {
+ console.log(error);
+ });
+
+ this.getNavigationData(ec_course_id);
+ this.setState({
+ newec_course_idbottom:ec_course_id
+ })
+ }
+ editecCourseEvaluationslist=(e)=>{
+ let id =e.target.getAttribute("target_id");
+ let newid =e.target.name;
+
+ this.setState({
+ buttomSaveCourseEvaluationsbottom:this.SaveCourseEvaluationsbottom,
+ target_id:id,
+ percentagetype:false
+ })
+ // $("#ecCourseEvaluationsbottomsubmit").show();
+ // $("#SystemParametersbottom").show();
+ // let offsettop=$("#ecCourseEvaluationsbottomsubmit").position().top||$("#ecCourseEvaluationsbottomsubmit").scrollTop || $("#ecCourseEvaluationsbottomsubmit").pageYOffset;
+ // window.scrollTo(0, offsettop)
+
+ let {evaluations_list,evaluation_subitems_list,achievement_methods} = this.state;
+ this.setState({
+ achievement_methods:undefined,
+ selectevaluation_phase:[],
+ course_select_value:'',
+ evaluations_lists:[],
+ sequenceid:newid,
+ methodologytype:false,
+ Modallists:' ',
+ meweacoursetype:false,
+ eacoursesavetypes:false,
+ newshowredvalue:false
+ })
+
+ let newevaluations_list=[];
+ let newevaluation_subitems_list=new Object ();
+ let newachievement_methods=[];
+ const url = `/ec_course_achievement_methods/edit_course_target?ec_course_target_id=`+id;
+ axios.get(url, {
+ withCredentials: true,
+ })
+ .then((response)=>{
+ if(response.status===200){
+ if(response.data.evaluation_phase_list.length===0){
+ this.setState({
+ achievement_methods:undefined
+ })
+ let newObject=new Object ();
+ newachievement_methods.push(newObject)
+ }
+
+ if(response.data.evaluation_phase_list.length>0){
+ let evaluation_phase_list=response.data.evaluation_phase_list;
+ let evaluations_list=response.data.evaluations_list;
+ for(var i=0; i{
+
+ let {evaluation_subitems_list,totalevaluations_list,achievement_methods} = this.state;
+ let newachievement_methods=achievement_methods;
+ let newlist=new Object ();
+ let location=keythis.key;
+ let list=totalevaluations_list.evaluations_list;
+ // 点击切换清空
+ for(var z=0; z0){
+ if(newachievement_methods[location]===undefined){
+ newachievement_methods.push(newlist)
+ }
+ for(var i=0; i{
+ let{totalevaluations_list,achievement_methods}=this.state;
+ let newachievement_methods=[];
+ let id;
+ if(value.length>0){
+
+ newachievement_methods=achievement_methods
+ for(var j=0; j{
+ let id=parseInt(keynum.key);
+ let{achievement_methods}=this.state;
+ let newachievement_methods=achievement_methods;
+ for(var i=0; i{
+ let {achievement_methods} = this.state;
+ let newachievement_methods=achievement_methods;
+ let id=e.target.id;
+ var value=parseFloat(e.target.value);
+ for(var i=0; i{
+ let {achievement_methods} = this.state;
+ let newachievement_methods=achievement_methods;
+ let id=e.target.id;
+ let value=parseFloat(e.target.value);
+
+ if(value>100){
+ // message.warning('占比请输入0~100的数');
+ this.setState({
+ Modallists:'占比请输入0~100的数',
+ meweacoursetype:true,
+ newshowredvalue:true
+ })
+ value=100
+ }
+
+ if(value<0){
+ // message.warning('占比请输入0~100的数');
+ this.setState({
+ Modallists:'占比不能小于0',
+ meweacoursetype:true,
+ newshowredvalue:true
+ })
+ value=0
+ }
+
+ if(value===""||value===null||value===undefined){
+ // message.warning('占比请输入0~100的数');
+ this.setState({
+ Modallists:'占比不能为空',
+ meweacoursetype:true,
+ newshowredvalue:true
+ })
+ value=0
+ }
+
+ for(var i=0; i{
+ let {achievement_methods} = this.state;
+ let newachievement_methods=achievement_methods;
+ let newlist=new Object ();
+ newachievement_methods.push(newlist);
+ this.setState({
+ achievement_methods:newachievement_methods
+ });
+ }
+ Delethandevaluation=(e)=>{
+ let {achievement_methods} = this.state;
+ let id =e.target.getAttribute("index");
+ let newachievement_methods=achievement_methods;
+ newachievement_methods.splice(id,1);
+ this.setState({
+ achievement_methods:newachievement_methods
+ });
+ }
+
+
+ EvaluationsSaveonloadgetdata=(id)=>{
+ const url = `/ec_course_achievement_methods?ec_course_id=`+id
+ axios.get(url, {
+ withCredentials: true,
+ })
+ .then((response)=>{
+ this.setState({
+ achievement_list:response.data.achievement_list,
+ spinningstate:false,
+ ismanager:response.data.is_manager
+ })
+
+ }).catch(function (error) {
+ console.log(error);
+ this.setState({
+ spinningstate:false
+ })
+ });
+
+
+ }
+ ecrestoration=()=>{
+ this.setState({
+ buttomSaveCourseEvaluationsbottom:this.SaveCourseEvaluationsbottom
+ })
+ }
+
+ SaveCourseEvaluationsbottom=()=>{
+ let ec_course_id=this.props.match.params.ec_course_id;
+ this.setState({
+ buttomSaveCourseEvaluationsbottom:'',
+ percentagetype:true
+ })
+ let {newec_course_target_id,achievement_methods} = this.state;
+
+
+ for(var j=0; j100){
+ // message.error('提交失败!支撑占比不能超过总和100%');
+ this.setState({
+ Modallists:'提交失败,支撑占比不能超过总和100%',
+ meweacoursetype:true,
+ newshowredvalue:true,
+ percentagetype:true
+ })
+ this.setState({
+ buttomSaveCourseEvaluationsbottom:this.SaveCourseEvaluationsbottom
+ })
+ return
+ }
+ if(percentagenum<100){
+ // message.error('提交失败!支撑占比不能超过总和100%');
+ this.setState({
+ Modallists:'提交失败,支撑占比总和要等于100%',
+ meweacoursetype:true,
+ newshowredvalue:true,
+ percentagetype:true
+ })
+ this.setState({
+ buttomSaveCourseEvaluationsbottom:this.SaveCourseEvaluationsbottom
+ })
+ return
+ }
+ for(var i=0;i {
+ if(response.data.status===0){
+ this.setState({
+ target_id:null,
+ newec_course_idbottom:response.data.ec_course_id,
+ buttomSaveCourseEvaluationsbottom:this.SaveCourseEvaluationsbottom,
+ // Modallists:response.data.message,
+ // eacoursetype:true,
+ Modallists:' ',
+ meweacoursetype:false,
+ achievement_methods:undefined,
+ eacoursesavetypes:false,
+ newshowredvalue:false,
+ ismanager:response.data.is_manager
+ })
+ // $("#ecCourseEvaluationsbottomsubmit").hide();
+ // $("#SystemParametersbottom").hide();
+ this.EvaluationsSaveonloadgetdata(response.data.ec_course_id);
+ this.getNavigationData(ec_course_id);
+
+ }else if(response.data.status===-1){
+ this.setState({
+ buttomSaveCourseEvaluationsbottom:this.SaveCourseEvaluationsbottom,
+ Modallists:response.data.message,
+ eacoursetype:true,
+ })
+ }
+ }).catch((error) => {
+ console.log(error)
+ })
+ }
+ CancelecCourseEvaluationsbottom=()=>{
+ this.setState({
+ achievement_methods:undefined,
+ target_id:null,
+ methodologytype:false,
+ Modallists:' ',
+ meweacoursetype:false,
+ eacoursesavetypes:false,
+ newshowredvalue:false,
+ percentagetype:false
+ })
+ // $("#ecCourseEvaluationsbottomsubmit").hide();
+ // $("#SystemParametersbottom").hide();
+ this.getec_course_achievement_methods();
+ }
+
+ selectsonFocuslist=(e,key)=>{
+ let value =e.course_select_value;
+ let {evaluation_subitems_list,totalevaluations_list,achievement_methods} = this.state;
+ let newachievement_methods=achievement_methods;
+ let newlist=new Object ();
+ let location=key;
+ let list=totalevaluations_list.evaluations_list;
+ this.setState({
+ evaluations_lists: evaluation_subitems_list[value],
+ evaluation_subitems_lists: evaluation_subitems_list[value][0]
+ });
+
+ if(newachievement_methods.length===0){
+ for(var i=0; i0){
+ if(newachievement_methods[location]===undefined){
+ newachievement_methods.push(newlist)
+ }
+ for(var i=0; i{
+ this.setState({
+ eacoursetype:false
+ })
+ }
+ render() {
+ const Option = Select.Option;
+ let {schooldata,achievement_list,spinningstate,evaluations_list,evaluations_lists,newec_course_target_id,achievement_methods,ec_course_target_name,buttomSaveCourseEvaluationsbottom,sequenceid,target_id,
+ titlemessages,
+ Modallists,
+ eacoursetype,
+ eacoursesavetypes,
+ methodologytype,
+ newec_course_idbottom,
+ meweacoursetype,
+ percentagetype,
+ ismanager
+ } = this.state;
+ return (
+
+
+
+
+
+
+
+ {/*导航*/}
+ {/*
*/}
+
+
+ {/*
*/}
+
+ {/*
*/}
+ {/* 课程体系 >*/}
+ {/* {schooldata.ec_course_name} */}
+ {/*
*/}
+
+ {/* /!*课程考核方式与数据来源*!/*/}
+ {/* /!*
*!/*/}
+ {/* /!*
导出培养目标 *!/*/}
+ {/*
*/}
+ {/* 导出评价方法*/}
+ {/* */}
+ {/* */}
+
+ {/*
*/}
+
+ {/*
*/}
+
+
+
+
+ 课程目标
+ 评价环节
+ 数据内容
+
+ 操作
+
+ 评价占比
+ 支撑总分值
+
+
+ {
+ achievement_list.length===0?
}/>:achievement_list.map((item,key)=>{
+ return(
+
+ {
+ item.target_evaluate_data.length===0?
+
+
+
{key+1}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {/* 修改start*/}
+
+
+ {/*
*/}
+
+
+ {/* 课程目标{sequenceid}:{ec_course_target_name} */}
+ 课程目标{key+1}:{ec_course_target_name}
+
+
+ {
+ achievement_methods===undefined?" ":achievement_methods.map((item,itemkey)=>{
+ return(
+
+
+
评价环节
+
+
+
+
+
+
+
+
+
分
+
100&&eacoursesavetypes===true||percentagetype===true?"bor-red": ""}
+ onInput={this.handevaluation_CoursePercentag.bind(this)} id={itemkey} style={{ width: '11%' }} placeholder="请输入占比"/>
+
%
+
+
+
+
+
+
+ )
+ })
+ }
+
{Modallists}
+
+
+
+ {/* 修改end*/}
+
+
+
+
+ :item.target_evaluate_data.map((i,k)=>{
+ return(
+
+
+
{key-k===key?key+1:""}
+
+
+ {i.evaluate_name}
+
+
+ {
+ i.evaluation_relates_data.map((y,e)=>{
+ return(
+ {y.evaluation_relates_name+" "}
+ )
+ })
+ }
+
+ {
+ key-k===key?
+
+ :
+
+
+
+ }
+
+
+
+ {i.percentage+"%"}
+
+
+
+ {i.score}
+
+
+
+
+ {/* 修改start*/}
+
+
+
+
+ {/* 课程目标{sequenceid}:{ec_course_target_name} */}
+ 课程目标{key+1}:{ec_course_target_name}
+
+
+ {
+ achievement_methods===undefined?" ":achievement_methods.map((item,itemkey)=>{
+
+ return(
+
+
+
评价环节
+
+
+
+
+
+
+
+
+
分
+
100&&eacoursesavetypes===true||percentagetype===true?"bor-red": ""}
+ onInput={this.handevaluation_CoursePercentag.bind(this)}
+ id={itemkey} style={{ width: '11%' }}
+ placeholder="请输入占比"/>
+
%
+
+
+
+
+
+
+ )
+ })
+ }
+
{Modallists}
+
+
+
+ {/* 修改end*/}
+
+
+
+ )
+
+ })
+ }
+
+ )
+ })
+ }
+
+
+
+
+ );
+ }
+}
+
+export default SnackbarHOC() ( TPMIndexHOC ( EcCourseEvaluationsbottom ) );
\ No newline at end of file
diff --git a/public/react/src/modules/ecs/subroute/ecCourseSupports.js b/public/react/src/modules/ecs/subroute/ecCourseSupports.js
deleted file mode 100644
index e5f5b6ccd..000000000
--- a/public/react/src/modules/ecs/subroute/ecCourseSupports.js
+++ /dev/null
@@ -1,656 +0,0 @@
-import React, { Component } from 'react';
-
-import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
-
-import classNames from 'classnames'
-
-import axios from 'axios';
-
-import { TPMIndexHOC } from '../../tpm/TPMIndexHOC';
-
-import { SnackbarHOC } from 'educoder'
-
-import { Select,message,Modal,Input,Spin,Icon,Tooltip } from 'antd';
-
-import EcTitleCourseEvaluations from '../ecTitle/ecTitle'
-
-import 'antd/dist/antd.css';
-
-import '../css/ecCourseSupports.css';
-
-const $ = window.$;
-class ecCourseSupports extends Component {
- constructor(props) {
- super(props)
- this.state={
- data:'',
- ec_courses_list:[],
- editcourse:[{"weigths": 0,
- "ec_course_name":'',
- "top_relation": false,
- "ec_course_id":''
- }],
- editnum:0,
- index:0,
- ec_graduation_subitem_id:0,
- ec_year_id:0,
- schooldata:{},
- spinning:true,
- ecComponentState:'ecCourseSupports',
- supportid:null,
- Editkey:null,
- titlemessage:"提示",
- Supportstype:false,
- Supportslist:'',
- Supportssum:false,
- Supportsclass:false
- }
- }
-
- componentWillMount(){
- this.setState({
- ec_year_id:this.props.match.params.ec_year_id,
- major_school_id:this.props.match.params.major_school_id
- })
- window.document.title = '课程体系 vs 毕业要求';
- }
-
- UpdateClassData=()=>{
- let ec_year_id=this.props.match.params.ec_year_id;
-
- this.setState({
- ec_year_id:ec_year_id
- })
- const jol =`/ec_major_schools/get_navigation_data?ec_year_id=`+ec_year_id;
- axios.get(jol, {
- withCredentials: true,
- })
- .then((response) => {
- if(response.status===200){
- // if(response.data.allow_visit===false){
- // window.location.href="/403"
- // }
- this.setState({
- schooldata:response.data
- })
- }
- })
- .catch(function (error) {
- console.log(error);
- });
-
-
- const url = `/ec_course_supports?ec_year_id=`+ec_year_id;
- axios.get(url, {
- withCredentials: true,
- })
- .then((response) => {
- if(response.status===200){
- this.setState({
- data:response.data
- })
- }
- if(response.data.course_support_data.length===0){
- this.setState({
- Supportstype:true,
- Supportslist:'数据为空,请去毕业要求——>毕业要求指标点分解列表配置数据'
- })
- }
- })
- .catch(function (error) {
- console.log(error);
- });
-
- // this.setState({
- // data:{course_count: 14,
- // course_support_data: [
- // {course_data: [{
- // name: "军事课堂",
- // top_relation: true,
- // weigths: 0.1
- // }, {
- // name: "大学生心理健康教育",
- // top_relation: true,
- // weigths: 0.2
- // }],
- // ec_graduation_subitem_id: 2,
- // num_total: 2,
- // sequence_num: "1-1",
- // weights_total: 0.30000000000000004,
- // },
- // ],
- // course_url: "/ec_major_schools/1/academic_years/1/ec_course_setting",
- // ec_year_id: 1,
- // max_support_count: 12,
- // subitems_count: 7,
- // subitems_url: "/ec_major_schools/1/academic_years/1/graduation_requirement"
- // }
- // })
-
- }
- componentDidMount(){
- this.setState({
- ec_year_id:this.props.match.params.ec_year_id,
- major_school_id:this.props.match.params.major_school_id
- })
- this.UpdateClassData();
-
- }
- EditSupportCourse=(key,e)=>{
- $('#school_major_list').scrollLeft(0);
- let id=e.target.id;
- id=parseInt(id);
-
- let subindex =e.target.getAttribute("subindex");
- const url = `/ec_course_supports/edit_require_vs_course?subitem_id=`+id
- axios.get(url, {
- withCredentials: true,
- })
- .then((response) => {
-
- if(response.status===200){
- var support_data;
- if(response.data.edit_support_data.length>0){
- support_data=response.data.edit_support_data;
- }else if(response.data.edit_support_data.length===0){
- support_data=[{weights: 0,top_relation: false,ec_course_name:'',ec_course_id:''}];
- }
-
- this.setState({
- ec_courses_list:response.data.ec_courses_list,
- editcourse:support_data,
- index:subindex,
- ec_graduation_subitem_id:id,
- Supportssum:false,
- Supportsclass:false,
- })
-
- let {editcourse} =this.state;
- let neweditcourse=editcourse;
- let newnum=0;
- for(var j=0;j
{
- let {editcourse} =this.state;
- let neweditcourse=editcourse;
- let newadd = {weigths: 0,top_relation: false,ec_course_name:'',ec_course_id:''};
- neweditcourse.push(newadd);
- this.setState({
- editcourse:neweditcourse
- })
- }
- editcourse=(neweditcourse)=>{
- this.setState({
- editcourse:neweditcourse
- })
-
- }
-
- Deletcourse=(e)=>{
- // 删除
- // let id =e.target.getAttribute("index");
- let {editcourse} = this.state;
- let neweditcourse=editcourse;
- neweditcourse.splice(e,1);
- let newnum=0;
- for(var j=0;j{
- let {editcourse} = this.state;
- let neweditcourse=editcourse;
- var id=e.target.id;
- var value=parseFloat(e.target.value);
- if(isNaN(value)){
- value=""
- }
- var x = String(value).indexOf('.') + 1;
- var y = String(value).length - x;
- if(y > 2){
- this.setState({
- // Supportstype:true,
- Supportslist:'请精确到2位数',
- Supportssum:true
- })
- return
- }
-
-
- const person = new Object ();
- person.weigths=value;
- person.ec_course_id= neweditcourse[id].ec_course_id;
- person.ec_course_name=neweditcourse[id].ec_course_name;
- person.top_relation=neweditcourse[id].top_relation;
-
-
- neweditcourse[id]=person;
-
- let newnum=0;
- for(var j=0;j1){
- this.setState({
- // Supportstype:true,
- Supportslist:'权重之和不能大于1',
- Supportssum:true
- })
- }
-
- }
- handleChange=(e)=> {
-
- let {editcourse} = this.state;
- let value=`${e[0]}`;
- value=parseInt(value)
- let neweditcourse=editcourse;
- let num=`${e[1]}`;
- num=parseInt(num)
-
- for(var z=0;z{
-
- let {editcourse} = this.state;
- let neweditcourse=editcourse;
- let id =e.target.getAttribute("itindex");
- for(var i=0;i<1;i++){
- neweditcourse[id].top_relation=false;
- }
-
- this.editcourse(neweditcourse);
- }
-
- relevancebottom=(e)=>{
-
- let {editcourse} = this.state;
- let neweditcourse=editcourse;
- let id =e.target.getAttribute("itindex");
- for(var i=0;i<1;i++){
- neweditcourse[id].top_relation=true;
- }
-
- this.editcourse(neweditcourse);
- }
- focus() {
- this.inputNumberRef.focus();
- }
-
- blur() {
- this.inputNumberRef.blur();
- }
- CancelSupports=()=>{
- this.setState({
- Editkey:null,
- Supportssum:false,
- Supportsclass:false,
- })
- }
- SubmitClassData=()=>{
- let {editcourse,editnum,ec_graduation_subitem_id,ec_year_id} = this.state;
- if(editcourse.length===0){
- this.setState({
- // Supportstype:true,
- Supportslist:'保存失败,至少保留一个课程',
- Supportssum:true
- })
- return
- }
- if(editnum>1||editnum===0){
- this.setState({
- // Supportstype:true,
- Supportslist:'保存失败,权重大于1或为空',
- Supportssum:true
- })
- return
- }
- for(var p=0; p {
-
- if(response.data.status===0){
- this.setState({
- Editkey:null,
- Supportslist:response.data.messsage,
- Supportstype:true,
- Supportssum:false,
- Supportsclass:false,
- })
- this.UpdateClassData();
- }else if(response.data.status===-1){
- this.setState({
- Supportslist:"参数错误",
- Supportstype:true,
- Supportssum:false,
- Supportsclass:false,
- })
- }
- }).catch((error) => {
- console.log(error)
- })
- }
- Deletcourses=(key)=>{
- this.setState({
- supportid:key,
- Supportslist:"您确定要删除吗?",
- Supportstype:true
- })
- }
- hideSupports=()=>{
- this.setState({
- Supportstype:false,
- supportid:null,
- Supportslist:"",
- })
- }
- render() {
- const Option = Select.Option;
- let {data,ec_courses_list,editcourse,editnum,index,ec_year_id,schooldata,ecComponentState,hidesupport,supportid,Editkey,titlemessage,Supportstype,Supportslist,Supportssum,Supportsclass,major_school_id} = this.state;
- var list = (length) => {
- var res = [];
- for(var i = 0; i < length; i++) {
- res.push(
- 支撑课程
-
(权值)
-
- )
- }
- return res
- }
-
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
1200? 140*data.max_support_count : 1200+"px"}}>
- 毕业要求指标点
- {list(data.max_support_count<5||data.max_support_count===undefined?5:data.max_support_count)}
- 合计
-
-
- {
- data.course_support_data===undefined?
}/>:data.course_support_data.map((item,key)=>{
-
- return (
-
1134 ? 136*data.max_support_count : 1134+"px",margin: '0px 0px'}}>
-
- {item.sequence_num}
-
-
-
- {
- item.course_data.map((t,kes)=>{
- return(
-
- {t.name.length>12?t.name.substring(0, 10)+"...":t.name}
- ({t.weigths})
-
- )
-
- })
- }
-
-
-
-
-
{item.num_total===0?" ":item.num_total}
-
{Math.round(item.weights_total*100)/100===0?" ":(Math.round(item.weights_total*100)/100)}
-
-
- {data.is_manager===false?"":
-
- }
-
-
-
-
-
-
-
-
- 指标点 {index}
- 支撑课程
-
- 权重(∑=1)
- (精确到两位小数)
-
- 关联度最高
-
-
-
-
- {
- editcourse.map((it,key)=>{
-
- return(
-
-
-
-
-
-
-
-
- )
- })
- }
-
-
- {Supportslist}
-
- 合计: {editcourse.length}
- 合计: {editnum}
-
-
-
-
-
-
-
-
- )
- })
- }
-
-
-
-
-
- );
- }
-}
-
-export default SnackbarHOC() ( TPMIndexHOC ( ecCourseSupports ) );
-
diff --git a/public/react/src/modules/ecs/subroute/ecCourseSupports/EcCourseSupports.js b/public/react/src/modules/ecs/subroute/ecCourseSupports/EcCourseSupports.js
new file mode 100644
index 000000000..0523e0e24
--- /dev/null
+++ b/public/react/src/modules/ecs/subroute/ecCourseSupports/EcCourseSupports.js
@@ -0,0 +1,656 @@
+import React, { Component } from 'react';
+
+import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
+
+import classNames from 'classnames'
+
+import axios from 'axios';
+
+import { TPMIndexHOC } from '../../../tpm/TPMIndexHOC';
+
+import { SnackbarHOC } from 'educoder'
+
+import { Select,message,Modal,Input,Spin,Icon,Tooltip } from 'antd';
+
+import EcTitleCourseEvaluations from '../../ecTitle/ecTitle'
+
+import 'antd/dist/antd.css';
+
+import '../../css/ecCourseSupports.css';
+
+const $ = window.$;
+class EcCourseSupports extends Component {
+ constructor(props) {
+ super(props)
+ this.state={
+ data:'',
+ ec_courses_list:[],
+ editcourse:[{"weigths": 0,
+ "ec_course_name":'',
+ "top_relation": false,
+ "ec_course_id":''
+ }],
+ editnum:0,
+ index:0,
+ ec_graduation_subitem_id:0,
+ ec_year_id:0,
+ schooldata:{},
+ spinning:true,
+ ecComponentState:'EcCourseSupports',
+ supportid:null,
+ Editkey:null,
+ titlemessage:"提示",
+ Supportstype:false,
+ Supportslist:'',
+ Supportssum:false,
+ Supportsclass:false
+ }
+ }
+
+ componentWillMount(){
+ this.setState({
+ ec_year_id:this.props.match.params.ec_year_id,
+ major_school_id:this.props.match.params.major_school_id
+ })
+ window.document.title = '课程体系 vs 毕业要求';
+ }
+
+ UpdateClassData=()=>{
+ let ec_year_id=this.props.match.params.ec_year_id;
+
+ this.setState({
+ ec_year_id:ec_year_id
+ })
+ const jol =`/ec_major_schools/get_navigation_data?ec_year_id=`+ec_year_id;
+ axios.get(jol, {
+ withCredentials: true,
+ })
+ .then((response) => {
+ if(response.status===200){
+ // if(response.data.allow_visit===false){
+ // window.location.href="/403"
+ // }
+ this.setState({
+ schooldata:response.data
+ })
+ }
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+
+
+ const url = `/ec_course_supports?ec_year_id=`+ec_year_id;
+ axios.get(url, {
+ withCredentials: true,
+ })
+ .then((response) => {
+ if(response.status===200){
+ this.setState({
+ data:response.data
+ })
+ }
+ if(response.data.course_support_data.length===0){
+ this.setState({
+ Supportstype:true,
+ Supportslist:'数据为空,请去毕业要求——>毕业要求指标点分解列表配置数据'
+ })
+ }
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+
+ // this.setState({
+ // data:{course_count: 14,
+ // course_support_data: [
+ // {course_data: [{
+ // name: "军事课堂",
+ // top_relation: true,
+ // weigths: 0.1
+ // }, {
+ // name: "大学生心理健康教育",
+ // top_relation: true,
+ // weigths: 0.2
+ // }],
+ // ec_graduation_subitem_id: 2,
+ // num_total: 2,
+ // sequence_num: "1-1",
+ // weights_total: 0.30000000000000004,
+ // },
+ // ],
+ // course_url: "/ec_major_schools/1/academic_years/1/ec_course_setting",
+ // ec_year_id: 1,
+ // max_support_count: 12,
+ // subitems_count: 7,
+ // subitems_url: "/ec_major_schools/1/academic_years/1/graduation_requirement"
+ // }
+ // })
+
+ }
+ componentDidMount(){
+ this.setState({
+ ec_year_id:this.props.match.params.ec_year_id,
+ major_school_id:this.props.match.params.major_school_id
+ })
+ this.UpdateClassData();
+
+ }
+ EditSupportCourse=(key,e)=>{
+ $('#school_major_list').scrollLeft(0);
+ let id=e.target.id;
+ id=parseInt(id);
+
+ let subindex =e.target.getAttribute("subindex");
+ const url = `/ec_course_supports/edit_require_vs_course?subitem_id=`+id
+ axios.get(url, {
+ withCredentials: true,
+ })
+ .then((response) => {
+
+ if(response.status===200){
+ var support_data;
+ if(response.data.edit_support_data.length>0){
+ support_data=response.data.edit_support_data;
+ }else if(response.data.edit_support_data.length===0){
+ support_data=[{weights: 0,top_relation: false,ec_course_name:'',ec_course_id:''}];
+ }
+
+ this.setState({
+ ec_courses_list:response.data.ec_courses_list,
+ editcourse:support_data,
+ index:subindex,
+ ec_graduation_subitem_id:id,
+ Supportssum:false,
+ Supportsclass:false,
+ })
+
+ let {editcourse} =this.state;
+ let neweditcourse=editcourse;
+ let newnum=0;
+ for(var j=0;j{
+ let {editcourse} =this.state;
+ let neweditcourse=editcourse;
+ let newadd = {weigths: 0,top_relation: false,ec_course_name:'',ec_course_id:''};
+ neweditcourse.push(newadd);
+ this.setState({
+ editcourse:neweditcourse
+ })
+ }
+ editcourse=(neweditcourse)=>{
+ this.setState({
+ editcourse:neweditcourse
+ })
+
+ }
+
+ Deletcourse=(e)=>{
+ // 删除
+ // let id =e.target.getAttribute("index");
+ let {editcourse} = this.state;
+ let neweditcourse=editcourse;
+ neweditcourse.splice(e,1);
+ let newnum=0;
+ for(var j=0;j{
+ let {editcourse} = this.state;
+ let neweditcourse=editcourse;
+ var id=e.target.id;
+ var value=parseFloat(e.target.value);
+ if(isNaN(value)){
+ value=""
+ }
+ var x = String(value).indexOf('.') + 1;
+ var y = String(value).length - x;
+ if(y > 2){
+ this.setState({
+ // Supportstype:true,
+ Supportslist:'请精确到2位数',
+ Supportssum:true
+ })
+ return
+ }
+
+
+ const person = new Object ();
+ person.weigths=value;
+ person.ec_course_id= neweditcourse[id].ec_course_id;
+ person.ec_course_name=neweditcourse[id].ec_course_name;
+ person.top_relation=neweditcourse[id].top_relation;
+
+
+ neweditcourse[id]=person;
+
+ let newnum=0;
+ for(var j=0;j1){
+ this.setState({
+ // Supportstype:true,
+ Supportslist:'权重之和不能大于1',
+ Supportssum:true
+ })
+ }
+
+ }
+ handleChange=(e)=> {
+
+ let {editcourse} = this.state;
+ let value=`${e[0]}`;
+ value=parseInt(value)
+ let neweditcourse=editcourse;
+ let num=`${e[1]}`;
+ num=parseInt(num)
+
+ for(var z=0;z{
+
+ let {editcourse} = this.state;
+ let neweditcourse=editcourse;
+ let id =e.target.getAttribute("itindex");
+ for(var i=0;i<1;i++){
+ neweditcourse[id].top_relation=false;
+ }
+
+ this.editcourse(neweditcourse);
+ }
+
+ relevancebottom=(e)=>{
+
+ let {editcourse} = this.state;
+ let neweditcourse=editcourse;
+ let id =e.target.getAttribute("itindex");
+ for(var i=0;i<1;i++){
+ neweditcourse[id].top_relation=true;
+ }
+
+ this.editcourse(neweditcourse);
+ }
+ focus() {
+ this.inputNumberRef.focus();
+ }
+
+ blur() {
+ this.inputNumberRef.blur();
+ }
+ CancelSupports=()=>{
+ this.setState({
+ Editkey:null,
+ Supportssum:false,
+ Supportsclass:false,
+ })
+ }
+ SubmitClassData=()=>{
+ let {editcourse,editnum,ec_graduation_subitem_id,ec_year_id} = this.state;
+ if(editcourse.length===0){
+ this.setState({
+ // Supportstype:true,
+ Supportslist:'保存失败,至少保留一个课程',
+ Supportssum:true
+ })
+ return
+ }
+ if(editnum>1||editnum===0){
+ this.setState({
+ // Supportstype:true,
+ Supportslist:'保存失败,权重大于1或为空',
+ Supportssum:true
+ })
+ return
+ }
+ for(var p=0; p {
+
+ if(response.data.status===0){
+ this.setState({
+ Editkey:null,
+ Supportslist:response.data.messsage,
+ Supportstype:true,
+ Supportssum:false,
+ Supportsclass:false,
+ })
+ this.UpdateClassData();
+ }else if(response.data.status===-1){
+ this.setState({
+ Supportslist:"参数错误",
+ Supportstype:true,
+ Supportssum:false,
+ Supportsclass:false,
+ })
+ }
+ }).catch((error) => {
+ console.log(error)
+ })
+ }
+ Deletcourses=(key)=>{
+ this.setState({
+ supportid:key,
+ Supportslist:"您确定要删除吗?",
+ Supportstype:true
+ })
+ }
+ hideSupports=()=>{
+ this.setState({
+ Supportstype:false,
+ supportid:null,
+ Supportslist:"",
+ })
+ }
+ render() {
+ const Option = Select.Option;
+ let {data,ec_courses_list,editcourse,editnum,index,ec_year_id,schooldata,ecComponentState,hidesupport,supportid,Editkey,titlemessage,Supportstype,Supportslist,Supportssum,Supportsclass,major_school_id} = this.state;
+ var list = (length) => {
+ var res = [];
+ for(var i = 0; i < length; i++) {
+ res.push(
+ 支撑课程
+
(权值)
+
+ )
+ }
+ return res
+ }
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
1200? 140*data.max_support_count : 1200+"px"}}>
+ 毕业要求指标点
+ {list(data.max_support_count<5||data.max_support_count===undefined?5:data.max_support_count)}
+ 合计
+
+
+ {
+ data.course_support_data===undefined?
}/>:data.course_support_data.map((item,key)=>{
+
+ return (
+
1134 ? 136*data.max_support_count : 1134+"px",margin: '0px 0px'}}>
+
+ {item.sequence_num}
+
+
+
+ {
+ item.course_data.map((t,kes)=>{
+ return(
+
+ {t.name.length>12?t.name.substring(0, 10)+"...":t.name}
+ ({t.weigths})
+
+ )
+
+ })
+ }
+
+
+
+
+
{item.num_total===0?" ":item.num_total}
+
{Math.round(item.weights_total*100)/100===0?" ":(Math.round(item.weights_total*100)/100)}
+
+
+ {data.is_manager===false?"":
+
+ }
+
+
+
+
+
+
+
+
+ 指标点 {index}
+ 支撑课程
+
+ 权重(∑=1)
+ (精确到两位小数)
+
+ 关联度最高
+
+
+
+
+ {
+ editcourse.map((it,key)=>{
+
+ return(
+
+
+
+
+
+
+
+
+ )
+ })
+ }
+
+
+ {Supportslist}
+
+ 合计: {editcourse.length}
+ 合计: {editnum}
+
+
+
+
+
+
+
+
+ )
+ })
+ }
+
+
+
+
+
+ );
+ }
+}
+
+export default SnackbarHOC() ( TPMIndexHOC ( ecCourseSupports ) );
+