dev_forum
杨树明 6 years ago
parent e0668cea7c
commit 06367bf257

@ -1,7 +1,7 @@
import React,{Component} from "React"; import React,{Component} from "React";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import { WordsBtn } from 'educoder'; import { WordsBtn,markdownToHTML } from 'educoder';
import axios from 'axios'; import axios from 'axios';
import moment from 'moment'; import moment from 'moment';
import Modals from '../../../modals/Modals'; import Modals from '../../../modals/Modals';
@ -205,7 +205,7 @@ class GraduationTasksappraise extends Component{
</div> </div>
<div className={"ml20"}> <div className={"ml20"}>
{datalist&&datalist.description} <div dangerouslySetInnerHTML={{__html: markdownToHTML(datalist&&datalist.description).replace(/▁/g,"▁▁▁")}}></div>
</div> </div>
{/*<div className={"color-grey-6 h20 ml20"}>*/} {/*<div className={"color-grey-6 h20 ml20"}>*/}

@ -111,11 +111,11 @@ class GraduationTaskssettingapp extends Component{
max_nums: result.data.max_num, max_nums: result.data.max_num,
task_type: result.data.task_type, task_type: result.data.task_type,
baseonproject: result.data.base_on_project, baseonproject: result.data.base_on_project,
publish_time:moment(moment(handleDateString(result.data.publish_time))).format("YYYY-MM-DD HH:mm"), publish_time:result.data.publish_time===null?"":moment(moment(handleDateString(result.data.publish_time))).format("YYYY-MM-DD HH:mm"),
end_time:moment(moment(handleDateString(result.data.end_time))).format("YYYY-MM-DD HH:mm"), end_time:result.data.end_time===null?"":moment(moment(handleDateString(result.data.end_time))).format("YYYY-MM-DD HH:mm"),
allowlate: result.data.allow_late, allowlate: result.data.allow_late,
latepenalty: result.data.late_penalty, latepenalty: result.data.late_penalty,
latetime:moment(moment(handleDateString(result.data.late_time))).format("YYYY-MM-DD HH:mm"), latetime:result.data.late_time===null?"":moment(moment(handleDateString(result.data.late_time))).format("YYYY-MM-DD HH:mm"),
crosscomment: result.data.cross_comment, crosscomment: result.data.cross_comment,
taskid: result.data.id, taskid: result.data.id,
taskname: result.data.task_name, taskname: result.data.task_name,
@ -128,7 +128,7 @@ class GraduationTaskssettingapp extends Component{
hasproject: result.data.has_project, hasproject: result.data.has_project,
hascommit: result.data.has_commit, hascommit: result.data.has_commit,
assigngroups: assigngroups, assigngroups: assigngroups,
commenttime:moment(moment(handleDateString(result.data.comment_time))).format("YYYY-MM-DD HH:mm"), commenttime:result.data.comment_time===null?"":moment(moment(handleDateString(result.data.comment_time))).format("YYYY-MM-DD HH:mm"),
task_status: result.data.task_status task_status: result.data.task_status
}) })
} }

@ -8,7 +8,7 @@ import PropTypes from 'prop-types';
import classNames from 'classnames'; import classNames from 'classnames';
import { getImageUrl } from 'educoder' import { getImageUrl ,markdownToHTML} from 'educoder'
import { CircularProgress } from 'material-ui/Progress'; import { CircularProgress } from 'material-ui/Progress';
@ -250,9 +250,7 @@ class Challenges extends Component {
id="challenge_editorMd_description"> id="challenge_editorMd_description">
<p id="ReactMarkdown" style={{overflow:'hidden'}}> <p id="ReactMarkdown" style={{overflow:'hidden'}}>
{ChallengesDataList === undefined ? "" :ChallengesDataList.description===null?"": {ChallengesDataList === undefined ? "" :ChallengesDataList.description===null?"":
<textarea> <div dangerouslySetInnerHTML={{__html: markdownToHTML(ChallengesDataList.description).replace(/▁/g,"▁▁▁")}}></div>
{ChallengesDataList.description}
</textarea>
} }
</p> </p>

Loading…
Cancel
Save