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>
<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="crumb">
@@ -7,11 +16,15 @@
<div style="margin-left: 6px; margin-right: 6px">/</div>
<div style="font-weight: 700">课程详情</div>
<div v-if="pName != ''" class="return">
<div style="display: flex" @click="returnclick">
<el-button style="color:#0073FB"> <img class="img2" style="margin-right:11px;cursor: pointer;"
src="../../assets/image/return.png" />返回</el-button>
<el-button style="color: #0073fb">
<img
class="img2"
style="margin-right: 11px; cursor: pointer"
src="../../assets/image/return.png"
/>返回</el-button
>
</div>
</div>
</div>
@@ -22,31 +35,59 @@
<div style="margin-left: 46px">
<div class="title">面授课{{ data.planDto?.name }}</div>
<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">
{{ 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 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>
</div>
<div >
<div>
<div style="display: flex">
<botton class="btn" style="margin-right: 20px" :style="{
background: isAllowSign? data.signFlag ? '#999' : 'rgb(57, 146, 249)':'#999',
}" @click="signClick">{{ data.signFlag ? "已签到" : "签到" }}
<botton
class="btn"
style="margin-right: 20px"
:style="{
background: isAllowSign
? data.signFlag
? '#999'
: 'rgb(57, 146, 249)'
: '#999',
}"
@click="signClick"
>{{ data.signFlag ? "已签到" : "签到" }}
</botton>
<!-- <botton style="background: #999" class="btn" @click="toSurvery" v-if="data.planDto?.evalFlag == 0">
评估
</botton> -->
<botton v-if="data.planDto?.evalFlag !== 0" :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
v-if="data.planDto?.evalFlag !== 0"
: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>
</div>
</div>
@@ -59,7 +100,10 @@
<div class="detailT">
<div class="" style="margin-left: 48px; margin-right: 48px">
<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="box"></div>
</div>
@@ -70,29 +114,79 @@
</div>
<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">
<div v-if="data.planDto?.attach === ''"
style="font-size: 14px;font-weight: 400; line-height: 24px; cursor: pointer;margin-left: 40px; margin-top: 20px;">
<div
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 v-else>
<div v-for="(el, index) in formateArr(data.planDto?.attach)" :key="index" class="enclosure"
:style="{ borderBottom: '1px solid rgba(56, 125, 247, 0.2)' }">
<div
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">
<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>
<div style="margin-left: 20px">{{ el.name? el.name : el.slice(el.lastIndexOf('/')+1,el.indexOf('-')) + el.slice(el.lastIndexOf('.')) }}</div>
<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>
<div style="margin-left: 20px">
{{
el.name
? el.name
: el.slice(el.lastIndexOf("/") + 1, el.indexOf("-")) +
el.slice(el.lastIndexOf("."))
}}
</div>
</div>
<div>
<div v-if="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
v-if="
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 v-else class="download">
<img style="width: 16px; height: 15px" src="../../assets/image/download.png" />
<div style="margin-left: 5px" @click="download(el.name? el.response.data : el)">
<img
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>
@@ -110,37 +204,78 @@
</div>
</div>
<div
:style="{ background: new Date(data.planDto?.beginTime).getTime() > new Date().getTime() ? '#999' : '' }"
class="submit" @click="toWork">
:style="{
background:
new Date(data.planDto?.beginTime).getTime() >
new Date().getTime()
? '#999'
: '',
}"
class="submit"
@click="toWork"
>
交作业
</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>
</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>
<div class="question">
{{ data.examinationDto?.examinationName }}
</div>
<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 class="tag3" style="margin-left: 11px">考试</div>
</div>
</div>
<div
:style="{ background: new Date(data.planDto?.beginTime).getTime() > new Date().getTime() ? '#999' : '' }"
class="submit" @click="toExamItem(data.examinationDto)">
:style="{
background:
new Date(data.planDto?.beginTime).getTime() >
new Date().getTime()
? '#999'
: '',
}"
class="submit"
@click="toExamItem(data.examinationDto)"
>
去考试
</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>
</el-tab-pane>
@@ -149,7 +284,10 @@
</div>
<div class="teacher">
<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="box"></div>
</div>
@@ -192,10 +330,11 @@ const {
query: { courseId, type, id: taskId },
} = useRoute();
const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId,usePermission:true });
const teacherInfo = useUserInfo(
computed(() => data.value?.planDto?.teacherId)
);
const { data } = useRequest(STU_OFFCOURSE_DETAIL, {
courseId,
usePermission: true,
});
const teacherInfo = useUserInfo(computed(() => data.value?.planDto?.teacherId));
const state = reactive({
activeName: "first",
@@ -215,13 +354,13 @@ const downloads = (url) => {
function formateArr(strs) {
let newArr = [];
try{
newArr = JSON.parse(strs)
try {
newArr = JSON.parse(strs);
} catch {
newArr = strs?.split(',')
newArr = strs?.split(",");
}
console.log('112233', newArr)
return newArr
console.log("112233", newArr);
return newArr;
}
let timer = null;
@@ -229,25 +368,35 @@ let timer = null;
function isSignClick() {
timer = setInterval(() => {
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?.beginTime).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;
endTime = endTime + data.value.planDto?.afterStart * 60 * 1000;
console.log("1111");
} else if (
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;
console.log("11112222");
} else if (
!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;
@@ -306,7 +455,10 @@ function toSurvery() {
if (data.value.isSurvery) {
// 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("课程未开始,请耐心等待!");
return;
}
@@ -317,26 +469,23 @@ function toSurvery() {
router.push({
path: "/surveydetail",
query: {
id:taskId,
id: taskId,
courseId: data.value.planDto.evaluateId,
pName: "面授课",
infoId: data.value.planDto.offcoursePlanId,
chapterOrStageId: 0,
sName: data.value.planDto.name,
type:3
type: 3,
},
});
}
function toWork() {
if (data.value.planDto.beginTime) {
let date1 = new Date(data.value.planDto.beginTime).getTime()
let date2 = new Date().getTime()
let date1 = new Date(data.value.planDto.beginTime).getTime();
let date2 = new Date().getTime();
if (date1 > date2) {
ElMessage.warning("未到开始时间,请耐心等待!");
}
}
router.push({
@@ -355,15 +504,17 @@ function toWork() {
function toExamItem(obj) {
if (data.value.planDto.beginTime) {
let date1 = new Date(data.value.planDto.beginTime).getTime()
let date2 = new Date().getTime()
let date1 = new Date(data.value.planDto.beginTime).getTime();
let date2 = new Date().getTime();
if (date1 > date2) {
ElMessage.warning("未到开始时间,请耐心等待!");
}
}
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 });
}
@@ -640,8 +791,6 @@ onUnmounted(() => {
align-items: center;
}
}
}
.teacheritem {
@@ -659,7 +808,6 @@ onUnmounted(() => {
align-items: center;
}
}
}
.teacheritem .introduce {
@@ -687,8 +835,6 @@ onUnmounted(() => {
cursor: pointer;
}
}
}
}
</style>

View File

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