喻忠伟 6 months ago
commit 737b66205c
  1. 2
      src/Layout/tabbar/index.vue
  2. 3
      src/api/race.ts
  3. 6
      src/views/login/index.vue
  4. 4
      src/views/raceInfo/index.vue
  5. 22
      src/views/registrationGroup/components/stuList.vue
  6. 9
      src/views/registrationGroup/index.vue
  7. 45
      src/views/userInfo/components/reacList.vue
  8. 4
      src/views/userInfo/index.vue

@ -30,7 +30,7 @@
</div>
</div>
<div class="right" v-if="!useUserStore.token">
<div class="registered gradient" @click="$router.push('/login')">
<div class="registered gradient" @click="$router.push('/login?registered=true')">
注册
</div>
<div class="login" @click="$router.push('/login')">登录</div>

@ -89,9 +89,10 @@ export const getHistoryRaceList = (params: any) => {
})
}
// 获取学生参加的比赛
export const getStuRaceList = () => {
export const getStuRaceList = (params:any) => {
return request({
url: '/annualcompetitionprojectregistration/annualCompetitionProjectRegistration/list4Stu',
params
})
}

@ -43,8 +43,9 @@ import { onMounted, reactive, ref, toRefs, watch } from 'vue'
import { getCode } from '@/api/user'
import userStore from '@/store/module/user'
import { ElMessage } from 'element-plus'
import { useRouter } from 'vue-router'
import { useRouter,useRoute } from 'vue-router'
import RegisTered from './registered.vue'
const route = useRoute()
const useUserStore = userStore()
const form = ref({
account: '',
@ -91,6 +92,9 @@ onMounted(() => {
// setTimeout(() => {
// getcodeinfo()
// },6000)
if(route.query.registered){
registered()
}
})
const keyDown = (e: any) => {
//

@ -2,7 +2,9 @@
<div class="container-1420 container">
<div class="top-image">Banner</div>
<!-- 年度比赛列表 -->
<div style="margin-top: 30px;font-size: 24px;font-weight: 600;">年度比赛列表:</div>
<div class="race-list">
<div
class="item"
v-for="item in reacProjectList"
@ -223,7 +225,7 @@ getHistoryRaceListEvent()
grid-template-columns: repeat(4, 1fr);
// grid-template-rows: repeat(2, 1fr);
// gap: 10px;
margin-top: 40px;
// margin-top: 10px;
.item {
width: 340px;
height: 360px;

@ -96,17 +96,19 @@ const options = [
//
const tableData = reactive<any[]>([])
// onMounted(() => {
// setTimeout(() => {
// tableData.push({
// userId: userModel.userInfo.id,
// realname: userModel.userInfo.realname,
// captain: '1',
// teamSeq: 1,
// })
// }, 50)
// })
onMounted(() => {
if(tableData.length === 1) return
setTimeout(() => {
tableData.push({
userId: userModel.userInfo.id,
realname: userModel.userInfo.realname,
captain: '1',
teamSeq: 1,
})
}, 50)
})
watch(()=>userModel.userInfo,()=>{
if(tableData.length === 1) return
tableData.push({
userId: userModel.userInfo.id,
realname: userModel.userInfo.realname,

@ -163,7 +163,7 @@
</template>
<script lang="ts" setup>
import { reactive, ref, toRefs } from 'vue'
import { reactive, ref, toRefs,nextTick } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import userStore from '@/store/module/user'
import type { FormInstance, FormRules } from 'element-plus'
@ -244,9 +244,12 @@ const options = ref([])
const getTopicListApi = async () => {
const res: any = await getTopicList({ annualCompid: route.query.id })
console.log(res)
if(!(res.result.length == 0)){
ruleForm.topicid = res.result[0].id
nextTick(( ) => {
if(res.result.length != 0){
ruleForm.topicId = res.result[0].id
}
})
options.value = res.result.map((item) => {
return {
value: item.id,

@ -4,8 +4,11 @@
<template #header>
<div style="font-size: 16px; font-weight: 600">我的比赛</div>
</template>
<el-table :data="list">
<el-table-column label="比赛名称" prop="annualCompid_dictText" />
<el-table :data="list" v-loading="isLoading">
<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" />
@ -24,6 +27,9 @@
</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
@ -35,10 +41,10 @@
:close-on-click-modal="false"
>
<el-form label-width="80" style="padding-right: 30px">
<el-form-item label="比赛名称">
<el-form-item label="作品名称">
<el-input v-model="raceName" />
</el-form-item>
<el-form-item label="证书">
<el-form-item label="作品">
<el-upload
ref="upload"
class="upload-demo"
@ -48,7 +54,7 @@
:auto-upload="false"
>
<template #trigger>
<el-button type="primary" >选择文件</el-button>
<el-button type="primary">选择文件</el-button>
</template>
<template #tip>
@ -71,11 +77,22 @@ import { ref } from 'vue'
import { getStuRaceList, uploadFileZp } from '@/api/race'
import { ElMessage } from 'element-plus'
import { head } from 'node_modules/axios/index.d.cts';
const list = ref<any>([])
const page = ref<any>({
pageNo: 1,
pageSize: 10,
})
const total = ref(0)
const isLoading = ref(false)
const getList = async () => {
const res: any = await getStuRaceList()
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>([])
@ -102,7 +119,7 @@ const submit = async () => {
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) => {
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)
@ -110,10 +127,24 @@ const submit = async () => {
console.log(res)
handleClose()
}
const headerChange = (pageNumber: any) => {
console.log(pageNumber);
page.value.pageNo = pageNumber
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>

@ -68,7 +68,7 @@
</div>
</div>
</div>
<div class="right">
<!-- <div class="right">
<div
class="personalAbilityEvaluationCollectList gradient"
@click="Router.push('/personalAbilityEvaluationCollectList')"
@ -87,7 +87,7 @@
>
个人能力报告
</div>
</div>
</div> -->
</div>
</el-card>
<reacList />

Loading…
Cancel
Save