|
@@ -31,7 +31,9 @@
|
|
|
<el-table-column align="center" label="操作" width="250">
|
|
|
<template #default="{ row }">
|
|
|
<el-link v-if="row.status == '-2'" :underline="false" type="warning" size="mini" @click="toExam(row)" style="margin-right: 10px">提交审核</el-link>
|
|
|
+ <el-link v-if="row.match_status == '2'" :underline="false" type="primary" size="mini" @click="toScore(row)" style="margin-right: 10px">分数</el-link>
|
|
|
<el-link :underline="false" type="warning" size="mini" @click="toSign(row)" style="margin-right: 10px">报名</el-link>
|
|
|
+ <el-link v-if="row.scale == '0'" :underline="false" type="warning" size="mini" @click="toProcess(row)" style="margin-right: 10px">流程</el-link>
|
|
|
<el-link :underline="false" type="primary" size="mini" @click="toEdit(row)" style="margin-right: 10px">修改</el-link>
|
|
|
<el-link :underline="false" type="danger" size="mini" @click="toDelete(row)"> 删除 </el-link>
|
|
|
</template>
|
|
@@ -47,6 +49,9 @@
|
|
|
<el-row>
|
|
|
<el-col :span="24" v-if="dialog.type == '1'">
|
|
|
<custom-form v-model="form" :fields="formFields" :rules="rules" @save="toSave" @draftSave="toDraftSave">
|
|
|
+ <template #video>
|
|
|
+ <custom-upload model="video" :list="form.video" :limit="1" url="/files/web/cxyy_match/upload" @change="onUpload"></custom-upload>
|
|
|
+ </template>
|
|
|
<template #file>
|
|
|
<custom-upload model="file" :list="form.file" :limit="1" listType="picture-card" url="/files/web/cxyy_match/upload" @change="onUpload"></custom-upload>
|
|
|
</template>
|
|
@@ -59,6 +64,9 @@
|
|
|
<template #match_status>
|
|
|
<el-option v-for="i in matchList" :key="i.id" :label="i.label" :value="i.value"></el-option>
|
|
|
</template>
|
|
|
+ <template #scale>
|
|
|
+ <el-radio v-for="i in scaleList" :key="i.id" :label="i.value">{{ i.label }}</el-radio>
|
|
|
+ </template>
|
|
|
<template #match_type>
|
|
|
<el-radio v-for="i in matchTypeList" :key="i.id" :label="i.value">{{ i.label }}</el-radio>
|
|
|
</template>
|
|
@@ -123,6 +131,12 @@
|
|
|
<el-col :span="24" v-if="dialog.type == '2'">
|
|
|
<sign :matchForm="form"></sign>
|
|
|
</el-col>
|
|
|
+ <el-col :span="24" v-if="dialog.type == '3'">
|
|
|
+ <process :matchForm="form"></process>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" v-if="dialog.type == '4'">
|
|
|
+ <score :matchForm="form"></score>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -131,7 +145,8 @@
|
|
|
<script setup>
|
|
|
// 组件
|
|
|
import sign from './parts/sign.vue'
|
|
|
-
|
|
|
+import process from './parts/process.vue'
|
|
|
+import score from './parts/score.vue'
|
|
|
import { Search } from '@element-plus/icons-vue'
|
|
|
import { cloneDeep, get } from 'lodash-es'
|
|
|
const $checkRes = inject('$checkRes')
|
|
@@ -166,6 +181,7 @@ const formList = ref([])
|
|
|
const tagsList = ref([])
|
|
|
const sectorList = ref([])
|
|
|
const matchTypeList = ref([])
|
|
|
+const scaleList = ref([])
|
|
|
|
|
|
const form = ref({ time: [], rules: {} })
|
|
|
const dialog = ref({ type: '1', show: false, title: '发布赛事' })
|
|
@@ -174,8 +190,9 @@ const formFields = ref([
|
|
|
{ label: '赛事名称', model: 'name' },
|
|
|
{ label: '标签', model: 'tags', custom: true },
|
|
|
{ label: '类型', model: 'type', type: 'select' },
|
|
|
+ { label: '赛事规模', model: 'scale', type: 'radio' },
|
|
|
{ label: '赛事类型', model: 'match_type', type: 'radio' },
|
|
|
- { label: '路由', model: 'href' },
|
|
|
+ { label: '路由', model: 'href', display: () => form.value.match_type == '1' },
|
|
|
{ label: '组织单位', model: 'work' },
|
|
|
{ label: '所属产业', model: 'industry', type: 'select' },
|
|
|
{ label: '类别', model: 'form', type: 'select' },
|
|
@@ -184,6 +201,7 @@ const formFields = ref([
|
|
|
{ label: '是否启用', model: 'is_use', type: 'radio' },
|
|
|
{ model: 'rules', custom: true },
|
|
|
{ label: '简介', model: 'brief', custom: true },
|
|
|
+ { label: '视频', model: 'video', custom: true },
|
|
|
{ label: '赛事状态', model: 'match_status', type: 'select' }
|
|
|
])
|
|
|
const rules = reactive({ name: [{ required: true, message: '请输入赛事名称', trigger: 'blur' }] })
|
|
@@ -244,6 +262,9 @@ const searchOther = async () => {
|
|
|
// 赛事状态
|
|
|
result = await dictDataStore.query({ code: 'matchStatus', is_use: '0' })
|
|
|
if ($checkRes(result)) matchList.value = result.data
|
|
|
+ // 赛事规模
|
|
|
+ result = await dictDataStore.query({ code: 'matchScale', is_use: '0' })
|
|
|
+ if ($checkRes(result)) scaleList.value = result.data
|
|
|
// 标签
|
|
|
result = await tagsStore.query({ is_use: '0' })
|
|
|
if ($checkRes(result)) tagsList.value = result.data
|
|
@@ -274,6 +295,16 @@ const toSign = (data) => {
|
|
|
form.value = data
|
|
|
dialog.value = { type: '2', show: true, title: '报名管理' }
|
|
|
}
|
|
|
+// 流程
|
|
|
+const toProcess = (data) => {
|
|
|
+ form.value = data
|
|
|
+ dialog.value = { type: '3', show: true, title: '流程管理' }
|
|
|
+}
|
|
|
+// 分数管理
|
|
|
+const toScore = (data) => {
|
|
|
+ form.value = data
|
|
|
+ dialog.value = { type: '4', show: true, title: '分数管理' }
|
|
|
+}
|
|
|
// 删除
|
|
|
const toDelete = (data) => {
|
|
|
ElMessageBox.confirm(`您确认删除${data.name}该数据?`, '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' })
|
|
@@ -287,7 +318,7 @@ const toDelete = (data) => {
|
|
|
}
|
|
|
const toSave = async () => {
|
|
|
const data = cloneDeep(form.value)
|
|
|
- const other = { status: '0', user: user.value.id }
|
|
|
+ const other = { status: '0', user: user.value.id, form: searchForm.value.form }
|
|
|
if (data.time && data.time.length > 1) {
|
|
|
data.start_time = data.time[0]
|
|
|
data.end_time = data.time[1]
|