Merge branch 'develop' of ssh://gitlab.dongwu-inc.com:10022/BOE/fe-stu into develop

This commit is contained in:
zhangyc
2022-12-23 19:59:07 +08:00
15 changed files with 2325 additions and 2387 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

View File

@@ -0,0 +1,82 @@
<template>
<div class="pathDetail" v-if="visiable" :style="{background:`url('${back}') no-repeat`}">
<div v-for="(item,i) in detail.chapterDtoList" :key="i" class="cha"
:style="{top:`${imgAttr.positions[i]?.top - (current===i?10:0)}px`,left:`${imgAttr.positions[i]?.left - (current===i?10:0)}px`}">
<div @click="toDetail(i)"
:style="{background: `url('${current===i?currentBack:nameBack}')`,width:`${current===i?278:245}px`,height:`${current===i?120:105}px`,textAlign:'center',lineHeight:'75px',color:'#FFF'}">
{{ item.name }}
</div>
</div>
</div>
</template>
<script setup>
import {computed, defineProps, ref, watch} from "vue";
import back from '@/assets/image/pathdetails/路径图背景线.png'
import nameBack from '@/assets/image/pathdetails/组 23@2x.png'
import currentBack from '@/assets/image/pathdetails/组 23(1).png'
import {useRouter} from "vue-router/dist/vue-router";
const props = defineProps({
value: String,
img: String,
detail: {
type: Object,
default: {}
}
})
const router = useRouter();
const visiable = ref(true)
const imageAttrs = {
'路径图背景-1671015331292.png': {
width: 1437,
height: 594,
positions: [
{left: -72, top: 508},
{left: 147, top: 356},
{left: 689, top: 263},
{left: 617, top: 69},
{left: 1047, top: 42},
]
}
}
const imgAttr = computed(() => imageAttrs[Object.keys(imageAttrs).find(e => props.img.includes(e))] || {})
const current = computed(() => props.detail.chapterDtoList.findIndex(e => e.chapterId === props.detail.currentStageId))
function show() {
visiable.value = true
}
function toDetail(i) {
if (current.value !== i) {
return
}
import.meta.env.MODE === "development"
? router.push({
path: "/pathdetails",
query: {routerId: props.detail.routerId, routerName: props.detail.routerName},
})
: window.open(
`${import.meta.env.VITE_BOE_PATH_DETAIL_URL}/pathdetails&params=${encodeURIComponent(
`routerId=${props.detail.routerId}&routerName=${props.detail.routerName}`
)}`
);
}
function close() {
visiable.value = false
}
</script>
<style lang="scss">
.pathDetail {
width: 100%;
height: 1011px;
position: relative;
}
.cha {
position: absolute;
cursor: pointer;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -14,13 +14,11 @@
<span class="content" style="margin-left: 31px">下一个</span>
<button class="btn btn02" style="margin-left: 6px"></button>
</div>-->
<div class="return">
<div class="return">
<div style="display: flex" @click="returnclick">
<img class="img2" style="margin-right: 22px;cursor: pointer;" src="../../assets/image/return.png" />
<div style="cursor: pointer;" class="text">返回</div>
<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 class="debateTitle" style="color: #fff">

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@
<div class="pathdetails" style="padding: 30px">
<!-- 面包屑导航 -->
<div class="crumb">
<div>{{data.name}}</div>
<div>{{ data.name }}</div>
<div style="margin-left: 6px; margin-right: 6px">/</div>
<div style="font-weight: 700">项目详情</div>
@@ -14,12 +14,12 @@
</div>
<!-- 面包屑导航 -->
<div class="pdname">
{{ userInfo.bandDesc }}
<span @click="introductionPro" style="font-size:14px;color:#fff;margin-left: 33px;cursor: pointer;">简介
{{ userInfo.bandDesc }}
<span @click="introductionPro" style="font-size:14px;color:#fff;margin-left: 33px;cursor: pointer;">简介
<span style="position: relative;top:1px;left:-3px;cursor: pointer;">></span>
</span>
</div>
<!-- 详细信息 -->
<div class="detailinfo">
<div class="detailL">
@@ -115,7 +115,7 @@
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="课程公告" name="first">
<div class="notice">
{{ data.remark || "暂无公告" }}
{{ data.notice || "暂无公告" }}
</div>
</el-tab-pane>
<!--
@@ -237,17 +237,13 @@
</div>
<!-- 详细信息 -->
<!-- 弹框提示信息 -->
<el-dialog
title=""
top="347px"
v-model="dialogVisible"
:show-close="false"
<el-dialog title="" top="347px" v-model="dialogVisible" :show-close="false"
style="display:flex;justify-content:center;align-items:center;height: 283px;padding:0;border-radius: 4px;"
width="502px">
<div style="width:288px;color:#333333;font-size: 22px;font-weight: 600;">{{ dialogVisibleTip }}</div>
<span slot="footer" style="display:inline-block;margin-top:60px;">
<el-button @click="dialogVisible = false" style="width:140px;height:40px;margin-right: 22px;">取消</el-button>
<el-button type="primary" @click="dialogVisible = false" style="width:140px;height:40px;">确定</el-button>
<el-button type="primary" @click="dialogVisible = false" style="width:140px;height:40px;">确定</el-button>
</span>
</el-dialog>
</div>
@@ -374,18 +370,18 @@ const dialogVisibleTip = ref('该任务无法学习,请联系管理员进行
// }
function introductionPro() {
dialogVisibleTip.value =data.value.remark;
dialogVisibleTip.value = data.value.remark;
dialogVisible.value = true;
}
function toFinish(d, sName, chapterId) {
console.log("dddddd", d, sName);
function toFinish(d, sName, chapterOrStageId) {
console.log("dddddd", d, sName, chapterOrStageId);
// 作业过期判断
if (d.type == 4) {
let date1 = new Date(d.endTime).getTime();
let date2 = new Date().getTime();
if (date1 < date2) {
dialogVisibleTip.value ='当前作业已结束';
dialogVisibleTip.value = '当前作业已结束';
dialogVisible.value = true;
// ElMessage.error("当前作业已结束")
return
@@ -396,7 +392,7 @@ function toFinish(d, sName, chapterId) {
let date1 = new Date(d.endTime).getTime();
let date2 = new Date().getTime();
if (date1 < date2) {
dialogVisibleTip.value ='当前直播已结束';
dialogVisibleTip.value = '当前直播已结束';
dialogVisible.value = true;
return
}
@@ -405,7 +401,7 @@ function toFinish(d, sName, chapterId) {
if (d.type == 5) {
if (d.taskStatus == 1 || d.taskStatus == 2) {
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
dialogVisibleTip.value ='该任务无法学习,请联系管理员进行替换!';
dialogVisibleTip.value = '该任务无法学习,请联系管理员进行替换!';
dialogVisible.value = true;
return
}
@@ -414,7 +410,7 @@ function toFinish(d, sName, chapterId) {
if (d.type == 11) {
if (d.taskStatus == 1 || d.taskStatus == 2) {
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
dialogVisibleTip.value ='该任务无法学习,请联系管理员进行替换!';
dialogVisibleTip.value = '该任务无法学习,请联系管理员进行替换!';
dialogVisible.value = true;
return
}
@@ -424,7 +420,7 @@ function toFinish(d, sName, chapterId) {
let date1 = new Date(d.endTime).getTime();
let date2 = new Date().getTime();
if (date1 < date2) {
dialogVisibleTip.value ='当前活动已结束';
dialogVisibleTip.value = '当前活动已结束';
dialogVisible.value = true;
return
}
@@ -433,7 +429,7 @@ function toFinish(d, sName, chapterId) {
if (d.type == 1) {
if (d.taskStatus == 1 || d.taskStatus == 2) {
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
dialogVisibleTip.value ='该任务无法学习,请联系管理员进行替换!';
dialogVisibleTip.value = '该任务无法学习,请联系管理员进行替换!';
dialogVisible.value = true;
return
}
@@ -442,7 +438,7 @@ function toFinish(d, sName, chapterId) {
if (d.type == 2) {
if (d.taskStatus == 1 || d.taskStatus == 2) {
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
dialogVisibleTip.value ='该任务无法学习,请联系管理员进行替换!';
dialogVisibleTip.value = '该任务无法学习,请联系管理员进行替换!';
dialogVisible.value = true;
return
}
@@ -475,6 +471,7 @@ function toFinish(d, sName, chapterId) {
courseId: d.courseId,
pName: data.value.name,
sName,
chapterOrStageId
},
});
} else if (typeof types.value.path[d.type] === "function") {
@@ -491,21 +488,23 @@ function whiteTypes(type) {
.el-dialog__header {
display: none;
}
.crumb {
color: #fff;
display: flex;
font-size: 14px;
line-height: 24px;
.return {
position: absolute;
right: 10%;
.text {
text-align: center;
display: flex;
flex-direction: row;
align-items: center;
}
text-align: center;
display: flex;
flex-direction: row;
align-items: center;
}
}
}

View File

@@ -1,79 +1,80 @@
<template>
<div class="learnpath">
<div class="content">
<div class="title">
<div class="titleL">
<div @click="returnfun" class="text">学习路径图</div>
<div class="info" style="margin-right: 14px" v-if="userInfo.jobName">
<img style="width: 20px; height: 18px; margin-right: 10px" src="../../assets/image/pm.png" />
<div style="margin-top: 1px">{{ userInfo.jobName }}</div>
</div>
<div class="info" v-if="userInfo.bandDesc">
<img style="width: 18px; height: 17px; margin-right: 11px" src="../../assets/image/band.png" />
<div style="margin-top: 2px">{{ userInfo.bandDesc }}</div>
</div>
</div>
<div :style="{ display: !showmapdetail ? 'flex' : 'none' }">
<!-- <el-popover width="475px" trigger="hover" popper-class="lppopover">-->
<!-- <div>-->
<!-- <div class="finish">-->
<!-- <img-->
<!-- src="../../assets/image/circle.png"-->
<!-- style="width: 20px; height: 20px"-->
<!-- />-->
<!-- <div class="text">未完成</div>-->
<!-- <div class="box"></div>-->
<!-- </div>-->
<!-- <div-->
<!-- v-for="(value, index) in unCompleteTaskList"-->
<!-- :key="index"-->
<!-- class="tasks"-->
<!-- :style="{-->
<!-- 'border-bottom':-->
<!-- index === unCompleteTaskList.length - 1-->
<!-- ? null-->
<!-- : '1px solid rgba(229, 228, 228, 1)',-->
<!-- }"-->
<!-- >-->
<!-- <div style="font-size: 14px; font-weight: 500; color: #677d86">-->
<!-- {{ value.name }}-->
<!-- </div>-->
<!-- <img-->
<!-- style="width: 20px; height: 20px"-->
<!-- src="../../assets/image/go.png"-->
<!-- @click="toUnTask(chapterId)"-->
<!-- />-->
<!-- </div>-->
<!-- </div>-->
<!-- <template #reference>-->
<!-- todo #学习路径 只会有一个未完成任务么?是否是直接跳到任务详情-->
<!-- <div class="titleR">进入未完成任务</div>-->
<!-- </template>-->
<!-- </el-popover>-->
</div>
<div :style="{ display: showmapdetail ? 'flex' : 'none' }" class="titleR" @click="returnfun">
返回列表
</div>
</div>
<!-- 路径列表-->
<div :style="{ display: !showmapdetail ? 'flex' : 'none' }" class="head">
<div style="min-width: 770px; width: 100%">
<el-table :data="data" style="width: 100%" @row-click="gofun">
<el-table-column prop="img" label="缩略图" #default="scope" align="center" width="255">
<img :src="scope.row.picUrl" style="width: 230px; height: 155px" />
</el-table-column>
<el-table-column align="center" prop="name" label="路径名称" />
<el-table-column align="center" prop="introduce" label="路径介绍" #default="scope">
<el-popover placement="bottom-start" :width="400" title="路径介绍" trigger="hover" :content="scope.row.remark">
<template #reference>
<div>{{ scope.row.remark }}</div>
</template>
</el-popover>
</el-table-column>
<div class="learnpath">
<div class="content">
<div class="title">
<div class="titleL">
<div @click="returnfun" class="text">学习路径图</div>
<div class="info" style="margin-right: 14px" v-if="userInfo.jobName">
<img style="width: 20px; height: 18px; margin-right: 10px" src="../../assets/image/pm.png"/>
<div style="margin-top: 1px">{{ userInfo.jobName }}</div>
</div>
<div class="info" v-if="userInfo.bandDesc">
<img style="width: 18px; height: 17px; margin-right: 11px" src="../../assets/image/band.png"/>
<div style="margin-top: 2px">{{ userInfo.bandDesc }}</div>
</div>
</div>
<div :style="{ display: !showmapdetail ? 'flex' : 'none' }">
<!-- <el-popover width="475px" trigger="hover" popper-class="lppopover">-->
<!-- <div>-->
<!-- <div class="finish">-->
<!-- <img-->
<!-- src="../../assets/image/circle.png"-->
<!-- style="width: 20px; height: 20px"-->
<!-- />-->
<!-- <div class="text">未完成</div>-->
<!-- <div class="box"></div>-->
<!-- </div>-->
<!-- <div-->
<!-- v-for="(value, index) in unCompleteTaskList"-->
<!-- :key="index"-->
<!-- class="tasks"-->
<!-- :style="{-->
<!-- 'border-bottom':-->
<!-- index === unCompleteTaskList.length - 1-->
<!-- ? null-->
<!-- : '1px solid rgba(229, 228, 228, 1)',-->
<!-- }"-->
<!-- >-->
<!-- <div style="font-size: 14px; font-weight: 500; color: #677d86">-->
<!-- {{ value.name }}-->
<!-- </div>-->
<!-- <img-->
<!-- style="width: 20px; height: 20px"-->
<!-- src="../../assets/image/go.png"-->
<!-- @click="toUnTask(chapterId)"-->
<!-- />-->
<!-- </div>-->
<!-- </div>-->
<!-- <template #reference>-->
<!-- todo #学习路径 只会有一个未完成任务么?是否是直接跳到任务详情-->
<!-- <div class="titleR">进入未完成任务</div>-->
<!-- </template>-->
<!-- </el-popover>-->
</div>
<div :style="{ display: showmapdetail ? 'flex' : 'none' }" class="titleR" @click="returnfun">
返回列表
</div>
</div>
<!-- 路径列表-->
<div :style="{ display: !showmapdetail ? 'flex' : 'none' }" class="head">
<div style="min-width: 770px; width: 100%">
<el-table :data="data" style="width: 100%" @row-click="gofun">
<el-table-column prop="img" label="缩略图" #default="scope" align="center" width="255">
<img :src="scope.row.picUrl" style="width: 230px; height: 155px"/>
</el-table-column>
<el-table-column align="center" prop="name" label="路径名称"/>
<el-table-column align="center" prop="introduce" label="路径介绍" #default="scope">
<el-popover placement="bottom-start" :width="400" title="路径介绍" trigger="hover"
:content="scope.row.remark">
<template #reference>
<div>{{ scope.row.remark }}</div>
</template>
</el-popover>
</el-table-column>
<el-table-column align="center" prop="organizationName" label="归属组织" />
<el-table-column #default="scope" align="center" :width="150" prop="state" label="状态">
<img :src="
<el-table-column align="center" prop="organizationName" label="归属组织"/>
<el-table-column #default="scope" align="center" :width="150" prop="state" label="状态">
<img :src="
scope.row.taskStatus === 1
? ongoing
: scope.row.taskStatus === 2
@@ -81,243 +82,220 @@
: scope.row.taskStatus === 0
? nostarted
: null
" style="width: 99px; height: 99px" />
</el-table-column>
</el-table>
</div>
</div>
<!-- :src="{ 0: nostarted, 1: completed, 2: ongoing }[scope.row.status]"-->
<!-- 路径列表-->
<!-- 路径详情图 -->
<div :style="{ display: showmapdetail ? 'flex' : 'none' }" class="mapdetail">
<div v-for="(item, i) in detail?.rows" :key="i">
<img :src="useImage(`222_0${i + 2}.png`)" />
</div>
<!-- <div class="modal"-->
<!-- style="width: calc(100% - 168px); height: 525px;background-image: url('../../src/assets/image/mapdetail.png');background-size: 100%;background-repeat: no-repeat;">-->
<!-- </div>-->
</div>
<!-- 路径详情图 -->
</div>
</div>
" style="width: 99px; height: 99px"/>
</el-table-column>
</el-table>
</div>
</div>
<!-- :src="{ 0: nostarted, 1: completed, 2: ongoing }[scope.row.status]"-->
<!-- 路径列表-->
<!-- 路径详情图 -->
<div :style="{ display: showmapdetail ? 'flex' : 'none' }" class="mapdetail">
<PathDetailImage img="https://u-pre.boe.com/upload/路径图背景-1671015331292.png" :detail="detail"></PathDetailImage>
</div>
<!-- 路径详情图 -->
</div>
</div>
</template>
<script setup>
import { reactive, toRefs, ref, onMounted, computed } from "vue";
import {computed, ref} from "vue";
import nostarted from "../../assets/image/nostarted.png";
import completed from "../../assets/image/completed.png";
import ongoing from "../../assets/image/ongoing.png";
import { boeRequest, request, usePage, useRequest } from "@/api/request";
import {
ROUTER_CHAPTER_LIST,
ROUTER_LIST,
ROUTER_UNCOMPLETE_LIST,
} from "@/api/api";
import { useImage } from "@/api/utils";
import { useRouter } from "vue-router";
import {usePage} from "@/api/request";
import {ROUTER_LIST,} from "@/api/api";
import {useRouter} from "vue-router";
import store from "@/store";
import PathDetailImage from "@/components/PathDetailImage.vue";
const detail = ref();
const showmapdetail = ref(false);
const currentStageId = ref();
const userInfo = computed(() => store.state.userInfo);
const { data } = usePage(ROUTER_LIST, { pageSize: 60 });
console.log("datadata", data);
const {data} = usePage(ROUTER_LIST, {pageSize: 60});
const router = useRouter();
const returnclick = () => {
router.back();
router.back();
};
// const {unCompleteTaskList} = useRequest(ROUTER_UNCOMPLETE_LIST, {});
const state = reactive({
showmapdetail: false,
});
const { showmapdetail } = toRefs(state);
const returnfun = () => {
state.showmapdetail = false;
showmapdetail.value = false;
};
async function gofun({ routerId, name: routerName }) {
// console.log(routerId)
// const data = await request(ROUTER_CHAPTER_LIST, {stuChapterListVo: {routerId}})
// detail.value = data.data
// state.showmapdetail = true;
// router.push({path: "/pathdetails", query: {routerId}});
import.meta.env.MODE === "development"
? router.push({
path: "/pathdetails",
query: { routerId, routerName },
})
: window.open(
`${import.meta.env.VITE_BOE_PATH_DETAIL_URL}/pathdetails&params=${encodeURIComponent(
`routerId=${routerId}&routerName=${routerName}`
)}`
);
async function gofun(e) {
detail.value = e
showmapdetail.value = true;
}
function toUnTask() {
}
function toUnTask() { }
</script>
<style lang="scss">
#app div:nth-child(1) {
// background: rgba(0, 0, 0, 0) !important;
// background: rgba(0, 0, 0, 0) !important;
}
.modal {}
.modal {
}
.modal:after {
content: "";
content: "";
}
.learnpath {
width: 100%;
min-height: 800px;
//border-radius: 8px;
background-color: rgba(255, 255, 255, 1);
display: flex;
width: 100%;
min-height: 800px;
//border-radius: 8px;
background-color: rgba(255, 255, 255, 1);
display: flex;
.content {
width: 100%;
// flex: 1;
margin-top: 43px;
.content {
width: 100%;
// flex: 1;
margin-top: 43px;
position: relative;
// background-color: pink;
.title {
display: flex;
justify-content: space-between;
align-items: center;
margin-left: 53px;
margin-right: 54px;
}
// background-color: pink;
.title {
display: flex;
justify-content: space-between;
align-items: center;
margin-left: 53px;
margin-right: 54px;
}
.title .titleL {
display: flex;
align-items: center;
}
.title .titleL {
display: flex;
align-items: center;
}
.title .titleL .text {
font-size: 18px;
font-weight: bold;
color: #333333;
line-height: 24px;
margin-right: 26px;
}
.title .titleL .text {
font-size: 18px;
font-weight: bold;
color: #333333;
line-height: 24px;
margin-right: 26px;
}
.title .titleL .info {
display: flex;
// align-items: center;
font-size: 14px;
font-weight: 400;
color: #387df7;
}
.title .titleL .info {
display: flex;
// align-items: center;
font-size: 14px;
font-weight: 400;
color: #387df7;
}
.title .titleR {
width: 157px;
height: 48px;
border: 2px solid #0060ff;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
font-size: 16px;
font-weight: bold;
color: #0060ff;
}
.title .titleR {
width: 157px;
height: 48px;
border: 2px solid #0060ff;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
font-size: 16px;
font-weight: bold;
color: #0060ff;
}
.head {
// height: 50px;
background: #f9f9f9;
margin-top: 50px;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 14px;
font-weight: 500;
color: #333333;
margin-left: 53px;
margin-right: 54px;
width: calc(100% - 107px);
// min-width: 770px;
overflow-x: auto;
.head {
// height: 50px;
background: #f9f9f9;
margin-top: 50px;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 14px;
font-weight: 500;
color: #333333;
margin-left: 53px;
margin-right: 54px;
width: calc(100% - 107px);
// min-width: 770px;
overflow-x: auto;
.el-table th.el-table__cell {
background: rgba(249, 249, 249, 1);
color: rgba(51, 51, 51, 1);
font-size: 14px;
font-weight: 500;
}
.el-table th.el-table__cell {
background: rgba(249, 249, 249, 1);
color: rgba(51, 51, 51, 1);
font-size: 14px;
font-weight: 500;
}
.el-table .cell {
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
word-break: break-all;
}
.el-table .cell {
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
word-break: break-all;
}
.el-table__row {
height: 231px;
font-size: 14px;
color: rgba(102, 102, 102, 1);
font-weight: 500;
}
}
.el-table__row {
height: 231px;
font-size: 14px;
color: rgba(102, 102, 102, 1);
font-weight: 500;
}
}
.mapdetail {
width: calc(100% - 107px);
height: 577px;
background: rgba(242, 245, 247, 0.6);
margin-top: 26px;
border-radius: 8px;
margin-left: 53px;
margin-right: 54px;
display: flex;
align-items: center;
justify-content: center;
}
}
.mapdetail {
width: calc(100% - 107px);
min-height: 577px;
background: rgba(242, 245, 247, 0.6);
margin-top: 26px;
border-radius: 8px;
margin-left: 53px;
margin-right: 54px;
display: flex;
align-items: center;
justify-content: center;
}
}
}
.lppopover {
.finish {
padding-left: 27px;
padding-right: 18px;
margin-top: 15px;
margin-bottom: 17px;
position: relative;
display: flex;
align-items: center;
}
.finish {
padding-left: 27px;
padding-right: 18px;
margin-top: 15px;
margin-bottom: 17px;
position: relative;
display: flex;
align-items: center;
}
.text {
font-size: 16px;
font-weight: 800;
color: #333333;
margin-left: 8px;
}
.text {
font-size: 16px;
font-weight: 800;
color: #333333;
margin-left: 8px;
}
.box {
width: 59px;
height: 10px;
background-color: rgba(36, 120, 255, 0.15);
position: absolute;
left: 50px;
top: 15px;
}
.box {
width: 59px;
height: 10px;
background-color: rgba(36, 120, 255, 0.15);
position: absolute;
left: 50px;
top: 15px;
}
.tasks {
width: 405px;
height: 52px;
display: flex;
align-items: center;
justify-content: space-between;
margin-left: 28px;
cursor: pointer;
}
.tasks {
width: 405px;
height: 52px;
display: flex;
align-items: center;
justify-content: space-between;
margin-left: 28px;
cursor: pointer;
}
.box-item {
width: 200px;
margin-top: 10px;
}
width: 200px;
margin-top: 10px;
}
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -1,17 +1,15 @@
<template>
<div class="surveydetail" style="padding: 30px">
<!-- 面包屑导航 -->
<div
style="display: flex; align-items: center; justify-content: space-between"
>
<div class="crumb">
<div>{{ pName }}</div>
<div style="margin-left: 6px; margin-right: 6px">/</div>
<div>{{ sName }}</div>
<div style="margin-left: 6px; margin-right: 6px">/</div>
<div style="font-weight: 700; font-size: 16px">评估详情</div>
</div>
<!--
<div class="surveydetail" style="padding: 30px">
<!-- 面包屑导航 -->
<div style="display: flex; align-items: center; justify-content: space-between">
<div class="crumb">
<div>{{ pName }}</div>
<div style="margin-left: 6px; margin-right: 6px">/</div>
<div>{{ sName }}</div>
<div style="margin-left: 6px; margin-right: 6px">/</div>
<div style="font-weight: 700; font-size: 16px">评估详情</div>
</div>
<!--
<div class="prevnext">
<div class="prev">
<img
@@ -44,164 +42,115 @@
return a[0].orderNumber - b[0].orderNumber
}) }} -->
<div
class="question"
v-for="
(value, index) in formateArr([data.assessmentEssayQuestionDtoList,data.assessmentMultipleChoiceDtoList,data.assessmentScoringQuestionDtoList,data.assessmentSingleChoiceDtoList]).sort((a,b)=>{
return a[0].orderNumber - b[0].orderNumber
}) "
:key="index"
:style="{ 'margin-top': index === 0 ? '57px' : '41px' }"
>
<div v-if="value[0].questionType=='4'">
<div
class="question"
v-for="(value, index) in data.assessmentScoringQuestionDtoList"
:key="index"
:style="{ 'margin-top': index === 0 ? '57px' : '41px' }"
>
<div class="text">{{ value.assessmentScTitle }}</div>
<div class="answer">
<div class="answerL">完全没用</div>
<div class="answerC">
<div
class="answerCitem"
v-for="(item, key) in Array.from(
{ length: value.assessmentMaxScore },
(k, i) => i
)"
:key="key"
:style="{
'margin-left': key === 0 ? '15px' : '10px',
background:
value.selectAnswer === item
? 'rgba(86, 163, 249, 1)'
: 'rgba(86, 163, 249, 0)',
color:
value.selectAnswer === item
? '#fff'
: 'rgba(86, 163, 249, 1)',
}"
@click="
() => {
if (data.isSubmit) {
return;
}
value.selectAnswer = item;
}
"
>
<div>{{ item + 1 }}</div>
</div>
</div>
<div class="answerR">非常有帮助/启发</div>
</div>
</div>
</div>
<div class="question" v-for="
(value, index) in formateArr([data.assessmentEssayQuestionDtoList, data.assessmentMultipleChoiceDtoList, data.assessmentScoringQuestionDtoList, data.assessmentSingleChoiceDtoList]).sort((a, b) => {
return a[0].orderNumber - b[0].orderNumber
}) " :key="index" :style="{ 'margin-top': index === 0 ? '57px' : '41px' }">
<div v-if="value[0].questionType == '4'">
<div class="question" v-for="(value, index) in data.assessmentScoringQuestionDtoList" :key="index"
:style="{ 'margin-top': index === 0 ? '57px' : '41px' }">
<div class="text">{{ value.assessmentScTitle }}</div>
<div class="answer">
<div class="answerL">完全没用</div>
<div class="answerC">
<div class="answerCitem" v-for="(item, key) in Array.from(
{ length: value.assessmentMaxScore },
(k, i) => i
)" :key="key" :style="{
'margin-left': key === 0 ? '15px' : '10px',
background:
value.selectAnswer === item
? 'rgba(86, 163, 249, 1)'
: 'rgba(86, 163, 249, 0)',
color:
value.selectAnswer === item
? '#fff'
: 'rgba(86, 163, 249, 1)',
}" @click="
() => {
if (data.isSubmit) {
return;
}
value.selectAnswer = item;
}
">
<div>{{ item + 1 }}</div>
</div>
</div>
<div class="answerR">非常有帮助/启发</div>
</div>
</div>
</div>
<div v-else-if="value[0].questionType=='1'">
<div
class="question"
style="margin-top: 41px"
v-if="
data.assessmentSingleChoiceDtoList &&
data.assessmentSingleChoiceDtoList.length
"
>
<div class="text">
{{ data.assessmentSingleChoiceDtoList[0]?.singleStemName }}
</div>
<div
v-for="(value, index) in data.assessmentSingleChoiceDtoList"
:key="index"
style="display: flex; align-items: center"
:style="{
'margin-top': index === 0 ? '29px' : '22px',
cursor: 'pointer',
}"
@click="
() => {
if (data.isSubmit) {
return;
}
data.assessmentSingleChoiceDtoList.forEach((e) => {
e.select = false;
});
value.select = true;
}
"
>
<img
style="width: 19px; height: 18px; cursor: pointer"
:src="value.select ? checkbox : checkbox2"
/>
<div class="people">{{ value.singleOptionName }}</div>
</div>
</div>
</div>
<div v-else-if="value[0].questionType == '1'">
<div class="question" style="margin-top: 41px" v-if="
data.assessmentSingleChoiceDtoList &&
data.assessmentSingleChoiceDtoList.length
">
<div class="text">
{{ data.assessmentSingleChoiceDtoList[0]?.singleStemName }}
</div>
<div v-for="(value, index) in data.assessmentSingleChoiceDtoList" :key="index"
style="display: flex; align-items: center" :style="{
'margin-top': index === 0 ? '29px' : '22px',
cursor: 'pointer',
}" @click="
() => {
if (data.isSubmit) {
return;
}
data.assessmentSingleChoiceDtoList.forEach((e) => {
e.select = false;
});
value.select = true;
}
">
<img style="width: 19px; height: 18px; cursor: pointer" :src="value.select ? checkbox : checkbox2" />
<div class="people">{{ value.singleOptionName }}</div>
</div>
</div>
</div>
<div v-else-if="value[0].questionType=='2'">
<div
class="question"
style="margin-top: 41px"
v-if="
data.assessmentMultipleChoiceDtoList &&
data.assessmentMultipleChoiceDtoList.length
"
>
<div class="text">
{{ data.assessmentMultipleChoiceDtoList[0]?.multipleStemName }}
</div>
<div
v-for="(value, index) in data.assessmentMultipleChoiceDtoList"
:key="index"
style="display: flex; align-items: center"
:style="{
'margin-top': index === 0 ? '29px' : '22px',
cursor: 'pointer',
}"
@click="
() => {
if (data.isSubmit) {
return;
}
value.select = !value.select;
}
"
>
<img
style="width: 19px; height: 18px; cursor: pointer"
:src="value.select ? checkbox : checkbox2"
/>
<div class="people">{{ value.multipleOptionName }}</div>
</div>
</div>
</div>
<div v-else-if="value[0].questionType == '2'">
<div class="question" style="margin-top: 41px" v-if="
data.assessmentMultipleChoiceDtoList &&
data.assessmentMultipleChoiceDtoList.length
">
<div class="text">
{{ data.assessmentMultipleChoiceDtoList[0]?.multipleStemName }}
</div>
<div v-for="(value, index) in data.assessmentMultipleChoiceDtoList" :key="index"
style="display: flex; align-items: center" :style="{
'margin-top': index === 0 ? '29px' : '22px',
cursor: 'pointer',
}" @click="
() => {
if (data.isSubmit) {
return;
}
value.select = !value.select;
}
">
<img style="width: 19px; height: 18px; cursor: pointer" :src="value.select ? checkbox : checkbox2" />
<div class="people">{{ value.multipleOptionName }}</div>
</div>
</div>
</div>
<div v-else-if="value[0].questionType=='3'">
<div
class="question"
style="margin-top: 41px"
v-for="(item, i) in data.assessmentEssayQuestionDtoList"
:key="i"
>
<div class="text">{{ item.assessmentQaTitle }}</div>
<div style="width: 713px; margin-top: 31px; position: relative">
<el-input
v-model="item.content"
:autosize="{ minRows: 5, maxRows: 5 }"
resize="none"
maxlength="200"
type="textarea"
:readonly="!!data.isSubmit"
/>
<div class="words">{{ item.content?.length || 0 }}/200</div>
</div>
</div>
</div>
</div>
<div v-else-if="value[0].questionType == '3'">
<div class="question" style="margin-top: 41px" v-for="(item, i) in data.assessmentEssayQuestionDtoList"
:key="i">
<div class="text">{{ item.assessmentQaTitle }}</div>
<div style="width: 713px; margin-top: 31px; position: relative">
<el-input v-model="item.content" :autosize="{ minRows: 5, maxRows: 5 }" resize="none" maxlength="200"
type="textarea" :readonly="!!data.isSubmit" />
<div class="words">{{ item.content?.length || 0 }}/200</div>
</div>
</div>
</div>
</div>
<!-- <div
<!-- <div
class="question"
v-for="(value, index) in data.assessmentScoringQuestionDtoList"
:key="index"
@@ -339,42 +288,39 @@
<div class="words">{{ item.content?.length || 0 }}/200</div>
</div>
</div> -->
<div
style="display: flex; justify-content: center"
v-if="
data.assessmentEssayQuestionDtoList?.length ||
data.assessmentMultipleChoiceDtoList?.length ||
data.assessmentSingleChoiceDtoList?.length ||
data.assessmentScoringQuestionDtoList?.length
"
>
<div
class="submit"
@click="submit"
:style="{ background: data.isSubmit ? '#999' : '#2478ff' }"
>
提交
</div>
</div>
</div>
</div>
<!-- 基本信息 -->
<!-- todo 测评页面 没有接口-->
</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>
</span>
</template>
</el-dialog>
<div style="display: flex; justify-content: center" v-if="
data.assessmentEssayQuestionDtoList?.length ||
data.assessmentMultipleChoiceDtoList?.length ||
data.assessmentSingleChoiceDtoList?.length ||
data.assessmentScoringQuestionDtoList?.length
">
<div class="submit" @click="submit" :style="{ background: data.isSubmit ? '#999' : '#2478ff' }">
提交
</div>
</div>
</div>
</div>
<!-- 基本信息 -->
<!-- todo 测评页面 没有接口-->
</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>
</span>
</template>
</el-dialog>
</template>
<script setup>
import checkbox from "@/assets/image/checkbox.png";
@@ -383,226 +329,243 @@ import { useRoute, useRouter } from "vue-router/dist/vue-router";
import { request, usePage, useRequest } from "@/api/request";
import { ASSESSMENT_QUERY, ASSESSMENT_SUBMIT } from "@/api/api";
import { ElMessage } from "element-plus";
import { ref} from "vue";
import { ref } from "vue";
const {
query: { courseId, id: taskId, type, pName, sName },
query: { courseId, id: taskId, type, pName, sName, chapterOrStageId },
} = useRoute();
const router = useRouter();
const returnclick = () => {
router.back();
router.back();
};
// 数组去空对象
function formateArr(arr1) {
console.log(arr1,arr1[0],arr1[0].length)
let newarr = []
for(let i=0;i<arr1.length;i++){
if(arr1[i].length!==0){
newarr.push(arr1[i])
}
}
return newarr
console.log(arr1, arr1[0], arr1[0].length)
let newarr = []
for (let i = 0; i < arr1.length; i++) {
if (arr1[i].length !== 0) {
newarr.push(arr1[i])
}
}
return newarr
}
const { data } = useRequest(ASSESSMENT_QUERY(courseId), { id: courseId });
console.log('我是需要排序得题目', data )
const { data } = useRequest(ASSESSMENT_QUERY(courseId), { id: courseId, type, chapterOrStageId, targetId: taskId });
console.log('我是需要排序得题目', data)
function goHome() {
}
const centerDialogVisible =ref(false);
const open=()=>{
centerDialogVisible.value = true
const centerDialogVisible = ref(false);
const open = () => {
centerDialogVisible.value = true
};
function submit() {
if (data.value.isSubmit) {
return;
}
console.log("data.value",data.value);
let list1 = data.value.assessmentEssayQuestionDtoList;
if(list1 &&list1.length > 0){
list1.forEach((item) => {
if(item && !item.content){
return ElMessage.warning("您有未填写的评估题干");
}
})
}
let list2 = data.value.assessmentScoringQuestionDtoList;
if(list2 &&list2.length > 0){
list2.forEach((item) => {
if(item && !item.selectAnswer){
return ElMessage.warning("您有未填写的评估题干");
}
})
}
let list3 = data.value.assessmentSingleChoiceDtoList;
if(list3 &&list3.length > 0){
let flag = 0;
list3.forEach((item) => {
flag = flag + item.select? 1 : 0;
})
if(flag ==0 ){
return ElMessage.warning("您有未填写的评估题干");
}
}
let list4 = data.value.assessmentMultipleChoiceDtoList;
if(list4 &&list4.length > 0){
let flag = 0;
list4.forEach((item) => {
flag = flag + item.select? 1 : 0;
})
if(flag == 0 ){
return ElMessage.warning("您有未填写的评估题干");
}
}
data.value.isSubmit = !data.value.isSubmit;
request(ASSESSMENT_SUBMIT, {
assessmentId: courseId,
taskId,
type,
result: JSON.stringify(data.value),
}).then(() => {
open();
});
if (1 > 0) {
console.log(data)
console.log('我是提交的数据', {
targetId: taskId, // 项目、路径图或开课的Id
chapterOrStageId: chapterOrStageId, // 关卡或者阶段Id 关卡Id不允许为空
assessmentId: courseId,
taskId,
type,
result: JSON.stringify(data.value),
})
}
if (data.value.isSubmit) {
return;
}
console.log("data.value", data.value);
let list1 = data.value.assessmentEssayQuestionDtoList;
if (list1 && list1.length > 0) {
list1.forEach((item) => {
if (item && !item.content) {
return ElMessage.warning("您有未填写的评估题干");
}
})
}
let list2 = data.value.assessmentScoringQuestionDtoList;
if (list2 && list2.length > 0) {
list2.forEach((item) => {
if (item && !item.selectAnswer) {
return ElMessage.warning("您有未填写的评估题干");
}
})
}
let list3 = data.value.assessmentSingleChoiceDtoList;
if (list3 && list3.length > 0) {
let flag = 0;
list3.forEach((item) => {
flag = flag + item.select ? 1 : 0;
})
if (flag == 0) {
return ElMessage.warning("您有未填写的评估题干");
}
}
let list4 = data.value.assessmentMultipleChoiceDtoList;
if (list4 && list4.length > 0) {
let flag = 0;
list4.forEach((item) => {
flag = flag + item.select ? 1 : 0;
})
if (flag == 0) {
return ElMessage.warning("您有未填写的评估题干");
}
}
data.value.isSubmit = !data.value.isSubmit;
request(ASSESSMENT_SUBMIT, {
targetId: taskId, // 项目、路径图或开课的Id
chapterOrStageId: chapterOrStageId, // 关卡或者阶段Id 关卡Id不允许为空
assessmentId: courseId,
taskId,
type,
result: JSON.stringify(data.value),
}).then(() => {
open();
});
}
</script>
<style lang="scss">
.surveydetail {
.crumb {
color: #fff;
display: flex;
font-size: 14px;
line-height: 24px;
}
.return {
position: absolute;
right: 10%;
.text {
text-align: center;
display: flex;
flex-direction: row;
align-items: center;
}
}
.prevnext {
display: flex;
align-items: center;
font-size: 14px;
font-weight: 500;
color: #ffffff;
.crumb {
color: #fff;
display: flex;
font-size: 14px;
line-height: 24px;
}
.prev {
display: flex;
align-items: center;
cursor: pointer;
}
}
.return {
position: absolute;
right: 10%;
.title {
font-size: 20px;
font-weight: 800;
color: #ffffff;
line-height: 24px;
margin-top: 17px;
margin-left: -11px;
}
.text {
text-align: center;
display: flex;
flex-direction: row;
align-items: center;
}
}
.bascinfo {
width: 100%;
min-height: 1032px;
margin-top: 24px;
background: #ffffff;
border-radius: 8px;
display: flex;
flex-direction: column;
align-items: center;
.prevnext {
display: flex;
align-items: center;
font-size: 14px;
font-weight: 500;
color: #ffffff;
.question .text {
font-size: 16px;
font-weight: 500;
color: #333330;
}
.prev {
display: flex;
align-items: center;
cursor: pointer;
}
}
.question .answer {
margin-top: 30px;
display: flex;
align-items: center;
font-size: 14px;
font-weight: 500;
color: #56a3f9;
}
.title {
font-size: 20px;
font-weight: 800;
color: #ffffff;
line-height: 24px;
margin-top: 17px;
margin-left: -11px;
}
.question .answer .answerC {
width: 540px;
height: 73px;
border: 1px solid #d7e5fd;
border-radius: 8px;
display: flex;
align-items: center;
margin-left: 11px;
margin-right: 11px;
// justify-content: center;
.answerCitem {
width: 40px;
height: 40px;
border: 1px solid #56a3f9;
border-radius: 8px;
font-size: 14px;
font-weight: 400;
color: #ffffff;
display: flex;
align-items: center;
justify-content: center;
margin-left: 10px;
cursor: pointer;
}
}
.bascinfo {
width: 100%;
min-height: 1032px;
margin-top: 24px;
background: #ffffff;
border-radius: 8px;
display: flex;
flex-direction: column;
align-items: center;
.question .people {
font-size: 14px;
font-weight: 500;
color: #333330;
margin-left: 15px;
}
.question .text {
font-size: 16px;
font-weight: 500;
color: #333330;
}
.question .words {
position: absolute;
right: 15px;
bottom: 5px;
font-size: 14px;
font-weight: 500;
color: #333330;
}
.question .answer {
margin-top: 30px;
display: flex;
align-items: center;
font-size: 14px;
font-weight: 500;
color: #56a3f9;
}
.question .el-textarea__inner {
border-radius: 8px;
background-color: rgba(245, 246, 247, 1);
}
.question .answer .answerC {
width: 540px;
height: 73px;
border: 1px solid #d7e5fd;
border-radius: 8px;
display: flex;
align-items: center;
margin-left: 11px;
margin-right: 11px;
.submit {
width: 126px;
height: 46px;
background: #2478ff;
box-shadow: 0px 1px 8px 0px rgba(56, 125, 247, 0.7);
border-radius: 4px;
font-size: 16px;
font-weight: 800;
color: #ffffff;
line-height: 24px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
margin-top: 39px;
margin-bottom: 30px;
}
}
// justify-content: center;
.answerCitem {
width: 40px;
height: 40px;
border: 1px solid #56a3f9;
border-radius: 8px;
font-size: 14px;
font-weight: 400;
color: #ffffff;
display: flex;
align-items: center;
justify-content: center;
margin-left: 10px;
cursor: pointer;
}
}
.question .people {
font-size: 14px;
font-weight: 500;
color: #333330;
margin-left: 15px;
}
.question .words {
position: absolute;
right: 15px;
bottom: 5px;
font-size: 14px;
font-weight: 500;
color: #333330;
}
.question .el-textarea__inner {
border-radius: 8px;
background-color: rgba(245, 246, 247, 1);
}
.submit {
width: 126px;
height: 46px;
background: #2478ff;
box-shadow: 0px 1px 8px 0px rgba(56, 125, 247, 0.7);
border-radius: 4px;
font-size: 16px;
font-weight: 800;
color: #ffffff;
line-height: 24px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
margin-top: 39px;
margin-bottom: 30px;
}
}
}
</style>