小班、自考证书合并列表导出功能,培训班管理可在3个app中选择显示模块

This commit is contained in:
liuyuan
2025-06-27 15:05:41 +08:00
parent 2c89e36035
commit 4f52d8377d
6 changed files with 395 additions and 119 deletions

View File

@@ -61,7 +61,12 @@
</el-table-column>
<el-table-column label="用户身份" align="center">
<template slot-scope="scope">
{{ scope.row.identity }}
{{ splitIdentity(scope.row.identity).type }}
</template>
</el-table-column>
<el-table-column label="费用" align="center">
<template slot-scope="scope">
{{ splitIdentity(scope.row.identity).price ? `¥${splitIdentity(scope.row.identity).price}` : '' }}
</template>
</el-table-column>
@@ -183,6 +188,13 @@ export default {
this.getDataList();
},
methods: {
splitIdentity(identity) {
const match = identity.match(/([^\d]+)()([\d.]+)/);
return {
type: match ? match[1].trim() : identity,
price: match ? match[3] : ''
};
},
//排序变化事件
handleSortChange({ column, prop, order }) {
this.sortParams.date = order
@@ -354,13 +366,12 @@ export default {
},
//导出
handleExport() {
this.dataListLoading = true;
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
@@ -378,6 +389,7 @@ export default {
link.click();
window.URL.revokeObjectURL(link.href); // 释放内存
this.dataListLoading = false;
this.$message({
message: "培训班用户数据文件下载完成,请注意查看!",
type: "success",
@@ -388,6 +400,7 @@ export default {
});
} catch (err) {
this.$message.error("文件下载失败!");
this.dataListLoading = true;
}
},
},