mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 20:00:49 +08:00
init project
This commit is contained in:
59
public/react/src/modules/modals/Bottomsubmit.js
Normal file
59
public/react/src/modules/modals/Bottomsubmit.js
Normal file
@@ -0,0 +1,59 @@
|
||||
import React, {Component} from 'react';
|
||||
import {
|
||||
Button,
|
||||
} from 'antd';
|
||||
|
||||
class Bottomsubmit extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
this.state = {}
|
||||
}
|
||||
|
||||
cannelfun = () => {
|
||||
// window.location.href=
|
||||
if(this.props.Cohetepaperbool===true){
|
||||
this.props.setCohetepaperbool(false);
|
||||
}else {
|
||||
this.props.history.replace(this.props.url);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
render() {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<style>
|
||||
{
|
||||
`
|
||||
.newFooter{
|
||||
display:none;
|
||||
}
|
||||
`
|
||||
}
|
||||
</style>
|
||||
<div className="clearfix bor-bottom-greyE edu-back-white orderingbox newshixunbottombtn">
|
||||
<div className=" edu-txt-center padding13-30">
|
||||
<button type="button" className="ant-btn mr20 newshixunmode backgroundFFF" onClick={() => this.cannelfun()}>
|
||||
<span>取 消</span></button>
|
||||
<Button type="button" className="ant-btn newshixunmode mr40 ant-btn-primary" type="primary"
|
||||
htmlType="submit" onClick={() => this.props.onSubmits()}
|
||||
loading={this.props.loadings}><span>{this.props.bottomvalue===undefined?"保存":this.props.bottomvalue}</span></Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export default Bottomsubmit;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
101
public/react/src/modules/modals/Certifiedprofessional.js
Normal file
101
public/react/src/modules/modals/Certifiedprofessional.js
Normal file
@@ -0,0 +1,101 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Modal} from 'antd';
|
||||
import axios from 'axios';
|
||||
import shimingrenzheng from '../../../src/images/cert/shimingrenzheng.png';
|
||||
import zhiyerenzheng from '../../../src/images/cert/zhiyerenzheng.png';
|
||||
import './certfed.css';
|
||||
//认证职业
|
||||
class Certifiedprofessional extends Component {
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state={
|
||||
// occupation:3,
|
||||
// mydisplay:false,
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
// console.log("加入金品课堂");
|
||||
// console.log(this.props);
|
||||
|
||||
|
||||
}
|
||||
|
||||
modalCancel=()=>{
|
||||
this.props.ModalCancelsy();
|
||||
};
|
||||
|
||||
setDownload=()=>{
|
||||
window.location.href="/account/certification"
|
||||
|
||||
}
|
||||
|
||||
|
||||
render() {
|
||||
// console.log("加入金品课堂2");
|
||||
// console.log(this.props);
|
||||
let{occupation} =this.props;
|
||||
return(
|
||||
<Modal
|
||||
keyboard={false}
|
||||
closable={false}
|
||||
footer={null}
|
||||
destroyOnClose={true}
|
||||
title="因为以下原因,您暂时不能进行操作"
|
||||
centered={true}
|
||||
visible={this.props.mydisplay}
|
||||
width="600px"
|
||||
heigth="307px"
|
||||
>
|
||||
<div className="educouddiv">
|
||||
<div className={"tabeltext-alignleft fontsizecoirlysl"}><p style={{fontSize: "16px"}}>请在完成条件后重试</p></div>
|
||||
{
|
||||
occupation=== 3?
|
||||
<div className="yslcentercerlfed edu-txt-center mt30" >
|
||||
|
||||
<div className="mr55 imgysldivone">
|
||||
<img className="yslimgwidthte"
|
||||
src={shimingrenzheng}
|
||||
/>
|
||||
<span className="fontsizecoirlysltwo mt15">未实名认证</span>
|
||||
</div>
|
||||
<div className="imgysldivone">
|
||||
<img className="yslimgwidthte"
|
||||
src={zhiyerenzheng}
|
||||
/>
|
||||
<span className="fontsizecoirlysltwo mt15">未职业认证</span>
|
||||
</div>
|
||||
</div>
|
||||
:occupation=== 2?
|
||||
<div className="yslcentercerlfed edu-txt-center mt30" >
|
||||
<div className="imgysldivone">
|
||||
<img className="yslimgwidthte"
|
||||
src={zhiyerenzheng}
|
||||
/>
|
||||
<span className="fontsizecoirlysltwo mt15">未职业认证</span>
|
||||
</div>
|
||||
</div>
|
||||
:
|
||||
<div className="yslcentercerlfed edu-txt-center mt30" >
|
||||
<div className=" imgysldivone">
|
||||
<img className="yslimgwidthte"
|
||||
src={shimingrenzheng}
|
||||
/>
|
||||
<span className="fontsizecoirlysltwo mt15">未实名认证</span>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div className="clearfix edu-txt-center mt28">
|
||||
|
||||
<a className="task-btn mr60 w90" onClick={()=>this.modalCancel()}>取消</a>
|
||||
<a className="task-btn task-btn-orange w90" onClick={()=>this.setDownload()}>立即认证</a>
|
||||
</div>
|
||||
</div>
|
||||
</Modal>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default Certifiedprofessional;
|
||||
100
public/react/src/modules/modals/DownloadMessage.js
Normal file
100
public/react/src/modules/modals/DownloadMessage.js
Normal file
@@ -0,0 +1,100 @@
|
||||
import React, { Component } from 'react';
|
||||
import {getRandomcode} from 'educoder';
|
||||
import { Modal} from 'antd';
|
||||
|
||||
import axios from 'axios';
|
||||
|
||||
class DownloadMessage extends Component {
|
||||
//没有修改菜世的 最后复原了
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
funmodalsType:false,
|
||||
istype:false,
|
||||
DownloadMessageval:undefined,
|
||||
DownloadType:false
|
||||
}
|
||||
}
|
||||
|
||||
setDownload=()=>{
|
||||
this.modalCancel();
|
||||
window.open(`/messages/${this.props.user.login}/message_detail?target_ids=1`)
|
||||
}
|
||||
modalCancel = () => {
|
||||
this.setState({
|
||||
DownloadType: false,
|
||||
})
|
||||
}
|
||||
|
||||
Downloadcal=()=>{
|
||||
this.setState({
|
||||
DownloadType:false,
|
||||
DownloadMessageval:undefined
|
||||
})
|
||||
}
|
||||
|
||||
/// 确认是否下载
|
||||
confirmysl(url,params){
|
||||
axios.get(url,{
|
||||
params
|
||||
}).then((response) => {
|
||||
if(response.data.status&&response.data.status===-1){
|
||||
|
||||
}else if(response.data.status&&response.data.status===-2){
|
||||
if(response.data.message === "100"){
|
||||
// 已超出文件导出的上限数量(100 ),建议:
|
||||
|
||||
this.setState({
|
||||
DownloadType:true,
|
||||
DownloadMessageval:100
|
||||
})
|
||||
}else {
|
||||
//因附件资料超过500M
|
||||
this.setState({
|
||||
DownloadType:true,
|
||||
DownloadMessageval:500
|
||||
})
|
||||
}
|
||||
}else {
|
||||
this.props.showNotification(`正在下载中`);
|
||||
window.open(getRandomcode("/api"+url), '_blank');
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.log(error)
|
||||
});
|
||||
}
|
||||
render() {
|
||||
|
||||
return(
|
||||
<Modal
|
||||
keyboard={false}
|
||||
title="提示"
|
||||
visible={this.state.DownloadType===undefined?false:this.state.DownloadType}
|
||||
closable={false}
|
||||
footer={null}
|
||||
destroyOnClose={true}
|
||||
centered={true}
|
||||
width="530px"
|
||||
>
|
||||
<div className="task-popup-content">
|
||||
{this.state.DownloadMessageval===500?<p>
|
||||
<p className="task-popup-text-center font-16">因附件资料超过500M,您可以通过检索分批下载</p>
|
||||
<p className="task-popup-text-center font-16 mt5">或者通过微信或者QQ联系管理员辅助您打包下载</p>
|
||||
</p>:this.state.DownloadMessageval===100?
|
||||
<p>
|
||||
<p className="task-popup-text-center font-16">已超出文件导出的上限数量( <span className={"color-orange-tip"}>100</span> ),建议:</p>
|
||||
<p className="task-popup-text-center font-16 mt20">1.通过检索分批次下载</p>
|
||||
<p className="task-popup-text-center font-16 mt5">2.联系管理员辅助下载</p>
|
||||
</p>
|
||||
:""}
|
||||
<div className="clearfix mt30 edu-txt-center">
|
||||
<a className="task-btn mr30" onClick={this.modalCancel}>取消</a>
|
||||
<a className="task-btn task-btn-orange" onClick={this.setDownload}>立即联系</a>
|
||||
</div>
|
||||
</div>
|
||||
</Modal>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default DownloadMessage;
|
||||
50
public/react/src/modules/modals/DownloadMessageysl.js
Normal file
50
public/react/src/modules/modals/DownloadMessageysl.js
Normal file
@@ -0,0 +1,50 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Modal} from 'antd';
|
||||
class DownloadMessageysl extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
funmodalsType:false,
|
||||
istype:false
|
||||
}
|
||||
}
|
||||
|
||||
setDownload=()=>{
|
||||
this.props.modalCancel();
|
||||
window.open(`/messages/${this.props.user.login}/message_detail?target_ids=1`)
|
||||
}
|
||||
render() {
|
||||
|
||||
return(
|
||||
<Modal
|
||||
keyboard={false}
|
||||
title="提示"
|
||||
visible={this.props.modalsType===undefined?false:this.props.modalsType}
|
||||
closable={false}
|
||||
footer={null}
|
||||
destroyOnClose={true}
|
||||
centered={true}
|
||||
width="530px"
|
||||
>
|
||||
<div className="task-popup-content">
|
||||
{this.props.value===500?<p>
|
||||
<p className="task-popup-text-center font-16">因附件资料超过500M,您可以通过检索分批下载</p>
|
||||
<p className="task-popup-text-center font-16 mt5">或者通过微信或者QQ联系管理员辅助您打包下载</p>
|
||||
</p>:this.props.value===100?
|
||||
<p>
|
||||
<p className="task-popup-text-center font-16">已超出文件导出的上限数量( <span className={"color-orange-tip"}>100</span> ),建议:</p>
|
||||
<p className="task-popup-text-center font-16 mt20">1.通过检索分批次下载</p>
|
||||
<p className="task-popup-text-center font-16 mt5">2.联系管理员辅助下载</p>
|
||||
</p>
|
||||
:""}
|
||||
<div className="clearfix mt30 edu-txt-center">
|
||||
<a className="task-btn mr30" onClick={this.props.modalCancel}>取消</a>
|
||||
<a className="task-btn task-btn-orange" onClick={this.setDownload}>立即联系</a>
|
||||
</div>
|
||||
</div>
|
||||
</Modal>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default DownloadMessageysl;
|
||||
69
public/react/src/modules/modals/Jointheclass.js
Normal file
69
public/react/src/modules/modals/Jointheclass.js
Normal file
@@ -0,0 +1,69 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Modal} from 'antd';
|
||||
import axios from 'axios';
|
||||
import Modals from './Modals';
|
||||
//加入精品课堂
|
||||
class Jointheclass extends Component {
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
// console.log("加入精品课堂");
|
||||
// console.log(this.props);
|
||||
let type=this.props.yslJointhe===undefined?false:this.props.yslJointhe;
|
||||
if(type===true){
|
||||
this.setState({
|
||||
Modalstype:true
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
modalCancel=()=>{
|
||||
this.props.ysljoinmodalCancel();
|
||||
};
|
||||
|
||||
setDownload=()=>{
|
||||
let cousestype=this.props.pathcousestypeid;
|
||||
let id=this.props.Pathcourseid===undefined?this.props.match.params.coursesId:this.props.Pathcourseid
|
||||
let url = `/courses/${id}/join_excellent_course.json`;
|
||||
axios.post(url).then((result) => {
|
||||
if(result){
|
||||
if(result.data){
|
||||
if(result.data.status === 0){
|
||||
this.props.showNotification(result.data.message);
|
||||
this.props.ysljoinmodalCanceltwo();
|
||||
if(cousestype===1){
|
||||
window.open(`/courses/${id}/informs`)
|
||||
}
|
||||
}else {
|
||||
this.props.showNotification(result.data.message);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.log(error)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
render() {
|
||||
// console.log("加入精品课堂2");
|
||||
//console.log(this.props.Pathcourseid);
|
||||
return(
|
||||
<Modals
|
||||
modalsType={this.props.yslJointhe===undefined?false:this.props.yslJointhe}
|
||||
modalsTopval={"是否确定加入该课堂?"}
|
||||
modalCancel={()=>this.modalCancel()}
|
||||
modalSave={()=>this.setDownload()}
|
||||
></Modals>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default Jointheclass;
|
||||
|
||||
64
public/react/src/modules/modals/Modals.js
Normal file
64
public/react/src/modules/modals/Modals.js
Normal file
@@ -0,0 +1,64 @@
|
||||
import React, { Component } from 'react';
|
||||
import {getImageUrl} from 'educoder';
|
||||
import { Spin, Icon , Modal} from 'antd';
|
||||
class Modals extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
funmodalsType:false,
|
||||
istype:false
|
||||
}
|
||||
}
|
||||
render() {
|
||||
const antIcons = <Icon type="loading" style={{ fontSize: 24 }} spin />
|
||||
return(
|
||||
<Modal
|
||||
className={this.props.className}
|
||||
keyboard={false}
|
||||
title="提示"
|
||||
visible={this.props.modalsType===undefined?false:this.props.modalsType}
|
||||
closable={false}
|
||||
footer={null}
|
||||
destroyOnClose={true}
|
||||
centered={true}
|
||||
width="530px"
|
||||
>
|
||||
{this.props.modalsType===true?<style>
|
||||
{
|
||||
`
|
||||
body{
|
||||
overflow: hidden !important;
|
||||
}
|
||||
.ant-modal-body {
|
||||
padding: 20px 40px;
|
||||
}
|
||||
.color848282{
|
||||
color:#848282;
|
||||
}
|
||||
`
|
||||
}
|
||||
</style>:""}
|
||||
<Spin indicator={antIcons} spinning={this.props.antIcon===undefined?false:this.props.antIcon} >
|
||||
<div className="task-popup-content">
|
||||
<p className="task-popup-text-center font-16">{this.props.modalsTopval}</p>
|
||||
{this.props.modalsMidval===undefined?"":<p className={this.props.modalstyles?"task-popup-text-center font-16 mt5 color848282":"task-popup-text-center font-16 mt5"}>{this.props.modalsMidval}</p>}
|
||||
<p className={this.props.modalstyles?"task-popup-text-center font-16 mt5 color848282":"task-popup-text-center font-16 mt5"}
|
||||
>{this.props.modalsBottomval}</p>
|
||||
{this.props.loadtype===true?
|
||||
<div className="clearfix edu-txt-center mt20">
|
||||
<a className="task-btn task-btn-orange pop_close" onClick={this.props.modalSave}>知道啦</a>
|
||||
</div>
|
||||
:
|
||||
<div className="clearfix mt30 edu-txt-center">
|
||||
<a className="task-btn mr30" onClick={this.props.modalCancel}>取消</a>
|
||||
<a className="task-btn task-btn-orange" onClick={this.props.modalSave}>{this.props.okText || '确定'}</a>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</Spin>
|
||||
</Modal>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default Modals;
|
||||
236
public/react/src/modules/modals/SendTopics.js
Normal file
236
public/react/src/modules/modals/SendTopics.js
Normal file
@@ -0,0 +1,236 @@
|
||||
import React,{ Component } from "react";
|
||||
import { Modal,Radio,Input,Tooltip,Checkbox,Select, Row,Col ,Spin} from "antd";
|
||||
import axios from 'axios';
|
||||
const { Search } = Input;
|
||||
class SendTopics extends Component{
|
||||
constructor(props){
|
||||
super(props);
|
||||
this.state={
|
||||
courses:[],
|
||||
search:null,
|
||||
Radiolist:undefined,
|
||||
showcheck:false,
|
||||
smallisSpin:false,
|
||||
yslbanksMenu:undefined
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
componentDidMount(){
|
||||
// console.log("SendTopicssssssssssss");
|
||||
// console.log(this.props);
|
||||
let{search}=this.state;
|
||||
this.onupdatalist(search)
|
||||
this.setState({
|
||||
yslbanksMenu:this.props.banksMenu,
|
||||
})
|
||||
}
|
||||
|
||||
onupdatalist=(search)=>{
|
||||
let url="/question_banks/my_courses.json";
|
||||
axios.get(url,{params:{
|
||||
search
|
||||
}
|
||||
}).then((result)=>{
|
||||
this.setState({
|
||||
courses:result.data.courses
|
||||
})
|
||||
}).catch((error)=>{
|
||||
console.log(error);
|
||||
})
|
||||
}
|
||||
|
||||
onSearchChange=(e)=>{
|
||||
this.setState({
|
||||
search:e.target.value
|
||||
})
|
||||
// this.onupdatalist(e.target.value)
|
||||
}
|
||||
|
||||
onSearch=(search)=>{
|
||||
this.onupdatalist(search)
|
||||
}
|
||||
|
||||
|
||||
onChange=(e)=>{
|
||||
console.log("SendTopics");
|
||||
console.log(e);
|
||||
this.setState({
|
||||
Radiolist:e.target.value
|
||||
})
|
||||
}
|
||||
|
||||
submitInfo=()=>{
|
||||
this.setState({
|
||||
smallisSpin:true
|
||||
})
|
||||
let{Radiolist}=this.state;
|
||||
let url=`/question_banks/send_to_course.json`;
|
||||
let object_id=this.props.checkBoxValues;
|
||||
let object_type=this.props.category;
|
||||
if(Radiolist===undefined){
|
||||
this.setState({
|
||||
showcheck:true,
|
||||
smallisSpin:false
|
||||
})
|
||||
}else{
|
||||
axios.post(url,{
|
||||
object_id: object_id,
|
||||
object_type:object_type,
|
||||
course_id:Radiolist
|
||||
}
|
||||
).then((result)=>{
|
||||
this.setState({
|
||||
smallisSpin:false
|
||||
})
|
||||
if(result.data.status===0){
|
||||
this.props.showNotification(result.data.message);
|
||||
this.props.topicscancelmodel();
|
||||
// result.data.task_ids;
|
||||
|
||||
try {
|
||||
this.props.updataslist()
|
||||
}catch (e) {
|
||||
|
||||
}
|
||||
debugger
|
||||
if(this.props.mysendall===true){
|
||||
//详情页面跳过来的
|
||||
try {
|
||||
var rurls="";
|
||||
if(this.state.yslbanksMenu.category==="normal"){
|
||||
//普通作业
|
||||
rurls=`/courses/${this.state.Radiolist}/common_homeworks/${result.data.task_ids}/setting`;
|
||||
}else if(this.state.yslbanksMenu.category==="group"){
|
||||
//分组作业
|
||||
rurls=`/courses/${this.state.Radiolist}/group_homeworks/${result.data.task_ids}/setting`;
|
||||
}else if(this.state.yslbanksMenu.category==="exercise"){
|
||||
// 试卷
|
||||
rurls=`/courses/${this.state.Radiolist}/exercises/${result.data.task_ids}/student_exercise_list?tab=3`;
|
||||
}else if(this.state.yslbanksMenu.category==="poll") {
|
||||
//问卷
|
||||
rurls=`/courses/${this.state.Radiolist}/polls/${result.data.task_ids}/detail?tab=3`
|
||||
}
|
||||
window.open(rurls,'_blank');
|
||||
}catch (e) {
|
||||
|
||||
}
|
||||
}else{
|
||||
//外部多个列表页跳过来的
|
||||
debugger
|
||||
try {
|
||||
var rurls="";
|
||||
if(this.props.category==="normal"){
|
||||
//普通作业
|
||||
rurls=`/courses/${this.state.Radiolist}/common_homeworks/${result.data.category_id}`;
|
||||
}else if(this.props.category==="group"){
|
||||
//分组作业
|
||||
rurls=`/courses/${this.state.Radiolist}/group_homeworks/${result.data.category_id}`;
|
||||
}else if(this.props.category==="exercise"){
|
||||
// 试卷
|
||||
rurls=`/courses/${this.state.Radiolist}/exercises/${result.data.category_id}`;
|
||||
}else if(this.props.category==="poll") {
|
||||
//问卷
|
||||
rurls=`/courses/${this.state.Radiolist}/polls/${result.data.category_id}`
|
||||
}
|
||||
window.open(rurls,'_blank');
|
||||
}catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
this.props.showNotification(result.data.message)
|
||||
}
|
||||
}).catch((error)=>{
|
||||
console.log(error)
|
||||
this.setState({
|
||||
smallisSpin:false
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
render(){
|
||||
let{courses,Radiolist,showcheck,smallisSpin}= this.state;
|
||||
|
||||
const radioStyle = {
|
||||
display: 'block',
|
||||
height: '30px',
|
||||
lineHeight: '30px',
|
||||
};
|
||||
|
||||
return(
|
||||
<div>
|
||||
|
||||
|
||||
<style>
|
||||
{
|
||||
`
|
||||
.ant-modal-body{
|
||||
padding:20px 40px;
|
||||
}
|
||||
.onSearchtopics input{
|
||||
height:40px;
|
||||
}
|
||||
.over221{
|
||||
height:221px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
`
|
||||
}
|
||||
</style>
|
||||
<Modal
|
||||
keyboard={false}
|
||||
title="发送至课堂"
|
||||
visible={this.props.visible}
|
||||
closable={false}
|
||||
footer={null}
|
||||
destroyOnClose={true}
|
||||
width={600}
|
||||
>
|
||||
<div className="newupload_conbox">
|
||||
<div className="mb15 font-14 edu-txt-center color-orange-tip">
|
||||
温馨提示:选择的题将会发送到指定课堂
|
||||
</div>
|
||||
<div className="mb5"
|
||||
// onMouseLeave={this.closeList}
|
||||
>
|
||||
<Search
|
||||
className="mb14 onSearchtopics"
|
||||
placeholder="请输入课堂名称进行搜索"
|
||||
onChange={this.onSearchChange}
|
||||
onSearch={this.onSearch}
|
||||
></Search>
|
||||
</div>
|
||||
<div className="edu-back-skyblue pl15 pr15 clearfix over221 pt5">
|
||||
<Radio.Group onChange={this.onChange} value={Radiolist}>
|
||||
{
|
||||
courses && courses.map((item,key)=>{
|
||||
return(
|
||||
<div className="mt5" key={key}>
|
||||
<Radio style={radioStyle} value={item.course_id} key={item.course_id}>
|
||||
{item.course_name}
|
||||
</Radio>
|
||||
</div>
|
||||
)
|
||||
})
|
||||
}
|
||||
</Radio.Group>
|
||||
|
||||
</div>
|
||||
{showcheck===true?<div className={"color-red mt10"}>请先选择课堂</div>:""}
|
||||
<div className="mt20 clearfix edu-txt-center" >
|
||||
<a onClick={()=>this.props.topicscancelmodel()} className="pop_close task-btn mr30 ">取消</a>
|
||||
<a className="task-btn task-btn-orange" onClick={()=>this.submitInfo()}>确定</a>
|
||||
</div>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
export default SendTopics;
|
||||
82
public/react/src/modules/modals/UpgradeModals.js
Normal file
82
public/react/src/modules/modals/UpgradeModals.js
Normal file
@@ -0,0 +1,82 @@
|
||||
import React, { Component } from 'react';
|
||||
import {getImageUrl} from 'educoder';
|
||||
import { Spin, Icon , Modal} from 'antd';
|
||||
import moment from 'moment';
|
||||
class UpgradeModals extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
system_updates:false
|
||||
}
|
||||
}
|
||||
|
||||
updatasmodals=()=>{
|
||||
let {updata} = this.props;
|
||||
if(updata&&updata.system_update===true){
|
||||
let SystemUpdateEndTime = localStorage.getItem('SystemUpdateEndTime');
|
||||
if(SystemUpdateEndTime===null){
|
||||
this.setState({
|
||||
system_updates:true
|
||||
})
|
||||
}else if(SystemUpdateEndTime===undefined){
|
||||
this.setState({
|
||||
system_updates:true
|
||||
})
|
||||
}else if(moment(SystemUpdateEndTime) < moment(updata.end_time)){
|
||||
this.setState({
|
||||
system_updates:true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.updatasmodals()
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps){
|
||||
// if (prevProps.data!=this.props.updata){
|
||||
// this.updatasmodals()
|
||||
// }
|
||||
}
|
||||
|
||||
setmodalSave=()=>{
|
||||
let {updata}=this.props;
|
||||
localStorage.setItem('SystemUpdateEndTime',updata.end_time);
|
||||
this.setState({
|
||||
system_updates:false
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
render() {
|
||||
// const antIcons = <Icon type="loading" style={{ fontSize: 24 }} spin />
|
||||
{/*<Spin indicator={antIcons} spinning={this.state.system_updates} >*/}
|
||||
|
||||
{/*</Spin>*/}
|
||||
let {system_updates}=this.state;
|
||||
let {updata}=this.props;
|
||||
return(
|
||||
<Modal
|
||||
keyboard={false}
|
||||
title={updata&&updata.subject}
|
||||
visible={system_updates}
|
||||
// visible={this.props.modalsType===undefined?false:this.props.modalsType}
|
||||
closable={false}
|
||||
footer={null}
|
||||
destroyOnClose={true}
|
||||
centered={true}
|
||||
width="530px"
|
||||
>
|
||||
<div className="task-popup-content">
|
||||
<pre className="break-word break-word-firefox">{updata&&updata.system_score}</pre>
|
||||
<div className="clearfix edu-txt-center mt20">
|
||||
<a className="task-btn task-btn-orange pop_close" onClick={()=>this.setmodalSave()}>知道啦</a>
|
||||
</div>
|
||||
</div>
|
||||
</Modal>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default UpgradeModals;
|
||||
38
public/react/src/modules/modals/WordNumberTextarea.css
Normal file
38
public/react/src/modules/modals/WordNumberTextarea.css
Normal file
@@ -0,0 +1,38 @@
|
||||
.WordNumberTextarea {
|
||||
outline: none; /* 去掉输入字符时的默认样式 */
|
||||
appearance:none;
|
||||
-webkit-appearance:none;
|
||||
-moz-appearance:none;
|
||||
background-color: white;
|
||||
text-shadow: none;
|
||||
-webkit-writing-mode: horizontal-tb !important;
|
||||
-webkit-tap-highlight-color:rgba(0,0,0,0);
|
||||
resize:none; /*禁止拉伸*/
|
||||
border: none; /*去掉默认边框*/
|
||||
width: 100%;
|
||||
height:130px;
|
||||
border:none;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.WordNumbernote {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
text-decoration: none;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
height: auto;
|
||||
border: 1px solid rgba(234,234,234,1);
|
||||
border-radius: 0.125rem;
|
||||
margin: 10px 10px 0px 10px;
|
||||
padding: 10px 10px 5px 10px;
|
||||
backgroud:rgba(234,234,234,1);
|
||||
}
|
||||
.WordNumberTextarea-count {
|
||||
display: inline-block;
|
||||
float: right;
|
||||
font-size: 16px;
|
||||
color: #adadad;
|
||||
padding-right: 0.25rem;
|
||||
}
|
||||
23
public/react/src/modules/modals/WordNumberTextarea.js
Normal file
23
public/react/src/modules/modals/WordNumberTextarea.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import React, { Component } from 'react';
|
||||
import './WordNumberTextarea.css';
|
||||
class WordNumberTextarea extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
}
|
||||
render() {
|
||||
return(
|
||||
<div className="WordNumbernote">
|
||||
<textarea
|
||||
placeholder={this.props.placeholder}
|
||||
className="WordNumberTextarea"
|
||||
value={this.props.value}
|
||||
onInput={(e)=>this.props.onInput(e)}
|
||||
maxlength={this.props.maxlength}
|
||||
/>
|
||||
<div className="WordNumberTextarea-count"><span>{this.props.value===undefined||this.props.value===null?0:this.props.value.length}</span>/{this.props.maxlength}</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default WordNumberTextarea;
|
||||
44
public/react/src/modules/modals/certfed.css
Normal file
44
public/react/src/modules/modals/certfed.css
Normal file
@@ -0,0 +1,44 @@
|
||||
.yslcenter
|
||||
{
|
||||
display: flex;
|
||||
justify-content:center;
|
||||
display: flex;
|
||||
flex-direction:column;
|
||||
}
|
||||
.yslcentercerlfed
|
||||
{ display: flex;
|
||||
justify-content:center;
|
||||
display: flex;
|
||||
flex-direction:row;
|
||||
}
|
||||
.fontsizecoirlysl{
|
||||
color: #333333;
|
||||
font-size: 16px;
|
||||
}
|
||||
.fontsizecoirlysltwo{
|
||||
font-size: 14px;
|
||||
color: #979797;
|
||||
}
|
||||
|
||||
.imgysldivone{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.yslimgwidthte{
|
||||
width: 40px;
|
||||
height: 37px;
|
||||
}
|
||||
.mr55{
|
||||
margin-right: 55px;
|
||||
}
|
||||
.mt28{
|
||||
margin-top: 28px;
|
||||
}
|
||||
.w90{
|
||||
width: 90px;
|
||||
}
|
||||
.mr60{
|
||||
margin-right: 60px;
|
||||
}
|
||||
Reference in New Issue
Block a user