mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 03:46:45 +08:00
-- bug 直播回显
This commit is contained in:
@@ -1,20 +1,20 @@
|
|||||||
<!-- 直播抽屉 -->
|
<!-- 直播抽屉 -->
|
||||||
<template>
|
<template>
|
||||||
<a-drawer
|
<a-drawer
|
||||||
:visible="addliveVisible"
|
:visible="addliveVisible"
|
||||||
class="drawerStyle addliveDrawer"
|
class="drawerStyle addliveDrawer"
|
||||||
width="80%"
|
width="80%"
|
||||||
title="添加直播"
|
title="添加直播"
|
||||||
placement="right"
|
placement="right"
|
||||||
@after-visible-change="afterVisibleChange"
|
@after-visible-change="afterVisibleChange"
|
||||||
>
|
>
|
||||||
<div class="drawerMain">
|
<div class="drawerMain">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="headerTitle">{{ edit ? "编辑" : "添加" }}直播</div>
|
<div class="headerTitle">{{ edit ? "编辑" : "添加" }}直播</div>
|
||||||
<img
|
<img
|
||||||
style="width: 29px; height: 29px; cursor: pointer"
|
style="width: 29px; height: 29px; cursor: pointer"
|
||||||
src="../../assets/images/basicinfo/close.png"
|
src="../../assets/images/basicinfo/close.png"
|
||||||
@click="closeDrawer"
|
@click="closeDrawer"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="contentMain">
|
<div class="contentMain">
|
||||||
@@ -23,18 +23,18 @@
|
|||||||
<div class="signbox">
|
<div class="signbox">
|
||||||
<div class="sign">
|
<div class="sign">
|
||||||
<img
|
<img
|
||||||
src="@/assets/images/coursewareManage/asterisk.png"
|
src="@/assets/images/coursewareManage/asterisk.png"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span style="margin-right: 3px">直播名称:</span>
|
<span style="margin-right: 3px">直播名称:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-input
|
<a-input
|
||||||
v-model:value="inputV1"
|
v-model:value="inputV1"
|
||||||
style="width: 400px; height: 32px"
|
style="width: 400px; height: 32px"
|
||||||
placeholder="请输入考试名称"
|
placeholder="请输入考试名称"
|
||||||
maxlength="20"
|
maxlength="20"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -44,10 +44,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="textarea">
|
<div class="textarea">
|
||||||
<a-textarea
|
<a-textarea
|
||||||
v-model:value="textV1"
|
v-model:value="textV1"
|
||||||
placeholder="请输入考试说明"
|
placeholder="请输入考试说明"
|
||||||
allow-clear
|
allow-clear
|
||||||
maxlength="364px"
|
maxlength="364px"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -55,17 +55,17 @@
|
|||||||
<div class="signbox">
|
<div class="signbox">
|
||||||
<div class="sign">
|
<div class="sign">
|
||||||
<img
|
<img
|
||||||
src="@/assets/images/coursewareManage/asterisk.png"
|
src="@/assets/images/coursewareManage/asterisk.png"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span style="margin-right: 3px">直播时间:</span>
|
<span style="margin-right: 3px">直播时间:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-range-picker
|
<a-range-picker
|
||||||
style="width: 424px"
|
style="width: 424px"
|
||||||
v-model:value="time"
|
v-model:value="time"
|
||||||
:placeholder="[' 开始时间', ' 结束时间']"
|
:placeholder="[' 开始时间', ' 结束时间']"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -73,24 +73,24 @@
|
|||||||
<div class="signbox">
|
<div class="signbox">
|
||||||
<div class="sign">
|
<div class="sign">
|
||||||
<img
|
<img
|
||||||
src="@/assets/images/coursewareManage/asterisk.png"
|
src="@/assets/images/coursewareManage/asterisk.png"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span style="margin-right: 3px">直播时长:</span>
|
<span style="margin-right: 3px">直播时长:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-input-number
|
<a-input-number
|
||||||
:min="0"
|
:min="0"
|
||||||
:max="300"
|
:max="300"
|
||||||
:precision="0"
|
:precision="0"
|
||||||
style="
|
style="
|
||||||
width: 364px;
|
width: 364px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
"
|
"
|
||||||
v-model:value="inputV2"
|
v-model:value="inputV2"
|
||||||
></a-input-number>
|
></a-input-number>
|
||||||
<span style="margin-left: 5px">分钟</span>
|
<span style="margin-left: 5px">分钟</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -99,50 +99,40 @@
|
|||||||
<div class="signbox">
|
<div class="signbox">
|
||||||
<div class="sign">
|
<div class="sign">
|
||||||
<img
|
<img
|
||||||
src="@/assets/images/coursewareManage/asterisk.png"
|
src="@/assets/images/coursewareManage/asterisk.png"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span style="margin-right: 3px">授课老师:</span>
|
<span style="margin-right: 3px">授课老师:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-auto-complete
|
<ProjectManager v-model:value="memberValue.value"
|
||||||
:value="memberValue.label"
|
v-model:name="memberValue.label"></ProjectManager>
|
||||||
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>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mbl_items2">
|
<div class="mbl_items2">
|
||||||
<div class="item_nam">
|
<div class="item_nam">
|
||||||
<div class="asterisk_icon">
|
<div class="asterisk_icon">
|
||||||
<img
|
<img
|
||||||
src="@/assets/images/coursewareManage/asterisk.png"
|
src="@/assets/images/coursewareManage/asterisk.png"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span style="margin-right: 14px">直播封面</span>
|
<span style="margin-right: 14px">直播封面</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="item_inp">
|
<div class="item_inp">
|
||||||
<a-upload
|
<a-upload
|
||||||
name="avatar"
|
name="avatar"
|
||||||
list-type="picture-card"
|
list-type="picture-card"
|
||||||
class="avatar-uploader"
|
class="avatar-uploader"
|
||||||
:show-upload-list="false"
|
:show-upload-list="false"
|
||||||
:before-upload="beforeUpload"
|
:before-upload="beforeUpload"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
class="i_upload_img"
|
class="i_upload_img"
|
||||||
v-if="imageUrl"
|
v-if="imageUrl"
|
||||||
:src="imageUrl"
|
:src="imageUrl"
|
||||||
alt="avatar"
|
alt="avatar"
|
||||||
/>
|
/>
|
||||||
<div class="i_upload" v-else>
|
<div class="i_upload" v-else>
|
||||||
<div class="addimg">
|
<div class="addimg">
|
||||||
@@ -162,9 +152,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-input
|
<a-input
|
||||||
v-model:value="inputV4"
|
v-model:value="inputV4"
|
||||||
style="width: 424px; height: 32px"
|
style="width: 424px; height: 32px"
|
||||||
placeholder="请输入直播链接"
|
placeholder="请输入直播链接"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -173,7 +163,7 @@
|
|||||||
<span style="margin-right: 3px">回放设置:</span>
|
<span style="margin-right: 3px">回放设置:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-switch v-model:checked="switchC1" @click="PlayBack" />
|
<a-switch v-model:checked="switchC1"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="switchC1">
|
<div v-if="switchC1">
|
||||||
@@ -183,9 +173,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-input
|
<a-input
|
||||||
v-model:value="inputV5"
|
v-model:value="inputV5"
|
||||||
style="width: 424px; height: 32px"
|
style="width: 424px; height: 32px"
|
||||||
placeholder="请输入回放链接"
|
placeholder="请输入回放链接"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -196,9 +186,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="btnbox2">
|
<div class="btnbox2">
|
||||||
<a-checkbox
|
<a-checkbox
|
||||||
v-model:checked="needEval"
|
v-model:checked="needEval"
|
||||||
@click="needEval = !needEval"
|
@click="needEval = !needEval"
|
||||||
>需要评估</a-checkbox
|
>需要评估
|
||||||
|
</a-checkbox
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -209,14 +200,14 @@
|
|||||||
<div v-if="assessmentId > 0">
|
<div v-if="assessmentId > 0">
|
||||||
<a-tag closable color="processing" @close="logA">
|
<a-tag closable color="processing" @close="logA">
|
||||||
<span style="font-size: 14px; line-height: 33px"
|
<span style="font-size: 14px; line-height: 33px"
|
||||||
>删除评估</span
|
>删除评估</span
|
||||||
>
|
>
|
||||||
</a-tag>
|
</a-tag>
|
||||||
</div>
|
</div>
|
||||||
<AssessmentList
|
<AssessmentList
|
||||||
v-model:assessmentVisible="assessmentVisible"
|
v-model:assessmentVisible="assessmentVisible"
|
||||||
v-model:titleTag="titleTag"
|
v-model:titleTag="titleTag"
|
||||||
v-model:assessmentId="assessmentId"
|
v-model:assessmentId="assessmentId"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -226,38 +217,40 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="kqszbox">
|
<div class="kqszbox">
|
||||||
<div class="qdqtbox">
|
<div class="qdqtbox">
|
||||||
<div class="qdbtn"><div class="btntext">签到</div></div>
|
<div class="qdbtn">
|
||||||
|
<div class="btntext">签到</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="setbox">
|
<div class="setbox">
|
||||||
<div class="timerbox">
|
<div class="timerbox">
|
||||||
<span>开始前:</span>
|
<span>开始前:</span>
|
||||||
<a-input-number
|
<a-input-number
|
||||||
:min="0"
|
:min="0"
|
||||||
:max="30"
|
:max="30"
|
||||||
:precision="0"
|
:precision="0"
|
||||||
style="
|
style="
|
||||||
width: 88px;
|
width: 88px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
"
|
"
|
||||||
v-model:value="inputV6"
|
v-model:value="inputV6"
|
||||||
></a-input-number>
|
></a-input-number>
|
||||||
<span style="color: #999999; margin-left: 8px">分钟</span>
|
<span style="color: #999999; margin-left: 8px">分钟</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="timerbox">
|
<div class="timerbox">
|
||||||
<span>开始后:</span>
|
<span>开始后:</span>
|
||||||
<a-input-number
|
<a-input-number
|
||||||
:min="0"
|
:min="0"
|
||||||
:max="30"
|
:max="30"
|
||||||
:precision="0"
|
:precision="0"
|
||||||
style="
|
style="
|
||||||
width: 88px;
|
width: 88px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
"
|
"
|
||||||
v-model:value="inputV7"
|
v-model:value="inputV7"
|
||||||
></a-input-number>
|
></a-input-number>
|
||||||
<span style="color: #999999; margin-left: 8px">分钟</span>
|
<span style="color: #999999; margin-left: 8px">分钟</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -306,9 +299,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-checkbox
|
<a-checkbox
|
||||||
v-model:checked="switchC2"
|
v-model:checked="switchC2"
|
||||||
@onclick="switchC2 = !switchC2"
|
@onclick="switchC2 = !switchC2"
|
||||||
>学员请假后记为任务完成</a-checkbox
|
>学员请假后记为任务完成
|
||||||
|
</a-checkbox
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -322,28 +316,32 @@
|
|||||||
</a-drawer>
|
</a-drawer>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { reactive, toRefs, ref } from "vue";
|
import {reactive, toRefs, ref} from "vue";
|
||||||
import { message } from "ant-design-vue";
|
import {message} from "ant-design-vue";
|
||||||
import * as api from "../../api/indexLiveBroadcast";
|
import * as api from "../../api/indexLiveBroadcast";
|
||||||
import * as apiTask from "../../api/indexTaskadd";
|
import * as apiTask from "../../api/indexTaskadd";
|
||||||
import { toDate } from "@/api/method";
|
import {toDate} from "@/api/method";
|
||||||
import { RouterEditTask } from "@/api/indexTask";
|
import {RouterEditTask} from "@/api/indexTask";
|
||||||
import { addTempTask } from "../../api/indexTaskadd";
|
import {addTempTask} from "../../api/indexTaskadd";
|
||||||
import { getMemberInfo } from "@/api/index1";
|
import {getMemberInfo} from "@/api/index1";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import { fileUp } from "../../api/indexEval";
|
import {fileUp} from "../../api/indexEval";
|
||||||
import AssessmentList from "../drawers/ AssessmentList.vue";
|
import AssessmentList from "../drawers/ AssessmentList.vue";
|
||||||
import { debounce } from "lodash-es";
|
import {debounce} from "lodash-es";
|
||||||
|
import ProjectManager from "@/components/project/ProjectManager";
|
||||||
|
|
||||||
// import { useRouter } from "vue-router";
|
// import { useRouter } from "vue-router";
|
||||||
function getBase64(img, callback) {
|
function getBase64(img, callback) {
|
||||||
const reader = new FileReader();
|
const reader = new FileReader();
|
||||||
reader.addEventListener("load", () => callback(reader.result));
|
reader.addEventListener("load", () => callback(reader.result));
|
||||||
reader.readAsDataURL(img);
|
reader.readAsDataURL(img);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "AddLive",
|
name: "AddLive",
|
||||||
components: {
|
components: {
|
||||||
AssessmentList,
|
AssessmentList,
|
||||||
|
ProjectManager,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
addliveVisible: {
|
addliveVisible: {
|
||||||
@@ -460,51 +458,54 @@ export default {
|
|||||||
queryLive();
|
queryLive();
|
||||||
}
|
}
|
||||||
api
|
api
|
||||||
.queryAssessmentDetailList({
|
.queryAssessmentDetailList({
|
||||||
assessmentName: "",
|
assessmentName: "",
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 200,
|
pageSize: 200,
|
||||||
releaseStatus: "",
|
releaseStatus: "",
|
||||||
searchEndTime: "",
|
searchEndTime: "",
|
||||||
searchStartTime: "",
|
searchStartTime: "",
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
res.data.data.rows.forEach((item) => {
|
res.data.data.rows.forEach((item) => {
|
||||||
let obj = item;
|
let obj = item;
|
||||||
obj.value = item.assessmentId;
|
obj.value = item.assessmentId;
|
||||||
obj.label = item.assessmentName;
|
obj.label = item.assessmentName;
|
||||||
state.assessment.push(obj);
|
state.assessment.push(obj);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
};
|
};
|
||||||
const queryLive = () => {
|
const queryLive = () => {
|
||||||
let d = props.EditLiveId;
|
let d = props.EditLiveId;
|
||||||
api
|
api
|
||||||
.getLiveBroadcastInfor({ liveId: d })
|
.getLiveBroadcastInfor({liveId: d})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
state.inputV1 = res.data.data.liveName;
|
state.inputV1 = res.data.data.liveName;
|
||||||
state.time = [
|
state.time = [
|
||||||
dayjs(res.data.data.liveStartTime, "YYYY-MM-DD"),
|
dayjs(res.data.data.liveStartTime, "YYYY-MM-DD"),
|
||||||
dayjs(res.data.data.liveEndTime, "YYYY-MM-DD"),
|
dayjs(res.data.data.liveEndTime, "YYYY-MM-DD"),
|
||||||
];
|
];
|
||||||
state.inputV2 = res.data.data.liveDuration;
|
state.inputV2 = res.data.data.liveDuration;
|
||||||
state.inputV3 = res.data.data.liveTeacherId;
|
state.inputV3 = res.data.data.liveTeacherId;
|
||||||
//state.fileList= res.data.data
|
//state.fileList= res.data.data
|
||||||
state.inputV4 = res.data.data.liveLink;
|
state.inputV4 = res.data.data.liveLink;
|
||||||
state.inputV5 = res.data.data.livePlaybackLink;
|
state.inputV5 = res.data.data.livePlaybackLink;
|
||||||
state.inputV6 = res.data.data.beforeSignIn;
|
state.inputV6 = res.data.data.beforeSignIn;
|
||||||
state.inputV7 = res.data.data.afterSignIn;
|
state.inputV7 = res.data.data.afterSignIn;
|
||||||
state.inputV8 = res.data.data.signOutTime;
|
state.inputV8 = res.data.data.signOutTime;
|
||||||
state.textV1 = res.data.data.liveExplain;
|
state.textV1 = res.data.data.liveExplain;
|
||||||
state.radioV1 = Number(res.data.data.standardSettings);
|
state.radioV1 = Number(res.data.data.standardSettings);
|
||||||
//state.= res.data.data
|
//state.= res.data.data
|
||||||
state.assessmentId = res.data.data.assessmentId;
|
state.assessmentId = res.data.data.assessmentId;
|
||||||
state.imageUrl = res.data.data.liveCover;
|
state.imageUrl = res.data.data.liveCover;
|
||||||
state.switchC2 = res.data.data.otherSettings == 1 ? true : false;
|
state.switchC1 = res.data.data.livePlayback === '1' ? true : false;
|
||||||
})
|
state.switchC2 = res.data.data.otherSettings == 1 ? true : false;
|
||||||
.catch(() => {
|
state.needEval = res.data.data.isEvaluate == '1' ? true : false;
|
||||||
//message.error(`查询失败`);
|
state.memberValue = {value: res.data.data.liveTeacherId || '', label: res.data.data.liveTeacherName || ''};
|
||||||
});
|
})
|
||||||
|
.catch(() => {
|
||||||
|
//message.error(`查询失败`);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
const cloradio1 = (value) => {
|
const cloradio1 = (value) => {
|
||||||
if (state.radioV1 === value.target._value) {
|
if (state.radioV1 === value.target._value) {
|
||||||
@@ -542,31 +543,31 @@ export default {
|
|||||||
routerTaskId: props.routerTaskId || 0,
|
routerTaskId: props.routerTaskId || 0,
|
||||||
type: 6,
|
type: 6,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
//message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
|
//message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
|
||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
//message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
|
//message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
|
||||||
});
|
});
|
||||||
} else if (props.isLevel == 2) {
|
} else if (props.isLevel == 2) {
|
||||||
apiTask
|
apiTask
|
||||||
.addTask({
|
.addTask({
|
||||||
courseId: res.data.data.liveId,
|
courseId: res.data.data.liveId,
|
||||||
duration: res.data.data.liveDuration,
|
duration: res.data.data.liveDuration,
|
||||||
name: res.data.data.liveName,
|
name: res.data.data.liveName,
|
||||||
projectId: props.projectId,
|
projectId: props.projectId,
|
||||||
projectTaskId: props.projectTaskId || 0,
|
projectTaskId: props.projectTaskId || 0,
|
||||||
stageId: props.chooseStageId || 0,
|
stageId: props.chooseStageId || 0,
|
||||||
type: 6,
|
type: 6,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
//message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
|
//message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
|
||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
//message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
|
//message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
|
||||||
});
|
});
|
||||||
} else if (props.isLevel == 3) {
|
} else if (props.isLevel == 3) {
|
||||||
console.log("props.projectTemplateId", props.projectTemplateId);
|
console.log("props.projectTemplateId", props.projectTemplateId);
|
||||||
addTempTask({
|
addTempTask({
|
||||||
@@ -578,13 +579,13 @@ export default {
|
|||||||
stageId: props.chooseStageId || 0,
|
stageId: props.chooseStageId || 0,
|
||||||
type: 6,
|
type: 6,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
//message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
|
//message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
|
||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
//message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
|
//message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const showAssessment = () => {
|
const showAssessment = () => {
|
||||||
@@ -611,12 +612,12 @@ export default {
|
|||||||
return message.warning("直播时长需大于0");
|
return message.warning("直播时长需大于0");
|
||||||
}
|
}
|
||||||
let startTime = toDate(
|
let startTime = toDate(
|
||||||
new Date(state.time[0].$d).getTime() / 1000,
|
new Date(state.time[0].$d).getTime() / 1000,
|
||||||
"Y-M-D"
|
"Y-M-D"
|
||||||
);
|
);
|
||||||
let endTime = toDate(
|
let endTime = toDate(
|
||||||
new Date(state.time[1].$d).getTime() / 1000,
|
new Date(state.time[1].$d).getTime() / 1000,
|
||||||
"Y-M-D"
|
"Y-M-D"
|
||||||
);
|
);
|
||||||
state.obj = {
|
state.obj = {
|
||||||
afterSignIn: state.inputV6,
|
afterSignIn: state.inputV6,
|
||||||
@@ -633,7 +634,8 @@ export default {
|
|||||||
liveName: state.inputV1,
|
liveName: state.inputV1,
|
||||||
livePlayback: state.switchC1 ? "1" : "0",
|
livePlayback: state.switchC1 ? "1" : "0",
|
||||||
livePlaybackLink: state.switchC1 ? state.inputV5 : "",
|
livePlaybackLink: state.switchC1 ? state.inputV5 : "",
|
||||||
liveTeacherId: state.inputV3,
|
liveTeacherId: state.memberValue.value,
|
||||||
|
liveTeacherName: state.memberValue.label,
|
||||||
otherSettings: state.switchC2 ? "1" : "0", //1或0
|
otherSettings: state.switchC2 ? "1" : "0", //1或0
|
||||||
signOutTime: state.inputV8,
|
signOutTime: state.inputV8,
|
||||||
standardSettings: state.radioV1, //1或2
|
standardSettings: state.radioV1, //1或2
|
||||||
@@ -641,35 +643,37 @@ export default {
|
|||||||
};
|
};
|
||||||
if (props.edit) {
|
if (props.edit) {
|
||||||
api
|
api
|
||||||
.updateLiveBroadcastMessage(state.obj)
|
.updateLiveBroadcastMessage(state.obj)
|
||||||
.then(async(res) => {
|
.then(async (res) => {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.success("提交成功");
|
message.success("提交成功");
|
||||||
await updateTask(res);
|
await updateTask(res);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
api
|
api
|
||||||
.createLiveBroadcast(state.obj)
|
.createLiveBroadcast(state.obj)
|
||||||
.then(async(res) => {
|
.then(async (res) => {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.success("提交成功");
|
message.success("提交成功");
|
||||||
await updateTask(res);
|
await updateTask(res);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const beforeUpload = (file) => {
|
const beforeUpload = (file) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const isJpgOrPng =
|
const isJpgOrPng =
|
||||||
file.type === "image/jpg" ||
|
file.type === "image/jpg" ||
|
||||||
file.type === "image/jpeg" ||
|
file.type === "image/jpeg" ||
|
||||||
file.type === "image/png" ||
|
file.type === "image/png" ||
|
||||||
file.type === "image/svg" ||
|
file.type === "image/svg" ||
|
||||||
file.type === "image/bmp" ||
|
file.type === "image/bmp" ||
|
||||||
file.type === "image/gif";
|
file.type === "image/gif";
|
||||||
if (!isJpgOrPng) {
|
if (!isJpgOrPng) {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.error("仅支持jpg、gif、png、jpeg、svg、bmp格式!");
|
message.error("仅支持jpg、gif、png、jpeg、svg、bmp格式!");
|
||||||
@@ -697,7 +701,7 @@ export default {
|
|||||||
};
|
};
|
||||||
const templateScroll = (e) => {
|
const templateScroll = (e) => {
|
||||||
console.log("滚动", e);
|
console.log("滚动", e);
|
||||||
const { target } = e;
|
const {target} = e;
|
||||||
const scrllHeight = target.scrollHeight - target.scrollTop;
|
const scrllHeight = target.scrollHeight - target.scrollTop;
|
||||||
const clientHeight = target.clientHeight;
|
const clientHeight = target.clientHeight;
|
||||||
// console.log("scrllHeight", scrllHeight, clientHeight);
|
// console.log("scrllHeight", scrllHeight, clientHeight);
|
||||||
@@ -723,20 +727,20 @@ export default {
|
|||||||
pageSize: state.pageSize,
|
pageSize: state.pageSize,
|
||||||
};
|
};
|
||||||
getMemberInfo(obj)
|
getMemberInfo(obj)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
let data = res.data.data.rows;
|
let data = res.data.data.rows;
|
||||||
state.totalPages = res.data.data.total;
|
state.totalPages = res.data.data.total;
|
||||||
for (let i in data) {
|
for (let i in data) {
|
||||||
options.value.push({
|
options.value.push({
|
||||||
value: data[i].id,
|
value: data[i].id,
|
||||||
label: data[i].realName,
|
label: data[i].realName,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.error("获取员工失败" + err);
|
message.error("获取员工失败" + err);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const handleSearch = debounce((memberValue) => {
|
const handleSearch = debounce((memberValue) => {
|
||||||
console.log("fetching user", memberValue);
|
console.log("fetching user", memberValue);
|
||||||
@@ -786,6 +790,7 @@ export default {
|
|||||||
.ant-table-striped :deep(.table-striped) td {
|
.ant-table-striped :deep(.table-striped) td {
|
||||||
background-color: #fafafa !important;
|
background-color: #fafafa !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.addliveDrawer {
|
.addliveDrawer {
|
||||||
.drawerMain {
|
.drawerMain {
|
||||||
.header {
|
.header {
|
||||||
@@ -795,6 +800,7 @@ export default {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
|
||||||
.headerTitle {
|
.headerTitle {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
@@ -803,32 +809,39 @@ export default {
|
|||||||
margin-left: 24px;
|
margin-left: 24px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.contentMain {
|
.contentMain {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
.main_left {
|
.main_left {
|
||||||
padding-right: 30px;
|
padding-right: 30px;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
border-right: 1px solid #e8e8e8;
|
border-right: 1px solid #e8e8e8;
|
||||||
margin-top: 32px;
|
margin-top: 32px;
|
||||||
|
|
||||||
.main_item {
|
.main_item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: 32px;
|
margin-top: 32px;
|
||||||
margin-bottom: 32px;
|
margin-bottom: 32px;
|
||||||
|
|
||||||
.signbox {
|
.signbox {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: end;
|
justify-content: end;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.sign {
|
.sign {
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.btnbox {
|
.btnbox {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.xkbtn {
|
.xkbtn {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
width: 130px;
|
width: 130px;
|
||||||
@@ -841,24 +854,29 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.main_item2 {
|
.main_item2 {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
margin-bottom: 32px;
|
margin-bottom: 32px;
|
||||||
|
|
||||||
.signbox {
|
.signbox {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: end;
|
justify-content: end;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.sign {
|
.sign {
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.kqszbox {
|
.kqszbox {
|
||||||
.qdqtbox {
|
.qdqtbox {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.qdbtn,
|
.qdbtn,
|
||||||
.qtbtn {
|
.qtbtn {
|
||||||
width: 75px;
|
width: 75px;
|
||||||
@@ -869,15 +887,18 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
.btntext {
|
.btntext {
|
||||||
color: #387df7;
|
color: #387df7;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.setbox {
|
.setbox {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
|
|
||||||
.timerbox {
|
.timerbox {
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
margin-right: 32px;
|
margin-right: 32px;
|
||||||
@@ -887,10 +908,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.btnbox2 {
|
.btnbox2 {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
|
|
||||||
.xkbtn {
|
.xkbtn {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
width: 130px;
|
width: 130px;
|
||||||
@@ -905,20 +928,24 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mbl_items2 {
|
.mbl_items2 {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: start;
|
align-items: start;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
|
||||||
.i_bottom {
|
.i_bottom {
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item_nam {
|
.item_nam {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
||||||
.asterisk_icon {
|
.asterisk_icon {
|
||||||
width: 10px;
|
width: 10px;
|
||||||
height: 10px;
|
height: 10px;
|
||||||
@@ -926,13 +953,16 @@ export default {
|
|||||||
margin-top: -15px;
|
margin-top: -15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.item_inp {
|
.item_inp {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
||||||
.i_upload_img {
|
.i_upload_img {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.i_upload {
|
.i_upload {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
@@ -941,8 +971,10 @@ export default {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
.addimg {
|
.addimg {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.heng {
|
.heng {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50px;
|
top: 50px;
|
||||||
@@ -950,6 +982,7 @@ export default {
|
|||||||
width: 50px;
|
width: 50px;
|
||||||
border: 1px solid #4ea6ff;
|
border: 1px solid #4ea6ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.shu {
|
.shu {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 25px;
|
top: 25px;
|
||||||
@@ -963,6 +996,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.main_btns {
|
.main_btns {
|
||||||
height: 72px;
|
height: 72px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -972,6 +1006,7 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
|
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
|
||||||
|
|
||||||
.btn1 {
|
.btn1 {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
@@ -981,6 +1016,7 @@ export default {
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn2 {
|
.btn2 {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
width: 100px;
|
width: 100px;
|
||||||
|
|||||||
Reference in New Issue
Block a user