|
@@ -120,9 +120,18 @@
|
|
|
@click="classAdjustment(scope.row)"
|
|
|
>排课</el-button
|
|
|
>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ v-if="
|
|
|
+ scope.row.studentNum == '0' ||
|
|
|
+ scope.row.totalClassTimes == '0'
|
|
|
+ "
|
|
|
+ @click="removeClass(scope)"
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
<!--<el-button type="text"
|
|
|
@click="recourse(scope.row)">重新排课</el-button>-->
|
|
|
- <el-popover
|
|
|
+ <!-- <el-popover
|
|
|
placement="top"
|
|
|
width="200"
|
|
|
:ref="`popover-${scope.$index}`"
|
|
@@ -144,17 +153,8 @@
|
|
|
>确定</el-button
|
|
|
>
|
|
|
</div>
|
|
|
- <!-- v-if="scope.row.type !='MIX'" -->
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- v-if="
|
|
|
- scope.row.studentNum == '0' ||
|
|
|
- scope.row.totalClassTimes == '0'
|
|
|
- "
|
|
|
- slot="reference"
|
|
|
- >删除</el-button
|
|
|
- >
|
|
|
- </el-popover>
|
|
|
+
|
|
|
+ </el-popover> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -1032,22 +1032,26 @@ export default {
|
|
|
},
|
|
|
// 删除班级
|
|
|
removeClass(scope) {
|
|
|
- removeSingleClass({ classGroupId: scope.row.id })
|
|
|
+ this.$confirm("是否确定删除该班级?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ removeSingleClass({ classGroupId: scope.row.id })
|
|
|
.then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
- scope._self.$refs[`popover-${scope.$index}`].doClose();
|
|
|
this.$message.success("删除成功");
|
|
|
-
|
|
|
// 重新请求列表
|
|
|
this.getList(this.activeMixClass);
|
|
|
- } else {
|
|
|
- this.$message.error(res.msg);
|
|
|
- scope._self.$refs[`popover-${scope.$index}`].doClose();
|
|
|
}
|
|
|
})
|
|
|
.catch((res) => {
|
|
|
- scope._self.$refs[`popover-${scope.$index}`].doClose();
|
|
|
+
|
|
|
});
|
|
|
+ })
|
|
|
+ .catch(() => { });
|
|
|
+
|
|
|
},
|
|
|
// 修改班级
|
|
|
resetClass(row) {
|