mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 20:06:47 +08:00
直播bug 添加面授bug
This commit is contained in:
@@ -121,39 +121,44 @@
|
||||
></a-auto-complete>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item2">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px">直播封面:</span>
|
||||
</div>
|
||||
<div
|
||||
class="textarea"
|
||||
style="overflow: hidden; width: 102px; height: 102px"
|
||||
>
|
||||
<a-upload
|
||||
v-model:file-list="fileList"
|
||||
name="avatar"
|
||||
list-type="picture-card"
|
||||
class="avatar-uploader"
|
||||
:show-upload-list="false"
|
||||
action="/manageApi/file/upload"
|
||||
:before-upload="beforeUpload"
|
||||
@change="handleChange"
|
||||
>
|
||||
<img
|
||||
v-if="imageUrl"
|
||||
:src="imageUrl"
|
||||
alt="avatar"
|
||||
style="“width:100px;height:100px;”"
|
||||
/>
|
||||
<div v-else>
|
||||
<loading-outlined v-if="loading"></loading-outlined>
|
||||
<plus-outlined v-else></plus-outlined>
|
||||
<div class="ant-upload-text">Upload</div>
|
||||
</div>
|
||||
</a-upload>
|
||||
<div class="tip">支持图片格式为jpg/jpeg/png 图片最大为2MB</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mbl_items2">
|
||||
<div class="item_nam">
|
||||
<div class="asterisk_icon">
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<span style="margin-right: 14px">直播封面</span>
|
||||
</div>
|
||||
<div class="item_inp">
|
||||
|
||||
<a-upload
|
||||
name="avatar"
|
||||
list-type="picture-card"
|
||||
class="avatar-uploader"
|
||||
:show-upload-list="false"
|
||||
:before-upload="beforeUpload"
|
||||
>
|
||||
<img
|
||||
class="i_upload_img"
|
||||
v-if="imageUrl"
|
||||
:src="imageUrl"
|
||||
alt="avatar"
|
||||
/>
|
||||
<div class="i_upload" v-else>
|
||||
<div class="addimg">
|
||||
<div class="heng"></div>
|
||||
<div class="shu"></div>
|
||||
</div>
|
||||
</div>
|
||||
</a-upload>
|
||||
<div class="i_bottom">
|
||||
<div class="tip">支持图片格式为jpg/jpeg/png 图片最大为2MB</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main_item" style="margin-top: -10px">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px">直播链接:</span>
|
||||
@@ -174,7 +179,7 @@
|
||||
<a-switch v-model:checked="switchC1" @click="PlayBack" />
|
||||
</div>
|
||||
</div>
|
||||
<div :style="{ display: playback ? 'block' : 'none' }">
|
||||
<div v-if ="switchC1">
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px">回放链接:</span>
|
||||
@@ -189,33 +194,34 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main_item">
|
||||
<div class="main_item2">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px">评价:</span>
|
||||
<span style="margin-right: 3px">评估:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-checkbox v-model:checked="checkedC1" @change="checkRadio"
|
||||
>需要评估</a-checkbox
|
||||
>
|
||||
<div class="btnbox2">
|
||||
<a-checkbox v-model:checked="needEval" @click="needEval=!needEval"
|
||||
>需要评估</a-checkbox >
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="main_item"
|
||||
style="margin-top: -25px"
|
||||
:style="{ display: checkedC1 ? 'block' : 'none' }"
|
||||
>
|
||||
<div class="signbox"></div>
|
||||
<div v-if="needEval" class="main_item">
|
||||
<div class="signbox">
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-select
|
||||
v-model:value="assessmentvalue"
|
||||
show-search
|
||||
placeholder="选择评估"
|
||||
style="width: 364px"
|
||||
:options="assessment"
|
||||
@change="handleChangeAssessment"
|
||||
></a-select>
|
||||
<button class="xkbtn" @click="showAssessment">选择评估</button>
|
||||
<div v-if = "assessmentId >0 ">
|
||||
<a-tag closable color="processing" @close="logA">
|
||||
<span style="font-size:14px;line-height: 33px;" >删除评估</span>
|
||||
</a-tag></div>
|
||||
<AssessmentList
|
||||
v-model:assessmentVisible="assessmentVisible"
|
||||
v-model:titleTag="titleTag"
|
||||
v-model:assessmentId="assessmentId"
|
||||
/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="main_item2">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px">考勤设置:</span>
|
||||
@@ -327,6 +333,9 @@ import { RouterEditTask } from "@/api/indexTask";
|
||||
import { addTempTask } from "../../api/indexTaskadd";
|
||||
import { getMemberInfo } from "@/api/index1";
|
||||
import dayjs from "dayjs";
|
||||
import { fileUp } from "../../api/indexEval";
|
||||
import AssessmentList from "../drawers/ AssessmentList.vue";
|
||||
|
||||
import { debounce } from "lodash-es";
|
||||
// import { useRouter } from "vue-router";
|
||||
function getBase64(img, callback) {
|
||||
@@ -337,6 +346,9 @@ function getBase64(img, callback) {
|
||||
|
||||
export default {
|
||||
name: "AddLive",
|
||||
components:{
|
||||
AssessmentList
|
||||
},
|
||||
props: {
|
||||
addliveVisible: {
|
||||
type: Boolean,
|
||||
@@ -419,6 +431,9 @@ export default {
|
||||
obj: {}, //要传的obj数据
|
||||
assessment: [], //评估信息
|
||||
assessmentvalue: null,
|
||||
needEval:false,
|
||||
otherSettings:false,
|
||||
assessmentVisible:false,
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:addliveVisible", false);
|
||||
@@ -437,12 +452,14 @@ export default {
|
||||
state.textV1 = "";
|
||||
state.switchC1 = "";
|
||||
state.imageUrl = "";
|
||||
state.needEval=false;
|
||||
state.otherSettings;
|
||||
ctx.emit("changeData", false);
|
||||
localStorage.setItem("stageId", props.chooseStageId);
|
||||
localStorage.setItem("chapterId", props.isactive);
|
||||
};
|
||||
const afterVisibleChange = () => {
|
||||
if (props.edit) {
|
||||
const afterVisibleChange = (bool) => {
|
||||
if (props.edit&&bool) {
|
||||
queryLive();
|
||||
}
|
||||
api
|
||||
@@ -492,6 +509,7 @@ export default {
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
const cloradio1 = (value) => {
|
||||
if (state.radioV1 === value.target._value) {
|
||||
state.radioV1 = "";
|
||||
@@ -519,24 +537,7 @@ export default {
|
||||
message.error("upload error");
|
||||
}
|
||||
};
|
||||
const beforeUpload = (file) => {
|
||||
const isJpgOrPng =
|
||||
file.type === "image/jpeg" ||
|
||||
file.type === "image/png" ||
|
||||
file.type === "image/jpg";
|
||||
|
||||
if (!isJpgOrPng) {
|
||||
message.error("You can only upload JPG file!");
|
||||
}
|
||||
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
|
||||
if (!isLt2M) {
|
||||
message.error("Image must smaller than 2MB!");
|
||||
}
|
||||
|
||||
return isJpgOrPng && isLt2M;
|
||||
};
|
||||
const updateTask = (res) => {
|
||||
if (props.isLevel == 1) {
|
||||
RouterEditTask({
|
||||
@@ -593,6 +594,11 @@ export default {
|
||||
});
|
||||
}
|
||||
};
|
||||
const showAssessment = () => {
|
||||
|
||||
state.assessmentVisible = true;
|
||||
console.log("hshs======",state.assessmentVisible);
|
||||
};
|
||||
//创建直播
|
||||
const updateLiveBroadcast = () => {
|
||||
if (!state.inputV1) {
|
||||
@@ -638,9 +644,10 @@ export default {
|
||||
livePlayback: state.playback ? "true" : "false",
|
||||
livePlaybackLink: state.playback ? state.inputV5 : "",
|
||||
liveTeacherId: state.inputV3,
|
||||
otherSettings: 0, //1或0
|
||||
otherSettings: state.otherSettings, //1或0
|
||||
signOutTime: state.inputV8,
|
||||
standardSettings: state.radioV1, //1或2
|
||||
isEvaluate:state.eedEval ? "1":"0",
|
||||
};
|
||||
if (props.edit) {
|
||||
api
|
||||
@@ -662,6 +669,42 @@ export default {
|
||||
.catch(() => {});
|
||||
}
|
||||
};
|
||||
const beforeUpload = (file) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const isJpgOrPng =
|
||||
file.type === "image/jpg" ||
|
||||
file.type === "image/jpeg" ||
|
||||
file.type === "image/png" ||
|
||||
file.type === "image/svg" ||
|
||||
file.type === "image/bmp" ||
|
||||
file.type === "image/gif";
|
||||
if (!isJpgOrPng) {
|
||||
message.error("仅支持jpg、gif、png、jpeg、svg、bmp格式!");
|
||||
return reject(false);
|
||||
}
|
||||
|
||||
let reader = new FileReader();
|
||||
reader.readAsDataURL(file);
|
||||
reader.onload = () => {
|
||||
const image = new Image();
|
||||
image.src = reader.result;
|
||||
image.onload = () => {
|
||||
const formData = new FormData();
|
||||
formData.append("file", file);
|
||||
console.log(file);
|
||||
fileUp(formData).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
state.imageUrl = res.data.data;
|
||||
}
|
||||
});
|
||||
return resolve(true);
|
||||
};
|
||||
};
|
||||
|
||||
return reject(false);
|
||||
});
|
||||
};
|
||||
|
||||
const templateScroll = (e) => {
|
||||
console.log("滚动", e);
|
||||
const { target } = e;
|
||||
@@ -728,9 +771,7 @@ export default {
|
||||
state.discussSettings = "false";
|
||||
}
|
||||
};
|
||||
const handleChangeAssessment = (option) => {
|
||||
state.assessmentId = option.assessmentId;
|
||||
};
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
afterVisibleChange,
|
||||
@@ -743,10 +784,10 @@ export default {
|
||||
handleChange2,
|
||||
options,
|
||||
checkRadio,
|
||||
handleChangeAssessment,
|
||||
queryMember,
|
||||
templateScroll,
|
||||
handleSearch,
|
||||
showAssessment,
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -874,6 +915,63 @@ 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;
|
||||
margin-right: 5px;
|
||||
margin-top: -15px;
|
||||
}
|
||||
}
|
||||
.item_inp {
|
||||
flex: 1;
|
||||
.i_upload_img {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.i_upload {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border: 1px solid #4ea6ff;
|
||||
border-radius: 8px;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
.addimg {
|
||||
position: relative;
|
||||
.heng {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
left: 25px;
|
||||
width: 50px;
|
||||
border: 1px solid #4ea6ff;
|
||||
}
|
||||
.shu {
|
||||
position: absolute;
|
||||
top: 25px;
|
||||
left: 50px;
|
||||
height: 50px;
|
||||
border: 1px solid #4ea6ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
.main_btns {
|
||||
|
||||
Reference in New Issue
Block a user