fix:修改面授课传递参数

This commit is contained in:
wuyx
2022-12-23 20:52:51 +08:00
parent 1218253ff9
commit 6ded0b99ac
2 changed files with 75 additions and 101 deletions

View File

@@ -9,7 +9,8 @@
<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;" 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> </div>
</div> </div>
@@ -56,10 +57,7 @@
<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 <img style="width: 20px; height: 20px" src="../../assets/image/course.png" />
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>
@@ -71,63 +69,36 @@
<div class="detailB"> <div class="detailB">
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="课程附件" name="first"> <el-tab-pane label="课程附件" name="first">
<div <div v-if="data.planDto?.attach === '[]'" style="
v-if="data.planDto?.attach === '[]'"
style="
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
line-height: 24px; line-height: 24px;
cursor: pointer; cursor: pointer;
margin-left: 40px; margin-left: 40px;
margin-top: 20px; margin-top: 20px;
" ">
>
此课程无附件 此课程无附件
</div> </div>
<div v-else> <div v-else>
<div <div v-for="(el, index) in JSON.parse(data.planDto?.attach)" :key="index" class="enclosure"
v-for="(el, index) in JSON.parse(data.planDto?.attach)" :style="{ borderBottom: '1px solid rgba(56, 125, 247, 0.2)' }">
:key="index"
class="enclosure"
:style="{ borderBottom: '1px solid rgba(56, 125, 247, 0.2)' }"
>
<div class="enclosureL"> <div class="enclosureL">
<FileTypeImg <FileTypeImg v-model="el.name" :style="{
v-model="el.name"
:style="{
width: '22px', width: '22px',
height: '26px', height: '26px',
marginLeft: '10px', marginLeft: '10px',
}" }"></FileTypeImg>
></FileTypeImg>
<div style="margin-left: 20px">{{ el.name }}</div> <div style="margin-left: 20px">{{ el.name }}</div>
</div> </div>
<div <div v-if="new Date(data.planDto.beginTime).getTime() > new Date().getTime()" class="download">
v-if="new Date(data.planDto.beginTime).getTime() > new Date().getTime()" <img style="width: 16px; height: 15px" src="../../assets/image/download.png" />
class="download"> <div style="margin-left: 5px;color:#999;" @click="downloads(el.response.data)">
<img
style="width: 16px; height: 15px"
src="../../assets/image/download.png"
/>
<div
style="margin-left: 5px;color:#999;"
@click="downloads(el.response.data)"
>
下载 下载
</div> </div>
</div> </div>
<div <div v-else class="download">
v-else <img style="width: 16px; height: 15px" src="../../assets/image/download.png" />
class="download"> <div style="margin-left: 5px" @click="download(el.response.data)">
<img
style="width: 16px; height: 15px"
src="../../assets/image/download.png"
/>
<div
style="margin-left: 5px"
@click="download(el.response.data)"
>
下载 下载
</div> </div>
</div> </div>
@@ -135,9 +106,7 @@
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="课程作业" name="second"> <el-tab-pane label="课程作业" name="second">
<div <div v-if="data.planDto?.attach === '[]'" style="
v-if="data.planDto?.attach === '[]'"
style="
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
line-height: 24px; line-height: 24px;
@@ -367,6 +336,9 @@ function toSurvery() {
query: { query: {
courseId: data.value.planDto.evaluateId, courseId: data.value.planDto.evaluateId,
pName: "面授课", pName: "面授课",
taskId: taskId,
taskIds: taskId,
chapterOrStageId: 0,
sName: data.value.planDto.name, sName: data.value.planDto.name,
type: 3 type: 3
}, },

View File

@@ -27,13 +27,14 @@
</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;" 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> </div>
</div> </div>
<!-- 面包屑导航 --> <!-- 面包屑导航 -->
<!-- 标题 --> <!-- 标题 -->
<div class="title">评估{{data.assessmentName}}</div> <div class="title">评估{{ data.assessmentName }}</div>
<!-- 标题 --> <!-- 标题 -->
<!-- 基本信息 --> <!-- 基本信息 -->
<div class="bascinfo"> <div class="bascinfo">
@@ -367,10 +368,10 @@ function submit() {
if (1 > 0) { if (1 > 0) {
console.log(data) console.log(data)
console.log('我是提交的数据', { console.log('我是提交的数据', {
targetId: taskId, // 项目、路径图或开课的Id targetId: taskId ? taskId : taskIds ? taskIds : 0, // 项目、路径图或开课的Id
chapterOrStageId: chapterOrStageId, // 关卡或者阶段Id 关卡Id不允许为空 chapterOrStageId: chapterOrStageId ? chapterOrStageId : 0, // 关卡或者阶段Id 关卡Id不允许为空
assessmentId: courseId, assessmentId: courseId,
taskId, taskId: taskId ? taskId : taskIds ? taskIds : 0,
type, type,
result: JSON.stringify(data.value), result: JSON.stringify(data.value),
}) })
@@ -419,12 +420,13 @@ function submit() {
return ElMessage.warning("您有未填写的评估题干"); return ElMessage.warning("您有未填写的评估题干");
} }
} }
data.value.isSubmit = !data.value.isSubmit; data.value.isSubmit = !data.value.isSubmit;
request(ASSESSMENT_SUBMIT, { request(ASSESSMENT_SUBMIT, {
targetId: taskId, // 项目、路径图或开课的Id targetId: taskId ? taskId : taskIds ? taskIds : 0, // 项目、路径图或开课的Id
chapterOrStageId: chapterOrStageId, // 关卡或者阶段Id 关卡Id不允许为空 chapterOrStageId: chapterOrStageId ? chapterOrStageId : 0, // 关卡或者阶段Id 关卡Id不允许为空
assessmentId: courseId, assessmentId: courseId,
taskId, taskId: taskId ? taskId : taskIds ? taskIds : 0,
type, type,
result: JSON.stringify(data.value), result: JSON.stringify(data.value),
}).then(() => { }).then(() => {