|
@@ -196,6 +196,12 @@
|
|
icon="el-icon-setting"
|
|
icon="el-icon-setting"
|
|
@click="handlePeriodSettings(scope.row)"
|
|
@click="handlePeriodSettings(scope.row)"
|
|
>营期相关设置</el-button>
|
|
>营期相关设置</el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ type="text"
|
|
|
|
+ icon="el-icon-circle-close"
|
|
|
|
+ @click="handleClosePeriod(scope.row)"
|
|
|
|
+ >结束营期</el-button>
|
|
<el-button
|
|
<el-button
|
|
size="mini"
|
|
size="mini"
|
|
type="text"
|
|
type="text"
|
|
@@ -453,7 +459,19 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import {addPeriod, delPeriod, exportPeriod, getPeriod, pagePeriod, updatePeriod, getDays, addCourse, updateListCourseData, periodCourseMove} from "@/api/course/userCoursePeriod";
|
|
|
|
|
|
+import {
|
|
|
|
+ addPeriod,
|
|
|
|
+ delPeriod,
|
|
|
|
+ exportPeriod,
|
|
|
|
+ getPeriod,
|
|
|
|
+ pagePeriod,
|
|
|
|
+ updatePeriod,
|
|
|
|
+ getDays,
|
|
|
|
+ addCourse,
|
|
|
|
+ updateListCourseData,
|
|
|
|
+ periodCourseMove,
|
|
|
|
+ closePeriod
|
|
|
|
+} from "@/api/course/userCoursePeriod";
|
|
import {getCompanyList} from "@/api/company/company";
|
|
import {getCompanyList} from "@/api/company/company";
|
|
import { listCamp, addCamp, editCamp, delCamp, copyCamp } from "@/api/course/userCourseCamp";
|
|
import { listCamp, addCamp, editCamp, delCamp, copyCamp } from "@/api/course/userCourseCamp";
|
|
import { courseList,videoList } from '@/api/course/courseRedPacketLog'
|
|
import { courseList,videoList } from '@/api/course/courseRedPacketLog'
|
|
@@ -1183,6 +1201,23 @@ export default {
|
|
// 根据当前激活的tab加载对应数据
|
|
// 根据当前激活的tab加载对应数据
|
|
this.handleTabClick({ name: this.activeTab });
|
|
this.handleTabClick({ name: this.activeTab });
|
|
},
|
|
},
|
|
|
|
+ // 结束营期
|
|
|
|
+ handleClosePeriod(row) {
|
|
|
|
+ const msg = `注: 1.确认结束营期,该营期的开营结束时间改为当天24点。2.当天正在播放中的课程不变。3.第二天如有未开始的课程,统一改为已结束。是否确认结束 ${row.periodName} 营期吗?`
|
|
|
|
+ this.$confirm(msg, "警告", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning"
|
|
|
|
+ }).then(() => {
|
|
|
|
+ closePeriod({id: row.periodId}).then(response => {
|
|
|
|
+ if (response.code === 200) {
|
|
|
|
+ this.getList()
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.error(response.msg)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }).catch(() => {})
|
|
|
|
+ },
|
|
handleBatchRedPacketSuccess() {
|
|
handleBatchRedPacketSuccess() {
|
|
this.batchRedPacketVisible = false;
|
|
this.batchRedPacketVisible = false;
|
|
this.getCourseList();
|
|
this.getCourseList();
|