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

dev_aliyun_beta
杨树林 6 years ago
commit 72fa9c2afb

@ -416,7 +416,7 @@ class ApplicationController < ActionController::Base
# 实训主类别列表,自带描述
def shixun_main_type
list = []
mirrors = MirrorRepository.select([:id, :type_name]).published_main_mirror
mirrors = MirrorRepository.select([:id, :type_name, :description]).published_main_mirror
mirrors.try(:each) do |mirror|
list << {id: mirror.id, type_name: mirror.type_name, description: mirror.try(:description)}
end

@ -274,7 +274,7 @@ class GraduationWorksController < ApplicationController
@is_author = @work.user_id == current_user.id
@work_members = @task.task_type == 1 ? [] : @task.graduation_works.where.not(user_id: @work.user_id).
where(group_id: @work.group_id).includes(:user)
@attachments = @work.attachments.where.not(attachtype: 7)
@attachments = @work.attachments.where("attachtype != 7 or attachtype is null")
end
def comment_list

@ -450,7 +450,7 @@ class SubjectsController < ApplicationController
@time = 0
@user_tags = []
else
pass_challenge_ids = pass_games.map(&:challenge_id)
pass_challenge_ids = pass_games.map(&:challenge_id).uniq # 按道理是不用去重的,但是历史数据与重复
subject_challenge_count = @subject.shixuns.sum(:challenges_count)
# 用户通关获得的标签
@user_tags = ChallengeTag.where(challenge_id: pass_challenge_ids).pluck(:name)

@ -31,15 +31,16 @@ class WorkDetailPageHeader extends Component{
}
goback = () => {
// let workId=this.props.match.params.workId;
//
// if ( window.location.pathname.indexOf('appraise') == -1) {
// let category_id= this.props.category.category_id;
// this.props.toListPage(this.props.match.params, category_id)
// } else {
// this.props.toWorkListPage(this.props.match.params, this.props.match.params.category_id)
// }
this.props.history.goBack()
let workId=this.props.match.params.workId;
if ( window.location.pathname.indexOf('appraise') == -1) {
let category_id= this.props.category.category_id;
this.props.toListPage(this.props.match.params, category_id)
} else {
this.props.toWorkListPage(this.props.match.params, workId)
// this.props.match.params.category_id
}
// this.props.history.goBack()
}
// 补交附件
Cancelvisible=()=>{

@ -3,7 +3,7 @@ import React, { Component } from 'react';
import MonacoEditor from 'react-monaco-editor';
//MonacoDiffEditor 对比模式
import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal,Icon,DatePicker,Breadcrumb,Upload,Button,notification} from 'antd';
import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal,Icon,DatePicker,Breadcrumb,Upload,Button,notification, Tooltip} from 'antd';
// import "antd/dist/antd.css";
@ -1607,9 +1607,12 @@ export default class TPMsettings extends Component {
{
settingsData === undefined ? "" : settingsData.shixun.main_type.map((item, key) => {
return(
<Option value={item.id} key={key} title={item.description} >{item.type_name}</Option>
return (
<Option value={item.id} key={key} >
<Tooltip placement="right" title={item.description} >
{item.type_name}
</Tooltip>
</Option>
)
})
}

@ -4,7 +4,7 @@ import {TPMIndexHOC} from '../TPMIndexHOC';
import {SnackbarHOC,appendFileSizeToUploadFileAll} from 'educoder';
import {Input, Select, Radio, Checkbox, Modal, Icon, DatePicker,Upload,Button,message,Form,notification} from 'antd';
import {Input, Select, Radio, Checkbox, Modal, Icon, DatePicker,Upload,Button,message,Form,notification,Tooltip} from 'antd';
// import "antd/dist/antd.css";
@ -993,9 +993,11 @@ class Newshixuns extends Component {
{
newshixunlist === undefined ? "" : newshixunlist.main_type.map((item, key) => {
return (
<Option value={item.id} key={key}>{item.type_name}</Option>
<Option value={item.id} key={key} >
<Tooltip placement="right" title={item.description} >
{item.type_name}
</Tooltip>
</Option>
)
})
}

Loading…
Cancel
Save