Compare commits
67 Commits
main
...
GST002_old
Author | SHA1 | Date |
---|---|---|
|
e27f11436a | 3 months ago |
|
e9c9f7aa1d | 3 months ago |
|
7018dd3412 | 3 months ago |
|
4bca08da4f | 3 months ago |
|
3810ab8c3c | 3 months ago |
|
e127d6d6d3 | 3 months ago |
|
57f9af8ece | 3 months ago |
|
71ce0b8c9c | 3 months ago |
|
e3f7415cbf | 3 months ago |
|
8cfec1d425 | 3 months ago |
|
09be7b0592 | 3 months ago |
|
bac10262cc | 3 months ago |
|
ede5b69c7c | 3 months ago |
|
41ef0abc3e | 4 months ago |
|
6e06564df6 | 4 months ago |
|
88ff7ed72e | 4 months ago |
|
719a91d898 | 4 months ago |
|
30b57c5569 | 4 months ago |
|
4d4151f125 | 4 months ago |
|
cc8d1a32ca | 4 months ago |
|
8d53a67e99 | 4 months ago |
|
1af1a6e862 | 4 months ago |
|
f3cc596f96 | 5 months ago |
|
3a6254d1cc | 5 months ago |
|
4c504f76d4 | 6 months ago |
|
818816b289 | 6 months ago |
|
b26ab2d571 | 6 months ago |
|
2e8d3fc21f | 6 months ago |
|
a943860c7b | 6 months ago |
|
02a8c212ff | 6 months ago |
|
4be34ff89a | 6 months ago |
|
871b9b5ca2 | 6 months ago |
|
a3988ffc6b | 6 months ago |
|
31e7c591a5 | 6 months ago |
|
85df29b4a8 | 6 months ago |
|
cf585cb6ba | 6 months ago |
|
deb4435e71 | 6 months ago |
|
04119d5c43 | 6 months ago |
|
6997bf2b39 | 6 months ago |
|
12307e731f | 6 months ago |
|
53bf90dfb4 | 6 months ago |
|
b4e128d951 | 6 months ago |
|
78fe84567f | 6 months ago |
|
0f428a4b91 | 6 months ago |
|
7dd5d83aa2 | 6 months ago |
|
85ab5ad7e0 | 6 months ago |
|
ddabac1bad | 6 months ago |
|
d7835f2b39 | 6 months ago |
|
737b66205c | 6 months ago |
|
961ccf3a8e | 6 months ago |
|
cfcffa21ab | 6 months ago |
|
7b2d382fa1 | 6 months ago |
|
594663d377 | 6 months ago |
|
b669f00d92 | 6 months ago |
|
32252167c4 | 6 months ago |
|
06000e56fa | 6 months ago |
|
c7da869fda | 6 months ago |
|
b6585d83d5 | 6 months ago |
|
dbe554bc83 | 6 months ago |
|
f27c56436b | 6 months ago |
|
472e912b05 | 6 months ago |
|
64e73950e2 | 6 months ago |
|
fa89909fa5 | 6 months ago |
|
d3d443bcce | 6 months ago |
|
83fea5c94c | 6 months ago |
|
65b823719d | 6 months ago |
|
976a3911ac | 6 months ago |
@ -1,5 +1,5 @@ |
||||
# 变量必须以 VITE_ 为前缀才能暴露给外部读取 |
||||
NODE_ENV = 'development' |
||||
VITE_APP_TITLE = '高赛通' |
||||
VITE_APP_BASE_API = http://localhost:18085/jeecg-boot |
||||
VITE_APP_TITLE = '高赛通单项目' |
||||
VITE_APP_BASE_API = http://182.92.169.222:18086/jeecg-boot |
||||
# VITE_APP_BASE_API = 'http://127.0.0.1:8080' |
After Width: | Height: | Size: 1.1 KiB |
@ -0,0 +1,36 @@ |
||||
import request from "@/utils/requset"; |
||||
|
||||
// 获取年度比赛和项目
|
||||
export const getOldRaceList = (params:any) => { |
||||
return request({ |
||||
url: '/annualcompetitionprojectregistration/annualCompetitionProjectRegistration/queryCompInfo4Stu', |
||||
method: 'get', |
||||
params |
||||
}) |
||||
} |
||||
// 查询报名信息
|
||||
export const getOldRaceInfo = (params:any) => { |
||||
return request({ |
||||
url: '/annualcompetitionprojectregistration/annualCompetitionProjectRegistration/queryTopicById', |
||||
method: 'get', |
||||
params |
||||
}) |
||||
} |
||||
|
||||
// 查询团队成员列表
|
||||
export const getTeamList = (params:any) => { |
||||
return request({ |
||||
url: 'annualcompetitionprojectregistration/annualCompetitionProjectRegistration/queryTeamManagementByMainId', |
||||
method: 'get', |
||||
params |
||||
}) |
||||
} |
||||
|
||||
// 获取指导老师列表
|
||||
export const getTeacherList = (params:any) => { |
||||
return request({ |
||||
url: 'annualcompetitionprojectregistration/annualCompetitionProjectRegistration/queryInstructorSheetByMainId', |
||||
method: 'get', |
||||
params |
||||
}) |
||||
} |
After Width: | Height: | Size: 49 KiB |
After Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 143 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 1.8 KiB |
@ -1,8 +1,9 @@ |
||||
import defaultImage from '@/assets/images/item.png'; |
||||
export default { |
||||
mounted(el: any, binding: any) { |
||||
el.onerror = () => { |
||||
// 当图片加载失败时,设置默认图片
|
||||
el.src = binding.value || '/src/assets/images/item.png' // 默认图片
|
||||
el.src = binding.value || defaultImage // 默认图片
|
||||
} |
||||
}, |
||||
} |
||||
|
@ -0,0 +1,19 @@ |
||||
import { defineStore } from 'pinia' |
||||
import { getLogo } from '@/api/setting' |
||||
const settingStore = defineStore('setting', { |
||||
state: () => ({ |
||||
logo: '', |
||||
}), |
||||
actions: { |
||||
setLogo() { |
||||
getLogo().then((res: any) => { |
||||
console.log(res, 'this.logo') |
||||
this.logo = res.result.logo |
||||
|
||||
|
||||
document.querySelector("link[rel~='icon']").href = import.meta.env.VITE_APP_BASE_API + '/' + this.logo |
||||
}) |
||||
}, |
||||
}, |
||||
}) |
||||
export default settingStore |
@ -1,183 +1,161 @@ |
||||
<template> |
||||
<div class="main"> |
||||
<el-tabs |
||||
v-model="activeName" |
||||
style="max-width: 70%; margin: auto" |
||||
class="container" |
||||
@tab-click="handleTabClick" |
||||
> |
||||
<el-tab-pane |
||||
v-for="category in categories" |
||||
:key="category.id" |
||||
:label="category.name" |
||||
:name="category.id" |
||||
> |
||||
<ul> |
||||
<li |
||||
v-for="newsItem in getNewsItemsForCategory(category)" |
||||
:key="newsItem.id" |
||||
> |
||||
<div class="box-list" @click.stop="handleNewsClick(newsItem)"> |
||||
<div class="left-box-list"> |
||||
<p class="list-title">{{ newsItem.title }}</p> |
||||
<p class="list-summary"> |
||||
{{ stripHtmlTags(newsItem.summary) }} |
||||
</p> |
||||
<p class="list-time">{{ newsItem.date }}</p> |
||||
<div class="container"> |
||||
<div class="news-list"> |
||||
<div class="item" v-for="(item,index) in newsList" :key="item.id"> |
||||
<div class="news-title" :id="index.toString()">{{ item.name }}</div> |
||||
<div class="children"> |
||||
<div class="son-item" v-for="obj in item.cmsArticleList" :key="obj.id" @click="toNewsDetail(obj.id)"> |
||||
<div class="left"> |
||||
<div class="title">{{ obj.title }}</div> |
||||
<div class="content"> |
||||
{{ obj.info }} |
||||
</div> |
||||
<img |
||||
class="news-image" |
||||
:src="newsItem.imageUrl" |
||||
alt="News Image" |
||||
v-default-image |
||||
/> |
||||
<div class="time"><div>{{ obj.publishTime }}</div> <div style="margin-left: 20px;">发布人:{{ obj.createBy }}</div></div> |
||||
</div> |
||||
<el-divider /> |
||||
</li> |
||||
</ul> |
||||
</el-tab-pane> |
||||
</el-tabs> |
||||
<div class="right"> |
||||
<img :src="setImageUrl(obj.comimg)" alt="" v-default-image/> |
||||
</div> |
||||
</div> |
||||
<el-empty description="无新闻" v-if="item.cmsArticleList.length === 0" style="height: 200px;"/> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<!-- 右侧栏目 --> |
||||
</div> |
||||
<div class="right-coulom"> |
||||
<div :class="active === index ? 'item active' : 'item' " @click="scrollById(index)" v-for="(item,index) in columnList" :key="item">{{ item }}</div> |
||||
|
||||
</div> |
||||
</template> |
||||
<script setup lang="ts"> |
||||
import { ref, onMounted } from 'vue' |
||||
import { useRouter } from 'vue-router' |
||||
import { getColumnListApi, queryEssayListApi } from '@/api/news' |
||||
let categories = ref([]) |
||||
let newsItems = ref({}) |
||||
let activeName = ref('') |
||||
const router = useRouter() |
||||
|
||||
//使用正则表达式转换html标签文本 |
||||
function stripHtmlTags(html) { |
||||
return html.replace(/<[^>]*>/g, '') |
||||
} |
||||
|
||||
// 获取栏目信息 |
||||
const fetchColumnList = async () => { |
||||
const response = await getColumnListApi() |
||||
if (response.success && response.result) { |
||||
categories.value = response.result.filter( |
||||
(category) => category.isShow === '1', |
||||
) |
||||
// 尝试立即加载第一个栏目的新闻列表 |
||||
if (categories.value.length > 0) { |
||||
await fetchNewsList(categories.value[0].id) |
||||
activeName.value = categories.value[0].id |
||||
} |
||||
} |
||||
} |
||||
import { getNewsListApi } from '@/api/news' |
||||
|
||||
// 栏目新闻列表查询 |
||||
const fetchNewsList = async (categoryId) => { |
||||
try { |
||||
const response = await queryEssayListApi(categoryId) |
||||
// console.log(response.success,'是否有响应') |
||||
// console.log(response.result.records,'获取的响应数据') |
||||
if (response.success && response.result.records) { |
||||
newsItems.value[categoryId] = response.result.records.map((data) => ({ |
||||
id: data.id, |
||||
title: data.title, |
||||
date: data.publishTime, |
||||
summary: data.content, |
||||
imageUrl: data.comimg ? getAbsoluteImagePath(data.comimg) : '', |
||||
})) |
||||
} |
||||
} catch (error) { |
||||
console.error('获取新闻列表失败', error) |
||||
} |
||||
} |
||||
|
||||
//获取图片完整地址 |
||||
const getAbsoluteImagePath = (relativePath) => { |
||||
const baseImageUrl = 'https://localhost:18085/jeecg-boot/' // 替换为实际的服务器地址 |
||||
return baseImageUrl + relativePath |
||||
} |
||||
|
||||
// 获取指定栏目的新闻列表 |
||||
const getNewsItemsForCategory = (category) => { |
||||
return newsItems.value[category.id] || [] |
||||
} |
||||
|
||||
// 初始化加载栏目列表 |
||||
onMounted(() => { |
||||
fetchColumnList() |
||||
}) |
||||
|
||||
// 当选项卡改变时更新当前显示的新闻列表 |
||||
const handleTabClick = async (tab) => { |
||||
const categoryId = tab.props.name |
||||
if (!newsItems.value[categoryId]?.length) { |
||||
await fetchNewsList(categoryId) |
||||
} |
||||
activeName.value = categoryId |
||||
} |
||||
|
||||
// 处理新闻条目的点击事件 |
||||
const handleNewsClick = (newsItem) => { |
||||
const router = useRouter() |
||||
const newsList = ref<any>([]) |
||||
const columnList = ref<any>([]) |
||||
const active = ref(0) |
||||
const getNewsListApiEvent = async () => { |
||||
const res:any = await getNewsListApi() |
||||
console.log(res, '212121') |
||||
columnList.value = res.result.map(item => item.name) |
||||
newsList.value = res.result |
||||
} |
||||
getNewsListApiEvent() |
||||
const scrollById = (index: number) => { |
||||
active.value = index |
||||
const targetPosition = (document.getElementById(index.toString()) as HTMLElement).offsetTop - 120; |
||||
window.scrollTo({ |
||||
top: targetPosition, |
||||
behavior: 'smooth', // 平滑滚动 |
||||
}); |
||||
} |
||||
const toNewsDetail = (id: number) => { |
||||
router.push({ |
||||
name: 'newsDetail', |
||||
params: { id: newsItem.id.toString() }, |
||||
path: '/detail/' + id |
||||
}) |
||||
} |
||||
</script> |
||||
<style scoped> |
||||
.main { |
||||
margin-top: 100px; |
||||
const setImageUrl = (url: string) => { |
||||
return import.meta.env.VITE_APP_BASE_API + '/sys/common/static/' + url |
||||
} |
||||
</script> |
||||
<style scoped lang="scss"> |
||||
.container { |
||||
width: 1200px; |
||||
margin: auto; |
||||
height: 98vh; |
||||
overflow-y: scroll; |
||||
padding: 0; |
||||
display: block; |
||||
} |
||||
.container::-webkit-scrollbar { |
||||
width: 0; |
||||
} |
||||
.box-list { |
||||
display: flex; |
||||
width: 95%; |
||||
height: 100px; |
||||
margin-left: 30px; |
||||
margin-bottom: 10px; |
||||
align-items: center; |
||||
cursor: pointer; /* 默认鼠标指针形状 */ |
||||
} |
||||
.box-list:hover { |
||||
background-color: lightgrey; /* 鼠标悬停时改变背景颜色 */ |
||||
} |
||||
.left-box-list { |
||||
display: flex; |
||||
flex-direction: column; |
||||
justify-content: space-between; |
||||
flex: 1; |
||||
padding-right: 10px; |
||||
} |
||||
.list-title { |
||||
font-size: 22px; |
||||
margin-left: 60px; |
||||
} |
||||
.list-summary { |
||||
font-size: 16px; |
||||
margin-left: 60px; |
||||
margin-top: 15px; |
||||
color: #999999; |
||||
display: -webkit-box; |
||||
-webkit-box-orient: vertical; |
||||
-webkit-line-clamp: 1; |
||||
overflow: hidden; |
||||
text-overflow: ellipsis; /* 溢出部分显示为省略号 */ |
||||
max-width: calc(100% - 130px); /* 减去右侧图片宽度和内边距 */ |
||||
} |
||||
.list-time { |
||||
margin-left: 60px; |
||||
margin-top: 20px; |
||||
color: #999999; |
||||
margin-top: 100px; |
||||
.news-list { |
||||
width: 100%; |
||||
// height: 900px; |
||||
// background-color: #f2f3f5; |
||||
padding: 15px; |
||||
border: 1px solid #f2f3f5; |
||||
border-radius: 5px; |
||||
.item { |
||||
.news-title { |
||||
font-size: 24px; |
||||
font-weight: 700; |
||||
} |
||||
.children { |
||||
margin: 20px 0; |
||||
.son-item { |
||||
width: 100%; |
||||
height: 100px; |
||||
background-color: #fff; |
||||
padding: 15px; |
||||
display: flex; |
||||
border-bottom: 1px solid rgba(228, 230, 235, 0.5); |
||||
justify-content: space-between; |
||||
cursor: pointer; |
||||
.left { |
||||
width: 1000px; |
||||
.title { |
||||
font-size: 18px; |
||||
font-weight: 700; |
||||
color: #4f5153; |
||||
} |
||||
.content { |
||||
margin-top: 8px; |
||||
font-size: 13px; |
||||
color: #8a919f; |
||||
display: -webkit-box; |
||||
-webkit-line-clamp: 1; |
||||
-webkit-box-orient: vertical; |
||||
overflow: hidden; |
||||
} |
||||
.time { |
||||
margin-top: 8px; |
||||
font-size: 12px; |
||||
color: #8a919f; |
||||
display: flex; |
||||
} |
||||
} |
||||
.right { |
||||
display: flex; |
||||
flex: 1; |
||||
align-items: center; |
||||
justify-content: center; |
||||
img { |
||||
width: 100%; |
||||
height: 100%; |
||||
} |
||||
} |
||||
&:hover { |
||||
background-color: #f7f8fa; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
.news-image { |
||||
width: 100px; |
||||
height: 80px; |
||||
margin-right: 30px; |
||||
.right-coulom { |
||||
position: fixed; |
||||
left: 200px; |
||||
top: 100px; |
||||
z-index: 999; |
||||
width: 150px; |
||||
// height: 300px; |
||||
background-color: #f2f3f5; |
||||
padding: 10px; |
||||
border-radius: 5px; |
||||
.item { |
||||
height: 45px; |
||||
// text-align: center; |
||||
line-height: 22px; |
||||
font-size: 16px; |
||||
padding: 10px; |
||||
border-radius: 5px; |
||||
cursor: pointer; |
||||
margin: 5px 0; |
||||
&:hover { |
||||
background-color: #0bd7c628; |
||||
color: #0bd7c6; |
||||
} |
||||
} |
||||
.active { |
||||
background-color: #0bd7c628; |
||||
color: #0bd7c6; |
||||
} |
||||
} |
||||
</style> |
||||
|
@ -0,0 +1,336 @@ |
||||
<template> |
||||
<div class="container"> |
||||
<el-card> |
||||
<template #header> |
||||
<div style="font-size: 16px; font-weight: 600">我的比赛</div> |
||||
</template> |
||||
<el-table :data="list" v-loading="isLoading"> |
||||
<el-table-column |
||||
label="年度比赛名称" |
||||
prop="compName" |
||||
/> |
||||
<!-- <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 }"> |
||||
<el-button |
||||
link |
||||
type="primary" |
||||
size="small" |
||||
@click="saveEvent(row.enrollCode)" |
||||
v-if="row.workStatus == '4' || row.enrollStatic == '3'" |
||||
> |
||||
提交 |
||||
</el-button> |
||||
<el-button |
||||
link |
||||
type="primary" |
||||
size="small" |
||||
@click="editEvent(row.id,row.annualCompid,row.enrollCode,row.entryFormat)" |
||||
v-if="row.enrollStatic == '1' || row.enrollStatic == '3'" |
||||
> |
||||
编辑 |
||||
</el-button> |
||||
|
||||
<el-button |
||||
link |
||||
type="primary" |
||||
size="small" |
||||
@click="InfoEvent(row.id,row.annualCompid,row.enrollCode,row.entryFormat)" |
||||
> |
||||
详情 |
||||
</el-button> |
||||
<el-button |
||||
link |
||||
type="warning" |
||||
size="small" |
||||
v-if="row.enrollStatic == '1'" |
||||
@click="cancelEvent(row.id)" |
||||
> |
||||
取消 |
||||
</el-button> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
<div class="page"> |
||||
<el-pagination |
||||
background |
||||
layout="prev, pager, next" |
||||
@change="headerChange" |
||||
:size="page.pageSize" |
||||
:total="total" |
||||
/> |
||||
</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"> |
||||
import { ref } from 'vue' |
||||
|
||||
import { getStuRaceList, uploadFileZp, sava ,cancelRace} from '@/api/race' |
||||
import { ElMessage } from 'element-plus' |
||||
import { useRouter } from 'vue-router' |
||||
const router = useRouter() |
||||
const list = ref<any>([]) |
||||
const page = ref<any>({ |
||||
pageNo: 1, |
||||
pageSize: 10, |
||||
}) |
||||
const total = ref(0) |
||||
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 |
||||
} |
||||
getList() |
||||
const fileList = ref<any>([]) |
||||
const raceName = ref<any>('') |
||||
const dialogVisible = ref(false) |
||||
const annualCompid = ref('') |
||||
const uploadZp = (id: any, staus: any) => { |
||||
if (staus != 2) return ElMessage.warning('审核后方可上传作品') |
||||
console.log(id) |
||||
annualCompid.value = id |
||||
dialogVisible.value = true |
||||
} |
||||
const handleClose = () => { |
||||
dialogVisible.value = false |
||||
fileList.value = [] |
||||
raceName.value = '' |
||||
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/zuopin/' + 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 }) |
||||
ElMessage.success(res.message) |
||||
getList() |
||||
|
||||
} |
||||
|
||||
const formatstatus = (status: any) => { |
||||
if (!status) return '未上传作品' |
||||
switch (status) { |
||||
case '0': |
||||
return '待评分' |
||||
break |
||||
case '1': |
||||
return '已评分' |
||||
break |
||||
case '2': |
||||
return '待驳回' |
||||
break |
||||
case '3': |
||||
return '已驳回' |
||||
break |
||||
case '4': |
||||
return '待提交' |
||||
break |
||||
case '5': |
||||
return '已提交' |
||||
break |
||||
} |
||||
} |
||||
|
||||
const editEvent = (id: any,annualCompid: any,enrollCode:any,entryFormat:any) => { |
||||
if(entryFormat == '团队'){ |
||||
router.push({ |
||||
path: '/registrationGroup', |
||||
query:{ |
||||
id, |
||||
annualCompid, |
||||
enrollCode, |
||||
edit: true |
||||
} |
||||
}) |
||||
}else{ |
||||
router.push({ |
||||
path: 'registrationPersonage', |
||||
query:{ |
||||
id, |
||||
annualCompid, |
||||
enrollCode, |
||||
edit: true |
||||
} |
||||
}) |
||||
} |
||||
console.log(id); |
||||
|
||||
|
||||
} |
||||
|
||||
const InfoEvent = (id: any,annualCompid: any,enrollCode:any,entryFormat:any) => { |
||||
if(entryFormat == '团队'){ |
||||
router.push({ |
||||
path: '/registrationGroup', |
||||
query:{ |
||||
id, |
||||
annualCompid, |
||||
enrollCode, |
||||
edit: true, |
||||
info: true |
||||
} |
||||
}) |
||||
}else{ |
||||
router.push({ |
||||
path: 'registrationPersonage', |
||||
query:{ |
||||
id, |
||||
annualCompid, |
||||
enrollCode, |
||||
edit: true, |
||||
info: true |
||||
|
||||
} |
||||
}) |
||||
} |
||||
// router.push({ |
||||
// path: '/registrationGroup', |
||||
// query:{ |
||||
// id, |
||||
// annualCompid, |
||||
// enrollCode, |
||||
// edit: true, |
||||
// info: true |
||||
// } |
||||
// }) |
||||
} |
||||
|
||||
const cancelEvent = async (id: any) => { |
||||
const res: any = await cancelRace({id }) |
||||
ElMessage.success(res.message) |
||||
getList() |
||||
} |
||||
</script> |
||||
|
||||
<style scoped lang="scss"> |
||||
.container { |
||||
margin-top: 25px; |
||||
.page { |
||||
display: flex; |
||||
margin-top: 20px; |
||||
justify-content: center; |
||||
} |
||||
} |
||||
:deep(.el-table__row) { |
||||
height: 50px; |
||||
} |
||||
</style> |