|
|
@@ -40,10 +40,7 @@
|
|
|
<template v-if="interestType == 1">
|
|
|
<span
|
|
|
style="cursor: pointer;min-width: 35px;"
|
|
|
- @click="
|
|
|
- interestType = 0;
|
|
|
- refresh();
|
|
|
- "
|
|
|
+ @click="backInterestCla()"
|
|
|
>{{ activeinfo.name }}</span
|
|
|
>
|
|
|
<i class="el-icon-arrow-right"></i>
|
|
|
@@ -260,8 +257,7 @@
|
|
|
删除
|
|
|
</div>
|
|
|
</template>
|
|
|
- <template v-if="boxType == 1">
|
|
|
- <!-- <div @click="viewStudent(scope.row)">查看</div> -->
|
|
|
+ <template v-if="boxType == 1 && interestType == 0">
|
|
|
<div @click="editInterestCla(scope.row)">编辑</div>
|
|
|
<div @click="deleteCla(scope.row.id,0,scope.row.createuserid)">删除</div>
|
|
|
</template>
|
|
|
@@ -817,9 +813,6 @@ export default {
|
|
|
];
|
|
|
XLSX.utils.book_append_sheet(workbook, ws, "sheet1"); //把sheet添加到workbook里,第三个参数是sheet名
|
|
|
XLSX.writeFile(workbook, this.activeinfo.name + "学生列表.xlsx");
|
|
|
- // const wopts = { bookType: "xlsx", bookSST: false, type: "array" };//写入的样式bookType:输出的文件类型,type:输出的数据类型,bookSST: 是否生成Shared String Table,官方解释是,如果开启生成速度会下降,但在低版本IOS设备上有更好的兼容性
|
|
|
- // const wbout = XLSX.write(workbook, wopts);// 浏览器端和node共有的API,实际上node可以直接使用xlsx.writeFile来写入文件,但是浏览器没有该API
|
|
|
- // FileSaver.saveAs(new Blob([wbout], { type: "application/octet-stream" }), `${title} demo.xlsx`);//保存文件
|
|
|
this.$message({
|
|
|
message: "导出成功",
|
|
|
type: "success",
|
|
|
@@ -1119,6 +1112,7 @@ export default {
|
|
|
this.update_Student(this.EditStubox);
|
|
|
}
|
|
|
},
|
|
|
+ // 删除学生
|
|
|
onedelstu(){
|
|
|
let params = [{ uid: this.delStuinfo.userid, state: 0 }];
|
|
|
this.ajax
|
|
|
@@ -1226,20 +1220,23 @@ export default {
|
|
|
}
|
|
|
this.$refs.editInterstcla.InterestClaEditvisible = true;
|
|
|
this.InterestClaEditInfo = JSON.parse(JSON.stringify(row));
|
|
|
- // this.$refs.editInterstcla.getdata();
|
|
|
+ },
|
|
|
+ // 兴趣班级返回到兴趣班列表
|
|
|
+ backInterestCla(){
|
|
|
+ this.interestType = 0;
|
|
|
+ this.tableColumns = this.tableInterestClaColumns;
|
|
|
+ this.getInterestClass();
|
|
|
},
|
|
|
// 查看兴趣班学生
|
|
|
- viewStudent(row, column, event) {
|
|
|
+ viewStudent(row) {
|
|
|
// console.log('111');
|
|
|
- console.log(row, column, event);
|
|
|
-
|
|
|
- // if (row.createuserid != this.userid) return
|
|
|
-
|
|
|
+ // console.log(row, column, event);
|
|
|
if (this.boxType == 1 && this.interestType == 0) {
|
|
|
this.interestType = 1;
|
|
|
this.tableColumns = this.studentColumns;
|
|
|
this.activeId = row.id;
|
|
|
- this.refresh();
|
|
|
+ this.tableData = [];
|
|
|
+ this.getStudent();
|
|
|
this.activeinfo = row;
|
|
|
}
|
|
|
|
|
|
@@ -1431,11 +1428,15 @@ export default {
|
|
|
|
|
|
// 刷新
|
|
|
refresh() {
|
|
|
+ // 将tab表格页数重置
|
|
|
this.page = 1;
|
|
|
this.pageSize = 10;
|
|
|
this.total = 0;
|
|
|
+ // 清除表格数据
|
|
|
this.tableData = [];
|
|
|
+ // 清除选中数据
|
|
|
this.selectedData = [];
|
|
|
+
|
|
|
if (this.boxType == 0) {
|
|
|
// 清除选中数据
|
|
|
if (this.selectedData.length > 0) {
|