模板库添加各任务 待审核课程数据及各样式 面授课修改输入

This commit is contained in:
宋文超
2022-11-25 18:21:40 +08:00
parent c1f4c833cb
commit 36da16fc0d
17 changed files with 466 additions and 235 deletions

View File

@@ -124,14 +124,17 @@
<div class="signbox">
<span style="margin-right: 3px">直播封面</span>
</div>
<div class="textarea" style="overflow: hidden">
<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="/api/file/upload"
action="/manageApi/file/upload"
:before-upload="beforeUpload"
@change="handleChange"
>
@@ -320,6 +323,7 @@ import * as api from "../../api/indexLiveBroadcast";
import * as apiTask from "../../api/indexTaskadd";
import { toDate } from "@/api/method";
import { RouterEditTask } from "@/api/indexTask";
import { addTempTask } from "../../api/indexTaskadd";
import dayjs from "dayjs";
// import { useRouter } from "vue-router";
function getBase64(img, callback) {
@@ -328,7 +332,6 @@ function getBase64(img, callback) {
reader.readAsDataURL(img);
}
export default {
name: "AddLive",
props: {
@@ -471,6 +474,7 @@ export default {
state.radioV1 = res.data.data.standardSettings;
//state.= res.data.data
state.assessmentId = res.data.data.assessmentId;
state.imageUrl = res.data.data.liveCover;
})
.catch(() => {
message.error(`查询失败`);
@@ -486,6 +490,7 @@ export default {
const handleChange = (info) => {
if (info.file.status === "uploading") {
state.loading = true;
console.log("info", info);
return;
}
@@ -494,6 +499,7 @@ export default {
getBase64(info.file.originFileObj, (base64Url) => {
state.imageUrl = base64Url;
state.loading = false;
console.log("imgURL", state.imageUrl);
});
}
@@ -558,6 +564,22 @@ export default {
});
} else if (props.isLevel == 3) {
console.log("");
addTempTask({
courseId: res.data.data.liveId,
duration: res.data.data.duration,
name: res.data.data.liveName,
projectId: props.projectId,
projectTaskId: props.projectTaskId || 0,
stageId: props.chooseStageId,
type: 6,
})
.then(() => {
message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
ctx.emit("changeData", false);
})
.catch(() => {
message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
});
}
};
//创建直播
@@ -593,7 +615,7 @@ export default {
afterSignIn: state.inputV6,
beforeSignIn: state.inputV7,
assessmentId: state.assessmentId == null ? 0 : state.assessmentId,
// liveCover: state.fileList,//直播封面
liveCover: state.imageUrl, //直播封面
liveDuration: state.inputV2,
liveEndTime: endTime,
liveStartTime: startTime,
@@ -617,8 +639,7 @@ export default {
updateTask(res);
closeDrawer();
})
.catch(() => {
});
.catch(() => {});
} else {
api
.createLiveBroadcast(state.obj)
@@ -627,8 +648,7 @@ export default {
updateTask(res);
closeDrawer();
})
.catch(() => {
});
.catch(() => {});
}
};