|
@@ -194,8 +194,8 @@
|
|
|
{
|
|
|
required: true,
|
|
|
validator: validStock,
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
+ trigger: 'blur',
|
|
|
+ },
|
|
|
]"
|
|
|
>
|
|
|
<el-input
|
|
@@ -203,7 +203,7 @@
|
|
|
placeholder="请输入课时数"
|
|
|
maxlength="2"
|
|
|
@input="
|
|
|
- val => {
|
|
|
+ (val) => {
|
|
|
form.onlineClassesNum = val.replace(/[^\d]/g, '');
|
|
|
}
|
|
|
"
|
|
@@ -251,7 +251,7 @@
|
|
|
placeholder="请输入现单价"
|
|
|
maxlength="9"
|
|
|
@input="
|
|
|
- val => {
|
|
|
+ (val) => {
|
|
|
form.onlineClassesUnitPrice = val.replace(/[^\d]/g, '');
|
|
|
}
|
|
|
"
|
|
@@ -270,7 +270,7 @@
|
|
|
placeholder="请输入原单价"
|
|
|
maxlength="9"
|
|
|
@input="
|
|
|
- val => {
|
|
|
+ (val) => {
|
|
|
form.offlineClassesUnitPrice = val.replace(/[^\d]/g, '');
|
|
|
}
|
|
|
"
|
|
@@ -305,14 +305,14 @@
|
|
|
>点击排课</el-button
|
|
|
>
|
|
|
<el-table
|
|
|
+ :key="studentRefKey"
|
|
|
+ v-if="showTable"
|
|
|
style="width: 100%; margin-top: 20px"
|
|
|
:header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
|
:data="form.timeTable"
|
|
|
>
|
|
|
<el-table-column align="center" label="课时">
|
|
|
- <template slot-scope="scope">
|
|
|
- 第{{ scope.$index + 1 }}课
|
|
|
- </template>
|
|
|
+ <template slot-scope="scope"> 第{{ scope.$index + 1 }}课 </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
align="center"
|
|
@@ -384,11 +384,16 @@
|
|
|
prop="endClassTimeStr"
|
|
|
label="结束时间"
|
|
|
></el-table-column>
|
|
|
- <!-- <el-table-column align="center" label="课程类型">
|
|
|
+ <el-table-column align="center" label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
- <div>{{ scope.row.teachMode | teachMode }}</div>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ @click="resetCourse(scope.row, scope.$index)"
|
|
|
+ :disabled="isDisabled"
|
|
|
+ >调整</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
- </el-table-column> -->
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
<el-alert
|
|
@@ -406,12 +411,8 @@
|
|
|
>
|
|
|
<el-radio-group v-model="form.os" :disabled="isDisabled">
|
|
|
<!-- 根据不同的模式,显示不同的直播设备 -->
|
|
|
- <el-radio v-if="serviceProvider === 'rongCloud'" label="pc"
|
|
|
- >web</el-radio
|
|
|
- >
|
|
|
- <el-radio
|
|
|
- v-if="serviceProvider === 'tencentCloud'"
|
|
|
- label="client"
|
|
|
+ <el-radio v-if="serviceProvider === 'rongCloud'" label="pc">web</el-radio>
|
|
|
+ <el-radio v-if="serviceProvider === 'tencentCloud'" label="client"
|
|
|
>乐直播</el-radio
|
|
|
>
|
|
|
<el-radio label="mobile">手机</el-radio>
|
|
@@ -476,7 +477,7 @@
|
|
|
class="dotWrap"
|
|
|
:class="[
|
|
|
form.preTemplate == 1 ? 'checked' : '',
|
|
|
- isDisabled ? 'disabled' : ''
|
|
|
+ isDisabled ? 'disabled' : '',
|
|
|
]"
|
|
|
></i>
|
|
|
</div>
|
|
@@ -486,7 +487,7 @@
|
|
|
class="dotWrap"
|
|
|
:class="[
|
|
|
form.preTemplate == 2 ? 'checked' : '',
|
|
|
- isDisabled ? 'disabled' : ''
|
|
|
+ isDisabled ? 'disabled' : '',
|
|
|
]"
|
|
|
></i>
|
|
|
</div>
|
|
@@ -496,7 +497,7 @@
|
|
|
class="dotWrap"
|
|
|
:class="[
|
|
|
form.preTemplate == 3 ? 'checked' : '',
|
|
|
- isDisabled ? 'disabled' : ''
|
|
|
+ isDisabled ? 'disabled' : '',
|
|
|
]"
|
|
|
></i>
|
|
|
</div>
|
|
@@ -508,10 +509,7 @@
|
|
|
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- @click="onReset"
|
|
|
- v-if="[0, 1].includes(status)"
|
|
|
+ <el-button type="primary" @click="onReset" v-if="[0, 1].includes(status)"
|
|
|
>重置</el-button
|
|
|
>
|
|
|
<el-button type="primary" @click="onSubmit">确定</el-button>
|
|
@@ -535,6 +533,59 @@
|
|
|
@confirm="onConfirm"
|
|
|
/>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ title="课程调整"
|
|
|
+ width="400px"
|
|
|
+ :before-close="handleClose"
|
|
|
+ :visible.sync="courseVisible"
|
|
|
+ >
|
|
|
+ <el-form
|
|
|
+ :model="maskForm"
|
|
|
+ class="maskForm"
|
|
|
+ ref="maskForm"
|
|
|
+ :rules="maskRules"
|
|
|
+ label-position="right"
|
|
|
+ label-width="80px"
|
|
|
+ :inline="true"
|
|
|
+ >
|
|
|
+ <el-form-item label="上课日期" prop="date">
|
|
|
+ <el-date-picker
|
|
|
+ v-model.trim="maskForm.date"
|
|
|
+ type="date"
|
|
|
+ :picker-options="coursesDate()"
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ placeholder="选择日期"
|
|
|
+ ></el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="开始时间" prop="startTime">
|
|
|
+ <el-time-picker
|
|
|
+ placeholder="起始时间"
|
|
|
+ v-model.trim="startTime"
|
|
|
+ @change="changeStartTime"
|
|
|
+ format="HH:mm"
|
|
|
+ value-format="HH:mm"
|
|
|
+ :picker-options="{
|
|
|
+ selectableRange: `${nowTime} - 23:30:00`,
|
|
|
+ }"
|
|
|
+ ></el-time-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="结束时间" prop="endTime">
|
|
|
+ <el-time-picker
|
|
|
+ placeholder="结束时间"
|
|
|
+ format="HH:mm"
|
|
|
+ value-format="HH:mm"
|
|
|
+ v-model="maskForm.endTime"
|
|
|
+ disabled
|
|
|
+ >
|
|
|
+ </el-time-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="courseVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="submitResetClass">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -542,11 +593,12 @@ import dayjs from "dayjs";
|
|
|
import deepClone from "@/helpers/deep-clone";
|
|
|
import preview from "./modals/preview.vue";
|
|
|
import addLiveCourse from "./modals/addLiveCourse.vue";
|
|
|
+import { diffTimerFormMinute, addTimerFormMinute } from "@/utils/date";
|
|
|
import {
|
|
|
sysTenantConfigAll,
|
|
|
findTeacherByTenantId,
|
|
|
liveGroupDetail,
|
|
|
- updateLiveGroup
|
|
|
+ updateLiveGroup,
|
|
|
} from "./api";
|
|
|
import { getSubject, getOrganRole } from "@/api/buildTeam";
|
|
|
import { vipGroupCategory, createVip } from "@/api/vipSeting";
|
|
@@ -584,10 +636,10 @@ export default {
|
|
|
whether_chat: 0,
|
|
|
whether_video: 0,
|
|
|
whether_mic: 0,
|
|
|
- whether_view_shop_cart: 1
|
|
|
+ whether_view_shop_cart: 1,
|
|
|
},
|
|
|
timeTable: [], // 排课
|
|
|
- clientType: "TEACHER" // 主讲人身份 默认[老师]
|
|
|
+ clientType: "TEACHER", // 主讲人身份 默认[老师]
|
|
|
},
|
|
|
status: 0, // 直播课状态
|
|
|
auditStatus: null, // 审核状态
|
|
@@ -597,12 +649,24 @@ export default {
|
|
|
teacherList: [], // 指导老师
|
|
|
educationList: [], // 乐团主管
|
|
|
liveGroupList: [], // 课时列表
|
|
|
- pickerOptions: {
|
|
|
- firstDayOfWeek: 1,
|
|
|
- disabledDate(time) {
|
|
|
- return time.getTime() + 86400000 <= new Date().getTime();
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
+ activeRow: null,
|
|
|
+ actvieIndex: 0,
|
|
|
+ maskForm: {
|
|
|
+ date: "",
|
|
|
+ startTime: "",
|
|
|
+ endTime: "",
|
|
|
+ id: "",
|
|
|
+ teachMode: "",
|
|
|
+ },
|
|
|
+ maskRules: {
|
|
|
+ date: [{ required: true, message: "请选择上课时间", trigger: "blur" }],
|
|
|
+ },
|
|
|
+ courseVisible: false,
|
|
|
+ startTime: "",
|
|
|
+ courseTime: "",
|
|
|
+ studentRefKey: "12321321",
|
|
|
+ showTable: true,
|
|
|
};
|
|
|
},
|
|
|
async mounted() {
|
|
@@ -614,7 +678,7 @@ export default {
|
|
|
try {
|
|
|
// 判断声部,如果为MUSIC_THEORY则为乐理,显示普通
|
|
|
let subjectItem = {};
|
|
|
- this.subjectList.forEach(item => {
|
|
|
+ this.subjectList.forEach((item) => {
|
|
|
if (val == item.id) {
|
|
|
subjectItem = item;
|
|
|
}
|
|
@@ -628,8 +692,8 @@ export default {
|
|
|
this.form.teacher = ""; // 重置指导老师
|
|
|
// 根据科目id获取相应的老师
|
|
|
await findTeacherByTenantId({
|
|
|
- subjectIds: subjectItem.code == "MUSIC_THEORY" ? null : val
|
|
|
- }).then(res => {
|
|
|
+ subjectIds: subjectItem.code == "MUSIC_THEORY" ? null : val,
|
|
|
+ }).then((res) => {
|
|
|
this.teacherList = res.data;
|
|
|
});
|
|
|
} catch {}
|
|
@@ -638,6 +702,108 @@ export default {
|
|
|
this.$store.dispatch("delVisitedViews", this.$route);
|
|
|
this.$router.push("/liveClassManager?tabrouter=2");
|
|
|
},
|
|
|
+ coursesDate(dateStr) {
|
|
|
+ let self = this;
|
|
|
+ return {
|
|
|
+ firstDayOfWeek: 1,
|
|
|
+ disabledDate: (time) => {
|
|
|
+ return time.getTime() + 86400000 <= new Date().getTime();
|
|
|
+ },
|
|
|
+ };
|
|
|
+ },
|
|
|
+ pickerOptions(dateStr) {
|
|
|
+ return {
|
|
|
+ firstDayOfWeek: 1,
|
|
|
+ disabledDate(time) {
|
|
|
+ return time.getTime() + 86400000 <= new Date().getTime();
|
|
|
+ },
|
|
|
+ };
|
|
|
+ },
|
|
|
+ resetCourse(row, index) {
|
|
|
+ /**
|
|
|
+ * maskForm.startTime
|
|
|
+ */
|
|
|
+ this.activeRow = row;
|
|
|
+ this.actvieIndex = index;
|
|
|
+ this.maskForm.date = row.classDate;
|
|
|
+ this.startTime = row.startClassTimeStr;
|
|
|
+ this.maskForm.endTime = row.endClassTimeStr;
|
|
|
+ this.courseTime = row.singleClassMinutes;
|
|
|
+ // this.maskForm.endTime = row.endClassTimeStr;
|
|
|
+ this.maskForm.id = index;
|
|
|
+
|
|
|
+ this.maskForm.teachMode = row.teachMode;
|
|
|
+ // 修改课时
|
|
|
+ this.courseVisible = true;
|
|
|
+ },
|
|
|
+ handleClose() {
|
|
|
+ this.courseVisible = false;
|
|
|
+ this.startTime = "";
|
|
|
+ this.maskForm = {
|
|
|
+ date: "",
|
|
|
+ startTime: "",
|
|
|
+ endTime: "",
|
|
|
+ id: "",
|
|
|
+ address: "",
|
|
|
+ teachMode: "",
|
|
|
+ };
|
|
|
+ this.actvieRow = null;
|
|
|
+ this.actvieIndex = 0;
|
|
|
+ this.$refs["maskForm"].resetFields();
|
|
|
+ },
|
|
|
+ submitResetClass() {
|
|
|
+ console.log(this.activeRow, "activeRow");
|
|
|
+ console.log(this.maskForm, "maskForm");
|
|
|
+
|
|
|
+ this.form.timeTable[
|
|
|
+ this.actvieIndex
|
|
|
+ ].actualTeacherId = this.activeRow.actualTeacherId;
|
|
|
+ this.form.timeTable[this.actvieIndex].classDate = this.maskForm.date;
|
|
|
+ this.form.timeTable[this.actvieIndex].endClassTimeStr = this.maskForm.endTime;
|
|
|
+ this.form.timeTable[this.actvieIndex].singleClassMinutes = this.courseTime;
|
|
|
+ this.form.timeTable[this.actvieIndex].startClassTimeStr = this.startTime;
|
|
|
+ this.form.timeTable[this.actvieIndex].teachMode = this.activeRow.teachMode;
|
|
|
+ this.form.timeTable[
|
|
|
+ this.actvieIndex
|
|
|
+ ].teachingContent = this.activeRow.teachingContent;
|
|
|
+ this.form.timeTable[this.actvieIndex].teachingPoint = this.activeRow.teachingPoint;
|
|
|
+
|
|
|
+ console.log(
|
|
|
+ " this.form.timeTable[this.actvieIndex]",
|
|
|
+ this.form.timeTable[this.actvieIndex]
|
|
|
+ );
|
|
|
+ this.form.timeTable.sort((a, b) => {
|
|
|
+ const aTime = dayjs(
|
|
|
+ dayjs(a.classDate).format("YYYY-MM-DD") + " " + a.startClassTimeStr + ":00"
|
|
|
+ ).valueOf();
|
|
|
+ const bTime = dayjs(
|
|
|
+ dayjs(b.classDate).format("YYYY-MM-DD") + " " + b.startClassTimeStr + ":00"
|
|
|
+ ).valueOf();
|
|
|
+ return aTime - bTime;
|
|
|
+ });
|
|
|
+ this.showTable = false;
|
|
|
+ this.handleClose();
|
|
|
+ this.studentRefKey = Math.random();
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.showTable = true;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ changeStartTime(val) {
|
|
|
+ this.$nextTick((res) => {
|
|
|
+ if (val) {
|
|
|
+ this.$set(
|
|
|
+ this.maskForm,
|
|
|
+ "endTime",
|
|
|
+ addTimerFormMinute(this.maskForm.date, val, this.courseTime)
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ this.$set(this.maskForm, "endTime", "");
|
|
|
+ }
|
|
|
+ if (!this.maskForm.endTime) {
|
|
|
+ this.$set(this, "startTime", "");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
validStock(rule, value, callback) {
|
|
|
if ((value == "" && typeof value == "string") || value == null) {
|
|
|
callback(new Error("请输入课时数"));
|
|
@@ -647,12 +813,13 @@ export default {
|
|
|
callback();
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
setPreTemplate(index) {
|
|
|
if (this.isDisabled) return;
|
|
|
this.form.preTemplate = index;
|
|
|
},
|
|
|
async onSubmit() {
|
|
|
- this.$refs.liveForm.validate(async flag => {
|
|
|
+ this.$refs.liveForm.validate(async (flag) => {
|
|
|
if (!flag) {
|
|
|
this.onScrollError();
|
|
|
return false;
|
|
@@ -665,7 +832,7 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
const timeTable = [];
|
|
|
- form.timeTable.forEach(item => {
|
|
|
+ form.timeTable.forEach((item) => {
|
|
|
timeTable.push({
|
|
|
classDate: item.classDate,
|
|
|
actualTeacherId: form.teacher,
|
|
@@ -674,7 +841,7 @@ export default {
|
|
|
teachMode: item.teachMode,
|
|
|
id: item.id,
|
|
|
teachingContent: item.teachingContent,
|
|
|
- teachingPoint: item.teachingPoint
|
|
|
+ teachingPoint: item.teachingPoint,
|
|
|
});
|
|
|
});
|
|
|
|
|
@@ -690,9 +857,7 @@ export default {
|
|
|
onlineClassesNum: form.onlineClassesNum || 0,
|
|
|
offlineClassesUnitPrice: form.offlineClassesUnitPrice || 0,
|
|
|
onlineClassesUnitPrice: form.onlineClassesUnitPrice || 0,
|
|
|
- registrationStartTime: dayjs(form.signUpStart).format(
|
|
|
- "YYYY-MM-DD"
|
|
|
- ),
|
|
|
+ registrationStartTime: dayjs(form.signUpStart).format("YYYY-MM-DD"),
|
|
|
paymentExpireDate: dayjs(form.signUpEnd).format("YYYY-MM-DD"),
|
|
|
singleClassMinutes: form.singleClassMinutes,
|
|
|
userId: form.teacher,
|
|
@@ -704,7 +869,7 @@ export default {
|
|
|
subjectIdList: form.subjectIdList,
|
|
|
educationalTeacherId: form.educationalTeacherId,
|
|
|
organId: -1,
|
|
|
- organIdList: form.organIds.join(",")
|
|
|
+ organIdList: form.organIds.join(","),
|
|
|
},
|
|
|
liveBroadcastRoom: {
|
|
|
speakerId: form.teacher,
|
|
@@ -720,9 +885,9 @@ export default {
|
|
|
roomConfig: {
|
|
|
...form.roomConfig,
|
|
|
subjectId: form.subjectIdList,
|
|
|
- groupType: "LIVE"
|
|
|
- }
|
|
|
- }
|
|
|
+ groupType: "LIVE",
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
console.log(obj, "obj");
|
|
|
if (this.type === "update") {
|
|
@@ -734,19 +899,19 @@ export default {
|
|
|
this.$router.push({
|
|
|
path: "/liveClassManager",
|
|
|
query: {
|
|
|
- tabrouter: 2
|
|
|
- }
|
|
|
+ tabrouter: 2,
|
|
|
+ },
|
|
|
});
|
|
|
} else {
|
|
|
- createVip(obj).then(res => {
|
|
|
+ createVip(obj).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
this.$message.success("创建成功");
|
|
|
this.$store.dispatch("delVisitedViews", this.$route);
|
|
|
this.$router.push({
|
|
|
path: "/liveClassManager",
|
|
|
query: {
|
|
|
- tabrouter: 2
|
|
|
- }
|
|
|
+ tabrouter: 2,
|
|
|
+ },
|
|
|
});
|
|
|
}
|
|
|
});
|
|
@@ -764,7 +929,7 @@ export default {
|
|
|
let isError = document.getElementsByClassName("el-alert");
|
|
|
isError[0].scrollIntoView({
|
|
|
block: "center",
|
|
|
- behavior: "smooth"
|
|
|
+ behavior: "smooth",
|
|
|
});
|
|
|
});
|
|
|
},
|
|
@@ -773,7 +938,7 @@ export default {
|
|
|
let count = 0;
|
|
|
this.$refs.liveForm.validateField(
|
|
|
["signUpStart", "signUPEnd", "onlineClassesNum", "singleClassMinuteId"],
|
|
|
- valid => {
|
|
|
+ (valid) => {
|
|
|
count += 1;
|
|
|
if (valid) {
|
|
|
this.onScrollError();
|
|
@@ -810,7 +975,7 @@ export default {
|
|
|
} else {
|
|
|
return time.getTime() + 86400000 <= new Date().getTime();
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
startBigin() {
|
|
@@ -819,7 +984,7 @@ export default {
|
|
|
disabledDate(time) {
|
|
|
// return time.getTime() >= Date.now();
|
|
|
return time.getTime() + 86400000 <= new Date().getTime();
|
|
|
- }
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
onScrollError() {
|
|
@@ -827,7 +992,7 @@ export default {
|
|
|
let isError = document.getElementsByClassName("is-error");
|
|
|
isError[0].scrollIntoView({
|
|
|
block: "center",
|
|
|
- behavior: "smooth"
|
|
|
+ behavior: "smooth",
|
|
|
});
|
|
|
});
|
|
|
},
|
|
@@ -836,7 +1001,7 @@ export default {
|
|
|
let onlinePrice = null;
|
|
|
let offLinePrice = null;
|
|
|
let minus = null;
|
|
|
- this.liveGroupList.forEach(item => {
|
|
|
+ this.liveGroupList.forEach((item) => {
|
|
|
if (item.id === val) {
|
|
|
onlinePrice = item.onlineClassesUnitPrice;
|
|
|
offLinePrice = item.offlineClassesUnitPrice;
|
|
@@ -851,7 +1016,7 @@ export default {
|
|
|
},
|
|
|
onConfirm(val) {
|
|
|
let tempVal = deepClone(val || []);
|
|
|
- tempVal.forEach(item => {
|
|
|
+ tempVal.forEach((item) => {
|
|
|
item.teachingContent = "";
|
|
|
item.teachingPoint = "";
|
|
|
item.singleClassMinutes = this.form.singleClassMinutes;
|
|
@@ -863,37 +1028,36 @@ export default {
|
|
|
async __init() {
|
|
|
try {
|
|
|
const findName = await sysTenantConfigAll({
|
|
|
- group: "LIVE_CLIENT"
|
|
|
+ group: "LIVE_CLIENT",
|
|
|
});
|
|
|
if (findName.data && findName.data.length > 0) {
|
|
|
- findName.data.forEach(item => {
|
|
|
+ findName.data.forEach((item) => {
|
|
|
if (item.paramName == "live_client") {
|
|
|
this.serviceProvider = item.paranValue;
|
|
|
- this.form.os =
|
|
|
- this.serviceProvider == "tencentCloud" ? "client" : "pc";
|
|
|
+ this.form.os = this.serviceProvider == "tencentCloud" ? "client" : "pc";
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
// 获取 指导老师列表
|
|
|
await getSubject({
|
|
|
- tenantId: 1
|
|
|
- }).then(res => {
|
|
|
+ tenantId: 1,
|
|
|
+ }).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
this.subjectList = [...res.data];
|
|
|
}
|
|
|
});
|
|
|
|
|
|
// 获取乐团主管
|
|
|
- await getOrganRole({ all: true }).then(ruselt => {
|
|
|
+ await getOrganRole({ all: true }).then((ruselt) => {
|
|
|
this.educationList = ruselt?.data?.EDUCATION;
|
|
|
});
|
|
|
|
|
|
// 获取课时数
|
|
|
// 获取默认左边参数
|
|
|
await vipGroupCategory({
|
|
|
- groupType: "live"
|
|
|
- }).then(res => {
|
|
|
+ groupType: "live",
|
|
|
+ }).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
this.liveGroupList = res.data;
|
|
|
}
|
|
@@ -907,7 +1071,7 @@ export default {
|
|
|
const vipGroupApplyBaseInfo = data.vipGroupApplyBaseInfo || {};
|
|
|
const courseSchedules = data.courseSchedules || [];
|
|
|
const tempCourse = [];
|
|
|
- courseSchedules.forEach(item => {
|
|
|
+ courseSchedules.forEach((item) => {
|
|
|
tempCourse.push({
|
|
|
classDate: item.classDate,
|
|
|
actualTeacherId: item.teacherId,
|
|
@@ -917,7 +1081,7 @@ export default {
|
|
|
id: item.id,
|
|
|
singleClassMinutes: vipGroupApplyBaseInfo.singleClassMinutes,
|
|
|
teachingContent: item.teachingContent,
|
|
|
- teachingPoint: item.teachingPoint
|
|
|
+ teachingPoint: item.teachingPoint,
|
|
|
});
|
|
|
});
|
|
|
|
|
@@ -931,9 +1095,7 @@ export default {
|
|
|
roomTitle: liveBroadcastRoom.roomTitle, //
|
|
|
liveRemark: liveBroadcastRoom.liveRemark, // 内容
|
|
|
organIds: vipGroupApplyBaseInfo.organIdList
|
|
|
- ? vipGroupApplyBaseInfo.organIdList
|
|
|
- .split(",")
|
|
|
- .map(item => Number(item))
|
|
|
+ ? vipGroupApplyBaseInfo.organIdList.split(",").map((item) => Number(item))
|
|
|
: [],
|
|
|
subjectIdList: subjectId, // 声部
|
|
|
teacher: liveBroadcastRoom.speakerId, // 指导老师列表
|
|
@@ -948,10 +1110,8 @@ export default {
|
|
|
onlineClassesNum: vipGroupApplyBaseInfo.onlineClassesNum,
|
|
|
singleClassMinuteId: vipGroupApplyBaseInfo.vipGroupCategoryId, //时长编号
|
|
|
singleClassMinutes: vipGroupApplyBaseInfo.singleClassMinutes, // 时长
|
|
|
- onlineClassesUnitPrice:
|
|
|
- vipGroupApplyBaseInfo.onlineClassesUnitPrice, // 售价
|
|
|
- offlineClassesUnitPrice:
|
|
|
- vipGroupApplyBaseInfo.offlineClassesUnitPrice, // 原价
|
|
|
+ onlineClassesUnitPrice: vipGroupApplyBaseInfo.onlineClassesUnitPrice, // 售价
|
|
|
+ offlineClassesUnitPrice: vipGroupApplyBaseInfo.offlineClassesUnitPrice, // 原价
|
|
|
os: liveBroadcastRoom.os, // 直播设备
|
|
|
useScene: liveBroadcastRoom.useScene, // 直播场景
|
|
|
popularizeType: liveBroadcastRoom.popularizeType, // 观看权限信息
|
|
@@ -961,10 +1121,10 @@ export default {
|
|
|
whether_chat: 0,
|
|
|
whether_video: 0,
|
|
|
whether_mic: 0,
|
|
|
- whether_view_shop_cart: 0
|
|
|
+ whether_view_shop_cart: 0,
|
|
|
},
|
|
|
timeTable: tempCourse, // 排课
|
|
|
- clientType: "TEACHER" // 主讲人身份 默认[老师]
|
|
|
+ clientType: "TEACHER", // 主讲人身份 默认[老师]
|
|
|
};
|
|
|
|
|
|
this.status = data.vipGroupApplyBaseInfo.status;
|
|
@@ -975,30 +1135,34 @@ export default {
|
|
|
//
|
|
|
console.log(e, "e info");
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
computed: {
|
|
|
+ nowTime() {
|
|
|
+ // console.log(that.maskForm.date)
|
|
|
+ let str = "06:00:00";
|
|
|
+ if (this.maskForm.date == dayjs(new Date()).format("YYYY-MM-DD")) {
|
|
|
+ str = dayjs(new Date()).format("HH:mm:ss");
|
|
|
+ }
|
|
|
+
|
|
|
+ return str;
|
|
|
+ },
|
|
|
+
|
|
|
countOnlineClassesUnitPrice() {
|
|
|
return (
|
|
|
- Math.ceil(
|
|
|
- this.form.onlineClassesNum * this.form.onlineClassesUnitPrice
|
|
|
- ) || 0
|
|
|
+ Math.ceil(this.form.onlineClassesNum * this.form.onlineClassesUnitPrice) || 0
|
|
|
);
|
|
|
},
|
|
|
countOfflineClassesUnitPrice() {
|
|
|
return (
|
|
|
- Math.ceil(
|
|
|
- this.form.onlineClassesNum * this.form.offlineClassesUnitPrice
|
|
|
- ) || 0
|
|
|
+ Math.ceil(this.form.onlineClassesNum * this.form.offlineClassesUnitPrice) || 0
|
|
|
);
|
|
|
},
|
|
|
isDisabled() {
|
|
|
console.log(this.status, this.type, "isDisabled");
|
|
|
- return this.type === "update" && [1, 2].includes(this.status)
|
|
|
- ? true
|
|
|
- : false;
|
|
|
- }
|
|
|
- }
|
|
|
+ return this.type === "update" && [1, 2].includes(this.status) ? true : false;
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
@@ -1019,8 +1183,7 @@ export default {
|
|
|
.dotWrap {
|
|
|
width: 21px;
|
|
|
height: 21px;
|
|
|
- background: url("../../assets/images/icon_checkbox_default.png") no-repeat
|
|
|
- center;
|
|
|
+ background: url("../../assets/images/icon_checkbox_default.png") no-repeat center;
|
|
|
background-size: contain;
|
|
|
display: block;
|
|
|
position: absolute;
|
|
@@ -1029,8 +1192,7 @@ export default {
|
|
|
overflow: hidden;
|
|
|
|
|
|
&.checked {
|
|
|
- background: url("../../assets/images/icon_checkbox.png") no-repeat
|
|
|
- center;
|
|
|
+ background: url("../../assets/images/icon_checkbox.png") no-repeat center;
|
|
|
background-size: contain;
|
|
|
}
|
|
|
|