diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 89d53e73c..317383d5a 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -23,23 +23,23 @@ class ApplicationController < ActionController::Base # 所有请求必须合法签名 def check_sign - unless Rails.env.development? - Rails.logger.info("66666 #{params}") - suffix = request.url.split(".").last.split("?").first - suffix_arr = ["xls", "xlsx", "pdf"] # excel文件先注释 - unless suffix_arr.include?(suffix) - if params[:client_key].present? - randomcode = params[:randomcode] - # tip_exception(501, "请求不合理") unless (Time.now.to_i - randomcode.to_i).between?(0,5) - - sign = Digest::MD5.hexdigest("#{OPENKEY}#{randomcode}") - Rails.logger.info("2222 #{sign}") - tip_exception(501, "请求不合理") if sign != params[:client_key] - else - tip_exception(501, "请求不合理") - end - end - end + # unless Rails.env.development? + # Rails.logger.info("66666 #{params}") + # suffix = request.url.split(".").last.split("?").first + # suffix_arr = ["xls", "xlsx", "pdf"] # excel文件先注释 + # unless suffix_arr.include?(suffix) + # if params[:client_key].present? + # randomcode = params[:randomcode] + # # tip_exception(501, "请求不合理") unless (Time.now.to_i - randomcode.to_i).between?(0,5) + # + # sign = Digest::MD5.hexdigest("#{OPENKEY}#{randomcode}") + # Rails.logger.info("2222 #{sign}") + # tip_exception(501, "请求不合理") if sign != params[:client_key] + # else + # tip_exception(501, "请求不合理") + # end + # end + # end end # 全局配置参数 diff --git a/app/controllers/discusses_controller.rb b/app/controllers/discusses_controller.rb index e7d692de5..c2cc8f933 100644 --- a/app/controllers/discusses_controller.rb +++ b/app/controllers/discusses_controller.rb @@ -15,7 +15,7 @@ class DiscussesController < ApplicationController disscusses = Discuss.where(:dis_id => @container.id, :dis_type => @container.class.to_s, :root_id => nil) @discusses = disscusses.joins("left join games on discusses.challenge_id = games.challenge_id and discusses.user_id = games.user_id") - .select("discusses.*, games.identifier").includes(:user, :praise_treads) + .select("discusses.*, games.identifier").includes(:user, :praise_treads).limit(LIMIT).offset(offset) else disscusses = Discuss.where("dis_id = :dis_id and dis_type = :dis_type and root_id is null and (discusses.hidden = :hidden or discusses.user_id = :user_id)", diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 7b3cb7588..f86ade58f 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -893,7 +893,8 @@ class ShixunsController < ApplicationController content = upload_file.tempfile.read author_name = current_user.real_name author_email = current_user.git_mail - update_file_content(content, @repo_path, @path, author_email, author_name, "upload file by browser") + message = params[:message] || "upload file by browser" + update_file_content(content, @repo_path, @path, author_email, author_name, message) render_ok end @@ -901,14 +902,16 @@ class ShixunsController < ApplicationController def upload_git_folder author_name = current_user.real_name author_email = current_user.git_mail - git_add_folder(@path, author_name, author_email, "upload folder by browser") + message = params[:message] || "upload folder by browser" + git_add_folder(@path, author_name, author_email, message) render_ok end def delete_git_file author_name = current_user.real_name author_email = current_user.git_mail - git_delete_file(@path, author_name, author_email, "delete filer by browser") + message = params[:message] || "delete file by browser" + git_delete_file(@path, author_name, author_email, message) render_ok end diff --git a/public/react/config/webpack.config.dev.js b/public/react/config/webpack.config.dev.js index 4e28af31f..d1092894a 100644 --- a/public/react/config/webpack.config.dev.js +++ b/public/react/config/webpack.config.dev.js @@ -30,7 +30,7 @@ const env = getClientEnvironment(publicUrl); module.exports = { // You may want 'eval' instead if you prefer to see the compiled output in DevTools. // See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s - devtool: "cheap-module-eval-source-map", + //devtool: "cheap-module-eval-source-map", // 开启调试 //devtool: "source-map", // 开启调试 // These are the "entry points" to our application. diff --git a/public/react/config/webpack.config.prod.js b/public/react/config/webpack.config.prod.js index 596843f5f..1fe7a6c93 100644 --- a/public/react/config/webpack.config.prod.js +++ b/public/react/config/webpack.config.prod.js @@ -326,8 +326,8 @@ module.exports = { comments: false }, compress: { - drop_debugger: false, - drop_console: false + drop_debugger: true, + drop_console: true } } }), diff --git a/public/react/public/css/edu-all.css b/public/react/public/css/edu-all.css index 66adaf482..061cee521 100644 --- a/public/react/public/css/edu-all.css +++ b/public/react/public/css/edu-all.css @@ -174,7 +174,7 @@ em.vertical-line{display: inline-block;width: 2px;background: #999;height: 10px} .user_navlist_white a:hover{color: #4cacff} .headIcon{height: 100%;box-sizing: border-box; margin: 0px!important;} .black_nav_list{padding: 4px 0px;box-sizing: border-box;height: 100%;} -.black_nav_list li{line-height: 42px;height: 42px;color: #fff;cursor: pointer;} +.black_nav_list li{line-height: 40px;height: 40px;color: #fff;cursor: pointer;} .black_nav_span{display: block;margin:0px 20px;border-bottom: 1px solid #4B4B4B;padding-left: 8px;color: #FAFAFA} .welcome_shixun_index:last-child .black_nav_span{border-bottom: none} .black_nav_list li:hover{background: #fff;} diff --git a/public/react/src/App.js b/public/react/src/App.js index ac35560a6..ee986824a 100644 --- a/public/react/src/App.js +++ b/public/react/src/App.js @@ -318,6 +318,16 @@ const Testpaperlibrary= Loadable({ loader: () => import('./modules/testpaper/Testpaperlibrary'), loading: Loading }) +//试卷编辑 +const Paperlibraryeditid= Loadable({ + loader: () => import('./modules/testpaper/Paperlibraryeditid'), + loading: Loading +}) +//试卷查看 +const Paperlibraryseeid= Loadable({ + loader: () => import('./modules/testpaper/Paperlibraryseeid'), + loading: Loading +}) //人工组卷 const Paperreview= Loadable({ loader: () => import('./modules/question/Paperreview'), @@ -744,17 +754,26 @@ class App extends Component { } } /> - + () + } + /> () } /> - () - } - /> + + () + }/> + + () + }/> () @@ -772,15 +791,15 @@ class App extends Component { render={ (props) => () } /> - - () - }/> () }/> + () + }/> + () diff --git a/public/react/src/modules/courses/exercise/new/SingleDisplay.js b/public/react/src/modules/courses/exercise/new/SingleDisplay.js index 4b8d9ee95..6b84df8ce 100644 --- a/public/react/src/modules/courses/exercise/new/SingleDisplay.js +++ b/public/react/src/modules/courses/exercise/new/SingleDisplay.js @@ -102,7 +102,7 @@ class SingleDisplay extends Component{ display: "flex", flexDirection:"row", }} key={optionIndex}> - {prefix} + {prefix} @@ -116,7 +116,7 @@ class SingleDisplay extends Component{ display: "flex", flexDirection:"row", }} key={optionIndex}> - {prefix} + {prefix} diff --git a/public/react/src/modules/developer/components/knowledge/index.js b/public/react/src/modules/developer/components/knowledge/index.js index b287a42c9..680229b2d 100644 --- a/public/react/src/modules/developer/components/knowledge/index.js +++ b/public/react/src/modules/developer/components/knowledge/index.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-12-30 13:51:19 * @LastEditors : tangjiang - * @LastEditTime : 2020-01-03 09:32:24 + * @LastEditTime : 2020-01-03 18:56:36 */ import './index.scss'; import React, { useState, useEffect } from 'react'; @@ -49,7 +49,8 @@ function KnowLedge (props) { } // 过滤下拉列表项 const handleSelectChange = (value) => { - value = +value.join(''); + // value = +value.join(''); + value = +value; const tempArr = [...selectValue]; const _result = selectOptions.filter(item => { if (item.id === value && tempArr.findIndex(t => t.id === value) === -1) { @@ -103,7 +104,7 @@ function KnowLedge (props) { return ( + + this.NewknTypedeldel(true)}/> @@ -551,7 +567,7 @@ class Itembankstop extends Component { {this.state.Knowpoints === undefined ? "" : this.state.Knowpoints.map((object, index) => { return ( -

{object.name}

@@ -562,6 +578,9 @@ class Itembankstop extends Component { ) })} + + +
)} @@ -575,7 +594,7 @@ class Itembankstop extends Component { rules: [{required: true, message: '请选择题型'}], } )( - + - - - - - - - )} - - + {/*
*/} + {/**/} + {/* {getFieldDecorator("rbtx",*/} + {/* {*/} + {/* rules: [{required: true, message: '请选择题型'}],*/} + {/* }*/} + {/* )(*/} + {/* */} + {/* */} + {/* */} + {/* )}*/} + {/**/} + {/*
*/} +
+ { + NewknTypedel? + this.NewknTypedeldel(bool)} + NewknTypedeltyoedel={(value)=>this.NewknTypedeltyoedel(value)} + > + :"" + } + +
+ + + {getFieldDecorator("rbkc", + { + rules: [{required: true, message: '请选择课程'}], + } + )( +
+ + + + +
+ )} +
+ + {getFieldDecorator("rbzsd" + )( +
+ + + + + + + this.NewknTypedeldel(true)}/> + + +
+ + {this.state.Knowpoints === undefined ? "" : this.state.Knowpoints.map((object, index) => { + return ( +
+

{object.name}

+ + this.deletesobject(object, index)} src={getImageUrl("/images/educoder/bzucha.png")}/> + +
+ ) + })} + + + + +
+
+ )} +
+ + +
+ +
+ + {getFieldDecorator('classroom', { + rules: [{required: true, message: "不能为空"}], + })( + + + + + )} +
+
+
+ +
+ +
+ + + {getFieldDecorator('kssc')()} + 分钟 + +
+ + + +
+ + {getFieldDecorator('rbnd', + { + rules: [{required: true, message: '请选择难度'}], + } + )( + + 简单 + 适中 + 困难 + , + )} + +
+
+
+ + ) + + } + + +} + +const Comthetestpapersts = Form.create({name: 'Comthetestpaperst'})(Comthetestpaperst); +export default Comthetestpapersts; diff --git a/public/react/src/modules/testpaper/Paperlibraryeditid.js b/public/react/src/modules/testpaper/Paperlibraryeditid.js new file mode 100644 index 000000000..ba8cb6926 --- /dev/null +++ b/public/react/src/modules/testpaper/Paperlibraryeditid.js @@ -0,0 +1,270 @@ +import React, {Component} from "react"; +import {Link, NavLink} from 'react-router-dom'; +import {WordsBtn, ActionBtn, SnackbarHOC, getImageUrl} from 'educoder'; +import axios from 'axios'; +import { + notification, + Spin, + Table, + Pagination, + Drawer, + Input, + Button, + Breadcrumb +} from "antd"; +import {TPMIndexHOC} from "../tpm/TPMIndexHOC"; +import NoneData from './component/NoneData'; +import './testioncss/testioncss.css'; +import '../tpm/newshixuns/css/Newshixuns.css'; +import Bottomsubmit from "../../modules/modals/Bottomsubmit"; +import Seeoagertits from "./component/Seeoagertits"; +import Paperlibraryseeid_item from './component/Paperlibraryseeid_item'; +import Comthetestpaperst from '../question/comthetestpaper/Comthetestpaperst'; +import Paperlibraryseeid_itemss from './component/Paperlibraryseeid_itemss'; +import JudquestionEditor from "../question/component/JudquestionEditor"; + +//人工组卷预览 +class Paperlibraryeditid extends Component { + constructor(props) { + super(props); + this.Judquestio = React.createRef(); + this.state = { + paperlibrartdata: [], + disciplinesdata: [], + knowledgepoints: [], + disciplmy: [], + item_banksedit: [] + } + + + } + + getJudquestio = (Ref) => { + console.log("子组件对象"); + console.log(Ref); + this.Judquestio = Ref; + } + + //初始化 + componentDidMount() { + this.getdata(); + let urls = `/disciplines.json`; + axios.get(urls, { + params: { + source: "question" + } + }).then((response) => { + if (response) { + this.setState({ + disciplinesdata: response.data.disciplines, + }) + if (response.data) { + if (response.data.disciplines) { + + const didata = response.data.disciplines; + + for (var i = 0; i < didata.length; i++) { + const childern = []; + //方向 + const fxdidata = didata[i].sub_disciplines; + + + for (var j = 0; j < fxdidata.length; j++) { + //课程 + const zsddata = fxdidata[j].tag_disciplines; + childern.push( + { + value: fxdidata[j].id, + label: fxdidata[j].name, + } + ) + for (var k = 0; k < zsddata.length; k++) { + //知识点 + this.state.knowledgepoints.push(zsddata[k]); + + + } + } + + const datakec = { + value: didata[i].id, + label: didata[i].name, + children: childern, + } + this.state.disciplmy.push(datakec); + } + + this.setState({ + knowledgepoints: this.state.knowledgepoints, + disciplmy: this.state.disciplmy, + }) + + + } + + } + + } + }); + + } + + + getdata = () => { + let urls = `/examination_banks/${this.props.match.params.id}.json`; + axios.get(urls).then((response) => { + if (response) { + this.setState({ + paperlibrartdata: response.data, + item_banksedit: response.data.exam, + }) + } + }); + + } + + + //跳转道描点的地方 + scrollToAnchor = (anchorName) => { + try { + if (anchorName) { + // 找到锚点 + let anchorElement = document.getElementById(anchorName); + // 如果对应id的锚点存在,就跳转到锚点 + if (anchorElement) { + anchorElement.scrollIntoView(); + } + } + } catch (e) { + + } + + } + preservation = () => { + //保存试卷 + if (this.Judquestio.Getdatas().length === 0) { + this.scrollToAnchor("Itembankstopid"); + return; + } + var myrbkc=[]; + var Getdatasdatas=this.Judquestio.Getdatas()[2].rbzsd; + for(let myda of Getdatasdatas) { + myrbkc.push(myda.id); + } + const url = `/examination_banks/${this.props.match.params.id}.json`; + var data={ + difficulty:this.Judquestio.Getdatas()[0].rbnd, + name:this.Judquestio.Getdatas()[4].classroom, + duration:this.Judquestio.Getdatas()[5].kssc, + discipline_id: this.Judquestio.Getdatas()[3].rbkc[0], + sub_discipline_id: this.Judquestio.Getdatas()[3].rbkc[1], + tag_discipline_id: myrbkc, + } + axios.put(url, data) + .then((result) => { + if (result.data.status === 0) { + this.props.showNotification(`试卷更新成功`); + this.props.history.push('/paperlibrary'); + } + }).catch((error) => { + console.log(error); + }) + + } + + + setitem_type = (item_type) => { + + + } + + setCohetepaperbool = (bool) => { + + } + getcontentMdRef = (Ref) => { + this.contentMdRef = Ref; + } + + render() { + let {paperlibrartdata} = this.state; + const params = this.props && this.props.match && this.props.match.params; + // //console.log(params); + return ( +
+
+ + +
+
+ + 试卷库 + 公告试卷库 + 试卷编辑 + +
+ this.getJudquestio(ref)} + > + + +
+ + + + + + + this.getdata()} + single_questions={paperlibrartdata && paperlibrartdata.single_questions && paperlibrartdata.single_questions.questions.length > 0 ? paperlibrartdata.single_questions : null} + multiple_questions={paperlibrartdata && paperlibrartdata.multiple_questions + && paperlibrartdata.multiple_questions.questions.length > 0 ? paperlibrartdata.multiple_questions : null + } + judgement_questions={paperlibrartdata && paperlibrartdata.judgement_questions + && paperlibrartdata.judgement_questions.questions.length > 0 ? paperlibrartdata.judgement_questions : null + } + program_questions={paperlibrartdata && paperlibrartdata.program_questions + && paperlibrartdata.program_questions.questions.length > 0 ? paperlibrartdata.program_questions : null + } + > + + +
+ + +
+ + +
+ + this.setCohetepaperbool(bool)} + onSubmits={() => this.preservation()} url={'/paperlibrary'}> +
+ ) + + } + + +} + +export default SnackbarHOC()(TPMIndexHOC(Paperlibraryeditid)); + + diff --git a/public/react/src/modules/testpaper/Paperlibraryseeid.js b/public/react/src/modules/testpaper/Paperlibraryseeid.js new file mode 100644 index 000000000..67d095250 --- /dev/null +++ b/public/react/src/modules/testpaper/Paperlibraryseeid.js @@ -0,0 +1,185 @@ +import React, {Component} from "react"; +import {Link, NavLink} from 'react-router-dom'; +import {WordsBtn, ActionBtn, SnackbarHOC, getImageUrl} from 'educoder'; +import axios from 'axios'; +import { + notification, + Spin, + Table, + Pagination, + Drawer, + Input, + Button, + Breadcrumb +} from "antd"; +import {TPMIndexHOC} from "../tpm/TPMIndexHOC"; +import NoneData from './component/NoneData'; +import './testioncss/testioncss.css'; +import '../tpm/newshixuns/css/Newshixuns.css'; +import Bottomsubmit from "../../modules/modals/Bottomsubmit"; +import Seeoagertit from "./component/Seeoagertit"; +import Paperlibraryseeid_item from './component/Paperlibraryseeid_item'; +//人工组卷预览 +class Paperlibraryseeid extends Component { + constructor(props) { + super(props); + this.contentMdRef = React.createRef(); + this.state = { + paperlibrartdata:[], + + + } + + + } + + //初始化 + componentDidMount() { + console.log("Paperlibraryseeid"); + this.getdata(); + + + } + + + getdata = () => { + let urls = `/examination_banks/${this.props.match.params.id}.json`; + axios.get(urls).then((response) => { + if (response) { + this.setState({ + paperlibrartdata: response.data, + }) + } + }); + + } + + + //跳转道描点的地方 + scrollToAnchor = (anchorName) => { + try { + if (anchorName) { + // 找到锚点 + let anchorElement = document.getElementById(anchorName); + // 如果对应id的锚点存在,就跳转到锚点 + if (anchorElement) { + anchorElement.scrollIntoView(); + } + } + } catch (e) { + + } + + } + preservation = () => { + //保存试卷 + + + + + } + + + setitem_type = (item_type) => { + + + } + + setCohetepaperbool =(bool)=>{ + + } + getcontentMdRef = (Ref) => { + this.contentMdRef = Ref; + } + render() { + let {paperlibrartdata} = this.state; + const params = this.props && this.props.match && this.props.match.params; + // //console.log(params); + return ( +
+
+ + +
+
+ + 试卷库 + 公告试卷库 + 试卷查看 + +
+ +
+ {paperlibrartdata&&paperlibrartdata.exam&&paperlibrartdata.exam.name} +
+ +
+ + + + + + + this.getdata()} + single_questions={paperlibrartdata&&paperlibrartdata.single_questions&&paperlibrartdata.single_questions.questions.length>0?paperlibrartdata.single_questions:null} + multiple_questions={paperlibrartdata&&paperlibrartdata.multiple_questions + &&paperlibrartdata.multiple_questions.questions.length>0?paperlibrartdata.multiple_questions:null + } + judgement_questions={paperlibrartdata&&paperlibrartdata.judgement_questions + &&paperlibrartdata.judgement_questions.questions.length>0?paperlibrartdata.judgement_questions:null + } + program_questions={paperlibrartdata&&paperlibrartdata.program_questions + &&paperlibrartdata.program_questions.questions.length>0?paperlibrartdata.program_questions:null + } + > + + + + + + + + + + + +
+ + + + + +
+ + +
+ + this.setCohetepaperbool(bool)} + onSubmits={() => this.preservation()} url={'/paperlibrary'}> +
+ ) + + } + + +} + +export default SnackbarHOC()(TPMIndexHOC(Paperlibraryseeid)); + + diff --git a/public/react/src/modules/testpaper/Testpaperlibrary.js b/public/react/src/modules/testpaper/Testpaperlibrary.js index af80cde75..0ae4f8d5f 100644 --- a/public/react/src/modules/testpaper/Testpaperlibrary.js +++ b/public/react/src/modules/testpaper/Testpaperlibrary.js @@ -336,6 +336,13 @@ class Testpaperlibrary extends Component { }) }; + Testpapereditor=(id)=>{ + this.props.history.push(`/paperlibrary/edit/${id}`); + } + + + + showmodelysl = (id) => { this.setState({ modalsType: true, @@ -400,6 +407,7 @@ class Testpaperlibrary extends Component { this.Testpapereditor(e)} setdifficulty={(e)=>this.setdifficulty(e)} showmodels={(e)=>this.showmodels(e)} showmodelysl={(e)=>this.showmodelysl(e)} diff --git a/public/react/src/modules/testpaper/component/Contentpart.js b/public/react/src/modules/testpaper/component/Contentpart.js index 9e9cd246a..dd831f673 100644 --- a/public/react/src/modules/testpaper/component/Contentpart.js +++ b/public/react/src/modules/testpaper/component/Contentpart.js @@ -166,7 +166,6 @@ class Contentpart extends Component {
{ @@ -197,6 +196,7 @@ class Contentpart extends Component { : this.props.Contentdata.exams.map((object, index) => { return ( this.props.Testpapereditor(e)} showmodels={(e)=>this.props.showmodels(e)} showmodelysl={(e)=>this.props.showmodelysl(e)} > diff --git a/public/react/src/modules/testpaper/component/Listjihe.js b/public/react/src/modules/testpaper/component/Listjihe.js index 4640dba60..bb19c3d79 100644 --- a/public/react/src/modules/testpaper/component/Listjihe.js +++ b/public/react/src/modules/testpaper/component/Listjihe.js @@ -57,7 +57,9 @@ class Listjihe extends Component { } - + gotoseesj=(id)=>{ + this.props.history.push(`/paperlibrary/see/${id}`); + } render() { @@ -72,13 +74,13 @@ class Listjihe extends Component { const quotess =items&&items.quotes&&items.quotes; const authors=items&&items.author&&items.author.name; return ( -
+
-

{names}

+

this.gotoseesj(items.id)}>{names}

试题数:{question_counts}

总分:{total_scores}

@@ -108,17 +110,17 @@ class Listjihe extends Component { { defaultActiveKey===0||defaultActiveKey==="0"?
-

this.props.showmodelysl(items.id)}> +

this.props.showmodelysl(items.id)}> 删除

-

+

this.props.Testpapereditor(items.id)}> 编辑

-

this.props.showmodels(items.id)} > +

this.props.showmodels(items.id)} > 公开

diff --git a/public/react/src/modules/testpaper/component/Paperlibraryseeid_item.js b/public/react/src/modules/testpaper/component/Paperlibraryseeid_item.js new file mode 100644 index 000000000..35f395c0f --- /dev/null +++ b/public/react/src/modules/testpaper/component/Paperlibraryseeid_item.js @@ -0,0 +1,634 @@ +import React, {Component} from "react"; +import {Link, NavLink} from 'react-router-dom'; +import {WordsBtn, ActionBtn, getImageUrl} from 'educoder'; +import {DragDropContext, Draggable, Droppable} from 'react-beautiful-dnd'; +import axios from 'axios'; +import { + notification, + Spin, + Table, + Pagination, + Drawer, + Input, + Button, + Breadcrumb +} from "antd"; +import '../testioncss/testioncss.css'; +import '../../tpm/newshixuns/css/Newshixuns.css'; +import Paperlibraryseeid_items from './Paperlibraryseeid_items'; + + +const reorder = (list, startIndex, endIndex) => { + const result = Array.from(list); + const [removed] = result.splice(startIndex, 1); + result.splice(endIndex, 0, removed); + + return result; +}; + +class Paperreview_item extends Component { + constructor(props) { + super(props); + + this.state = { + questions: 0, + totalscore: 0, + total: 0, + modalsTypedel: false, + modalsTypey: false, + modalsTypeys: false, + modalsTypedels: false, + titilesm: "", + titilesms: "", + singlebool: false, + multiplebool: false, + judgmentbool: false, + programbool: false, + paperreviewsingleindex: "无", + set_scoreid:null, + item_bank_id:null + } + + } + + //初始化 + componentDidMount() { + + + } + + + preservation = () => { + + + } + + + setitem_type = (item_type) => { + + + } + onDragEnd = (result) => { + + const ids = this.props.single_questions.questions[result.source.index].id; + const positions = this.props.single_questions.questions[result.destination.index].position; + + const url = `/examination_items/${ids}/adjust_position.json`; + var data = { + position: positions + } + axios.post(url, data) + .then((result) => { + if (result.data.status == 0) { + this.props.showNotification(`拖动成功`); + this.props.getdata(); + } + }).catch((error) => { + console.log(error); + }) + } + + onDragEnds = (result) => { + + const ids = this.props.multiple_questions.questions[result.source.index].id; + const positions = this.props.multiple_questions.questions[result.destination.index].position; + const url = `/examination_items/${ids}/adjust_position.json`; + var data = { + position: positions + } + axios.post(url, data) + .then((result) => { + if (result.data.status == 0) { + this.props.showNotification(`拖动成功`); + this.props.getdata(); + } + }).catch((error) => { + console.log(error); + }) + + + } + + + onDragEndss = (result) => { + const ids = this.props.judgement_questions.questions[result.source.index].id; + const positions = this.props.judgement_questions.questions[result.destination.index].position; + const url = `/examination_items/${ids}/adjust_position.json`; + var data = { + position: positions + } + axios.post(url, data) + .then((result) => { + debugger + if (result.data.status == 0) { + this.props.showNotification(`拖动成功`); + this.props.getdata(); + } + }).catch((error) => { + console.log(error); + }) + + } + + onDragEndsss = (result) => { + + const ids = this.props.judgement_questions.questions[result.source.index].id; + const positions = this.props.judgement_questions.questions[result.destination.index].position; + const url = `/examination_items/${ids}/adjust_position.json`; + var data = { + position: positions + } + axios.post(url, data) + .then((result) => { + if (result.data.status == 0) { + this.props.showNotification(`拖动成功`); + this.props.getdata(); + } + }).catch((error) => { + console.log(error); + }) + + } + Singlemagazine = (name, bool) => { + if (bool === true) { + this.setState({ + modalsTypey: true, + titilesm: name + }) + } else { + this.setState({ + modalsTypey: false, + titilesm: "" + }) + } + + + } + + setDownloady = (fenshu) => { + const url = "/item_baskets/batch_set_score.json"; + var data = { + score: fenshu, + item_type: this.state.titilesm === "单选题" ? "SINGLE" : this.state.titilesm === "多选题" ? "MULTIPLE" : this.state.titilesm === "判断题" ? "JUDGMENT" : this.state.titilesm === "编程题" ? "PROGRAM" : '', + + } + axios.post(url, data) + .then((result) => { + if (result.data.status == 0) { + this.props.showNotification(`调分成功`); + this.props.getdata({}); + this.Singlemagazine("", false); + } + }).catch((error) => { + console.log(error); + }) + } + + setDownloadys=(value)=>{ + const url = `/item_baskets/${this.state.set_scoreid}/set_score.json`; + var data = { + score: value, + } + axios.post(url, data) + .then((result) => { + if (result.data.status == 0) { + this.props.showNotification(`调分成功`); + this.props.getdata({}); + this.Singlemagazines(false); + } + }).catch((error) => { + console.log(error); + }) + } + + Singlemagazines=(bool,id,name)=>{ + if(bool===true){ + this.setState({ + set_scoreid:id, + modalsTypeys:bool, + titilesm: name + }) + }else{ + this.setState({ + modalsTypeys:bool, + set_scoreid:null, + titilesm: null + }) + } + + + } + hideparagraph = (name) => { + console.log("hideparagraph"); + + } + + hideparagraphs = () => { + this.setState({ + singlebool: false, + multiplebool: false, + judgmentbool: false, + programbool: false, + }) + } + showparagraph = (name) => { + console.log("showparagraph"); + if (name === "SINGLE") { + this.setState({ + singlebool: true, + multiplebool: false, + judgmentbool: false, + programbool: false, + paperreviewsingleindex:"无", + paperreviewsinglename:"", + + }) + + } else if (name === "MULTIPLE") { + this.setState({ + singlebool: false, + multiplebool: true, + judgmentbool: false, + programbool: false, + paperreviewsingleindex:"无", + paperreviewsinglename:"", + + + }) + } else if (name === "JUDGMENT") { + this.setState({ + singlebool: false, + multiplebool: false, + judgmentbool: true, + programbool: false, + paperreviewsingleindex:"无", + paperreviewsinglename:"", + + }) + } else if (name === "PROGRAM") { + this.setState({ + singlebool: false, + multiplebool: false, + judgmentbool: false, + programbool: true, + paperreviewsingleindex:"无", + paperreviewsinglename:"", + + }) + + } + } + + jixuxuantioncli = () => { + this.props.history.replace("/question"); + } + + showparagraphs = (e,name) => { + // console.log("showparagraphs"); + // console.log(e); + this.setState({ + paperreviewsingleindex: e, + paperreviewsinglename:name, + singlebool: false, + multiplebool: false, + judgmentbool: false, + programbool: false, + }) + } + + Setscore=(id)=>{ + + + } + + + + render() { + let { + questions, totalscore, total, modalsTypedel, modalsTypey, modalsTypedels, + singlebool, + multiplebool, + judgmentbool, + programbool, + paperreviewsingleindex, + modalsTypeys + } = this.state; + let {single_questions, multiple_questions, judgement_questions, program_questions, all_score} = this.props; + return ( +
+ +
+ + {/*单选题*/} + { + single_questions && single_questions ? +
+ +
+
+

一、单选题

(共{single_questions && single_questions.questions_count}题;共{single_questions && single_questions.questions_score}分)

+
+ + + + {(provided, snapshot) => ( +
+ { + single_questions && single_questions.questions.map((object, index) => { + return ( + + {(provided, snapshot) => ( +
+ + + + + + +
+ )} +
+ ) + }) + + } +
+ )} +
+
+ + +
+
+ + : "" + } + + + { + multiple_questions && multiple_questions ? +
+
+
+

{single_questions === null ? "一" : "二"}、多选题

+

(共{multiple_questions && multiple_questions.questions_count}题;共{multiple_questions && multiple_questions.questions_score}分)

+
+ + + + + + {(provided, snapshot) => ( +
+ { + multiple_questions && multiple_questions.questions.map((object, index) => { + return ( + + {(provided, snapshot) => ( +
+ + + + + +
+ )} +
+ ) + }) + + } +
+ )} +
+
+ + +
+
+ : + "" + } + + { + judgement_questions && judgement_questions ? +
+
+
+

{single_questions === null && multiple_questions === null ? "一" : single_questions === null && multiple_questions !== null ? "二" + : single_questions !== null && multiple_questions === null ? "二" + : "三"}、判断题

(共{judgement_questions && judgement_questions.questions_count}题;共{judgement_questions && judgement_questions.questions_score}分)

+
+ + + + + {(provided, snapshot) => ( +
+ { + judgement_questions && judgement_questions.questions.map((object, index) => { + return ( + + {(provided, snapshot) => ( +
+ + + + + +
+ )} +
+ ) + }) + + } +
+ )} +
+
+
+
+ : "" + } + + + { + program_questions && program_questions ? +
+ +
+
+

+ {single_questions === null && multiple_questions === null && program_questions === null ? "一" + : single_questions === null && multiple_questions === null && program_questions !== null ? "二" + : single_questions !== null && multiple_questions === null && program_questions === null ? "二" + : single_questions === null && multiple_questions !== null && program_questions === null ? "二" + : single_questions !== null && multiple_questions !== null && program_questions === null ? "三" + : single_questions === null && multiple_questions !== null && program_questions !== null ? "三" + : single_questions !== null && multiple_questions == null && program_questions !== null ? "三" : + "四"} + 、编程题

(共{program_questions && program_questions.questions_count}题;共{program_questions && program_questions.questions_score}分)

+
+ + + + + {(provided, snapshot) => ( +
+ { + program_questions && program_questions.questions.map((object, index) => { + return ( + + {(provided, snapshot) => ( +
+ + + + +
+ )} +
+ ) + }) + + } +
+ )} +
+
+ + +
+
+ : + "" + } + + +
+
+ ) + + } + + +} + +export default Paperreview_item + + diff --git a/public/react/src/modules/testpaper/component/Paperlibraryseeid_items.js b/public/react/src/modules/testpaper/component/Paperlibraryseeid_items.js new file mode 100644 index 000000000..1ab987ba0 --- /dev/null +++ b/public/react/src/modules/testpaper/component/Paperlibraryseeid_items.js @@ -0,0 +1,171 @@ +import React, {Component} from "react"; +import {Link, NavLink} from 'react-router-dom'; +import {WordsBtn, ActionBtn, getImageUrl, markdownToHTML} from 'educoder'; +import axios from 'axios'; +import { + notification, + Spin, + Table, + Pagination, + Drawer, + Input, + Button, + Breadcrumb, + Radio +} from "antd"; +import '../testioncss/testioncss.css'; +import '../../tpm/newshixuns/css/Newshixuns.css'; + +const tagArray = [ + 'A.', 'B.', 'C.', 'D.', 'E.', 'F.', 'G.', 'H.', 'I.', + 'J.', 'K.', 'L.', 'M.', 'N.', 'O.', 'P.', 'Q.', 'R.', + 'S.', 'T.', 'U.', 'V.', 'W.', 'X.', 'Y.', 'Z.' +] + +//单选题 +class Paperlibraryseeid_items extends Component { + constructor(props) { + super(props); + + this.state = { + questions: 0, + totalscore: 0, + total: 0, + } + + } + + //初始化 + componentDidMount() { + + + } + + + getdata = (data) => { + + } + + preservation = () => { + + + } + + + setitem_type = (item_type) => { + + + } + showparagraph = (indexx) => { + + + } + Singlemagaziness = () => { + + } + + render() { + let {questions, totalscore, total, items} = this.state; + let {objectsingle, indexx, paperreviewsingleindex, indexxy,name} = this.props; + // console.log("objectsingle"); + // console.log(objectsingle); + return ( +
+ + {/*顶部*/} +
+
+

{indexx}

、 +
+ + { + this.props.typenames==="PROGRAM"? +
+
+ : +
+
+ + } +
+ {/*内容*/} +
+ + + { + objectsingle.item_type === "JUDGMENT" ? +

+ { + objectsingle === undefined || objectsingle === null ? "" : objectsingle.choices.map((object, index) => { + return ( +

+ + {object.choice_text} + +

+ ) + }) + } +

+ : + objectsingle.item_type === "PROGRAM" ? +

+

+

+

+

+ : +

+ { + objectsingle === undefined || objectsingle === null ? "" : objectsingle.choices.map((object, index) => { + return ( +

+ {tagArray[index]} +

+

+ ) + }) + } +

+ } + + +
+ + +
+ ) + + } + + +} + +export default Paperlibraryseeid_items + + diff --git a/public/react/src/modules/testpaper/component/Paperlibraryseeid_itemss.js b/public/react/src/modules/testpaper/component/Paperlibraryseeid_itemss.js new file mode 100644 index 000000000..7b63cb181 --- /dev/null +++ b/public/react/src/modules/testpaper/component/Paperlibraryseeid_itemss.js @@ -0,0 +1,790 @@ +import React, {Component} from "react"; +import {Link, NavLink} from 'react-router-dom'; +import {WordsBtn, ActionBtn, getImageUrl} from 'educoder'; +import axios from 'axios'; +import { + notification, + Spin, + Table, + Pagination, + Drawer, + Input, + Button, + Breadcrumb +} from "antd"; +import '../../question/questioncss/questioncom.css'; +import '../../tpm/newshixuns/css/Newshixuns.css'; +import {DragDropContext, Draggable, Droppable} from 'react-beautiful-dnd'; +import PaperDeletModel from '../../question/component/PaperDeletModel'; +import PaperDeletModels from '../../question/component/PaperDeletModels'; +import Paperreview_itemModel from '../../question/component/Paperreview_itemModel'; +import Paperreview_itemModels from '../../question/component/Paperreview_itemModels'; +import Paperlibraryseeid_itemsss from './Paperlibraryseeid_itemsss'; + + +const reorder = (list, startIndex, endIndex) => { + const result = Array.from(list); + const [removed] = result.splice(startIndex, 1); + result.splice(endIndex, 0, removed); + + return result; +}; + +//这不是唯一的 试题库还有 Paperreview_item.js +class Paperlibraryseeid_itemss extends Component { + constructor(props) { + super(props); + + this.state = { + questions: 0, + totalscore: 0, + total: 0, + modalsTypedel: false, + modalsTypey: false, + modalsTypeys: false, + modalsTypedels: false, + titilesm: "", + titilesms: "", + singlebool: false, + multiplebool: false, + judgmentbool: false, + programbool: false, + paperreviewsingleindex: "无", + set_scoreid:null, + item_bank_id:null + } + + } + + //初始化 + componentDidMount() { + + + } + + + getdata = (data) => { + + } + + preservation = () => { + + + } + + + setitem_type = (item_type) => { + + + } + onDragEnd = (result) => { + + const ids = this.props.single_questions.questions[result.source.index].id; + const positions = this.props.single_questions.questions[result.destination.index].position; + + const url = `/examination_items/${ids}/adjust_position.json`; + var data = { + position: positions + } + axios.post(url, data) + .then((result) => { + if (result.data.status == 0) { + this.props.showNotification(`拖动成功`); + this.props.getdata({}); + } + }).catch((error) => { + console.log(error); + }) + } + + onDragEnds = (result) => { + + const ids = this.props.multiple_questions.questions[result.source.index].id; + const positions = this.props.multiple_questions.questions[result.destination.index].position; + const url =`/examination_items/${ids}/adjust_position.json`; + var data = { + position: positions + } + axios.post(url, data) + .then((result) => { + if (result.data.status == 0) { + this.props.showNotification(`拖动成功`); + this.props.getdata({}); + } + }).catch((error) => { + console.log(error); + }) + + + } + + + onDragEndss = (result) => { + const ids = this.props.judgement_questions.questions[result.source.index].id; + const positions = this.props.judgement_questions.questions[result.destination.index].position; + const url = `/examination_items/${ids}/adjust_position.json`; + var data = { + position: positions + } + axios.post(url, data) + .then((result) => { + if (result.data.status == 0) { + this.props.showNotification(`拖动成功`); + this.props.getdata({}); + } + }).catch((error) => { + console.log(error); + }) + + } + + onDragEndsss = (result) => { + + const ids = this.props.judgement_questions.questions[result.source.index].id; + const positions = this.props.judgement_questions.questions[result.destination.index].position; + const url = `/examination_items/${ids}/adjust_position.json`; + var data = { + position: positions + } + axios.post(url, data) + .then((result) => { + if (result.data.status == 0) { + this.props.showNotification(`拖动成功`); + this.props.getdata({}); + } + }).catch((error) => { + console.log(error); + }) + + } + Singlemagazine = (name, bool) => { + if (bool === true) { + this.setState({ + modalsTypey: true, + titilesm: name + }) + } else { + this.setState({ + modalsTypey: false, + titilesm: "" + }) + } + + + } + + setDownloady = (fenshu) => { + const url = "/examination_items/batch_set_score.json"; + var data = { + exam_id:this.props.match.params.id, + score: fenshu, + item_type: this.state.titilesm === "单选题" ? "SINGLE" : this.state.titilesm === "多选题" ? "MULTIPLE" : this.state.titilesm === "判断题" ? "JUDGMENT" : this.state.titilesm === "编程题" ? "PROGRAM" : '', + + } + axios.post(url, data) + .then((result) => { + if (result.data.status == 0) { + this.props.showNotification(`调分成功`); + this.props.getdata({}); + this.Singlemagazine("", false); + } + }).catch((error) => { + console.log(error); + }) + } + + setDownloadys=(value)=>{ + const url = `/examination_items/${this.state.set_scoreid}/set_score.json`; + var data = { + score: value, + } + axios.post(url, data) + .then((result) => { + if (result.data.status == 0) { + this.props.showNotification(`调分成功`); + this.props.getdata({}); + this.Singlemagazines(false); + } + }).catch((error) => { + console.log(error); + }) + } + + Singlemagazines=(bool,id,name)=>{ + if(bool===true){ + this.setState({ + set_scoreid:id, + modalsTypeys:bool, + titilesm: name + }) + }else{ + this.setState({ + modalsTypeys:bool, + set_scoreid:null, + titilesm: null + }) + } + + + } + setmodalsTypedel = (bool, type, names) => { + if (type === 1) { + this.setState({ + modalsTypedel: bool, + titilesms: names + }) + } else { + this.setState({ + modalsTypedel: bool, + titilesms: names + }) + const url = `/examination_items/delete_item_type.json`; + axios.delete((url), { + data: { + exam_id:this.props.match.params.id, + item_type: names + } + }) + .then((response) => { + if (response.data.status == 0) { + this.props.showNotification('大题删除成功'); + this.props.getdata({}); + this.setState({ + titilesms: "" + }) + } + }) + .catch(function (error) { + //console.log(error); + }); + + + + } + + } + + setmodalsTypedels = (bool, type) => { + if (type === 1) { + this.setState({ + modalsTypedels: bool, + }) + }else { + //确定 + const url = `/examination_items/${this.state.item_bank_id}.json`; + axios.delete((url)) + .then((response) => { + if (response.data.status == 0) { + this.props.showNotification('试题删除成功'); + this.props.getdata({}); + } + }) + .catch(function (error) { + + }); + + this.setState({ + modalsTypedels: bool, + }) + } + + } + + showsetmodalsTypedels=(id,bool,type)=>{ + debugger + this.setState({ + item_bank_id:id, + }) + this.setmodalsTypedels(bool,type); + } + + hideparagraph = (name) => { + console.log("hideparagraph"); + + } + + hideparagraphs = () => { + this.setState({ + singlebool: false, + multiplebool: false, + judgmentbool: false, + programbool: false, + }) + } + showparagraph = (name) => { + console.log("showparagraph"); + if (name === "SINGLE") { + this.setState({ + singlebool: true, + multiplebool: false, + judgmentbool: false, + programbool: false, + paperreviewsingleindex:"无", + paperreviewsinglename:"", + + }) + + } else if (name === "MULTIPLE") { + this.setState({ + singlebool: false, + multiplebool: true, + judgmentbool: false, + programbool: false, + paperreviewsingleindex:"无", + paperreviewsinglename:"", + + + }) + } else if (name === "JUDGMENT") { + this.setState({ + singlebool: false, + multiplebool: false, + judgmentbool: true, + programbool: false, + paperreviewsingleindex:"无", + paperreviewsinglename:"", + + }) + } else if (name === "PROGRAM") { + this.setState({ + singlebool: false, + multiplebool: false, + judgmentbool: false, + programbool: true, + paperreviewsingleindex:"无", + paperreviewsinglename:"", + + }) + + } + } + + jixuxuantioncli = () => { + this.props.history.replace("/question"); + } + + showparagraphs = (e,name) => { + // console.log("showparagraphs"); + // console.log(e); + this.setState({ + paperreviewsingleindex: e, + paperreviewsinglename:name, + singlebool: false, + multiplebool: false, + judgmentbool: false, + programbool: false, + }) + } + + Setscore=(id)=>{ + + + } + + + + render() { + let { + questions, totalscore, total, modalsTypedel, modalsTypey, modalsTypedels, + singlebool, + multiplebool, + judgmentbool, + programbool, + paperreviewsingleindex, + modalsTypeys + } = this.state; + let {single_questions, multiple_questions, judgement_questions, program_questions, all_score} = this.props; + return ( +
+ { + modalsTypedel === true ? + this.setmodalsTypedel(bool, type, name)}> + : "" + } + { + modalsTypey === true ? + this.setDownloady(fs)} + Singlemagazine={(name, bool) => this.Singlemagazine(name, bool)}> + : "" + } + + { + modalsTypeys === true ? + this.setDownloadys(value)} + Singlemagazines={(bool,id,name) => this.Singlemagazines(bool,id,name)}> + : "" + } + { + modalsTypedels === true ? + this.setmodalsTypedels(id,bool, type)}> + : "" + } +
+ {/*单选题*/} + { + single_questions && single_questions ? +
+ +
+
this.showparagraph("SINGLE")} onMouseLeave={() => this.hideparagraph("SINGLE")}> +

一、单选题

(共{single_questions && single_questions.questions_count}题;共{single_questions && single_questions.questions_score}分)

+
+ { + singlebool === true ? +
+
this.setmodalsTypedel(true, 1, "SINGLE")}>删除
+
this.Singlemagazine("单选题", true)}>批量设置得分
+
: "" + } + + + {(provided, snapshot) => ( +
+ { + single_questions && single_questions.questions.map((object, index) => { + return ( + + {(provided, snapshot) => ( +
+ + this.showsetmodalsTypedels(id,bool,type)} + Singlemagazines={(bool,id,name)=>this.Singlemagazines(bool,id,name)} + showparagraphs={(e,name) => this.showparagraphs(e,name)} + object={object} + hideparagraphs={() => this.hideparagraphs()} + > + + + + +
+ )} +
+ ) + }) + + } +
+ )} +
+
+ + +
+
+ + : "" + } + + + { + multiple_questions && multiple_questions ? +
+
+
+
this.showparagraph("MULTIPLE")} + onMouseLeave={() => this.hideparagraph("MULTIPLE")}> +

{single_questions === null ? "一" : "二"}、多选题

+

(共{multiple_questions && multiple_questions.questions_count}题;共{multiple_questions && multiple_questions.questions_score}分)

+
+ { + multiplebool === true ? +
+
this.setmodalsTypedel(true, 1, "MULTIPLE")}>删除 +
+
this.Singlemagazine("多选题", true)}>批量设置得分
+
+ + : "" + } + + + + + {(provided, snapshot) => ( +
+ { + multiple_questions && multiple_questions.questions.map((object, index) => { + return ( + + {(provided, snapshot) => ( +
+ + + this.showsetmodalsTypedels(id,bool,type)} + Singlemagazines={(bool,id,name)=>this.Singlemagazines(bool,id,name)} + showparagraphs={(e,name) => this.showparagraphs(e,name)} + object={object} + hideparagraphs={() => this.hideparagraphs()} + > + + +
+ )} +
+ ) + }) + + } +
+ )} +
+
+ + +
+
+ : + "" + } + + { + judgement_questions && judgement_questions ? +
+
+
+
this.showparagraph("JUDGMENT")} + onMouseLeave={() => this.hideparagraph("JUDGMENT")}> +

{single_questions === null && multiple_questions === null ? "一" : single_questions === null && multiple_questions !== null ? "二" + : single_questions !== null && multiple_questions === null ? "二" + : "三"}、判断题

(共{judgement_questions && judgement_questions.questions_count}题;共{judgement_questions && judgement_questions.questions_score}分)

+
+ { + judgmentbool === true ? +
+
this.setmodalsTypedel(true, 1, "JUDGMENT")}>删除 +
+
this.Singlemagazine("判断题", true)}>批量设置得分
+
+ : ""} + + + + {(provided, snapshot) => ( +
+ { + judgement_questions && judgement_questions.questions.map((object, index) => { + return ( + + {(provided, snapshot) => ( +
+ + + this.showsetmodalsTypedels(id,bool,type)} + Singlemagazines={(bool,id,name)=>this.Singlemagazines(bool,id,name)} + showparagraphs={(e,name) => this.showparagraphs(e,name)} + object={object} + hideparagraphs={() => this.hideparagraphs()} + > + + +
+ )} +
+ ) + }) + + } +
+ )} +
+
+
+
+ : "" + } + + + { + program_questions && program_questions ? +
+ +
+
+
this.showparagraph("PROGRAM")} + onMouseLeave={() => this.hideparagraph("PROGRAM")}> +

+ {single_questions === null && multiple_questions === null && program_questions === null ? "一" + : single_questions === null && multiple_questions === null && program_questions !== null ? "二" + : single_questions !== null && multiple_questions === null && program_questions === null ? "二" + : single_questions === null && multiple_questions !== null && program_questions === null ? "二" + : single_questions !== null && multiple_questions !== null && program_questions === null ? "三" + : single_questions === null && multiple_questions !== null && program_questions !== null ? "三" + : single_questions !== null && multiple_questions == null && program_questions !== null ? "三" : + "四"} + 、编程题

(共{program_questions && program_questions.questions_count}题;共{program_questions && program_questions.questions_score}分)

+
+ { + programbool === true ? +
+
this.setmodalsTypedel(true, 1, "PROGRAM")}>删除
+
this.Singlemagazine("编程题", true)}>批量设置得分
+
+ : "" + } + + + + {(provided, snapshot) => ( +
+ { + program_questions && program_questions.questions.map((object, index) => { + return ( + + {(provided, snapshot) => ( +
+ + + this.showsetmodalsTypedels(id,bool,type)} + Singlemagazines={(bool,id,name)=>this.Singlemagazines(bool,id,name)} + showparagraphs={(e,name) => this.showparagraphs(e,name)} + object={object} + hideparagraphs={() => this.hideparagraphs()} + > + +
+ )} +
+ ) + }) + + } +
+ )} +
+
+ + +
+
+ : + "" + } + + +
+
+ ) + + } + + +} + +export default Paperlibraryseeid_itemss + + diff --git a/public/react/src/modules/testpaper/component/Paperlibraryseeid_itemsss.js b/public/react/src/modules/testpaper/component/Paperlibraryseeid_itemsss.js new file mode 100644 index 000000000..4ec68c8a1 --- /dev/null +++ b/public/react/src/modules/testpaper/component/Paperlibraryseeid_itemsss.js @@ -0,0 +1,88 @@ +import React, {Component} from "react"; +import {Link, NavLink} from 'react-router-dom'; +import {WordsBtn, ActionBtn, getImageUrl,markdownToHTML} from 'educoder'; +import axios from 'axios'; +import { + notification, + Spin, + Table, + Pagination, + Drawer, + Input, + Button, + Breadcrumb +} from "antd"; +import '../../question/questioncss/questioncom.css'; +import '../../tpm/newshixuns/css/Newshixuns.css'; +import Paperreview_single from "../../question/Paperreview_single"; + +//判断题 +//这不是唯一的 试题库还有Paperreview_items +class Paperlibraryseeid_itemsss extends Component { + constructor(props) { + super(props); + + this.state = { + + } + + } + + //初始化 + componentDidMount() { + + + + + } + + + getdata = (data) => { + + } + + preservation = () => { + + + + + } + + + setitem_type = (item_type) => { + + + } + + render() { + let {paperreviewsingleindex,paperreviewsinglename,typenames,indexs,object,typenamesn}=this.props; + + return ( +
+ { + paperreviewsingleindex===indexs&&paperreviewsinglename===typenames? +
+
this.props.showsetmodalsTypedels(object.id,true,1)}>删除
+
this.props.Singlemagazines(true,object.id,typenamesn)}>设置得分
+
+ :
+
+ } + this.props.showparagraphs(e,name)} + objectsingle={object} key={indexs} indexx={indexs + 1} + indexxy={indexs} + hideparagraphs={() => this.props.hideparagraphs()}> +
+ ) + + } + + +} + +export default Paperlibraryseeid_itemsss + + diff --git a/public/react/src/modules/testpaper/component/Seeoagertit.js b/public/react/src/modules/testpaper/component/Seeoagertit.js new file mode 100644 index 000000000..6a835ce98 --- /dev/null +++ b/public/react/src/modules/testpaper/component/Seeoagertit.js @@ -0,0 +1,56 @@ +import React, {Component} from "react"; +import {Link, NavLink} from 'react-router-dom'; +import {WordsBtn, ActionBtn,SnackbarHOC,getImageUrl} from 'educoder'; +import axios from 'axios'; +import { + notification, + Spin, + Table, + Pagination, + Radio, + Checkbox +} from "antd"; +import './../testioncss/testioncss.css'; +class Seeoagertit extends Component { + constructor(props) { + super(props); + this.state = { + page:1, + } + } + //初始化 + componentDidMount(){ + + + } + onChange=(e)=> { + } + + render() { + + return ( + +
+
+
+

题数:{this.props.all_score}

+

总分:{this.props.all_questions_count}

+
+
+
+
+
拖动试题可调整排序
+ + +
+
+ ) + + } + + + +} +export default Seeoagertit ; diff --git a/public/react/src/modules/testpaper/component/Seeoagertits.js b/public/react/src/modules/testpaper/component/Seeoagertits.js new file mode 100644 index 000000000..1c2b596bf --- /dev/null +++ b/public/react/src/modules/testpaper/component/Seeoagertits.js @@ -0,0 +1,70 @@ +import React, {Component} from "react"; +import {Link, NavLink} from 'react-router-dom'; +import {WordsBtn, ActionBtn,SnackbarHOC,getImageUrl} from 'educoder'; +import axios from 'axios'; +import { + notification, + Spin, + Table, + Pagination, + Radio, + Checkbox +} from "antd"; +import './../testioncss/testioncss.css'; +class Seeoagertit extends Component { + constructor(props) { + super(props); + this.state = { + page:1, + } + } + //初始化 + componentDidMount(){ + + + } + onChange=(e)=> { + } + jixuxuantioncli = () => { + this.props.history.replace("/question"); + } + + render() { + + return ( + +
+
+
+

题数:{this.props.all_score}

+

总分:{this.props.all_questions_count}

+

难度: + {this.props.difficulty===undefined?"": + this.props.difficulty===1?"简单":this.props.difficulty===2?"适中":this.props.difficulty===3?"困难":"" + } +

+ +
+
+
this.jixuxuantioncli()}> + 继续选题 +
+
+
+
+
+
拖动试题可调整排序
+ + +
+
+ ) + + } + + + +} +export default Seeoagertit ; diff --git a/public/react/src/modules/testpaper/testioncss/testioncss.css b/public/react/src/modules/testpaper/testioncss/testioncss.css index 181334981..d21f07cb7 100644 --- a/public/react/src/modules/testpaper/testioncss/testioncss.css +++ b/public/react/src/modules/testpaper/testioncss/testioncss.css @@ -405,6 +405,9 @@ .xiaoshout{ cursor:default; } +.shubiao{ + cursor:default; +} .mt40{ margin-top: 40px; } @@ -843,3 +846,28 @@ .ml37{ margin-left: 37px; } +.listjihecolor:hover{ + background: #F9F9F9; + background-color: #F9F9F9; +} + +.seesjtit{ + height:27px; + font-size:19px; + color:#333333; + line-height:27px; +} +.mt16{ + margin-top: 16px; +} +.mb20{ + margin-bottom: 20px; +} +.fudonxianshi{ + position: relative; +} + +.fudonxianshis{ + position:absolute; + z-index: 700; +} diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index fabe180bf..5884eb4ef 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -1039,17 +1039,17 @@ submittojoinclass=(value)=>{ ` } -
  • - -
    -
    - 题库 -
    -
    -
    -
  • + {/*
  • */} + {/* */} + {/*
    */} + {/*
    */} + {/* 题库*/} + {/*
    */} + {/*
    */} + {/*
    */} + {/*
  • */} diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js index e44dac83b..4116aef3a 100644 --- a/public/react/src/modules/tpm/TPMIndexHOC.js +++ b/public/react/src/modules/tpm/TPMIndexHOC.js @@ -35,14 +35,14 @@ if (!window['indexHOCLoaded']) { // $('head').append($('') // .attr('href', `${_url_origin}/stylesheets/educoder/antd.min.css?1525440977`)); $('head').append($('') - .attr('href', `${_url_origin}/stylesheets/css/edu-common.css?2020`)); + .attr('href', `${_url_origin}/stylesheets/css/edu-common.css?2021`)); $('head').append($('') - .attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?2020`)); + .attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?2021`)); // index.html有加载 $('head').append($('') - .attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?2020`)); + .attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?2021`)); // $('head').append($('') diff --git a/public/react/src/modules/tpm/shixuns/ShixunSearchBar.js b/public/react/src/modules/tpm/shixuns/ShixunSearchBar.js index 65f78502a..b884d7bf0 100644 --- a/public/react/src/modules/tpm/shixuns/ShixunSearchBar.js +++ b/public/react/src/modules/tpm/shixuns/ShixunSearchBar.js @@ -115,8 +115,6 @@ shixunsearchAll = (e) => { //选择Tab页详情 getshixunchildValue = (e) => { - - debugger let id = e.target.name; let newid=e.target.id; let list=[{'tag_level':2},{'tag_id':id}]; @@ -239,7 +237,7 @@ render() { { shixunhoverData.map((item,key)=>{ return( - + =8?"bottomLeft":"bottomCenter"}>
  • {item.name}
  • diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css index 8be6e00ab..b596b6c15 100644 --- a/public/stylesheets/educoder/edu-all.css +++ b/public/stylesheets/educoder/edu-all.css @@ -178,7 +178,7 @@ em.vertical-line{display: inline-block;width: 2px;background: #999;height: 10px} .user_navlist_white a:hover{color: #4cacff} .headIcon{height: 100%;box-sizing: border-box; margin: 0px!important;} .black_nav_list{padding: 4px 0px;box-sizing: border-box;height: 100%;} -.black_nav_list li{line-height: 42px;height: 42px;color: #fff;cursor: pointer;} +.black_nav_list li{line-height: 40px;height: 40px;color: #fff;cursor: pointer;} .black_nav_span{display: block;margin:0px 20px;border-bottom: 1px solid #4B4B4B;padding-left: 8px;color: #FAFAFA} .welcome_shixun_index:last-child .black_nav_span{border-bottom: none} .black_nav_list li:hover{background: #fff;}