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,31 +141,31 @@ 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",
minWidth: "32px"
<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" }}
>
{
itemssname === null || itemssname === undefined ?
""
:
<QuillForEditor
readOnly={true}
value={itemssname}
/>
}
<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?
""
:
<QuillForEditor
readOnly={true}
value={itemssname}
/>
}
</div>

@ -220,7 +220,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);
@ -259,9 +263,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 = "";
@ -283,9 +293,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 = "";

@ -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) {
@ -269,15 +276,30 @@ class JudquestionEditor extends Component {
}
onContentChange = (value, quill) => {
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) {
@ -298,9 +320,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 = "";

@ -254,239 +254,252 @@ class Listjihe extends Component {
</p>
</p>
:
<p className="w100s listjihetixingstitsp verticallayout ">
{
items === undefined || items === null ? "" : items.choices.map((object, index) => {
var string=""
try {
string=JSON.parse(object.choice_text);
}catch (e) {
string=object.choice_text;
}
return (
<p className={index === 0 ? "sortinxdirection " : "sortinxdirection mt15 "}>
<p className="lh20s">{tagArray[index]}</p>
<p className="programquill" style={{wordBreak: "break-word"}}>
{object ?
object.choice_text === undefined || object.choice_text=== null || object.choice_text === "" ?
""
:
object.choice_text.length>0?
<QuillForEditor
readOnly={true}
value={string}
/>
:""
:
""
}
</p>
</p>
)
})
}
</p>
}
</div>
<div className="w100s sortinxdirection mt10">
<p
className="listjihetixing">难度<span>{items.difficulty === 1 ? "简单" : items.difficulty === 2 ? "适中" : items.difficulty === 3 ? "困难" : ""}</span>
</p>
<p
className="ml30 listjihetixing">题型<span>{items.item_type === "SINGLE" ? "单选题" : items.item_type === "MULTIPLE" ? "多选题" : items.item_type === "JUDGMENT" ? "判断题" : items.item_type === "PROGRAM" ? "编程题" : ""}</span>
</p>
</div>
{/*更新时间*/}
<div className="w100s sortinxdirection">
<div className="w50s listjihetixingstit sortinxdirection">
<p className="updatetimes lh30">更新时间{items.update_time}</p>
{
this.props.defaultActiveKey === "0" || this.props.defaultActiveKey === 0 ?
""
:
<p className="updatetimes lh30 ml45">创建者{items.author.name}</p>
}
{
items.item_type === "PROGRAM" ?
<p className="updatetimes lh30 ml45">编程语言{items.program_attr.language}</p>
: ""
}
{
items.item_type === "PROGRAM" ?
items.program_attr.status === 0 ?
<p className="updatetimes lh30 ml45 nofabu mt5">未发布</p>
: ""
: ""
}
</div>
<div className="w50s xaxisreverseorder">
{
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=" lh30">撤销</span></p>
:
items.item_type === "PROGRAM" ?
items.program_attr.status === 0 ?
<Tooltip placement="top" title={"编程题未发布,不能选用!"}>
<p className="selectionys jinzhixiaoshou">
<i className="iconfont icon-tianjiadaohang font-12 lg ml7 lh30 icontianjiadaohangcolor mr5"></i>
<span className="mr15 lh30">选用</span>
</p>
</Tooltip>
:
<p className="selection xiaoshou" onClick={() => this.Selectingpracticaltraining(items.id)}>
<i className="iconfont icon-tianjiadaohang font-12 lg ml7 lh30 icontianjiadaohangcolor mr5"></i>
<span className="mr15 lh30">选用</span>
</p>
:
<p className="selection xiaoshou" onClick={() => this.Selectingpracticaltraining(items.id)}>
<i className="iconfont icon-tianjiadaohang font-12 lg ml7 lh30 icontianjiadaohangcolor mr5"></i>
<span className="mr15 lh30">选用</span>
</p>
}
{
defaultActiveKey === 0 || defaultActiveKey === "0" ?
<div className="xaxisreverseorder">
<p className="viewparsings xiaoshou mr25" onClick={() => this.props.showmodelysl(items.id)}>
<i className="iconfont icon-shanchu1 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>删除</span>
</p>
{
items.item_type === "PROGRAM" ?
this.props.Isitapopup&&this.props.Isitapopup==="true"?
""
:
<a target="_blank" href={`/problems/${items.program_attr.identifier}/edit`}>
<p className="viewparsings xiaoshou mr25">
<i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>编辑</span>
</p>
</a>
:
this.props.Isitapopup&&this.props.Isitapopup==="true"?
""
:
<a href={`/question/edit/${items.id}`}>
<p className="viewparsings xiaoshou mr25">
<i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>编辑</span>
</p>
</a>
}
{
items.public === false ?
items.item_type === "PROGRAM" ?
(
items.program_attr.status === 0 ?
""
:
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>
</p>
:
<p className="w100s listjihetixingstitsp verticallayout ">
{
items === undefined || items === null ? "" : items.choices.map((object, index) => {
var string = ""
try {
string = JSON.parse(object.choice_text);
} catch (e) {
string = object.choice_text;
}
return (
<p className={index === 0 ? "sortinxdirection " : "sortinxdirection mt15 "}>
<p className="lh20s">{tagArray[index]}</p>
<p className="programquill" style={{ wordBreak: "break-word" }}>
{object ?
object.choice_text === undefined || object.choice_text === null || object.choice_text === "" ?
""
:
object.choice_text.length > 0 ?
<QuillForEditor
readOnly={true}
value={string}
/>
: ""
:
""
}
</p>
</p>
)
})
}
</p>
}
</div>
<div className="w100s sortinxdirection mt10">
<p
className="listjihetixing">难度<span>{items.difficulty === 1 ? "简单" : items.difficulty === 2 ? "适中" : items.difficulty === 3 ? "困难" : ""}</span>
)
)
: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>
<p
className="ml30 listjihetixing">题型<span>{items.item_type === "SINGLE" ? "单选题" : items.item_type === "MULTIPLE" ? "多选题" : items.item_type === "JUDGMENT" ? "判断题" : items.item_type === "PROGRAM" ? "编程题" : ""}</span>
</p>
</div>
{/*更新时间*/}
<div className="w100s sortinxdirection">
<div className="w50s listjihetixingstit sortinxdirection">
<p className="updatetimes lh30">更新时间{items.update_time}</p>
{
this.props.defaultActiveKey === "0" || this.props.defaultActiveKey === 0 ?
""
:
<p className="updatetimes lh30 ml45">创建者{items.author.name}</p>
}
{
items.item_type === "PROGRAM" ?
<p className="updatetimes lh30 ml45">编程语言{items.program_attr.language}</p>
: ""
}
{
items.item_type === "PROGRAM" ?
items.program_attr.status === 0 ?
<p className="updatetimes lh30 ml45 nofabu mt5">未发布</p>
: ""
: ""
}
</div>
<div className="w50s xaxisreverseorder">
{
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>
:
items.item_type === "PROGRAM" ?
items.program_attr.status === 0 ?
<Tooltip placement="top" title={"编程题未发布,不能选用!"}>
<p className="selectionys jinzhixiaoshou">
<i className="iconfont icon-tianjiadaohang font-12 lg ml7 lh30 icontianjiadaohangcolor mr5"></i>
<span className="mr15 lh30">选用</span>
</p>
</Tooltip>
:
<p className="selection xiaoshou" onClick={() => this.Selectingpracticaltraining(items.id)}>
<i className="iconfont icon-tianjiadaohang font-12 lg ml7 lh30 icontianjiadaohangcolor mr5"></i>
<span className="mr15 lh30">选用</span>
</p>
:
<p className="selection xiaoshou" onClick={() => this.Selectingpracticaltraining(items.id)}>
<i className="iconfont icon-tianjiadaohang font-12 lg ml7 lh30 icontianjiadaohangcolor mr5"></i>
<span className="mr15 lh30">选用</span>
</p>
}
{
defaultActiveKey === 0 || defaultActiveKey === "0" ?
<div className="xaxisreverseorder">
<p className="viewparsings xiaoshou mr25" onClick={() => this.props.showmodelysl(items.id)}>
<i className="iconfont icon-shanchu1 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>删除</span>
</p>
{
items.item_type === "PROGRAM" ?
this.props.Isitapopup && this.props.Isitapopup === "true" ?
""
:
<a target="_blank" href={`/problems/${items.program_attr.identifier}/edit`}>
<p className="viewparsings xiaoshou mr25">
<i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>编辑</span>
</p>
</a>
:
this.props.Isitapopup && this.props.Isitapopup === "true" ?
""
:
<a href={`/question/edit/${items.id}`}>
<p className="viewparsings xiaoshou mr25">
<i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>编辑</span>
</p>
</a>
}
{
items.public === false ?
items.item_type === "PROGRAM" ?
(
items.program_attr.status === 0 ?
""
:
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>
)
)
: 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>
:
""
:
""
}
)
:
""
}
</div>
: ""
}
{
items.item_type === "PROGRAM" ?
""
:
<p className="viewparsings xiaoshou mr25" onClick={() => this.props.chakanjiexibool(keindex)}>
<i className="iconfont icon-jiexi font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
</div>
: ""
}
{
items.item_type === "PROGRAM" ?
""
:
<p className="viewparsings xiaoshou mr25" onClick={() => this.props.chakanjiexibool(keindex)}>
<i className="iconfont icon-jiexi font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
查看解析</p>
}
</div>
</div>
{
chakanjiexiboolindex === keindex ? <div>
<div className="w100s questiontypeheng mt23">
</div>
<div className=" sortinxdirection mt15 yldxtit">
}
{
items.item_type === "SINGLE" ?
<p className=" testfondex yldxtit"
style={{ wordBreak: "break-word" }}
dangerouslySetInnerHTML={{ __html: markdownToHTML("答案:" + tagArrays[rightkey]).replace(/▁/g, "▁▁▁") }}
>
</p>
: items.item_type === "MULTIPLE" ?
<p className=" testfondex yldxtit"
style={{ wordBreak: "break-word" }}
dangerouslySetInnerHTML={{ __html: markdownToHTML("答案:" + MULTIPLEkey).replace(/▁/g, "▁▁▁") }}
>
</p>
:
<p className=" testfondex yldxtit"
style={{ wordBreak: "break-word" }}
dangerouslySetInnerHTML={{ __html: markdownToHTML("答案:" + rightkey).replace(/▁/g, "▁▁▁") }}
>
</p>
}
</div>
<div className=" sortinxdirection mt15 yldxtit">
<p id={"analysisnamesid"} className=" testfondex yldxtit programquill"
style={{ wordBreak: "break-word" }}
>
{items ?
items.analysis === undefined || items.analysis === null || items.analysis === "" ?
</div>
</div>
{
chakanjiexiboolindex === keindex ? <div>
<div className="w100s questiontypeheng mt23">
</div>
<div className=" sortinxdirection mt15 yldxtit">
{
items.item_type === "SINGLE" ?
<p className=" testfondex yldxtit"
style={{wordBreak: "break-word"}}
dangerouslySetInnerHTML={{__html: markdownToHTML("答案:" + tagArrays[rightkey]).replace(/▁/g, "▁▁▁")}}
>
</p>
: items.item_type === "MULTIPLE"?
<p className=" testfondex yldxtit"
style={{wordBreak: "break-word"}}
dangerouslySetInnerHTML={{__html: markdownToHTML("答案:" + MULTIPLEkey).replace(/▁/g, "▁▁▁")}}
>
</p>
:
<p className=" testfondex yldxtit"
style={{wordBreak: "break-word"}}
dangerouslySetInnerHTML={{__html: markdownToHTML("答案:" + rightkey).replace(/▁/g, "▁▁▁")}}
>
</p>
}
""
:
items.analysis.length > 0 ?
analysisnames === null || analysisnames === undefined ? "" :
<QuillForEditor
imgAttrs={{ width: '60px', height: '30px' }}
readOnly={true}
value={analysisnames}
/>
:
""
:
""
}
</p>
</div>
</div> : ""
}
</div>
<div className=" sortinxdirection mt15 yldxtit">
<p className=" testfondex yldxtit "
style={{wordBreak: "break-word"}}
>
解析
</p>
<p id={"analysisnamesid"} className="wt930px testfondex yldxtit programquill"
style={{wordBreak: "break-word"}}
>
{items ?
items.analysis=== undefined || items.analysis=== null || items.analysis === "" ?
""
:
items.analysis.length>0?
analysisnames===null || analysisnames===undefined?"":
<QuillForEditor
imgAttrs={{width: '60px', height: '30px'}}
readOnly={true}
value={analysisnames}
/>
:
""
:
""
}
</p>
</div>
</div> : ""
}
</div>

@ -242,7 +242,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);
@ -280,9 +284,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 {
// 提交到后台的内容需要处理一下;
@ -311,9 +321,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) {

@ -790,18 +790,22 @@
font-size: 14px;
}
.yldxtits {
color: #888888;
font-size: 14px;
.testfondexsysl{
width:5% !important;
}
.yldxtits{
color: #888888;
font-size: 14px;
}
.mt25 {
margin-top: 25px;
}
.postitonrelati {
position: relative;
.wt930px{
width: 930px !important;
}
.postitonrelati{
position: relative;
}
.postitonrelatis {
@ -1050,41 +1054,18 @@
white-space: nowrap;
cursor: default;
}
.ball {
width: 8px;
height: 8px;
background: #FF6601;
position: absolute;
left: 0;
top: 0;
border-radius: 50%;
opacity: 0;
z-index: 1;
.titesstwos{
position: relative;
}
.mt25 {
margin-top: 25px;
.titesstwostest{
position: absolute;
}
.mr15 {
margin-right: 15px;
.text-indents40{
text-indent:40px
}
.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;
.text-indents44{
text-indent:44px
}
.text-indents50{
text-indent: 50px
}
.searchwidth {
width: 347px !important;
}

@ -9,28 +9,30 @@ 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);
this.state = {
Headertop: "",
disciplinesdata: null,
discipline_id: null,
sub_discipline_id: null,
tag_discipline_id: null,
public: null,
difficulty: null,
item_type: null,
keyword: null,
page: 1,
per_page: 10,
booljupyterurls: false,
Contentdata: [],
items_count: 0,
defaultActiveKey: "1",
modalsTypes: false,
modalsType: false,
timuid: 0,
disciplinesdata:null,
discipline_id:null,
sub_discipline_id:null,
tag_discipline_id:null,
public:null,
difficulty:null,
item_type:null,
keyword:null,
page:1,
per_page:10,
booljupyterurls:false,
Contentdata:[],
items_count:0,
defaultActiveKey:"1",
modalsTypes:false,
modalsType:false,
timuid:0,
modalsTypeInaudit:false,
}
}
getContainer = () => {
@ -131,13 +133,18 @@ class Testpaperlibrary extends Component {
}
//获取数据
getdata = (data) => {
getdata=(data,bool)=>{
const url = `/examination_banks.json`;
this.setState({
booljupyterurls: true,
})
axios.get((url), { params: data }).then((response) => {
setTimeout(() => {
if(bool){
}else {
this.setState({
booljupyterurls:true,
})
}
axios.get((url), {params: data}).then((response) => {
setTimeout(()=>{
this.setState({
booljupyterurls: false,
})
@ -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}
@ -437,14 +462,16 @@ class Testpaperlibrary extends Component {
{...this.props}
{...this.state}
Isitapopup={"false"}
Testpapereditor={(e) => this.Testpapereditor(e)}
setdifficulty={(e) => this.setdifficulty(e)}
showmodels={(e) => this.showmodels(e)}
showmodelysl={(e) => this.showmodelysl(e)}
setdatafuns={(key) => this.setdatafuns(key)}
callback={(key) => this.callback(key)}
setdatafunsval={(key) => this.setdatafunsval(key)}
setdifficulty={(bool) => this.setdifficulty(bool)}
Testpapereditor={(e)=>this.Testpapereditor(e)}
setdifficulty={(e)=>this.setdifficulty(e)}
showmodels={(e)=>this.showmodels(e)}
showmodelysl={(e)=>this.showmodelysl(e)}
setdatafuns={(key)=>this.setdatafuns(key)}
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