|
@@ -52,9 +52,9 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<remote-search
|
|
|
- :commit="'setTeachers'"
|
|
|
- v-model="searchForm.teacherIdList"
|
|
|
- />
|
|
|
+ :commit="'setTeachers'"
|
|
|
+ v-model="searchForm.teacherIdList"
|
|
|
+ />
|
|
|
<!-- <el-select
|
|
|
v-model.trim="searchForm.teacherIdList"
|
|
|
clearable
|
|
@@ -225,7 +225,7 @@
|
|
|
ref="tableList"
|
|
|
:header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
|
@selection-change="handleSelectionChange"
|
|
|
- @select='onTableSelect'
|
|
|
+ @select="onTableSelect"
|
|
|
row-key="id"
|
|
|
>
|
|
|
>
|
|
@@ -629,10 +629,10 @@
|
|
|
/>
|
|
|
</el-dialog>
|
|
|
<addCompound
|
|
|
- ref='addCompound'
|
|
|
+ ref="addCompound"
|
|
|
:compoundList="deleteList"
|
|
|
v-if="permission('courseSchedule/courseMerge')"
|
|
|
- v-show="deleteList.length>0"
|
|
|
+ v-show="deleteList.length > 0"
|
|
|
@clearCom="clearCom"
|
|
|
@getList="getList"
|
|
|
@removeCourse="removeCourse"
|
|
@@ -816,19 +816,23 @@ export default {
|
|
|
|
|
|
this.$confirm("是否确认删除此数据?", "提示", {
|
|
|
type: "warning",
|
|
|
- }).then(() => {
|
|
|
- bathDelete({ courseScheduleIds: courseScheduleIds }).then((res) => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message.success("删除成功");
|
|
|
- this.getList();
|
|
|
- this.clearCom()
|
|
|
- }
|
|
|
- }).catch((e)=>{
|
|
|
- this.$refs.addCompound.isLook = true
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ bathDelete({ courseScheduleIds: courseScheduleIds })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success("删除成功");
|
|
|
+ this.getList();
|
|
|
+ this.clearCom();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((e) => {
|
|
|
+ this.$refs.addCompound.isLook = true;
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch((e) => {
|
|
|
+ this.$refs.addCompound.isLook = true;
|
|
|
});
|
|
|
- }).catch((e) => {
|
|
|
- this.$refs.addCompound.isLook = true
|
|
|
- });;
|
|
|
},
|
|
|
reset() {
|
|
|
this.searchForm = { ...initSearch };
|
|
@@ -1037,20 +1041,20 @@ export default {
|
|
|
if (indexNum + "") {
|
|
|
this.deleteList.splice(indexNum, 1);
|
|
|
}
|
|
|
- this.tableList.forEach((course,index)=>{
|
|
|
- if(course.id == row.id){
|
|
|
- this.$refs.tableList.toggleRowSelection(course,false);
|
|
|
+ this.tableList.forEach((course, index) => {
|
|
|
+ if (course.id == row.id) {
|
|
|
+ this.$refs.tableList.toggleRowSelection(course, false);
|
|
|
}
|
|
|
- })
|
|
|
- if(this.deleteList.length <=0){
|
|
|
- this.clearCom()
|
|
|
+ });
|
|
|
+ if (this.deleteList.length <= 0) {
|
|
|
+ this.clearCom();
|
|
|
}
|
|
|
},
|
|
|
clearCom() {
|
|
|
// this.deleteList = [];
|
|
|
- this.$set(this,'deleteList',[])
|
|
|
+ this.$set(this, "deleteList", []);
|
|
|
this.$refs.tableList.clearSelection();
|
|
|
- this.$refs.addCompound.isLook = false
|
|
|
+ this.$refs.addCompound.isLook = false;
|
|
|
},
|
|
|
resetCompound(row) {
|
|
|
this.$confirm("您确定取消合并该课程?", "提示", {
|
|
@@ -1099,17 +1103,23 @@ export default {
|
|
|
return tableIdList.indexOf(item.id) == -1;
|
|
|
}
|
|
|
);
|
|
|
+ if (this.deleteList.length <= 0) {
|
|
|
+ this.clearCom();
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
- onTableSelect(rows,row){
|
|
|
- let idList = this.deleteList.map((course) => {
|
|
|
- return course.id;
|
|
|
- });
|
|
|
- if(idList.indexOf(row.id)!= -1){
|
|
|
- this.deleteList.splice(idList.indexOf(row.id),1)
|
|
|
+ onTableSelect(rows, row) {
|
|
|
+ let idList = this.deleteList.map((course) => {
|
|
|
+ return course.id;
|
|
|
+ });
|
|
|
+ if (idList.indexOf(row.id) != -1) {
|
|
|
+ this.deleteList.splice(idList.indexOf(row.id), 1);
|
|
|
+ if (this.deleteList.length <= 0) {
|
|
|
+ this.clearCom();
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
filters: {
|
|
|
isCall(val) {
|