Merge remote-tracking branch 'origin/develop' into develop

# Conflicts:
#	src/views/roadmap/LearnPath.vue
This commit is contained in:
yuping
2022-12-22 12:54:33 +08:00
7 changed files with 1782 additions and 1842 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -7,7 +7,7 @@
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div
<!-- <div
style="
background: #0078fc;
height: 150px;
@@ -16,7 +16,7 @@
top: 0;
z-index: 1;
"
></div>
></div> -->
<div id="container">
<!-- <div id="nav">
<router-link

View File

@@ -1,14 +1,6 @@
<template>
<el-upload
:file-list="files"
:action="FILE_UPLOAD"
method="POST"
:show-file-list="false"
:on-change="handleChange"
:limit="max"
ref="imageRef"
:on-exceed="exceed"
>
<el-upload :file-list="files" :action="FILE_UPLOAD" method="POST" :show-file-list="false" :on-change="handleChange"
:limit="max" ref="imageRef" :on-exceed="exceed">
<template #trigger>
<div>
<slot></slot>
@@ -17,9 +9,9 @@
</el-upload>
</template>
<script setup>
import {FILE_UPLOAD} from "@/api/api";
import {defineProps, ref, watch} from "vue";
import {ElMessage} from "element-plus";
import { FILE_UPLOAD } from "@/api/api";
import { defineProps, ref, watch } from "vue";
import { ElMessage } from "element-plus";
const props = defineProps({
value: [],
@@ -58,6 +50,11 @@ function handleChange(e) {
function remove(i) {
files.value.splice(i, 1)
console.log(imageRef)
}
function clearFiles() {
imageRef.value.clearFiles();
}
function reUpload(i) {
@@ -75,6 +72,6 @@ function abort(i) {
}
defineExpose({reUpload, remove})
defineExpose({ reUpload, remove, clearFiles })
</script>

View File

@@ -166,7 +166,11 @@
<div class="tag3" style="margin-left: 11px">作业</div>
</div>
</div>
<div class="submit" @click="toWork" v-if="data.workDto?.workId">
<div v-if="isEndSubMitWork()" class="submit" style="background: #999">
已结束
</div>
<div v-else class="submit" @click="toWork" v-if="data.workDto?.workId">
交作业
</div>
</div>
@@ -246,7 +250,7 @@ import {
} from "@/api/api";
import { useRoute, useRouter } from "vue-router";
import { useUserInfo } from "@/api/utils";
import { ElMessage } from "element-plus";
import { ElMessage, messageConfig } from "element-plus";
const router = useRouter();
const returnclick = () => {
router.back();
@@ -365,6 +369,19 @@ function toSurvery() {
});
}
function isEndSubMitWork() {
if(data.value.workDto.submitEndTime){
let date1 = new Date(data.value.workDto.submitEndTime).getTime();
let date2 = new Date().getTime();
console.log(date1, date2, date1>date2, data.value.workDto.submitEndTime)
if(date1<date2){
return true;
}
}else{
return false;
}
}
function toWork() {
router.push({
path: "/homeworkpage",

View File

@@ -17,12 +17,8 @@
<div class="return">
<div style="display: flex" @click="returnclick">
<img
class="img2"
style="margin-right: 22px"
src="../../assets/image/return.png"
/>
<div class="text">返回</div>
<img class="img2" style="margin-right: 22px;cursor: pointer;" src="../../assets/image/return.png" />
<div style="cursor: pointer;" class="text">返回</div>
</div>
</div>
</div>
@@ -34,19 +30,14 @@
<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>
@@ -58,38 +49,22 @@
</div>
</div>
<UploadImg v-model:value="fileList" ref="uploadRef">
<button
class="shangchuan"
style="cursor: pointer"
>
<button class="shangchuan" style="cursor: pointer">
上传
</button>
</UploadImg>
<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: "正在上传",
@@ -100,10 +75,7 @@
}[file.status]
}}</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)">
@@ -132,24 +104,18 @@
</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 class="join">
<el-input
v-model="sbValue.content"
:autosize="{ minRows: 12.5, maxRows: 12.5 }"
resize="none"
type="textarea"
/>
<el-input v-model="sbValue.content" :autosize="{ minRows: 12.5, maxRows: 12.5 }" resize="none"
type="textarea" />
</div>
<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>
@@ -158,11 +124,8 @@
<div class=""></div>
<div class="title" style="margin-top: 0px">
<img
style="width: 20px; height: 20px"
src="../../assets/image/yuan.png"
/>
<div class="text">历史纪录</div>
<img style="width: 20px; height: 20px" src="../../assets/image/yuan.png" />
<div class="text">历史记录</div>
<div class="box"></div>
</div>
@@ -172,29 +135,27 @@
<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="content1">{{ value.createTime }}</div>
<div class="content2">
<div >
<div>
{{ value.workUploadContent }}
</div>
</div>
<div class="content3">
<div >
<div>
<span style="margin-left: 10px">
<el-link target="_blank" type="primary" :href="value.workUploadAddress?.split(',')[0] || ''">{{value.workUploadAddress?.split(',')[0].split('/').at(-1)|| ''}}</el-link>
<el-link target="_blank" type="primary" :href="value.workUploadAddress?.split(',')[0] || ''">{{
value.workUploadAddress?.split(',')[0].split('/').at(-1) ||
''
}}</el-link>
</span>
</div>
</div>
@@ -205,10 +166,7 @@
</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>
@@ -218,7 +176,7 @@
data?.submitStartTime
}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
data?.submitEndTime
}}
}}
</div>
<div class="endtime clearfix">
<div class="endtimetext">
@@ -227,30 +185,21 @@
parseInt(
dayjs(data?.submitEndTime).diff(dayjs(), "minute") / 60
)
}}</span
>&nbsp;&nbsp; 小时&nbsp;&nbsp;<span class="te">{{
}}</span>&nbsp;&nbsp; 小时&nbsp;&nbsp;<span class="te">{{
dayjs(data?.submitEndTime).diff(dayjs(), "minute") % 60
}}</span
>&nbsp;&nbsp;分钟
}}</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>
@@ -263,8 +212,12 @@
</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>
@@ -273,7 +226,7 @@
</template>
<script setup>
import {computed, reactive, ref, toRefs} from "vue";
import { computed, reactive, ref, toRefs } from "vue";
import { request, useRequest } from "@/api/request";
import {
TASK_WORK_COMMIT,
@@ -286,13 +239,13 @@ import { useRouter } from "vue-router";
import UploadImg from "@/components/img/UploadImg.vue";
import FileTypeImg from "@/components/FileTypeImg.vue";
import { useRoute } from "vue-router/dist/vue-router";
import {ElMessage} from "element-plus";
import { ElMessage } from "element-plus";
//import AlertSuccess from "@/components/alert/AlertSuccess.vue";
const fileList = ref([]);
const uploadRef = ref();
const centerDialogVisible =ref(false);
const centerDialogVisible = ref(false);
const sbValue = ref({
content: "",
attach: "",
@@ -311,18 +264,21 @@ const { data: submitList } = useRequest(TASK_WORK_SUBMIT_LIST, {
workerId: workId,
});
const open=()=>{
const open = () => {
centerDialogVisible.value = true
};
const showFileList = computed(()=>{
const showFileList = computed(() => {
return fileList.value.length
})
const handleClick = () => {
if(!sbValue.value.content){
console.log(fileList.value, uploadRef.value)
if (!sbValue.value.content) {
if (fileList.value.length == 0) {
return ElMessage.warning("请输入作业内容");
}
}
request(TASK_WORK_COMMIT, {
projectOrRouterLogo: type,
workUploadContent: sbValue.value.content,
@@ -334,11 +290,17 @@ const handleClick = () => {
console.log(res);
submitList.value.unshift(res.data);
open();
});
sbValue.value.content = "";
fileList.value = [];
remove(0);
clearFiles();
});
};
function clearFiles() {
uploadRef.value.clearFiles();
}
function remove(i) {
uploadRef.value.remove(i);
}
@@ -358,9 +320,11 @@ function reUpload(i) {
line-height: 24px;
position: relative;
}
.return {
position: absolute;
right: 10%;
.text {
text-align: center;
display: flex;
@@ -368,6 +332,7 @@ function reUpload(i) {
align-items: center;
}
}
.preNext {
position: absolute;
right: 0px;
@@ -700,18 +665,20 @@ function reUpload(i) {
white-space: nowrap;
}
.content2{
.content2 {
margin-top: 14px;
margin-left: 20px;
width:460px;;
width: 460px;
;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.content3 {
margin-top: 14px;
margin-left: 20px;
width:230px;
width: 230px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@@ -771,27 +738,21 @@ 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 {
@@ -917,22 +878,26 @@ function reUpload(i) {
}
}
}
.el-dialog {
color:black;
color: black;
text-align: center;
font-size: 16px;
.title{
.title {
text-align: center;
}
.dialog-footer{
.back{
.dialog-footer {
.back {
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;
padding: 8px 32px;
border-radius: 4px;
}
.cancel{
.cancel {
background: #387DF7;
border: 0px;
padding: 8px 32px;
@@ -943,6 +908,4 @@ function reUpload(i) {
}
}
}
</style>

View File

@@ -12,29 +12,24 @@
<div class="detailinfo">
<div class="detailL">
<div v-for="(i, k) in data.stageProcessList" :key="k">
<div class="title">
<div v-if="i.stageId == '0' && i.taskProcessList.length == 0"></div>
<div v-else class="title">
<div class="titleL">{{ i.stageName }}</div>
<div class="titleR" :style="{ display: 'flex' }">
<img src="../../assets/image/pathdetails/circle.png" />
<div class="titleRT">进行中</div>
</div>
<div
class="titleR"
:style="{ display: i.status === 2 ? 'flex' : 'none' }"
>
<div class="titleR" :style="{ display: i.status === 2 ? 'flex' : 'none' }">
<img src="../../assets/image/pathdetails/circle2.png" />
<div class="titleRT" style="color: rgba(102, 102, 102, 1)">
未开始
</div>
</div>
</div>
<div
class="course"
v-for="(value, index) in i.taskProcessList.filter(
<div v-if="i.stageId == '0' && i.taskProcessList.length == 0"></div>
<div v-else class="course" v-for="(value, index) in i.taskProcessList.filter(
(e) => !whiteTypes(e.type)
)"
:key="index"
>
)" :key="index">
<div style="width: 70%">
<div class="coursename">{{ value.name }}</div>
<div class="coursetag">
@@ -44,7 +39,6 @@
<div class="tag3" style="margin-right: 11px; margin-top: 16px">
{{ types.typeName[value.type] || "" }}
</div>
<!-- <div-->
<!-- v-for="(item, key) in value.flag"-->
<!-- :key="key"-->
@@ -54,18 +48,11 @@
<!-- {{ item.name }}-->
<!-- </div>-->
</div>
<div
class="progressBox"
:style="{ display: value.status === 1 ? 'block' : 'none' }"
>
<div v-if="value.type == 1" class="progressBox">
<div>当前进度</div>
<div class="progress">
<div style="width: 291px">
<el-progress
:percentage="value.currentRatio"
:show-text="false"
:stroke-width="8"
:color="
<el-progress :percentage="value.currentRatio" :show-text="false" :stroke-width="8" :color="
{
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
@@ -74,27 +61,9 @@
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt(value.currentRatio / 20)]
"
/>
" />
</div>
<div
style="
font-size: 14px;
font-weight: 500;
color: #277aff;
margin-left: 10px;
"
:style="{
color: {
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt(value.currentRatio / 20)],
}"
>
<div style="font-size: 14px;font-weight: 500;color: #277aff;margin-left: 10px;color:#677d86;">
{{ value.currentRatio }}%
</div>
</div>
@@ -168,18 +137,12 @@
<div class="detailRB">
<div class="info">
<div class="title">
<img
style="width: 21px; height: 20px"
src="../../assets/image/pathdetails/info.png"
/>
<img style="width: 21px; height: 20px" src="../../assets/image/pathdetails/info.png" />
<div class="text" style="margin-left: 7px">个人信息</div>
<div class="box"></div>
</div>
<!-- todo #路径详情 个人信息缺少img和介绍-->
<div
class="teacheritem"
:style="{ 'border-bottom': '1px solid rgba(56, 125, 247, 0.2)' }"
>
<div class="teacheritem" :style="{ 'border-bottom': '1px solid rgba(56, 125, 247, 0.2)' }">
<img class="peopleimg" :src="`/upload${userInfo.avatar}`" />
<div style="margin-left: 17px">
<div class="teacherName">
@@ -196,10 +159,7 @@
</div>
<div class="info" style="padding-top: 20px">
<div class="title">
<img
style="width: 18px; height: 17px"
src="../../assets/image/pathdetails/study.png"
/>
<img style="width: 18px; height: 17px" src="../../assets/image/pathdetails/study.png" />
<div class="text" style="margin-left: 9px">学习进度</div>
<div class="box"></div>
</div>
@@ -208,16 +168,12 @@
<div class="ratetext">上次学到:启航班-领导寄语</div>
<div class="ratebtn">继续学习</div>
</div>-->
<div style="margin-top: 16px">
<div class="progressBox">
<div>总进度</div>
<div class="progress">
<div style="width: 291px">
<el-progress
:percentage="parseInt(data.totalProgress * 100)"
:show-text="false"
:stroke-width="8"
<el-progress :percentage="parseInt(data.totalProgress * 100)" :show-text="false" :stroke-width="8"
:color="
{
0: 'rgba(238, 112, 108, 1)',
@@ -227,22 +183,9 @@
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt((data.totalProgress * 100) / 20)]
"
/>
" />
</div>
<div
style="font-size: 14px; font-weight: 500; margin-left: 10px"
:style="{
color: {
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt((data.totalProgress * 100) / 20)],
}"
>
<div style="font-size: 14px; font-weight: 500; margin-left: 10px;color:#677d86;">
{{ parseInt(data.totalProgress * 100) }}%
</div>
</div>
@@ -253,11 +196,8 @@
<div>必修进度</div>
<div class="progress">
<div style="width: 291px">
<el-progress
:percentage="parseInt(data.compulsoryProgress * 100)"
:show-text="false"
:stroke-width="8"
:color="
<el-progress :percentage="parseInt(data.compulsoryProgress * 100)" :show-text="false"
:stroke-width="8" :color="
{
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
@@ -266,27 +206,13 @@
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt((data.compulsoryProgress * 100) / 20)]
"
/>
" />
</div>
<div
style="
<div style="
font-size: 14px;
font-weight: 500;
color: #277aff;
margin-left: 10px;
"
:style="{
color: {
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt((data.compulsoryProgress * 100) / 20)],
}"
>
margin-left: 10px;color:#677d86;">
{{ parseInt(data.compulsoryProgress * 100) }}%
</div>
</div>
@@ -300,7 +226,6 @@
<!-- 详细信息 -->
</div>
</template>
<script setup>
import { computed, reactive, ref } from "vue";
import word from "@/assets/image/file/word.png";
@@ -322,7 +247,6 @@ import {
import { useRoute, useRouter } from "vue-router";
import store from "@/store";
import { ElMessage } from "element-plus";
const {
query: { courseId, projectId },
} = useRoute();
@@ -335,14 +259,11 @@ const { data } = useRequest(PROJECT_PROCESS, {
});
console.log("datadata", data);
const userInfo = computed(() => store.state.userInfo);
const activeName = ref("first");
const handleClick = (tab, event) => {
console.log(tab, event);
};
const path = { 1: "path" };
const types = ref({
typeName: {
1: "在线",
@@ -398,9 +319,64 @@ const types = ref({
13: "/projectdetails",
},
});
function toFinish(d, sName, chapterId) {
console.log("dddddd", d);
// 作业过期判断
if (d.type == 4) {
let date1 = new Date(d.endTime).getTime();
let date2 = new Date().getTime();
if (date1 < date2) {
ElMessage.error("当前作业已结束")
return
}
}
// 直播结束时间
if (d.type == 6) {
let date1 = new Date(d.endTime).getTime();
let date2 = new Date().getTime();
if (date1 < date2) {
ElMessage.error("当前直播已结束")
return
}
}
// 考试 停用
if (d.type == 5) {
if (d.taskStatus == 1 || d.taskStatus == 2) {
ElMessage.error("该任务无法学习,请联系管理员进行替换。")
return
}
}
// 评估 停用
if (d.type == 11) {
if (d.taskStatus == 1 || d.taskStatus == 2) {
ElMessage.error("该任务无法学习,请联系管理员进行替换。")
return
}
}
// 其他活动 结束时间
if (d.type == 9) {
let date1 = new Date(d.endTime).getTime();
let date2 = new Date().getTime();
if (date1 < date2) {
ElMessage.error("当前活动已结束")
return
}
}
// 在线课 停用 -- 暂时没有在线课停用标记
if (d.type == 1) {
if (d.taskStatus == 1 || d.taskStatus == 2) {
ElMessage.error("该任务无法学习,请联系管理员进行替换。")
return
}
}
// 面授课 停用
if (d.type == 2) {
if (d.taskStatus == 1 || d.taskStatus == 2) {
ElMessage.error("该任务无法学习,请联系管理员进行替换。")
return
}
}
if (!types.value.path[d.type]) {
ElMessage.error("暂时未开放");
return;
@@ -438,7 +414,6 @@ function whiteTypes(type) {
return import.meta.env.VITE_TASK_WHITE_TYPE.includes("-" + type + "-");
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss">
.pathdetails {

View File

@@ -5,11 +5,11 @@
<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"/>
<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"/>
<img style="width: 18px; height: 17px; margin-right: 11px" src="../../assets/image/band.png" />
<div style="margin-top: 2px">{{ userInfo.bandDesc }}</div>
</div>
</div>
@@ -60,18 +60,18 @@
<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"/>
<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="name" label="路径名称" />
<el-table-column align="center" prop="introduce" label="路径介绍" #default="scope">
<el-popover placement="top-start" title="路径介绍" trigger="hover" :content="scope.row.remark">
<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 align="center" prop="organizationName" label="归属组织" />
<el-table-column #default="scope" align="center" :width="150" prop="state" label="状态">
<img :src="
scope.row.status === 0
@@ -81,7 +81,7 @@
: scope.row.status === -1
? nostarted
: null
" style="width: 99px; height: 99px"/>
" style="width: 99px; height: 99px" />
</el-table-column>
</el-table>
</div>
@@ -92,7 +92,7 @@
<!-- 路径详情图 -->
<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`)"/>
<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;">-->
@@ -100,40 +100,27 @@
</div>
<!-- 路径详情图 -->
</div>
<!-- <svg width="100%" height="600" xmlns="http://www.w3.org/2000/svg" style="padding:40px">-->
<!-- <defs>-->
<!-- <marker id="arrow" markerHeight="13" markerWidth="13">-->
<!-- <path d="M2,2 L2,10 L10,6 L2,2" stroke="none" fill="#409eff"></path>-->
<!-- </marker>-->
<!-- </defs>-->
<!-- <path d="M105 570 C1000 600 -60 505 890 270" stroke-width="3" stroke="#409eff" fill="none" stroke-linecap="round" stroke-dasharray=".1 5" marker-mid="url(#arrow)" marker-start="url(#arrow)" marker-end="url(#arrow)"></path>-->
<!-- <text x="50" y="550">初级产品经理</text>-->
<!-- <circle cx="90" cy="570" r="10" fill="#fff" stroke-width="5" stroke="#22a000"></circle>-->
<!-- <text x="450" y="400">中级产品经理</text>-->
<!-- <circle cx="490" cy="420" r="10" fill="#fff" stroke-width="5" stroke="#22a000"></circle>-->
<!-- <text x="850" y="250">高级产品经理</text>-->
<!-- <circle cx="890" cy="270" r="10" fill="#fff" stroke-width="5" stroke="#22a000"></circle>-->
<!-- </svg>-->
</div>
</template>
<script setup>
import {reactive, toRefs, ref, onMounted, computed} from "vue";
import { reactive, toRefs, ref, onMounted, computed } 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 { 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 { useImage } from "@/api/utils";
import { useRouter } from "vue-router";
import store from "@/store";
const detail = ref();
const userInfo = computed(() => store.state.userInfo);
const {data} = usePage(ROUTER_LIST, {pageSize: 60});
const { data } = usePage(ROUTER_LIST, { pageSize: 60 });
console.log("datadata", data);
const router = useRouter();
const returnclick = () => {
router.back();
@@ -144,41 +131,38 @@ const returnclick = () => {
const state = reactive({
showmapdetail: false,
});
const {showmapdetail} = toRefs(state);
const { showmapdetail } = toRefs(state);
const returnfun = () => {
state.showmapdetail = false;
};
async function gofun({routerId, name: routerName}) {
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(
// `http://u-pre.boe.com/pc/forward?to=/fe-student/pathdetails&params=${encodeURIComponent(
// `routerId=${routerId}&routerName=${routerName}`
// )}`
// );
}
function toUnTask() {
import.meta.env.MODE === "development"
? router.push({
path: "/pathdetails",
query: { routerId, routerName },
})
: window.open(
`http://u-pre.boe.com/pc/forward?to=/fe-student/pathdetails&params=${encodeURIComponent(
`routerId=${routerId}&routerName=${routerName}`
)}`
);
}
function toUnTask() { }
</script>
<style lang="scss">
//#app div:nth-child(1) {
// background: rgba(0, 0, 0, 0) !important;
//}
.modal {
#app div:nth-child(1) {
// background: rgba(0, 0, 0, 0) !important;
}
.modal {}
.modal:after {
content: "";
}
@@ -331,5 +315,9 @@ function toUnTask() {
margin-left: 28px;
cursor: pointer;
}
.box-item {
width: 200px;
margin-top: 10px;
}
}
</style>