|
|
|
|
@ -127,8 +127,20 @@
|
|
|
|
|
<template v-slot:username>
|
|
|
|
|
<el-table-column align='center' label="姓名" width="120" header-align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div>{{scope.row.user.username}}</div>
|
|
|
|
|
<!-- <div style="color:red" v-if="scope.row.change_data && scope.row.change_data.length>0">
|
|
|
|
|
<div style="color:red" v-if="getPropValueIfExists(scope.row.change_data,'username')">
|
|
|
|
|
{{getPropValueIfExists(scope.row.change_data,'username')}}
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else>
|
|
|
|
|
{{scope.row.user.username}}
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <template v-if="scope.row.change_data && scope.row.change_data.length>0">
|
|
|
|
|
<template v-for="item in scope.row.change_data">
|
|
|
|
|
<div style="color:red" v-if="item.username">{{item.username}}000</div>
|
|
|
|
|
<div v-else>{{scope.row.user.username}}</div>
|
|
|
|
|
</template>
|
|
|
|
|
</template>
|
|
|
|
|
<div v-else>{{scope.row.user.username}}222</div>
|
|
|
|
|
<div style="color:red" v-if="scope.row.change_data && scope.row.change_data.length>0">
|
|
|
|
|
报名信息有变更
|
|
|
|
|
</div> -->
|
|
|
|
|
</template>
|
|
|
|
|
@ -138,7 +150,7 @@
|
|
|
|
|
<el-table-column 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>
|
|
|
|
|
<el-tag :type="item.type" v-if="scope.row.status==item.id">{{item.value}}</el-tag>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
@ -239,47 +251,92 @@
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: 120,
|
|
|
|
|
fixed: 'left'
|
|
|
|
|
}, {
|
|
|
|
|
prop: 'user.sex',
|
|
|
|
|
label: '性别',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: 120
|
|
|
|
|
}, {
|
|
|
|
|
prop: 'user.idcard',
|
|
|
|
|
label: '身份证号',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: 180
|
|
|
|
|
}, {
|
|
|
|
|
prop: 'user.mobile',
|
|
|
|
|
label: '联系方式',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: 120,
|
|
|
|
|
}, {
|
|
|
|
|
prop: 'user.birthday',
|
|
|
|
|
label: '出生年月',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: 120,
|
|
|
|
|
}, {
|
|
|
|
|
prop: 'user.email',
|
|
|
|
|
label: '邮箱',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: 120,
|
|
|
|
|
}, {
|
|
|
|
|
width: 120,
|
|
|
|
|
customFn:(row)=>{
|
|
|
|
|
if(this.getPropValueIfExists(row.change_data,'mobile')){
|
|
|
|
|
return (<div style='color:red'>{this.getPropValueIfExists(row.change_data,'mobile')}</div>)
|
|
|
|
|
}else{
|
|
|
|
|
return (<div>{row.user.mobile}</div>)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},{
|
|
|
|
|
prop: 'user.company_name',
|
|
|
|
|
label: '公司名称',
|
|
|
|
|
align: 'left',
|
|
|
|
|
width: 240,
|
|
|
|
|
width: 240,
|
|
|
|
|
customFn:(row)=>{
|
|
|
|
|
if(this.getPropValueIfExists(row.change_data,'company_name')){
|
|
|
|
|
return (<div style='color:red'>{this.getPropValueIfExists(row.change_data,'company_name')}</div>)
|
|
|
|
|
}else{
|
|
|
|
|
return (<div>{row.user.company_name}</div>)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
prop: 'user.company_position',
|
|
|
|
|
label: '职务',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: 120,
|
|
|
|
|
width: 120,
|
|
|
|
|
customFn:(row)=>{
|
|
|
|
|
if(this.getPropValueIfExists(row.change_data,'company_position')){
|
|
|
|
|
return (<div style='color:red'>{this.getPropValueIfExists(row.change_data,'company_position')}</div>)
|
|
|
|
|
}else{
|
|
|
|
|
return (<div>{row.user.company_position}</div>)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},{
|
|
|
|
|
prop: 'user.sex',
|
|
|
|
|
label: '性别',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: 120,
|
|
|
|
|
customFn:(row)=>{
|
|
|
|
|
if(this.getPropValueIfExists(row.change_data,'sex')){
|
|
|
|
|
return (<div style='color:red'>{this.getPropValueIfExists(row.change_data,'sex')}</div>)
|
|
|
|
|
}else{
|
|
|
|
|
return (<div>{row.user.sex}</div>)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// prop: 'user.idcard',
|
|
|
|
|
// label: '身份证号',
|
|
|
|
|
// align: 'center',
|
|
|
|
|
// width: 180
|
|
|
|
|
// },
|
|
|
|
|
{
|
|
|
|
|
prop: 'user.birthday',
|
|
|
|
|
label: '出生年月',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: 120,
|
|
|
|
|
customFn:(row)=>{
|
|
|
|
|
if(this.getPropValueIfExists(row.change_data,'birthday')){
|
|
|
|
|
return (<div style='color:red'>{this.getPropValueIfExists(row.change_data,'birthday')}</div>)
|
|
|
|
|
}else{
|
|
|
|
|
return (<div>{row.user.birthday}</div>)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
prop: 'score',
|
|
|
|
|
label: '评分',
|
|
|
|
|
prop: 'user.email',
|
|
|
|
|
label: '邮箱',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: 120,
|
|
|
|
|
},
|
|
|
|
|
width: 120,
|
|
|
|
|
customFn:(row)=>{
|
|
|
|
|
if(this.getPropValueIfExists(row.change_data,'email')){
|
|
|
|
|
return (<div style='color:red'>{this.getPropValueIfExists(row.change_data,'email')}</div>)
|
|
|
|
|
}else{
|
|
|
|
|
return (<div>{row.user.email}</div>)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// prop: 'score',
|
|
|
|
|
// label: '评分',
|
|
|
|
|
// align: 'center',
|
|
|
|
|
// width: 120,
|
|
|
|
|
// },
|
|
|
|
|
{
|
|
|
|
|
prop: 'created_at',
|
|
|
|
|
label: '报名时间',
|
|
|
|
|
@ -305,7 +362,14 @@
|
|
|
|
|
}
|
|
|
|
|
this.getList()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
methods: {
|
|
|
|
|
getPropValueIfExists(change_data, prop) {
|
|
|
|
|
if (!change_data || !Array.isArray(change_data)) return false;
|
|
|
|
|
|
|
|
|
|
const itemWithProp = change_data.find(item => prop in item);
|
|
|
|
|
console.log("itemWithProp",itemWithProp)
|
|
|
|
|
return itemWithProp ? itemWithProp[prop] : false;
|
|
|
|
|
},
|
|
|
|
|
changeSelectType(e, selectName) {
|
|
|
|
|
if (e) {
|
|
|
|
|
this.select[selectName] = e.join(",")
|
|
|
|
|
@ -443,13 +507,15 @@
|
|
|
|
|
exportExcel() {
|
|
|
|
|
let _export = {}
|
|
|
|
|
this.table_item.map(item => {
|
|
|
|
|
|
|
|
|
|
if (item.prop === 'status') {
|
|
|
|
|
_export['status_text'] = item.label
|
|
|
|
|
} else if (item.prop === 'created_at' || item.prop === 'score') {
|
|
|
|
|
} else if (item.prop === 'created_at') {
|
|
|
|
|
_export[item.prop] = item.label
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
_export['user.idcard'] = '身份证号'
|
|
|
|
|
_export['score'] = '评分'
|
|
|
|
|
|
|
|
|
|
download(
|
|
|
|
|
'/api/admin/course-signs/index',
|
|
|
|
|
'get', {
|
|
|
|
|
|