import React, {Component} from "react"; import {Link, NavLink} from 'react-router-dom'; import {WordsBtn, ActionBtn,SnackbarHOC,getImageUrl,markdownToHTML} from 'educoder'; import axios from 'axios'; import { notification, Spin, Table, Pagination, 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.', 'S.', 'T.', 'U.', 'V.', 'W.', 'X.', 'Y.', 'Z.' ] class Listjihe extends Component { constructor(props) { super(props); this.state = { page:1, 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=()=>{ if(this.state.chakanjiexibool===true){ this.setState({ chakanjiexibool:false }) }else{ this.setState({ chakanjiexibool:true }) } } //选用 Selectingpracticaltraining=(id)=>{ let data={ item_ids:[id] } this.props.getitem_baskets(data); } //撤销 Selectingpracticaltrainings=(id)=>{ 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,mydisplay}=this.state; let {defaultActiveKey,items}=this.props; const names= items&&items.name&&items.name; const question_counts=items&&items.question_count&&items.question_count; const total_scores =items&&items.total_score&&items.total_score; const difficultys=items&&items.difficulty&&items.difficulty===1?"简单":items&&items.difficulty&&items.difficulty===2?"适中":items&&items.difficulty&&items.difficulty===3?"困难":"" const update_times=items&&items.update_time&&items.update_time; const quotess =items&&items.quotes&&items.quotes; const authors=items&&items.author&&items.author.name; let Periofters = false; let Perioftersbols=false; if (this.props) { if (this.props.current_user) { if (this.props.current_user.admin) { Periofters = true; } else if (this.props.current_user.business) { Perioftersbols = true; } } } return (
试题数:{question_counts}
总分:{total_scores}
难度:{difficultys}
更新时间:{update_times}
{ quotess===null||quotess===undefined||quotess===0? "" :使用次数:{quotess}
} { defaultActiveKey===1||defaultActiveKey==="1"?创建者:{authors}
: "" }this.props.showmodelysl(items.id)}> 删除
{ this.props.Isitapopup&&this.props.Isitapopup==="true"? "" :this.props.Testpapereditor(items.id)}> 编辑
} { items.public==true?已公开
: items.apply===false?this.props.showmodels(items.id)}> 公开
:this.props.showmodelsInaudit(e)}> 公开审核中
}this.props.showmodelysl(items.id)}> 删除
{ this.props.Isitapopup&&this.props.Isitapopup==="true"? "" :this.props.Testpapereditor(items.id)}> 编辑
}this.props.Testpapereditor(items.id)}> 编辑
}发起考试