GST002_H5
Ly 2 months ago
parent b2348f69c2
commit e8bb9df9ce
  1. 14
      src/views/registrationGroup/index.vue
  2. 65
      src/views/registrationPersonage/index.vue

@ -126,8 +126,9 @@
</el-card> </el-card>
<div class="bottom"> <div class="bottom">
<el-button class="btn" @click="$router.back()">{{ isDisable ? '返回' : isEdit ? '取消修改' : '取消报名' }}</el-button> <el-button class="btn" @click="$router.back()">{{ isDisable ? '返回' : isEdit ? '取消修改' : '取消报名' }}</el-button>
<el-button class="btn cyan" @click="submit" :loading="loading" v-if=!isDisable> <el-button class="btn temp" @click="submit('2')" v-if="!isDisable">暂存信息</el-button>
{{ isEdit ? '确认修改' : '确认报名' }} <el-button class="btn cyan" :loading="loading" @click="submit('1')" v-if="!isDisable">
{{ isEdit ? '确认修改' : '确认报名' }}
</el-button> </el-button>
</div> </div>
</div> </div>
@ -235,11 +236,11 @@ const stuRef = ref<any>(null)
const teaRef = ref<any>(null) const teaRef = ref<any>(null)
const loading = ref(false) const loading = ref(false)
const submit = () => { const submit = (substa:string) => {
if (!ruleForm.teamName) return ElMessage.warning('请输入队伍名称') if (!ruleForm.teamName) return ElMessage.warning('请输入队伍名称')
ruleForm.instructorSheetList = [...teaRef.value.submit()] ruleForm.instructorSheetList = [...teaRef.value.submit()]
ruleForm.teamManagementList = [...stuRef.value.submit()] ruleForm.teamManagementList = [...stuRef.value.submit()]
loading.value = true ruleForm.substa = substa
ruleForm.id = route.query.id ruleForm.id = route.query.id
// ruleForm.annualCompid = route.query.id // ruleForm.annualCompid = route.query.id
if(route.query.edit){ if(route.query.edit){
@ -247,7 +248,10 @@ const submit = () => {
ruleForm.id = route.query.annualCompid ruleForm.id = route.query.annualCompid
} }
ruleForm.substa = "1" if(substa == '1'){
loading.value = true
}
// ruleForm.substa = "1"
getSignUpApi(ruleForm) getSignUpApi(ruleForm)
.then((res: any) => { .then((res: any) => {
ElMessage({ ElMessage({

@ -46,6 +46,31 @@
</div> </div>
</div> </div>
</el-card> </el-card>
<!-- 项目信息 -->
<el-card class="com">
<div class="title">比赛项目信息</div>
<div class="content track">
<div class="card-annual padding">
<p>{{ ndbsXm.objName }}</p>
</div>
<div class="right">
<div class="info-box">
<div class="name">项目名称</div>
<div class="title">{{ ndbsXm.objName }}</div>
<div class="name">要求人数</div>
<div class="title">{{ ndbsXm.workCount }}</div>
<div class="date-box">
<div class="label">开始报名时间</div>
<div class="date">{{ ndbsXm.starttime?.split(' ')[0] }}</div>
</div>
<div class="date-box">
<div class="label">开始截至时间</div>
<div class="date">{{ ndbsXm.endtime?.split(' ')[0] }}</div>
</div>
</div>
</div>
</div>
</el-card>
</div> </div>
<el-card> <el-card>
<div> <div>
@ -57,7 +82,6 @@
<el-form-item label="参赛形式"> <el-form-item label="参赛形式">
<el-input v-model="ruleForm.entryFormat" type="text" disabled /> <el-input v-model="ruleForm.entryFormat" type="text" disabled />
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
</el-card> </el-card>
@ -151,7 +175,7 @@
</template> </template>
<template #tip> <template #tip>
<div class="el-upload__tip text-red">作品只允许上传一个,格式为{{ndbs.uploadWorksType}}</div> <div class="el-upload__tip text-red">作品只允许上传一个,格式为{{ndbsXm.uploadWorksType}}</div>
</template> </template>
</el-upload> </el-upload>
@ -210,8 +234,6 @@ const annualCompid = ref('')
const raceName = ref<any>('') const raceName = ref<any>('')
const uploadZp = (id: any) => { const uploadZp = (id: any) => {
console.log(id)
annualCompid.value = id annualCompid.value = id
dialogVisible.value = true dialogVisible.value = true
} }
@ -256,8 +278,9 @@ const submitWork = async () => {
// //
const ndbs = ref<any>({}) const ndbs = ref<any>({})
const ndbsXm = ref<any>({})
const subLoading = ref(false) const subLoading = ref(false)
async function submit(substa:string) { async function submit(substa:string) {
@ -267,17 +290,11 @@ async function submit(substa:string) {
upData.value.workName = WorkName.value upData.value.workName = WorkName.value
upData.value.files = fileUrl.value upData.value.files = fileUrl.value
upData.value.substa = substa upData.value.substa = substa
// if (!upData.value.teamName) {
// ElMessage({
// message: '',
// type: 'warning',
// })
// return
// }
try { try {
if(substa == '1'){
subLoading.value = true subLoading.value = true
}
const res: any = await getSignUpApi({ ...upData.value }) const res: any = await getSignUpApi({ ...upData.value })
console.log(res, 999999999)
ElMessage({ ElMessage({
message: res?.message || res?.result || '报名成功', message: res?.message || res?.result || '报名成功',
type: 'success', type: 'success',
@ -311,21 +328,14 @@ if (route.query.edit) {
const getOldRaceListEvent = async () => { const getOldRaceListEvent = async () => {
const res: any = await getOldRaceList({ id: route.query.id }) const res: any = await getOldRaceList({ id: route.query.id })
ndbs.value = res.result.annualComp ndbs.value = res.result.annualComp
ndbsXm.value = res.result.annualCompPoint
} }
const getOldRaceInfoEvent = async () => { const getOldRaceInfoEvent = async () => {
const res: any = await getOldRaceInfo({ id: route.query.id }) const res: any = await getOldRaceInfo({ id: route.query.id })
ruleForm.annualCompid = route.query.annualCompid ruleForm.annualCompid = route.query.annualCompid
ruleForm.teamName = res.result.teamName ruleForm.teamName = res.result.teamName
ruleForm.topicid = res.result.topicObj ? res.result.topicObj.id : ''
ruleForm.objName = res.result.annualCompPointName
ruleForm.requireUploadWorks = res.result.requireUploadWorks ruleForm.requireUploadWorks = res.result.requireUploadWorks
WorkName.value = res.result.uploadFile.topicName ruleForm.objName = res.result.annualCompPointName
options.value = res.result.topicList.map((item) => {
return {
value: item.id,
label: item.name,
}
})
} }
getOldRaceListEvent() getOldRaceListEvent()
@ -334,11 +344,12 @@ if (route.query.edit) {
getNdbswxqList(route.query.bcId as string).then((res: any) => { getNdbswxqList(route.query.bcId as string).then((res: any) => {
if (res.result) ndbs.value = res.result if (res.result) ndbs.value = res.result
}) })
getComppxqList(route.query.id as string).then((res: any) => {
if (res.result) ndbsXm.value = res.result
})
} }
/*const getTopicListApi = async () => { /*const getTopicListApi = async () => {
const res: any = await getTopicList({ annualCompid: route.query.id }) const res: any = await getTopicList({ annualCompid: route.query.id })
console.log(res)
nextTick(() => { nextTick(() => {
if (res.result.length != 0) { if (res.result.length != 0) {
ruleForm.topicid = res.result[0].id ruleForm.topicid = res.result[0].id
@ -429,7 +440,7 @@ getTopicListApi()*/
height: 300px; height: 300px;
.com { .com {
width: 100%; width: 685px;
height: 300px; height: 300px;
border-radius: 6px 6px 6px 6px; border-radius: 6px 6px 6px 6px;
padding-top: 22px; padding-top: 22px;
@ -447,7 +458,7 @@ getTopicListApi()*/
margin-bottom: 18px; margin-bottom: 18px;
} }
margin-right: 22px;
.content { .content {
display: flex; display: flex;
@ -498,7 +509,7 @@ getTopicListApi()*/
.right { .right {
.info-box { .info-box {
width: 100%; width: 210px;
.name { .name {
height: 20px; height: 20px;

Loading…
Cancel
Save