提交 7cf24247 authored 作者: 王鹏飞's avatar 王鹏飞

bug fixes

上级 4949883d
......@@ -66,6 +66,8 @@ function handleSubmit() {
<el-input-number
:controls="false"
v-model="row.score"
step-strictly
:step="0.1"
:min="0"
:max="row.old_score"
:disabled="row.type === '2'"
......
......@@ -120,7 +120,11 @@ const isUpdate = $computed(() => {
const title = $computed(() => {
return isUpdate ? '编辑赛项' : '新增赛项'
})
// 是否禁用赛项周期
const disabledRange = $computed(() => {
const [firstDate, secondDate] = form.dateRange || []
return isUpdate && dayjs().isBetween(firstDate, secondDate, 'date', '[]')
})
// 提交
function handleSubmit() {
formRef?.validate().then(() => {
......@@ -137,7 +141,7 @@ function handleSubmit() {
end_range: dayjs(secondDate).endOf('date').unix(),
start_at: dayjs(firstDatetime).year(year).month(month).date(date).unix(),
end_at: dayjs(secondDatetime).year(year).month(month).date(date).unix(),
apply_expiration_date: dayjs(form.apply_expiration_date).unix()
apply_expiration_date: dayjs(form.apply_expiration_date).endOf('date').unix()
}
const params: ContestUpdateParams = pick(mergedForm, [
'id',
......
......@@ -57,9 +57,7 @@ function onUpdateSuccess() {
<AppList v-bind="listOptions" ref="appList">
<template #table-count="{ row }"> {{ row.checked_count }}/{{ row.need_check_count }} </template>
<template #table-x="{ row }">
<el-button text type="primary" @click="handleView(row)" v-permission="'v1-teacher-record-check'">
查看评分详情
</el-button>
<el-button text type="primary" @click="handleView(row)">查看评分详情</el-button>
</template>
</AppList>
</AppCard>
......
......@@ -29,8 +29,8 @@ function handleChange(id: string, type: number) {
<div class="bg">
<router-link to="/admin/contest/score" class="link1"></router-link>
<router-link to="/admin/contest/check" class="link2"></router-link>
<router-link to="/admin/contest/discuss" class="link3"></router-link>
<router-link to="/admin/contest/discuss" class="link4"></router-link>
<router-link to="/admin/contest/analyze/score" class="link3"></router-link>
<!-- <router-link to="/admin/contest/discuss" class="link4"></router-link> -->
</div>
<div class="select-group">
<el-select size="large" placeholder="大赛评分" @change="handleChange($event, 1)">
......
......@@ -17,7 +17,7 @@ const modeText = $computed(() => {
// 是否可以训练
const canTrain = $computed(() => {
return dayjs().isBefore(dayjs(parseInt(props.data.end_range) * 1000))
return dayjs().isBefore(dayjs(parseInt(props.data.end_at) * 1000))
})
function handleTrain() {
// 训练计数
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论