From 502ba26524f4b0ad8b49d2b23ab9adf18ce3e518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 10 Jan 2020 12:01:46 +0800 Subject: [PATCH 01/10] zhinengzujuan --- public/react/src/modules/testpaper/Intecomponents.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/public/react/src/modules/testpaper/Intecomponents.js b/public/react/src/modules/testpaper/Intecomponents.js index ad8171ae0..4328cb400 100644 --- a/public/react/src/modules/testpaper/Intecomponents.js +++ b/public/react/src/modules/testpaper/Intecomponents.js @@ -151,7 +151,6 @@ class Intecomponents extends Component { } getdatass=(nandu)=>{ - debugger if (this.Judquestio.Getdatas().length === 0) { this.scrollToAnchor("Itembankstopid"); return false; @@ -170,9 +169,7 @@ class Intecomponents extends Component { difficulty:nandu, } - axios.get(url, {params: { - data - }}).then((response) => { + axios.post(url,data).then((response) => { if (response) { console.log("智能组卷"); console.log(response); From 6f6196f7dcdd17317d70f99a410d863dba4553df Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 13 Jan 2020 16:57:55 +0800 Subject: [PATCH 02/10] 1 --- app/controllers/concerns/git_helper.rb | 1 + app/controllers/shixuns_controller.rb | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/concerns/git_helper.rb b/app/controllers/concerns/git_helper.rb index f80434392..f22753dde 100644 --- a/app/controllers/concerns/git_helper.rb +++ b/app/controllers/concerns/git_helper.rb @@ -26,6 +26,7 @@ module GitHelper if cd["encoding"] == 'GB18030' && cd['confidence'] > 0.8 content.encode('UTF-8', 'GBK', {:invalid => :replace, :undef => :replace, :replace => ' '}) else + Rails.logger.info("####encoding:#{content.encoding}") content.force_encoding('UTF-8') end end diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 4e26475fe..8ca36cd22 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -3,6 +3,7 @@ class ShixunsController < ApplicationController include ApplicationHelper include ElasticsearchAble include CoursesHelper + include GitCommon before_action :require_login, :check_auth, except: [:download_file, :index, :menus, :show, :show_right, :ranking_list, :discusses, :collaborators, :fork_list, :propaedeutics] @@ -877,7 +878,7 @@ class ShixunsController < ApplicationController end end - include GitCommon + def update_file content = params[:content] From 36eea4b3b8a276828185e58b3ca2bb0aeeab20a6 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 13 Jan 2020 17:03:23 +0800 Subject: [PATCH 03/10] 1 --- app/controllers/concerns/git_helper.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/concerns/git_helper.rb b/app/controllers/concerns/git_helper.rb index f22753dde..ec0f2ad82 100644 --- a/app/controllers/concerns/git_helper.rb +++ b/app/controllers/concerns/git_helper.rb @@ -25,6 +25,8 @@ module GitHelper decode_content = if cd["encoding"] == 'GB18030' && cd['confidence'] > 0.8 content.encode('UTF-8', 'GBK', {:invalid => :replace, :undef => :replace, :replace => ' '}) + elsif cd['encoding'].blank? + raise("无效的utf-8文件") else Rails.logger.info("####encoding:#{content.encoding}") content.force_encoding('UTF-8') From dc5ba90e3fcf9762e2b258379d83d65a241cb4c1 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 13 Jan 2020 17:23:16 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E6=97=A0=E6=95=88=E7=9A=84utf-8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/concerns/git_helper.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/controllers/concerns/git_helper.rb b/app/controllers/concerns/git_helper.rb index ec0f2ad82..abedd4dda 100644 --- a/app/controllers/concerns/git_helper.rb +++ b/app/controllers/concerns/git_helper.rb @@ -13,7 +13,7 @@ module GitHelper content = GitService.file_content(repo_path: repo_path, path: path) - Rails.logger.info("git file content: content is #{content}") + #Rails.logger.info("git file content: content is #{content}") decode_content = nil if content.present? content = content["content"] #6.24 -hs 这个为新增,因为当实训题里含有选择题时,这里会报错,undefined method `[]' for nil:NilClass @@ -26,7 +26,7 @@ module GitHelper if cd["encoding"] == 'GB18030' && cd['confidence'] > 0.8 content.encode('UTF-8', 'GBK', {:invalid => :replace, :undef => :replace, :replace => ' '}) elsif cd['encoding'].blank? - raise("无效的utf-8文件") + raise("ERROR_UTF8") else Rails.logger.info("####encoding:#{content.encoding}") content.force_encoding('UTF-8') @@ -37,7 +37,8 @@ module GitHelper rescue Exception => e Rails.logger.error(e.message) - raise Educoder::TipException.new("文档内容获取异常") + error_msg = e.message == "ERROR_UTF8" ? "文件无法预览" : "文档内容获取异常" + raise Educoder::TipException.new(error_msg) end end From 31167a4fcf05e73293bc8bd592ef93048491822f Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 13 Jan 2020 17:26:34 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E6=97=A0=E6=B3=95=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E5=86=85=E5=AE=B9=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/concerns/git_helper.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/concerns/git_helper.rb b/app/controllers/concerns/git_helper.rb index abedd4dda..d306c5298 100644 --- a/app/controllers/concerns/git_helper.rb +++ b/app/controllers/concerns/git_helper.rb @@ -38,7 +38,8 @@ module GitHelper rescue Exception => e Rails.logger.error(e.message) error_msg = e.message == "ERROR_UTF8" ? "文件无法预览" : "文档内容获取异常" - raise Educoder::TipException.new(error_msg) + error_status = e.message == "ERROR_UTF8" ? -2 : -1 + raise Educoder::TipException.new(error_status, error_msg) end end From 3820911af5b4b4aba85bc8efbd8d86fe1270aaea Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 13 Jan 2020 17:27:47 +0800 Subject: [PATCH 06/10] 1 --- app/controllers/concerns/git_helper.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/controllers/concerns/git_helper.rb b/app/controllers/concerns/git_helper.rb index d306c5298..db99f9da5 100644 --- a/app/controllers/concerns/git_helper.rb +++ b/app/controllers/concerns/git_helper.rb @@ -28,7 +28,6 @@ module GitHelper elsif cd['encoding'].blank? raise("ERROR_UTF8") else - Rails.logger.info("####encoding:#{content.encoding}") content.force_encoding('UTF-8') end end From 9c35010dfe883e85fd32e6944f16d6e70c14c8ff Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 16 Jan 2020 14:32:45 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E6=B7=B7=E5=90=88=E4=BA=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/games_controller.rb | 4 +++- app/controllers/myshixuns_controller.rb | 5 +++++ app/models/game.rb | 13 +++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index fcdd81953..b37b925f9 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -749,6 +749,8 @@ class GamesController < ApplicationController # 针对web类型的实训 web_route = game_challenge.try(:web_route) + server_url = @game.get_server_url if web_route.present? + mirror_name = @shixun.mirror_name e_record = EvaluateRecord.where(:identifier => sec_key).first @@ -776,7 +778,7 @@ class GamesController < ApplicationController @base_date = {grade: grade, gold: score, experience: experience, status: game_status, had_done: had_done, position: game_challenge.position, port: port, record_consume_time: record_consume_time, mirror_name: mirror_name, picture: picture, web_route: web_route, star: @game.star, - next_game: next_game, prev_game: prev_game, max_mem: max_mem} + next_game: next_game, prev_game: prev_game, max_mem: max_mem, server_url: server_url} end # 记录实训花费的时间 diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index 350ee581f..67a6cabd9 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -99,6 +99,7 @@ class MyshixunsController < ApplicationController status = jsonTestDetails['status'] game_id = jsonTestDetails['buildID'] sec_key = jsonTestDetails['sec_key'] + server_url = jsonTestDetails['showServer'] uid_logger_dubug("training_task_status start-#{game_id}-1#{Time.now.strftime("%Y-%m-%d %H:%M:%S.%L")}") resubmit = jsonTestDetails['resubmit'] @@ -117,6 +118,10 @@ class MyshixunsController < ApplicationController pics = params[:tpiRepoPath] game.update_column(:picture_path, pics) end + # 如果启动了服务,则存在redis中,供前端访问 + if server_url.present? + game.set_server_key(server_url) + end max_query_index = game.outputs ? (game.outputs.first.try(:query_index).to_i + 1) : 1 test_set_score = 0 unless jenkins_testsets.blank? diff --git a/app/models/game.rb b/app/models/game.rb index 062ad15cc..144dbced2 100644 --- a/app/models/game.rb +++ b/app/models/game.rb @@ -29,6 +29,19 @@ class Game < ApplicationRecord validates :identifier, uniqueness: true + # 服务器uri+port的redis的key + def server_key + "game_server_url_#{id}" + end + + def set_server_key(server_url) + Rails.cache.write("#{server_key}", server_url, expires_in: 5.minute) + end + + def get_server_url + Rails.cache.read(server_key) + end + # 根据得分比例来算实际得分(试卷、实训作业) def real_score score ((final_score < 0 ? 0 : final_score).to_f / challenge.score) * score From c5a60bb5a2e837d5bdcb34ed438eea7e598bc67f Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 16 Jan 2020 14:44:52 +0800 Subject: [PATCH 08/10] =?UTF-8?q?vnc=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/games_controller.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index b37b925f9..8bd84b69a 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -973,14 +973,14 @@ class GamesController < ApplicationController if res && res['code'].to_i != 0 raise("实训云平台繁忙(繁忙等级:99)") end - @vnc_url = - if request.subdomain == "pre-newweb" || request.subdomain == "test-newweb" - # 无域名版本 - "http://#{service_host}:#{res['port']}/vnc_lite.html?password=headless" - else - # 有域名版本 - "https://#{res['port']}.#{service_host}/vnc_lite.html?password=headless" - end + @vnc_url = res['showServer'] + # if request.subdomain == "pre-newweb" || request.subdomain == "test-newweb" + # # 无域名版本 + # "http://#{service_host}:#{res['port']}/vnc_lite.html?password=headless" + # else + # # 有域名版本 + # "https://#{res['port']}.#{service_host}/vnc_lite.html?password=headless" + # end @vnc_evaluate = shixun.vnc_evaluate rescue Exception => e Rails.logger.error(e.message) From 4ea97a1beb35e2fcd5b70c4c64d9fde496325a50 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 16 Jan 2020 15:03:11 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E6=B7=B7=E5=90=88=E4=BA=91=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/games_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index 8bd84b69a..5def8ec1e 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -963,7 +963,7 @@ class GamesController < ApplicationController begin shixun = game.myshixun.shixun shixun_tomcat = edu_setting('cloud_bridge') - service_host = edu_setting('vnc_url') + #service_host = edu_setting('vnc_url') tpiGitURL = "#{edu_setting('git_address_domain')}/#{game.myshixun.repo_path}" uri = "#{shixun_tomcat}/bridge/vnc/getvnc" From f439a4abfe16ba5f68713c625ec55c9775bb806d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 21 Jan 2020 21:59:35 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/question/NewMyShixunModel.js | 86 ++++++++++++----- .../modules/question/Paperreview_single.js | 29 ++++-- public/react/src/modules/question/Question.js | 92 +++++++++++++------ .../modules/question/Questionitem_banks.js | 2 +- .../modules/question/component/Contentpart.js | 4 +- .../question/component/Headplugselections.js | 9 +- .../question/component/Itembankstop.js | 44 ++++++--- .../modules/question/component/Listjihe.js | 55 +++++++---- .../question/component/Newknledpots.js | 14 ++- .../question/component/QuestionModalys.js | 42 +++++++++ .../comthetestpaper/Comthetestpaperst.js | 58 +++++++----- .../comthetestpaper/Intelligentcomponents.js | 72 +++++++++------ .../question/questioncss/questioncom.css | 8 +- .../src/modules/testpaper/Testpaperlibrary.js | 40 ++++---- .../modules/testpaper/component/Listjihe.js | 14 ++- .../component/Paperlibraryseeid_items.js | 25 +++-- .../testpaper/testioncss/testioncss.css | 7 ++ public/react/src/modules/tpm/NewHeader.js | 35 ++++--- 18 files changed, 439 insertions(+), 197 deletions(-) create mode 100644 public/react/src/modules/question/component/QuestionModalys.js diff --git a/public/react/src/modules/question/NewMyShixunModel.js b/public/react/src/modules/question/NewMyShixunModel.js index 232ba9d72..d50f41484 100644 --- a/public/react/src/modules/question/NewMyShixunModel.js +++ b/public/react/src/modules/question/NewMyShixunModel.js @@ -20,6 +20,7 @@ import {TPMIndexHOC} from "../tpm/TPMIndexHOC"; import NoneData from './component/NoneData'; import './questioncss/questioncom.css'; import Bottomsubmit from "../modals/Bottomsubmit"; +import QuestionModalys from "./component/QuestionModalys"; //exam_id 试卷的id class NewMyShixunModel extends Component { @@ -67,15 +68,28 @@ class NewMyShixunModel extends Component { oj_status:null, isVisible: false, selectionbools:false, + chakanjiexiboolindex:"无", } } + + chakanjiexibool=(index)=>{ + if(this.state.chakanjiexiboolindex===index){ + this.setState({ + chakanjiexiboolindex:"无", + }) + return + } + this.setState({ + chakanjiexiboolindex:index, + }) + } setdiscipline_id=(discipline_id)=>{ this.setState({ discipline_id:discipline_id, sub_discipline_id:null, tag_discipline_id:null, - keywords:"", + keyword:"", page:1, per_page:10, oj_status:null @@ -87,7 +101,7 @@ class NewMyShixunModel extends Component { public: this.state.defaultActiveKey, difficulty: this.state.difficulty, item_type: this.state.item_type, - keywords: null, + keyword: null, page: this.state.page, per_page:10, oj_status:null, @@ -101,7 +115,7 @@ class NewMyShixunModel extends Component { this.setState({ sub_discipline_id:sub_discipline_id, tag_discipline_id:null, - keywords:"", + keyword:"", page:1, per_page:10, oj_status:null @@ -113,7 +127,7 @@ class NewMyShixunModel extends Component { public: this.state.defaultActiveKey, difficulty: this.state.difficulty, item_type: this.state.item_type, - keywords:null, + keyword:null, page: 1, per_page:10, oj_status:null, @@ -125,7 +139,7 @@ class NewMyShixunModel extends Component { settag_discipline_id=(tag_discipline_id)=>{ this.setState({ tag_discipline_id:tag_discipline_id, - keywords:"", + keyword:"", page:1, per_page:10, oj_status:null @@ -137,7 +151,7 @@ class NewMyShixunModel extends Component { public: this.state.defaultActiveKey, difficulty: this.state.difficulty, item_type: this.state.item_type, - keywords: null, + keyword: null, page: 1, per_page:10, oj_status:null, @@ -355,7 +369,7 @@ class NewMyShixunModel extends Component { public: this.state.defaultActiveKey, difficulty: this.state.difficulty, item_type: this.state.item_type, - keywords: this.state.keywords, + keyword: this.state.keywords, page: pageNumber, per_page:10, oj_status:this.state.oj_status, @@ -463,7 +477,7 @@ class NewMyShixunModel extends Component { visiblemys: false, page: 1, per_page:10, - keywords:"", + keyword:"", oj_status:null }) @@ -474,7 +488,7 @@ class NewMyShixunModel extends Component { public: this.state.defaultActiveKey, difficulty: difficulty, item_type: this.state.item_type, - keywords:null, + keyword:null, page:1, per_page:10, oj_status:null, @@ -490,7 +504,7 @@ class NewMyShixunModel extends Component { visiblemyss: false, page: 1, per_page:10, - keywords:"", + keyword:"", oj_status:null }) @@ -503,7 +517,7 @@ class NewMyShixunModel extends Component { item_type: item_type, page: 1, per_page:10, - keywords:null, + keyword:null, oj_status:null, exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id), }; @@ -524,6 +538,19 @@ class NewMyShixunModel extends Component { } } + showmodelsInaudit = (e) => { + this.setState({ + modalsTypeInaudit: true, + titilesm: "公开申请已提交,请等待管理员的审核", + titiless: "我们将在1-2个工作日内完成审核", + }) + }; + modalsTypeInauditbool=()=>{ + this.setState({ + modalsTypeInaudit:false, + }) + } + handleVisibleChanges = (boll) => { if (this.state.visiblemys === true) { @@ -541,13 +568,13 @@ class NewMyShixunModel extends Component { setdatafunsval = (e) => { this.setState({ - keywords: e.target.value + keyword: e.target.value }) } setdatafuns = (value) => { this.setState({ - keywords: value, + keyword: value, }) var data = { discipline_id:this.state.discipline_id, @@ -556,7 +583,7 @@ class NewMyShixunModel extends Component { public: this.state.defaultActiveKey, difficulty: this.state.difficulty, item_type: this.state.item_type, - keywords: value, + keyword: value, page: this.state.page, per_page:10, oj_status:this.state.oj_status, @@ -581,7 +608,7 @@ class NewMyShixunModel extends Component { public: this.state.defaultActiveKey, difficulty: this.state.difficulty, item_type: this.state.item_type, - keywords: this.state.keywords, + keyword: this.state.keywords, page: this.state.page, per_page:10, exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id), @@ -607,7 +634,7 @@ class NewMyShixunModel extends Component { public: this.state.defaultActiveKey, difficulty: this.state.difficulty, item_type: this.state.item_type, - keywords: this.state.keywords, + keyword: this.state.keywords, page: this.state.page, per_page:10, exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id), @@ -675,7 +702,7 @@ class NewMyShixunModel extends Component { public: this.state.defaultActiveKey, difficulty: this.state.difficulty, item_type: this.state.item_type, - keywords: this.state.keywords, + keyword: this.state.keywords, page: this.state.page, per_page:10, exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id), @@ -706,7 +733,7 @@ class NewMyShixunModel extends Component { public: this.state.defaultActiveKey, difficulty: this.state.difficulty, item_type: this.state.item_type, - keywords: this.state.keywords, + keyword: this.state.keywords, page: this.state.page, per_page:10, exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id), @@ -732,7 +759,7 @@ class NewMyShixunModel extends Component { public: this.state.defaultActiveKey, difficulty: this.state.difficulty, item_type: this.state.item_type, - keywords: this.state.keywords, + keyword: this.state.keywords, page: this.state.page, per_page:10, exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id), @@ -805,7 +832,7 @@ class NewMyShixunModel extends Component { public: this.state.defaultActiveKey, difficulty: this.state.difficulty, item_type: this.state.item_type, - keywords: this.state.keywords, + keyword: this.state.keywords, page: this.state.page, per_page:10, exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id), @@ -842,7 +869,7 @@ class NewMyShixunModel extends Component { public: this.state.defaultActiveKey, difficulty: this.state.difficulty, item_type: this.state.item_type, - keywords: this.state.keywords, + keyword: this.state.keywords, page: this.state.page, per_page:10, oj_status:oj_status, @@ -856,7 +883,8 @@ class NewMyShixunModel extends Component { let { page, per_page, items_count, Headertop, visible, placement, modalsType, modalsTypes,basket_list, completion_questions_count, judgement_questions_count, multiple_questions_count, practical_questions_count, - program_questions_count, single_questions_count, subjective_questions_count,selectionbools + program_questions_count, single_questions_count, subjective_questions_count,selectionbools, + modalsTypeInaudit } = this.state; const Datacount = completion_questions_count + judgement_questions_count @@ -914,7 +942,12 @@ class NewMyShixunModel extends Component { setDownload={() => this.setDownload()}> :"" } - + { + modalsTypeInaudit===true? + this.modalsTypeInauditbool()} + setDownload={() => this.modalsTypeInauditbool()}> + :"" + } {/*顶部*/} this.chakanjiexibool(e)} getitem_basketss={(id)=>this.getitem_basketss(id)} selectallquestionsonthispage={()=>this.selectallquestionsonthispage()} getitem_baskets={(e)=>this.getitem_baskets(e)} @@ -941,7 +976,10 @@ class NewMyShixunModel extends Component { showmodels={(e) => this.showmodels(e)} showmodelysl={(e) => this.showmodelysl(e)} callback={(e) => this.callback(e)} - setoj_status={(e)=>this.setoj_status(e)}> + setoj_status={(e)=>this.setoj_status(e)} + showmodelsInaudit={(e)=>this.showmodelsInaudit(e)} + + > { items_count&&items_count>10? diff --git a/public/react/src/modules/question/Paperreview_single.js b/public/react/src/modules/question/Paperreview_single.js index 0875506e1..3eacc9c16 100644 --- a/public/react/src/modules/question/Paperreview_single.js +++ b/public/react/src/modules/question/Paperreview_single.js @@ -26,6 +26,7 @@ const tagArray = [ ] //单选题 +//Paperlibraryseeid_items.js Listjihe.js class Paperreview_single extends Component { constructor(props) { super(props); @@ -165,10 +166,16 @@ class Paperreview_single extends Component {
- + { + itemssname===null|| itemssname===undefined? + "" + : + + } +
@@ -202,10 +209,16 @@ class Paperreview_single extends Component { objectsingle&&objectsingle.program_attr&&objectsingle.program_attr.description?

- + { + itemsnamesy===null || itemsnamesy===undefined? + "" + : + + } +

: ""} diff --git a/public/react/src/modules/question/Question.js b/public/react/src/modules/question/Question.js index f1f139257..ba0b10b68 100644 --- a/public/react/src/modules/question/Question.js +++ b/public/react/src/modules/question/Question.js @@ -20,6 +20,7 @@ import {TPMIndexHOC} from "../tpm/TPMIndexHOC"; import NoneData from './component/NoneData'; import './questioncss/questioncom.css'; import SiderBars from "../question/component/SiderBars"; +import QuestionModalys from "./component/QuestionModalys"; class Question extends Component { constructor(props) { @@ -32,6 +33,7 @@ class Question extends Component { visible: false, placement: 'right', modalsType: false, + modalsTypeInaudit:false, modalsTypes:false, titilesm: "在平台审核后,所有成员均可使用试题", titiless: "是否设置为公开?", @@ -92,7 +94,7 @@ class Question extends Component { discipline_id:discipline_id, sub_discipline_id:null, tag_discipline_id:null, - keywords:"", + keyword:"", page:1, per_page:10, oj_status:null @@ -104,7 +106,7 @@ class Question extends Component { public: this.state.defaultActiveKey, difficulty: this.state.difficulty, item_type: this.state.item_type, - keywords: null, + keyword: null, page: this.state.page, per_page:10, oj_status:null @@ -117,7 +119,7 @@ class Question extends Component { this.setState({ sub_discipline_id:sub_discipline_id, tag_discipline_id:null, - keywords:"", + keyword:"", page:1, per_page:10, oj_status:null @@ -129,7 +131,7 @@ class Question extends Component { public: this.state.defaultActiveKey, difficulty: this.state.difficulty, item_type: this.state.item_type, - keywords:null, + keyword:null, page: 1, per_page:10, oj_status:null @@ -140,7 +142,7 @@ class Question extends Component { settag_discipline_id=(tag_discipline_id)=>{ this.setState({ tag_discipline_id:tag_discipline_id, - keywords:"", + keyword:"", page:1, per_page:10, oj_status:null @@ -152,7 +154,7 @@ class Question extends Component { public: this.state.defaultActiveKey, difficulty: this.state.difficulty, item_type: this.state.item_type, - keywords: null, + keyword: null, page: 1, per_page:10, oj_status:null @@ -213,12 +215,19 @@ class Question extends Component { } //刷新加载 - getdata = (data) => { + getdata = (data,bool) => { const url = `/item_banks.json`; - this.setState({ - booljupyterurls:true, - selectionbools:false, - }) + if(bool){ + this.setState({ + selectionbools:false, + }) + }else { + this.setState({ + booljupyterurls:true, + selectionbools:false, + }) + } + axios.get((url), {params: data}).then((response) => { setTimeout(()=>{ this.setState({ @@ -335,7 +344,7 @@ class Question extends Component { public: this.state.defaultActiveKey, difficulty: this.state.difficulty, item_type: this.state.item_type, - keywords: this.state.keywords, + keyword: this.state.keywords, page: pageNumber, per_page:10, oj_status:this.state.oj_status @@ -389,6 +398,16 @@ class Question extends Component { timuid: id }) }; + + showmodelsInaudit = (e) => { + this.setState({ + modalsTypeInaudit: true, + titilesm: "公开申请已提交,请等待管理员的审核", + titiless: "我们将在1-2个工作日内完成审核", + }) + }; + + showmodelysl = (id) => { this.setState({ modalsType: true, @@ -398,7 +417,11 @@ class Question extends Component { timuid: id }) }; - + modalsTypeInauditbool=()=>{ + this.setState({ + modalsTypeInaudit:false, + }) + } modalCancel = () => { this.setState({ @@ -443,7 +466,7 @@ class Question extends Component { visiblemys: false, page: 1, per_page:10, - keywords:"", + keyword:"", oj_status:null }) @@ -454,7 +477,7 @@ class Question extends Component { public: this.state.defaultActiveKey, difficulty: difficulty, item_type: this.state.item_type, - keywords:null, + keyword:null, page:1, per_page:10, oj_status:null @@ -469,7 +492,7 @@ class Question extends Component { visiblemyss: false, page: 1, per_page:10, - keywords:"", + keyword:"", oj_status:null }) @@ -482,7 +505,7 @@ class Question extends Component { item_type: item_type, page: 1, per_page:10, - keywords:null, + keyword:null, oj_status:null }; @@ -519,13 +542,13 @@ class Question extends Component { setdatafunsval = (e) => { this.setState({ - keywords: e.target.value + keyword: e.target.value }) } setdatafuns = (value) => { this.setState({ - keywords: value, + keyword: value, }) var data = { discipline_id:this.state.discipline_id, @@ -534,7 +557,7 @@ class Question extends Component { public: this.state.defaultActiveKey, difficulty: this.state.difficulty, item_type: this.state.item_type, - keywords: value, + keyword: value, page: this.state.page, per_page:10, oj_status:this.state.oj_status @@ -558,11 +581,11 @@ class Question extends Component { public: this.state.defaultActiveKey, difficulty: this.state.difficulty, item_type: this.state.item_type, - keywords: this.state.keywords, + keyword: this.state.keywords, page: this.state.page, per_page:10, }; - this.getdata(data); + this.getdata(data,true); } }) .catch(function (error) { @@ -583,11 +606,11 @@ class Question extends Component { public: this.state.defaultActiveKey, difficulty: this.state.difficulty, item_type: this.state.item_type, - keywords: this.state.keywords, + keyword: this.state.keywords, page: this.state.page, per_page:10, }; - this.getdata(data); + this.getdata(data,true); } }).catch((error) => { ////console.log(error); @@ -643,7 +666,7 @@ class Question extends Component { public: this.state.defaultActiveKey, difficulty: this.state.difficulty, item_type: this.state.item_type, - keywords: this.state.keywords, + keyword: this.state.keywords, page: this.state.page, per_page:10, }; @@ -673,7 +696,7 @@ class Question extends Component { public: this.state.defaultActiveKey, difficulty: this.state.difficulty, item_type: this.state.item_type, - keywords: this.state.keywords, + keyword: this.state.keywords, page: this.state.page, per_page:10, }; @@ -741,7 +764,7 @@ class Question extends Component { public: this.state.defaultActiveKey, difficulty: this.state.difficulty, item_type: this.state.item_type, - keywords: this.state.keywords, + keyword: this.state.keywords, page: this.state.page, per_page:10, }; @@ -777,7 +800,7 @@ class Question extends Component { public: this.state.defaultActiveKey, difficulty: this.state.difficulty, item_type: this.state.item_type, - keywords: this.state.keywords, + keyword: this.state.keywords, page: this.state.page, per_page:10, oj_status:oj_status @@ -792,7 +815,8 @@ class Question extends Component { let { page, per_page, items_count, Headertop, visible, placement, modalsType, modalsTypes,basket_list, completion_questions_count, judgement_questions_count, multiple_questions_count, practical_questions_count, - program_questions_count, single_questions_count, subjective_questions_count,selectionbools + program_questions_count, single_questions_count, subjective_questions_count,selectionbools, + modalsTypeInaudit } = this.state; const Datacount = completion_questions_count + judgement_questions_count @@ -852,6 +876,12 @@ class Question extends Component { setDownload={() => this.setDownload()}> :"" } + { + modalsTypeInaudit===true? + this.modalsTypeInauditbool()} + setDownload={() => this.modalsTypeInauditbool()}> + :"" + } @@ -920,7 +950,9 @@ class Question extends Component { showmodels={(e) => this.showmodels(e)} showmodelysl={(e) => this.showmodelysl(e)} callback={(e) => this.callback(e)} - setoj_status={(e)=>this.setoj_status(e)}> + setoj_status={(e)=>this.setoj_status(e)} + showmodelsInaudit={(e)=>this.showmodelsInaudit(e)} + > { items_count&&items_count>10? diff --git a/public/react/src/modules/question/Questionitem_banks.js b/public/react/src/modules/question/Questionitem_banks.js index 549bcc5ae..d62b4f1df 100644 --- a/public/react/src/modules/question/Questionitem_banks.js +++ b/public/react/src/modules/question/Questionitem_banks.js @@ -465,7 +465,7 @@ class Questionitem_banks extends Component { sub_discipline_id: Getdatasdata[3].rbkc[1], tag_discipline_id: myrbkc, }); - this.props.history.replace('/problems/new'); + window.open("/problems/new"); } diff --git a/public/react/src/modules/question/component/Contentpart.js b/public/react/src/modules/question/component/Contentpart.js index 96ac64153..61a0fb8ea 100644 --- a/public/react/src/modules/question/component/Contentpart.js +++ b/public/react/src/modules/question/component/Contentpart.js @@ -319,7 +319,9 @@ class Contentpart extends Component { getitem_basketss={(id)=>this.props.getitem_basketss(id)} getitem_baskets={(e)=>this.props.getitem_baskets(e)} showmodels={(e)=>this.props.showmodels(e)} - showmodelysl={(e)=>this.props.showmodelysl(e)}> + showmodelysl={(e)=>this.props.showmodelysl(e)} + showmodelsInaudit={(e)=>this.props.showmodelsInaudit(e)} + > ) diff --git a/public/react/src/modules/question/component/Headplugselections.js b/public/react/src/modules/question/component/Headplugselections.js index 643729ec1..b3da84054 100644 --- a/public/react/src/modules/question/component/Headplugselections.js +++ b/public/react/src/modules/question/component/Headplugselections.js @@ -231,11 +231,16 @@ class Headplugselections extends Component { { disciplinesdata&&disciplinesdata.map((item,key)=>{ return( - trigger.parentNode} overlay={overlaymenu(item.sub_disciplines,item.id)} key={key} placement={item.id<4?"bottomRight":item.id>=8?"bottomLeft":"bottomCenter"}> + item.sub_disciplines.length>0? + trigger.parentNode} overlay={ overlaymenu(item.sub_disciplines,item.id)} key={key} placement={item.id<4?"bottomRight":item.id>=8?"bottomLeft":"bottomCenter"}> +
  • this.shixunsearchAll(item.id)}> + {item.name} +
  • +
    + :
  • this.shixunsearchAll(item.id)}> {item.name}
  • -
    ) }) } diff --git a/public/react/src/modules/question/component/Itembankstop.js b/public/react/src/modules/question/component/Itembankstop.js index b7143f6a1..e1fa235e8 100644 --- a/public/react/src/modules/question/component/Itembankstop.js +++ b/public/react/src/modules/question/component/Itembankstop.js @@ -58,7 +58,7 @@ class Itembankstop extends Component { NewknTypedel:false, boolred:false, boolnews:false, - + sub_disciplineslength:1, } } @@ -463,15 +463,22 @@ class Itembankstop extends Component { const didata = this.props.disciplinesdata; const knowledgepointsdata = []; - + var sub_disciplineslength=0; for (var i = 0; i < didata.length; i++) { //方向 if (value[0] === didata[i].id) { const fxdidata = didata[i].sub_disciplines; + try { + sub_disciplineslength=fxdidata.length; + }catch (e) { + + } for (var j = 0; j < fxdidata.length; j++) { //课程 if (value[1] === fxdidata[j].id) { + const zsddata = fxdidata[j].tag_disciplines; + for (var k = 0; k < zsddata.length; k++) { //知识点 knowledgepointsdata.push(zsddata[k]); @@ -491,6 +498,7 @@ class Itembankstop extends Component { Knowpoints: [], knowledgepoints: knowledgepointsdata, knowledgepoints2:knowledgepointsdata, + sub_disciplineslength:sub_disciplineslength, }) this.props.form.setFieldsValue({ @@ -559,10 +567,15 @@ class Itembankstop extends Component { } NewknTypedeldel=(bool)=>{ + if(this.state.rbkc===undefined || this.state.rbkc===null || this.state.rbkc===""){ this.props.showNotification(`请选择课程方向`); return; } + // if(this.state.sub_disciplineslength===undefined || this.state.sub_disciplineslength===null || this.state.sub_disciplineslength===0){ + // this.props.showNotification(`无二级课程时没有新建入口`); + // return; + // } this.setState({ NewknTypedel:bool }) @@ -723,20 +736,22 @@ class Itembankstop extends Component { )} - + > {getFieldDecorator("rbzsd" )(
    - + @@ -746,7 +761,10 @@ class Itembankstop extends Component {
    )} -
    + + + } + { this.state.Knowpoints===undefined||this.state.Knowpoints===null?"": this.state.Knowpoints.length>0? diff --git a/public/react/src/modules/question/component/Listjihe.js b/public/react/src/modules/question/component/Listjihe.js index 92a5a9e3a..cdca0367e 100644 --- a/public/react/src/modules/question/component/Listjihe.js +++ b/public/react/src/modules/question/component/Listjihe.js @@ -23,7 +23,7 @@ const tagArrays = [ 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' ] - +//Paperreview_single.js Paperlibraryseeid_items.js class Listjihe extends Component { constructor(props) { super(props); @@ -151,7 +151,10 @@ class Listjihe extends Component { }catch (e) { analysisnames=items&&items.analysis; } + console.log(items.name); + console.log(itemsnamesy); + console.log(analysisnames); return (
    @@ -190,6 +193,7 @@ class Listjihe extends Component { "" : items.name.length>0? + itemssname===null|| itemssname===undefined?"": : items.item_type === "PROGRAM" ?

    -

    +

    { items&&items.program_attr&&items.program_attr.description?

    - - + { + itemsnamesy===null || itemsnamesy===undefined? + "" + : + + }

    :"" } @@ -346,7 +354,7 @@ class Listjihe extends Component { this.props.Isitapopup&&this.props.Isitapopup==="true"? "" : - +

    编辑 @@ -366,16 +374,26 @@ class Listjihe extends Component { { items.public === false ? items.item_type === "PROGRAM" ? - items.program_attr.status === 0 ? - "" - : - items.apply===false? -

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

    - : + ( + items.program_attr.status === 0 ? "" + : + items.apply===false? +

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

    + : + ( + items.public==true? + "" + : +

    this.props.showmodelsInaudit(e)}> + + 公开审核中 +

    + ) + ) :items.apply===false?

    this.props.showmodels(items.id)}> @@ -433,7 +451,7 @@ class Listjihe extends Component {

    -

    {items ? @@ -442,6 +460,7 @@ class Listjihe extends Component { "" : items.analysis.length>0? + analysisnames===null || analysisnames===undefined?"": { + if ( str == "" ) return true; + var regu = "^[ ]+$"; + var re = new RegExp(regu); + //为空或纯空格为 true    有值为false + console.log(re.test(str)) + return re.test(str); + } handleChange=(e)=>{ // this.setState({ @@ -20,6 +28,10 @@ class PaperDeletModel extends Component { // }) // //console.log(e.target.value); // //console.log(e.target.value.length); + if(this.isNull(e.target.value)===true){ + this.props.showNotification('不能输入空格'); + return + } this.setState({ newkntypeinput: e.target.value }) @@ -60,7 +72,7 @@ class PaperDeletModel extends Component { >

    - +
    this.props.NewknTypedeldel(false)}>取消 diff --git a/public/react/src/modules/question/component/QuestionModalys.js b/public/react/src/modules/question/component/QuestionModalys.js new file mode 100644 index 000000000..29482e464 --- /dev/null +++ b/public/react/src/modules/question/component/QuestionModalys.js @@ -0,0 +1,42 @@ +import React, { Component } from 'react'; +import {getImageUrl} from 'educoder'; +import { Modal} from 'antd'; +import axios from 'axios'; +import './../questioncss/questioncom.css' +//立即申请试用 +class QuestionModalys extends Component { + + constructor(props) { + super(props); + this.state={ + + } + } + + + render() { + + return( + +
    +

    {this.props.titilesm}

    +

    {this.props.titiless}

    + +
    +
    + ) + } +} + +export default QuestionModalys; diff --git a/public/react/src/modules/question/comthetestpaper/Comthetestpaperst.js b/public/react/src/modules/question/comthetestpaper/Comthetestpaperst.js index bc1e8cd00..662a5a9d5 100644 --- a/public/react/src/modules/question/comthetestpaper/Comthetestpaperst.js +++ b/public/react/src/modules/question/comthetestpaper/Comthetestpaperst.js @@ -41,7 +41,7 @@ const options = [ ], }, ]; -//Itembankstop 题库的 +//Itembankstop Intelligentcomponents 题库的 class Comthetestpaperst extends Component { constructor(props) { super(props); @@ -56,6 +56,7 @@ class Comthetestpaperst extends Component { options: [], NewknTypedel:false, boolred:false, + sub_disciplineslength:1, } } setboolred=(bool)=>{ @@ -413,11 +414,16 @@ class Comthetestpaperst extends Component { const didata = this.props.disciplinesdata; const knowledgepointsdata = []; - + var sub_disciplineslength=0; for (var i = 0; i < didata.length; i++) { //方向 if (value[0] === didata[i].id) { const fxdidata = didata[i].sub_disciplines; + try { + sub_disciplineslength=fxdidata.length; + }catch (e) { + + } for (var j = 0; j < fxdidata.length; j++) { //课程 if (value[1] === fxdidata[j].id) { @@ -441,6 +447,7 @@ class Comthetestpaperst extends Component { Knowpoints: [], knowledgepoints: knowledgepointsdata, knowledgepoints2:knowledgepointsdata, + sub_disciplineslength:sub_disciplineslength, }) this.props.form.setFieldsValue({ @@ -686,34 +693,39 @@ class Comthetestpaperst extends Component {
    -
    - - {getFieldDecorator("rbzsd" - )( -
    - - - + { + this.state.sub_disciplineslength===null || this.state.sub_disciplineslength===undefined||this.state.sub_disciplineslength===0?"": +
    + + {getFieldDecorator("rbzsd" + )( +
    + + + - this.NewknTypedeldel(true)}/> + this.NewknTypedeldel(true)}/> + +
    + )} +
    - )} - -
    + } + { this.state.Knowpoints===undefined||this.state.Knowpoints===null?"": this.state.Knowpoints.length>0? diff --git a/public/react/src/modules/question/comthetestpaper/Intelligentcomponents.js b/public/react/src/modules/question/comthetestpaper/Intelligentcomponents.js index 64d57e452..19b08899e 100644 --- a/public/react/src/modules/question/comthetestpaper/Intelligentcomponents.js +++ b/public/react/src/modules/question/comthetestpaper/Intelligentcomponents.js @@ -20,7 +20,9 @@ import Newknledpots from '../component/Newknledpots'; import Ldanxuan from './lntlligentpone'; const InputGroup = Input.Group; const {Option} = Select; -//Itembankstop Comthetestpaperst 题库的 +// Comthetestpaperst 题库的 +// Itembankstop 题库的 + class Intelligentcomponents extends Component { constructor(props) { super(props); @@ -35,7 +37,8 @@ class Intelligentcomponents extends Component { options: [], NewknTypedel:false, boolred:false, - rbly:"1" + rbly:"1", + sub_disciplineslength:1, } } setboolred=(bool)=>{ @@ -310,11 +313,16 @@ class Intelligentcomponents extends Component { const didata = this.props.disciplinesdata; const knowledgepointsdata = []; - + var sub_disciplineslength=0; for (var i = 0; i < didata.length; i++) { //方向 if (value[0] === didata[i].id) { const fxdidata = didata[i].sub_disciplines; + try { + sub_disciplineslength=fxdidata.length; + }catch (e) { + + } for (var j = 0; j < fxdidata.length; j++) { //课程 if (value[1] === fxdidata[j].id) { @@ -597,34 +605,38 @@ class Intelligentcomponents extends Component {
    -
    - - {getFieldDecorator("rbzsd" - )( -
    - - - - - - - this.NewknTypedeldel(true)}/> - - + { + this.state.sub_disciplineslength === null || this.state.sub_disciplineslength === undefined || this.state.sub_disciplineslength === 0 ? "" : +
    + + {getFieldDecorator("rbzsd" + )( +
    + + + + + + + this.NewknTypedeldel(true)}/> + + + +
    + )} +
    +
    + } -
    - )} -
    -
    { this.state.Knowpoints===undefined||this.state.Knowpoints===null?"": this.state.Knowpoints.length>0? diff --git a/public/react/src/modules/question/questioncss/questioncom.css b/public/react/src/modules/question/questioncss/questioncom.css index dcfdff84d..98edd9915 100644 --- a/public/react/src/modules/question/questioncss/questioncom.css +++ b/public/react/src/modules/question/questioncss/questioncom.css @@ -950,6 +950,12 @@ .mr15{ margin-right: 15px; } +.ant-modal-mask{ + z-index: 6000 !important; +} +.ant-modal-wrap{ + z-index: 6000 !important; +} .fangdatwo{ background: #fefefe; background-color: #fefefe; @@ -960,7 +966,7 @@ top:0px; bottom: 0px; left: 0px; - z-index: 999999; + z-index: 5000; right: 0px; } diff --git a/public/react/src/modules/testpaper/Testpaperlibrary.js b/public/react/src/modules/testpaper/Testpaperlibrary.js index fe244b9c4..86a267b83 100644 --- a/public/react/src/modules/testpaper/Testpaperlibrary.js +++ b/public/react/src/modules/testpaper/Testpaperlibrary.js @@ -30,7 +30,7 @@ class Testpaperlibrary extends Component { public:null, difficulty:null, item_type:null, - keywords:null, + keyword:null, page:1, per_page:10, booljupyterurls:false, @@ -88,7 +88,7 @@ class Testpaperlibrary extends Component { tag_discipline_id:this.state.tag_discipline_id, public: this.state.defaultActiveKey, difficulty: this.state.difficulty, - keywords: null, + keyword: null, per_page:10, } this.getdata(data); @@ -96,14 +96,14 @@ class Testpaperlibrary extends Component { setdatafunsval = (e) => { this.setState({ - keywords: e.target.value + keyword: e.target.value }) } setdatafuns = (value) => { this.setState({ - keywords: value, + keyword: value, }) var data={ page:this.state.page, @@ -112,7 +112,7 @@ class Testpaperlibrary extends Component { tag_discipline_id:this.state.tag_discipline_id, public: this.state.defaultActiveKey, difficulty: this.state.difficulty, - keywords: value, + keyword: value, per_page:10, } this.getdata(data); @@ -121,7 +121,7 @@ class Testpaperlibrary extends Component { this.setState({ defaultActiveKey: key, difficulty:null, - keywords:null, + keyword:null, page:1, }) var data={ @@ -131,7 +131,7 @@ class Testpaperlibrary extends Component { tag_discipline_id:this.state.tag_discipline_id, public: key, difficulty:null, - keywords: null, + keyword: null, per_page:10, } this.getdata(data); @@ -177,7 +177,7 @@ class Testpaperlibrary extends Component { discipline_id:discipline_id, sub_discipline_id:null, tag_discipline_id:null, - keywords:null, + keyword:null, page: 1, per_page:10, }) @@ -187,7 +187,7 @@ class Testpaperlibrary extends Component { tag_discipline_id:null, public: this.state.defaultActiveKey, difficulty: this.props.difficulty, - keywords: null, + keyword: null, page: 1, per_page:10, }; @@ -198,7 +198,7 @@ class Testpaperlibrary extends Component { this.setState({ sub_discipline_id:sub_discipline_id, tag_discipline_id:null, - keywords:null, + keyword:null, page:1, per_page:10, }) @@ -208,7 +208,7 @@ class Testpaperlibrary extends Component { tag_discipline_id:null, public: this.state.defaultActiveKey, difficulty: this.state.difficulty, - keywords: null, + keyword: null, page:1, per_page:10, }; @@ -218,7 +218,7 @@ class Testpaperlibrary extends Component { settag_discipline_id=(tag_discipline_id)=>{ this.setState({ tag_discipline_id:tag_discipline_id, - keywords:null, + keyword:null, page:1, per_page:10, }) @@ -228,7 +228,7 @@ class Testpaperlibrary extends Component { tag_discipline_id:tag_discipline_id, public: this.state.defaultActiveKey, difficulty: this.state.difficulty, - keywords: null, + keyword: null, page: 1, per_page:10, }; @@ -284,7 +284,7 @@ class Testpaperlibrary extends Component { tag_discipline_id:this.state.tag_discipline_id, public: this.state.defaultActiveKey, difficulty: this.state.difficulty, - keywords: this.state.keywords, + keyword: this.state.keywords, page: this.state.page, per_page:10, }; @@ -310,7 +310,7 @@ class Testpaperlibrary extends Component { tag_discipline_id:this.state.tag_discipline_id, public: this.state.defaultActiveKey, difficulty: this.state.difficulty, - keywords: this.state.keywords, + keyword: this.state.keywords, page: this.state.page, per_page:10, }; @@ -325,7 +325,7 @@ class Testpaperlibrary extends Component { showmodels = (id) => { this.setState({ modalsType: true, - titilesm: "设为公开后,所有成员均可使用试卷", + titilesm: "在平台审核后,所有成员均可使用试题", titiless: "是否设置为公开?", titbool: true, timuid: id @@ -353,7 +353,7 @@ class Testpaperlibrary extends Component { this.setState({ difficulty: difficulty, visiblemys: false, - keywords:"", + keyword:"", page: 1, per_page:10, }) @@ -364,7 +364,7 @@ class Testpaperlibrary extends Component { tag_discipline_id:this.state.tag_discipline_id, public: this.state.defaultActiveKey, difficulty: difficulty, - keywords:null, + keyword:null, page:1, per_page:10, }; @@ -379,7 +379,7 @@ class Testpaperlibrary extends Component { this.setState({ item_type: item_type, visiblemyss: false, - keywords:null, + keyword:null, page: 1, per_page:10, }) @@ -391,7 +391,7 @@ class Testpaperlibrary extends Component { public: this.state.defaultActiveKey, difficulty: this.state.difficulty, item_type: item_type, - keywords:"", + keyword:"", page: 1, per_page:10, }; diff --git a/public/react/src/modules/testpaper/component/Listjihe.js b/public/react/src/modules/testpaper/component/Listjihe.js index 53fc7181a..db08b97f3 100644 --- a/public/react/src/modules/testpaper/component/Listjihe.js +++ b/public/react/src/modules/testpaper/component/Listjihe.js @@ -80,7 +80,7 @@ class Listjihe extends Component {
    -

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

    +
    this.gotoseesj(items.id)}>

    {names}

    试题数:{question_counts}

    总分:{total_scores}

    @@ -92,9 +92,15 @@ class Listjihe extends Component { 更新时间:{update_times}

    -

    - 使用次数:{quotess} -

    + { + quotess===null||quotess===undefined||quotess===0? + "" + : +

    + 使用次数:{quotess} +

    + } + { defaultActiveKey===1||defaultActiveKey==="1"?

    diff --git a/public/react/src/modules/testpaper/component/Paperlibraryseeid_items.js b/public/react/src/modules/testpaper/component/Paperlibraryseeid_items.js index 7d66a19c4..c7c974c5b 100644 --- a/public/react/src/modules/testpaper/component/Paperlibraryseeid_items.js +++ b/public/react/src/modules/testpaper/component/Paperlibraryseeid_items.js @@ -24,6 +24,7 @@ const tagArray = [ ] //单选题 +//Paperreview_single.js Listjihe.js class Paperlibraryseeid_items extends Component { constructor(props) { super(props); @@ -160,10 +161,16 @@ class Paperlibraryseeid_items extends Component {

    - + { + itemssname===null || itemssname===undefined? + "" + : + + } +
    @@ -196,10 +203,16 @@ class Paperlibraryseeid_items extends Component { objectsingle&&objectsingle.program_attr&&objectsingle.program_attr.description?

    - + /> + } +

    : ""} diff --git a/public/react/src/modules/testpaper/testioncss/testioncss.css b/public/react/src/modules/testpaper/testioncss/testioncss.css index 2025779ab..0426c119c 100644 --- a/public/react/src/modules/testpaper/testioncss/testioncss.css +++ b/public/react/src/modules/testpaper/testioncss/testioncss.css @@ -927,3 +927,10 @@ color:rgba(51,51,51,1); line-height:19px; } +.maxnamewidth100s{ + max-width: 774px; + overflow:hidden; + text-overflow:ellipsis; + white-space:nowrap; + cursor: default; +} diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 5ca8e986b..6f970a404 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -940,10 +940,9 @@ submittojoinclass=(value)=>{ width:'93px', height:'80px', }}> -

    试题库

    -

    -

    试卷库

    +

    试题库

    +

    试卷库

    ); return ( @@ -951,7 +950,7 @@ submittojoinclass=(value)=>{
    - {/*
  • */} - {/* */} - {/*
    */} - {/*
    */} - {/* 题库*/} - {/*
    */} - {/*
    */} - {/*
    */} - {/*
  • */} +
  • + +
    +
    + 题库 +
    +
    +
    +