feat:修改学习路径图状态

This commit is contained in:
lixg
2022-12-16 18:20:04 +08:00
parent 7b7fe8568d
commit bc6eac5caf
3 changed files with 242 additions and 225 deletions

View File

@@ -15,6 +15,7 @@
<button class="btn btn02" style="margin-left: 6px"></button> <button class="btn btn02" style="margin-left: 6px"></button>
</div> </div>
</div> </div>
<div @click="returnclick">返回</div>
<!-- 面包屑导航 --> <!-- 面包屑导航 -->
<div class="debateTitle" style="color: #fff"> <div class="debateTitle" style="color: #fff">
作业管理者进阶腾飞班 - 中级管理者作业 作业管理者进阶腾飞班 - 中级管理者作业
@@ -24,7 +25,7 @@
<div class="detail"> <div class="detail">
<div class="detailT"> <div class="detailT">
<div <div
style=" style="
margin-left: 45px; margin-left: 45px;
margin-right: 42px; margin-right: 42px;
position: relative; position: relative;
@@ -33,8 +34,8 @@
> >
<div class="title"> <div class="title">
<img <img
style="width: 20px; height: 20px" style="width: 20px; height: 20px"
src="../../assets/image/yuan.png" src="../../assets/image/yuan.png"
/> />
<div class="text">作业名称</div> <div class="text">作业名称</div>
<div class="box"></div> <div class="box"></div>
@@ -48,52 +49,52 @@
</div> </div>
<UploadImg v-model="fileList" ref="uploadRef"> <UploadImg v-model="fileList" ref="uploadRef">
<button <button
class="shangchuan" class="shangchuan"
style="cursor: pointer" style="cursor: pointer"
@mousemove="showFileList = 1" @mousemove="showFileList = 1"
@mouseout="showFileList = 0" @mouseout="showFileList = 0"
> >
上传 上传
</button> </button>
</UploadImg> </UploadImg>
<div <div
class="uploadDetail" class="uploadDetail"
:style="{ display: showFileList ? 'block' : 'none' }" :style="{ display: showFileList ? 'block' : 'none' }"
@mousemove="showFileList = 1" @mousemove="showFileList = 1"
@mouseout="showFileList = 0" @mouseout="showFileList = 0"
style="padding-top: 60px" style="padding-top: 60px"
> >
<div class="triangle"></div> <div class="triangle"></div>
<div class="square clearfix"> <div class="square clearfix">
<div <div
class="squarecontent1" class="squarecontent1"
v-for="(file, i) in fileList" v-for="(file, i) in fileList"
:key="i" :key="i"
> >
<FileTypeImg <FileTypeImg
v-model="file.name" v-model="file.name"
:style="{ margin: '12px 15px 0 27px' }" :style="{ margin: '12px 15px 0 27px' }"
></FileTypeImg> ></FileTypeImg>
<div class="rarDetail"> <div class="rarDetail">
<span class="detail1" style="margin-right: 130px"> <span class="detail1" style="margin-right: 130px">
{{ file.name }} {{ file.name }}
</span> </span>
<span class="detail2" style="margin-right: 10px" <span class="detail2" style="margin-right: 10px"
>{{ file.percentage }}%</span >{{ file.percentage }}%</span
> >
<span class="detail1">{{ <span class="detail1">{{
{ {
ready: "正在上传", ready: "正在上传",
abort: "暂停", abort: "暂停",
uploading: "正在上传", uploading: "正在上传",
fail: "上传失败", fail: "上传失败",
success: "上传成功", success: "上传成功",
}[file.status] }[file.status]
}}</span> }}</span>
<div class="progress"> <div class="progress">
<div <div
class="progressinner" class="progressinner"
:style="{ width: `${(291 * file.percentage) / 100}px` }" :style="{ width: `${(291 * file.percentage) / 100}px` }"
></div> ></div>
</div> </div>
</div> </div>
@@ -124,8 +125,8 @@
<div class="title"> <div class="title">
<img <img
style="width: 20px; height: 20px" style="width: 20px; height: 20px"
src="../../assets/image/yuan.png" src="../../assets/image/yuan.png"
/> />
<div class="text">作业内容</div> <div class="text">作业内容</div>
<div class="box"></div> <div class="box"></div>
@@ -133,10 +134,10 @@
<div class="join"> <div class="join">
<el-input <el-input
v-model="sbValue.content" v-model="sbValue.content"
:autosize="{ minRows: 12.5, maxRows: 12.5 }" :autosize="{ minRows: 12.5, maxRows: 12.5 }"
resize="none" resize="none"
type="textarea" type="textarea"
/> />
</div> </div>
<div style="display: flex; justify-content: center"> <div style="display: flex; justify-content: center">
@@ -147,8 +148,8 @@
<div class="title" style="margin-top: 0px"> <div class="title" style="margin-top: 0px">
<img <img
style="width: 20px; height: 20px" style="width: 20px; height: 20px"
src="../../assets/image/yuan.png" src="../../assets/image/yuan.png"
/> />
<div class="text">历史纪录</div> <div class="text">历史纪录</div>
<div class="box"></div> <div class="box"></div>
@@ -160,10 +161,10 @@
<div class="content2">作业内容</div> <div class="content2">作业内容</div>
</div> </div>
<div <div
v-for="(value, index) in submitList" v-for="(value, index) in submitList"
:key="index" :key="index"
class="historytitle2" class="historytitle2"
:style="{ :style="{
'border-bottom': 'border-bottom':
index === submitList.length - 1 index === submitList.length - 1
? '1px solid rgba(215, 229, 253, 0)' ? '1px solid rgba(215, 229, 253, 0)'
@@ -173,7 +174,7 @@
<div class="content1">{{ value.createTime }}</div> <div class="content1">{{ value.createTime }}</div>
<div class="content2"> <div class="content2">
<div <div
style=" style="
width: 95%; width: 95%;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@@ -191,8 +192,8 @@
<div class="right"> <div class="right">
<div class="righttitle"> <div class="righttitle">
<img <img
style="width: 20px; height: 20px" style="width: 20px; height: 20px"
src="../../assets/image/yuan.png" src="../../assets/image/yuan.png"
/> />
<div class="text">截止时间</div> <div class="text">截止时间</div>
<div class="box"></div> <div class="box"></div>
@@ -209,21 +210,21 @@
<div class="endtimetext"> <div class="endtimetext">
距离结束还有&nbsp;&nbsp; 距离结束还有&nbsp;&nbsp;
<span class="te">{{ <span class="te">{{
parseInt( parseInt(
dayjs(data?.submitEndTime).diff(dayjs(), "minute") / 60 dayjs(data?.submitEndTime).diff(dayjs(), "minute") / 60
) )
}}</span }}</span
>&nbsp;&nbsp; 小时&nbsp;&nbsp;<span class="te">{{ >&nbsp;&nbsp; 小时&nbsp;&nbsp;<span class="te">{{
dayjs(data?.submitEndTime).diff(dayjs(), "minute") % 60 dayjs(data?.submitEndTime).diff(dayjs(), "minute") % 60
}}</span }}</span
>&nbsp;&nbsp;分钟 >&nbsp;&nbsp;分钟
</div> </div>
</div> </div>
</div> </div>
<div class="righttitle"> <div class="righttitle">
<img <img
style="width: 20px; height: 20px" style="width: 20px; height: 20px"
src="../../assets/image/yuan.png" src="../../assets/image/yuan.png"
/> />
<div class="text">作业说明</div> <div class="text">作业说明</div>
@@ -232,9 +233,9 @@
<div class="explain clearfix"> <div class="explain clearfix">
<!-- todo #作业任务详情 作业说明是作业要求字段么--> <!-- todo #作业任务详情 作业说明是作业要求字段么-->
<div <div
class="explain1" class="explain1"
style="margin-top: 26px" style="margin-top: 26px"
v-html="data?.workRequirement" v-html="data?.workRequirement"
></div> ></div>
</div> </div>
</div> </div>
@@ -244,8 +245,8 @@
</template> </template>
<script setup> <script setup>
import {reactive, ref, toRefs} from "vue"; import { reactive, ref, toRefs } from "vue";
import {request, useRequest} from "@/api/request"; import { request, useRequest } from "@/api/request";
import { import {
TASK_WORK_COMMIT, TASK_WORK_COMMIT,
TASK_WORK_DETAIL, TASK_WORK_DETAIL,
@@ -253,34 +254,38 @@ import {
WORK_HISTROY, WORK_HISTROY,
} from "@/api/api"; } from "@/api/api";
import dayjs from "dayjs"; import dayjs from "dayjs";
import {useRouter} from "vue-router"; import { useRouter } from "vue-router";
import UploadImg from "@/components/img/UploadImg.vue"; import UploadImg from "@/components/img/UploadImg.vue";
import FileTypeImg from "@/components/FileTypeImg.vue"; import FileTypeImg from "@/components/FileTypeImg.vue";
import {useRoute} from "vue-router/dist/vue-router"; import { useRoute } from "vue-router/dist/vue-router";
const fileList = ref([]); const fileList = ref([]);
const uploadRef = ref(); const uploadRef = ref();
const showFileList = ref(0); const showFileList = ref(0);
const sbValue = ref({ const sbValue = ref({
content: '', content: "",
attach: '' attach: "",
}) });
const router = useRouter(); const router = useRouter();
const returnclick = () => {
router.back();
};
const { const {
query: {courseId: workId, type, id: taskId, pName, sName}, query: { courseId: workId, type, id: taskId, pName, sName },
} = useRoute(); } = useRoute();
const {data} = useRequest(TASK_WORK_DETAIL, {workId, taskId}); const { data } = useRequest(TASK_WORK_DETAIL, { workId, taskId });
const {data: submitList} = useRequest(TASK_WORK_SUBMIT_LIST, {workerId:workId}); const { data: submitList } = useRequest(TASK_WORK_SUBMIT_LIST, {
workerId: workId,
});
const handleClick = () => { const handleClick = () => {
console.log(sbValue.value) console.log(sbValue.value);
console.log(fileList) console.log(fileList);
request(TASK_WORK_COMMIT, { request(TASK_WORK_COMMIT, {
projectOrRouterLogo: type, projectOrRouterLogo: type,
workUploadContent: sbValue.value.content, workUploadContent: sbValue.value.content,
workUploadAddress: fileList.value.map(e => e.url).join(',') || '', workUploadAddress: fileList.value.map((e) => e.url).join(",") || "",
workId, workId,
type, type,
taskId, taskId,
@@ -701,25 +706,25 @@ function reUpload(i) {
.allbox1 { .allbox1 {
background: linear-gradient( background: linear-gradient(
0deg, 0deg,
rgba(160, 193, 230, 0) 0%, rgba(160, 193, 230, 0) 0%,
rgba(161, 195, 231, 0.2) 100% rgba(161, 195, 231, 0.2) 100%
); );
} }
.allbox2 { .allbox2 {
background: linear-gradient( background: linear-gradient(
0deg, 0deg,
rgba(177, 219, 229, 0) 0%, rgba(177, 219, 229, 0) 0%,
rgba(172, 216, 227, 0.2) 100% rgba(172, 216, 227, 0.2) 100%
); );
} }
.allbox3 { .allbox3 {
background: linear-gradient( background: linear-gradient(
0deg, 0deg,
rgba(195, 209, 234, 0) 0%, rgba(195, 209, 234, 0) 0%,
rgba(191, 206, 231, 0.2) 100% rgba(191, 206, 231, 0.2) 100%
); );
} }

View File

@@ -6,15 +6,15 @@
<div @click="returnfun" class="text">学习路径图</div> <div @click="returnfun" class="text">学习路径图</div>
<div class="info" style="margin-right: 14px" v-if="userInfo.jobName"> <div class="info" style="margin-right: 14px" v-if="userInfo.jobName">
<img <img
style="width: 20px; height: 18px; margin-right: 10px" style="width: 20px; height: 18px; margin-right: 10px"
src="../../assets/image/pm.png" src="../../assets/image/pm.png"
/> />
<div style="margin-top: 1px">{{ userInfo.jobName }}</div> <div style="margin-top: 1px">{{ userInfo.jobName }}</div>
</div> </div>
<div class="info" v-if="userInfo.bandDesc"> <div class="info" v-if="userInfo.bandDesc">
<img <img
style="width: 18px; height: 17px; margin-right: 11px" style="width: 18px; height: 17px; margin-right: 11px"
src="../../assets/image/band.png" src="../../assets/image/band.png"
/> />
<div style="margin-top: 2px">{{ userInfo.bandDesc }}</div> <div style="margin-top: 2px">{{ userInfo.bandDesc }}</div>
</div> </div>
@@ -58,9 +58,9 @@
<!-- </el-popover>--> <!-- </el-popover>-->
</div> </div>
<div <div
:style="{ display: showmapdetail ? 'flex' : 'none' }" :style="{ display: showmapdetail ? 'flex' : 'none' }"
class="titleR" class="titleR"
@click="returnfun" @click="returnfun"
> >
返回列表 返回列表
</div> </div>
@@ -70,29 +70,29 @@
<div style="min-width: 770px; width: 100%"> <div style="min-width: 770px; width: 100%">
<el-table :data="data" style="width: 100%" @row-click="gofun"> <el-table :data="data" style="width: 100%" @row-click="gofun">
<el-table-column <el-table-column
prop="img" prop="img"
label="缩略图" label="缩略图"
#default="scope" #default="scope"
align="center" align="center"
width="255" width="255"
> >
<img <img
:src="scope.row.picUrl" :src="scope.row.picUrl"
style="width: 230px; height: 155px" style="width: 230px; height: 155px"
/> />
</el-table-column> </el-table-column>
<el-table-column align="center" prop="name" label="路径名称"/> <el-table-column align="center" prop="name" label="路径名称" />
<el-table-column <el-table-column
align="center" align="center"
prop="introduce" prop="introduce"
label="路径介绍" label="路径介绍"
#default="scope" #default="scope"
> >
<el-popover <el-popover
placement="top-start" placement="top-start"
title="路径介绍" title="路径介绍"
trigger="hover" trigger="hover"
:content="scope.row.remark" :content="scope.row.remark"
> >
<template #reference> <template #reference>
<div>{{ scope.row.remark }}</div> <div>{{ scope.row.remark }}</div>
@@ -101,19 +101,28 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="organizationName" prop="organizationName"
label="归属组织" label="归属组织"
/> />
<el-table-column <el-table-column
#default="scope" #default="scope"
align="center" align="center"
:width="150" :width="150"
prop="state" prop="state"
label="状态" label="状态"
> >
<img :src="ongoing" <img
style="width: 99px; height: 99px" :src="
scope.row.status === 0
? ongoing
: scope.row.status === 1
? completed
: scope.row.status === -1
? nostarted
: null
"
style="width: 99px; height: 99px"
/> />
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -124,11 +133,11 @@
<!-- 路径列表--> <!-- 路径列表-->
<!-- 路径详情图 --> <!-- 路径详情图 -->
<div <div
:style="{ display: showmapdetail ? 'flex' : 'none' }" :style="{ display: showmapdetail ? 'flex' : 'none' }"
class="mapdetail" class="mapdetail"
> >
<div v-for="(item, i) in detail?.rows" :key="i"> <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>
<!-- <div class="modal"--> <!-- <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;">--> <!-- style="width: calc(100% - 168px); height: 525px;background-image: url('../../src/assets/image/mapdetail.png');background-size: 100%;background-repeat: no-repeat;">-->
@@ -139,24 +148,24 @@
</div> </div>
</template> </template>
<script setup> <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 nostarted from "../../assets/image/nostarted.png";
import completed from "../../assets/image/completed.png"; import completed from "../../assets/image/completed.png";
import ongoing from "../../assets/image/ongoing.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 { import {
ROUTER_CHAPTER_LIST, ROUTER_CHAPTER_LIST,
ROUTER_LIST, ROUTER_LIST,
ROUTER_UNCOMPLETE_LIST, ROUTER_UNCOMPLETE_LIST,
} from "@/api/api"; } from "@/api/api";
import {useImage} from "@/api/utils"; import { useImage } from "@/api/utils";
import {useRouter} from "vue-router"; import { useRouter } from "vue-router";
import store from "@/store"; import store from "@/store";
const detail = ref(); const detail = ref();
const userInfo = computed(() => store.state.userInfo); const userInfo = computed(() => store.state.userInfo);
const {data} = usePage(ROUTER_LIST, {}); const { data } = usePage(ROUTER_LIST, {});
console.log("datadata", data);
const router = useRouter(); const router = useRouter();
// const {unCompleteTaskList} = useRequest(ROUTER_UNCOMPLETE_LIST, {}); // const {unCompleteTaskList} = useRequest(ROUTER_UNCOMPLETE_LIST, {});
@@ -164,29 +173,33 @@ const router = useRouter();
const state = reactive({ const state = reactive({
showmapdetail: false, showmapdetail: false,
}); });
const {showmapdetail} = toRefs(state); const { showmapdetail } = toRefs(state);
const returnfun = () => { const returnfun = () => {
state.showmapdetail = false; state.showmapdetail = false;
}; };
async function gofun({routerId, name: routerName}) { async function gofun({ routerId, name: routerName }) {
// console.log(routerId) // console.log(routerId)
// const data = await request(ROUTER_CHAPTER_LIST, {stuChapterListVo: {routerId}}) // const data = await request(ROUTER_CHAPTER_LIST, {stuChapterListVo: {routerId}})
// detail.value = data.data // detail.value = data.data
// state.showmapdetail = true; // state.showmapdetail = true;
// router.push({path: "/pathdetails", query: {routerId}}); // router.push({path: "/pathdetails", query: {routerId}});
import.meta.env.MODE === 'development' ? router.push({ import.meta.env.MODE === "development"
path: "/pathdetails", ? router.push({
query: {routerId, routerName} path: "/pathdetails",
}) : window.open(`http://u-pre.boe.com/pc/forward?to=/fe-student/pathdetails&params=${encodeURIComponent(`routerId=${routerId}&routerName=${routerName}`)}`) query: { routerId, routerName },
})
: window.open(
`http://u-pre.boe.com/pc/forward?to=/fe-student/pathdetails&params=${encodeURIComponent(
`routerId=${routerId}&routerName=${routerName}`
)}`
);
} }
function toUnTask() { function toUnTask() {}
}
</script> </script>
<style lang="scss"> <style lang="scss">
.modal { .modal {
} }

View File

@@ -15,38 +15,40 @@
<div class="title"> <div class="title">
<div class="titleL">{{ i.chapterName }}</div> <div class="titleL">{{ i.chapterName }}</div>
<div class="titleR" :style="{ display: 'flex' }"> <div class="titleR" :style="{ display: 'flex' }">
<img src="../../assets/image/pathdetails/circle.png"/> <img src="../../assets/image/pathdetails/circle.png" />
<div class="titleRT">进行中</div> <div class="titleRT">进行中</div>
</div> </div>
<div <div
class="titleR" class="titleR"
:style="{ display: i.status === 2 ? 'flex' : 'none' }" :style="{ display: i.status === 2 ? 'flex' : 'none' }"
> >
<img src="../../assets/image/pathdetails/circle2.png"/> <img src="../../assets/image/pathdetails/circle2.png" />
<div class="titleRT" style="color: rgba(102, 102, 102, 1)"> <div class="titleRT" style="color: rgba(102, 102, 102, 1)">
未开始 未开始
</div> </div>
</div> </div>
</div> </div>
<div <div
class="course" class="course"
v-for="(value, index) in i.taskProcessList.filter(e=>!whiteTypes(e.type))" v-for="(value, index) in i.taskProcessList.filter(
:key="index" (e) => !whiteTypes(e.type)
)"
:key="index"
> >
<div> <div>
<div class="coursename">{{ value.name }}</div> <div class="coursename">{{ value.name }}</div>
<div class="coursetag"> <div class="coursetag">
<div <div
class="tag1" class="tag1"
style="margin-right: 11px; margin-top: 16px" style="margin-right: 11px; margin-top: 16px"
v-if="value.flag" v-if="value.flag"
> >
必修 必修
</div> </div>
<div <div
class="tag2" class="tag2"
style="margin-right: 11px; margin-top: 16px" style="margin-right: 11px; margin-top: 16px"
v-if="!value.flag" v-if="!value.flag"
> >
选修 选修
</div> </div>
@@ -64,17 +66,17 @@
<!-- </div>--> <!-- </div>-->
</div> </div>
<div <div
class="progressBox" class="progressBox"
:style="{ display: value.status === 1 ? 'block' : 'none' }" :style="{ display: value.status === 1 ? 'block' : 'none' }"
> >
<div>当前进度</div> <div>当前进度</div>
<div class="progress"> <div class="progress">
<div style="width: 291px"> <div style="width: 291px">
<el-progress <el-progress
:percentage="value.currentRatio" :percentage="value.currentRatio"
:show-text="false" :show-text="false"
:stroke-width="8" :stroke-width="8"
:color=" :color="
{ {
0: 'rgba(238, 112, 108, 1)', 0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)', 1: 'rgba(255, 151, 38, 1)',
@@ -87,13 +89,13 @@
/> />
</div> </div>
<div <div
style=" style="
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
color: #277aff; color: #277aff;
margin-left: 10px; margin-left: 10px;
" "
:style="{ :style="{
color: { color: {
0: 'rgba(238, 112, 108, 1)', 0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)', 1: 'rgba(255, 151, 38, 1)',
@@ -110,18 +112,18 @@
</div> </div>
</div> </div>
<div <div
class="goclass" class="goclass"
:style="{ :style="{
background: `${types.path[value.type] ? '#2478ff' : '#999'}`, background: `${types.path[value.type] ? '#2478ff' : '#999'}`,
}" }"
@click="toFinish(value,i.chapterName)" @click="toFinish(value, i.chapterName)"
> >
{{ {{
value.status === 1 value.status === 1
? "已完成" ? "已完成"
: types.path[value.type] : types.path[value.type]
? types.toName[value.type] ? types.toName[value.type]
: "未开放" : "未开放"
}} }}
</div> </div>
<!-- <div :style="{ display: value.status === 1 ? 'block' : 'none' }">--> <!-- <div :style="{ display: value.status === 1 ? 'block' : 'none' }">-->
@@ -149,7 +151,7 @@
<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 class="notice"> <div class="notice">
{{ data.remark || '暂无公告' }} {{ data.remark || "暂无公告" }}
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="共享文档" name="second"> <el-tab-pane label="共享文档" name="second">
@@ -183,18 +185,18 @@
<div class="info"> <div class="info">
<div class="title"> <div class="title">
<img <img
style="width: 21px; height: 20px" style="width: 21px; height: 20px"
src="../../assets/image/pathdetails/info.png" src="../../assets/image/pathdetails/info.png"
/> />
<div class="text" style="margin-left: 7px">个人信息</div> <div class="text" style="margin-left: 7px">个人信息</div>
<div class="box"></div> <div class="box"></div>
</div> </div>
<!-- todo #路径详情 个人信息缺少img和介绍--> <!-- todo #路径详情 个人信息缺少img和介绍-->
<div <div
class="teacheritem" class="teacheritem"
:style="{ 'border-bottom': '1px solid rgba(56, 125, 247, 0.2)' }" :style="{ 'border-bottom': '1px solid rgba(56, 125, 247, 0.2)' }"
> >
<img class="peopleimg" :src="`/upload${userInfo.avatar}`"/> <img class="peopleimg" :src="`/upload${userInfo.avatar}`" />
<div style="margin-left: 17px"> <div style="margin-left: 17px">
<div class="teacherName"> <div class="teacherName">
<div style="margin-right: 5px"> <div style="margin-right: 5px">
@@ -211,14 +213,14 @@
<div class="info" style="padding-top: 20px"> <div class="info" style="padding-top: 20px">
<div class="title"> <div class="title">
<img <img
style="width: 18px; height: 17px" style="width: 18px; height: 17px"
src="../../assets/image/pathdetails/study.png" src="../../assets/image/pathdetails/study.png"
/> />
<div class="text" style="margin-left: 9px">学习进度</div> <div class="text" style="margin-left: 9px">学习进度</div>
<div class="box"></div> <div class="box"></div>
</div> </div>
<div class="rate"> <div class="rate">
<div class="ratetext">上次学到启航班-领导寄语</div> <div class="ratetext">上次学到:{{ data.lastLearned }}</div>
<div class="ratebtn">继续学习</div> <div class="ratebtn">继续学习</div>
</div> </div>
<div style="margin-top: 16px"> <div style="margin-top: 16px">
@@ -227,14 +229,10 @@
<div class="progress"> <div class="progress">
<div style="width: 291px"> <div style="width: 291px">
<el-progress <el-progress
:percentage=" :percentage="parseInt(data.totalProgress * 100)"
parseInt( :show-text="false"
(data.currentChapterCnt / data.totalChapterCnt) * 100 :stroke-width="8"
) :color="
"
:show-text="false"
:stroke-width="8"
:color="
{ {
0: 'rgba(238, 112, 108, 1)', 0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)', 1: 'rgba(255, 151, 38, 1)',
@@ -242,17 +240,13 @@
3: 'rgba(59, 94, 251, 1)', 3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)', 4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)', 5: 'rgba(57, 219, 183, 1)',
}[ }[parseInt(data.totalProgress)]
parseInt(
data.currentChapterCnt / data.totalChapterCnt
)
]
" "
/> />
</div> </div>
<div <div
style="font-size: 14px; font-weight: 500; margin-left: 10px" style="font-size: 14px; font-weight: 500; margin-left: 10px"
:style="{ :style="{
color: { color: {
0: 'rgba(238, 112, 108, 1)', 0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)', 1: 'rgba(255, 151, 38, 1)',
@@ -260,16 +254,10 @@
3: 'rgba(59, 94, 251, 1)', 3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)', 4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)', 5: 'rgba(57, 219, 183, 1)',
}[ }[parseInt(data.totalProgress)],
parseInt(data.currentChapterCnt / data.totalChapterCnt)
],
}" }"
> >
{{ {{ parseInt(data.totalProgress * 100) }}%
parseInt(
(data.currentChapterCnt / data.totalChapterCnt) * 100
)
}}%
</div> </div>
</div> </div>
</div> </div>
@@ -280,12 +268,10 @@
<div class="progress"> <div class="progress">
<div style="width: 291px"> <div style="width: 291px">
<el-progress <el-progress
:percentage=" :percentage="parseInt(data.compulsoryProgress * 100)"
parseInt((data.currentReqCnt / data.totalReqCnt) * 100) :show-text="false"
" :stroke-width="8"
:show-text="false" :color="
:stroke-width="8"
:color="
{ {
0: 'rgba(238, 112, 108, 1)', 0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)', 1: 'rgba(255, 151, 38, 1)',
@@ -293,18 +279,18 @@
3: 'rgba(59, 94, 251, 1)', 3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)', 4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)', 5: 'rgba(57, 219, 183, 1)',
}[parseInt(data.currentReqCnt / data.totalReqCnt)] }[parseInt(data.compulsoryProgress)]
" "
/> />
</div> </div>
<div <div
style=" style="
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
color: #277aff; color: #277aff;
margin-left: 10px; margin-left: 10px;
" "
:style="{ :style="{
color: { color: {
0: 'rgba(238, 112, 108, 1)', 0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)', 1: 'rgba(255, 151, 38, 1)',
@@ -312,12 +298,10 @@
3: 'rgba(59, 94, 251, 1)', 3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)', 4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)', 5: 'rgba(57, 219, 183, 1)',
}[parseInt(data.currentReqCnt / data.totalReqCnt)], }[parseInt(data.compulsoryProgress)],
}" }"
> >
{{ {{ parseInt(data.compulsoryProgress * 100) }}%
parseInt((data.currentReqCnt / data.totalReqCnt) * 100)
}}%
</div> </div>
</div> </div>
</div> </div>
@@ -332,7 +316,7 @@
</template> </template>
<script setup> <script setup>
import {computed, reactive, ref, watch} from "vue"; import { computed, reactive, ref, watch } from "vue";
import word from "@/assets/image/file/word.png"; import word from "@/assets/image/file/word.png";
import ppt from "@/assets/image/file/ppt.png"; import ppt from "@/assets/image/file/ppt.png";
import pdf from "@/assets/image/file/pdf.png"; import pdf from "@/assets/image/file/pdf.png";
@@ -342,27 +326,27 @@ import medal1 from "@/assets/image/medal/medal1.png";
import medal2 from "@/assets/image/medal/medal2.png"; import medal2 from "@/assets/image/medal/medal2.png";
import medal3 from "@/assets/image/medal/medal3.png"; import medal3 from "@/assets/image/medal/medal3.png";
import img from "@/assets/image/uploadimg.png"; import img from "@/assets/image/uploadimg.png";
import {boeRequest, useRequest, request} from "@/api/request"; import { boeRequest, useRequest, request } from "@/api/request";
import {ROUTER_PROCESS, LINK_DETAILS} from "@/api/api"; import { ROUTER_PROCESS, LINK_DETAILS } from "@/api/api";
import {useRoute, useRouter} from "vue-router"; import { useRoute, useRouter } from "vue-router";
import {ElMessage} from "element-plus"; import { ElMessage } from "element-plus";
import {useUserInfo} from "@/api/utils"; import { useUserInfo } from "@/api/utils";
import store from "@/store"; import store from "@/store";
const { const {
query: {routerId, routerName}, query: { routerId, routerName },
} = useRoute(); } = useRoute();
const router = useRouter(); const router = useRouter();
const {data} = useRequest(ROUTER_PROCESS, {routerId}); const { data } = useRequest(ROUTER_PROCESS, { routerId });
console.log("ROUTER_PROCESS", data);
const userInfo = computed(() => store.state.userInfo); const userInfo = computed(() => store.state.userInfo);
console.log("userInfo", userInfo);
const activeName = ref("first"); const activeName = ref("first");
const handleClick = (tab, event) => { const handleClick = (tab, event) => {
console.log(tab, event); console.log(tab, event);
}; };
const path = {1: "path"}; const path = { 1: "path" };
const types = ref({ const types = ref({
typeName: { typeName: {
@@ -402,13 +386,18 @@ const types = ref({
4: "/homeworkpage", 4: "/homeworkpage",
5: import.meta.env.VITE_BOE_EXAM_DETAIL_URL, //考试 5: import.meta.env.VITE_BOE_EXAM_DETAIL_URL, //考试
6: "/livebroadcast", 6: "/livebroadcast",
7: ({courseId}) => request(LINK_DETAILS(courseId), {}).then(({data: {linkAddress}}) => window.open(linkAddress)),//外联 7: ({ courseId }) =>
request(LINK_DETAILS(courseId), {}).then(({ data: { linkAddress } }) =>
window.open(linkAddress)
), //外联
8: "/discusspage", 8: "/discusspage",
9: "/moreactive", 9: "/moreactive",
10: ({ 10: ({ evaTyp, targetId }) =>
evaTyp, window.open(
targetId (evaTyp === 1
}) => window.open((evaTyp === 1 ? import.meta.env.VITE_BOE_TEST_DETAIL_URL : import.meta.env.VITE_BOE_TEST_OUT_DETAIL_URL) + targetId), //测评 ? import.meta.env.VITE_BOE_TEST_DETAIL_URL
: import.meta.env.VITE_BOE_TEST_OUT_DETAIL_URL) + targetId
), //测评
11: "/surveydetail", 11: "/surveydetail",
12: "/ballotpage", 12: "/ballotpage",
13: "/projectdetails", 13: "/projectdetails",
@@ -421,19 +410,29 @@ function toFinish(d, sName) {
return; return;
} }
if (typeof types.value.path[d.type] === 'string') { if (typeof types.value.path[d.type] === "string") {
types.value.path[d.type] && types.value.path[d.type].startsWith("http") && window.open(types.value.path[d.type] + d.targetId) types.value.path[d.type] &&
types.value.path[d.type] && types.value.path[d.type].startsWith("/") && router.push({ types.value.path[d.type].startsWith("http") &&
path: types.value.path[d.type], window.open(types.value.path[d.type] + d.targetId);
query: {id: d.routerTaskId, type: 1, courseId: d.courseId, pName: data.value.name, sName}, types.value.path[d.type] &&
}) types.value.path[d.type].startsWith("/") &&
} else if (typeof types.value.path[d.type] === 'function') { router.push({
types.value.path[d.type](d) path: types.value.path[d.type],
query: {
id: d.routerTaskId,
type: 1,
courseId: d.courseId,
pName: data.value.name,
sName,
},
});
} else if (typeof types.value.path[d.type] === "function") {
types.value.path[d.type](d);
} }
} }
function whiteTypes(type) { function whiteTypes(type) {
return import.meta.env.VITE_TASK_WHITE_TYPE.includes(type + '') return import.meta.env.VITE_TASK_WHITE_TYPE.includes(type + "");
} }
</script> </script>