feat:合并

This commit is contained in:
lixg
2023-02-02 18:46:42 +08:00
parent e83241362a
commit 933490d804
2 changed files with 1796 additions and 1460 deletions

View File

@@ -1,5 +1,14 @@
<template> <template>
<div style=" background: #0078fc;height: 150px;width: 100%;position: absolute;top: 0;z-index:-9999;"></div> <div
style="
background: #0078fc;
height: 150px;
width: 100%;
position: absolute;
top: 0;
z-index: -9999;
"
></div>
<div class="faceteach" style="padding: 30px"> <div class="faceteach" style="padding: 30px">
<!-- 面包屑导航 --> <!-- 面包屑导航 -->
<div class="crumb"> <div class="crumb">
@@ -7,11 +16,15 @@
<div style="margin-left: 6px; margin-right: 6px">/</div> <div style="margin-left: 6px; margin-right: 6px">/</div>
<div style="font-weight: 700">课程详情</div> <div style="font-weight: 700">课程详情</div>
<div v-if="pName != ''" class="return"> <div v-if="pName != ''" class="return">
<div style="display: flex" @click="returnclick"> <div style="display: flex" @click="returnclick">
<el-button style="color:#0073FB"> <img class="img2" style="margin-right:11px;cursor: pointer;" <el-button style="color: #0073fb">
src="../../assets/image/return.png" />返回</el-button> <img
class="img2"
style="margin-right: 11px; cursor: pointer"
src="../../assets/image/return.png"
/>返回</el-button
>
</div> </div>
</div> </div>
</div> </div>
@@ -22,31 +35,59 @@
<div style="margin-left: 46px"> <div style="margin-left: 46px">
<div class="title">面授课{{ data.planDto?.name }}</div> <div class="title">面授课{{ data.planDto?.name }}</div>
<div class="time" style="margin-top: 26px"> <div class="time" style="margin-top: 26px">
<img style="width: 15px; height: 17px" src="../../assets/image/time.png" /> <img
style="width: 15px; height: 17px"
src="../../assets/image/time.png"
/>
<div style="margin-left: 8px"> <div style="margin-left: 8px">
{{ dayjs(data.planDto?.beginTime).format('YYYY-MM-DD HH:mm') + " 至 " + {{
dayjs(data.planDto?.endTime).format('YYYY-MM-DD HH:mm') dayjs(data.planDto?.beginTime).format("YYYY-MM-DD HH:mm") +
}} " 至 " +
dayjs(data.planDto?.endTime).format("YYYY-MM-DD HH:mm")
}}
</div> </div>
</div> </div>
<div v-if="data.planDto?.address" class="time" style="margin-top: 23px"> <div v-if="data.planDto?.address" class="time" style="margin-top: 23px">
<img style="width: 16px; height: 18px" src="../../assets/image/position.png" /> <img
style="width: 16px; height: 18px"
src="../../assets/image/position.png"
/>
<div style="margin-left: 8px">{{ data.planDto?.address }}</div> <div style="margin-left: 8px">{{ data.planDto?.address }}</div>
</div> </div>
</div> </div>
<div > <div>
<div style="display: flex"> <div style="display: flex">
<botton
<botton class="btn" style="margin-right: 20px" :style="{ class="btn"
background: isAllowSign? data.signFlag ? '#999' : 'rgb(57, 146, 249)':'#999', style="margin-right: 20px"
}" @click="signClick">{{ data.signFlag ? "已签到" : "签到" }} :style="{
background: isAllowSign
? data.signFlag
? '#999'
: 'rgb(57, 146, 249)'
: '#999',
}"
@click="signClick"
>{{ data.signFlag ? "已签到" : "签到" }}
</botton> </botton>
<!-- <botton style="background: #999" class="btn" @click="toSurvery" v-if="data.planDto?.evalFlag == 0"> <!-- <botton style="background: #999" class="btn" @click="toSurvery" v-if="data.planDto?.evalFlag == 0">
评估 评估
</botton> --> </botton> -->
<botton v-if="data.planDto?.evalFlag !== 0" :style="{ <botton
background: `${new Date(data.planDto?.beginTime).getTime() > new Date().getTime() ? '#999' : data.isSurvery ? '#999' : 'rgb(57, 146, 249)'}`, v-if="data.planDto?.evalFlag !== 0"
}" class="btn" @click="toSurvery">{{ data.isSurvery ? "已评估" : "评估" }} :style="{
background: `${
new Date(data.planDto?.beginTime).getTime() >
new Date().getTime()
? '#999'
: data.isSurvery
? '#999'
: 'rgb(57, 146, 249)'
}`,
}"
class="btn"
@click="toSurvery"
>{{ data.isSurvery ? "已评估" : "评估" }}
</botton> </botton>
</div> </div>
</div> </div>
@@ -59,7 +100,10 @@
<div class="detailT"> <div class="detailT">
<div class="" style="margin-left: 48px; margin-right: 48px"> <div class="" style="margin-left: 48px; margin-right: 48px">
<div class="title"> <div class="title">
<img style="width: 20px; height: 20px" src="../../assets/image/course.png" /> <img
style="width: 20px; height: 20px"
src="../../assets/image/course.png"
/>
<div class="text">课程详情</div> <div class="text">课程详情</div>
<div class="box"></div> <div class="box"></div>
</div> </div>
@@ -70,29 +114,79 @@
</div> </div>
<div class="detailB"> <div class="detailB">
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model:activeName="activeName" @tab-click="handleClick">
<el-tab-pane label="课程附件" name="first"> <el-tab-pane label="课程附件" name="first">
<div v-if="data.planDto?.attach === ''" <div
style="font-size: 14px;font-weight: 400; line-height: 24px; cursor: pointer;margin-left: 40px; margin-top: 20px;"> v-if="data.planDto?.attach === ''"
style="
font-size: 14px;
font-weight: 400;
line-height: 24px;
cursor: pointer;
margin-left: 40px;
margin-top: 20px;
"
>
此课程无附件 此课程无附件
</div> </div>
<div v-else> <div v-else>
<div v-for="(el, index) in formateArr(data.planDto?.attach)" :key="index" class="enclosure" <div
:style="{ borderBottom: '1px solid rgba(56, 125, 247, 0.2)' }"> v-for="(el, index) in formateArr(data.planDto?.attach)"
:key="index"
class="enclosure"
:style="{ borderBottom: '1px solid rgba(56, 125, 247, 0.2)' }"
>
<div class="enclosureL"> <div class="enclosureL">
<FileTypeImg :v-model="el.name? el.name : el.slice(el.lastIndexOf('/')+1,el.indexOf('-')) + el.slice(el.lastIndexOf('.'))" :style="{width: '22px',height: '26px',marginLeft: '10px',}"></FileTypeImg> <FileTypeImg
<div style="margin-left: 20px">{{ el.name? el.name : el.slice(el.lastIndexOf('/')+1,el.indexOf('-')) + el.slice(el.lastIndexOf('.')) }}</div> :v-model="
el.name
? el.name
: el.slice(el.lastIndexOf('/') + 1, el.indexOf('-')) +
el.slice(el.lastIndexOf('.'))
"
:style="{
width: '22px',
height: '26px',
marginLeft: '10px',
}"
></FileTypeImg>
<div style="margin-left: 20px">
{{
el.name
? el.name
: el.slice(el.lastIndexOf("/") + 1, el.indexOf("-")) +
el.slice(el.lastIndexOf("."))
}}
</div>
</div> </div>
<div> <div>
<div v-if="new Date(data.planDto.beginTime).getTime() > new Date().getTime()" class="download"> <div
<img style="width: 16px; height: 15px" src="../../assets/image/download.png" /> v-if="
<div style="margin-left: 5px;color:#999;" @click="downloads(el)"> new Date(data.planDto.beginTime).getTime() >
new Date().getTime()
"
class="download"
>
<img
style="width: 16px; height: 15px"
src="../../assets/image/download.png"
/>
<div
style="margin-left: 5px; color: #999"
@click="downloads(el)"
>
下载 下载
</div> </div>
</div> </div>
<div v-else class="download"> <div v-else class="download">
<img style="width: 16px; height: 15px" src="../../assets/image/download.png" /> <img
<div style="margin-left: 5px" @click="download(el.name? el.response.data : el)"> style="width: 16px; height: 15px"
src="../../assets/image/download.png"
/>
<div
style="margin-left: 5px"
@click="download(el.name ? el.response.data : el)"
>
下载 下载
</div> </div>
</div> </div>
@@ -110,37 +204,78 @@
</div> </div>
</div> </div>
<div <div
:style="{ background: new Date(data.planDto?.beginTime).getTime() > new Date().getTime() ? '#999' : '' }" :style="{
class="submit" @click="toWork"> background:
new Date(data.planDto?.beginTime).getTime() >
new Date().getTime()
? '#999'
: '',
}"
class="submit"
@click="toWork"
>
交作业 交作业
</div> </div>
</div> </div>
<div v-else style=" font-size: 14px; font-weight: 400; line-height: 24px; cursor: pointer;margin-left: 40px;margin-top: 20px; "> <div
v-else
style="
font-size: 14px;
font-weight: 400;
line-height: 24px;
cursor: pointer;
margin-left: 40px;
margin-top: 20px;
"
>
此课程无作业 此课程无作业
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="课程考试" name="third" :disabed=dayjs().isBefore(dayjs(data.planDto?.beginTime))> <el-tab-pane
label="课程考试"
name="third"
:disabed="dayjs().isBefore(dayjs(data.planDto?.beginTime))"
>
<div class="work" v-if="data.examinationDto?.examinationTestName"> <div class="work" v-if="data.examinationDto?.examinationTestName">
<div> <div>
<div class="question"> <div class="question">
{{ data.examinationDto?.examinationName }} {{ data.examinationDto?.examinationName }}
</div> </div>
<div style="margin-top: 16px; display: flex"> <div style="margin-top: 16px; display: flex">
<div class="tag1" v-if="data.examinationDto?.examinationFlag"> <div
class="tag1"
v-if="data.examinationDto?.examinationFlag"
>
必修 必修
</div> </div>
<div class="tag3" style="margin-left: 11px">考试</div> <div class="tag3" style="margin-left: 11px">考试</div>
</div> </div>
</div> </div>
<div <div
:style="{ background: new Date(data.planDto?.beginTime).getTime() > new Date().getTime() ? '#999' : '' }" :style="{
class="submit" @click="toExamItem(data.examinationDto)"> background:
new Date(data.planDto?.beginTime).getTime() >
new Date().getTime()
? '#999'
: '',
}"
class="submit"
@click="toExamItem(data.examinationDto)"
>
去考试 去考试
</div> </div>
</div> </div>
<div v-else <div
style=" font-size: 14px; font-weight: 400;line-height: 24px;cursor: pointer; margin-left: 40px; margin-top: 20px; "> v-else
style="
font-size: 14px;
font-weight: 400;
line-height: 24px;
cursor: pointer;
margin-left: 40px;
margin-top: 20px;
"
>
此课程无考试 此课程无考试
</div> </div>
</el-tab-pane> </el-tab-pane>
@@ -149,7 +284,10 @@
</div> </div>
<div class="teacher"> <div class="teacher">
<div class="title"> <div class="title">
<img style="width: 21px; height: 23px" src="../../assets/image/livelecturer.png" /> <img
style="width: 21px; height: 23px"
src="../../assets/image/livelecturer.png"
/>
<div class="text">面授课讲师</div> <div class="text">面授课讲师</div>
<div class="box"></div> <div class="box"></div>
</div> </div>
@@ -192,10 +330,11 @@ const {
query: { courseId, type, id: taskId }, query: { courseId, type, id: taskId },
} = useRoute(); } = useRoute();
const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId,usePermission:true }); const { data } = useRequest(STU_OFFCOURSE_DETAIL, {
const teacherInfo = useUserInfo( courseId,
computed(() => data.value?.planDto?.teacherId) usePermission: true,
); });
const teacherInfo = useUserInfo(computed(() => data.value?.planDto?.teacherId));
const state = reactive({ const state = reactive({
activeName: "first", activeName: "first",
@@ -215,13 +354,13 @@ const downloads = (url) => {
function formateArr(strs) { function formateArr(strs) {
let newArr = []; let newArr = [];
try{ try {
newArr = JSON.parse(strs) newArr = JSON.parse(strs);
} catch { } catch {
newArr = strs?.split(',') newArr = strs?.split(",");
} }
console.log('112233', newArr) console.log("112233", newArr);
return newArr return newArr;
} }
let timer = null; let timer = null;
@@ -229,25 +368,35 @@ let timer = null;
function isSignClick() { function isSignClick() {
timer = setInterval(() => { timer = setInterval(() => {
let beginTime = new Date(data.value.planDto?.beginTime).getTime(); let beginTime = new Date(data.value.planDto?.beginTime).getTime();
let endTime = !data.value.planDto?.afterStart || data.value.afterStart == '0' let endTime =
!data.value.planDto?.afterStart || data.value.afterStart == "0"
? new Date(data.value.planDto?.endTime).getTime() ? new Date(data.value.planDto?.endTime).getTime()
: new Date(data.value.planDto?.beginTime).getTime(); : new Date(data.value.planDto?.beginTime).getTime();
let nowTime = new Date().getTime(); let nowTime = new Date().getTime();
if (data.value.planDto?.beforeStart && data.value.planDto?.afterStart && data.value.beforeStart !=='0' && data.value.afterStart!=='0') { if (
data.value.planDto?.beforeStart &&
data.value.planDto?.afterStart &&
data.value.beforeStart !== "0" &&
data.value.afterStart !== "0"
) {
//有开始前有开始后 //有开始前有开始后
beginTime = beginTime - data.value.planDto?.beforeStart * 60 * 1000; beginTime = beginTime - data.value.planDto?.beforeStart * 60 * 1000;
endTime = endTime + data.value.planDto?.afterStart * 60 * 1000; endTime = endTime + data.value.planDto?.afterStart * 60 * 1000;
console.log("1111"); console.log("1111");
} else if ( } else if (
data.value.planDto?.beforeStart && data.value.planDto?.beforeStart &&
!data.value.planDto?.afterStart && data.value.beforeStart !== '0' && data.value.afterStart == '0' !data.value.planDto?.afterStart &&
data.value.beforeStart !== "0" &&
data.value.afterStart == "0"
) { ) {
//只有开始前无开始后 //只有开始前无开始后
beginTime = beginTime - data.value.planDto?.beforeStart * 60 * 1000; beginTime = beginTime - data.value.planDto?.beforeStart * 60 * 1000;
console.log("11112222"); console.log("11112222");
} else if ( } else if (
!data.value.planDto?.beforeStart && !data.value.planDto?.beforeStart &&
data.value.planDto?.afterStart && data.value.beforeStart == '0' && data.value.afterStart !== '0' data.value.planDto?.afterStart &&
data.value.beforeStart == "0" &&
data.value.afterStart !== "0"
) { ) {
//无开始前有开始后 //无开始前有开始后
endTime = endTime + data.value.planDto?.afterStart * 60 * 1000; endTime = endTime + data.value.planDto?.afterStart * 60 * 1000;
@@ -306,7 +455,10 @@ function toSurvery() {
if (data.value.isSurvery) { if (data.value.isSurvery) {
// return; // return;
} }
if (data.value.planDto.beginTime && dayjs().isBefore(data.value.planDto.beginTime)) { if (
data.value.planDto.beginTime &&
dayjs().isBefore(data.value.planDto.beginTime)
) {
ElMessage.warning("课程未开始,请耐心等待!"); ElMessage.warning("课程未开始,请耐心等待!");
return; return;
} }
@@ -317,26 +469,23 @@ function toSurvery() {
router.push({ router.push({
path: "/surveydetail", path: "/surveydetail",
query: { query: {
id:taskId, id: taskId,
courseId: data.value.planDto.evaluateId, courseId: data.value.planDto.evaluateId,
pName: "面授课", pName: "面授课",
infoId: data.value.planDto.offcoursePlanId, infoId: data.value.planDto.offcoursePlanId,
chapterOrStageId: 0, chapterOrStageId: 0,
sName: data.value.planDto.name, sName: data.value.planDto.name,
type:3 type: 3,
}, },
}); });
} }
function toWork() { function toWork() {
if (data.value.planDto.beginTime) { if (data.value.planDto.beginTime) {
let date1 = new Date(data.value.planDto.beginTime).getTime() let date1 = new Date(data.value.planDto.beginTime).getTime();
let date2 = new Date().getTime() let date2 = new Date().getTime();
if (date1 > date2) { if (date1 > date2) {
ElMessage.warning("未到开始时间,请耐心等待!"); ElMessage.warning("未到开始时间,请耐心等待!");
} }
} }
router.push({ router.push({
@@ -355,15 +504,17 @@ function toWork() {
function toExamItem(obj) { function toExamItem(obj) {
if (data.value.planDto.beginTime) { if (data.value.planDto.beginTime) {
let date1 = new Date(data.value.planDto.beginTime).getTime() let date1 = new Date(data.value.planDto.beginTime).getTime();
let date2 = new Date().getTime() let date2 = new Date().getTime();
if (date1 > date2) { if (date1 > date2) {
ElMessage.warning("未到开始时间,请耐心等待!"); ElMessage.warning("未到开始时间,请耐心等待!");
} }
} }
console.log("obj", obj.examinationTestId); console.log("obj", obj.examinationTestId);
window.open(import.meta.env.VITE_BOE_EXAM_DETAIL_URL + obj.examinationTestId,'_top'); //测评 window.open(
import.meta.env.VITE_BOE_EXAM_DETAIL_URL + obj.examinationTestId,
"_top"
); //测评
// router.push({ path: import.meta.env.VITE_BOE_EXAM_DETAIL_URL+ obj.examinationTestId }); // router.push({ path: import.meta.env.VITE_BOE_EXAM_DETAIL_URL+ obj.examinationTestId });
} }
@@ -640,8 +791,6 @@ onUnmounted(() => {
align-items: center; align-items: center;
} }
} }
} }
.teacheritem { .teacheritem {
@@ -659,7 +808,6 @@ onUnmounted(() => {
align-items: center; align-items: center;
} }
} }
} }
.teacheritem .introduce { .teacheritem .introduce {
@@ -687,8 +835,6 @@ onUnmounted(() => {
cursor: pointer; cursor: pointer;
} }
} }
} }
} }
</style> </style>

View File

@@ -1,5 +1,14 @@
<template> <template>
<div style=" background: #0078fc;height: 150px;width: 100%;position: absolute;top: 0;z-index:-9999;"></div> <div
style="
background: #0078fc;
height: 150px;
width: 100%;
position: absolute;
top: 0;
z-index: -9999;
"
></div>
<div class="homework" style="padding: 30px"> <div class="homework" style="padding: 30px">
<!-- 面包屑导航 --> <!-- 面包屑导航 -->
<div class="crumb"> <div class="crumb">
@@ -17,8 +26,13 @@
</div>--> </div>-->
<div class="return"> <div class="return">
<div style="display: flex" @click="returnclick"> <div style="display: flex" @click="returnclick">
<el-button style="color:#0073FB"> <img class="img2" style="margin-right:11px;cursor: pointer;" <el-button style="color: #0073fb">
src="../../assets/image/return.png" />返回</el-button> <img
class="img2"
style="margin-right: 11px; cursor: pointer"
src="../../assets/image/return.png"
/>返回</el-button
>
</div> </div>
</div> </div>
</div> </div>
@@ -30,14 +44,19 @@
<div class="detailinfo"> <div class="detailinfo">
<div class="detail"> <div class="detail">
<div class="detailT"> <div class="detailT">
<div style=" <div
style="
margin-left: 45px; margin-left: 45px;
margin-right: 42px; margin-right: 42px;
position: relative; position: relative;
width: 100%; width: 100%;
"> "
>
<div class="title"> <div class="title">
<img style="width: 20px; height: 20px" src="../../assets/image/yuan.png" /> <img
style="width: 20px; height: 20px"
src="../../assets/image/yuan.png"
/>
<div class="text">作业名称</div> <div class="text">作业名称</div>
<div class="box"></div> <div class="box"></div>
</div> </div>
@@ -49,8 +68,18 @@
</div> </div>
</div> </div>
<div v-if="projectStatus && projectEndTime"> <div v-if="projectStatus && projectEndTime">
<div v-if="projectStatus !=='3' && new Date(projectEndTime).getTime() > new Date().getTime()" > <div
<div v-if="dayjs().isBefore(dayjs(data?.submitEndTime)) && dayjs(data?.submitStartTime).isBefore(dayjs())"> v-if="
projectStatus !== '3' &&
new Date(projectEndTime).getTime() > new Date().getTime()
"
>
<div
v-if="
dayjs().isBefore(dayjs(data?.submitEndTime)) &&
dayjs(data?.submitStartTime).isBefore(dayjs())
"
>
<UploadImg v-model:value="fileList" ref="uploadRef"> <UploadImg v-model:value="fileList" ref="uploadRef">
<button class="shangchuan" style="cursor: pointer"> <button class="shangchuan" style="cursor: pointer">
上传 上传
@@ -61,7 +90,12 @@
</div> </div>
<div v-else> <div v-else>
<div> <div>
<div v-if="dayjs().isBefore(dayjs(data?.submitEndTime)) && dayjs(data?.submitStartTime).isBefore(dayjs())"> <div
v-if="
dayjs().isBefore(dayjs(data?.submitEndTime)) &&
dayjs(data?.submitStartTime).isBefore(dayjs())
"
>
<UploadImg v-model:value="fileList" ref="uploadRef"> <UploadImg v-model:value="fileList" ref="uploadRef">
<button class="shangchuan" style="cursor: pointer"> <button class="shangchuan" style="cursor: pointer">
上传 上传
@@ -70,18 +104,36 @@
</div> </div>
</div> </div>
</div> </div>
<div class="uploadDetail" <div
:style="{ display: showFileList && fileList && fileList.length > 0 ? 'block' : 'none' }" class="uploadDetail"
@mousemove="showFileList = 1" @mouseout="showFileList = 0" style="padding-top: 60px"> :style="{
display:
showFileList && fileList && fileList.length > 0
? 'block'
: 'none',
}"
@mousemove="showFileList = 1"
@mouseout="showFileList = 0"
style="padding-top: 60px"
>
<div class="triangle"></div> <div class="triangle"></div>
<div class="square clearfix"> <div class="square clearfix">
<div class="squarecontent1" v-for="(file, i) in fileList" :key="i"> <div
<FileTypeImg v-model="file.name" :style="{ margin: '12px 15px 0 27px' }"></FileTypeImg> class="squarecontent1"
v-for="(file, i) in fileList"
:key="i"
>
<FileTypeImg
v-model="file.name"
:style="{ margin: '12px 15px 0 27px' }"
></FileTypeImg>
<div class="rarDetail"> <div class="rarDetail">
<span class="detail1" style="margin-right: 130px"> <span class="detail1" style="margin-right: 130px">
{{ file.name }} {{ file.name }}
</span> </span>
<span class="detail2" style="margin-right: 10px">{{ file.percentage }}%</span> <span class="detail2" style="margin-right: 10px"
>{{ file.percentage }}%</span
>
<span class="detail1">{{ <span class="detail1">{{
{ {
ready: "正在上传", ready: "正在上传",
@@ -90,9 +142,12 @@
fail: "上传失败", fail: "上传失败",
success: "上传成功", success: "上传成功",
}[file.status] }[file.status]
}}</span> }}</span>
<div class="progress"> <div class="progress">
<div class="progressinner" :style="{ width: `${(291 * file.percentage) / 100}px` }"></div> <div
class="progressinner"
:style="{ width: `${(291 * file.percentage) / 100}px` }"
></div>
</div> </div>
</div> </div>
<button class="btn btndetail" @click="reUpload(i)"> <button class="btn btndetail" @click="reUpload(i)">
@@ -103,7 +158,7 @@
abort: "开始", abort: "开始",
fail: "重传", fail: "重传",
}[file.status] }[file.status]
}} }}
</button> </button>
<button class="btn" @click="remove"> <button class="btn" @click="remove">
{{ {{
@@ -114,55 +169,111 @@
fail: "取消", fail: "取消",
success: "删除", success: "删除",
}[file.status] }[file.status]
}} }}
</button> </button>
</div> </div>
</div> </div>
</div> </div>
<div class="title"> <div class="title">
<img style="width: 20px; height: 20px" src="../../assets/image/yuan.png" /> <img
style="width: 20px; height: 20px"
src="../../assets/image/yuan.png"
/>
<div class="text">作业内容</div> <div class="text">作业内容</div>
<div class="box"></div> <div class="box"></div>
</div> </div>
<div v-if="dayjs().isBefore(dayjs(data?.submitEndTime)) && dayjs(data?.submitStartTime).isBefore(dayjs())"> <div
<el-input v-model="sbValue.content" :autosize="{ minRows: 12.5, maxRows: 12.5 }" resize="none" v-if="
type="textarea" /> dayjs().isBefore(dayjs(data?.submitEndTime)) &&
dayjs(data?.submitStartTime).isBefore(dayjs())
"
>
<el-input
v-model="sbValue.content"
:autosize="{ minRows: 12.5, maxRows: 12.5 }"
resize="none"
type="textarea"
/>
</div> </div>
<div v-else class="join"> <div v-else class="join">
<el-input disabled v-model="sbValue.content" :autosize="{ minRows: 12.5, maxRows: 12.5 }" resize="none" <el-input
type="textarea" /> disabled
v-model="sbValue.content"
:autosize="{ minRows: 12.5, maxRows: 12.5 }"
resize="none"
type="textarea"
/>
</div> </div>
<div v-if="projectStatus && projectEndTime"> <div v-if="projectStatus && projectEndTime">
<div v-if="projectStatus !=='3' && new Date(projectEndTime).getTime() > new Date().getTime()" > <div
<div v-if="dayjs().isBefore(dayjs(data?.submitEndTime)) && dayjs(data?.submitStartTime).isBefore(dayjs())"> v-if="
projectStatus !== '3' &&
new Date(projectEndTime).getTime() > new Date().getTime()
"
>
<div
v-if="
dayjs().isBefore(dayjs(data?.submitEndTime)) &&
dayjs(data?.submitStartTime).isBefore(dayjs())
"
>
<div style="display: flex; justify-content: center"> <div style="display: flex; justify-content: center">
<button class="tijiao" @click="handleClick">{{ submitList && submitList.length > 0 ? "再次" : "" <button class="tijiao" @click="handleClick">
}}提交</button> {{
submitList && submitList.length > 0 ? "再次" : ""
}}提交
</button>
</div> </div>
</div> </div>
<div v-else> <div v-else>
<div style="display: flex; justify-content: center"> <div style="display: flex; justify-content: center">
<button disabled class="tijiao" <button
style="background:#999;border-radius: 6px;cursor: not-allowed;">未在有效时间范围内</button> disabled
class="tijiao"
style="
background: #999;
border-radius: 6px;
cursor: not-allowed;
"
>
未在有效时间范围内
</button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div v-else> <div v-else>
<div> <div>
<div v-if="dayjs().isBefore(dayjs(data?.submitEndTime)) && dayjs(data?.submitStartTime).isBefore(dayjs())"> <div
v-if="
dayjs().isBefore(dayjs(data?.submitEndTime)) &&
dayjs(data?.submitStartTime).isBefore(dayjs())
"
>
<div style="display: flex; justify-content: center"> <div style="display: flex; justify-content: center">
<button class="tijiao" @click="handleClick">{{ submitList && submitList.length > 0 ? "再次" : "" <button class="tijiao" @click="handleClick">
}}提交</button> {{
submitList && submitList.length > 0 ? "再次" : ""
}}提交
</button>
</div> </div>
</div> </div>
<div v-else> <div v-else>
<div style="display: flex; justify-content: center"> <div style="display: flex; justify-content: center">
<button disabled class="tijiao" <button
style="background:#999;border-radius: 6px;cursor: not-allowed;">未在有效时间范围内</button> disabled
class="tijiao"
style="
background: #999;
border-radius: 6px;
cursor: not-allowed;
"
>
未在有效时间范围内
</button>
</div> </div>
</div> </div>
</div> </div>
@@ -171,7 +282,10 @@
<div class=""></div> <div class=""></div>
<div class="title" style="margin-top: 0px"> <div class="title" style="margin-top: 0px">
<img style="width: 20px; height: 20px" src="../../assets/image/yuan.png" /> <img
style="width: 20px; height: 20px"
src="../../assets/image/yuan.png"
/>
<div class="text">历史记录</div> <div class="text">历史记录</div>
<div class="box"></div> <div class="box"></div>
</div> </div>
@@ -182,22 +296,35 @@
<div class="content2">作业内容</div> <div class="content2">作业内容</div>
<div class="content3">附件</div> <div class="content3">附件</div>
</div> </div>
<div v-for="(value, index) in submitList" :key="index" class="historytitle2" :style="{ <div
v-for="(value, index) in submitList"
:key="index"
class="historytitle2"
:style="{
'border-bottom': 'border-bottom':
index === submitList.length - 1 index === submitList.length - 1
? '1px solid rgba(215, 229, 253, 0)' ? '1px solid rgba(215, 229, 253, 0)'
: '1px solid rgba(215, 229, 253, 1)', : '1px solid rgba(215, 229, 253, 1)',
}"> }"
>
<div class="content1">{{ value.createTime }}</div> <div class="content1">{{ value.createTime }}</div>
<div class="content2"> <div class="content2">
<div :title="value.workUploadContent"> <div :title="value.workUploadContent">
{{ value.workUploadContent }} {{ value.workUploadContent }}
</div> </div>
</div> </div>
<div class="content3"> <div class="content3">
<div><span style="margin-left: 10px"> <div>
<el-link target="_blank" type="primary" :href="fielPath+value.workUploadAddress?.split(',')[0] || ''">{{value.workUploadAddress?.split(',')[0] }}</el-link> <span style="margin-left: 10px">
<el-link
target="_blank"
type="primary"
:href="
fielPath + value.workUploadAddress?.split(',')[0] ||
''
"
>{{ value.workUploadAddress?.split(",")[0] }}</el-link
>
</span> </span>
</div> </div>
</div> </div>
@@ -208,51 +335,99 @@
</div> </div>
<div class="right"> <div class="right">
<div class="righttitle"> <div class="righttitle">
<img style="width: 20px; height: 20px" src="../../assets/image/yuan.png" /> <img
style="width: 20px; height: 20px"
src="../../assets/image/yuan.png"
/>
<div class="text">截止时间</div> <div class="text">截止时间</div>
<div class="box"></div> <div class="box"></div>
</div> </div>
<div class="timebox clearfix"> <div class="timebox clearfix">
<div class="innertime"> <div class="innertime">
{{ data?.submitStartTime }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ data?.submitEndTime }} {{
data?.submitStartTime
}}&nbsp;&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;&nbsp;{{
data?.submitEndTime
}}
</div> </div>
<div class="endtime clearfix"> <div class="endtime clearfix">
<div v-if="dayjs(data?.submitEndTime).isBefore(dayjs())" class="endtimetext">该任务已结束</div> <div
<div v-else class="endtimetext">距离结束还有&nbsp;&nbsp;<span class="te">{{ v-if="dayjs(data?.submitEndTime).isBefore(dayjs())"
parseInt(dayjs(data?.submitEndTime).diff(dayjs(), "minute") / 60) class="endtimetext"
}}</span>&nbsp;&nbsp; >
小时&nbsp;&nbsp; 该任务已结束
<span class="te">{{ dayjs(data?.submitEndTime).diff(dayjs(), "minute") % 60 }}</span>&nbsp;&nbsp;分钟 </div>
<div v-else class="endtimetext">
距离结束还有&nbsp;&nbsp;<span class="te">{{
parseInt(
dayjs(data?.submitEndTime).diff(dayjs(), "minute") / 60
)
}}</span
>&nbsp;&nbsp; 小时&nbsp;&nbsp;
<span class="te">{{
dayjs(data?.submitEndTime).diff(dayjs(), "minute") % 60
}}</span
>&nbsp;&nbsp;分钟
</div> </div>
</div> </div>
</div> </div>
<div class="righttitle"> <div class="righttitle">
<img style="width: 20px; height: 20px" src="../../assets/image/yuan.png" /> <img
style="width: 20px; height: 20px"
src="../../assets/image/yuan.png"
/>
<div class="text">作业说明</div> <div class="text">作业说明</div>
<div class="box"></div> <div class="box"></div>
</div> </div>
<div class="explain clearfix"> <div class="explain clearfix">
<!-- todo #作业任务详情 作业说明是作业要求字段么?--> <!-- todo #作业任务详情 作业说明是作业要求字段么?-->
<div class="explain1" style="margin-top: 26px" v-html="data?.workRequirement"></div> <div
class="explain1"
style="margin-top: 26px"
v-html="data?.workRequirement"
></div>
</div> </div>
</div> </div>
</div> </div>
<!-- 详细信息 --> <!-- 详细信息 -->
</div> </div>
<el-dialog v-model="centerDialogVisible" title="" width="20%" center :show-close="false" :align-center="true"> <el-dialog
<div style="text-align: center;font-size:16px;"> <span style="color:black"> v-model="centerDialogVisible"
提交成功 title=""
</span></div> width="20%"
center
:show-close="false"
:align-center="true"
>
<div style="text-align: center; font-size: 16px">
<span style="color: black"> 提交成功 </span>
</div>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button class="cancel" <el-button
style="color: #387DF7; border: 1px solid #387DF7;padding: 8px 32px; border-radius: 4px;" class="cancel"
@click="centerDialogVisible = false">取消</el-button> style="
<el-button class="back" color: #387df7;
style="background: #387DF7;box-shadow: 1px 2px 15px 1px rgba(56,125,247,0.34);border: 0px;padding: 8px 32px;" border: 1px solid #387df7;
type="primary" @click="returnclick"> padding: 8px 32px;
border-radius: 4px;
"
@click="centerDialogVisible = false"
>取消</el-button
>
<el-button
class="back"
style="
background: #387df7;
box-shadow: 1px 2px 15px 1px rgba(56, 125, 247, 0.34);
border: 0px;
padding: 8px 32px;
"
type="primary"
@click="returnclick"
>
返回 返回
</el-button> </el-button>
</span> </span>
@@ -291,27 +466,38 @@ const returnclick = () => {
router.back(); router.back();
}; };
const { const {
query: { courseId: workId, type, id: taskId, pName, sName, projectStatus, projectEndTime,infoId}, query: {
courseId: workId,
type,
id: taskId,
pName,
sName,
projectStatus,
projectEndTime,
infoId,
},
} = useRoute(); } = useRoute();
const { data } = taskId && taskId !== 'undefined' ? useRequest(TASK_WORK_DETAIL, { workId, taskId }) : useRequest(TASK_WORK_DETAIL, { workId }); const { data } =
taskId && taskId !== "undefined"
? useRequest(TASK_WORK_DETAIL, { workId, taskId })
: useRequest(TASK_WORK_DETAIL, { workId });
console.log('data==----->', data) console.log("data==----->", data);
const { data: submitList } = useRequest(TASK_WORK_SUBMIT_LIST, { const { data: submitList } = useRequest(TASK_WORK_SUBMIT_LIST, {
workerId: workId, workerId: workId,
}); });
const open = () => { const open = () => {
centerDialogVisible.value = true centerDialogVisible.value = true;
}; };
const showFileList = computed(() => { const showFileList = computed(() => {
return fileList.value.length return fileList.value.length;
}) });
const handleClick = () => { const handleClick = () => {
console.log(fileList.value, uploadRef.value) console.log(fileList.value, uploadRef.value);
if (!sbValue.value.content) { if (!sbValue.value.content) {
if (fileList.value.length === 0) { if (fileList.value.length === 0) {
return ElMessage.warning("请输入作业内容"); return ElMessage.warning("请输入作业内容");
@@ -323,7 +509,7 @@ const handleClick = () => {
workUploadAddress: fileList.value.map((e) => e.url).join(",") || "", workUploadAddress: fileList.value.map((e) => e.url).join(",") || "",
workId, workId,
type, type,
taskId:taskId || infoId, taskId: taskId || infoId,
}).then((res) => { }).then((res) => {
console.log(res); console.log(res);
submitList.value.unshift(res.data); submitList.value.unshift(res.data);
@@ -707,7 +893,6 @@ function reUpload(i) {
margin-top: 14px; margin-top: 14px;
margin-left: 20px; margin-left: 20px;
width: 460px; width: 460px;
;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
@@ -776,21 +961,27 @@ function reUpload(i) {
margin-top: 43px; margin-top: 43px;
.allbox1 { .allbox1 {
background: linear-gradient(0deg, background: linear-gradient(
0deg,
rgba(160, 193, 230, 0) 0%, rgba(160, 193, 230, 0) 0%,
rgba(161, 195, 231, 0.2) 100%); rgba(161, 195, 231, 0.2) 100%
);
} }
.allbox2 { .allbox2 {
background: linear-gradient(0deg, background: linear-gradient(
0deg,
rgba(177, 219, 229, 0) 0%, rgba(177, 219, 229, 0) 0%,
rgba(172, 216, 227, 0.2) 100%); rgba(172, 216, 227, 0.2) 100%
);
} }
.allbox3 { .allbox3 {
background: linear-gradient(0deg, background: linear-gradient(
0deg,
rgba(195, 209, 234, 0) 0%, rgba(195, 209, 234, 0) 0%,
rgba(191, 206, 231, 0.2) 100%); rgba(191, 206, 231, 0.2) 100%
);
} }
.item { .item {
@@ -928,7 +1119,7 @@ function reUpload(i) {
.dialog-footer { .dialog-footer {
.back { .back {
background: #387DF7; background: #387df7;
box-shadow: 1px 2px 15px 1px rgba(56, 125, 247, 0.34); box-shadow: 1px 2px 15px 1px rgba(56, 125, 247, 0.34);
border: 0px; border: 0px;
padding: 8px 32px; padding: 8px 32px;
@@ -936,13 +1127,12 @@ function reUpload(i) {
} }
.cancel { .cancel {
background: #387DF7; background: #387df7;
border: 0px; border: 0px;
padding: 8px 32px; padding: 8px 32px;
border: 1px solid #387DF7; border: 1px solid #387df7;
border-radius: 4px; border-radius: 4px;
} }
} }
} }
} }