-- bug 直播回显

This commit is contained in:
yuping
2022-12-03 14:39:39 +08:00
parent f969a1920e
commit 43be980541

View File

@@ -106,18 +106,8 @@
<span style="margin-right: 3px">授课老师</span>
</div>
<div class="btnbox">
<a-auto-complete
:value="memberValue.label"
show-search
:not-found-content="fetching ? undefined : null"
placeholder="Select a teacher"
style="width: 364px"
:options="options"
@focus="handleFocus"
@change="handleChange2"
@popupScroll="templateScroll"
@search="handleSearch"
></a-auto-complete>
<ProjectManager v-model:value="memberValue.value"
v-model:name="memberValue.label"></ProjectManager>
</div>
</div>
<div class="mbl_items2">
@@ -173,7 +163,7 @@
<span style="margin-right: 3px">回放设置</span>
</div>
<div class="btnbox">
<a-switch v-model:checked="switchC1" @click="PlayBack" />
<a-switch v-model:checked="switchC1"/>
</div>
</div>
<div v-if="switchC1">
@@ -198,7 +188,8 @@
<a-checkbox
v-model:checked="needEval"
@click="needEval = !needEval"
>需要评估</a-checkbox
>需要评估
</a-checkbox
>
</div>
</div>
@@ -226,7 +217,9 @@
</div>
<div class="kqszbox">
<div class="qdqtbox">
<div class="qdbtn"><div class="btntext">签到</div></div>
<div class="qdbtn">
<div class="btntext">签到</div>
</div>
</div>
<div class="setbox">
<div class="timerbox">
@@ -308,7 +301,8 @@
<a-checkbox
v-model:checked="switchC2"
@onclick="switchC2 = !switchC2"
>学员请假后记为任务完成</a-checkbox
>学员请假后记为任务完成
</a-checkbox
>
</div>
</div>
@@ -334,16 +328,20 @@ import dayjs from "dayjs";
import {fileUp} from "../../api/indexEval";
import AssessmentList from "../drawers/ AssessmentList.vue";
import {debounce} from "lodash-es";
import ProjectManager from "@/components/project/ProjectManager";
// import { useRouter } from "vue-router";
function getBase64(img, callback) {
const reader = new FileReader();
reader.addEventListener("load", () => callback(reader.result));
reader.readAsDataURL(img);
}
export default {
name: "AddLive",
components: {
AssessmentList,
ProjectManager,
},
props: {
addliveVisible: {
@@ -500,7 +498,10 @@ export default {
//state.= res.data.data
state.assessmentId = res.data.data.assessmentId;
state.imageUrl = res.data.data.liveCover;
state.switchC1 = res.data.data.livePlayback === '1' ? true : false;
state.switchC2 = res.data.data.otherSettings == 1 ? true : false;
state.needEval = res.data.data.isEvaluate == '1' ? true : false;
state.memberValue = {value: res.data.data.liveTeacherId || '', label: res.data.data.liveTeacherName || ''};
})
.catch(() => {
//message.error(`查询失败`);
@@ -633,7 +634,8 @@ export default {
liveName: state.inputV1,
livePlayback: state.switchC1 ? "1" : "0",
livePlaybackLink: state.switchC1 ? state.inputV5 : "",
liveTeacherId: state.inputV3,
liveTeacherId: state.memberValue.value,
liveTeacherName: state.memberValue.label,
otherSettings: state.switchC2 ? "1" : "0", //1或0
signOutTime: state.inputV8,
standardSettings: state.radioV1, //1或2
@@ -648,7 +650,8 @@ export default {
await updateTask(res);
closeDrawer();
})
.catch(() => {});
.catch(() => {
});
} else {
api
.createLiveBroadcast(state.obj)
@@ -658,7 +661,8 @@ export default {
await updateTask(res);
closeDrawer();
})
.catch(() => {});
.catch(() => {
});
}
};
const beforeUpload = (file) => {
@@ -786,6 +790,7 @@ export default {
.ant-table-striped :deep(.table-striped) td {
background-color: #fafafa !important;
}
.addliveDrawer {
.drawerMain {
.header {
@@ -795,6 +800,7 @@ export default {
justify-content: space-between;
align-items: center;
flex-shrink: 0;
.headerTitle {
font-size: 18px;
font-weight: 600;
@@ -803,32 +809,39 @@ export default {
margin-left: 24px;
}
}
.contentMain {
display: flex;
justify-content: space-between;
.main_left {
padding-right: 30px;
flex: 1;
border-right: 1px solid #e8e8e8;
margin-top: 32px;
.main_item {
display: flex;
align-items: center;
margin-top: 32px;
margin-bottom: 32px;
.signbox {
width: 120px;
display: flex;
justify-content: end;
align-items: center;
.sign {
margin-right: 5px;
}
}
.btnbox {
display: flex;
flex: 1;
align-items: center;
.xkbtn {
cursor: pointer;
width: 130px;
@@ -841,24 +854,29 @@ export default {
}
}
}
.main_item2 {
display: flex;
align-items: flex-start;
margin-bottom: 32px;
.signbox {
width: 120px;
display: flex;
justify-content: end;
align-items: center;
.sign {
margin-right: 5px;
}
}
.kqszbox {
.qdqtbox {
margin-left: 5px;
cursor: pointer;
}
.qdbtn,
.qtbtn {
width: 75px;
@@ -869,15 +887,18 @@ export default {
display: flex;
align-items: center;
justify-content: center;
.btntext {
color: #387df7;
}
}
.setbox {
display: flex;
flex-wrap: wrap;
margin-top: 10px;
margin-bottom: 24px;
.timerbox {
margin-top: 6px;
margin-right: 32px;
@@ -887,10 +908,12 @@ export default {
}
}
}
.btnbox2 {
display: flex;
flex-direction: column;
justify-content: flex-start;
.xkbtn {
cursor: pointer;
width: 130px;
@@ -905,20 +928,24 @@ export default {
}
}
}
.mbl_items2 {
display: flex;
align-items: start;
margin-top: 10px;
margin-bottom: 10px;
.i_bottom {
margin-bottom: 30px;
}
.item_nam {
width: 100px;
display: flex;
align-items: center;
justify-content: flex-end;
white-space: nowrap;
.asterisk_icon {
width: 10px;
height: 10px;
@@ -926,13 +953,16 @@ export default {
margin-top: -15px;
}
}
.item_inp {
flex: 1;
.i_upload_img {
width: 100px;
height: 100px;
border-radius: 8px;
}
.i_upload {
width: 100px;
height: 100px;
@@ -941,8 +971,10 @@ export default {
text-align: center;
align-items: center;
cursor: pointer;
.addimg {
position: relative;
.heng {
position: absolute;
top: 50px;
@@ -950,6 +982,7 @@ export default {
width: 50px;
border: 1px solid #4ea6ff;
}
.shu {
position: absolute;
top: 25px;
@@ -963,6 +996,7 @@ export default {
}
}
}
.main_btns {
height: 72px;
width: 100%;
@@ -972,6 +1006,7 @@ export default {
align-items: center;
justify-content: center;
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
.btn1 {
width: 100px;
height: 40px;
@@ -981,6 +1016,7 @@ export default {
background-color: #fff;
cursor: pointer;
}
.btn2 {
cursor: pointer;
width: 100px;