|
@@ -20,7 +20,7 @@
|
|
|
<el-col :span="24" v-if="dialog.type == '1'">
|
|
|
<custom-form v-model="form" :fields="formFields" :rules="rules" @save="toSave">
|
|
|
<template #video>
|
|
|
- <custom-upload model="video" :list="form.file" :limit="1" url="/files/web/cxyy_match/upload" @change="onUpload"></custom-upload>
|
|
|
+ <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>
|
|
@@ -202,7 +202,7 @@ const rules = reactive({
|
|
|
name: [{ required: true, message: t('pages.match.titleMessage'), trigger: 'blur' }]
|
|
|
})
|
|
|
const dialog = ref({ type: '1', show: false, title: t('pages.match.addDialogTitle') })
|
|
|
-const form = ref({ rules: {}, file: [] })
|
|
|
+const form = ref({ rules: {}, video: [], file: [] })
|
|
|
// 审核
|
|
|
const examFormFields = [{ label: t('pages.match.status'), model: 'status', type: 'select' }]
|
|
|
const examRules = reactive({
|
|
@@ -311,6 +311,7 @@ const toAdd = () => {
|
|
|
const toEdit = (data) => {
|
|
|
data.time = [data.start_time, data.end_time]
|
|
|
if (!data.file) data.file = []
|
|
|
+ if (!data.video) data.video = []
|
|
|
form.value = data
|
|
|
dialog.value = { type: '1', show: true, title: t('pages.match.upDialogTitle') }
|
|
|
}
|
|
@@ -375,7 +376,7 @@ const toReset = async () => {
|
|
|
await search({ skip, limit })
|
|
|
}
|
|
|
const toClose = () => {
|
|
|
- form.value = { rules: {}, file: [] }
|
|
|
+ form.value = { rules: {}, video: [], file: [] }
|
|
|
dialog.value = { show: false }
|
|
|
}
|
|
|
// 上传图片
|