You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

349 lines
12 KiB

2 years ago
<template>
<div>
<div>
<div ref="lxHeader">
<lx-header icon="md-apps" :text="$route.meta.title" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content">
<div class="searchwrap" style="display: flex;align-items: center;">
<div>
<div>
<el-input v-model="select.name" placeholder="请输入姓名"></el-input>
2 years ago
</div>
<div>
<el-input v-model="select.mobile" placeholder="请输入手机号"></el-input>
2 years ago
</div>
<div>
<el-input v-model="select.company_name" placeholder="请输入公司名称"></el-input>
</div>
<div>
<el-select v-model="select.company_position" placeholder="请选择职务" clearable>
<el-option v-for="item in formSelect.company_position" :key="item.id" :label="item.value"
:value="item.value">
</el-option>
</el-select>
</div>
<div>
<el-select v-model="select.company_area" placeholder="请选择所属区域" clearable>
<el-option v-for="item in formSelect.company_area" :key="item.id" :label="item.value"
:value="item.value">
</el-option>
</el-select>
</div>
<div>
<el-select v-model="select.company_type" placeholder="请选择企业性质" clearable>
<el-option v-for="item in formSelect.company_type" :key="item.id" :label="item.value"
:value="item.value">
</el-option>
</el-select>
</div>
<div>
<el-select v-model="select.company_industry" placeholder="请选择所属行业" clearable>
<el-option v-for="item in formSelect.company_industry" :key="item.id" :label="item.value"
:value="item.value">
</el-option>
</el-select>
</div>
<div>
<el-select v-model="select.type" placeholder="请选择人才类型" clearable>
<el-option v-for="item in formSelect.type" :key="item.id" :label="item.value" :value="item.value">
</el-option>
</el-select>
</div>
<div>
<el-select v-model="select.education" placeholder="请选择学历" clearable>
<el-option v-for="item in formSelect.education" :key="item.id" :label="item.value"
:value="item.value">
</el-option>
</el-select>
</div>
<div>
<el-select v-model="select.is_vip" placeholder="请选择学员身份" clearable>
<el-option v-for="item in is_vip_list" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-date-picker style="width:100%" @change="changeDate" v-model="select.courses_end_date" type="date"
placeholder="课程结束日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd">
</el-date-picker>
</div>
<div>
2 years ago
<el-button type="primary" size="small" @click="select.page=1,getList()"></el-button>
2 years ago
<el-button type="primary" size="small" @click="exportExcel"></el-button>
2 years ago
</div>
</div>
</div>
</div>
</lx-header>
</div>
</div>
2 years ago
<div>
2 years ago
<div class="txl">统计本年度学员共计{{year_total}}累计学员{{alltotal}}</div>
2 years ago
<xy-table :list="list" @pageIndexChange="pageIndexChange" @pageSizeChange="pageSizeChange" :total="total"
:table-item="table_item">
2 years ago
<template v-slot:course_list>
<el-table-column align='left' label="课程" width="320" header-align="center">
<template slot-scope="scope">
2 years ago
<div v-for="(item,index) in scope.row.course_signs"
style="width:100%;display: flex;justify-content: space-between;align-items: center;margin-bottom:5px">
<div>{{index+1}}{{item.course.year?item.course.year:''}}{{item.course.type_detail.name+' | '}}{{item.course.name}}</div>
<template v-for="state in apply_status_list">
<el-tag style="margin-left:20px" :type="state.type" v-if="item.status===state.id">{{state.value}}</el-tag>
</template>
</div>
2 years ago
</template>
</el-table-column>
2 years ago
</template>
<template v-slot:mobile>
<el-table-column align='center' label="联系方式" width="120" header-align="center">
<template slot-scope="scope">
{{base.maskPhoneNumber(scope.row.mobile)}}
</template>
</el-table-column>
2 years ago
</template>
<template v-slot:is_schoolmate>
<el-table-column align='center' label="是否校友库学员" width="120" header-align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.is_schoolmate===1" type=""></el-tag>
<el-tag v-else type="info"></el-tag>
</template>
</el-table-column>
</template>
<template v-slot:is_vip>
<el-table-column align='center' label="学员身份" width="120" header-align="center">
<template slot-scope="scope">
<div v-if="scope.row.is_vip===1">VIP</div>
<div v-else></div>
</template>
</el-table-column>
</template>
<template v-slot:btns>
<el-table-column align='center' label="操作" fixed="right" width="80" header-align="center">
<template slot-scope="scope">
<el-button type="primary" size="small" @click="showDetail('show',scope.row.id)"></el-button>
</template>
</el-table-column>
</template>
</xy-table>
</div>
<student-detail ref="studentDetail"></student-detail>
</div>
</template>
<script>
import studentDetail from './components/detail.vue';
import myMixins from "@/mixin/selectMixin.js";
2 years ago
import formMixin from "@/mixin/formMixin.js";
import {
download
2 years ago
} from "@/utils/downloadRequest";
2 years ago
import {
indexStudy
} from '@/api/student/index.js'
export default {
mixins: [myMixins, formMixin],
components: {
studentDetail
},
data() {
return {
path: '',
select: {
2 years ago
name: '',
mobile: '',
2 years ago
course_name: '',
company_name: '',
company_position: '',
company_area: '',
company_type: '',
company_industry: '',
is_vip: '',
2 years ago
courses_end_date: '',
education: '',
type: '',
2 years ago
page: 1,
page_size: 10,
},
list: [],
2 years ago
year_total: 0,
alltotal: 0,
2 years ago
total: 0,
table_item: [{
prop: 'course_list',
label: '课程',
align: 'left',
}, {
prop: 'username',
label: '姓名',
align: 'center',
width: 120
}, {
prop: 'sex',
label: '性别',
align: 'center',
width: 120
}, {
prop: 'idcard',
label: '身份证号',
align: 'center',
width: 180
}, {
prop: 'mobile',
label: '联系方式',
align: 'center',
width: 120,
}, {
prop: 'birthday',
label: '出生日期',
align: 'center',
width: 120,
}, {
prop: 'email',
label: '邮箱',
align: 'center',
width: 120,
}, {
prop: 'company_name',
label: '公司名称',
align: 'left',
}, {
prop: 'company_position',
label: '职务',
align: 'center',
width: 120,
}, {
prop: 'is_schoolmate',
label: '是否校友库学员',
align: 'center',
width: 120,
}, {
prop: 'is_vip',
label: '学员身份',
align: 'center',
width: 120,
}]
}
},
created() {
this.getList()
},
methods: {
pageIndexChange(e) {
this.select.page = e
this.getList()
},
pageSizeChange(e) {
this.select.page_size = e
this.select.page = 1
this.getList()
},
async getList() {
const res = await indexStudy({
page: this.select.page,
page_size: this.select.page_size,
2 years ago
name: this.select.name,
mobile: this.select.mobile,
2 years ago
company_name: this.select.company_name,
company_position: this.select.company_position,
company_area: this.select.company_area,
company_type: this.select.company_type,
company_industry: this.select.company_industry,
is_vip: this.select.is_vip,
2 years ago
courses_end_date: this.select.courses_end_date,
education: this.select.education,
type: this.select.type
2 years ago
})
this.list = res.list.data
this.total = res.list.total
this.year_total = res.year_total
this.alltotal = res.total
},
changeDate(e) {
if (e) {
this.select.courses_end_date = e
} else {
this.select.courses_end_date = ''
}
},
showDetail(type, id) {
this.$refs.studentDetail.id = id
this.$refs.studentDetail.type = type
this.$refs.studentDetail.isShow = true
2 years ago
},
exportExcel() {
let _export = {}
this.table_item.map(item => {
_export[item.prop] = item.label
})
download(
'/api/admin/users/study',
'get', {
export_fields: _export,
name: this.select.name,
mobile: this.select.mobile,
company_name: this.select.company_name,
company_position: this.select.company_position,
company_area: this.select.company_area,
company_type: this.select.company_type,
company_industry: this.select.company_industry,
is_vip: this.select.is_vip,
courses_end_date: this.select.courses_end_date,
education: this.select.education,
type: this.select.type,
is_export: 1,
page: 1,
page_size: 999
},
`学员信息.xlsx`)
2 years ago
}
}
}
</script>
2 years ago
<style lang="scss" scoped>
.txl {
display: flex;
align-items: center;
margin-bottom: 10px;
font-size: 18px;
&>div {
margin-right: 15px;
}
2 years ago
}
2 years ago
2 years ago
.searchwrap {
display: flex;
align-items: center;
flex-wrap: wrap;
&>div {
display: flex;
align-items: center;
// margin-bottom: 10px;
flex-wrap: wrap;
&>div {
2 years ago
margin-right: 10px;
margin-bottom: 10px;
width: 150px;
&:last-child {
width: auto
2 years ago
}
}
}
}
</style>