dev_aliyun2
杨树林 5 years ago committed by harry
parent 6374619b91
commit b6fc627ca3

@ -78,6 +78,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}
@ -140,21 +141,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?

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

@ -175,6 +175,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) {
@ -270,14 +277,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)) {
// 处理编辑器内容为空
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) {
@ -298,9 +320,16 @@ class JudquestionEditor extends Component {
const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
if (!reg.test(_text)) {
// 处理编辑器内容为空
try {
this.setState({
question_titlesysl:JSON.stringify(value)
})
}catch (e) {
this.setState({
question_titlesysl:""
})
}
} else {
// 提交到后台的内容需要处理一下;
var texts = "";

@ -331,8 +331,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 ?
@ -412,8 +412,16 @@ 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>
)
:
""
}
@ -463,7 +471,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 ?

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

@ -790,7 +790,9 @@
font-size: 14px;
}
.testfondexsysl{
width:5% !important;
}
.yldxtits{
color: #888888;
font-size: 14px;
@ -799,7 +801,9 @@
.mt25 {
margin-top: 25px;
}
.wt930px{
width: 930px !important;
}
.postitonrelati{
position: relative;
}
@ -1050,41 +1054,18 @@
white-space: nowrap;
cursor: default;
}
.ball {
width: 8px;
height: 8px;
background: #FF6601;
.titesstwos{
position: relative;
}
.titesstwostest{
position: absolute;
left: 0;
top: 0;
border-radius: 50%;
opacity: 0;
z-index: 1;
}
.mt25 {
margin-top: 25px;
.text-indents40{
text-indent:40px
}
.mr15 {
margin-right: 15px;
.text-indents44{
text-indent:44px
}
.fangdatwo {
background: #fefefe;
background-color: #fefefe;
height: 100%;
overflow-y: scroll !important;
width: 100%;
position: fixed;
top: 0px;
bottom: 0px;
left: 0px;
z-index: 999999;
right: 0px;
}
.searchwidth {
width: 347px !important;
.text-indents50{
text-indent: 50px
}

@ -9,6 +9,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);
@ -31,6 +32,7 @@ class Testpaperlibrary extends Component {
modalsTypes:false,
modalsType:false,
timuid:0,
modalsTypeInaudit:false,
}
}
getContainer = () => {
@ -131,11 +133,16 @@ class Testpaperlibrary extends Component {
}
//获取数据
getdata = (data) => {
getdata=(data,bool)=>{
const url = `/examination_banks.json`;
if(bool){
}else {
this.setState({
booljupyterurls:true,
})
}
axios.get((url), {params: data}).then((response) => {
setTimeout(()=>{
this.setState({
@ -281,7 +288,7 @@ class Testpaperlibrary extends Component {
page: this.state.page,
per_page: 10,
};
this.getdata(data);
this.getdata(data,true);
}
}).catch((error) => {
////console.log(error);
@ -307,7 +314,7 @@ class Testpaperlibrary extends Component {
page: this.state.page,
per_page: 10,
};
this.getdata(data);
this.getdata(data,true);
}
})
.catch(function (error) {
@ -318,8 +325,8 @@ class Testpaperlibrary extends Component {
showmodels = (id) => {
this.setState({
modalsType: true,
titilesm: "在平台审核后,所有成员均可使用试",
titiless: "是否设置为公开",
titilesm: "在平台审核后,所有成员均可使用试",
titiless: "是否设置为公开",
titbool: true,
timuid: id
})
@ -330,7 +337,19 @@ class Testpaperlibrary extends Component {
}
showmodelsInaudit = (e) => {
this.setState({
modalsTypeInaudit: true,
titilesm: "公开申请已提交,请等待管理员的审核",
titiless: "我们将在1-2个工作日内完成审核",
})
};
modalsTypeInauditbool=()=>{
this.setState({
modalsTypeInaudit:false,
})
}
showmodelysl = (id) => {
this.setState({
@ -396,7 +415,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;
@ -417,6 +436,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}
@ -445,6 +470,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