Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_newshixunModel
hjm 5 years ago
commit aa3fe4b45b

@ -32,7 +32,7 @@ module.exports = {
// See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s
// devtool: "cheap-module-eval-source-map",
// 开启调试
// devtool: "eval", // 开启调试
devtool: "eval-source-map", // 开启调试
// These are the "entry points" to our application.
// This means they will be the "root" imports that are included in JS bundle.
// The first two entry points enable "hot" CSS and auto-refreshes for JS.

@ -30,7 +30,7 @@ class CoursesListType extends Component {
return(
<span style={{display:'inline-block'}}>
{
typelist===undefined?"":typelist.map((item,key)=>{
typelist===undefined || typelist=== 403 || typelist === 401 || typelist=== 407 || typelist=== 408|| typelist=== 409 || typelist === 500?"":typelist.map((item,key)=>{
return(
<Tooltip placement="bottom" title={tipval} getPopupContainer={()=>document.querySelector('.TabsWarp')} key={key}>
<span key={key}>

@ -32,8 +32,10 @@ class GraduationTasksappraise extends Component{
axios.get(zrl).then((result)=>{
if(result.status===200){
let status=result.data.status;
if(status===undefined || status=== 403 || status === 401 || status=== 407 || status=== 408|| status=== 409 || status === 500||status===-1){
if(result.data.status!=-1){
}else{
this.setState({
firelistdata:result.data,
})

@ -346,24 +346,24 @@ class GraduationTaskssettingapp extends Component{
let {endtimetype}=this.state;
if(types===1){
this.setState({
latetime:newlatetime,
// latetime:newlatetime,
crosscomment:true,
commenttime:newcommenttime,
commenttimeone:newcommenttime,
commenttime:newlatetime,
commenttimeone:newlatetime,
})
}else{
if(endtimetype===true){
this.setState({
crosscomment:true,
commenttime:newcommenttime,
commenttimeone:newcommenttime,
commenttime:newlatetime,
commenttimeone:newlatetime,
})
}else{
this.setState({
end_time:newlatetime,
// end_time:newlatetime,
crosscomment:true,
commenttime:newcommenttime,
commenttimeone:newcommenttime,
commenttime:newlatetime,
commenttimeone:newlatetime,
})
}
}
@ -537,7 +537,7 @@ class GraduationTaskssettingapp extends Component{
if(moment(end_time)<=moment(publish_time)){
this.setState({
endTimetypes:true,
endTimetypesval:"截止时间不能早于发布时间"
endTimetypesval:"截止时间必须晚于发布时间"
})
return
}else{
@ -549,13 +549,13 @@ class GraduationTaskssettingapp extends Component{
if(moment(latetime)<=moment(publish_time)){
this.setState({
latetimetype:true,
latetimetypeval:"结束时间不能早于发布时间"
latetimetypeval:"结束时间必须晚于发布时间"
})
return
}else if(moment(latetime)<=moment(end_time)){
this.setState({
latetimetype:true,
latetimetypeval:"结束时间不能早于截止时间"
latetimetypeval:"结束时间必须晚于截止时间"
})
return
}else{

@ -88,7 +88,7 @@ class GraduationTasks extends Component{
savedelete=()=>{
this.setState({
Modalstype:false,
Modalstype:false,
})
let {checkAllValue,checkBoxValues,search,page,order} = this.state;
// let all_check;
@ -107,9 +107,10 @@ class GraduationTasks extends Component{
if (response.data.status == 0) {
// {"status":1,"message":"删除成功"}
this.fetchAll(search,page,order)
this.props.showNotification(response.data.message);
this.setState({
Modalstype:true,
Modalstopval:response.data.message,
// Modalstype:true,
// Modalstopval:response.data.message,
ModalsBottomval:"",
ModalSave:this.cancelmodel,
Loadtype:true,

@ -2863,7 +2863,7 @@ class PollNew extends Component {
}
</style>
<Input placeholder="请输入问卷标题最大限制60个字符" maxLength="60"
style={{"margin-top": "15px", "text-align": "left"}}
style={{"margin-top": "15px", textAlign: "left"}}
onInput={this.changeTopicName}
readOnly={readOnlys}
autoComplete="off"
@ -2887,7 +2887,7 @@ class PollNew extends Component {
<div style={{"color": "#212121", "font-size": "16px"}}>问卷须知</div>
<TextArea placeholder="请输入本次问卷答题的相关说明最大限制100个字符"
style={{"height": "120px", "margin-top": "15px", "text-align": "left"}}
style={{"height": "120px", "margin-top": "15px", textAlign: "left"}}
maxLength="100"
readOnly={readOnlys}
onInput={this.changeTopicNametwo}
@ -3012,8 +3012,8 @@ class PollNew extends Component {
{item.question.answers === undefined ? "" : item.question.answers.map((items, i) => {
return (
<div className="h20 pt20" style={{"clear": "both"}}>
<Radio value={i} className={"fl"} style={{"text-align": "left",marginTop:"3px"}}></Radio>
<span className={" flex1 "} style={{"text-align": "left","white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word","float": "left","width":"1116px"}} >{items.answer_text}</span>
<Radio value={i} className={"fl"} style={{textAlign: "left",marginTop:"3px"}}></Radio>
<span className={" flex1 "} style={{textAlign: "left","white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word","float": "left","width":"1116px"}} >{items.answer_text}</span>
</div>
)
@ -3029,8 +3029,8 @@ class PollNew extends Component {
{item.question.answers === undefined ? "" : item.question.answers.map((items, i) => {
return (
<div className="mt10 pt20 " style={{"clear": "both"}}>
<Checkbox value={i} key={i} className={"fl"} style={{"text-align": "left"}}></Checkbox>
<span className={" flex1"} style={{"text-align": "left","white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word","float": "left","width":"1120px"}}>{items.answer_text}</span>
<Checkbox value={i} key={i} className={"fl"} style={{textAlign: "left",marginRight:"8px"}}></Checkbox>
<span className={" flex1"} style={{textAlign: "left","white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word","float": "left","width":"1116px"}}>{items.answer_text}</span>
</div>
)
})}
@ -3086,7 +3086,7 @@ class PollNew extends Component {
<p className="df mb20">
<span
className="color-grey-6 mr3 w60 font-16 lineh-40"
style={{"text-align": "center"}}>其它</span>
style={{textAlign: "center"}}>其它</span>
<input
className="mr20 input-flex-40 TextAreainput" disabled
@ -3100,7 +3100,7 @@ class PollNew extends Component {
: ""}
</p>) : (<p className="df mb20">
<span className="color-grey-6 mr10 w60 font-16 lineh-40"
style={{"text-align": "center"}}>选项</span>
style={{textAlign: "center"}}>选项</span>
<TextArea
autosize={{minRows: 1, maxRows: 5}}
@ -3172,7 +3172,7 @@ class PollNew extends Component {
"height": "80%";
"margin-top": "5px";
"margin-left": "5px";
"text-align": "center";
textAlign: "center";
"display": "block";
"opacity": "1";
}
@ -3328,7 +3328,7 @@ class PollNew extends Component {
<p className="df mb20">
<span
className="color-grey-6 mr3 w60 font-16 lineh-40"
style={{"text-align": "center"}}>其它</span>
style={{textAlign: "center"}}>其它</span>
<input
className="mr20 input-flex-40 TextAreainput" disabled
@ -3342,7 +3342,7 @@ class PollNew extends Component {
: ""}
</p>) : (<p className="df mb20">
<span className="color-grey-6 mr10 w60 font-16 lineh-40"
style={{"text-align": "center"}}>选项</span>
style={{textAlign: "center"}}>选项</span>
<TextArea
autosize={{minRows: 1, maxRows: 5}}
@ -3414,7 +3414,7 @@ class PollNew extends Component {
"height": "80%";
"margin-top": "5px";
"margin-left": "5px";
"text-align": "center";
textAlign: "center";
"display": "block";
"opacity": "1";
}
@ -3579,7 +3579,7 @@ class PollNew extends Component {
<p className="df mb20">
<span
className="color-grey-6 mr3 w60 font-16 lineh-40"
style={{"text-align": "center"}}>其它</span>
style={{textAlign: "center"}}>其它</span>
<input
className="mr20 input-flex-40 TextAreainput" disabled
@ -3593,7 +3593,7 @@ class PollNew extends Component {
: ""}
</p>) : (<p className="df mb20">
<span className="color-grey-6 mr10 w60 font-16 lineh-40"
style={{"text-align": "center"}}>选项</span>
style={{textAlign: "center"}}>选项</span>
<TextArea
autosize={{minRows: 1, maxRows: 5}}
@ -3665,7 +3665,7 @@ class PollNew extends Component {
"height": "80%";
"margin-top": "5px";
"margin-left": "5px";
"text-align": "center";
textAlign: "center";
"display": "block";
"opacity": "1";
}

@ -1,88 +1,94 @@
import React, { Component } from 'react';
import React, {Component} from 'react';
import {
Spin,
Pagination,
} from "antd";
import axios from 'axios';
import {getImageUrl,markdownToHTML} from 'educoder';
import {getImageUrl, markdownToHTML} from 'educoder';
import "../css/messagemy.css"
//消息页面
class MessagSub extends Component{
class MessagSub extends Component {
constructor(props) {
super(props);
this.state={
page:1,
limit:10,
typeysl:"",
count:0,
isSpin:false,
data:undefined,
this.state = {
page: 1,
limit: 10,
typeysl: "",
count: 0,
isSpin: false,
data: undefined,
}
}
// 初始化数据
componentDidMount(){
// 初始化数据
componentDidMount() {
// console.log("初始化数据了MessagSub");
// console.log(this.props);
this.getdata("",this.state.page);
this.getdata("", this.state.page);
// this.Messageprivatemessageunreadmessage();
try {
this.props.Mtab(1);
}catch (e) {
} catch (e) {
}
this.props.triggerRef(this)
}
//塞选页数
paginationonChanges=(pageNumber)=>{
paginationonChanges = (pageNumber) => {
this.setState({
page: pageNumber,
})
this.getdata(this.state.typeysl,pageNumber);
this.getdata(this.state.typeysl, pageNumber);
}
//获取数据源
getdata=(types,page)=>{
getdata = (types, page) => {
this.setState({
isSpin:true,
isSpin: true,
})
let{limit}=this.state;
let {limit} = this.state;
let url = `/users/tidings.json`;
axios.get((url),{params:{
type:types,
page:page,
per_page:limit,
}}).then((result) => {
axios.get((url), {
params: {
type: types,
page: page,
per_page: limit,
}
}).then((result) => {
if (result) {
// if (result.data.status === 0) {
this.setState({
page: page,
count: result.data.count,
typeysl: types,
isSpin: false,
data: result.data.tidings === null ? undefined : result.data.tidings === undefined ? undefined : result.data.tidings === [] ? undefined : result.data.tidings === "[]" ? undefined : result.data.tidings.length === 0 ? undefined : result.data.tidings,
})
this.setState({
page: page,
count: result.data.count,
typeysl: types,
isSpin: false,
data: result.data.tidings === null ? undefined : result.data.tidings === undefined ? undefined : result.data.tidings === [] ? undefined : result.data.tidings === "[]" ? undefined : result.data.tidings.length === 0 ? undefined : result.data.tidings,
})
// }
}
}).catch((error) => {
console.log(error);
this.setState({
isSpin:false,
isSpin: false,
})
})
};
getdatas=()=>{
getdatas = () => {
this.setState({
isSpin:true,
isSpin: true,
})
let{typeysl,page,limit}=this.state;
let {typeysl, page, limit} = this.state;
let url = `/users/tidings.json`;
axios.get((url),{params:{
type:typeysl,
page:page,
per_page:limit,
}}).then((result) => {
axios.get((url), {
params: {
type: typeysl,
page: page,
per_page: limit,
}
}).then((result) => {
if (result) {
// if (result.data.status === 0) {
@ -98,172 +104,172 @@ class MessagSub extends Component{
}).catch((error) => {
console.log(error);
this.setState({
isSpin:false,
isSpin: false,
})
})
}
componentWillUnmount(){
componentWillUnmount() {
// 卸载异步操作设置状态
this.setState = (state, callback) => {
return;
}
}
gettourl=(item)=>{
gettourl = (item) => {
switch (item.container_type) {
case "ApplyUserAuthentication" :
if(item.tiding_type==="Apply"){
if(item.auth_type===1){
//系统管理页面
if (item.tiding_type === "Apply") {
if (item.auth_type === 1) {
//系统管理页面
return window.open("/managements/identity_authentication");
}
if(item.auth_type===2){
if (item.auth_type === 2) {
//系统管理页面
return window.open("/managements/professional_authentication")
}
}
if(item.tiding_type ==="System"){
// 账号管理页-认证信息
return window.open("/account/certification")
}
return ;
}
if (item.tiding_type === "System") {
// 账号管理页-认证信息
return window.open("/account/certification")
}
return;
case "CancelUserAuthentication" :
// 账号管理页-认证信息
return window.open("/account/certification")
return window.open("/account/certification")
case "CancelUserProCertification" :
// 账号管理页-认证信息
return window.open("/account/certification")
return window.open("/account/certification")
case "ApplyAddDepartment" :
if(item.tiding_type==="Apply"){
if (item.tiding_type === "Apply") {
//部门审批
return window.open("/managements/depart")
return window.open("/managements/depart")
}
if(item.tiding_type==="System"){
if (item.tiding_type === "System") {
// 账号管理页/account/profile
return window.open("/account/profile")
return window.open("/account/profile")
}
return ;
return;
case "ApplyAddSchools" :
if(item.tiding_type==="Apply"){
if (item.tiding_type === "Apply") {
// 单位审批
return window.open(" /managements/unit")
return window.open(" /managements/unit")
}
if(item.tiding_type==="System"){
if (item.tiding_type === "System") {
// 账号管理页
return window.open("/account/profile")
return window.open("/account/profile")
}
return ;
return;
case "ApplyAction" :
switch (item.parent_container_type) {
case "ApplyShixun" :
if(item.tiding_type==="Apply"){
return window.open("/managements/shixun_authorization")
}
if(item.tiding_type==="System"){
// 实训详情页 :identifier = identifier
return window.open(`/shixuns/${item.identifier}/challenges`)
}
case "ApplySubject" :
if(item.tiding_type==="Apply"){
// 实训课程发布
return window.open("/managements/subject_authorization")
}
if(item.tiding_type==="System"){
// 实践课程详情页 :parent_container_id = parent_container_id
switch (item.parent_container_type) {
case "ApplyShixun" :
if (item.tiding_type === "Apply") {
return window.open("/managements/shixun_authorization")
}
if (item.tiding_type === "System") {
// 实训详情页 :identifier = identifier
return window.open(`/shixuns/${item.identifier}/challenges`)
}
case "ApplySubject" :
if (item.tiding_type === "Apply") {
// 实训课程发布
return window.open("/managements/subject_authorization")
}
if (item.tiding_type === "System") {
// 实践课程详情页 :parent_container_id = parent_container_id
return window.open(`/paths/${item.parent_container_id}`)
}
case "TrialAuthorization" :
if(item.tiding_type==="Apply"){
// 试用授权页面
return window.open("/managements/trial_authorization")
}
if(item.tiding_type==="System"){
// 账号管理页
return window.open("/account/profile")
}
}
return ;
return window.open(`/paths/${item.parent_container_id}`)
}
case "TrialAuthorization" :
if (item.tiding_type === "Apply") {
// 试用授权页面
return window.open("/managements/trial_authorization")
}
if (item.tiding_type === "System") {
// 账号管理页
return window.open("/account/profile")
}
}
return;
case 'JoinCourse' :
// 课堂详情页 :id =
return window.open(`/courses/${item.belong_container_id}/teachers`)
return window.open(`/courses/${item.belong_container_id}/teachers`)
case 'StudentJoinCourse':
// 课堂详情页 :id = container_id
if(item.tiding_type === 'Apply') {
return window.open(`/courses/${item.belong_container_id}/teachers`);
if (item.tiding_type === 'Apply') {
return window.open(`/courses/${item.belong_container_id}/teachers`);
}
if(item.tiding_type === 'System'){
if (item.tiding_type === 'System') {
//教学案例详情 :id = container_id
return window.open(`/courses/${item.belong_container_id}/students`);
return window.open(`/courses/${item.belong_container_id}/students`);
}
case 'DealCourse':
// 课堂详情页 :id = container_id
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.container_id}`)
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.container_id}`)
case 'TeacherJoinCourse':
// 课堂详情页 :id = container_id
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.container_id}`)
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.container_id}`)
case 'Course' :
// 课堂详情页 :id = container_id
if(item.tiding_type==="Delete"){
if (item.tiding_type === "Delete") {
return;
return;
}
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.container_id}`)
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.container_id}`)
case 'ArchiveCourse' :
// 课堂详情页 :id = container_id
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.container_id}`)
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.container_id}`)
case "Shixun" :
return window.open(`/shixuns/${item.identifier}/challenges`)
return window.open(`/shixuns/${item.identifier}/challenges`)
case "Subject" :
// 实践课程详情页 :id = container_id
return window.open(`/paths/${item.container_id}`)
return window.open(`/paths/${item.container_id}`)
case "JournalsForMessage" :
switch (item.parent_container_type) {
case "Principal" :
// 反馈页 :id = parent_container_id
// 不用跳了
return '';
case "HomeworkCommon" :
//学生作业页 homework = parent_container_id
if(item.homework_type==="normal"){
//普通作业
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/question`)
}
if(item.homework_type==="group"){
//分组作业
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/question`)
}
if(item.homework_type==="practice"){
//实训作业
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=1`)
}
return "";
case "GraduationTopic" :
// 毕业目标页 parent_container_id
return window.open(`/courses/${item.belong_container_id}/graduation_topics/${item.parent_container_id}/detail`)
case "StudentWorksScore" :
//学生作业页
if(item.homework_type==="normal"){
//普通作业
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/question`)
}
if(item.homework_type==="group"){
//分组作业
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/question`)
}
if(item.homework_type==="practice"){
//实训作业
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=1`)
}
return "";
}
switch (item.parent_container_type) {
case "Principal" :
// 反馈页 :id = parent_container_id
// 不用跳了
return '';
case "HomeworkCommon" :
//学生作业页 homework = parent_container_id
if (item.homework_type === "normal") {
//普通作业
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/question`)
}
if (item.homework_type === "group") {
//分组作业
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/question`)
}
if (item.homework_type === "practice") {
//实训作业
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=1`)
}
return "";
case "GraduationTopic" :
// 毕业目标页 parent_container_id
return window.open(`/courses/${item.belong_container_id}/graduation_topics/${item.parent_container_id}/detail`)
case "StudentWorksScore" :
//学生作业页
if (item.homework_type === "normal") {
//普通作业
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/question`)
}
if (item.homework_type === "group") {
//分组作业
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/question`)
}
if (item.homework_type === "practice") {
//实训作业
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=1`)
}
return "";
}
case "Memo" :
// 交流问答页 :id = parent_container_id
return window.open(`/forums/${item.parent_container_id}`);
return window.open(`/forums/${item.parent_container_id}`);
case "Message" :
// 交流问答页 :id = parent_container_id
return window.open(`/forums/`);
return window.open(`/forums/`);
case "Watcher" :
// 用户个人中心页 :id = item.trigger_user.login
return window.open(`/users/${item.trigger_user.login}/courses`)
@ -271,7 +277,7 @@ class MessagSub extends Component{
// 这块太复杂 不好处理
return '';
case "Grade" :
//个人中心页 :id = item.trigger_user.login
//个人中心页 :id = item.trigger_user.login
// return window.open(`/users/${item.trigger_user.login}/courses`;
return "";
case "JoinProject" :
@ -282,7 +288,7 @@ class MessagSub extends Component{
return window.open(`/projects/${item.container_id}`)
case 'DealProject':
//项目详情页 :id = container_id
return window.open(`/projects/${item.container_id}`)
return window.open(`/projects/${item.container_id}`)
case 'ManagerJoinProject':
//项目详情页 :id = container_id
return window.open(`/projects/${item.container_id}`)
@ -305,22 +311,22 @@ class MessagSub extends Component{
case "ExerciseScore":
// 课堂-学生试卷详情 :id = container_id :user_id = trigger_user.id
return window.open(` /courses/${item.belong_container_id}/exercises/${item.container_id}/student_exercise_list?tab=0`);
//记得跳评阅页面
//记得跳评阅页面
default :
// 课堂-试卷列表详情 :id = container_id
return window.open(`/courses/${item.belong_container_id}/exercises/${item.container_id}/student_exercise_list?tab=0`);
}
case 'StudentGraduationTopic' :
//课堂-毕业选题详情 :id = parent_container_id
//课堂-毕业选题详情 :id = parent_container_id
return window.open(`/courses/${item.belong_container_id}/graduation_topics/${item.parent_container_id}/detail`)
case 'DealStudentTopicSelect' :
//课堂-毕业选题详情 :id = parent_container_id
//课堂-毕业选题详情 :id = parent_container_id
return window.open(`/courses/${item.belong_container_id}/graduation_topics/${item.parent_container_id}/detail`)
case 'GraduationTask' :
//课堂-毕业任务页 :id = container_id
return window.open(`/courses/${item.belong_container_id}/graduation_tasks/${item.container_id}`)
case "GraduationWork" :
//课堂-毕业xx页 :id = container_id
//课堂-毕业xx页 :id = container_id
return window.open(`/courses/${item.belong_container_id}/graduation_tasks/${item.container_id}`)
case "GraduationWorkScore" :
// 课堂-毕业xx页 :id = parent_container_id
@ -329,70 +335,70 @@ class MessagSub extends Component{
switch (item.parent_container_type) {
case "AnonymousCommentFail" :
// 课堂-作业列表 homework = container_id
if(item.homework_type==="normal"){
if (item.homework_type === "normal") {
//普通作业
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`)
}
if(item.homework_type==="group"){
if (item.homework_type === "group") {
//分组作业
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`)
}
if(item.homework_type==="practice"){
if (item.homework_type === "practice") {
//实训作业
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`)
}
case "HomeworkPublish" :
if(item.homework_type==="normal"){
if (item.homework_type === "normal") {
//普通作业
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`)
}
if(item.homework_type==="group"){
if (item.homework_type === "group") {
//分组作业
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`)
}
if(item.homework_type==="practice"){
if (item.homework_type === "practice") {
//实训作业
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`)
}
case "AnonymousAppeal" :
if(item.homework_type==="normal"){
if (item.homework_type === "normal") {
//普通作业
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`)
}
if(item.homework_type==="group"){
if (item.homework_type === "group") {
//分组作业
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`)
}
if(item.homework_type==="practice"){
if (item.homework_type === "practice") {
//实训作业
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`)
}
default :
// 课堂-作业列表 homework = container_id
if(item.homework_type==="normal"){
if (item.homework_type === "normal") {
//普通作业
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`)
}
if(item.homework_type==="group"){
if (item.homework_type === "group") {
//分组作业
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`)
}
if(item.homework_type==="practice"){
if (item.homework_type === "practice") {
//实训作业
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`)
}
}
case "StudentWork" :
//课堂-作业 :id = container_id
if(item.homework_type==="normal"){
if (item.homework_type === "normal") {
//普通作业
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/${item.container_id}/appraise`)
}
if(item.homework_type==="group"){
if (item.homework_type === "group") {
//分组作业/courses/1208/group_homeworks/22373/1219130/appraise
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/${item.container_id}/appraise`)
}
if(item.homework_type==="practice"){
if (item.homework_type === "practice") {
//实训作业
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`)
}
@ -425,7 +431,7 @@ class MessagSub extends Component{
// //实训作业
// return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`)
// }
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.trigger_user.id}/${item.parent_container_id}/appraise`);
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.trigger_user.id}/${item.parent_container_id}/appraise`);
case "ChallengeWorkScore" :
return '';
case "SendMessage" :
@ -448,174 +454,191 @@ class MessagSub extends Component{
// /managements/library_applies
return window.open(`/managements/library_applies`)
}
if(item.tiding_type === 'System'){
if (item.tiding_type === 'System') {
//教学案例详情 :id = container_id
return window.open(`/moop_cases/${item.container_id}`)
}
case "ProjectPackage" :
if(item.tiding_type==="Destroyed"){
return ;
}
if(item.tiding_type==="Destroyed_end"){
return ;
}else {
if (item.tiding_type === 'Apply') {
///managements/project_package_applies
return window.open(`/managements/project_package_applies`)
if (item.tiding_type === "Destroyed") {
return;
}
// if(item.tiding_type === 'System'){
if (item.tiding_type === "Destroyed_end") {
return;
} else {
if (item.tiding_type === 'Apply') {
///managements/project_package_applies
return window.open(`/managements/project_package_applies`)
}
// if(item.tiding_type === 'System'){
//众包详情 :id = container_id
return window.open(`/crowdsourcing/${item.container_id}`)
// }
// }
}
case "Discuss":
return window.open(`/shixuns/${item.identifier}/shixun_discuss`);
case "Discuss":
return window.open(`/shixuns/${item.identifier}/shixun_discuss`);
case "Video":
if(item.tiding_type==="Apply"){
if (item.tiding_type === "Apply") {
return window.open(`/managements/video_applies`);
}else if(item.tiding_type==="System"){
} else if (item.tiding_type === "System") {
return window.open(`/users/${this.props.current_user.login}/videos`);
}
return '';
case "PublicCourseStart":
return window.open(`/courses/${item.container_id}/informs`);
case "SubjectStartCourse":
case "PublicCourseStart":
return window.open(`/courses/${item.container_id}/informs`);
case "SubjectStartCourse":
return window.open(`/paths/${item.container_id}`);
case "ResubmitStudentWork":
return window.open(`/courses/${item.belong_container_id}/graduation_tasks/${item.container_id}/appraise`);
case "AdjustScore":
//belong_container_id course的id
return window.open(`/courses/${item.belong_container_id}/graduation_tasks/${item.parent_container_id}`);
default :
return window.open("/")
return window.open("/")
}
}
render() {
let{page,limit,typeysl,count,isSpin,data}=this.state;
let {page, limit, typeysl, count, isSpin, data} = this.state;
// console.log("6868686868");
// console.log(data);
return (
<div className="clearfix ml20">
{/*头部筛选数据*/}
<ul className="pl10 ridingNav clearfix edu-back-white">
<li className={typeysl===""?"active":""}><a onClick={(s,i)=>this.getdata("",1)}>全部</a></li>
<div className="clearfix ml20">
{/*头部筛选数据*/}
<ul className="pl10 ridingNav clearfix edu-back-white">
<li className={typeysl === "" ? "active" : ""}><a onClick={(s, i) => this.getdata("", 1)}>全部</a></li>
<li className={typeysl&&typeysl==="course"?"active":""} ><a onClick={(s,i)=>this.getdata("course",1)}>课堂提醒</a></li>
<li className={typeysl && typeysl === "course" ? "active" : ""}><a
onClick={(s, i) => this.getdata("course", 1)}>课堂提醒</a></li>
<li className={typeysl&&typeysl==="project"?"active":""} ><a onClick={(s,i)=>this.getdata("project",1)}>项目提醒</a></li>
<li className={typeysl && typeysl === "project" ? "active" : ""}><a
onClick={(s, i) => this.getdata("project", 1)}>项目提醒</a></li>
<li className={typeysl&&typeysl==="project_package"?"active":""}><a onClick={(s,i)=>this.getdata("project_package",1)}>众包提醒</a></li>
<li className={typeysl && typeysl === "project_package" ? "active" : ""}><a
onClick={(s, i) => this.getdata("project_package", 1)}>众包提醒</a></li>
<li className={typeysl&&typeysl==="interaction"?"active":""}><a onClick={(s,i)=>this.getdata("interaction",1)}>互动提醒</a></li>
<li className={typeysl && typeysl === "interaction" ? "active" : ""}><a
onClick={(s, i) => this.getdata("interaction", 1)}>互动提醒</a></li>
<li className={typeysl&&typeysl==="apply"?"active":""}><a onClick={(s,i)=>this.getdata("apply",1)}>审核</a></li>
<li className={typeysl && typeysl === "apply" ? "active" : ""}><a
onClick={(s, i) => this.getdata("apply", 1)}>审核</a></li>
<li className={typeysl&&typeysl==="notice"?"active":""}><a onClick={(s,i)=>this.getdata("notice",1)}>通知</a></li>
<li className={typeysl && typeysl === "notice" ? "active" : ""}><a
onClick={(s, i) => this.getdata("notice", 1)}>通知</a></li>
</ul>
{/*下面内容页面*/}
<div className="bor-top-greyE mycenter">
{/*这里可以进行数据处理*/}
<div className="myw100baifenbi">
<Spin size="large" className="myw100baifenbi mt10" spinning={isSpin}>
</ul>
{/*下面内容页面*/}
<div className="bor-top-greyE mycenter">
{/*这里可以进行数据处理*/}
<div className="myw100baifenbi">
<Spin size="large" className="myw100baifenbi mt10" spinning={isSpin}>
{
data===undefined?"":data.length===0?
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb20">暂无数据哦~</p>
</div>
:data.map((item,key)=>{
// console.log(data)
// ridinglist-subs
var boolps=true;
if(item.container_type==="PraiseTread"||item.container_type==="Grade"||item.container_type==="ChallengeWorkScore"){
boolps=false;
}
if(item.container_type==="JournalsForMessage"){
if(item.parent_container_type==="Principal"){
boolps=false;
}
if(item.parent_container_type==="HomeworkCommon"){
if(item.homework_type===null||item.homework_type===undefined){
boolps=false;
}
}
}
// if(item.container_type==="HomeworkCommon"){
// if(item.parent_container_type==="AnonymousAppeal"){
// boolps=false;
// }
// }
if(item.container_type==="ProjectPackage"){
if(item.tiding_type==="Destroyed_end"){
boolps=false;
{
data === undefined ? "" : data.length === 0 ?
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb20">暂无数据哦~</p>
</div>
: data.map((item, key) => {
// console.log(data)
// ridinglist-subs
var boolps = true;
if (item.container_type === "PraiseTread" || item.container_type === "Grade" || item.container_type === "ChallengeWorkScore") {
boolps = false;
}
if (item.container_type === "JournalsForMessage") {
if (item.parent_container_type === "Principal") {
boolps = false;
}
if (item.parent_container_type === "HomeworkCommon") {
if (item.homework_type === null || item.homework_type === undefined) {
boolps = false;
}
}
}
if(item.tiding_type==="Destroyed"){
boolps=false;
// if(item.container_type==="HomeworkCommon"){
// if(item.parent_container_type==="AnonymousAppeal"){
// boolps=false;
// }
// }
if (item.container_type === "ProjectPackage") {
if (item.tiding_type === "Destroyed_end") {
boolps = false;
}
if (item.tiding_type === "Destroyed") {
boolps = false;
}
}
if (item.container_type === "Course") {
if (item.tiding_type === "Delete") {
boolps = false;
}
}
}
if(item.container_type==="Course"){
if(item.tiding_type==="Delete"){
boolps=false;
}
}
return(
<div className="pl25 ridinglist edu-back-white" key={key}>
<div className={boolps===true?"ridinglist-sub clearfix df tiding_item":"ridinglist-subs clearfix df tiding_item"} onClick={()=>this.gettourl(item)}>
<img onMouseDown={()=>this.myCome(item)} src={getImageUrl("images/"+item.trigger_user.image_url)} className="radius mr10 fl myimgw48 myimgh48"/>
<div className="fl flex1">
<p>
<a className="mr20 private_message_a" onMouseDown={()=>this.myCome(item)}>{item.trigger_user.name}</a>
<span className="color-grey-c">{item.time}</span>
{item.tiding_type==="Apply"?(
item.status===0?
<span className="edu-filter-btn ml20 edu-filter-btn-red">待处理</span>:""
):""}
{item.tiding_type==="Apply"?(
item.status===1?
<span className="edu-filter-btn ml20 edu-filter-btn-green">已处理</span>:""
):""}
return (
<div className="pl25 ridinglist edu-back-white" key={key}>
<div
className={boolps === true ? "ridinglist-sub clearfix df tiding_item" : "ridinglist-subs clearfix df tiding_item"}
onClick={() => this.gettourl(item)}>
<img onMouseDown={() => this.myCome(item)}
src={getImageUrl("images/" + item.trigger_user.image_url)}
className="radius mr10 fl myimgw48 myimgh48"/>
<div className="fl flex1">
<p>
<a className="mr20 private_message_a"
onMouseDown={() => this.myCome(item)}>{item.trigger_user.name}</a>
<span className="color-grey-c">{item.time}</span>
{item.tiding_type === "Apply" ? (
item.status === 0 ?
<span className="edu-filter-btn ml20 edu-filter-btn-red">待处理</span> : ""
) : ""}
{item.tiding_type === "Apply" ? (
item.status === 1 ?
<span className="edu-filter-btn ml20 edu-filter-btn-green">已处理</span> : ""
) : ""}
</p>
<style>
{
`.yslspansk span{
</p>
<style>
{
`.yslspansk span{
color: #FF9966!important;
}
`
}
</style>
<p className="color-grey-6 yslspansk markdown-body mt10" style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML(item.content).replace(/▁/g, "▁▁▁")}} ></p>
</div>
}
</style>
<p className="color-grey-6 yslspansk markdown-body mt10" style={{wordBreak: "break-word"}}
dangerouslySetInnerHTML={{__html: markdownToHTML(item.content).replace(/▁/g, "▁▁▁")}}></p>
</div>
<span className={item.new_tiding===true?"new-point fr mr40 mt22":""}></span>
</div>
<span className={item.new_tiding === true ? "new-point fr mr40 mt22" : ""}></span>
</div>
</div>
)
})}
</Spin>
</div>
)
})}
</Spin>
{/*页数*/}
{ data===undefined?""
:
(count>10?
<div style={{textAlign: "center"}} className="new_expand mt10">
<div className="edu-txt-center mt30">
<Pagination showQuickJumper current={page}
onChange={this.paginationonChanges} pageSize={limit}
total={count}></Pagination>
</div>
</div>:""
)
{/*页数*/}
{data === undefined ? ""
:
(count > 10 ?
<div style={{textAlign: "center"}} className="new_expand mt10">
<div className="edu-txt-center mt30">
<Pagination showQuickJumper current={page}
onChange={this.paginationonChanges} pageSize={limit}
total={count}></Pagination>
</div>
</div> : ""
)
}
</div>
}
</div>
</div>
</div>
</div>
</div>
)
}
}
export default MessagSub;

@ -79,3 +79,10 @@
margin-top: 43px;
}
.mb120{
margin-bottom: 120px !important;
}
.mb80{
margin-bottom: 80px !important;
}

@ -372,7 +372,7 @@ class DetailTop extends Component{
return(
<div className={this.props.courses===undefined||this.props.courses.length===0?"subhead":applypath===false?"subhead mb70":this.state.MenuItemskey===this.props.courses.length?"subhead mb100":"subhead mb70"}>
<div className={this.props.courses===undefined?"subhead":this.props.courses.length===0?applypath===true?"subhead mb100":"subhead":applypath===false?detailInfoList.name.length>40?"subhead mb100":"subhead mb70":this.state.MenuItemskey===this.props.courses.length?"subhead mb120":detailInfoList.name.length>40?"subhead mb100":"subhead mb80"}>
{AccountProfiletype===true?<AccountProfile
hideAccountProfile={()=>this.hideAccountProfile()}
{...this.props}
@ -390,10 +390,24 @@ class DetailTop extends Component{
</Modals>
{this.state.yslJointhe===true?<Jointheclass {...this.props} {...this.state} ysljoinmodalCancel={()=>this.ysljoinmodalCancel()} ysljoinmodalCanceltwo={()=>this.ysljoinmodalCanceltwo(this.state.MenuItemskey)}></Jointheclass>:""}
{this.state.OpenCourseTypes===true?<OpenCourse {...this.props} {...this.state} OpenCourseCancel={()=>this.OpenCourseCancel()}/>:""}
<style>
{
`
.subhead_content{
position: relative;
}
.userNavs{
position: absolute;
width: 1200px;
}
`
}
</style>
{
detailInfoList &&
<div className={this.props.courses===undefined?"subhead_content":this.props.courses.length===0?"subhead_content pt40":"subhead_content pt100"}>
<div className={this.props.courses===undefined?"subhead_content":this.props.courses.length===0?"subhead_content pt40":"subhead_content "}>
<div className="font-28 color-white clearfix">
{/*<Tooltip placement="bottom" title={detailInfoList.name.length>27?detailInfoList.name:""}>*/}

@ -621,7 +621,10 @@ class PathDetailIndex extends Component{
{/*}*/}
</p>
<div className="clearfix">
<p className="color-grey-9 font-12 fl"><span className="mr10">{item.school}</span><span>{item.identity}</span></p>
<p className="color-grey-9 font-12 fl">
<span className="mr10">{item.school}</span>
{/*<span>{item.identity}</span>*/}
</p>
</div>
</div>
</div>
@ -645,7 +648,9 @@ class PathDetailIndex extends Component{
}
</p>
<div className="clearfix">
<p className="color-grey-9 font-12 fl"><span className="mr10">{item.school}</span><span>{item.identity}</span></p>
<p className="color-grey-9 font-12 fl"><span className="mr10">{item.school}</span>
{/*<span>{item.identity}</span>*/}
</p>
</div>
{
detailInfoList===undefined?"":detailInfoList.allow_add_member===true? <div>
@ -674,7 +679,9 @@ class PathDetailIndex extends Component{
{/*}*/}
</p>
<div className="clearfix">
<p className="color-grey-9 font-12 fl"><span className="mr10">{item.school}</span><span>{item.identity}</span></p>
<p className="color-grey-9 font-12 fl"><span className="mr10">{item.school}</span>
{/*<span>{item.identity}</span>*/}
</p>
</div>
</div>
</div>

@ -43,10 +43,10 @@ class InfosBanner extends Component{
<div className="fl">
<p className="clearfix mt20">
<span className="username task-hide" style={{"maxWidth":'370px'}}>{data && data.name}</span>
{
data && is_current == false && data.identity =="学生" ? "" :
<span className="userpost"><label>{data && data.identity}</label></span>
}
{/*{*/}
{/*data && is_current == false && data.identity =="学生" ? "" : */}
{/*<span className="userpost"><label>{data && data.identity}</label></span>*/}
{/*}*/}
</p>
<p className="mt15">
<Tooltip placement='bottom' title={ data && data.professional_certification ?"已职业认证":"未职业认证"}>

Loading…
Cancel
Save