|
|
|
@ -9,13 +9,48 @@ |
|
|
|
|
label="年度比赛名称" |
|
|
|
|
prop="compName" |
|
|
|
|
/> |
|
|
|
|
<!-- <el-table-column |
|
|
|
|
<el-table-column |
|
|
|
|
label="年度比赛项目名称" |
|
|
|
|
prop="annualCompid_dictText" |
|
|
|
|
/> --> |
|
|
|
|
/> |
|
|
|
|
<el-table-column label="比赛类型" prop="entryFormat" /> |
|
|
|
|
<el-table-column label="报名编号" prop="enrollCode" /> |
|
|
|
|
<el-table-column label="比赛状态" prop="enrollStatic_dictText" /> |
|
|
|
|
<el-table-column label="报名状态"> |
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
{{ formatstatus(row.workStatus) }} |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="作品名称" prop="fileName" /> |
|
|
|
|
<el-table-column label="作品文件" prop="fileName"> |
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
<el-button |
|
|
|
|
link |
|
|
|
|
type="primary" |
|
|
|
|
size="small" |
|
|
|
|
@click="download(row.fileUrl,row.fileName)" |
|
|
|
|
v-if="row.uploadWorkFlag != 'no'" |
|
|
|
|
> |
|
|
|
|
下载文件 |
|
|
|
|
</el-button> |
|
|
|
|
<div v-else>无作品文件</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
|
<el-table-column label="上传作品"> |
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
<el-button |
|
|
|
|
link |
|
|
|
|
:type="row.enrollStatic == '2' ? 'primary': 'warning' " |
|
|
|
|
size="small" |
|
|
|
|
@click="uploadZp(row.annualCompid, row.enrollStatic)" |
|
|
|
|
v-if="row.uploadWorkFlag != 'yes'" |
|
|
|
|
> |
|
|
|
|
{{row.enrollStatic == '2' ? '上传作品' : '未审核'}} |
|
|
|
|
</el-button> |
|
|
|
|
<el-tag v-else>已上传作品</el-tag> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="操作" prop="fileName"> |
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
<div class="action-buttons"> |
|
|
|
@ -70,6 +105,44 @@ |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
|
</div> |
|
|
|
|
<el-dialog |
|
|
|
|
v-model="dialogVisible" |
|
|
|
|
title="上传作品" |
|
|
|
|
width="500" |
|
|
|
|
:before-close="handleClose" |
|
|
|
|
v-if="dialogVisible" |
|
|
|
|
:close-on-click-modal="false" |
|
|
|
|
> |
|
|
|
|
<el-form label-width="80" style="padding-right: 30px"> |
|
|
|
|
<el-form-item label="作品名称"> |
|
|
|
|
<el-input v-model="raceName" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="作品"> |
|
|
|
|
<el-upload |
|
|
|
|
ref="upload" |
|
|
|
|
class="upload-demo" |
|
|
|
|
action="#" |
|
|
|
|
v-model:file-list="fileList" |
|
|
|
|
:limit="1" |
|
|
|
|
:auto-upload="false" |
|
|
|
|
> |
|
|
|
|
<template #trigger> |
|
|
|
|
<el-button type="primary">选择文件</el-button> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<template #tip> |
|
|
|
|
<div class="el-upload__tip text-red">作品只允许上传一个</div> |
|
|
|
|
</template> |
|
|
|
|
</el-upload> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
<template #footer> |
|
|
|
|
<div class="dialog-footer"> |
|
|
|
|
<el-button @click="handleClose">取消</el-button> |
|
|
|
|
<el-button type="primary" @click="submit">确认</el-button> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-dialog> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
|
@ -90,6 +163,7 @@ const isLoading = ref(false) |
|
|
|
|
const getList = async () => { |
|
|
|
|
isLoading.value = true |
|
|
|
|
const res: any = await getStuRaceList(page.value) |
|
|
|
|
console.log(res) |
|
|
|
|
list.value = res.result.records |
|
|
|
|
total.value = res.result.total |
|
|
|
|
isLoading.value = false |
|
|
|
@ -112,21 +186,39 @@ const handleClose = () => { |
|
|
|
|
annualCompid.value = '' |
|
|
|
|
} |
|
|
|
|
const submit = async () => { |
|
|
|
|
if (!raceName.value) return ElMessage.warning('请输入作品名称') |
|
|
|
|
if (!fileList.value.length) return ElMessage.warning('请上传作品') |
|
|
|
|
console.log(fileList.value[0].raw, raceName, 'fileList.value[0].raw') |
|
|
|
|
const fromData = new FormData() |
|
|
|
|
fromData.append('files', fileList.value[0].raw) |
|
|
|
|
fromData.append('annualCompid', annualCompid.value) |
|
|
|
|
fromData.append('workName', raceName.value) |
|
|
|
|
const res: any = await uploadFileZp(fromData).then((res: any) => { |
|
|
|
|
console.log(res) |
|
|
|
|
if (res.code == 500) return ElMessage.warning(res.message) |
|
|
|
|
ElMessage.success(res.message) |
|
|
|
|
}) |
|
|
|
|
console.log(res) |
|
|
|
|
handleClose() |
|
|
|
|
getList() |
|
|
|
|
} |
|
|
|
|
const headerChange = (pageNumber: any) => { |
|
|
|
|
console.log(pageNumber) |
|
|
|
|
page.value.pageNo = pageNumber |
|
|
|
|
getList() |
|
|
|
|
} |
|
|
|
|
// 下载文件 |
|
|
|
|
const download = async (url:any,name:any) => { |
|
|
|
|
// window.open(import.meta.env.VITE_APP_BASE_API + '/sys/common/zuopin/' + url) |
|
|
|
|
const a = document.createElement('a') |
|
|
|
|
a.style.display = 'none' |
|
|
|
|
document.body.appendChild(a) |
|
|
|
|
a.href = import.meta.env.VITE_APP_BASE_API + '/sys/common' + url |
|
|
|
|
a.setAttribute('download', name); |
|
|
|
|
a.click() |
|
|
|
|
document.body.removeChild(a) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const saveEvent = async (id: any) => { |
|
|
|
|
const res: any = await sava({ applyCode: id, status: 5 }) |
|
|
|
@ -181,7 +273,9 @@ const editEvent = (id: any,annualCompid: any,enrollCode:any,entryFormat:any) => |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
console.log(id); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const InfoEvent = (id: any,annualCompid: any,enrollCode:any,entryFormat:any) => { |
|
|
|
@ -209,6 +303,16 @@ const InfoEvent = (id: any,annualCompid: any,enrollCode:any,entryFormat:any) => |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
// router.push({ |
|
|
|
|
// path: '/registrationGroup', |
|
|
|
|
// query:{ |
|
|
|
|
// id, |
|
|
|
|
// annualCompid, |
|
|
|
|
// enrollCode, |
|
|
|
|
// edit: true, |
|
|
|
|
// info: true |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const cancelEvent = async (id: any) => { |
|
|
|
|