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

fix: #3176

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