|
@@ -31,7 +31,7 @@
|
|
|
v-model.trim="form.roomTitle"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item
|
|
|
+ <!-- <el-form-item
|
|
|
label="直播方案"
|
|
|
class="nomb"
|
|
|
prop="serviceProvider"
|
|
@@ -43,7 +43,6 @@
|
|
|
clearable
|
|
|
@change="
|
|
|
(value) => {
|
|
|
- // console.log(value, 'value');
|
|
|
if (value === 'rongCloud') {
|
|
|
form.os = 'pc';
|
|
|
} else if (value === 'tencentCloud') {
|
|
@@ -55,7 +54,7 @@
|
|
|
<el-option label="融云" value="rongCloud"></el-option>
|
|
|
<el-option label="腾讯云" value="tencentCloud"></el-option>
|
|
|
</el-select>
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item> -->
|
|
|
<el-form-item
|
|
|
label="直播开始时间"
|
|
|
class="nomb"
|
|
@@ -86,7 +85,7 @@
|
|
|
v-model="form.clientType"
|
|
|
clearable
|
|
|
@change="
|
|
|
- (value) => {
|
|
|
+ value => {
|
|
|
form.speakerId = '';
|
|
|
}
|
|
|
"
|
|
@@ -256,10 +255,10 @@
|
|
|
<el-radio-group v-model="form.os">
|
|
|
<!-- value="rongCloud"></el-option>
|
|
|
<el-option label="腾讯云" value="tencentCloud" -->
|
|
|
- <el-radio v-if="form.serviceProvider === 'rongCloud'" label="pc"
|
|
|
+ <el-radio v-if="serviceProvider === 'rongCloud'" label="pc"
|
|
|
>web</el-radio
|
|
|
>
|
|
|
- <el-radio v-if="form.serviceProvider === 'tencentCloud'" label="client"
|
|
|
+ <el-radio v-if="serviceProvider === 'tencentCloud'" label="client"
|
|
|
>客户端</el-radio
|
|
|
>
|
|
|
<el-radio label="mobile">手机</el-radio>
|
|
@@ -290,8 +289,8 @@
|
|
|
<el-form-item
|
|
|
v-if="
|
|
|
form.popularizeType == 'SCHOOL' ||
|
|
|
- form.popularizeType == 'ORGAN' ||
|
|
|
- form.popularizeType == 'TEAM'
|
|
|
+ form.popularizeType == 'ORGAN' ||
|
|
|
+ form.popularizeType == 'TEAM'
|
|
|
"
|
|
|
label="分部"
|
|
|
prop="organIds"
|
|
@@ -458,7 +457,12 @@
|
|
|
import preview from "./modals/preview.vue";
|
|
|
import axios from "axios";
|
|
|
import { getToken, getTenantId } from "@/utils/auth";
|
|
|
-import { createLiveBroadcast, resetLiveBroadcastRoomList, getRoomInfo } from "./api";
|
|
|
+import {
|
|
|
+ createLiveBroadcast,
|
|
|
+ resetLiveBroadcastRoomList,
|
|
|
+ getRoomInfo,
|
|
|
+ sysTenantConfigAll
|
|
|
+} from "./api";
|
|
|
import { queryByOrganId } from "@/api/systemManage";
|
|
|
import { getTeamList } from "@/api/teamServer";
|
|
|
export default {
|
|
@@ -484,11 +488,11 @@ export default {
|
|
|
whether_chat: 0,
|
|
|
whether_video: 0,
|
|
|
whether_mic: 0,
|
|
|
- whether_view_shop_cart: 0,
|
|
|
+ whether_view_shop_cart: 0
|
|
|
},
|
|
|
- checkList: [],
|
|
|
- serviceProvider: "tencentCloud",
|
|
|
+ checkList: []
|
|
|
},
|
|
|
+ serviceProvider: "tencentCloud",
|
|
|
remoteLoading: false,
|
|
|
teacherList: [],
|
|
|
checkList: [],
|
|
@@ -499,16 +503,35 @@ export default {
|
|
|
firstDayOfWeek: 1,
|
|
|
disabledDate(time) {
|
|
|
return time.getTime() + 86400000 <= new Date().getTime();
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
- educationList: [],
|
|
|
+ educationList: []
|
|
|
};
|
|
|
},
|
|
|
- mounted() {
|
|
|
+ async mounted() {
|
|
|
this.$store.dispatch("setBranchs");
|
|
|
+
|
|
|
+ try {
|
|
|
+ const findName = await sysTenantConfigAll({
|
|
|
+ group: "LIVE_CLIENT"
|
|
|
+ });
|
|
|
+ if (findName.data && findName.data.length > 0) {
|
|
|
+ findName.data.forEach(item => {
|
|
|
+ if (item.paramName == "live_client") {
|
|
|
+ this.serviceProvider = item.paranValue;
|
|
|
+
|
|
|
+ this.form.os =
|
|
|
+ this.serviceProvider == "tencentCloud" ? "client" : "pc";
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } catch {
|
|
|
+ //
|
|
|
+ }
|
|
|
+
|
|
|
if (this.$route.query.id) {
|
|
|
// this.name = "修改直播间";
|
|
|
- this.getDetail();
|
|
|
+ await this.getDetail();
|
|
|
// console.log()
|
|
|
// this.form = {
|
|
|
// ...this.$route.query,
|
|
@@ -562,19 +585,23 @@ export default {
|
|
|
schoolIds: [],
|
|
|
teamIds: [],
|
|
|
catIds: [],
|
|
|
- studentIds: [],
|
|
|
+ studentIds: []
|
|
|
};
|
|
|
this.form.roomConfig = JSON.parse(res.data.roomConfig);
|
|
|
if (res.data.popularizeOrgIds) {
|
|
|
- this.form.organIds = res.data.popularizeOrgIds.split(",").map((item) => {
|
|
|
- return item * 1;
|
|
|
- });
|
|
|
+ this.form.organIds = res.data.popularizeOrgIds
|
|
|
+ .split(",")
|
|
|
+ .map(item => {
|
|
|
+ return item * 1;
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
if (res.data.popularizeSchoolIds) {
|
|
|
- this.form.schoolIds = res.data.popularizeSchoolIds.split(",").map((item) => {
|
|
|
- return item * 1;
|
|
|
- });
|
|
|
+ this.form.schoolIds = res.data.popularizeSchoolIds
|
|
|
+ .split(",")
|
|
|
+ .map(item => {
|
|
|
+ return item * 1;
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
if (res.data.popularizeTeamIds) {
|
|
@@ -601,14 +628,14 @@ export default {
|
|
|
this.$router.push("/liveClassManager");
|
|
|
},
|
|
|
changeTeacher(val) {
|
|
|
- this.teacherList.forEach((item) => {
|
|
|
+ this.teacherList.forEach(item => {
|
|
|
if (val == item.id) {
|
|
|
this.form.speakerName = item.realName;
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
preLook() {
|
|
|
- this.$refs.form.validate((flag) => {
|
|
|
+ this.$refs.form.validate(flag => {
|
|
|
if (flag) {
|
|
|
this.preLookVisible = true;
|
|
|
console.log("预览", this.form);
|
|
@@ -635,25 +662,25 @@ export default {
|
|
|
method: "get",
|
|
|
headers: {
|
|
|
Authorization: getToken(),
|
|
|
- tenantId: getTenantId(),
|
|
|
+ tenantId: getTenantId()
|
|
|
},
|
|
|
params: {
|
|
|
rows: 9999,
|
|
|
search: query,
|
|
|
lockFlag: 0,
|
|
|
- demissionFlag: false,
|
|
|
+ demissionFlag: false
|
|
|
},
|
|
|
- url,
|
|
|
+ url
|
|
|
};
|
|
|
this.remoteLoading = true;
|
|
|
// this.studentList = []
|
|
|
- axios(options).then((res) => {
|
|
|
+ axios(options).then(res => {
|
|
|
this.remoteLoading = false;
|
|
|
let result = res.data;
|
|
|
if (result.code == 200) {
|
|
|
// Array.prototype.splice.apply(this.studentList, result.data.rows);
|
|
|
if (result.data && result.data.rows.length > 0) {
|
|
|
- result.data.rows.forEach((item) => {
|
|
|
+ result.data.rows.forEach(item => {
|
|
|
this.teacherList.unshift(item);
|
|
|
});
|
|
|
this.teacherList = this.deweight(this.teacherList, "phone");
|
|
@@ -680,25 +707,25 @@ export default {
|
|
|
method: "get",
|
|
|
headers: {
|
|
|
Authorization: getToken(),
|
|
|
- tenantId: getTenantId(),
|
|
|
+ tenantId: getTenantId()
|
|
|
},
|
|
|
params: {
|
|
|
rows: 9999,
|
|
|
search: query,
|
|
|
lockFlag: 0,
|
|
|
- demissionFlag: false,
|
|
|
+ demissionFlag: false
|
|
|
},
|
|
|
- url,
|
|
|
+ url
|
|
|
};
|
|
|
this.remoteLoading = true;
|
|
|
|
|
|
- axios(options).then((res) => {
|
|
|
+ axios(options).then(res => {
|
|
|
this.remoteLoading = false;
|
|
|
let result = res.data;
|
|
|
if (result.code == 200) {
|
|
|
// Array.prototype.splice.apply(this.studentList, result.data.rows);
|
|
|
if (result.data && result.data.rows.length > 0) {
|
|
|
- result.data.rows.forEach((item) => {
|
|
|
+ result.data.rows.forEach(item => {
|
|
|
this.educationList.unshift(item);
|
|
|
});
|
|
|
this.educationList = this.deweight(this.educationList, "phone");
|
|
@@ -710,9 +737,9 @@ export default {
|
|
|
},
|
|
|
deweight(arr, key) {
|
|
|
let res = [];
|
|
|
- arr.forEach((item) => {
|
|
|
+ arr.forEach(item => {
|
|
|
let list = [];
|
|
|
- res.forEach((resitem) => {
|
|
|
+ res.forEach(resitem => {
|
|
|
list.push(resitem[key]);
|
|
|
});
|
|
|
if (list.indexOf(item[key]) === -1) {
|
|
@@ -731,7 +758,7 @@ export default {
|
|
|
this.form.popularizeOrgIds = this.form.organIds.join(",");
|
|
|
this.form.popularizeSchoolIds = this.form.schoolIds.join(",");
|
|
|
this.form.popularizeTeamIds = this.form.teamIds.join(",");
|
|
|
- this.$refs.form.validate(async (flag) => {
|
|
|
+ this.$refs.form.validate(async flag => {
|
|
|
if (!flag) return;
|
|
|
if (this.$route.query.id) {
|
|
|
// 修改
|
|
@@ -770,7 +797,7 @@ export default {
|
|
|
if (this.form.popularizeType == "SCHOOL" && val && val.length > 0) {
|
|
|
let organId = val.join(",");
|
|
|
try {
|
|
|
- await queryByOrganId({ organId }).then((res) => {
|
|
|
+ await queryByOrganId({ organId }).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.cooperationList = res.data;
|
|
|
}
|
|
@@ -782,7 +809,7 @@ export default {
|
|
|
if (this.form.popularizeType == "TEAM" && val && val.length > 0) {
|
|
|
let organId = val.join(",");
|
|
|
try {
|
|
|
- await getTeamList({ organId, page: 1, rows: 9999 }).then((res) => {
|
|
|
+ await getTeamList({ organId, page: 1, rows: 9999 }).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.teamList = res.data.rows;
|
|
|
}
|
|
@@ -791,8 +818,8 @@ export default {
|
|
|
console.log(e);
|
|
|
}
|
|
|
}
|
|
|
- },
|
|
|
- },
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
@@ -879,13 +906,15 @@ 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;
|
|
|
margin-right: 8px;
|
|
|
position: relative;
|
|
|
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;
|
|
|
}
|
|
|
}
|