1.课程证书能筛选出满足国际和针灸师的功能
2.学习周、考试周均精确到天 3.班级列表-增加导出学员成绩功能 4.小班管理-管理成员设置显示名字
This commit is contained in:
@@ -2,7 +2,10 @@
|
|||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form>
|
<el-form>
|
||||||
<el-form-item>
|
<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-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table
|
||||||
@@ -23,14 +26,14 @@
|
|||||||
<el-table-column label="电话" align="center" width="240">
|
<el-table-column label="电话" align="center" width="240">
|
||||||
<template slot-scope="scope">{{ scope.row.tel }}</template>
|
<template slot-scope="scope">{{ scope.row.tel }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="证书总数" align="center" width="200">
|
<el-table-column label="统计信息" align="center" width="300">
|
||||||
<template slot-scope="scope">{{ scope.row.count }}</template>
|
<template slot-scope="scope">{{ scope.row.msg }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="证书名称" align="center">
|
<el-table-column label="证书名称" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div style=" max-height: 500px; overflow-y: scroll;">
|
<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;">
|
<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> {{ item.title }} - (编号:{{ item.certificateNo }})
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -59,7 +62,9 @@
|
|||||||
pageIndex: 1,
|
pageIndex: 1,
|
||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
total: 0,
|
total: 0,
|
||||||
dataListLoading: false
|
dataListLoading: false,
|
||||||
|
export_type: 1,
|
||||||
|
labelId: 13 //默认中医师的id,针灸师 19
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@@ -69,6 +74,15 @@
|
|||||||
this.getDataList();
|
this.getDataList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//切换导出类型
|
||||||
|
changeType(val){
|
||||||
|
if(val==1){
|
||||||
|
this.labelId = 13;
|
||||||
|
}else{
|
||||||
|
this.labelId = 19;
|
||||||
|
}
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
// 获取数据列表
|
// 获取数据列表
|
||||||
getDataList() {
|
getDataList() {
|
||||||
this.dataListLoading = true;
|
this.dataListLoading = true;
|
||||||
@@ -77,7 +91,8 @@
|
|||||||
method: "post",
|
method: "post",
|
||||||
data: this.$http.adornData({
|
data: this.$http.adornData({
|
||||||
current: this.pageIndex,
|
current: this.pageIndex,
|
||||||
limit: this.pageSize
|
limit: this.pageSize,
|
||||||
|
labelId: this.labelId
|
||||||
}),
|
}),
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
@@ -105,7 +120,9 @@
|
|||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl("/master/userCertificate/exportUserClassAndZKCertificate"),
|
url: this.$http.adornUrl("/master/userCertificate/exportUserClassAndZKCertificate"),
|
||||||
method: "post",
|
method: "post",
|
||||||
data: this.$http.adornData({}),
|
data: this.$http.adornData({
|
||||||
|
labelId: this.labelId
|
||||||
|
}),
|
||||||
responseType: "blob"
|
responseType: "blob"
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
const blob = new Blob([res.data], {
|
const blob = new Blob([res.data], {
|
||||||
|
|||||||
@@ -130,7 +130,6 @@
|
|||||||
class="demo-ruleForm"
|
class="demo-ruleForm"
|
||||||
>
|
>
|
||||||
<el-form-item label="班长" prop="monitor" required>
|
<el-form-item label="班长" prop="monitor" required>
|
||||||
<!-- <el-input v-model="miniClassForm.member.monitor"></el-input> -->
|
|
||||||
<el-select
|
<el-select
|
||||||
class="userSelect"
|
class="userSelect"
|
||||||
v-model="member.monitor"
|
v-model="member.monitor"
|
||||||
@@ -145,7 +144,7 @@
|
|||||||
<el-option
|
<el-option
|
||||||
v-for="item in userList"
|
v-for="item in userList"
|
||||||
:key="item.tel"
|
:key="item.tel"
|
||||||
:label="item.tel"
|
:label="item.tel+'('+(item.name||item.nickname)+')'"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
@@ -166,7 +165,7 @@
|
|||||||
<el-option
|
<el-option
|
||||||
v-for="item in userList"
|
v-for="item in userList"
|
||||||
:key="item.tel"
|
:key="item.tel"
|
||||||
:label="item.tel"
|
:label="item.tel+'('+(item.name||item.nickname)+')'"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
@@ -187,7 +186,7 @@
|
|||||||
<el-option
|
<el-option
|
||||||
v-for="item in userList"
|
v-for="item in userList"
|
||||||
:key="item.tel"
|
:key="item.tel"
|
||||||
:label="item.tel"
|
:label="item.tel+'('+(item.name||item.nickname)+')'"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
@@ -209,34 +208,12 @@
|
|||||||
<el-option
|
<el-option
|
||||||
v-for="item in userList"
|
v-for="item in userList"
|
||||||
:key="item.tel"
|
:key="item.tel"
|
||||||
:label="item.tel"
|
:label="item.tel+'('+(item.name||item.nickname)+')'"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</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>
|
</el-form>
|
||||||
<div style="text-align:center">
|
<div style="text-align:center">
|
||||||
<el-button type="primary" @click="saveMember">保 存</el-button>
|
<el-button type="primary" @click="saveMember">保 存</el-button>
|
||||||
@@ -353,7 +330,6 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// console.log('激活了')
|
|
||||||
if (this.miniClass) {
|
if (this.miniClass) {
|
||||||
console.log("编辑小班", this.miniClass);
|
console.log("编辑小班", this.miniClass);
|
||||||
this.getClassInfo()
|
this.getClassInfo()
|
||||||
@@ -371,27 +347,30 @@ export default {
|
|||||||
var list = [...this.miniClass.classUsers]
|
var list = [...this.miniClass.classUsers]
|
||||||
// this.userList = [...this.miniClass.classUsers]
|
// this.userList = [...this.miniClass.classUsers]
|
||||||
list.forEach( item => {
|
list.forEach( item => {
|
||||||
|
let name = '';
|
||||||
|
if(item.name){
|
||||||
|
name = item.name
|
||||||
|
}else if(item.nickname){
|
||||||
|
name = item.nickname
|
||||||
|
}
|
||||||
if(item.role == '1'){
|
if(item.role == '1'){
|
||||||
this.member.monitor = item.userId
|
this.member.monitor = item.tel + '(' +name+')'
|
||||||
}
|
}
|
||||||
if(item.role == '2'){
|
if(item.role == '2'){
|
||||||
this.member.dmonitor = item.userId
|
this.member.dmonitor = item.tel + '(' +name+')'
|
||||||
}
|
}
|
||||||
if(item.role == '3'){
|
if(item.role == '3'){
|
||||||
this.member.learner = item.userId
|
this.member.learner = item.tel + '(' +name+')'
|
||||||
}
|
}
|
||||||
if(item.role == '4'){
|
if(item.role == '4'){
|
||||||
this.member.scorer.push(item.userId)
|
this.member.scorer.push(item.tel + '(' +name+')')
|
||||||
console.log(" this.member.scorer", this.member.scorer,item.userId);
|
|
||||||
}
|
}
|
||||||
if(item.role == '5'){
|
if(item.role == '5'){
|
||||||
this.member.counter.push(item.userId)
|
this.member.counter.push(item.tel + '(' +name+')')
|
||||||
console.log("this.member.counter", this.member.counter,item.userId);
|
|
||||||
}
|
}
|
||||||
item.id = item.userId
|
item.id = item.userId
|
||||||
this.userList.push(item)
|
this.userList.push(item)
|
||||||
})
|
})
|
||||||
// console.log("处理后的",this.userList);
|
|
||||||
|
|
||||||
console.log("处理后的开班日期",this.miniClassForm.mstartseconds, this.miniClassForm.nowseconds);
|
console.log("处理后的开班日期",this.miniClassForm.mstartseconds, this.miniClassForm.nowseconds);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,22 +90,10 @@
|
|||||||
<span>创建日期:{{ scope.row.createTime }}<br /></span>
|
<span>创建日期:{{ scope.row.createTime }}<br /></span>
|
||||||
<span v-if="scope.row.state >= 1">开班日期:{{ scope.row.startTime }}<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.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>
|
<span v-if="scope.row.studyEndTime">学习结束日期:{{ scope.row.studyEndTime }}<br /></span>
|
||||||
<!-- <img
|
<span v-if="scope.row.examStartTime">考试周开始日期:{{ formatExamTime(scope.row.examStartTime) }}<br /></span>
|
||||||
v-if="scope.row.avatar && scope.row.avatar != ''"
|
<span v-if="scope.row.examEndTime">考试周结束日期:{{ formatExamTime(scope.row.examEndTime) }}<br /></span>
|
||||||
:src="scope.row.avatar"
|
|
||||||
width="50"
|
|
||||||
height="50"
|
|
||||||
class="tableImg"
|
|
||||||
/>
|
|
||||||
<img
|
|
||||||
v-else
|
|
||||||
src="../../../../static/img/morenAvavter.png"
|
|
||||||
width="50"
|
|
||||||
height="50"
|
|
||||||
class="tableImg"
|
|
||||||
/> -->
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -114,19 +102,20 @@
|
|||||||
align="center"
|
align="center"
|
||||||
label="班级状态"
|
label="班级状态"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">{{
|
<template slot-scope="scope">{{scope.row.state | getStatus}}</template>
|
||||||
scope.row.state | getStatus
|
|
||||||
}}</template>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
fixed="right"
|
fixed="right"
|
||||||
header-align="center"
|
header-align="center"
|
||||||
align="center"
|
align="center"
|
||||||
width="200"
|
width="280"
|
||||||
label="操作"
|
label="操作"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<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 type="text" size="small" @click="showMiniClass(scope.row)"
|
||||||
>修改</el-button
|
>修改</el-button
|
||||||
>
|
>
|
||||||
@@ -268,7 +257,7 @@ export default {
|
|||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
getStatus: function(value) {
|
getStatus: function(value) {
|
||||||
var _str = "454545";
|
var _str = "";
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case "0":
|
case "0":
|
||||||
_str = "待开班";
|
_str = "待开班";
|
||||||
@@ -279,6 +268,9 @@ export default {
|
|||||||
case "2":
|
case "2":
|
||||||
_str = "已结班";
|
_str = "已结班";
|
||||||
break;
|
break;
|
||||||
|
case "3":
|
||||||
|
_str = "考试中";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return _str;
|
return _str;
|
||||||
}
|
}
|
||||||
@@ -296,6 +288,14 @@ export default {
|
|||||||
console.log("得到的课程id");
|
console.log("得到的课程id");
|
||||||
},
|
},
|
||||||
methods: {
|
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() {
|
setStudentClose() {
|
||||||
this.miniClass = {};
|
this.miniClass = {};
|
||||||
this.setStudentVisible = false;
|
this.setStudentVisible = false;
|
||||||
@@ -435,6 +435,44 @@ export default {
|
|||||||
this.getDataList();
|
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;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// 新增 / 修改
|
// 新增 / 修改
|
||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
|
|||||||
@@ -6,7 +6,8 @@
|
|||||||
|
|
||||||
// api接口请求地址
|
// api接口请求地址
|
||||||
window.SITE_CONFIG['baseUrl'] = 'https://api.nuttyreading.com';
|
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地址 = 域名 + 版本号
|
// cdn地址 = 域名 + 版本号
|
||||||
window.SITE_CONFIG['domain'] = './'; // 域名
|
window.SITE_CONFIG['domain'] = './'; // 域名
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
// api接口请求地址
|
// api接口请求地址
|
||||||
window.SITE_CONFIG['baseUrl'] = 'https://api.nuttyreading.com'; // 线上正式环境
|
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地址 = 域名 + 版本号
|
// cdn地址 = 域名 + 版本号
|
||||||
window.SITE_CONFIG['domain'] = './'; // 域名
|
window.SITE_CONFIG['domain'] = './'; // 域名
|
||||||
|
|||||||
Reference in New Issue
Block a user