1.课程证书能筛选出满足国际和针灸师的功能

2.学习周、考试周均精确到天
3.班级列表-增加导出学员成绩功能
4.小班管理-管理成员设置显示名字
This commit is contained in:
liuyuan
2025-07-09 09:30:45 +08:00
parent eb034120fa
commit bcba5b83e7
5 changed files with 102 additions and 67 deletions

View File

@@ -2,7 +2,10 @@
<div class="mod-config">
<el-form>
<el-form-item>
<el-button type="primary" @click="exportHandle()">全部导出</el-button>
<el-radio-group v-model="export_type" @input="changeType">
<el-radio :label="1">中医师</el-radio>
<el-radio :label="2" style=" margin-left: 10px;">针灸师</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<el-table
@@ -23,14 +26,14 @@
<el-table-column label="电话" align="center" width="240">
<template slot-scope="scope">{{ scope.row.tel }}</template>
</el-table-column>
<el-table-column label="证书总数" align="center" width="200">
<template slot-scope="scope">{{ scope.row.count }}</template>
<el-table-column label="统计信息" align="center" width="300">
<template slot-scope="scope">{{ scope.row.msg }}</template>
</el-table-column>
<el-table-column label="证书名称" align="center">
<template slot-scope="scope">
<div style=" max-height: 500px; overflow-y: scroll;">
<div v-for="(item,index) in scope.row.certificate" :key="index" style=" text-align: left; font-size: 12px; line-height: 22px;">
{{ index+1 }}. {{ item.title }} - 编号{{ item.certificateNo }}
{{ index+1 }}. <span style=" color: red;" v-if="item.selective">[{{ item.selective }}]</span>&nbsp;{{ item.title }} - 编号{{ item.certificateNo }}
</div>
</div>
</template>
@@ -59,7 +62,9 @@
pageIndex: 1,
pageSize: 20,
total: 0,
dataListLoading: false
dataListLoading: false,
export_type: 1,
labelId: 13 //默认中医师的id针灸师 19
};
},
components: {
@@ -69,6 +74,15 @@
this.getDataList();
},
methods: {
//切换导出类型
changeType(val){
if(val==1){
this.labelId = 13;
}else{
this.labelId = 19;
}
this.getDataList();
},
// 获取数据列表
getDataList() {
this.dataListLoading = true;
@@ -77,7 +91,8 @@
method: "post",
data: this.$http.adornData({
current: this.pageIndex,
limit: this.pageSize
limit: this.pageSize,
labelId: this.labelId
}),
}).then(({ data }) => {
if (data && data.code === 0) {
@@ -105,7 +120,9 @@
this.$http({
url: this.$http.adornUrl("/master/userCertificate/exportUserClassAndZKCertificate"),
method: "post",
data: this.$http.adornData({}),
data: this.$http.adornData({
labelId: this.labelId
}),
responseType: "blob"
}).then(res => {
const blob = new Blob([res.data], {

View File

@@ -130,7 +130,6 @@
class="demo-ruleForm"
>
<el-form-item label="班长" prop="monitor" required>
<!-- <el-input v-model="miniClassForm.member.monitor"></el-input> -->
<el-select
class="userSelect"
v-model="member.monitor"
@@ -145,7 +144,7 @@
<el-option
v-for="item in userList"
:key="item.tel"
:label="item.tel"
:label="item.tel+'('+(item.name||item.nickname)+')'"
:value="item.id"
>
</el-option>
@@ -166,7 +165,7 @@
<el-option
v-for="item in userList"
:key="item.tel"
:label="item.tel"
:label="item.tel+'('+(item.name||item.nickname)+')'"
:value="item.id"
>
</el-option>
@@ -187,7 +186,7 @@
<el-option
v-for="item in userList"
:key="item.tel"
:label="item.tel"
:label="item.tel+'('+(item.name||item.nickname)+')'"
:value="item.id"
>
</el-option>
@@ -209,34 +208,12 @@
<el-option
v-for="item in userList"
:key="item.tel"
:label="item.tel"
:label="item.tel+'('+(item.name||item.nickname)+')'"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="记分员" prop="counter">
<el-select
class="userSelect"
v-model="member.counter"
filterable
remote
multiple
clearable
reserve-keyword
placeholder="请输入手机号"
:remote-method="remoteMethod"
:loading="remoteMethodLoading"
>
<el-option
v-for="item in userList"
:key="item.tel"
:label="item.tel"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item> -->
</el-form-item>
</el-form>
<div style="text-align:center">
<el-button type="primary" @click="saveMember"> </el-button>
@@ -353,7 +330,6 @@ export default {
};
},
mounted() {
// console.log('激活了')
if (this.miniClass) {
console.log("编辑小班", this.miniClass);
this.getClassInfo()
@@ -371,27 +347,30 @@ export default {
var list = [...this.miniClass.classUsers]
// this.userList = [...this.miniClass.classUsers]
list.forEach( item => {
let name = '';
if(item.name){
name = item.name
}else if(item.nickname){
name = item.nickname
}
if(item.role == '1'){
this.member.monitor = item.userId
this.member.monitor = item.tel + '(' +name+')'
}
if(item.role == '2'){
this.member.dmonitor = item.userId
this.member.dmonitor = item.tel + '(' +name+')'
}
if(item.role == '3'){
this.member.learner = item.userId
this.member.learner = item.tel + '(' +name+')'
}
if(item.role == '4'){
this.member.scorer.push(item.userId)
console.log(" this.member.scorer", this.member.scorer,item.userId);
this.member.scorer.push(item.tel + '(' +name+')')
}
if(item.role == '5'){
this.member.counter.push(item.userId)
console.log("this.member.counter", this.member.counter,item.userId);
this.member.counter.push(item.tel + '(' +name+')')
}
item.id = item.userId
this.userList.push(item)
})
// console.log("处理后的",this.userList);
console.log("处理后的开班日期",this.miniClassForm.mstartseconds, this.miniClassForm.nowseconds);
}

View File

@@ -90,22 +90,10 @@
<span>创建日期{{ scope.row.createTime }}<br /></span>
<span v-if="scope.row.state >= 1">开班日期{{ scope.row.startTime }}<br /></span>
<span v-if="scope.row.state == 2">结班日期{{ scope.row.endTime }}<br /></span>
<span v-if="scope.row.examStartTime">考试周开始日期{{ scope.row.examStartTime }}<br /></span>
<span v-if="scope.row.examEndTime">考试周结束日期{{ scope.row.examEndTime }}<br /></span>
<!-- <img
v-if="scope.row.avatar && scope.row.avatar != ''"
:src="scope.row.avatar"
width="50"
height="50"
class="tableImg"
/>
<img
v-else
src="../../../../static/img/morenAvavter.png"
width="50"
height="50"
class="tableImg"
/> -->
<span v-if="scope.row.studyEndTime">学习结束日期{{ scope.row.studyEndTime }}<br /></span>
<span v-if="scope.row.examStartTime">考试周开始日期{{ formatExamTime(scope.row.examStartTime) }}<br /></span>
<span v-if="scope.row.examEndTime">考试周结束日期{{ formatExamTime(scope.row.examEndTime) }}<br /></span>
</template>
</el-table-column>
<el-table-column
@@ -114,19 +102,20 @@
align="center"
label="班级状态"
>
<template slot-scope="scope">{{
scope.row.state | getStatus
}}</template>
<template slot-scope="scope">{{scope.row.state | getStatus}}</template>
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="200"
width="280"
label="操作"
>
<template slot-scope="scope">
<el-button type="text" size="small" @click="exportHandle(scope.row)"
>导出学员成绩</el-button
>
<el-button type="text" size="small" @click="showMiniClass(scope.row)"
>修改</el-button
>
@@ -268,7 +257,7 @@ export default {
},
filters: {
getStatus: function(value) {
var _str = "454545";
var _str = "";
switch (value) {
case "0":
_str = "待开班";
@@ -279,6 +268,9 @@ export default {
case "2":
_str = "已结班";
break;
case "3":
_str = "考试中";
break;
}
return _str;
}
@@ -296,6 +288,14 @@ export default {
console.log("得到的课程id");
},
methods: {
//考试周时间
formatExamTime(timeStr) {
if (!timeStr) return ''; // 空值处理
if (timeStr.endsWith('00:00:00') || timeStr.endsWith('23:59:59')) {
return timeStr.substring(0, 10); // 只返回 YYYY-MM-DD
}
return timeStr; // 其他情况返回完整时间
},
setStudentClose() {
this.miniClass = {};
this.setStudentVisible = false;
@@ -435,6 +435,44 @@ export default {
this.getDataList();
},
//导出学员成绩
exportHandle(data){
this.dataListLoading = true;
try {
this.$http({
url: this.$http.adornUrl("/common/class/exportUserScore"),
method: "post",
data: this.$http.adornData({
classId: data.id
}),
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 = data.title+'-学员成绩表';
link.click();
window.URL.revokeObjectURL(link.href); // 释放内存
this.dataListLoading = false;
this.$message({
message: "学员成绩导出成功,请注意查看!",
type: "success",
duration: 3000,
showClose: true
});
});
} catch (err) {
this.$message.error("文件下载失败!");
this.dataListLoading = false;
}
},
// 新增 / 修改
// 删除

View File

@@ -6,7 +6,8 @@
// api接口请求地址
window.SITE_CONFIG['baseUrl'] = 'https://api.nuttyreading.com';
//window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb';
// window.SITE_CONFIG['baseUrl'] = 'https://testapi.nuttyreading.com';
// window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb';
// cdn地址 = 域名 + 版本号
window.SITE_CONFIG['domain'] = './'; // 域名

View File

@@ -6,7 +6,7 @@
// api接口请求地址
window.SITE_CONFIG['baseUrl'] = 'https://api.nuttyreading.com'; // 线上正式环境
//window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb'; //川
// window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb'; //川
// cdn地址 = 域名 + 版本号
window.SITE_CONFIG['domain'] = './'; // 域名