Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

video_transcode
caicai8 5 years ago
commit c6a2837aca

@ -95,13 +95,13 @@ class ApplicationController < ActionController::Base
check_account
tip_exception(@course.excellent ? 410 : 409, "您没有权限进入")
end
if @user_course_identity > Course::CREATOR && @user_course_identity <= Course::STUDENT && @course.tea_id != current_user.id
# 实名认证和职业认证的身份判断
tip_exception(411, "你的实名认证和职业认证审核未通过") if @course.authentication &&
@course.professional_certification && (!current_user.authentication && !current_user.professional_certification)
tip_exception(411, "你的实名认证审核未通过") if @course.authentication && !current_user.authentication
tip_exception(411, "你的职业认证审核未通过") if @course.professional_certification && !current_user.professional_certification
end
# if @user_course_identity > Course::CREATOR && @user_course_identity <= Course::STUDENT && @course.tea_id != current_user.id
# # 实名认证和职业认证的身份判断
# tip_exception(411, "你的实名认证和职业认证审核未通过") if @course.authentication &&
# @course.professional_certification && (!current_user.authentication && !current_user.professional_certification)
# tip_exception(411, "你的实名认证审核未通过") if @course.authentication && !current_user.authentication
# tip_exception(411, "你的职业认证审核未通过") if @course.professional_certification && !current_user.professional_certification
# end
uid_logger("###############user_course_identity:#{@user_course_identity}")
end

@ -153,8 +153,8 @@ class CoursesController < ApplicationController
begin
ActiveRecord::Base.transaction do
@course = Course.new(name: params[:name], class_period: params[:class_period], credit: params[:credit],
end_date: params[:end_date], is_public: params[:is_public], school_id: @school.id,
authentication: params[:authentication], professional_certification: params[:professional_certification])
end_date: params[:end_date], is_public: params[:is_public], school_id: @school.id)
# authentication: params[:authentication], professional_certification: params[:professional_certification])
@course.tea_id = current_user.id
if params[:subject_id].blank?
@ -219,8 +219,8 @@ class CoursesController < ApplicationController
extra_params[:is_end] = 1
end
extra_params[:authentication] = params[:authentication]
extra_params[:professional_certification] = params[:professional_certification]
# extra_params[:authentication] = params[:authentication]
# extra_params[:professional_certification] = params[:professional_certification]
if @course.subject
@course.start_date = params[:start_date]
@ -1157,10 +1157,10 @@ class CoursesController < ApplicationController
return normal_status(-1, "课堂已结束,无法加入") if course.is_end
# 实名认证和职业认证的身份判断
return normal_status(-2, "该课堂要求成员完成实名和职业认证") if course.authentication &&
course.professional_certification && (!current_user.authentication && !current_user.professional_certification)
return normal_status(-2, "该课堂要求成员完成实名认证") if course.authentication && !current_user.authentication
return normal_status(-2, "该课堂要求成员完成职业认证") if course.professional_certification && !current_user.professional_certification
# return normal_status(-2, "该课堂要求成员完成实名和职业认证") if course.authentication &&
# course.professional_certification && (!current_user.authentication && !current_user.professional_certification)
# return normal_status(-2, "该课堂要求成员完成实名认证") if course.authentication && !current_user.authentication
# return normal_status(-2, "该课堂要求成员完成职业认证") if course.professional_certification && !current_user.professional_certification
# 身份验证
if params[:professor].blank? && params[:assistant_professor].blank? && params[:student].blank?
@ -1452,6 +1452,7 @@ class CoursesController < ApplicationController
# Never trust parameters from the scary internet, only allow the white list through.
def course_params
params.require(:course).permit(:name, :class_period, :credit, :end_date, :is_public, :authentication, :professional_certification)
# params.require(:course).permit(:name, :class_period, :credit, :end_date, :is_public, :authentication, :professional_certification)
end
def validate_course_name

@ -1,9 +1,9 @@
class ExaminationBanksController < ApplicationController
include PaginateHelper
before_action :require_login
before_action :certi_identity_auth, only: [:create, :edit, :update, :destroy, :set_public, :revoke_item]
before_action :find_exam, except: [:index, :create]
before_action :edit_auth, only: [:update, :destroy, :set_public, :revoke_item]
before_action :certi_identity_auth, only: [:create, :edit, :update, :destroy, :set_public, :revoke_item, :cancel_items]
before_action :find_exam, except: [:index, :create, :cancel_items]
before_action :edit_auth, only: [:update, :destroy, :set_public, :revoke_item, :cancel_items]
before_action :identity_auth, only: [:index]
def index
@ -76,6 +76,11 @@ class ExaminationBanksController < ApplicationController
render_ok
end
def cancel_items
current_user.item_baskets.where(item_bank_id: params[:item_ids]).destroy_all
render_ok
end
private
def form_params

@ -2,7 +2,7 @@ class Schools::SchoolStatisticService < ApplicationService
attr_reader :school
def initialize(school)
@school = school.includes(:courses, user_extensions: :user)
@school = school
@user_extensions = school.user_extensions
end
@ -26,14 +26,14 @@ class Schools::SchoolStatisticService < ApplicationService
@user_extensions.map{|ue| ue.user.last_login_on&.between?(1.weeks.ago, Time.now)}.size
end
# 活跃用户(近3个月有登录)
# 活跃用户(近1个月有登录)
def acitve_user_1_months_count
@user_extensions.map{|ue| ue.user.last_login_on&.between?(1.months.ago, Time.now)}.size
@user_extensions.joins(:user).map{|ue| ue.user.last_login_on&.between?(1.months.ago, Time.now)}.size
end
# 活跃用户近3个月有登录
def acitve_user_3_months_count
@user_extensions.map{|ue| ue.user.last_login_on&.between?(3.months.ago, Time.now)}.size
@user_extensions.map{|ue| ue.user&.last_login_on&.between?(3.months.ago, Time.now)}.size
end
# 活跃用户(进半年有登录记录)
@ -52,10 +52,15 @@ class Schools::SchoolStatisticService < ApplicationService
end
# 实训作业数目
def hom_shixuns_count
def homw_shixuns_count
@school.courses.joins(:homework_commons).where(homework_commons: {homework_type: 'practice'}).size
end
# 其他类型作业
def homw_other_count
@school.courses.joins(:homework_commons).where.not(homework_commons: {homework_type: 'practice'}).size
end
# 资源数
def sources_count
@school.courses.joins(:attachments).size
@ -67,7 +72,7 @@ class Schools::SchoolStatisticService < ApplicationService
end
# 制作实训数
def shixun_count
def shixuns_count
@user_extensions.joins(user: :shixuns).size
end
@ -83,17 +88,17 @@ class Schools::SchoolStatisticService < ApplicationService
# 挑战的关卡数
def games_count
@user_extensions.joins("join games on games.user_id = user_extensions.user_id").where(games: {status: 0..2})
@user_extensions.joins("join games on games.user_id = user_extensions.user_id").where(games: {status: 0..2}).size
end
# 通关的关卡数
def pass_games_count
@user_extensions.joins("join games on games.user_id = user_extensions.user_id").where(games: {status: 2})
@user_extensions.joins("join games on games.user_id = user_extensions.user_id").where(games: {status: 2}).size
end
# 评测总数
def evalute_count
@user_extensions.joins("join games on games.user_id = user_extensions.user_id").sum(:evalute_count)
def evaluate_count
@user_extensions.joins("join games on games.user_id = user_extensions.user_id").sum(:evaluate_count).to_i
end

@ -85,6 +85,7 @@ Rails.application.routes.draw do
post :set_public
delete :revoke_item
end
post :cancel_items, on: :collection
end
resources :examination_items do

@ -0,0 +1,5 @@
class AddIndexForStaAll < ActiveRecord::Migration[5.2]
def change
add_index :sta_alls, :school_id, :unique => true
end
end

@ -1,8 +0,0 @@
#coding=utf-8
desc "同步高校数据"
namespace :school_statistic do
task sync_records: :environment do
end
end

@ -2,15 +2,23 @@ desc "统计每个学校使用数据"
namespace :static_all do
task :repo => :environment do
School.find_each(batch_size: 100) do |school|
User.joins(:user_extension).where(school_id: school.id)
report = StaAll.find_or_initialize_by(school_id: school.id)
report.shixun_evaluate_count = evaluate_count
report.save
school_alls = School.includes(:courses, user_extensions: :user).all
school_alls.find_in_batches(batch_size: 50) do |schools|
Parallel.each(schools, in_processes: 5) do |school|
puts("school_id: #{school.id}")
data = Schools::SchoolStatisticService.new(school)
sta_all = StaAll.find_or_initialize_by(school_id: school.id)
attrs = {tea_count: data.teacher_count, stu_count: data.student_count, courses_count: data.courses_count,
active_users_count: data.acitve_user_3_months_count, curr_courses_count: data.curr_courses_count,
homw_shixuns_count: data.homw_shixuns_count, homw_other_count: data.homw_other_count,
sources_count: data.sources_count, videos_count: data.videos_count, shixuns_count: data.shixuns_count,
myshixuns_count: data.myshixuns_count, mys_passed_count: data.pass_myshixun_count,
games_count: data.games_count, games_passed_count: data.pass_games_count, build_count: data.evaluate_count}
puts "sta_all: #{attrs}"
sta_all.assign_attributes(attrs)
sta_all.save!
end
end
end
end

@ -221,7 +221,7 @@ function generateNewIndexJsp() {
// <script type="text/javascript" src="/js/js_min_all.js"></script>
var result = data
.replace(jsMinAllRegex, code)
.replace(flvMinAllRegex, code)
.replace(flvMinAllRegex)
// .replace('/js/js_min_all.js', `${cdnHost}/react/build/js/js_min_all.js?v=${newVersion}`)
// .replace('/js/js_min_all_2.js', `${cdnHost}/react/build/js/js_min_all_2.js?v=${newVersion}`)

@ -793,37 +793,37 @@ class App extends Component {
render={
(props) => (<Paperreview {...this.props} {...props} {...this.state} />)
}/>
{/*<Route path="/paperlibrary/edit/:id"*/}
{/* render={*/}
{/* (props) => (<Paperlibraryeditid {...this.props} {...props} {...this.state} />)*/}
{/* }/>*/}
<Route path="/paperlibrary/edit/:id"
render={
(props) => (<Paperlibraryeditid {...this.props} {...props} {...this.state} />)
}/>
{/*<Route path="/paperlibrary/see/:id"*/}
{/* render={*/}
{/* (props) => (<Paperlibraryseeid {...this.props} {...props} {...this.state} />)*/}
{/* }/>*/}
<Route path="/paperlibrary/see/:id"
render={
(props) => (<Paperlibraryseeid {...this.props} {...props} {...this.state} />)
}/>
<Route path="/myproblems/:id/:tab?"
render={
(props) => (<StudentStudy {...this.props} {...props} {...this.state} />)
} />
{/*<Route path="/question/edit/:id"*/}
{/* render={*/}
{/* (props) => (<Questionitem_banks {...this.props} {...props} {...this.state} />)*/}
{/* } />*/}
{/*<Route path="/question/newitem"*/}
{/* render={*/}
{/* (props) => (<Questionitem_banks {...this.props} {...props} {...this.state} />)*/}
{/* } />*/}
{/*<Route path="/question/:type"*/}
{/* render={*/}
{/* (props) => (<Headplugselection {...this.props} {...props} {...this.state} />)*/}
{/* } />*/}
{/*<Route path="/paperlibrary"*/}
{/* render={*/}
{/* (props) => (<Testpaperlibrary {...this.props} {...props} {...this.state} />)*/}
{/* }/>*/}
<Route path="/question/edit/:id"
render={
(props) => (<Questionitem_banks {...this.props} {...props} {...this.state} />)
} />
<Route path="/question/newitem"
render={
(props) => (<Questionitem_banks {...this.props} {...props} {...this.state} />)
} />
<Route path="/question/:type"
render={
(props) => (<Headplugselection {...this.props} {...props} {...this.state} />)
} />
<Route path="/paperlibrary"
render={
(props) => (<Testpaperlibrary {...this.props} {...props} {...this.state} />)
}/>
<Route path="/Integeneration"
render={
@ -835,19 +835,15 @@ class App extends Component {
(props) => (<Developer {...this.props} {...props} {...this.state} />)
}/>
{/*<Route path="/question"*/}
{/* render={*/}
{/* (props) => (<Headplugselection {...this.props} {...props} {...this.state} />)*/}
{/* }/>*/}
<Route path="/question"
render={
(props) => (<Headplugselection {...this.props} {...props} {...this.state} />)
}/>
{/*<Route path="/wxcode/:identifier?" component={WXCode}*/}
{/* render={*/}
{/* (props)=>(<WXCode {...this.props} {...props} {...this.state}></WXCode>)*/}
{/* }*/}
{/*/>*/}
<Route exact path="/"
// component={ShixunsHome}
render={

@ -258,16 +258,10 @@ export function initAxiosInterceptors(props) {
}
//
// console.log(config);
if (config.method === "post") {
if (requestMap[config.url] === true) { // 避免重复的请求 导致页面f5刷新 也会被阻止 显示这个方法会影响到定制信息
// console.log(config);
// console.log(JSON.parse(config));
// console.log(config.url);
// console.log("被阻止了是重复请求=================================");
if (requestMap[config.url] === true) {
return false;
}
}
// 非file_update请求
// // 非file_update请求
if (config.url.indexOf('update_file') === -1) {
requestMap[config.url] = true;

@ -0,0 +1,66 @@
@charset "utf-8";
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimSun]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimSun]::before {
content: "宋体";
font-family:SimSun !important;
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimHei]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimHei]::before {
content: "黑体";
font-family:SimHei !important;
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Microsoft-YaHei]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Microsoft-YaHei]::before {
content: "微软雅黑";
font-family:Microsoft YaHei !important;
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=KaiTi]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=KaiTi]::before {
content: "楷体";
font-family:KaiTi !important;
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=FangSong]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=FangSong]::before {
content: "仿宋";
font-family:FangSong !important;
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Arial]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Arial]::before {
content: "Arial";
font-family:Arial !important;
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Times-New-Roman]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Times-New-Roman]::before {
content: "Times New Roman";
font-family:Times New Roman !important;
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=sans-serif]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=sans-serif]::before {
content: "sans-serif";
font-family:sans-serif !important;
}
.ql-font-SimSun {
font-family:SimSun !important;
}
.ql-font-SimHei {
font-family:SimHei !important;
}
.ql-font-Microsoft-YaHei {
font-family:Microsoft YaHei !important;
}
.ql-font-KaiTi {
font-family:KaiTi !important;
}
.ql-font-FangSong {
font-family:FangSong !important;
}
.ql-font-Arial {
font-family:Arial !important;
}
.ql-font-Times-New-Roman {
font-family:Times New Roman !important;
}
.ql-font-sans-serif {
font-family:sans-serif !important;
}

@ -11,6 +11,7 @@ import 'quill/dist/quill.core.css'; // 核心样式
import 'quill/dist/quill.snow.css'; // 有工具栏
import 'quill/dist/quill.bubble.css'; // 无工具栏
import 'katex/dist/katex.min.css'; // katex 表达式样式
import './font.css'
import React, { useState, useRef, useEffect } from 'react';
import Quill from 'quill';
import katex from 'katex';
@ -19,12 +20,12 @@ import { fetchUploadImage } from '../../services/ojService.js';
import { getImageUrl } from 'educoder'
import ImageBlot from './ImageBlot';
import FillBlot from './FillBlot';
const Size = Quill.import('attributors/style/size');
const Font = Quill.import('formats/font');
var Size = Quill.import('attributors/style/size');
// const Color = Quill.import('attributes/style/color');
Size.whitelist = ['14px', '16px', '18px', '20px', false];
Font.whitelist = ['Microsoft-YaHei','SimSun', 'SimHei','KaiTi','FangSong','Arial','Times-New-Roman','sans-serif'];
var fonts = ['Microsoft-YaHei','SimSun', 'SimHei','KaiTi','FangSong'];
var Font = Quill.import('formats/font');
Font.whitelist = fonts; //将字体加入到白名单
window.Quill = Quill;
window.katex = katex;
Quill.register(ImageBlot);
@ -59,7 +60,7 @@ function QuillForEditor ({
{align: []}, {list: 'ordered'}, {list: 'bullet'}, // 列表
{script: 'sub'}, {script: 'super'},
{ 'color': [] }, { 'background': [] },
{ 'font': ['Microsoft-YaHei','SimSun', 'SimHei','KaiTi','FangSong','Arial','Times-New-Roman','sans-serif']},
{ 'font': []},
{header: [1,2,3,4,5,false]},
'blockquote', 'code-block',
'link', 'image', 'video',

@ -0,0 +1,18 @@
.ql-editor .ql-font-Microsoft-YaHei {
font-family: "Microsoft YaHei";
}
.ql-editor .ql-font-SimSun {
font-family: "SimSun";
}
.ql-editor .ql-font-SimHei {
font-family: "SimHei";
}
.ql-editor .ql-font-KaiTi {
font-family: "KaiTi";
}
.ql-editor .ql-font-Arial {
font-family: "Arial";
}
.ql-editor .Times-New-Roman {
font-family: "Times New Roman";
}

@ -0,0 +1,28 @@
.ql-snow .ql-picker.ql-font .ql-picker-label::before,
.ql-snow .ql-picker.ql-font .ql-picker-item::before {
content: '微软雅黑';
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Microsoft-YaHei]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Microsoft-YaHei]::before {
content: "微软雅黑";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimSun]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimSun]::before {
content: "宋体";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimHei]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimHei]::before {
content: "黑体";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=KaiTi]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=KaiTi]::before {
content: "楷体";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Arial]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Arial]::before {
content: "Arial";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Times-New-Roman]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Times-New-Roman]::before {
content: "Times New Roman";
}

@ -1,7 +1,7 @@
/*
* @Description: 学员学习
* @Author: tangjiang
* @Github:
* @Github:
* @Date: 2019-11-23 10:53:19
* @LastEditors : tangjiang
* @LastEditTime : 2020-02-10 18:24:01
@ -37,7 +37,7 @@ function StudentStudy (props) {
} = props;
const {
match: { params },
match: { params },
getUserProgramDetail,
saveUserProgramIdentifier
} = props;
@ -48,7 +48,18 @@ function StudentStudy (props) {
// 保存当前的id
saveUserProgramIdentifier(id);
// startProgramQuestion(id);
getUserProgramDetail(id);
// console.log("getUserProgramDetail(id)");
// console.log(id);
// console.log(id.charAt(id.length-1));
try {
if(id.charAt(id.length-1)==="?"){
id = id.substring(0, id.length - 1);
}
}catch (e) {
}
getUserProgramDetail(id);
const $searchs = window.location.search && window.location.search.substring(1);
if ($searchs) {
const $params = $searchs.split('&') || [];
@ -110,7 +121,7 @@ function StudentStudy (props) {
props.clearOjForUserReducer();
props.history.push(`/problems/${identifier}/edit?{searchParams}`);
}
// 处理退出
// 处理退出
const handleClickQuit = () => {
// 退出时,清空内容
props.clearOjForUserReducer();
@ -136,9 +147,9 @@ function StudentStudy (props) {
</div>
<div className={'study_quit'}>
{/* to={`/problems/${_hack_id}/edit`} */}
<span
<span
style={{ display: userInfo.hack_manager ? 'inline-block' : 'none' }}
onClick={() => handleClickEditor(hack.identifier)}
onClick={() => handleClickEditor(hack.identifier)}
className={`quit-btn`}
>
<Icon type="form" className="quit-icon"/> 编辑
@ -161,7 +172,7 @@ function StudentStudy (props) {
<LeftPane />
</div>
<SplitPane split="vertical" defaultSize="100%" allowResize={false}>
<RightPane
<RightPane
updateNotice={handleUpdateNotice}
/>
<div />
@ -182,7 +193,7 @@ const mapStateToProps = (state) => {
user_program_identifier,
hack_identifier,
searchParams
};
};
};
const mapDispatchToProps = (dispatch) => ({

@ -23,6 +23,7 @@ import Bottomsubmit from "../modals/Bottomsubmit";
import QuestionModalys from "./component/QuestionModalys";
//exam_id 试卷的id
var Undoclickable=true;
class NewMyShixunModel extends Component {
constructor(props) {
super(props);
@ -162,11 +163,32 @@ class NewMyShixunModel extends Component {
//初始化
componentDidMount() {
const isysladmins=this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false;
const is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false;
let isysladmins=false;
let is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false;
const professional_certification=this.props&&this.props.current_user&&this.props.current_user.professional_certification?this.props.current_user.professional_certification:false;
let {defaultActiveKey} = this.props;
var defaultActiveKeys=defaultActiveKey;
try {
if(this.props){
if(this.props.current_user){
if(this.props.current_user.admin){
isysladmins=true;
}
else if(this.props.current_user.business){
isysladmins=true;
}
}
}
if(is_teacher===false){
if(this.props.current_user.user_identity !=="学生"){
//专业人士
is_teacher=true
}
}
}catch (e) {
}
if(isysladmins===true||(is_teacher===true&&professional_certification===true)){
defaultActiveKeys="0"
}else{
@ -206,12 +228,33 @@ class NewMyShixunModel extends Component {
componentDidUpdate(prevProps) {
if(prevProps.current_user !== this.props.current_user) {
debugger
const isysladmins=this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false;
const is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false;
let isysladmins=false;
let is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false;
const professional_certification=this.props&&this.props.current_user&&this.props.current_user.professional_certification?this.props.current_user.professional_certification:false;
let {defaultActiveKey} = this.props;
var defaultActiveKeys=defaultActiveKey;
try {
if(this.props){
if(this.props.current_user){
if(this.props.current_user.admin){
isysladmins=true;
}
else if(this.props.current_user.business){
isysladmins=true;
}
}
}
if(is_teacher===false){
if(this.props.current_user.user_identity !=="学生"){
//专业人士
is_teacher=true
}
}
}catch (e) {
}
if(isysladmins===true||(is_teacher===true&&professional_certification===true)){
defaultActiveKeys="0"
}else{
@ -219,6 +262,12 @@ class NewMyShixunModel extends Component {
}
this.callback(defaultActiveKeys);
}
if(prevProps.Contentdata !== this.props.Contentdata){
this.setState({
Contentdata:this.props.Contentdata,
})
}
}
//公共和我的
@ -680,7 +729,35 @@ class NewMyShixunModel extends Component {
}
//选用
// 不选用 Question.js页面也有个
NOgetitem_baskets=(data)=>{
let url="/examination_banks/cancel_items.json";
axios.post(url, data)
.then((result) => {
if (result.data.status == 0) {
var data = {
discipline_id:this.state.discipline_id,
sub_discipline_id:this.state.sub_discipline_id,
tag_discipline_id:this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: this.state.item_type,
keyword: this.state.keywords,
page: this.state.page,
per_page:10,
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
};
this.getdatasy(data);
this.getbasket_listdata();
}
}).catch((error) => {
////console.log(error);
})
}
//选用 Question.js页面也有个
getitem_baskets=(data)=>{
//选用题型可以上传单个 或者多个题型
let url="";
@ -694,7 +771,6 @@ class NewMyShixunModel extends Component {
axios.post(url, data)
.then((result) => {
if (result.data.status == 0) {
// this.props.showNotification(`选用成功`);
var data = {
discipline_id:this.state.discipline_id,
sub_discipline_id:this.state.sub_discipline_id,
@ -709,9 +785,6 @@ class NewMyShixunModel extends Component {
};
this.getdatasy(data);
this.getbasket_listdata();
// this.setState({
// visible:true
// })
}
}).catch((error) => {
////console.log(error);
@ -719,63 +792,84 @@ class NewMyShixunModel extends Component {
}
// 撤销
getitem_basketss=(id)=>{
let url="";
if(this.props.exam_id===undefined){
url=`/item_baskets/${id}.json`;
axios.delete(url)
.then((result) => {
if (result.data.status == 0) {
// this.props.showNotification(`撤销成功`);
var data = {
discipline_id:this.state.discipline_id,
sub_discipline_id:this.state.sub_discipline_id,
tag_discipline_id:this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: this.state.item_type,
keyword: this.state.keywords,
page: this.state.page,
per_page:10,
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
};
this.getdatasy(data);
this.getbasket_listdata();
}
}).catch((error) => {
////console.log(error);
})
if(Undoclickable===true) {
Undoclickable = false;
url = `/item_baskets/${id}.json`;
axios.delete(url)
.then((result) => {
if (result.data.status == 0) {
// this.props.showNotification(`撤销成功`);
var data = {
discipline_id: this.state.discipline_id,
sub_discipline_id: this.state.sub_discipline_id,
tag_discipline_id: this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: this.state.item_type,
keyword: this.state.keywords,
page: this.state.page,
per_page: 10,
exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
};
this.getdatasy(data);
this.getbasket_listdata();
}
setTimeout(()=>{
Undoclickable=true;
},1000);
}).catch((error) => {
setTimeout(()=>{
Undoclickable=true;
},1000);
})
}
}else{
url=`/examination_banks/${this.props.exam_id}/revoke_item.json`;
axios.delete(url,{ data: {
item_id:id===undefined?"":parseInt(id),
}})
.then((result) => {
if (result.data.status == 0) {
// this.props.showNotification(`撤销成功`);
var data = {
discipline_id:this.state.discipline_id,
sub_discipline_id:this.state.sub_discipline_id,
tag_discipline_id:this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: this.state.item_type,
keyword: this.state.keywords,
page: this.state.page,
per_page:10,
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
};
this.getdatasy(data);
this.getbasket_listdata();
}
}).catch((error) => {
////console.log(error);
})
if(Undoclickable===true) {
Undoclickable = false;
url = `/examination_banks/${this.props.exam_id}/revoke_item.json`;
axios.delete(url, {
data: {
item_id: id === undefined ? "" : parseInt(id),
}
})
.then((result) => {
if (result.data.status == 0) {
// this.props.showNotification(`撤销成功`);
var data = {
discipline_id: this.state.discipline_id,
sub_discipline_id: this.state.sub_discipline_id,
tag_discipline_id: this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: this.state.item_type,
keyword: this.state.keywords,
page: this.state.page,
per_page: 10,
exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
};
this.getdatasy(data);
this.getbasket_listdata();
}
setTimeout(()=>{
Undoclickable=true;
},1000);
}).catch((error) => {
setTimeout(()=>{
Undoclickable=true;
},1000);
})
}
}
}
//全选试题库
selectallquestionsonthispage=()=>{
selectallquestionsonthispage=(bool)=>{
var item_idsdata=[];
var arr= this.state.Contentdata.items;
@ -783,6 +877,10 @@ class NewMyShixunModel extends Component {
if(data.item_type==="PROGRAM"){
//编程题
if(data.choosed===true){
if(data.program_attr.status===1){
//已发布
item_idsdata.push(data.id);
}
}else{
//未选用
@ -796,7 +894,7 @@ class NewMyShixunModel extends Component {
}else{
//不是编程题
if(data.choosed===true){
item_idsdata.push(data.id);
}else{
//未选用
item_idsdata.push(data.id);
@ -808,10 +906,21 @@ class NewMyShixunModel extends Component {
item_ids:item_idsdata,
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
}
this.getitem_baskets(data);
this.setState({
selectallquestionsonthispages:true,
})
if(bool===false){
this.getitem_baskets(data);
this.setState({
selectallquestionsonthispages:true,
})
}else{
this.NOgetitem_baskets(data);
this.setState({
selectallquestionsonthispages:false,
})
}
}
//全选的状态
@ -884,7 +993,7 @@ class NewMyShixunModel extends Component {
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,
modalsTypeInaudit
modalsTypeInaudit,Contentdata
} = this.state;
const Datacount = completion_questions_count + judgement_questions_count
@ -893,6 +1002,8 @@ class NewMyShixunModel extends Component {
+ single_questions_count
+ subjective_questions_count;
// console.log("弹出框");
// console.log(Contentdata)
return (
<div className="newMain clearfix " ref={this.saveContainer}>
@ -962,12 +1073,13 @@ class NewMyShixunModel extends Component {
/>
{/*头部*/}
<Contentpart {...this.state} {...this.props}
Contentdata={Contentdata}
exam_id={this.props.exam_id}
Isitapopup={"true"}
chakanjiexiboolindex={this.state.chakanjiexiboolindex}
chakanjiexibool={(e)=>this.chakanjiexibool(e)}
getitem_basketss={(id)=>this.getitem_basketss(id)}
selectallquestionsonthispage={()=>this.selectallquestionsonthispage()}
selectallquestionsonthispage={(bool)=>this.selectallquestionsonthispage(bool)}
getitem_baskets={(e)=>this.getitem_baskets(e)}
setdatafuns={(e) => this.setdatafuns(e)}
setdatafunsval={(e) => this.setdatafunsval(e)}

@ -27,6 +27,7 @@ import Comthetestpaperst from "./comthetestpaper/Comthetestpaperst";
import NewMyShixunModel from "../question/NewMyShixunModel";
import IntelligentModel from "../question/component/IntelligentModel"
//人工组卷预览
let Changes=true;
class Paperreview extends Component {
constructor(props) {
super(props);
@ -331,20 +332,30 @@ class Paperreview extends Component {
}
//换题
Changingtopics=(id)=>{
const url=`/examination_intelligent_settings/${this.props.match.params.id}/exchange_one_item.json`;
let data={
item_id:id,
if(Changes===true){
Changes=false;
const url=`/examination_intelligent_settings/${this.props.match.params.id}/exchange_one_item.json`;
let data={
item_id:id,
}
axios.post(url, data)
.then((result) => {
if (result.data.status == 0) {
//console.log(result);
var data = {}
this.getdata(data);
}
setTimeout(()=>{
Changes=true;
},1000);
}).catch((error) => {
//console.log(error);
setTimeout(()=>{
Changes=true;
},1000);
})
}
axios.post(url, data)
.then((result) => {
if (result.data.status == 0) {
//console.log(result);
var data = {}
this.getdata(data);
}
}).catch((error) => {
//console.log(error);
})
}
setIntelligentformation=(bool)=>{
@ -384,7 +395,7 @@ class Paperreview extends Component {
{
newmyshixunmodelbool===true?
<div className="fangdatwo">
<NewMyShixunModel {...this.props} {...this.state} exam_id={this.props.match.params.id} setnewmyshixunmodelbool={(e)=>this.setnewmyshixunmodelbool(e)}></NewMyShixunModel>
<NewMyShixunModel {...this.props} {...this.state} Contentdata={this.state.Contentdata} exam_id={this.props.match.params.id} setnewmyshixunmodelbool={(e)=>this.setnewmyshixunmodelbool(e)}></NewMyShixunModel>
</div>
:
""
@ -427,11 +438,12 @@ class Paperreview extends Component {
{
Cohetepaperbool===false?
<Paperreview_item {...this.state} {...this.props} Changingtopics={(e)=>this.Changingtopics(e)} Replacementtype={(e)=>this.Replacementtype(e)} getdata={(data)=>this.getdata(data)} setnewmyshixunmodelbool={(e)=>this.setnewmyshixunmodelbool(e)}>
<Paperreview_item {...this.state} {...this.props} artificialtype={artificialtype} Changingtopics={(e)=>this.Changingtopics(e)} Replacementtype={(e)=>this.Replacementtype(e)} getdata={(data)=>this.getdata(data)} setnewmyshixunmodelbool={(e)=>this.setnewmyshixunmodelbool(e)}>
</Paperreview_item>
:
<Comthetestpaperst {...this.state} {...this.props}
getJudquestio={(ref) => this.getcontentMdRef(ref)}
setitem_type={(item) => this.setitem_type(item)}

@ -85,9 +85,17 @@ class Paperreview_item extends Component {
const positions = this.props.single_questions.questions[result.destination.index].position;
const url = `/item_baskets/${ids}/adjust_position.json`
var data = {
position: positions
if(this.props.match.params.type==="Intelligence") {
var data = {
position: positions,
exam_setting_id:this.props.match.params.id,
}
}else {
var data = {
position: positions
}
}
axios.post(url, data)
.then((result) => {
if (result.data.status == 0) {
@ -104,8 +112,18 @@ class Paperreview_item extends Component {
const ids = this.props.multiple_questions.questions[result.source.index].id;
const positions = this.props.multiple_questions.questions[result.destination.index].position;
const url = `/item_baskets/${ids}/adjust_position.json`
var data = {
position: positions
if(this.props.match.params.type==="Intelligence") {
var data = {
position: positions,
exam_setting_id:this.props.match.params.id,
}
}else {
var data = {
position: positions
}
}
axios.post(url, data)
.then((result) => {
@ -125,8 +143,18 @@ class Paperreview_item extends Component {
const ids = this.props.judgement_questions.questions[result.source.index].id;
const positions = this.props.judgement_questions.questions[result.destination.index].position;
const url = `/item_baskets/${ids}/adjust_position.json`
var data = {
position: positions
if(this.props.match.params.type==="Intelligence") {
var data = {
position: positions,
exam_setting_id:this.props.match.params.id,
}
}else {
var data = {
position: positions
}
}
axios.post(url, data)
.then((result) => {
@ -145,8 +173,18 @@ class Paperreview_item extends Component {
const ids = this.props.program_questions.questions[result.source.index].id;
const positions = this.props.program_questions.questions[result.destination.index].position;
const url = `/item_baskets/${ids}/adjust_position.json`
var data = {
position: positions
if(this.props.match.params.type==="Intelligence") {
var data = {
position: positions,
exam_setting_id:this.props.match.params.id,
}
}else {
var data = {
position: positions
}
}
axios.post(url, data)
.then((result) => {
@ -176,22 +214,43 @@ class Paperreview_item extends Component {
}
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" : '',
if(this.props.match.params.type==="Intelligence") {
//智能选题
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" : '',
exam_setting_id:this.props.match.params.id,
}
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);
})
}else{
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);
})
}
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)=>{
@ -239,24 +298,49 @@ class Paperreview_item extends Component {
modalsTypedel: bool,
titilesms: names
})
const url = `/item_baskets/delete_item_type.json`;
axios.delete((url), {
data: {
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);
});
if(this.props.match.params.type==="Intelligence") {
//智能组卷
const url = `/item_baskets/delete_item_type.json`;
axios.delete((url), {
data: {
item_type: names,
exam_setting_id:this.props.match.params.id,
}
})
.then((response) => {
if (response.data.status == 0) {
// this.props.showNotification('大题删除成功');
this.props.getdata({});
this.setState({
titilesms: ""
})
}
})
.catch(function (error) {
////console.log(error);
});
}else{
const url = `/item_baskets/delete_item_type.json`;
axios.delete((url), {
data: {
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);
});
}
@ -271,17 +355,35 @@ class Paperreview_item extends Component {
})
}else {
//确定
const url = `/item_baskets/${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) {
if(this.props.match.params.type==="Intelligence"){
//智能组卷
const url = `/item_baskets/${this.state.item_bank_id}.json`;
axios.delete(url, { data: {
exam_setting_id: this.props.match.params.id,
}})
.then((response) => {
if (response.data.status == 0) {
// this.props.showNotification('试题删除成功');
this.props.getdata({});
}
})
.catch(function (error) {
});
}else{
const url = `/item_baskets/${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,
@ -291,7 +393,8 @@ class Paperreview_item extends Component {
}
showsetmodalsTypedels=(id,bool,type)=>{
debugger
console.log("Paperreview_item");
this.setState({
item_bank_id:id,
})
@ -394,6 +497,8 @@ class Paperreview_item extends Component {
modalsTypeys
} = this.state;
let {single_questions, multiple_questions, judgement_questions, program_questions, all_score} = this.props;
console.log("this.props");
console.log(this.props);
return (
<div className=" clearfix educontent Contentquestionbankstyle w100s w1200wuh mt19">
{

@ -61,6 +61,9 @@ class Paperreview_items extends Component {
// //console.log(object);
// //console.log("Paperreview_items");
// //console.log(object.item_id);
//这里换题修改过
//这里删除修改过
// /Integeneration/Intelligence/ 换题item_id 删除item_id
return (
<div>
{

@ -18,6 +18,7 @@ import NoneData from './component/NoneData';
import './questioncss/questioncom.css';
import '../tpm/newshixuns/css/Newshixuns.css';
import QuillForEditor from "../../common/quillForEditor";
import QuestionModalPicture from "./component/QuestionModalPicture";
const tagArray = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
@ -35,6 +36,8 @@ class Paperreview_single extends Component {
questions: 0,
totalscore: 0,
total: 0,
url: ""
}
}
@ -67,9 +70,20 @@ class Paperreview_single extends Component {
Singlemagaziness = () => {
}
handleShowUploadImage = (url) => {
// console.log('==============>>>>>>>>>>>>',url);
// setUrl(url);
this.setState({
url:url
})
}
handleClose=()=>{
this.setState({
url:'',
})
}
render() {
let {questions, totalscore, total, items} = this.state;
let {questions, totalscore, total, items,url} = this.state;
let {objectsingle, indexx, paperreviewsingleindex, indexxy,name} = this.props;
@ -94,12 +108,30 @@ class Paperreview_single extends Component {
const options = [
'bold', // 加粗
]
try {
if(itemsnamesy.constructor === Object){
// console.log("是对象");
// console.log(itemsnamesy);
}else {
// console.log("不是对象");
// console.log(itemsnamesy);
itemsnamesy=itemsnamesy+"";
}
}catch (e) {
}
return (
<div key={indexxy}
className={ "w100s borderwdswuh mb20 pd20 "}
onMouseEnter={() => this.props.showparagraphs(indexxy,name)} style={{
minHeight: "114px",
}}>
{url?
<QuestionModalPicture {...this.props} {...this.state} handleClose={()=>this.handleClose()}></QuestionModalPicture>
:
""
}
<style>{
`
.programquill .ql-editor{
@ -183,6 +215,7 @@ class Paperreview_single extends Component {
<QuillForEditor
readOnly={true}
value={itemssname}
showUploadImage={this.handleShowUploadImage}
/>
}
@ -226,6 +259,7 @@ class Paperreview_single extends Component {
<QuillForEditor
readOnly={true}
value={itemsnamesy}
showUploadImage={this.handleShowUploadImage}
/>
}
@ -257,6 +291,7 @@ class Paperreview_single extends Component {
<QuillForEditor
readOnly={true}
value={string}
showUploadImage={this.handleShowUploadImage}
/>
:""
:

@ -21,7 +21,9 @@ import NoneData from './component/NoneData';
import './questioncss/questioncom.css';
import SiderBars from "../question/component/SiderBars";
import QuestionModalys from "./component/QuestionModalys";
import Certifiedprofessional from "../modals/Certifiedprofessional";
var Undoclickable=true;
class Question extends Component {
constructor(props) {
super(props);
@ -69,6 +71,11 @@ class Question extends Component {
isVisible: false,
selectionbools:false,
chakanjiexiboolindex:"无",
mydisplay:false,
occupation:2,
}
}
@ -230,11 +237,9 @@ class Question extends Component {
}
axios.get((url), {params: data}).then((response) => {
setTimeout(()=>{
this.setState({
booljupyterurls:false,
})
},1000);
if (response === null || response === undefined) {
return
@ -287,7 +292,10 @@ class Question extends Component {
})
this.getdataslen(response.data.items);
// Undoclickable=true;
}).catch((error) => {
// Undoclickable=true;
});
}
@ -634,6 +642,7 @@ class Question extends Component {
single_questions_count: result.data.single_questions_count,
subjective_questions_count: result.data.subjective_questions_count,
})
// Undoclickable=true;
}).catch((error) => {
// ////console.log(error);
@ -646,15 +655,13 @@ class Question extends Component {
single_questions_count: 0,
subjective_questions_count: 0,
})
// Undoclickable=true;
})
}
//选用
getitem_baskets=(data)=>{
//选用题型可以上传单个 或者多个题型
let url="/item_baskets.json";
// 不选用 NewMyShixunModel.js 页面也有个
NOgetitem_baskets=(data)=>{
let url="/examination_banks/cancel_items.json";
axios.post(url, data)
.then((result) => {
@ -681,15 +688,16 @@ class Question extends Component {
////console.log(error);
})
}
// 撤销
getitem_basketss=(id)=>{
//选用 NewMyShixunModel.js 页面也有个
getitem_baskets=(data)=>{
//选用题型可以上传单个 或者多个题型
let url=`/item_baskets/${id}.json`;
let url="/item_baskets.json";
axios.delete(url)
axios.post(url, data)
.then((result) => {
if (result.data.status == 0) {
// this.props.showNotification(`撤销成功`);
// this.props.showNotification(`选用成功`);
var data = {
discipline_id:this.state.discipline_id,
sub_discipline_id:this.state.sub_discipline_id,
@ -703,13 +711,62 @@ class Question extends Component {
};
this.getdatasy(data);
this.getbasket_listdata();
// this.setState({
// visible:true
// })
}
}).catch((error) => {
////console.log(error);
})
}
// 撤销
getitem_basketss=(id)=>{
this.setState({
})
if(Undoclickable===true){
Undoclickable=false;
//选用题型可以上传单个 或者多个题型
let url=`/item_baskets/${id}.json`;
axios.delete(url)
.then((result) => {
if (result.data.status == 0) {
// this.props.showNotification(`撤销成功`);
var data = {
discipline_id:this.state.discipline_id,
sub_discipline_id:this.state.sub_discipline_id,
tag_discipline_id:this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: this.state.item_type,
keyword: this.state.keywords,
page: this.state.page,
per_page:10,
};
this.getdatasy(data);
this.getbasket_listdata();
}
setTimeout(()=>{
Undoclickable=true;
},1000);
}).catch((error) => {
////console.log(error);
setTimeout(()=>{
Undoclickable=true;
},1000);
})
}else{
return
}
}
//全选试题库
selectallquestionsonthispage=()=>{
selectallquestionsonthispage=(bool)=>{
var item_idsdata=[];
var arr= this.state.Contentdata.items;
@ -717,7 +774,10 @@ class Question extends Component {
if(data.item_type==="PROGRAM"){
//编程题
if(data.choosed===true){
if(data.program_attr.status===1){
//已发布
item_idsdata.push(data.id);
}
}else{
//未选用
if(data.program_attr.status===1){
@ -730,7 +790,7 @@ class Question extends Component {
}else{
//不是编程题
if(data.choosed===true){
item_idsdata.push(data.id);
}else{
//未选用
item_idsdata.push(data.id);
@ -741,10 +801,18 @@ class Question extends Component {
const data={
item_ids:item_idsdata
}
this.getitem_baskets(data);
this.setState({
selectallquestionsonthispages:true,
})
if(bool===false){
this.getitem_baskets(data);
this.setState({
selectallquestionsonthispages:true,
})
}else{
this.NOgetitem_baskets(data);
this.setState({
selectallquestionsonthispages:false,
})
}
}
//全选的状态
@ -778,11 +846,38 @@ class Question extends Component {
});
}
HideAddcoursestypess=(i)=>{
console.log("调用了");
this.setState({
mydisplay:true,
occupation:i,
})
}
mydisplayHidedel=()=>{
this.setState({
mydisplay:false,
})
}
//跳转
gotopaperreview=()=>{
let isysladmins=false;
if(this.props){
if(this.props.current_user){
if(this.props.current_user.admin){
isysladmins=true;
}
else if(this.props.current_user.business){
isysladmins=true;
}
}
}
if(this.props.current_user.professional_certification===false&&isysladmins===false){
this.HideAddcoursestypess(2);
return
}
this.props.history.replace("/paperreview/artificial");
}
@ -817,7 +912,7 @@ class Question extends Component {
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,
modalsTypeInaudit
modalsTypeInaudit,mydisplay
} = this.state;
const Datacount = completion_questions_count + judgement_questions_count
@ -825,13 +920,47 @@ class Question extends Component {
+ program_questions_count
+ single_questions_count
+ subjective_questions_count;
const isysladmins=this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false;
let isysladmins=false;
const is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false;
const professional_certification=this.props&&this.props.current_user&&this.props.current_user.professional_certification?this.props.current_user.professional_certification:false;
try {
if(this.props){
if(this.props.current_user){
if(this.props.current_user.admin){
isysladmins=true;
}
else if(this.props.current_user.business){
isysladmins=true;
}
}
}
}catch (e) {
}
return (
<div className="newMain clearfix" ref={this.saveContainer}>
{
mydisplay===true?
<Certifiedprofessional {...this.props} {...this.state} ModalCancelsy={this.mydisplayHidedel} />
:""
}
{
mydisplay===true?
<style>
{
`
body{
overflow:hidden!important;
}
`
}
</style>
:""
}
{
visible===true?
<style>
@ -862,7 +991,7 @@ class Question extends Component {
visible===true?
<div
style={{
marginTop: "60px"
marginTop: "81px"
}}></div>
:""}
{
@ -895,19 +1024,7 @@ class Question extends Component {
`
}
</style>
{
isysladmins===true?
<SiderBars
Datacount={Datacount}
myvisible={visible}
{...this.props}
{...this.state}
showDrawer={() => this.showDrawer()}
Headertop={Headertop}
/>
:
is_teacher===true&&professional_certification===true?
<SiderBars
Datacount={Datacount}
myvisible={visible}
@ -917,11 +1034,6 @@ class Question extends Component {
Headertop={Headertop}
/>
:
""
}
{/*顶部*/}
@ -943,7 +1055,7 @@ class Question extends Component {
chakanjiexiboolindex={this.state.chakanjiexiboolindex}
chakanjiexibool={(e)=>this.chakanjiexibool(e)}
getitem_basketss={(id)=>this.getitem_basketss(id)}
selectallquestionsonthispage={()=>this.selectallquestionsonthispage()}
selectallquestionsonthispage={(bool)=>this.selectallquestionsonthispage(bool)}
getitem_baskets={(e)=>this.getitem_baskets(e)}
setdatafuns={(e) => this.setdatafuns(e)}
setdatafunsval={(e) => this.setdatafunsval(e)}
@ -974,7 +1086,7 @@ class Question extends Component {
{
`
.ant-drawer-content-wrapper{
width: 200px !important;
width: 160px !important;
overflowhidden;
margin-top: 62px;
}
@ -1022,8 +1134,8 @@ class Question extends Component {
""
: <div className="sortinxdirection " >
<p
className="w50s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">单选题{'('}{single_questions_count}{')'}</p>
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
className="w80s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">单选题{'('}{single_questions_count}{')'}</p>
<p className="w20s intermediatecenterysls xaxisreverseorder"><i
className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor " onClick={()=>this.showQuestionModals("SINGLE")}></i></p>
</div>
}
@ -1033,8 +1145,8 @@ class Question extends Component {
:
<div className="sortinxdirection" >
<p
className="w50s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">多选题{'('}{multiple_questions_count}{')'}</p>
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
className="w80s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">多选题{'('}{multiple_questions_count}{')'}</p>
<p className="w20s intermediatecenterysls xaxisreverseorder"><i
className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor " onClick={()=>this.showQuestionModals("MULTIPLE")}></i></p>
</div>
}
@ -1044,8 +1156,8 @@ class Question extends Component {
:
<div className="sortinxdirection" >
<p
className="w50s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">判断题{'('}{judgement_questions_count}{')'}</p>
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
className="w80s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">判断题{'('}{judgement_questions_count}{')'}</p>
<p className="w20s intermediatecenterysls xaxisreverseorder"><i
className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor " onClick={()=>this.showQuestionModals("JUDGMENT")}></i></p>
</div>
}
@ -1055,8 +1167,8 @@ class Question extends Component {
:
<div className="sortinxdirection" >
<p
className="w50s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">填空题{'('}{completion_questions_count}{')'}</p>
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
className="w80s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">填空题{'('}{completion_questions_count}{')'}</p>
<p className="w20s intermediatecenterysls xaxisreverseorder"><i
className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor " onClick={()=>this.showQuestionModals("COMPLETION")}></i></p>
</div>
}
@ -1066,8 +1178,8 @@ class Question extends Component {
:
<div className="sortinxdirection" >
<p
className="w50s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">简答题{'('}{subjective_questions_count}{')'}</p>
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
className="w80s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">简答题{'('}{subjective_questions_count}{')'}</p>
<p className="w20s intermediatecenterysls xaxisreverseorder"><i
className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor " onClick={()=>this.showQuestionModals("SUBJECTIVE")}></i></p>
</div>
}
@ -1077,8 +1189,8 @@ class Question extends Component {
:
<div className="sortinxdirection">
<p
className="w50s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">实训题{'('}{practical_questions_count}{')'}</p>
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
className="w80s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">实训题{'('}{practical_questions_count}{')'}</p>
<p className="w20s intermediatecenterysls xaxisreverseorder"><i
className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor "></i></p>
</div>
}
@ -1088,8 +1200,8 @@ class Question extends Component {
:
<div className="sortinxdirection" >
<p
className="w50s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">编程题{'('}{program_questions_count}{')'}</p>
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
className="w80s intermediatecenterysls sortinxdirection font-14 xiaoshou xiaoshoums">编程题{'('}{program_questions_count}{')'}</p>
<p className="w20s intermediatecenterysls xaxisreverseorder"><i
className="iconfont icon-shanchu1 font-14 lg lh30 icondrawercolor " onClick={()=>this.showQuestionModals("PROGRAM")}></i></p>
</div>
}

@ -1,5 +1,5 @@
import React, {Component} from "react";
import {Link, NavLink} from 'react-router-dom';
import {Link, NavLink,Prompt} from 'react-router-dom';
import {WordsBtn, ActionBtn, SnackbarHOC, getImageUrl,queryString} from 'educoder';
import axios from 'axios';
import {
@ -22,6 +22,7 @@ import JudquestionEditor from "./component/JudquestionEditor";
import Bottomsubmit from "../../modules/modals/Bottomsubmit";
import { connect } from 'react-redux';
import actions from "../../redux/actions";
var restricte=false;
class Questionitem_banks extends Component {
constructor(props) {
super(props);
@ -37,7 +38,8 @@ class Questionitem_banks extends Component {
knowledgepoints: [],
disciplmy:[],
pages:1,
}
}
}
@ -172,6 +174,20 @@ class Questionitem_banks extends Component {
}
componentWillMount () {
// 拦截判断是否离开当前页面
window.addEventListener('beforeunload', this.beforeunload);
}
componentWillUnmount () {
// 销毁拦截判断是否离开当前页面
window.removeEventListener('beforeunload', this.beforeunload);
}
beforeunload (e) {
let confirmationMessage = '你确定离开此页面吗?';
(e || window.event).returnValue = confirmationMessage;
return confirmationMessage;
}
getdata = (data) => {
// const url=`/item_banks.json`;
@ -295,6 +311,7 @@ class Questionitem_banks extends Component {
.then((result) => {
if (result.data.status == 0) {
// this.props.showNotification(`新增单选题成功`);
this.restricte=true;
this.props.history.replace('/question');
}
@ -306,6 +323,7 @@ class Questionitem_banks extends Component {
.then((result) => {
if (result.data.status == 0) {
// this.props.showNotification(`编辑单选题成功`);
this.restricte=true;
this.props.history.replace('/question');
@ -373,6 +391,7 @@ class Questionitem_banks extends Component {
.then((result) => {
if (result.data.status == 0) {
// this.props.showNotification(`新增多选题成功`);
this.restricte=true;
this.props.history.replace('/question');
@ -386,6 +405,7 @@ class Questionitem_banks extends Component {
.then((result) => {
if (result.data.status == 0) {
// this.props.showNotification(`编辑多选题成功`);
this.restricte=true;
this.props.history.replace('/question');
@ -440,6 +460,7 @@ class Questionitem_banks extends Component {
.then((result) => {
if (result.data.status == 0) {
// this.props.showNotification(`新增判断题成功`);
this.restricte=true;
this.props.history.replace('/question');
}
@ -452,6 +473,7 @@ class Questionitem_banks extends Component {
.then((result) => {
if (result.data.status == 0) {
// this.props.showNotification(`编辑判断题成功`);
this.restricte=true;
this.props.history.replace('/question');
}
@ -473,17 +495,24 @@ class Questionitem_banks extends Component {
myrbkc.push(myda.id);
}
this.props.setOjInitialValue({
difficult: Getdatasdata[0].rbnd,
sub_discipline_id: Getdatasdata[3].rbkc[1],
tag_discipline_id: myrbkc,
});
// this.props.setOjInitialValue({
// difficult: Getdatasdata[0].rbnd,
// sub_discipline_id: Getdatasdata[3].rbkc[1],
// tag_discipline_id: myrbkc,
// });
let arrays=myrbkc.join(',');
// console.log("开始打印了");
// console.log(arrays);
this.restricte=true;
window.open(`/problems/new?difficult=${Getdatasdata[0].rbnd}&sub_discipline_id=${Getdatasdata[3].rbkc[1]}&tag_discipline_id=${arrays}&newoj=1&pages=${this.state.pages}`);
setTimeout(() => {
this.restricte=true;
}, 1000);
// this.props.history.replace( `/problems/new?difficult=${Getdatasdata[0].rbnd}&sub_discipline_id=${Getdatasdata[3].rbkc[1]}&tag_discipline_id=${arrays}&newoj=1&pages=${this.state.pages}`);
window.open( `/problems/new?difficult=${Getdatasdata[0].rbnd}&sub_discipline_id=${Getdatasdata[3].rbkc[1]}&tag_discipline_id=${arrays}&newoj=1&pages=${this.state.pages}`);
}
@ -498,20 +527,30 @@ class Questionitem_banks extends Component {
}
render() {
let {page, limit, count, Headertop, visible, placement, modalsType, item_type} = this.state;
let {page, limit, count, Headertop, visible, placement, modalsType, item_type,restricte} = this.state;
const params = this.props && this.props.match && this.props.match.params;
// ////console.log(params);
return (
<div>
<div id={"Itembankstopid"} className="newMain clearfix intermediatecenter "
>
{
restricte===false?
<Prompt
when={true}
message={() => '你确定离开此页面吗?'}
/>
:
""
}
<style>
{
`
body{
width: 100%!important;
}
.newFooter{
display: none;
@ -588,7 +627,7 @@ class Questionitem_banks extends Component {
""
:
<Bottomsubmit {...this.props} {...this.state} bottomvalue={item_type === "PROGRAM" ? "创建" : "保存"}
onSubmits={() => this.preservation()} url={item_type === "PROGRAM" ?'/problems':'/question'}></Bottomsubmit>
onSubmits={() => this.preservation()} url={'/question'}></Bottomsubmit>
}
</div>
)
@ -598,14 +637,15 @@ class Questionitem_banks extends Component {
}
const mapStateToProps = (state) => ({});
const mapDispatchToProps = (dispatch) => ({
setOjInitialValue: (params) => dispatch(actions.setOjInitialValue(params))
});
export default connect(
mapStateToProps,
mapDispatchToProps
)(SnackbarHOC()(TPMIndexHOC(Questionitem_banks)));
// const mapStateToProps = (state) => ({});
// const mapDispatchToProps = (dispatch) => ({
// setOjInitialValue: (params) => dispatch(actions.setOjInitialValue(params))
// });
//
// export default connect(
// mapStateToProps,
// mapDispatchToProps
// )(SnackbarHOC()(TPMIndexHOC(Questionitem_banks)));
export default SnackbarHOC()(TPMIndexHOC(Questionitem_banks));

@ -9,6 +9,7 @@ import TPMMDEditor from '../../../modules/tpm/challengesnew/TPMMDEditor';
import axios from 'axios'
import update from 'immutability-helper'
import './../questioncss/questioncom.css';
import '../questioncss/font.css';
import {getUrl, ActionBtn, DMDEditor, ConditionToolTip} from 'educoder';
import QuillForEditor from '../../../common/quillForEditor';
const { TextArea } = Input;
@ -228,6 +229,15 @@ class ChoquesEditor extends Component{
var texts;
const _text = quill.getText();
const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
if(this.isNull(_text)===true){
return
}
if (!reg.test(_text)) {
// 处理编辑器内容为空
try {
@ -236,8 +246,23 @@ class ChoquesEditor extends Component{
texts="";
}
} else {
value = JSON.stringify(value);
texts=value;
if(_text.length>=500){
var result = _text.substring(0,450);
texts={"ops":[{"insert":result}]};
texts=JSON.stringify(texts);
}else {
// 提交到后台的内容需要处理一下;
value = JSON.stringify(value);
if(value.length>=500){
let a=value.length-500;
let b=_text.length-a;
var result = _text.substring(0,b);
texts={"ops":[{"insert":result}]};
texts=JSON.stringify(texts);
}else{
texts=value;
}
}
}
let question_choices = this.state.question_choices.slice(0);
question_choices[index] = texts;
@ -260,11 +285,28 @@ class ChoquesEditor extends Component{
toShowMode = () => {
}
isNull=( str )=>{
if ( str == "" ) return true;
var regu = "^[ ]+$";
var re = new RegExp(regu);
//为空或纯空格为 true 有值为false
console.log(re.test(str))
return re.test(str);
}
onContentChange=(value,quill)=>{
// debugger
const _text = quill.getText();
const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
if(this.isNull(_text)===true){
this.setState({
question_titleysl:""
})
return
}
if (!reg.test(_text)) {
// 处理编辑器内容为空
try {
@ -288,6 +330,15 @@ class ChoquesEditor extends Component{
onContentChanges=(value,quill)=>{
const _text = quill.getText();
const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
if(this.isNull(_text)===true){
this.setState({
question_titlesysl:""
})
return
}
if (!reg.test(_text)) {
// 处理编辑器内容为空
try {
@ -333,10 +384,7 @@ class ChoquesEditor extends Component{
// //////console.log("xuanzheshijuan");
// //////console.log(answerTagArray);
// //////console.log(!exerciseIsPublish);
const options=['code-block', 'image', 'formula',{size: ['14px', '16px', '18px', '20px']},
{ 'color': ['#333333','#e60000','#ff9900','#ffff00','#ffffff']},
{ 'font': ['Microsoft-YaHei','SimSun', 'SimHei','KaiTi','FangSong','Arial','Times-New-Roman','sans-serif']}
]
const options=['code-block', 'image', 'formula']
return(
<div className="padding20-30 signleEditor duoxuano" id={qNumber}>
<style>{`
@ -362,6 +410,10 @@ class ChoquesEditor extends Component{
}
.signleEditor .quill_editor_for_react_area .ql-toolbar .ql-formats .ql-font {
line-height: 20px;
min-width: 150px;
}
.signleEditor .quill_editor_for_react_area .ql-container .ql-editor p{
font-family: MicrosoftYaHei;
}
`}</style>
<p className="mb10 clearfix">
@ -408,7 +460,7 @@ class ChoquesEditor extends Component{
autoFocus={false}
imgAttrs={{width: '146px', height: '136px'}}
style={{ height: '166px'}}
placeholder="请您输入题干"
placeholder="请您输入选项"
options={options}
value={item}
onContentChange={(value,quill) => this.onOptionContentChange(value,quill,index)}
@ -418,7 +470,7 @@ class ChoquesEditor extends Component{
autoFocus={false}
imgAttrs={{width: '146px', height: '136px'}}
style={{ height: '166px'}}
placeholder="请您输入题干"
placeholder="请您输入选项"
options={options}
value={JSON.parse(item)}
onContentChange={(value,quill) => this.onOptionContentChange(value,quill,index)}

@ -17,6 +17,8 @@ import NoneDatas from '../component/NoneDatas';
import LoadingSpin from '../../../common/LoadingSpin';
import Contentquestionbank from "./Contentquestionbank";
import Listjihe from "./Listjihe";
import Certifiedprofessional from "../../modals/Certifiedprofessional";
import QuestionModalPicture from '../component/QuestionModalPicture.js'
const { TabPane } = Tabs;
const Search = Input.Search;
class Contentpart extends Component {
@ -25,25 +27,114 @@ class Contentpart extends Component {
this.state = {
page:1,
chakanjiexibool:false,
mydisplay:false,
occupation:2,
url: "",
isysladmins:false,
}
}
//初始化
componentDidMount(){
let isysladmins=false;
if(this.props){
if(this.props.current_user){
if(this.props.current_user.admin){
isysladmins=true;
}
else if(this.props.current_user.business){
isysladmins=true;
}
}
}
this.setState({
isysladmins:isysladmins
})
}
handleShowUploadImage = (url) => {
// console.log('==============>>>>>>>>>>>>',url);
// setUrl(url);
this.setState({
url:url
})
}
handleClose=()=>{
this.setState({
url:'',
})
}
chakanjiexibool=(index)=>{
if(this.props.current_user.professional_certification===false&&this.state.isysladmins===false){
this.HideAddcoursestypess(2);
return
}
this.props.chakanjiexibool(index);
}
showmodels=(e)=>{
if(this.props.current_user.professional_certification===false&&this.state.isysladmins===false){
this.HideAddcoursestypess(2);
return
}
this.props.showmodels(e)
}
showmodelsInaudit=(e)=>{
if(this.props.current_user.professional_certification===false&&this.state.isysladmins===false){
this.HideAddcoursestypess(2);
return
}
this.props.showmodelsInaudit(e)
}
showmodelysl=(e)=>{
if(this.props.current_user.professional_certification===false&&this.state.isysladmins===false){
this.HideAddcoursestypess(2);
return
}
this.props.showmodelysl(e)
}
componentDidUpdate(prevProps) {
if(prevProps.current_user !== this.props.current_user) {
const isysladmins=this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false;
const is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false;
let isysladmins=false;
let is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false;
const professional_certification=this.props&&this.props.current_user&&this.props.current_user.professional_certification?this.props.current_user.professional_certification:false;
let {defaultActiveKey} = this.props;
var defaultActiveKeys=defaultActiveKey;
try {
if(this.props){
if(this.props.current_user){
if(this.props.current_user.admin){
isysladmins=true;
}
else if(this.props.current_user.business){
isysladmins=true;
}
}
}
if(is_teacher===false){
if(this.props.current_user.user_identity !=="学生"){
//专业人士
is_teacher=true
}
}
}catch (e) {
}
this.setState({
isysladmins:isysladmins
})
if(isysladmins===true||(is_teacher===true&&professional_certification===true)){
defaultActiveKeys="0"
}else{
@ -52,7 +143,26 @@ class Contentpart extends Component {
this.props.callback(defaultActiveKeys);
}
}
HideAddcoursestypess=(i)=>{
console.log("调用了");
this.setState({
mydisplay:true,
occupation:i,
})
}
mydisplayHidedel=()=>{
this.setState({
mydisplay:false,
})
}
xinzenw=(e)=>{
//只限制了教师
if(this.props.current_user.professional_certification===false&&this.state.isysladmins===false){
this.HideAddcoursestypess(2);
return
}
var urls="";
if(this.props.discipline_id){
// if(urls==="?"){
@ -95,13 +205,32 @@ class Contentpart extends Component {
}
render() {
let {page}=this.state;
let {page,mydisplay,url}=this.state;
let {defaultActiveKey,item_type,booljupyterurls}=this.props;
const defaultActiveKeys=defaultActiveKey+'';
const isysladmins=this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false;
const is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false;
let isysladmins=false;
let is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false;
const professional_certification=this.props&&this.props.current_user&&this.props.current_user.professional_certification?this.props.current_user.professional_certification:false;
try {
if(is_teacher===false){
if(this.props.current_user.user_identity !=="学生"){
//专业人士
is_teacher=true
}
}
if(this.props){
if(this.props.current_user){
if(this.props.current_user.admin){
isysladmins=true;
}
else if(this.props.current_user.business){
isysladmins=true;
}
}
}
}catch (e) {
}
const content = (
<div className="questiontypes" style={{
@ -136,12 +265,38 @@ class Contentpart extends Component {
);
//console.log("Contentpart.js");
//console.log(this.props.defaultActiveKey);
// console.log("Contentpart.js");
// console.log(this.props.current_user.professional_certification);
return (
<div className=" clearfix mt25">
<div className="educontent mt10 pb20 w1200s">
{url?
<QuestionModalPicture {...this.props} {...this.state} handleClose={()=>this.handleClose()}></QuestionModalPicture>
:
""
}
{
mydisplay===true?
<Certifiedprofessional {...this.props} {...this.state} ModalCancelsy={this.mydisplayHidedel} />
:""
}
{
mydisplay===true?
<style>
{
`
body{
overflow:hidden!important;
}
`
}
</style>
:""
}
<div className="w1200ms contentparttit" style={{
position: "relative",
}}>
@ -166,7 +321,7 @@ class Contentpart extends Component {
{
isysladmins===true||(is_teacher===true&&professional_certification===true)?
isysladmins===true||is_teacher===true?
<Tabs activeKey={defaultActiveKeys} onChange={(e)=>this.props.callback(e)}>
<TabPane tab="公共" key="1">
</TabPane>
@ -192,7 +347,7 @@ class Contentpart extends Component {
`
.xaxisreverseorder .ant-input-group-addon{
width: 60px !important;
width: 48px !important;
}
@ -214,7 +369,7 @@ class Contentpart extends Component {
<div className="xaxisreverseorder">
{
defaultActiveKey===0||defaultActiveKey==="0"?
isysladmins===true||(is_teacher===true&&professional_certification===true)?
isysladmins===true||is_teacher===true?
this.props.Isitapopup&&this.props.Isitapopup==="true"?
""
:
@ -247,7 +402,7 @@ class Contentpart extends Component {
defaultActiveKey===0||defaultActiveKey==="0"?
this.props.Isitapopup&&this.props.Isitapopup==="true"?
<Search
style={isysladmins===true||(is_teacher===true&&professional_certification)?{ marginRight:"0px"}:{marginRight:"0px"}}
style={isysladmins===true||is_teacher===true?{ marginRight:"0px"}:{marginRight:"0px"}}
className={"xaxisreverseorder searchwidth"}
placeholder="请输入题目名称、内容"
enterButton
@ -256,7 +411,7 @@ class Contentpart extends Component {
onSearch={ (value)=>this.props.setdatafuns(value)} />
:
<Search
style={isysladmins===true||(is_teacher===true&&professional_certification)?{ marginRight:"30px"}:{marginRight:"0px"}}
style={isysladmins===true||is_teacher===true?{ marginRight:"30px"}:{marginRight:"0px"}}
className={"xaxisreverseorder searchwidth"}
placeholder="请输入题目名称、内容"
enterButton
@ -285,12 +440,12 @@ class Contentpart extends Component {
<div className=" w100s mb10">
{
defaultActiveKey===1||defaultActiveKey==="1"?
<Contentquestionbank {...this.props} {...this.state} selectallquestionsonthispage={()=>this.props.selectallquestionsonthispage()} ></Contentquestionbank>
<Contentquestionbank {...this.props} {...this.state} selectallquestionsonthispage={(bool)=>this.props.selectallquestionsonthispage(bool)} ></Contentquestionbank>
:""
}
{
defaultActiveKey===0||defaultActiveKey==="0"?
<Contentquestionbank {...this.props} {...this.state} selectallquestionsonthispage={()=>this.props.selectallquestionsonthispage()}></Contentquestionbank>
<Contentquestionbank {...this.props} {...this.state} selectallquestionsonthispage={(bool)=>this.props.selectallquestionsonthispage(bool)}></Contentquestionbank>
:""
}
</div>
@ -320,9 +475,12 @@ class Contentpart extends Component {
pages={this.props.pages}
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)}
showmodelsInaudit={(e)=>this.props.showmodelsInaudit(e)}
showmodels={(e)=>this.showmodels(e)}
showmodelysl={(e)=>this.showmodelysl(e)}
showmodelsInaudit={(e)=>this.showmodelsInaudit(e)}
handleShowUploadImage={(e)=>this.handleShowUploadImage(e)}
handleClose={()=>this.handleClose()}
>
</Listjihe>

@ -50,9 +50,9 @@ class Contentquestionbank extends Component {
<div className="sortinxdirection w50s">
{
selectionbools===true?
<Checkbox checked={this.props.selectallquestionsonthispages} onChange={()=>this.props.selectallquestionsonthispage()} disabled></Checkbox>
<Checkbox checked={this.props.selectallquestionsonthispages} onChange={()=>this.props.selectallquestionsonthispage(this.props.selectallquestionsonthispages)} ></Checkbox>
:
<Checkbox checked={this.props.selectallquestionsonthispages} onChange={()=>this.props.selectallquestionsonthispage()}></Checkbox>
<Checkbox checked={this.props.selectallquestionsonthispages} onChange={()=>this.props.selectallquestionsonthispage(this.props.selectallquestionsonthispages)}></Checkbox>
}
<p className="setequesbank ml20">选用本页全部试题</p>

@ -260,7 +260,7 @@ class Headplugselections extends Component {
disciplinesdata&&disciplinesdata.map((item,key)=>{
return(
item.sub_disciplines.length>0?
<Dropdown getPopupContainer={trigger => trigger.parentNode} overlay={ overlaymenu(item.sub_disciplines,item.id)} key={key} placement={"bottomRight"}>
<Dropdown getPopupContainer={trigger => trigger.parentNode} overlay={ overlaymenu(item.sub_disciplines,item.id)} key={key} placement="bottomLeft">
<li key={key} className={parseInt(shixunsearchAllvalue)===item.id?"shaiItem shixun_repertoire active":"shaiItem shixun_repertoire"} value={item.id} onClick={()=>this.shixunserdchAlls(item.sub_disciplines,item.id)}>
{item.name}
</li>

@ -9,6 +9,7 @@ import TPMMDEditor from '../../../modules/tpm/challengesnew/TPMMDEditor';
import axios from 'axios'
import update from 'immutability-helper'
import './../questioncss/questioncom.css';
import '../questioncss/font.css';
import {getUrl, ActionBtn, DMDEditor, ConditionToolTip} from 'educoder';
import QuillForEditor from '../../../common/quillForEditor';
@ -287,7 +288,15 @@ class JudquestionEditor extends Component{
})
}
isNull=( str )=>{
if ( str == "" ) return true;
var regu = "^[ ]+$";
var re = new RegExp(regu);
//为空或纯空格为 true 有值为false
console.log(re.test(str))
return re.test(str);
}
onContentChange=(value,quill)=>{
// console.log("这是题干赋值");
// console.log(value);
@ -296,6 +305,15 @@ class JudquestionEditor extends Component{
const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
// console.log(_text);
// console.log(_text.length);
if(this.isNull(_text)===true){
this.setState({
question_titleysl:""
})
return
}
if (!reg.test(_text)) {
// 处理编辑器内容为空
try {
@ -323,6 +341,14 @@ class JudquestionEditor extends Component{
onContentChanges=(value,quill)=>{
const _text = quill.getText();
const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
if(this.isNull(_text)===true){
this.setState({
question_titlesysl:""
})
return
}
if (!reg.test(_text)) {
// 处理编辑器内容为空
try {
@ -368,10 +394,7 @@ class JudquestionEditor extends Component{
// ////////console.log(answerTagArray);
// ////////console.log(!exerciseIsPublish);
const params= this.props&&this.props.match&&this.props.match.params;
const options=['code-block', 'image', 'formula',{size: ['14px', '16px', '18px', '20px']},
{ 'color': ['#333333','#e60000','#ff9900','#ffff00','#ffffff']},
{ 'font': ['Microsoft-YaHei','SimSun', 'SimHei','KaiTi','FangSong','Arial','Times-New-Roman','sans-serif']}
]
const options=['code-block', 'image', 'formula']
return(
<div className="padding20-30 signleEditor danxuano" id={qNumber}>
<style>{`
@ -397,6 +420,10 @@ class JudquestionEditor extends Component{
}
.signleEditor .quill_editor_for_react_area .ql-toolbar .ql-formats .ql-font {
line-height: 20px;
min-width: 150px;
}
.signleEditor .quill_editor_for_react_area .ql-container .ql-editor p{
font-family: MicrosoftYaHei;
}
`}</style>
<p className="mb10 clearfix">

@ -8,10 +8,12 @@ import {
Table,
Pagination,
Radio,
Tooltip
Tooltip,
Icon
} from "antd";
import './../questioncss/questioncom.css';
import QuillForEditor from "../../../common/quillForEditor";
import Certifiedprofessional from "../../modals/Certifiedprofessional";
const tagArray = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
@ -31,15 +33,46 @@ class Listjihe extends Component {
page: 1,
name: "单选题",
nd: "简单",
url: "",
mydisplay:false,
occupation:2,
isysladmins:false,
}
}
//初始化
componentDidMount() {
let isysladmins=false;
if(this.props){
if(this.props.current_user){
if(this.props.current_user.admin){
isysladmins=true;
}
else if(this.props.current_user.business){
isysladmins=true;
}
}
}
this.setState({
isysladmins:isysladmins
})
}
handleShowUploadImage = (url) => {
try {
this.props.handleShowUploadImage(url);
}catch (e) {
}
}
handleClose=()=>{
try {
this.props.handleClose();
}catch (e) {
}
}
//选用
Selectingpracticaltraining = (id) => {
let data = {}
@ -53,8 +86,15 @@ class Listjihe extends Component {
exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
}
}
if(this.props.current_user.professional_certification===false&&this.state.isysladmins===false){
this.HideAddcoursestypess(2);
return
}
this.getitem_baskets(data);
}
getitem_baskets=(data)=>{
this.props.getitem_baskets(data);
}
//撤销
Selectingpracticaltrainings = (id) => {
@ -63,8 +103,29 @@ class Listjihe extends Component {
}
seturls(url){
if(this.props.current_user.professional_certification===false&&this.state.isysladmins===false){
this.HideAddcoursestypess(2);
return
}
this.props.history.replace(url);
}
HideAddcoursestypess=(i)=>{
console.log("调用了");
this.setState({
mydisplay:true,
occupation:i,
})
}
mydisplayHidedel=()=>{
this.setState({
mydisplay:false,
})
}
render() {
let {page, name, nd} = this.state;
let {page, name, nd,url,mydisplay} = this.state;
let {defaultActiveKey, items, listjihe, chakanjiexiboolindex, keindex} = this.props;
// 编程答案
@ -132,7 +193,7 @@ class Listjihe extends Component {
}catch (e) {
}
if(itemssname===undefined){
itemssname=items.name
itemssname=items.name+""
}
@ -141,7 +202,8 @@ class Listjihe extends Component {
itemsnamesy= JSON.parse(items&&items.program_attr&&items.program_attr.description);
}catch (e) {
itemsnamesy=items&&items.program_attr&&items.program_attr.description;
itemsnamesy=items&&items.program_attr&&items.program_attr.description+"";
}
var analysisnames="";
@ -149,7 +211,7 @@ class Listjihe extends Component {
analysisnames= JSON.parse(items&&items.analysis);
}catch (e) {
analysisnames=items&&items.analysis;
analysisnames=items&&items.analysis+"";
}
// console.log(items.name);
// console.log(itemsnamesy);
@ -158,10 +220,61 @@ class Listjihe extends Component {
const options = [
'bold', // 加粗
]
try {
if(itemsnamesy.constructor === Object){
// console.log("是对象");
// console.log(itemsnamesy);
}else {
// console.log("不是对象");
// console.log(itemsnamesy);
itemsnamesy=itemsnamesy+"";
}
}catch (e) {
}
return (
<div key={keindex}
className={chakanjiexiboolindex === keindex ? "w100s borderwds283 pd20 mb20 listjihecolors" : "w100s borderwds pd20 mb20 listjihecolors"}>
className={chakanjiexiboolindex === keindex ? "w100s borderwds283 pd20 mb20 listjihecolors" : " borderwds pd20 mb20 listjihecolors"}>
{/*顶部*/}
{
mydisplay===true?
<Certifiedprofessional {...this.props} {...this.state} ModalCancelsy={this.mydisplayHidedel} />
:""
}
{
mydisplay===true?
<style>
{
`
body{
overflow:hidden!important;
}
`
}
</style>
:""
}
<style>
{
`
`
}
</style>
{/* 显示上传的图片信息 */}
{/*<div className="show_upload_image" style={{ display: url ? 'block' : 'none'}}>*/}
{/* <Icon type="close" className="image_close" onClick={()=>this.handleClose()}/>*/}
{/* <div className="image_info">*/}
{/* <img className="image" src={url} alt=""/>*/}
{/* </div>*/}
{/*</div>*/}
<style>
{
` .markdown-body .ql-editor{
@ -197,7 +310,7 @@ class Listjihe extends Component {
</div>
{
items.item_type==="PROGRAM"?
<a href={`/problems/${items.program_attr.identifier}/edit`}>
<a onClick={()=>this.seturls(`/problems/${items.program_attr.identifier}/edit`)} >
<div className="ml10 w100s " style={{wordBreak: "break-word",fontWeight:"bold"}} dangerouslySetInnerHTML={{__html: markdownToHTML(items&&items.name).replace(/▁/g, "▁▁▁")}}></div>
</a>
:
@ -212,6 +325,7 @@ class Listjihe extends Component {
<QuillForEditor
readOnly={true}
value={itemssname}
showUploadImage={this.handleShowUploadImage}
/>
:""
}
@ -249,6 +363,7 @@ class Listjihe extends Component {
<QuillForEditor
readOnly={true}
value={itemsnamesy}
showUploadImage={this.handleShowUploadImage}
/>
}
</p>
@ -282,6 +397,7 @@ class Listjihe extends Component {
<QuillForEditor
readOnly={true}
value={string}
showUploadImage={this.handleShowUploadImage}
/>
:""
@ -369,7 +485,7 @@ class Listjihe extends Component {
this.props.Isitapopup&&this.props.Isitapopup==="true"?
""
:
<a target="_blank" href={`/problems/${items.program_attr.identifier}/edit?editoj=1&pages=`+this.props.pages}>
<a onClick={()=>this.seturls(`/problems/${items.program_attr.identifier}/edit?editoj=1&pages=`+this.props.pages)}>
<p className="viewparsings xiaoshou mr25">
<i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>编辑</span>
@ -379,7 +495,7 @@ class Listjihe extends Component {
this.props.Isitapopup&&this.props.Isitapopup==="true"?
""
:
<a target="_blank" href={`/question/edit/${items.id}`}>
<a onClick={()=>this.seturls(`/question/edit/${items.id}`)}>
<p className="viewparsings xiaoshou mr25">
<i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>编辑</span>
@ -401,7 +517,10 @@ class Listjihe extends Component {
:
(
items.public==true?
""
<p className="viewparsings xiaoshou mr25" >
<i className="iconfont icon-dianjiliang font-13 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>已公开</span>
</p>
:
<p className="viewparsings xiaoshou mr25" onClick={(e) => this.props.showmodelsInaudit(e)}>
<i className="iconfont icon-gongkai font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
@ -425,7 +544,10 @@ class Listjihe extends Component {
</p>
)
:
""
<p className="viewparsings mr25" >
<i className="iconfont icon-dianjiliang font-13 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>已公开</span>
</p>
}
</div>
@ -435,7 +557,7 @@ class Listjihe extends Component {
items.item_type === "PROGRAM" ?
""
:
<p className="viewparsings xiaoshou mr25" onClick={() => this.props.chakanjiexibool(keindex)}>
<p className="viewparsings xiaoshou mr25" onClick={() => this.props.chakanjiexibool(keindex)}>
<i className="iconfont icon-jiexi font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
查看解析</p>
}
@ -493,6 +615,7 @@ class Listjihe extends Component {
imgAttrs={{width: '60px', height: '30px'}}
readOnly={true}
value={analysisnames}
showUploadImage={this.handleShowUploadImage}
/>
:
"暂无解析"

@ -0,0 +1,58 @@
import React, { Component } from 'react';
import {getImageUrl} from 'educoder';
import { Modal,Icon} from 'antd';
import axios from 'axios';
import './../questioncss/questioncom.css'
import './../../../common/components/comment/index.scss';
//立即申请试用
class QuestionModalPicture extends Component {
constructor(props) {
super(props);
this.state={
}
}
render() {
return(
<Modal
keyboard={false}
closable={true}
footer={null}
destroyOnClose={true}
title=""
centered={true}
visible={this.props.url?true:false}
onCancel={this.props.handleClose}
>
{/* 显示上传的图片信息 */}
<style>
{
`
.intermediatecenter{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
`
}
</style>
<div className="show_upload_image intermediatecenter" style={{ display: this.props.url ? 'block' : 'none'}}>
{/*<Icon type="close" className="image_close" onClick={this.props.handleClose}/>*/}
<div className="image_info intermediatecenter">
<img className="image" style={{
width:"100%"
}} src={ this.props.url} alt=""/>
</div>
</div>
</Modal>
)
}
}
export default QuestionModalPicture;

@ -94,6 +94,22 @@ class SiderBars extends Component {
var mypath= this.props&&this.props.match&&this.props.match.path;
let{myvisible,Datacount,animateStyle}=this.props;
let swsilan=false;
if(this.props){
if(this.props.current_user){
if(this.props.current_user.admin){
swsilan=true;
}
else if(this.props.current_user.business){
swsilan=true;
}
else if(this.props.current_user.is_teacher){
swsilan=true;
}else if(this.props.current_user.user_identity !=="学生") {
swsilan=true;
}
}
}
return (
<div className={myvisible===true?"-task-sidebar mystask-sidebar":Datacount&&Datacount>0?"-task-sidebar mystask-sidebars":"-task-sidebar mystask-sidebarss"} >
@ -101,7 +117,7 @@ class SiderBars extends Component {
{this.props.mygetHelmetapi&&this.props.mygetHelmetapi.main_site===true?<div>
{
mypath&&mypath==="/question"?
mypath&&mypath==="/question"&&swsilan===true?
<Tooltip placement="left" title={"试题库"}>
<div className="feedback feedbackdivcolor xiaoshou shitikus" onClick={()=>this.props.showDrawer()} >
@ -117,7 +133,7 @@ class SiderBars extends Component {
<a target="_blank" className="color_white xiaoshou" >
<i className="iconfont icon-shitilan color-white xiaoshou"></i>
</a>
<p className="color-white font-12 xiaoshou">试题</p>
<p className="color-white font-12 xiaoshou">试题</p>
</div>
</Tooltip>
:""

@ -10,6 +10,7 @@ import TPMMDEditor from '../../../modules/tpm/challengesnew/TPMMDEditor';
import axios from 'axios'
import update from 'immutability-helper'
import './../questioncss/questioncom.css';
import '../questioncss/font.css';
import {getUrl, ActionBtn, DMDEditor, ConditionToolTip} from 'educoder';
const { TextArea } = Input;
const confirm = Modal.confirm;
@ -250,6 +251,11 @@ class SingleEditor extends Component{
var texts;
const _text = quill.getText();
const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
if(this.isNull(_text)===true){
return
}
if (!reg.test(_text)) {
// 处理编辑器内容为空
try {
@ -258,8 +264,23 @@ class SingleEditor extends Component{
texts="";
}
} else {
value = JSON.stringify(value);
texts=value;
if(_text.length>=500){
var result = _text.substring(0,450);
texts={"ops":[{"insert":result}]};
texts=JSON.stringify(texts);
}else {
// 提交到后台的内容需要处理一下;
value = JSON.stringify(value);
if(value.length>=500){
let a=value.length-500;
let b=_text.length-a;
var result = _text.substring(0,b);
texts={"ops":[{"insert":result}]};
texts=JSON.stringify(texts);
}else{
texts=value;
}
}
}
let question_choices = this.state.question_choices.slice(0);
question_choices[index] = texts;
@ -280,11 +301,30 @@ class SingleEditor extends Component{
toShowMode = () => {
}
isNull=( str )=>{
if ( str == "" ) return true;
var regu = "^[ ]+$";
var re = new RegExp(regu);
//为空或纯空格为 true 有值为false
console.log(re.test(str))
return re.test(str);
}
onContentChange=(value,quill)=>{
var _text = quill.getText();
const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
if(this.isNull(_text)===true){
this.setState({
question_titleysl:""
})
return
}
if (!reg.test(_text)) {
// 处理编辑器内容为空
try {
@ -307,6 +347,12 @@ class SingleEditor extends Component{
onContentChanges=(value,quill)=>{
const _text = quill.getText();
const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
if(this.isNull(_text)===true){
this.setState({
question_titlesysl:""
})
return
}
if (!reg.test(_text)) {
// 处理编辑器内容为空
try {
@ -354,9 +400,7 @@ class SingleEditor extends Component{
// //////console.log("xuanzheshijuan");
// //////console.log(answerTagArray);
// //////console.log(!exerciseIsPublish);
const options=['code-block', 'image', 'formula',{size: ['14px', '16px', '18px', '20px']},
{ 'color': ['#333333','#e60000','#ff9900','#ffff00','#ffffff']},
{ 'font': ['Microsoft-YaHei','SimSun', 'SimHei','KaiTi','FangSong','Arial','Times-New-Roman','sans-serif']}
const options=['code-block', 'image', 'formula'
]
return(
<div className="padding20-30 signleEditor danxuano" id={qNumber}>
@ -384,6 +428,10 @@ class SingleEditor extends Component{
}
.signleEditor .quill_editor_for_react_area .ql-toolbar .ql-formats .ql-font {
line-height: 20px;
min-width: 150px;
}
.signleEditor .quill_editor_for_react_area .ql-container .ql-editor p{
font-family: MicrosoftYaHei;
}
`}</style>
<p className="mb10 clearfix">
@ -428,7 +476,7 @@ class SingleEditor extends Component{
autoFocus={false}
imgAttrs={{width: '146px', height: '136px'}}
style={{ height: '166px'}}
placeholder="请您输入题干"
placeholder="请您输入选项"
options={options}
value={item}
onContentChange={(value,quill) => this.onOptionContentChange(value,quill,index)}
@ -438,7 +486,7 @@ class SingleEditor extends Component{
autoFocus={false}
imgAttrs={{width: '146px', height: '136px'}}
style={{ height: '166px'}}
placeholder="请您输入题干"
placeholder="请您输入选项"
options={options}
value={JSON.parse(item)}
onContentChange={(value,quill) => this.onOptionContentChange(value,quill,index)}

@ -0,0 +1,67 @@
@charset "utf-8";
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimSun]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimSun]::before {
content: "宋体";
font-family:SimSun !important;
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimHei]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimHei]::before {
content: "黑体";
font-family:SimHei !important;
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Microsoft-YaHei]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Microsoft-YaHei]::before {
content: "微软雅黑";
font-family:Microsoft YaHei !important;
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=KaiTi]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=KaiTi]::before {
content: "楷体";
font-family:KaiTi !important;
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=FangSong]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=FangSong]::before {
content: "仿宋";
font-family:FangSong !important;
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Arial]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Arial]::before {
content: "Arial";
font-family:Arial !important;
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Times-New-Roman]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Times-New-Roman]::before {
content: "Times New Roman";
font-family:Times New Roman !important;
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=sans-serif]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=sans-serif]::before {
content: "sans-serif";
font-family:sans-serif !important;
}
.ql-font-SimSun {
font-family:SimSun !important;
}
.ql-font-SimHei {
font-family:SimHei !important;
}
.ql-font-Microsoft-YaHei {
font-family:Microsoft YaHei !important;
}
.ql-font-KaiTi {
font-family:KaiTi !important;
}
.ql-font-FangSong {
font-family:FangSong !important;
}
.ql-font-Arial {
font-family:Arial !important;
}
.ql-font-Times-New-Roman {
font-family:Times New Roman !important;
}
.ql-font-sans-serif {
font-family:sans-serif !important;
}

@ -271,6 +271,12 @@
width:30%;
}
.w80s{
width:80%;
}
.w20s{
width:20%;
}
.w50s{
width: 50%;
@ -913,7 +919,7 @@
width: 40px !important;
position: absolute;
border-radius: 4px;
top: -50%;
top: -79%;
}
.shitikussmys{
width:29px !important;

@ -0,0 +1,18 @@
.ql-editor .ql-font-Microsoft-YaHei {
font-family: "Microsoft YaHei";
}
.ql-editor .ql-font-SimSun {
font-family: "SimSun";
}
.ql-editor .ql-font-SimHei {
font-family: "SimHei";
}
.ql-editor .ql-font-KaiTi {
font-family: "KaiTi";
}
.ql-editor .ql-font-Arial {
font-family: "Arial";
}
.ql-editor .Times-New-Roman {
font-family: "Times New Roman";
}

@ -0,0 +1,28 @@
.ql-snow .ql-picker.ql-font .ql-picker-label::before,
.ql-snow .ql-picker.ql-font .ql-picker-item::before {
content: '微软雅黑';
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Microsoft-YaHei]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Microsoft-YaHei]::before {
content: "微软雅黑";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimSun]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimSun]::before {
content: "宋体";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimHei]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimHei]::before {
content: "黑体";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=KaiTi]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=KaiTi]::before {
content: "楷体";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Arial]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Arial]::before {
content: "Arial";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Times-New-Roman]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Times-New-Roman]::before {
content: "Times New Roman";
}

@ -31,7 +31,7 @@ class Paperlibraryeditid extends Component {
super(props);
this.Judquestio = React.createRef();
this.state = {
paperlibrartdata: [],
Contentdata: [],
disciplinesdata: [],
knowledgepoints: [],
disciplmy: [],
@ -139,7 +139,7 @@ class Paperlibraryeditid extends Component {
axios.get(urls).then((response) => {
if (response) {
this.setState({
paperlibrartdata: response.data,
Contentdata: response.data,
item_banksedit: response.data.exam,
})
}
@ -188,7 +188,7 @@ class Paperlibraryeditid extends Component {
.then((result) => {
if (result.data.status === 0) {
// this.props.showNotification(`试卷更新成功`);
this.props.history.push('/paperlibrary');
this.props.history.push('/paperlibrary/see/'+this.props.match.params.id);
}
}).catch((error) => {
//console.log(error);
@ -227,7 +227,7 @@ class Paperlibraryeditid extends Component {
}
render() {
let {paperlibrartdata,newmyshixunmodelbool,defaultActiveKey} = this.state;
let {Contentdata,newmyshixunmodelbool,defaultActiveKey} = this.state;
const params = this.props && this.props.match && this.props.match.params;
let urlsysl=`/paperlibrary?defaultActiveKey=${defaultActiveKey}`;
@ -248,7 +248,7 @@ class Paperlibraryeditid extends Component {
{
newmyshixunmodelbool===true?
<div className="fangdatwo">
<NewMyShixunModel {...this.state} {...this.props} exam_id={this.props.match.params.id} setnewmyshixunmodelbool={(e)=>this.setnewmyshixunmodelbool(e)}></NewMyShixunModel>
<NewMyShixunModel {...this.state} {...this.props} Contentdata={this.state.Contentdata} exam_id={this.props.match.params.id} setnewmyshixunmodelbool={(e)=>this.setnewmyshixunmodelbool(e)}></NewMyShixunModel>
</div>
:
""
@ -291,9 +291,9 @@ class Paperlibraryeditid extends Component {
<div className={"seeoagertitscss"}>
<Seeoagertits
setnewmyshixunmodelbool={(e)=>this.setnewmyshixunmodelbool(e)}
all_score={paperlibrartdata && paperlibrartdata.exam && paperlibrartdata.exam.all_questions_count}
all_questions_count={paperlibrartdata && paperlibrartdata.exam && paperlibrartdata.exam.all_score}
difficulty={paperlibrartdata && paperlibrartdata.exam && paperlibrartdata.exam.difficulty}
all_score={Contentdata && Contentdata.exam && Contentdata.exam.all_questions_count}
all_questions_count={Contentdata && Contentdata.exam && Contentdata.exam.all_score}
difficulty={Contentdata && Contentdata.exam && Contentdata.exam.difficulty}
>
</Seeoagertits>
</div>
@ -301,15 +301,15 @@ class Paperlibraryeditid extends Component {
{...this.state}
{...this.props}
getdata={() => 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
single_questions={Contentdata && Contentdata.single_questions && Contentdata.single_questions.questions.length > 0 ? Contentdata.single_questions : null}
multiple_questions={Contentdata && Contentdata.multiple_questions
&& Contentdata.multiple_questions.questions.length > 0 ? Contentdata.multiple_questions : null
}
judgement_questions={paperlibrartdata && paperlibrartdata.judgement_questions
&& paperlibrartdata.judgement_questions.questions.length > 0 ? paperlibrartdata.judgement_questions : null
judgement_questions={Contentdata && Contentdata.judgement_questions
&& Contentdata.judgement_questions.questions.length > 0 ? Contentdata.judgement_questions : null
}
program_questions={paperlibrartdata && paperlibrartdata.program_questions
&& paperlibrartdata.program_questions.questions.length > 0 ? paperlibrartdata.program_questions : null
program_questions={Contentdata && Contentdata.program_questions
&& Contentdata.program_questions.questions.length > 0 ? Contentdata.program_questions : null
}
></Paperlibraryseeid_itemss>

@ -162,13 +162,11 @@ class Testpaperlibrary extends Component {
booljupyterurls:true,
})
}
axios.get((url), {params: data}).then((response) => {
setTimeout(()=>{
this.setState({
booljupyterurls:false,
})
},1000);
if (response === null || response === undefined) {
return
@ -304,7 +302,7 @@ class Testpaperlibrary extends Component {
tag_discipline_id:this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
keyword: this.state.keywords,
keyword: this.state.keyword,
page: this.state.page,
per_page:10,
};
@ -330,7 +328,7 @@ class Testpaperlibrary extends Component {
tag_discipline_id:this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
keyword: this.state.keywords,
keyword: this.state.keyword,
page: this.state.page,
per_page:10,
};

@ -17,6 +17,7 @@ import NoneDatas from '../component/NoneDatas';
import Contentquestionbank from "./Contentquestionbank";
import LoadingSpin from '../../../common/LoadingSpin';
import Listjihe from "./Listjihe";
import Certifiedprofessional from "../../modals/Certifiedprofessional";
const { TabPane } = Tabs;
const Search = Input.Search;
class Contentpart extends Component {
@ -25,6 +26,10 @@ class Contentpart extends Component {
this.state = {
page:1,
defaultActiveKeyss:"0",
mydisplay:false,
occupation:2,
isysladmins:false,
}
}
@ -50,6 +55,20 @@ class Contentpart extends Component {
}
}
let isysladmins=false;
if(this.props){
if(this.props.current_user){
if(this.props.current_user.admin){
isysladmins=true;
}
else if(this.props.current_user.business){
isysladmins=true;
}
}
}
this.setState({
isysladmins:isysladmins
})
}
//跳转人工组卷
@ -60,11 +79,32 @@ class Contentpart extends Component {
componentDidUpdate(prevProps) {
if(prevProps.current_user !== this.props.current_user) {
const isysladmins=this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false;
const is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false;
let isysladmins=false;
let is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false;
const professional_certification=this.props&&this.props.current_user&&this.props.current_user.professional_certification?this.props.current_user.professional_certification:false;
let {defaultActiveKey} = this.props;
let defaultActiveKeys=defaultActiveKey;
try {
if(this.props){
if(this.props.current_user){
if(this.props.current_user.admin){
isysladmins=true;
}
else if(this.props.current_user.business){
isysladmins=true;
}
}
}
if(is_teacher===false){
if(this.props.current_user.user_identity !=="学生"){
//专业人士
is_teacher=true
}
}
}catch (e) {
}
if(isysladmins===true||(is_teacher===true&&professional_certification===true)){
defaultActiveKeys="0"
}else{
@ -86,15 +126,120 @@ class Contentpart extends Component {
this.props.callback(defaultActiveKeys,false);
}
}
HideAddcoursestypess=(i)=>{
console.log("调用了");
this.setState({
mydisplay:true,
occupation:i,
})
}
mydisplayHidedel=()=>{
this.setState({
mydisplay:false,
})
}
xinzenw=(url)=>{
//只限制了教师
if(this.props.current_user.professional_certification===false&&this.state.isysladmins===false){
this.HideAddcoursestypess(2);
return
}
this.props.history.push(url);
}
HideAddcoursestypess=(i)=>{
console.log("调用了");
this.setState({
mydisplay:true,
occupation:i,
})
}
mydisplayHidedel=()=>{
this.setState({
mydisplay:false,
})
}
Testpapereditor=(e)=>{
if(this.props.current_user.professional_certification===false&&this.state.isysladmins===false){
this.HideAddcoursestypess(2);
return
}
this.props.Testpapereditor(e)
}
showmodels=(e)=>{
if(this.props.current_user.professional_certification===false&&this.state.isysladmins===false){
this.HideAddcoursestypess(2);
return
}
this.props.showmodels(e)
}
showmodelysl=(e)=>{
if(this.props.current_user.professional_certification===false&&this.state.isysladmins===false){
this.HideAddcoursestypess(2);
return
}
this.props.showmodelysl(e)
}
showmodelsInaudit=(e)=>{
if(this.props.current_user.professional_certification===false&&this.state.isysladmins===false){
this.HideAddcoursestypess(2);
return
}
this.props.showmodelsInaudit(e)
}
render() {
let {page,defaultActiveKeyss}=this.state;
let {page,defaultActiveKeyss,mydisplay}=this.state;
let {defaultActiveKey,defaultActiveKeybool}=this.props;
let defaultActiveKeys=defaultActiveKey+'';
const isysladmins=this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false;
const is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false;
let isysladmins=false;
let is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false;
const professional_certification=this.props&&this.props.current_user&&this.props.current_user.professional_certification?this.props.current_user.professional_certification:false;
try {
if(this.props){
if(this.props.current_user){
if(this.props.current_user.admin){
isysladmins=true;
}
else if(this.props.current_user.business){
isysladmins=true;
}
}
}
if(is_teacher===false){
if(this.props.current_user.user_identity !=="学生"){
//专业人士
is_teacher=true
}
}
}catch (e) {
}
const contents = (
<div className="questiontypes" style={{
@ -125,6 +270,27 @@ class Contentpart extends Component {
return (
<div className=" clearfix mt25">
<div className="educontent mt10 pb20 w1200s">
{
mydisplay===true?
<Certifiedprofessional {...this.props} {...this.state} ModalCancelsy={this.mydisplayHidedel} />
:""
}
{
mydisplay===true?
<style>
{
`
body{
overflow:hidden!important;
}
`
}
</style>
:""
}
<div className="w1200ms contentparttit" style={{
position: "relative",
}}>
@ -149,7 +315,7 @@ class Contentpart extends Component {
</style>
{
isysladmins===true||(is_teacher===true&&professional_certification===true)?
isysladmins===true||is_teacher===true?
<Tabs activeKey={defaultActiveKeys} onChange={(e)=>this.props.callback(e,true)}>
<TabPane tab="公共" key="1">
</TabPane>
@ -172,7 +338,7 @@ class Contentpart extends Component {
{
`
.sortinxdirection .ant-input-group-addon{
width: 60px !important;
width: 48px !important;
}
@ -186,7 +352,7 @@ class Contentpart extends Component {
`
}
</style>
<div className={isysladmins===true||(is_teacher===true&&professional_certification===true)?"sortinxdirection":"xaxisreverseorder"}>
<div className={isysladmins===true||is_teacher===true?"sortinxdirection":"xaxisreverseorder"}>
<Search
style={{ width: "347px",marginRight:"60px",}}
placeholder="请输入题目名称、内容"
@ -194,22 +360,22 @@ class Contentpart extends Component {
size="large"
onInput={(e)=>this.props.setdatafunsval(e)}
onSearch={ (value)=>this.props.setdatafuns(value)}
value={this.props.keywords}
value={this.props.keyword}
/>
{
isysladmins===true||(is_teacher===true&&professional_certification===true)?
isysladmins===true||is_teacher===true?
<div className="xaxisreverseorder" style={{
width:"50%"
}}>
<a href={'/Integeneration'}>
<a onClick={()=>this.xinzenw('/Integeneration')}>
<div className="newbutoonss">
<p className="newbutoontess" >智能组卷</p>
</div>
</a>
<a href={'/question'} >
<a onClick={()=>this.xinzenw('/question')}>
<div className="newbutoons mr39">
<p className="newbutoontess" >人工组卷</p>
</div>
@ -260,9 +426,9 @@ class Contentpart extends Component {
: this.props.Contentdata.exams.map((object, index) => {
return (
<Listjihe {...this.state} {...this.props} items={object} key={index}
Testpapereditor={(e)=>this.props.Testpapereditor(e)}
showmodels={(e)=>this.props.showmodels(e)}
showmodelysl={(e)=>this.props.showmodelysl(e)}
Testpapereditor={(e)=>this.Testpapereditor(e)}
showmodels={(e)=>this.showmodels(e)}
showmodelysl={(e)=>this.showmodelysl(e)}
Isitapopup={this.props.Isitapopup}
showmodelsInaudit={(e)=>this.props.showmodelsInaudit(e)}
>

@ -10,6 +10,7 @@ import {
Radio
} from "antd";
import './../testioncss/testioncss.css';
import Certifiedprofessional from "../../modals/Certifiedprofessional";
const tagArray = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
@ -23,12 +24,27 @@ class Listjihe extends Component {
name:"单选题",
nd:"简单",
chakanjiexibool:false,
mydisplay:false,
occupation:2,
isysladmins:false,
}
}
//初始化
componentDidMount(){
let isysladmins=false;
if(this.props){
if(this.props.current_user){
if(this.props.current_user.admin){
isysladmins=true;
}
else if(this.props.current_user.business){
isysladmins=true;
}
}
}
this.setState({
isysladmins:isysladmins
})
}
chakanjiexibool=()=>{
@ -55,15 +71,31 @@ class Listjihe extends Component {
this.props.getitem_basketss(id);
}
HideAddcoursestypess=(i)=>{
console.log("调用了");
this.setState({
mydisplay:true,
occupation:i,
})
}
mydisplayHidedel=()=>{
this.setState({
mydisplay:false,
})
}
gotoseesj=(id)=>{
if(this.props.current_user.professional_certification===false&&this.state.isysladmins===false){
this.HideAddcoursestypess(2);
return
}
this.props.history.push(`/paperlibrary/see/${id}?defaultActiveKey=${this.props.defaultActiveKey}`);
}
render() {
let {page,name,nd,chakanjiexibool}=this.state;
let {page,name,nd,chakanjiexibool,mydisplay}=this.state;
let {defaultActiveKey,items}=this.props;
const names= items&&items.name&&items.name;
@ -77,12 +109,33 @@ class Listjihe extends Component {
return (
<div className={" borderwdsst pd20 mb20 intermediatecenter listjihecolor "} >
{
mydisplay===true?
<Certifiedprofessional {...this.props} {...this.state} ModalCancelsy={this.mydisplayHidedel} />
:""
}
{
mydisplay===true?
<style>
{
`
body{
overflow:hidden!important;
}
`
}
</style>
:""
}
<div className="sortinxdirection w100s">
<div className="sjimg intermediatecenter">
<img src={getImageUrl("images/educoder/shijuans.png")} className="imgtp"/>
</div>
<div className="w100s verticallayout ml20" >
<div className="w100s " > <a className="sjtitle xiaoshou " title={names} onClick={()=>this.gotoseesj(items.id)}><p className="maxnamewidth100s">{names}</p></a></div>
<div className="w100s " > <a className="sjtitle xiaoshou " title={names} onClick={()=>this.gotoseesj(items.id)}><p className="maxnamewidth100s xiaoshou">{names}</p></a></div>
<div className="w100s sortinxdirection mt9">
<p className="sjtitles">试题数<span >{question_counts}</span></p>
<p className="sjtitles ml48">总分<span >{total_scores}</span></p>
@ -135,21 +188,22 @@ class Listjihe extends Component {
}
{
items.apply===false?
<p className="viewparsings xiaoshou mr25 " onClick={() => this.props.showmodels(items.id)}>
<i className="iconfont icon-gongkai font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>公开</span>
</p>
:
(
items.public==true?
""
:
<p className="viewparsings xiaoshou mr25" onClick={(e) => this.props.showmodelsInaudit(e)}>
<i className="iconfont icon-gongkai font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>公开审核中</span>
<p className="viewparsings mr25 ">
<i className="iconfont icon-dianjiliang font-13 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>已公开</span>
</p>
)
:
items.apply===false?
<p className="viewparsings xiaoshou mr25 " onClick={() => this.props.showmodels(items.id)}>
<i className="iconfont icon-gongkai font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>公开</span>
</p>
:
<p className="viewparsings xiaoshou mr25" onClick={(e) => this.props.showmodelsInaudit(e)}>
<i className="iconfont icon-gongkai font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>公开审核中</span>
</p>
}
</div>
:""}
@ -159,7 +213,9 @@ class Listjihe extends Component {
</div>
</div>
<div className="sjfqks reversedirection">
<div className="sjfqks reversedirection" style={{
display: "none"
}}>
<div className="newbutoonss">
<p className="newbutoontess" >发起考试</p>
</div>

@ -16,6 +16,7 @@ import {
import '../testioncss/testioncss.css';
import '../../tpm/newshixuns/css/Newshixuns.css';
import QuillForEditor from "../../../common/quillForEditor";
import QuestionModalPicture from "../../question/component/QuestionModalPicture";
const tagArray = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
@ -33,6 +34,7 @@ class Paperlibraryseeid_items extends Component {
questions: 0,
totalscore: 0,
total: 0,
url: ""
}
}
@ -65,9 +67,20 @@ class Paperlibraryseeid_items extends Component {
Singlemagaziness = () => {
}
handleShowUploadImage = (url) => {
// console.log('==============>>>>>>>>>>>>',url);
// setUrl(url);
this.setState({
url:url
})
}
handleClose=()=>{
this.setState({
url:'',
})
}
render() {
let {questions, totalscore, total, items} = this.state;
let {questions, totalscore, total, items,url} = this.state;
let {objectsingle, indexx, paperreviewsingleindex, indexxy,name} = this.props;
@ -90,12 +103,30 @@ class Paperlibraryseeid_items extends Component {
const options = [
'bold', // 加粗
]
try {
if(itemsnamesy.constructor === Object){
// console.log("是对象");
// console.log(itemsnamesy);
}else {
// console.log("不是对象");
// console.log(itemsnamesy);
itemsnamesy=itemsnamesy+"";
}
}catch (e) {
}
return (
<div key={indexxy}
className={ "w100s borderwdswuh mb20 pd20 "}
style={{
minHeight: "114px",
}}>
{url?
<QuestionModalPicture {...this.props} {...this.state} handleClose={()=>this.handleClose()}></QuestionModalPicture>
:
""
}
<style>{
`
.programquill .ql-editor{
@ -179,6 +210,8 @@ class Paperlibraryseeid_items extends Component {
<QuillForEditor
readOnly={true}
value={itemssname}
showUploadImage={this.handleShowUploadImage}
/>
}
@ -221,6 +254,8 @@ class Paperlibraryseeid_items extends Component {
<QuillForEditor
readOnly={true}
value={itemsnamesy}
showUploadImage={this.handleShowUploadImage}
/>
}
@ -251,6 +286,8 @@ class Paperlibraryseeid_items extends Component {
<QuillForEditor
readOnly={true}
value={string}
showUploadImage={this.handleShowUploadImage}
/>
:""
:

@ -291,7 +291,8 @@ class Paperlibraryseeid_itemss extends Component {
}
showsetmodalsTypedels=(id,bool,type)=>{
debugger
console.log("Paperlibraryseeid_itemss");
this.setState({
item_bank_id:id,
})

@ -544,7 +544,7 @@
margin-top: 19px;
}
.mytags{
width:106px;
min-width:106px;
height:32px;
border-radius:2px;
border:1px solid #DDDDDD;

@ -940,12 +940,35 @@ submittojoinclass=(value)=>{
width:'93px',
height:'80px',
}}>
<a href={'/question'} className={"popovertests"} ><p className="questiontype">试题库</p></a>
<Link to={'/question'} className={"popovertests"} ><p className="questiontype">试题库</p></Link>
<p className="questiontypeheng"></p>
<a href={'/paperlibrary'} className={"popovertests"} ><p className="questiontype">试卷库</p></a>
<Link to={'/paperlibrary'} className={"popovertests"} ><p className="questiontype">试卷库</p></Link>
</div>
);
return (
// console.log("头部");
// console.log(this.props);
//判断平台身份
let Periofters=false;
if(this.props){
if(this.props.current_user){
if(this.props.current_user.admin){
Periofters=true;
}
else if(this.props.current_user.business){
Periofters=true;
}
else if(this.props.current_user.is_teacher){
Periofters=true;
}else if(this.props.current_user.user_identity !=="学生") {
Periofters=true;
}
}
}
return (
<div className="newHeaders" id="nHeader" >
<style>{
@ -1043,7 +1066,7 @@ submittojoinclass=(value)=>{
color:#010101 !important;
}
.queyppors {
top: 63px !important;
top: 42px !important;
}
.questionbanks .ant-popover-inner-content {
@ -1052,17 +1075,22 @@ submittojoinclass=(value)=>{
`
}
</style>
{/*<li className={`pr questionbanks`} >*/}
{/* <Popover className="queyppors" id={"yslpopovers"} placement="bottom" content={contents} trigger="click" >*/}
{/* <div className=" sortinxdirection mr10">*/}
{/* <div style={{*/}
{/* color:"#fff"*/}
{/* }}>*/}
{/* 题库*/}
{/* </div>*/}
{/* </div>*/}
{/* </Popover>*/}
{/*</li>*/}
{
Periofters===true?
<li className={`pr questionbanks`} >
<Popover className="queyppors" id={"yslpopovers"} placement="bottom" content={contents} trigger="click" >
<div className=" sortinxdirection mr10">
<div style={{
color:"#fff"
}}>
题库
</div>
</div>
</Popover>
</li>
:""
}
<li
style={{display: this.props.Headertop === undefined ? 'none' : this.props.Headertop.auth === null ? 'none' : 'block'}}

@ -268,7 +268,7 @@ body>.-task-title {
background: #EEEEEE;
}
.mystask-sidebar{
right: 220px !important;
right: 181px !important;
}
.mystask-sidebars{
right: 20px !important;

@ -154,4 +154,4 @@ export async function fetchQuestion (params) {
export async function fetchTagDisciplines (params) {
const url = `/tag_disciplines.json`;
return axios.post(url, params);
}
}

Loading…
Cancel
Save