报名 题目

GST002
喻忠伟 2 months ago
parent 8c7ed611c6
commit 906a393e23
  1. 23
      src/views/registrationGroup/index.vue
  2. 27
      src/views/registrationPersonage/index.vue

@ -30,7 +30,7 @@
<div class="info-box">
<div class="name">比赛年度</div>
<div class="title">{{ ndbs.annualid }}年度</div>
<div class="name">比赛名称</div>
<div class="name">年度比赛名称</div>
<div class="title">{{ ndbs.name }}</div>
<div class="date-box">
<div class="label">开始报名时间</div>
@ -113,7 +113,7 @@
label-width="auto"
class="demo-ruleForm"
>
<el-form-item label="年度比赛项目">
<el-form-item label="年度比赛">
<el-input v-model="ruleForm.objName" type="text" disabled />
</el-form-item>
<el-form-item label="参赛形式">
@ -122,16 +122,6 @@
<el-form-item label="队伍名称" prop="teamName">
<el-input v-model="ruleForm.teamName" maxlength="30" type="text" :disabled="isDisable"/>
</el-form-item>
<el-form-item label="选择题目" prop="topicid" v-show="false">
<el-select v-model="ruleForm.topicid" placeholder="请选择题目" :disabled="isDisable">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-form>
</div>
@ -201,10 +191,7 @@ if (route.query.edit) {
}
const getOldRaceInfoEvent = async () => {
const res: any = await getOldRaceInfo({ id: route.query.id})
console.log(res,'res~~~');
// ruleForm.annualCompid = route.query.annualCompid
ruleForm.teamName = res.result.teamName
ruleForm.topicid = res.result.topicObj ? res.result.topicObj.id : ''
ruleForm.objName = res.result.annualCompPointName
options.value = res.result.topicList.map((item) => {
return {
@ -226,9 +213,8 @@ if (route.query.edit) {
//console.log(res.result, 'xm')
if (res.result) ndbsXm.value = res.result
})
const getTopicListApi = async () => {
/*const getTopicListApi = async () => {
const res: any = await getTopicList({ annualCompid: route.query.id })
console.log(res)
nextTick(() => {
if (res.result.length != 0) {
@ -242,7 +228,7 @@ const getTopicListApi = async () => {
}
})
}
getTopicListApi()
getTopicListApi()*/
}
// members: adviser:
@ -269,7 +255,6 @@ const loading = ref(false)
const submit = () => {
if (!ruleForm.teamName) return ElMessage.warning('请输入队伍名称')
if (!ruleForm.topicid) return ElMessage.warning('请选择题目')
ruleForm.instructorSheetList = [...teaRef.value.submit()]
ruleForm.teamManagementList = [...stuRef.value.submit()]
loading.value = true

@ -32,7 +32,7 @@
<div class="info-box">
<div class="name">比赛年度</div>
<div class="title">{{ ndbs.annualid }}年度</div>
<div class="name">比赛名称</div>
<div class="name">年度比赛名称</div>
<div class="title">{{ ndbs.name }}</div>
<div class="date-box">
<div class="label">开始报名时间</div>
@ -76,25 +76,13 @@
<div>
<el-form ref="ruleFormRef" style="max-width: 600px" :model="ruleForm" status-icon label-width="auto"
class="demo-ruleForm">
<el-form-item label="年度比赛项目">
<el-form-item label="年度比赛">
<el-input v-model="ruleForm.objName" type="text" disabled />
</el-form-item>
<el-form-item label="参赛形式">
<el-input v-model="ruleForm.entryFormat" type="text" disabled />
</el-form-item>
<el-form-item label="选择题目" v-show="false">
<el-select v-model="ruleForm.topicid" placeholder="请选择题目" :disabled="isDisable">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="作品文件" v-if="ndbsXm.requireUploadWorks === 'Y'">
<template #default="{ row }">
<el-input style="width: auto;" v-model="WorkName" disabled>
</el-input>
<el-button type="primary" style="margin-left:15px ;" @click="uploadZp(ruleForm.id)">上传作品</el-button>
</template>
</el-form-item>
</el-form>
</div>
</el-card>
@ -265,10 +253,8 @@ const fileUrl = ref<string[]>([]);
const submitWork = async () => {
if (!raceName.value) return ElMessage.warning('请输入作品名称')
if (!fileList.value.length) return ElMessage.warning('请上传作品')
console.log(fileList.value[0].raw, raceName.value, 'fileList.value[0].raw')
const fromData = new FormData()
fromData.append('annualCompid', annualCompid.value)
console.log(annualCompid.value);
fromData.append('file', fileList.value[0].raw)
// fileUrl.value = fileList.value[0].raw.name
fromData.append('workName', raceName.value)
@ -301,12 +287,9 @@ const ndbsXm = ref<any>({})
const subLoading = ref(false)
async function submit(substa:string) {
console.log(ruleForm, 'ruleForm')
if (!ruleForm.topicid) return ElMessage.warning('请选择题目')
upData.value.teamManagementList[0].realname = info.value.realname
upData.value.teamManagementList[0].userId = info.value.id
upData.value.annualCompid = route.query.annualCompid
upData.value.topicid = ruleForm.topicid
upData.value.workName = WorkName.value
upData.value.files = fileUrl.value
upData.value.substa = substa
@ -358,7 +341,6 @@ if (route.query.edit) {
}
const getOldRaceInfoEvent = async () => {
const res: any = await getOldRaceInfo({ id: route.query.id })
console.log(res, 'res~~~')
ruleForm.annualCompid = route.query.annualCompid
ruleForm.teamName = res.result.teamName
ruleForm.topicid = res.result.topicObj ? res.result.topicObj.id : ''
@ -380,11 +362,10 @@ if (route.query.edit) {
if (res.result) ndbs.value = res.result
})
getComppxqList(route.query.id as string).then((res: any) => {
console.log(res.result, 'xm')
if (res.result) ndbsXm.value = res.result
})
}
const getTopicListApi = async () => {
/*const getTopicListApi = async () => {
const res: any = await getTopicList({ annualCompid: route.query.id })
console.log(res)
@ -400,7 +381,7 @@ const getTopicListApi = async () => {
}
})
}
getTopicListApi()
getTopicListApi()*/
</script>
<style lang="scss" scoped>

Loading…
Cancel
Save