mast_item_banktwo
杨树林 5 years ago
parent f439a4abfe
commit 3e4f238b2d

@ -90,6 +90,7 @@ class Paperreview_single extends Component {
}catch (e) {
itemsnamesy=objectsingle&&objectsingle.program_attr&&objectsingle.program_attr.description;
}
var fenshul=(objectsingle.score+"分");
return (
<div key={indexxy}
@ -151,20 +152,21 @@ class Paperreview_single extends Component {
>
({objectsingle.score})
</div>
<div className="ml10 lh28 listjihetixingstit markdown-body cretitlecolrlist " style={{wordBreak: "break-word"}}
dangerouslySetInnerHTML={{__html: markdownToHTML(objectsingle.name).replace(/▁/g, "▁▁▁")}}>
<div id={"titessone"} className="ml10 lh28 listjihetixingstit markdown-body cretitlecolrlist " style={{wordBreak: "break-word"}}
dangerouslySetInnerHTML={{__html: markdownToHTML(fenshul+objectsingle.name).replace(/▁/g, "▁▁▁")}}>
</div>
</div>
:
<div className="w100s sortinxdirection">
<div className="tites lh28 listjihetixingstit markdown-body cretitlecolrlist " style={{wordBreak: "break-word",
<div className="w100s sortinxdirection titesstwos">
<div id={"titesstwo"} className="tites titesstwostest lh28 listjihetixingstit markdown-body cretitlecolrlist " style={{wordBreak: "break-word",
minWidth:"32px"
}}
>
({objectsingle.score})
</div>
<div className="ml10 lh28 listjihetixingstit cretitlecolrlist programquill" style={{wordBreak: "break-word"}}
<div className={objectsingle.score<10?" lh28 listjihetixingstit text-indents40 cretitlecolrlist programquill":objectsingle.score<100?" lh28 listjihetixingstit text-indents44 cretitlecolrlist programquill":" lh28 listjihetixingstit text-indents50 cretitlecolrlist programquill" }style={{wordBreak: "break-word"}}
>
{
itemssname===null|| itemssname===undefined?

@ -230,7 +230,11 @@ class ChoquesEditor extends Component{
const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
if (!reg.test(_text)) {
// 处理编辑器内容为空
texts="";
try {
texts=JSON.stringify(value);
}catch (e) {
texts="";
}
} else {
if(_text.length>=301){
var result = _text.substring(0,300);
@ -269,9 +273,15 @@ class ChoquesEditor extends Component{
const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
if (!reg.test(_text)) {
// 处理编辑器内容为空
this.setState({
question_titleysl:""
})
try {
this.setState({
question_titleysl: JSON.stringify(value)
})
}catch (e) {
this.setState({
question_titleysl:""
})
}
} else {
// 提交到后台的内容需要处理一下;
var texts="";
@ -293,9 +303,15 @@ class ChoquesEditor extends Component{
const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
if (!reg.test(_text)) {
// 处理编辑器内容为空
this.setState({
question_titlesysl:""
})
try {
this.setState({
question_titlesysl: JSON.stringify(value)
})
}catch (e) {
this.setState({
question_titlesysl:""
})
}
} else {
// 提交到后台的内容需要处理一下;
var texts="";

@ -187,6 +187,13 @@ class JudquestionEditor extends Component{
}catch (e) {
}
const params = this.props && this.props.match && this.props.match.params;
if(JSON.stringify(params) === "{}"){
//新增
this.setState({
zqda:"0"
})
}
}
componentDidUpdate(prevProps) {
@ -282,14 +289,29 @@ class JudquestionEditor extends Component{
}
onContentChange=(value,quill)=>{
// console.log("这是题干赋值");
// console.log(value);
// console.log(quill);
const _text = quill.getText();
const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
// console.log(_text);
// console.log(_text.length);
if (!reg.test(_text)) {
// 处理编辑器内容为空
this.setState({
question_titleysl:""
})
try {
this.setState({
question_titleysl:JSON.stringify(value)
})
}catch (e) {
this.setState({
question_titleysl:""
})
}
// console.log("空");
} else {
// console.log("有");
// 提交到后台的内容需要处理一下;
var texts="";
if(_text.length>=1001){
@ -310,9 +332,16 @@ class JudquestionEditor extends Component{
const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
if (!reg.test(_text)) {
// 处理编辑器内容为空
this.setState({
question_titlesysl:""
})
try {
this.setState({
question_titlesysl:JSON.stringify(value)
})
}catch (e) {
this.setState({
question_titlesysl:""
})
}
} else {
// 提交到后台的内容需要处理一下;
var texts="";

@ -319,8 +319,8 @@ class Listjihe extends Component {
{
items.choosed === true ?
<p className="selectionss xiaoshou" onClick={() => this.Selectingpracticaltrainings(items.id)}>
<i className="iconfont icon-jianhao font-12 lg ml7 lh30 icontianjiadaohangcolor mr5"></i>
<span className="mr15 lh30">撤销</span></p>
{/*<i className="iconfont icon-jianhao font-12 lg ml7 lh30 icontianjiadaohangcolor mr5"></i>*/}
<span className=" lh30">撤销</span></p>
:
items.item_type === "PROGRAM" ?
items.program_attr.status === 0 ?
@ -400,7 +400,15 @@ class Listjihe extends Component {
<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>
)
:
""
}
@ -451,7 +459,12 @@ class Listjihe extends Component {
</div>
<div className=" sortinxdirection mt15 yldxtit">
<p id={"analysisnamesid"} className=" testfondex yldxtit programquill"
<p className=" testfondex yldxtit "
style={{wordBreak: "break-word"}}
>
解析
</p>
<p id={"analysisnamesid"} className="wt930px testfondex yldxtit programquill"
style={{wordBreak: "break-word"}}
>
{items ?

@ -253,7 +253,11 @@ class SingleEditor extends Component{
const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
if (!reg.test(_text)) {
// 处理编辑器内容为空
texts="";
try {
texts= JSON.stringify(value)
}catch (e) {
texts="";
}
} else {
if(_text.length>=301){
var result = _text.substring(0,300);
@ -291,9 +295,15 @@ class SingleEditor extends Component{
const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
if (!reg.test(_text)) {
// 处理编辑器内容为空
this.setState({
question_titleysl:""
})
try {
this.setState({
question_titleysl: JSON.stringify(value)
})
}catch (e) {
this.setState({
question_titleysl:""
})
}
} else {
// 提交到后台的内容需要处理一下;
@ -322,9 +332,15 @@ class SingleEditor extends Component{
const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
if (!reg.test(_text)) {
// 处理编辑器内容为空
this.setState({
question_titlesysl:""
})
try {
this.setState({
question_titlesysl:JSON.stringify(value)
})
}catch (e) {
this.setState({
question_titlesysl:""
})
}
} else {
var texts="";
if(_text.length>=1001){

@ -705,6 +705,9 @@
font-size: 14px;
}
.testfondexsysl{
width:5% !important;
}
.yldxtits{
color: #888888;
font-size: 14px;
@ -712,7 +715,9 @@
.mt25{
margin-top: 25px;
}
.wt930px{
width: 930px !important;
}
.postitonrelati{
position: relative;
}
@ -1072,3 +1077,18 @@
.lh34{
line-height: 34px !important;
}
.titesstwos{
position: relative;
}
.titesstwostest{
position: absolute;
}
.text-indents40{
text-indent:40px
}
.text-indents44{
text-indent:44px
}
.text-indents50{
text-indent: 50px
}

@ -18,6 +18,7 @@ import SiderBar from "../tpm/SiderBar";
import Headplugselections from "../question/component/Headplugselections";
import QuestionModal from "./component/QuestionModal";
import QuestionModals from "./component/QuestionModals";
import QuestionModalys from "./component/QuestionModalys";
class Testpaperlibrary extends Component {
constructor(props) {
super(props);
@ -40,6 +41,7 @@ class Testpaperlibrary extends Component {
modalsTypes:false,
modalsType:false,
timuid:0,
modalsTypeInaudit:false,
}
}
getContainer = () => {
@ -138,11 +140,16 @@ class Testpaperlibrary extends Component {
}
//获取数据
getdata=(data)=>{
getdata=(data,bool)=>{
const url = `/examination_banks.json`;
this.setState({
booljupyterurls:true,
})
if(bool){
}else {
this.setState({
booljupyterurls:true,
})
}
axios.get((url), {params: data}).then((response) => {
setTimeout(()=>{
this.setState({
@ -288,7 +295,7 @@ class Testpaperlibrary extends Component {
page: this.state.page,
per_page:10,
};
this.getdata(data);
this.getdata(data,true);
}
}).catch((error) => {
////console.log(error);
@ -314,7 +321,7 @@ class Testpaperlibrary extends Component {
page: this.state.page,
per_page:10,
};
this.getdata(data);
this.getdata(data,true);
}
})
.catch(function (error) {
@ -325,8 +332,8 @@ class Testpaperlibrary extends Component {
showmodels = (id) => {
this.setState({
modalsType: true,
titilesm: "在平台审核后,所有成员均可使用试",
titiless: "是否设置为公开",
titilesm: "在平台审核后,所有成员均可使用试",
titiless: "是否设置为公开",
titbool: true,
timuid: id
})
@ -337,7 +344,19 @@ class Testpaperlibrary extends Component {
}
showmodelsInaudit = (e) => {
this.setState({
modalsTypeInaudit: true,
titilesm: "公开申请已提交,请等待管理员的审核",
titiless: "我们将在1-2个工作日内完成审核",
})
};
modalsTypeInauditbool=()=>{
this.setState({
modalsTypeInaudit:false,
})
}
showmodelysl = (id) => {
this.setState({
@ -403,7 +422,7 @@ class Testpaperlibrary extends Component {
render() {
let{Headertop,items_count,page,per_page,modalsTypes,modalsType}=this.state;
let{Headertop,items_count,page,per_page,modalsTypes,modalsType,modalsTypeInaudit}=this.state;
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;
@ -424,6 +443,12 @@ class Testpaperlibrary extends Component {
setDownload={() => this.setDownload()}></QuestionModal>
:""
}
{
modalsTypeInaudit===true?
<QuestionModalys {...this.props}{...this.state} modalsType={modalsTypeInaudit} modalCancel={() => this.modalsTypeInauditbool()}
setDownload={() => this.modalsTypeInauditbool()}></QuestionModalys>
:""
}
{/*试卷库*/}
<SiderBar
{...this.props}
@ -452,6 +477,8 @@ class Testpaperlibrary extends Component {
callback={(key)=>this.callback(key)}
setdatafunsval={(key)=>this.setdatafunsval(key)}
setdifficulty={(bool)=>this.setdifficulty(bool)}
showmodelsInaudit={(e)=>this.showmodelsInaudit(e)}
>
</Contentpart>

@ -222,6 +222,7 @@ class Contentpart extends Component {
showmodels={(e)=>this.props.showmodels(e)}
showmodelysl={(e)=>this.props.showmodelysl(e)}
Isitapopup={this.props.Isitapopup}
showmodelsInaudit={(e)=>this.props.showmodelsInaudit(e)}
>
</Listjihe>

@ -133,12 +133,21 @@ class Listjihe extends Component {
}
{
items.public === false ?
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>
)
}
</div>
:""}

@ -0,0 +1,42 @@
import React, { Component } from 'react';
import {getImageUrl} from 'educoder';
import { Modal} from 'antd';
import axios from 'axios';
import './../../question/questioncss/questioncom.css'
//立即申请试用
class QuestionModalys extends Component {
constructor(props) {
super(props);
this.state={
}
}
render() {
return(
<Modal
keyboard={false}
closable={false}
footer={null}
destroyOnClose={true}
title="提示"
centered={true}
visible={this.props.modalsType===undefined?false:this.props.modalsType}
width="442px"
>
<div className="educouddiv">
<div className={"tabeltext-alignleft mt10"}><p className="titiles">{this.props.titilesm}</p></div>
<div className={"tabeltext-alignleft mt10"}><p className="titiles">{this.props.titiless}</p></div>
<div className="clearfix mt30 edu-txt-center">
<a className="task-btn task-btn-orange w80" onClick={()=>this.props.setDownload()}>知道啦</a>
</div>
</div>
</Modal>
)
}
}
export default QuestionModalys;
Loading…
Cancel
Save