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

dev_cs
杨树林 6 years ago
commit 5161462faf

@ -51,7 +51,8 @@ class CommonsController < ApplicationController
200
end
when 'journals_for_message'
if current_user.course_identity(@object.jour.course) >= Course::STUDENT && @object.user != current_user
course = @object.jour&.course || @object.jour&.student_work&.homework_common&.course
if current_user.course_identity(course) >= Course::STUDENT && @object.user != current_user
403
else
200

@ -1,6 +1,6 @@
class StudentWorksScore < ApplicationRecord
#appeal_status: 0正常1申诉中2撤销申诉3申诉成功4申诉被拒绝5申诉失效
belongs_to :student_work
belongs_to :student_work
belongs_to :user
has_many :journals_for_messages, -> { order('created_on desc') }, as: :jour, dependent: :destroy
has_one :student_works_scores_appeal, dependent: :destroy

@ -346,7 +346,7 @@ class User < ApplicationRecord
elsif business?
Course::BUSINESS
else
role = course.course_members.find_by(user_id: id, is_active: 1)&.role
role = course&.course_members&.find_by(user_id: id, is_active: 1)&.role
case role
when nil then Course::NORMAL
when 'CREATOR' then Course::CREATOR

@ -9,13 +9,13 @@ wb = xlsx_package.workbook
wb.styles do |style|
title_style = style.add_style(sz: 16, height: 20, b: true)
ec_year_style = style.add_style(sz: 10, height: 14)
label_style = style.add_style(sz: 11, b: true, bg_color: '90EE90', alignment: { horizontal: :center }, border: { style: :thin, color: '000000' })
label_style = style.add_style(sz: 11, b: true, bg_color: '90EE90', alignment: { horizontal: :center, vertical: :center }, border: { style: :thin, color: '000000' })
content_style = style.add_style(sz: 11, height: 16, border: { style: :thin, color: '000000' })
tip_style = style.add_style(sz: 11, height: 16, color: 'FFA07A')
tip_style = style.add_style(sz: 11, height: 16, color: Axlsx::Color.new(rgb: 'FFFFA07A'))
wb.add_worksheet(:name => '课程体系对毕业要求的支撑') do |sheet|
sheet.add_row ['课程体系VS毕业要求'], style: title_style
sheet.merge_cells wb.rows.first.cells[(1..(3 + max_support_length - 1))]
sheet.merge_cells sheet.rows.first.cells[(1..(3 + max_support_length - 1))]
sheet.add_row []
@ -25,8 +25,8 @@ wb.styles do |style|
sheet.add_row ['注:有对应关系的课程名称下方为其权重系数,一个指标点的权重系数之和必须等于1'], style: tip_style
sheet.add_row ['注:“★” 表示关联度高']
sheet.merge_cells wb.rows[5].cells[(1..(3 + max_support_length - 1))]
sheet.merge_cells wb.rows[6].cells[(1..(3 + max_support_length - 1))]
sheet.merge_cells sheet.rows[5].cells[(1..(3 + max_support_length - 1))]
sheet.merge_cells sheet.rows[6].cells[(1..(3 + max_support_length - 1))]
sheet.add_row []
@ -34,9 +34,9 @@ wb.styles do |style|
data[last_column_index] = '课程数量'
sheet.add_row data, style: label_style
course_columns = max_support_length.times.map { |i| "课程#{i + 1}" }
sheet.add_row %w('一级 二级') + course_columns + ['∑目标值'], style: label_style
sheet.add_row %w(一级 二级) + course_columns + ['∑目标值'], style: label_style
sheet.merge_cells("A9:B9")
sheet.merge_cells wb.rows[8].cells[(3..(3 + max_support_length - 1))]
# sheet.merge_cells sheet.rows[8].cells[(3..(3 + max_support_length - 1))]
current_row = 11
graduation_subitems.group_by(&:ec_graduation_requirement).each do |requirement, items|
@ -61,11 +61,11 @@ wb.styles do |style|
sheet.add_row course_data, style: styles
sheet.add_row weight_data, style: styles
sheet.merge_cells("B#{current_row - 1}:B#{current_row}")
sheet.merge_cells("B#{current_row}:B#{current_row + 1}")
current_row += 2
end
sheet.merge_cells("A#{start_row - 1}:B#{current_row - 1}")
sheet.merge_cells("A#{start_row}:A#{current_row - 1}")
end
end
end

@ -3048,7 +3048,7 @@ a.singlepublishtwo{
/*工程认证*/
/*首页*/
.authMainImg{width: 100%;height: 240px;background:url("/images/educoder/auth/banner1.jpg") no-repeat top center;background-size: 100% 100%;justify-content: center;align-items: center;display: -webkit-flex;}
.ListTableLine>p,.ListTableLine>.ListTableTitle{padding: 0px 30px;background-color: #F5F5F5;line-height: 40px;height: 56px;padding-top: 8px;box-sizing: border-box;}
.ListTableLine>p,.ListTableLine>.ListTableTitle{margin-bottom: 0px;padding: 0px 30px;background-color: #F5F5F5;line-height: 40px;height: 56px;padding-top: 8px;box-sizing: border-box;}
.ListTableLine>p span,.ListTableTitle span{float: left;color: #666;box-sizing: border-box}
.ListTableLine li{min-height: 48px;padding: 10px 0px;box-sizing: border-box;margin:0px 30px;border-bottom: 1px solid #eaeaea;}
.ListTableLine li>span{float: left;box-sizing: border-box;}

@ -579,7 +579,7 @@ class CourseSupports extends Component {
let ismidbox={width:123.82*max_support_count+"px",margin:'0px 0px'};
console.log(this.props.year&&this.props.year.can_manager)
// console.log(this.props.year&&this.props.year.can_manager)
return (
<div className="newMain clearfix">
<Modal
@ -623,8 +623,8 @@ class CourseSupports extends Component {
</div>
<div className="padding20-30" id="training_objective_contents">
<span className="fl SystemParameters" >毕业要求指标点<a href={data.subitems_url}><span className="Systemnum">{data.count}</span></a></span>
<span className="fl ml20 SystemParameters">课程体系<a href={data.course_url}><span className="Systemnum">{data.course_count}</span></a></span>
<span className="fl SystemParameters" >毕业要求指标点<Link to={`/ecs/major_schools/${this.props.match.params.major_school_id}/years/${this.props.match.params.ec_year_id}/graduation_requirement`}><span className="Systemnum">{data.count}</span></Link></span>
<span className="fl ml20 SystemParameters">课程体系<Link to={`/ecs/major_schools/${this.props.match.params.major_school_id}/years/${this.props.match.params.ec_year_id}/courses/ec_course_support_setting/1`}><span className="Systemnum">{data.course_count}</span></Link></span>
</div>
</div>
@ -633,7 +633,7 @@ class CourseSupports extends Component {
<p className="clearfix" style={toptiebox}>
<span className="color-666 finishtarget">毕业要求指标点</span>
{list(max_support_count<5||max_support_count===undefined?5:max_support_count)}
{data.graduation_subitems===undefined?"":list(max_support_count<5||max_support_count===undefined?5:max_support_count)}
<span className="column-1 operationright color-666"
style={{
paddingLeft: '28px'

@ -109,7 +109,15 @@ class ShixunsHome extends Component {
homedatalistreps.push(homedatalist.reps[homedatalist.reps.length-i-1])
}
}
const MyRate = ({ defaultValue, ...rest }) => {
let myValue = defaultValue;
console.log(myValue-Math.floor(myValue))
// if (myValue < Math.ceil(myValue)) {
// myValue = Math.floor(myValue) + 0.5;
// }
return <Rating {...rest} value={myValue} />;
};
return (
<div className="newMain clearfix backFAFAFA shixunsHome">
{this.state.updata===undefined?"":<UpgradeModals
@ -343,7 +351,7 @@ class ShixunsHome extends Component {
<p className="clearfix mt8 ml-3">
<span className="rateYoStar fl" style={{padding: '0px',height: '20px',lineHeight: '19px',cursor: 'default'}} title="">
<Rating key={key} value={item.score_info===null?5:item.score_info} disabled allowHalf />
<MyRate key={key} allowHalf defaultValue={item.score_info===null?5:item.score_info} disabled/>
</span>
<span className="fl ml25 font-12 color-grey-9 lineh-12 mt4">{item.score_info===null?"5分":item.score_info+"分"}</span>
</p>

@ -8,7 +8,7 @@ import PropTypes from 'prop-types';
import { Rating ,Progress} from "@icedesign/base";
import {Modal,Input,Radio,Pagination,message,Spin,Icon,Tooltip} from 'antd';
import {Modal,Input,Radio,Pagination,message,Spin,Icon,Tooltip,Rate} from 'antd';
import AccountProfile from"../user/AccountProfile";
@ -569,6 +569,15 @@ class TPMBanner extends Component {
};
const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />;
const MyRate = ({ defaultValue, ...rest }) => {
let myValue = defaultValue;
console.log(myValue-Math.floor(myValue))
// if (myValue < Math.ceil(myValue)) {
// myValue = Math.floor(myValue) + 0.5;
// }
return <Rating {...rest} value={myValue} />;
};
return (
shixunsDetails===undefined?"":
@ -607,7 +616,22 @@ class TPMBanner extends Component {
</p>
<div className="clearfix mt50">
<ul className="fl color-grey-c pathInfo">
{/*<style>*/}
{/*{*/}
{/*`*/}
{/*.anticon-star{*/}
{/*font-size:14px;*/}
{/*}*/}
{/*.pathInfo{*/}
{/*margin-right:-5px;*/}
{/*}*/}
{/*.ant-rate{*/}
{/*color: #FFA800;*/}
{/*}*/}
{/*`*/}
{/*}*/}
{/*</style>*/}
<ul className="fl color-grey-c pathInfo" >
<li>
<span>学习人数</span>
<span className="mt10">{shixunsDetails.stu_num}</span>
@ -624,11 +648,11 @@ class TPMBanner extends Component {
</ul>
<div className="pr fl" id="commentsStar" onMouseOver={()=>this.showonMouseOver()} onMouseOut={()=>this.hideonMouseOut()}>
<div className={"color-grey-c mb7"} style={{color: "#Fff",textAlign: "center"}}>学员评分</div>
<div className={"color-grey-c ml15"} style={{color: "#Fff",textAlign: "center"}}>学员评分</div>
<div className="rateYo">
<Rating value={star_info[0]} disabled allowHalf/>
<MyRate allowHalf defaultValue={star_info[0]} disabled/>
</div>
<div id="ratePanel" className="showratePanel" style={{"width":"512px"}} onMouseOut={()=>this.hideonMouseOut()}>
<div id="ratePanel" className="showratePanel" style={{"width":"530px"}} onMouseOut={()=>this.hideonMouseOut()}>
<div className="pr">
<span className="rateTrangle"></span>
<div className="pr clearfix ratePanelContent" style={{height: '177px'}}>
@ -639,16 +663,16 @@ class TPMBanner extends Component {
<span className="displayblock">总评分</span>
<div className="rateYo">
{showradios === true ?
<Rating value={star_info[0]} allowHalf/>
<MyRate allowHalf defaultValue={star_info[0]} disabled/>
: ""}
</div>
</div>
</div>
<div className="fr width360">
<div className="fr">
<div className="clearfix">
<div className="rateYo fl mt3">
{showradios === true ?
<Rating value={5} disabled allowHalf/>
<MyRate allowHalf defaultValue={5} disabled/>
: ""}
</div>
<Progress percent={star_infos[1]} showInfo={false}></Progress>
@ -657,7 +681,7 @@ class TPMBanner extends Component {
<div className="clearfix">
<div className="rateYo fl mt3">
{showradios === true ?
<Rating value={4} disabled allowHalf/>
<MyRate allowHalf defaultValue={4} disabled/>
: ""}
</div>
<Progress percent={star_infos[2]} showInfo={false}></Progress>
@ -666,7 +690,7 @@ class TPMBanner extends Component {
<div className="clearfix">
<div className="rateYo fl mt3">
{showradios === true ?
<Rating value={3} disabled allowHalf/>
<MyRate allowHalf defaultValue={3} disabled/>
: ""}
</div>
<Progress percent={star_infos[3]} showInfo={false}></Progress>
@ -675,7 +699,7 @@ class TPMBanner extends Component {
<div className="clearfix">
<div className="rateYo fl mt3">
{showradios === true ?
<Rating value={2} disabled allowHalf/>
<MyRate allowHalf defaultValue={2} disabled/>
: ""}
</div>
<Progress percent={star_infos[4]} showInfo={false}></Progress>
@ -684,7 +708,7 @@ class TPMBanner extends Component {
<div className="clearfix">
<div className="rateYo fl mt3">
{showradios === true ?
<Rating value={1} disabled allowHalf/>
<MyRate allowHalf defaultValue={1} disabled/>
: ""}
</div>
<Progress percent={star_infos[5]} showInfo={false}></Progress>

@ -88,7 +88,15 @@ export default class TPMFork_listComponent extends Component {
let {shixuns, total_count, shixunsID, Forkvisible, Forkcurrent} = this.state;
const MyRate = ({ defaultValue, ...rest }) => {
let myValue = defaultValue;
console.log(myValue-Math.floor(myValue))
// if (myValue < Math.ceil(myValue)) {
// myValue = Math.floor(myValue) + 0.5;
// }
return <Rating {...rest} value={myValue} />;
};
return (
<React.Fragment>
<div className="educontent mb20">
@ -141,9 +149,9 @@ export default class TPMFork_listComponent extends Component {
</p>
<p className="clearfix mt8 ml-3">
<span className="rateYoStar fl" style={{padding: '0px',height: '20px',lineHeight: '19px',cursor: 'default'}} title="">
<Rating key={key} value={item.score_info===null?5:item.score_info} disabled allowHalf />
</span>
<span className="rateYoStar fl" style={{padding: '0px',height: '20px',lineHeight: '19px',cursor: 'default'}} title="">
<MyRate key={key} allowHalf defaultValue={item.score_info===null?5:item.score_info} disabled/>
</span>
<span className="fl ml25 font-12 color-grey-9 lineh-12 mt4">{item.score_info===null?"5分":item.score_info+"分"}</span>
</p>

@ -1,47 +1,47 @@
.tpmComment .-fit {
position: inherit;
}
.tpmComment .rc-pagination {
margin-left: auto;
margin-right: auto;
margin-top: 12px;
margin-bottom: 20px;
}
.tpmComment .paginationSection {
background: #FAFAFA;
}
.tpmComment .comment_item_cont.df.clearfix:nth-last-child(1) {
border-bottom: none;
}
/*.tpmComment .fl.edu-back-white {*/
/*min-height: 600px;*/
/*}*/
.user_watch_btn {
cursor: pointer;
}
/*md编辑器*/
.tpmComment .commentItemMDEditor a.task-btn {
background: #4cacff!important;
margin-right: 16px;
margin-top: 16px;
}
/* md编辑器 resizeBar*/
.tpmComment .commentItemMDEditor .editor__resize {
transform: translateX(-176%)
}
#ratePanel > div > div > div.fr div.rateYo.fl.mt3 {
height: 20px;
line-height: 20px;
cursor: default;
width: 90px;
}
.tpmComment .icon-jiangli {
/* margin-top: 2px; */
.tpmComment .-fit {
position: inherit;
}
.tpmComment .rc-pagination {
margin-left: auto;
margin-right: auto;
margin-top: 12px;
margin-bottom: 20px;
}
.tpmComment .paginationSection {
background: #FAFAFA;
}
.tpmComment .comment_item_cont.df.clearfix:nth-last-child(1) {
border-bottom: none;
}
/*.tpmComment .fl.edu-back-white {*/
/*min-height: 600px;*/
/*}*/
.user_watch_btn {
cursor: pointer;
}
/*md编辑器*/
.tpmComment .commentItemMDEditor a.task-btn {
background: #4cacff!important;
margin-right: 16px;
margin-top: 16px;
}
/* md编辑器 resizeBar*/
.tpmComment .commentItemMDEditor .editor__resize {
transform: translateX(-176%)
}
#ratePanel > div > div > div.fr div.rateYo.fl.mt3 {
height: 20px;
line-height: 20px;
cursor: default;
width: 110px;
}
.tpmComment .icon-jiangli {
/* margin-top: 2px; */
}

@ -11,7 +11,7 @@ import { Rating ,Pagination} from "@icedesign/base";
import {getImageUrl,setImagesUrl, toPath} from 'educoder';
import { Spin,Icon,Tooltip } from 'antd';
import { Spin,Icon,Tooltip ,Rate} from 'antd';
import './shixunCss/shixunCard.css';
@ -46,6 +46,15 @@ class ShixunCard extends Component {
render() {
let {middleshixundata, pagination, typepvisible, pages, totalcount} = this.props;
const MyRate = ({ defaultValue, ...rest }) => {
let myValue = defaultValue;
console.log(myValue-Math.floor(myValue))
// if (myValue < Math.ceil(myValue)) {
// myValue = Math.floor(myValue) + 0.5;
// }
return <Rating {...rest} value={myValue} />;
};
return (
<div className="educontent mb80">
@ -69,10 +78,11 @@ class ShixunCard extends Component {
</div>
<div className="mt10 mb20 clearfix"
style={{display: middleshixundata === undefined || middleshixundata.length === 0 ? "none" : "block"}}>
// style={{display: middleshixundata === undefined || middleshixundata.length === 0 ? "none" : "block"}}
>
<div className="shixun_list_content">
<div className="square-list clearfix">
{ middleshixundata===undefined?" ":middleshixundata.map((item,key)=>{
{middleshixundata === undefined || middleshixundata.length === 0?" ":middleshixundata.map((item,key)=>{
return(
<div className="square-Item" key={key} id={item.id}>
<style>
@ -113,12 +123,27 @@ class ShixunCard extends Component {
</p>
{/*target="_blank"*/}
{/*<style>*/}
{/*{*/}
{/*`*/}
{/*.anticon-star{*/}
{/*font-size:16px;*/}
{/*}*/}
{/*.pathInfo{*/}
{/*margin-right:-5px;*/}
{/*}*/}
{/*.ant-rate{*/}
{/*color: #FFA800;*/}
{/*}*/}
{/*`*/}
{/*}*/}
{/*</style>*/}
<p className="clearfix mt8 ml-3">
<span className="rateYoStar fl" style={{padding: '0px',height: '20px',lineHeight: '19px',cursor: 'default'}} title="">
<Rating value={item.score_info===null?5:item.score_info} disabled allowHalf />
{/*<Rate allowHalf value={item.score_info===null?5:item.score_info} disabled key={key} />*/}
<MyRate key={key} allowHalf defaultValue={item.score_info===null?5:item.score_info} disabled/>
</span>
<span className="fl ml25 font-12 color-grey-9 lineh-12 mt4">{item.score_info===null?"5分":item.score_info+"分"}</span>
<span className="fl ml25 font-12 color-grey-9 lineh-12 mt5">{item.score_info===null?"5分":item.score_info+"分"}</span>
</p>
<p className="clearfix mt8 font-12 color-grey-B4">

@ -8,7 +8,7 @@
.rateYo{
text-align: center;
cursor: default;
width: 90px;
width: 111px;
}
a:link, a:visited {

@ -3051,7 +3051,7 @@ a.singlepublishtwo{
/*工程认证*/
/*首页*/
.authMainImg{width: 100%;height: 240px;background:url("/images/educoder/auth/banner1.jpg") no-repeat top center;background-size: 100% 100%;justify-content: center;align-items: center;display: -webkit-flex;}
.ListTableLine>p,.ListTableLine>.ListTableTitle{padding: 0px 30px;background-color: #F5F5F5;line-height: 40px;height: 56px;padding-top: 8px;box-sizing: border-box;}
.ListTableLine>p,.ListTableLine>.ListTableTitle{margin-bottom: 0px;padding: 0px 30px;background-color: #F5F5F5;line-height: 40px;height: 56px;padding-top: 8px;box-sizing: border-box;}
.ListTableLine>p span,.ListTableTitle span{float: left;color: #666;box-sizing: border-box}
.ListTableLine li{min-height: 48px;padding: 10px 0px;box-sizing: border-box;margin:0px 30px;border-bottom: 1px solid #eaeaea;}
.ListTableLine li>span{float: left;box-sizing: border-box;}

Loading…
Cancel
Save