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

fix: #3176

上级 8959b720
...@@ -6,6 +6,11 @@ import AppList from '@/components/base/AppList.vue' ...@@ -6,6 +6,11 @@ import AppList from '@/components/base/AppList.vue'
import { getContestExpertList, updateContestExpert } from '../api' import { getContestExpertList, updateContestExpert } from '../api'
import { useMapStore } from '@/stores/map' import { useMapStore } from '@/stores/map'
interface Prop {
disabled: boolean
}
defineProps<Prop>()
const emit = defineEmits<{ const emit = defineEmits<{
(e: 'update'): void (e: 'update'): void
(e: 'update:modelValue', visible: boolean): void (e: 'update:modelValue', visible: boolean): void
...@@ -96,6 +101,7 @@ function handleRemoveClass(index: number) { ...@@ -96,6 +101,7 @@ function handleRemoveClass(index: number) {
<template> <template>
<el-dialog title="评分专家列表" :close-on-click-modal="false" @update:modelValue="$emit('update:modelValue')"> <el-dialog title="评分专家列表" :close-on-click-modal="false" @update:modelValue="$emit('update:modelValue')">
<el-form :disabled="disabled">
<AppList v-bind="listOptions" ref="appList"> <AppList v-bind="listOptions" ref="appList">
<template #header-buttons> <template #header-buttons>
<el-row justify="space-between"> <el-row justify="space-between">
...@@ -111,6 +117,7 @@ function handleRemoveClass(index: number) { ...@@ -111,6 +117,7 @@ function handleRemoveClass(index: number) {
<el-button type="primary" round auto-insert-space @click="handleSubmit">保存</el-button> <el-button type="primary" round auto-insert-space @click="handleSubmit">保存</el-button>
<el-button round auto-insert-space @click="$emit('update:modelValue', false)">取消</el-button> <el-button round auto-insert-space @click="$emit('update:modelValue', false)">取消</el-button>
</el-row> </el-row>
</el-form>
<ScoringExpertsAddDialog v-model="dialogVisible" @add="handleAdd" v-if="dialogVisible"></ScoringExpertsAddDialog> <ScoringExpertsAddDialog v-model="dialogVisible" @add="handleAdd" v-if="dialogVisible"></ScoringExpertsAddDialog>
</el-dialog> </el-dialog>
</template> </template>
...@@ -7,6 +7,11 @@ import AppUpload from '@/components/base/AppUpload.vue' ...@@ -7,6 +7,11 @@ import AppUpload from '@/components/base/AppUpload.vue'
import { getContestRuleBook, createContestRuleBook, updateContestRuleBook } from '../api' import { getContestRuleBook, createContestRuleBook, updateContestRuleBook } from '../api'
import { useMapStore } from '@/stores/map' import { useMapStore } from '@/stores/map'
interface Prop {
disabled: boolean
}
defineProps<Prop>()
const emit = defineEmits<{ const emit = defineEmits<{
(e: 'update'): void (e: 'update'): void
(e: 'update:modelValue', visible: boolean): void (e: 'update:modelValue', visible: boolean): void
...@@ -105,17 +110,15 @@ function handleUpdate(params: ContestBookUpdateParams) { ...@@ -105,17 +110,15 @@ function handleUpdate(params: ContestBookUpdateParams) {
title="编辑评分细则" title="编辑评分细则"
:close-on-click-modal="false" :close-on-click-modal="false"
width="600px" width="600px"
@update:modelValue="$emit('update:modelValue')" @update:modelValue="$emit('update:modelValue')">
> <el-form ref="formRef" :model="form" :rules="rules" label-width="124px" :disabled="disabled">
<el-form ref="formRef" :model="form" :rules="rules" label-width="124px">
<el-form-item label="评分细则文件" prop="files"> <el-form-item label="评分细则文件" prop="files">
<AppUpload <AppUpload
v-model="form.files" v-model="form.files"
:limit="1" :limit="1"
:beforeUpload="handleBeforeUpload" :beforeUpload="handleBeforeUpload"
accept=".doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,.pdf,application/pdf,.ppt,.pptx,application/vnd.ms-powerpoint,.csv,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" accept=".doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,.pdf,application/pdf,.ppt,.pptx,application/vnd.ms-powerpoint,.csv,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
@success="handleUploadSuccess" @success="handleUploadSuccess">
>
<template #tip>评分细则文件支持格式包含:doc docx xls xlsx pdf ppt pptx,大小不超过50M</template> <template #tip>评分细则文件支持格式包含:doc docx xls xlsx pdf ppt pptx,大小不超过50M</template>
</AppUpload> </AppUpload>
</el-form-item> </el-form-item>
......
...@@ -7,6 +7,11 @@ import { getContestRules, updateContestRules, getExamList } from '../api' ...@@ -7,6 +7,11 @@ import { getContestRules, updateContestRules, getExamList } from '../api'
import { useMapStore } from '@/stores/map' import { useMapStore } from '@/stores/map'
import { scoreRuleList } from '@/utils/dictionary' import { scoreRuleList } from '@/utils/dictionary'
interface Prop {
disabled: boolean
}
defineProps<Prop>()
const emit = defineEmits<{ const emit = defineEmits<{
(e: 'update'): void (e: 'update'): void
(e: 'update:modelValue', visible: boolean): void (e: 'update:modelValue', visible: boolean): void
...@@ -146,7 +151,7 @@ function handleRatioChange(row: any, index: number) { ...@@ -146,7 +151,7 @@ function handleRatioChange(row: any, index: number) {
:close-on-click-modal="false" :close-on-click-modal="false"
width="800px" width="800px"
@update:modelValue="$emit('update:modelValue')"> @update:modelValue="$emit('update:modelValue')">
<el-form ref="formRef" :model="form" :rules="rules" label-width="170px"> <el-form ref="formRef" :model="form" :rules="rules" label-width="170px" :disabled="disabled">
<el-form-item label="赛项名称"> <el-form-item label="赛项名称">
<el-input v-model="form.name" disabled /> <el-input v-model="form.name" disabled />
</el-form-item> </el-form-item>
...@@ -222,9 +227,9 @@ function handleRatioChange(row: any, index: number) { ...@@ -222,9 +227,9 @@ function handleRatioChange(row: any, index: number) {
style="width: 100%" /> style="width: 100%" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="date" label="操作" align="center" width="60"> <el-table-column prop="date" label="操作" align="center" width="90">
<template #default="{ $index }"> <template #default="{ $index }">
<el-link type="primary" @click="handleRemove($index)">删除</el-link> <el-button text type="primary" @click="handleRemove($index)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
......
...@@ -118,28 +118,14 @@ function handleExperts() { ...@@ -118,28 +118,14 @@ function handleExperts() {
<template> <template>
<AppCard title="查看赛项信息"> <AppCard title="查看赛项信息">
<template #header-aside> <template #header-aside>
<el-button <el-button type="primary" @click="scoringRulesVisible = true" v-permission="'competition-rule'"
type="primary"
:disabled="isStarted"
@click="scoringRulesVisible = true"
v-permission="'competition-rule'"
>评分规则</el-button >评分规则</el-button
> >
<el-button type="primary" :disabled="isStarted" @click="handleExperts" v-permission="'competition-bind-experts'" <el-button type="primary" @click="handleExperts" v-permission="'competition-bind-experts'">评分专家</el-button>
>评分专家</el-button <el-button type="primary" @click="contestantVisible = true" v-permission="'competition-competitor-list'"
>
<el-button
type="primary"
:disabled="isStarted"
@click="contestantVisible = true"
v-permission="'competition-competitor-list'"
>参赛选手</el-button >参赛选手</el-button
> >
<el-button <el-button type="primary" @click="scoringRulesBookVisible = true" v-permission="'competition-rubric-update'"
type="primary"
:disabled="isStarted"
@click="scoringRulesBookVisible = true"
v-permission="'competition-rubric-update'"
>评分细则</el-button >评分细则</el-button
> >
</template> </template>
...@@ -177,18 +163,24 @@ function handleExperts() { ...@@ -177,18 +163,24 @@ function handleExperts() {
<!-- 评分规则 --> <!-- 评分规则 -->
<ScoringRulesDialog <ScoringRulesDialog
v-model="scoringRulesVisible" v-model="scoringRulesVisible"
:disabled="isStarted"
@update="fetchRule" @update="fetchRule"
v-if="scoringRulesVisible && detail"></ScoringRulesDialog> v-if="scoringRulesVisible && detail"></ScoringRulesDialog>
<!-- 评分专家 --> <!-- 评分专家 -->
<ScoringExpertsDialog <ScoringExpertsDialog
v-model="scoringExpertsVisible" v-model="scoringExpertsVisible"
:disabled="isStarted"
@update="fetchExperts" @update="fetchExperts"
v-if="scoringExpertsVisible && detail"></ScoringExpertsDialog> v-if="scoringExpertsVisible && detail"></ScoringExpertsDialog>
<!-- 参赛选手 --> <!-- 参赛选手 -->
<ContestantDialog v-model="contestantVisible" v-if="contestantVisible && detail"></ContestantDialog> <ContestantDialog
v-model="contestantVisible"
:disabled="isStarted"
v-if="contestantVisible && detail"></ContestantDialog>
<!-- 评分细则 --> <!-- 评分细则 -->
<ScoringRulesBookDialog <ScoringRulesBookDialog
v-model="scoringRulesBookVisible" v-model="scoringRulesBookVisible"
:disabled="isStarted"
v-if="scoringRulesBookVisible && detail"></ScoringRulesBookDialog> v-if="scoringRulesBookVisible && detail"></ScoringRulesBookDialog>
</template> </template>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论