diff --git a/app/controllers/commons_controller.rb b/app/controllers/commons_controller.rb index 0c0fe79af..43ea31c97 100644 --- a/app/controllers/commons_controller.rb +++ b/app/controllers/commons_controller.rb @@ -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 diff --git a/app/models/student_works_score.rb b/app/models/student_works_score.rb index 86d393f93..299b61596 100644 --- a/app/models/student_works_score.rb +++ b/app/models/student_works_score.rb @@ -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 diff --git a/app/models/user.rb b/app/models/user.rb index 1dc511513..70cd54c92 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -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 diff --git a/app/views/ecs/graduation_course_supports/show.xlsx.axlsx b/app/views/ecs/graduation_course_supports/show.xlsx.axlsx index e2c2599ec..ae81d931b 100644 --- a/app/views/ecs/graduation_course_supports/show.xlsx.axlsx +++ b/app/views/ecs/graduation_course_supports/show.xlsx.axlsx @@ -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 \ No newline at end of file diff --git a/public/react/public/css/edu-all.css b/public/react/public/css/edu-all.css index 425255048..cb78f8e00 100644 --- a/public/react/public/css/edu-all.css +++ b/public/react/public/css/edu-all.css @@ -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;} diff --git a/public/react/src/modules/ecs/EcSetting/CourseSupports/index.js b/public/react/src/modules/ecs/EcSetting/CourseSupports/index.js index 53ad2d936..511a0da64 100644 --- a/public/react/src/modules/ecs/EcSetting/CourseSupports/index.js +++ b/public/react/src/modules/ecs/EcSetting/CourseSupports/index.js @@ -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 (
毕业要求指标点
- {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)}
{
+ let myValue = defaultValue;
+ console.log(myValue-Math.floor(myValue))
+ // if (myValue < Math.ceil(myValue)) {
+ // myValue = Math.floor(myValue) + 0.5;
+ // }
+
+ return
+ {/**/}
+
- -
-
+
+
+
{item.score_info===null?"5分":item.score_info+"分"}
diff --git a/public/react/src/modules/tpm/TPMShixunDiscuss.css b/public/react/src/modules/tpm/TPMShixunDiscuss.css index 6006b3f30..3af4ec269 100644 --- a/public/react/src/modules/tpm/TPMShixunDiscuss.css +++ b/public/react/src/modules/tpm/TPMShixunDiscuss.css @@ -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; */ } \ No newline at end of file diff --git a/public/react/src/modules/tpm/shixuns/ShixunCard.js b/public/react/src/modules/tpm/shixuns/ShixunCard.js index 28b0117d0..021185cc8 100644 --- a/public/react/src/modules/tpm/shixuns/ShixunCard.js +++ b/public/react/src/modules/tpm/shixuns/ShixunCard.js @@ -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-
+ {/* */}
+
- {item.score_info===null?"5分":item.score_info+"分"}
+ {item.score_info===null?"5分":item.score_info+"分"}
diff --git a/public/react/src/modules/tpm/shixuns/css/TPMBanner.css b/public/react/src/modules/tpm/shixuns/css/TPMBanner.css index a6a7acc9a..fe059fccd 100644 --- a/public/react/src/modules/tpm/shixuns/css/TPMBanner.css +++ b/public/react/src/modules/tpm/shixuns/css/TPMBanner.css @@ -8,7 +8,7 @@ .rateYo{ text-align: center; cursor: default; - width: 90px; + width: 111px; } a:link, a:visited { diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css index 91ea604d4..c20b648db 100644 --- a/public/stylesheets/educoder/edu-all.css +++ b/public/stylesheets/educoder/edu-all.css @@ -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;}