mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-14 05:16:45 +08:00
fix:直播任务添加封面图
This commit is contained in:
@@ -129,36 +129,36 @@
|
|||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span style="margin-right: 14px">直播封面:</span>
|
<span style="margin-right: 2px">直播封面:</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">
|
||||||
<!-- <div class="heng"></div>-->
|
<div class="heng"></div>
|
||||||
<!-- <div class="shu"></div>-->
|
<div class="shu"></div>
|
||||||
<!-- </div>-->
|
</div>
|
||||||
<!-- </div>-->
|
</div>
|
||||||
<!-- </a-upload>-->
|
</a-upload>
|
||||||
<!-- <div class="i_bottom">-->
|
<div class="i_bottom">
|
||||||
<!-- <div class="tip">-->
|
<div class="tip">
|
||||||
<!-- <span style="color: #999999; margin-left: 8px"-->
|
<span style="color: #999999; margin-left: 8px"
|
||||||
<!-- >支持图片格式为jpg/jpeg/png 图片最大为2MB</span-->
|
>支持图片格式为jpg/jpeg/png 图片最大为2MB</span
|
||||||
<!-- >-->
|
>
|
||||||
<!-- </div>-->
|
</div>
|
||||||
<!-- </div>-->
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="main_item2">
|
<div class="main_item2">
|
||||||
@@ -319,6 +319,7 @@ import dayjs from "dayjs";
|
|||||||
import ProjectManager from "@/components/project/ProjectManagerNew";
|
import ProjectManager from "@/components/project/ProjectManagerNew";
|
||||||
import AddInvistRoot from "@/components/drawers/AddInvistRoot.vue";
|
import AddInvistRoot from "@/components/drawers/AddInvistRoot.vue";
|
||||||
import {Form, message} from "ant-design-vue";
|
import {Form, message} from "ant-design-vue";
|
||||||
|
import { fileUp } from "../../api/indexEval";
|
||||||
|
|
||||||
const removePG = () => {
|
const removePG = () => {
|
||||||
formData.value.assessmentId = ''
|
formData.value.assessmentId = ''
|
||||||
@@ -426,8 +427,10 @@ const range = (start, end) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function timeChange(time, timeStr) {
|
function timeChange(time, timeStr) {
|
||||||
|
formData.value.liveStartTime = timeStr[0]
|
||||||
formData.value.submitStartTime = timeStr[0]
|
formData.value.submitStartTime = timeStr[0]
|
||||||
formData.value.submitEndTime = timeStr[1]
|
formData.value.submitEndTime = timeStr[1]
|
||||||
|
formData.value.liveEndTime = timeStr[1]
|
||||||
}
|
}
|
||||||
|
|
||||||
const disabledDate = (current) => {
|
const disabledDate = (current) => {
|
||||||
@@ -465,6 +468,40 @@ function openDrawer(i, row) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({openDrawer})
|
defineExpose({openDrawer})
|
||||||
|
|
||||||
|
const imageUrl = ref('')
|
||||||
|
const beforeUpload = (file) => {
|
||||||
|
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 false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let isLt1M = file.size / 10240 / 10240 <= 1;
|
||||||
|
if (!isLt1M) {
|
||||||
|
this.$message.error("图片大小超过10MB!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const formDatas = new FormData();
|
||||||
|
formDatas.append("file", file);
|
||||||
|
fileUp(formDatas).then((res) => {
|
||||||
|
if (res.data.code === 200) {
|
||||||
|
console.log(res)
|
||||||
|
imageUrl.value = res.data
|
||||||
|
formData.value.liveCover = res.data
|
||||||
|
// state.hasImgName = file.name;
|
||||||
|
// emit("src", { id: curItem.value.id, src: res.data.data });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.ant-table-striped :deep(.table-striped) td {
|
.ant-table-striped :deep(.table-striped) td {
|
||||||
|
|||||||
@@ -320,16 +320,20 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "转审",
|
title: "转审",
|
||||||
dataIndex: "transfer",
|
dataIndex: "inviteAuditStatus",
|
||||||
key: "transfer",
|
key: "inviteAuditStatus",
|
||||||
align: "center",
|
align: "center",
|
||||||
width: "10%",
|
width: "10%",
|
||||||
customRender: (value) => {
|
customRender: (value) => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<a-tag
|
{
|
||||||
color="blue">已转审</a-tag>
|
value.record.inviteAuditStatus==1?
|
||||||
<a-tag
|
<a-tag
|
||||||
|
color="blue">已转审</a-tag>:
|
||||||
|
value.record.inviteAuditStatus==2?
|
||||||
|
<a-tag
|
||||||
|
v-if="value.record.inviteAuditStatus==2"
|
||||||
onClick={()=>{
|
onClick={()=>{
|
||||||
showTransferInvitationAudit(
|
showTransferInvitationAudit(
|
||||||
value.record.createrId,
|
value.record.createrId,
|
||||||
@@ -338,7 +342,8 @@ export default {
|
|||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
style="cursor:pointer;"
|
style="cursor:pointer;"
|
||||||
color="green">转审完成</a-tag>
|
color="green">转审完成</a-tag>:""
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@@ -382,18 +387,21 @@ export default {
|
|||||||
审核
|
审核
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span
|
{
|
||||||
style="cursor:pointer;color:#387DF7"
|
value.record.inviteAuditStatus==0?
|
||||||
onClick={() => {
|
<span
|
||||||
showInvitationAudit(
|
style="cursor:pointer;color:#387DF7"
|
||||||
value.record.createrId,
|
onClick={() => {
|
||||||
value.record.creater,
|
showInvitationAudit(
|
||||||
value.record.offId
|
value.record.createrId,
|
||||||
)
|
value.record.creater,
|
||||||
}}
|
value.record.offId
|
||||||
>
|
)
|
||||||
邀请审核
|
}}>
|
||||||
</span>
|
邀请审核
|
||||||
|
</span>
|
||||||
|
:''
|
||||||
|
}
|
||||||
|
|
||||||
<span
|
<span
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@@ -697,6 +705,7 @@ export default {
|
|||||||
time: item.processTime,
|
time: item.processTime,
|
||||||
createrId: item.createId,
|
createrId: item.createId,
|
||||||
offId: item.id,
|
offId: item.id,
|
||||||
|
inviteAuditStatus: item.inviteAuditStatus,
|
||||||
transfer: item.id // 转审
|
transfer: item.id // 转审
|
||||||
};
|
};
|
||||||
array.push(obj);
|
array.push(obj);
|
||||||
|
|||||||
Reference in New Issue
Block a user