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

dev_cs_new
杨树林 6 years ago
commit 8a9ffd1952

@ -246,6 +246,10 @@ class Shixun < ApplicationRecord
Game.joins(:myshixun).where(user_id: user.id, status: 2, myshixuns: { shixun_id: id }).count Game.joins(:myshixun).where(user_id: user.id, status: 2, myshixuns: { shixun_id: id }).count
end end
def has_web_route?
self.mirror_name.include?('JFinal') || self.mirror_name.include?('PHP') && self.mirror_name.include?('Mysql') || self.mirror_name.include?('Web')
end
private private
def send_tiding def send_tiding

@ -13,6 +13,7 @@ elsif @tab == 1
# 评测设置的编辑模式 # 评测设置的编辑模式
json.(@challenge, :id, :path, :exec_path, :show_type, :original_picture_path, :expect_picture_path, :picture_path, json.(@challenge, :id, :path, :exec_path, :show_type, :original_picture_path, :expect_picture_path, :picture_path,
:web_route, :test_set_score, :test_set_average) :web_route, :test_set_score, :test_set_average)
json.has_web_route @shixun.has_web_route?
json.test_sets @challenge.test_sets do |set| json.test_sets @challenge.test_sets do |set|
json.hidden (set.is_public ? 0 : 1) json.hidden (set.is_public ? 0 : 1)
json.(set, :input, :output, :score) json.(set, :input, :output, :score)

@ -85,9 +85,9 @@ function buildColumns(that, student_works) {
overflow: 'hidden', overflow: 'hidden',
textOverflow: 'ellipsis', textOverflow: 'ellipsis',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
width: '98px', width: '74px',
margin: '0 auto' margin: '0 auto'
}} title={text}> }} title={text && text.length > 5 ? text : ''}>
{/* <Tooltip placement="bottom" title={text}> {/* <Tooltip placement="bottom" title={text}>
</Tooltip> */} </Tooltip> */}
{text} {text}
@ -185,7 +185,7 @@ function buildColumns(that, student_works) {
</span> </span>
)}, )},
}, { }, {
width: 150, width: 106,
title: '更新时间', title: '更新时间',
dataIndex: 'update_time', dataIndex: 'update_time',
key: 'update_time', key: 'update_time',
@ -325,7 +325,7 @@ function buildColumns(that, student_works) {
} }
if (isAdminOrStudent || that.props.work_public == true) { if (isAdminOrStudent || that.props.work_public == true) {
columns.push({ columns.push({
width: 92, width: 72,
title: '操作', title: '操作',
key: 'operation', key: 'operation',
dataIndex: 'operation', dataIndex: 'operation',
@ -654,7 +654,7 @@ class CommonWorkList extends Component{
} }
.workListContent .ant-table-thead > tr > th, .workListContent .ant-table-tbody > tr > td { .workListContent .ant-table-thead > tr > th, .workListContent .ant-table-tbody > tr > td {
padding: 10px 2px; padding: 10px 1px;
} }
`}</style> `}</style>
<div style={{ background: '#fff'}} className="workListContent"> <div style={{ background: '#fff'}} className="workListContent">

Loading…
Cancel
Save