- {{ index+1 }}. {{ item.title }} - (编号:{{ item.certificateNo }})
+ {{ index+1 }}. [{{ item.selective }}] {{ item.title }} - (编号:{{ item.certificateNo }})
@@ -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], {
diff --git a/src/views/modules/miniClass/miniClass.vue b/src/views/modules/miniClass/miniClass.vue
index 938ebd7..26d9b0f 100644
--- a/src/views/modules/miniClass/miniClass.vue
+++ b/src/views/modules/miniClass/miniClass.vue
@@ -130,7 +130,6 @@
class="demo-ruleForm"
>
-
@@ -166,7 +165,7 @@
@@ -187,7 +186,7 @@
@@ -209,34 +208,12 @@
-
-
+
保 存
@@ -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);
}
diff --git a/src/views/modules/miniClass/miniClassList.vue b/src/views/modules/miniClass/miniClassList.vue
index f453857..9537f21 100644
--- a/src/views/modules/miniClass/miniClassList.vue
+++ b/src/views/modules/miniClass/miniClassList.vue
@@ -90,22 +90,10 @@
创建日期:{{ scope.row.createTime }}
开班日期:{{ scope.row.startTime }}
结班日期:{{ scope.row.endTime }}
- 考试周开始日期:{{ scope.row.examStartTime }}
- 考试周结束日期:{{ scope.row.examEndTime }}
-
+
+ 学习结束日期:{{ scope.row.studyEndTime }}
+ 考试周开始日期:{{ formatExamTime(scope.row.examStartTime) }}
+ 考试周结束日期:{{ formatExamTime(scope.row.examEndTime) }}
- {{
- scope.row.state | getStatus
- }}
+ {{scope.row.state | getStatus}}
+ 导出学员成绩
修改
@@ -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;
+ }
+ },
+
// 新增 / 修改
// 删除
diff --git a/static/config/index-prod.js b/static/config/index-prod.js
index f03d811..66e94bf 100644
--- a/static/config/index-prod.js
+++ b/static/config/index-prod.js
@@ -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'] = './'; // 域名
diff --git a/static/config/index.js b/static/config/index.js
index a75c81e..88a0b47 100644
--- a/static/config/index.js
+++ b/static/config/index.js
@@ -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'] = './'; // 域名