1.培训班管理上下架操作
2.用户列表的导出功能 3.太湖英才表单增加职称、科室、地区选项
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
:inline="true"
|
||||
:model="dataForm"
|
||||
@keyup.enter.native="getDataList()"
|
||||
style="position: relative;"
|
||||
>
|
||||
<el-form-item label="手机号">
|
||||
<el-input
|
||||
@@ -27,6 +28,12 @@
|
||||
>报名</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
<el-form-item style="position: absolute; right: 0; top: 0; margin-right: 0;">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleExport()">
|
||||
导出</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
:data="dataList"
|
||||
@@ -61,7 +68,7 @@
|
||||
<el-table-column label="支付方式" align="center">
|
||||
<template slot-scope="scope">{{ scope.row.payMethod }}:{{ scope.row.realMoney }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="抵扣方式" align="center">
|
||||
<el-table-column label="积分抵扣" align="center">
|
||||
<template slot-scope="scope">积分:{{ scope.row.jfDeduction }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -130,6 +137,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
trainingId: null,
|
||||
trainingTitle: '',
|
||||
dataForm: {
|
||||
tel: ''
|
||||
},
|
||||
@@ -171,6 +179,7 @@ export default {
|
||||
},
|
||||
activated(){
|
||||
this.trainingId = this.$route.query.id;
|
||||
this.trainingTitle = this.$route.query.title;
|
||||
this.getDataList();
|
||||
},
|
||||
methods: {
|
||||
@@ -343,6 +352,44 @@ export default {
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
//导出
|
||||
handleExport() {
|
||||
try {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl("/master/trainingClass/exportTrainingClassUser"),
|
||||
method: "post",
|
||||
data: this.$http.adornData({
|
||||
current: this.pageIndex,
|
||||
limit: this.pageSize,
|
||||
trainingId: this.trainingId,
|
||||
tel: this.dataForm.tel,
|
||||
createTimeSort: this.sortParams.date
|
||||
}),
|
||||
responseType: "blob"
|
||||
}).then(res => {
|
||||
const blob = new Blob([res.data], {
|
||||
type:
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
||||
});
|
||||
|
||||
const link = document.createElement("a");
|
||||
link.href = window.URL.createObjectURL(blob);
|
||||
link.download = '['+ this.trainingTitle +']-用户数据文件';
|
||||
link.click();
|
||||
|
||||
window.URL.revokeObjectURL(link.href); // 释放内存
|
||||
this.$message({
|
||||
message: "培训班用户数据文件下载完成,请注意查看!",
|
||||
type: "success",
|
||||
duration: 3000,
|
||||
showClose: true
|
||||
});
|
||||
|
||||
});
|
||||
} catch (err) {
|
||||
this.$message.error("文件下载失败!");
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user