报名修复

master
lion 2 weeks ago
parent c12285604a
commit deac3da48f

@ -113,14 +113,14 @@
<xy-table :list="list" :total="total" :showIndex="false" @pageIndexChange="pageIndexChange"
@pageSizeChange="pageSizeChange" :table-item="table_item" @selection-change="selectionChange">
<template v-slot:index>
<el-table-column align='center' fixed="left" label="" width="50" header-align="center">
<el-table-column key="apply-index" align='center' fixed="left" label="" width="50" header-align="center">
<template slot-scope="scope">
{{getIndex(scope.$index)}}
</template>
</el-table-column>
</template>
<template v-slot:course_signs>
<el-table-column align='left' label="历史报名信息" width="380" header-align="center">
<el-table-column key="apply-course_signs" align='left' label="历史报名信息" width="380" header-align="center">
<template slot-scope="scope">
<div v-if="scope.row.user && scope.row.user.course_signs && scope.row.user.course_signs.length>0">
<div v-for="(item,index) in scope.row.user.course_signs">
@ -143,7 +143,7 @@
</el-table-column>
</template>
<template v-slot:username>
<el-table-column align='center' label="姓名" width="120" header-align="center">
<el-table-column key="apply-username" align='center' label="姓名" width="120" header-align="center">
<template slot-scope="scope">
<div style="color:red" v-if="getPropValueIfExists(scope.row.change_data,'username')">
{{getPropValueIfExists(scope.row.change_data,'username')}}
@ -165,7 +165,7 @@
</el-table-column>
</template>
<template v-slot:status>
<el-table-column align='center' label="状态" width="120" header-align="center">
<el-table-column key="apply-status" align='center' label="状态" width="120" header-align="center">
<template slot-scope="scope">
<div v-for="item in apply_status_list">
<el-tag :type="item.type" v-if="scope.row.status==item.id">{{item.value}}</el-tag>
@ -174,7 +174,7 @@
</el-table-column>
</template>
<template v-slot:btns>
<el-table-column align='left' fixed="right" label="操作" width="220" header-align="center">
<el-table-column key="apply-btns" align='left' fixed="right" label="操作" width="220" header-align="center">
<template slot-scope="scope">
<!-- v-if="scope.row.status===0" -->
<el-button type="primary" size="small" @click="showDetail('check',scope.row)">审核</el-button>
@ -243,7 +243,7 @@
selectids: [],
list: [],
total: 0,
table_item: [{ prop: 'replacement_text', label: '报名更换记录', width: 260, align: 'left' }, {
table_item: [{
type: 'selection',
width: 50,
fixed: 'left',

@ -294,7 +294,6 @@ export default {
courseSystemTimer: null, // 定时器
yearConfigs: [], // 年份配置数组
currentYearIndex: 0, // 当前选中的年份索引
yearConfigTimer: null, // 年份切换定时器
// 地图相关
mapType: 'suzhou',
@ -501,17 +500,6 @@ export default {
},
deep: true
},
yearConfigs: {
handler(newVal) {
if (newVal && newVal.length > 0) {
this.currentYearIndex = 0
this.$nextTick(() => {
this.startYearConfigRotation()
})
}
},
deep: true
},
rankingData: {
handler() {
// 当排行数据变化时,重置页码并重新启动轮播
@ -547,9 +535,6 @@ export default {
if (this.courseSystemTimer) {
clearInterval(this.courseSystemTimer)
}
if (this.yearConfigTimer) {
clearInterval(this.yearConfigTimer)
}
if (this.rankingTimer) {
clearInterval(this.rankingTimer)
}
@ -689,11 +674,7 @@ export default {
this.yearConfigs = res.yearConfigs
// 重置当前年份索引
this.currentYearIndex = 0
// 启动年份自动切换
this.$nextTick(() => {
this.scrollToActiveButton()
this.startYearConfigRotation()
})
this.scrollToActiveButton()
}
// 保留原有的 courseTypes 处理逻辑(兼容性)
if (res && res.courseTypes && Array.isArray(res.courseTypes)) {
@ -997,8 +978,6 @@ export default {
this.currentYearIndex = index
// 手动切换时,滚动到对应按钮位置
this.scrollToActiveButton()
// 重新启动自动切换定时器
this.startYearConfigRotation()
},
// 滚动到激活的按钮位置
scrollToActiveButton() {
@ -1033,22 +1012,6 @@ export default {
}
})
},
// 启动年份配置自动切换
startYearConfigRotation() {
// 清除旧的定时器
if (this.yearConfigTimer) {
clearInterval(this.yearConfigTimer)
this.yearConfigTimer = null
}
// 只有当有数据且数据长度大于1时才启动自动切换
if (!this.yearConfigs || this.yearConfigs.length <= 1) return
// 启动自动切换,每5秒切换一次
this.yearConfigTimer = setInterval(() => {
this.currentYearIndex = (this.currentYearIndex + 1) % this.yearConfigs.length
// 切换后滚动到对应按钮位置
this.scrollToActiveButton()
}, 5000)
},
getTooltipOffset(percent) {
const value = Math.max(8, Math.min(parseFloat(percent) || 0, 92))
return `calc(${value}% - 40px)`

@ -385,10 +385,6 @@
// return isImage && isLt2M;
// },
submit() {
if (this.id) {
this.form.id = this.id
}
// 如果是 不通过, remark必填
if(this.form.status===2){
if(this.base.isNull(this.form.reason)){
@ -400,30 +396,26 @@
}
}
let _arr = []
if (this.fileList.length > 0) {
this.fileList.map(item => {
if (item.response) {
_arr.push(item.response.id)
} else {
_arr.push(item.id)
const payload = { id: this.id }
if (this.type === 'setPosition') {
payload.position = this.form.position
} else {
payload.status = this.form.status
payload.reason = this.form.reason
if (this.form.status === 5) payload.giveup_reason = this.form.giveup_reason
if (String(this.form.score) !== String(this.sign_result.score == null ? '' : this.sign_result.score)) {
payload.score = this.form.score
}
if (this.form.status === 1) {
const fileIds = this.fileList.map(file => file.response ? file.response.id : file.id)
const originalIds = (this.sign_result.files || []).map(file => file.id)
if (fileIds.map(String).join(',') !== originalIds.map(String).join(',')) {
payload.file_ids = fileIds
}
})
}
}
this.form.file_ids = _arr
console.log("123")
// return
// 其他的正常更新提交
save({
...this.row,
status: this.form.status,
reason: this.form.reason,
score: this.form.score,
giveup_reason: this.form.giveup_reason,
file_ids: this.form.file_ids,
position: this.form.position
}).then(res => {
save(payload).then(res => {
if (!res || res.errcode) return
this.$message({
type: 'success',
message: this.type === 'check' ? '审核成功' : '设置成功'
@ -471,7 +463,7 @@
this.sign_info = []
}
this.form.status = res.status ? res.status : 0
this.form.score = res.score ? res.score : ''
this.form.score = res.score == null ? '' : res.score
this.form.reason = res.reason ? res.reason : ''
this.form.giveup_reason = res.giveup_reason ? res.giveup_reason : ''
this.fileList = res.files ? res.files : []

Loading…
Cancel
Save