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

This commit is contained in:
yuping
2022-12-15 00:30:28 +08:00

View File

@@ -14,10 +14,7 @@
<div v-for="(i, k) in data.chapterProcessList" :key="k"> <div v-for="(i, k) in data.chapterProcessList" :key="k">
<div class="title"> <div class="title">
<div class="titleL">{{ i.chapterName }}</div> <div class="titleL">{{ i.chapterName }}</div>
<div <div class="titleR" :style="{ display: 'flex' }">
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>
@@ -39,11 +36,22 @@
<div> <div>
<div class="coursename">{{ value.name }}</div> <div class="coursename">{{ value.name }}</div>
<div class="coursetag"> <div class="coursetag">
<div class="tag1" style="margin-right: 11px; margin-top: 16px" v-if="value.flag">必修</div> <div
<div class="tag2" style="margin-right: 11px; margin-top: 16px" v-if="!value.flag">选修</div> class="tag1"
<div class="tag3" style="margin-right: 11px; margin-top: 16px">{{ style="margin-right: 11px; margin-top: 16px"
types.typeName[value.type] || '' v-if="value.flag"
}} >
必修
</div>
<div
class="tag2"
style="margin-right: 11px; margin-top: 16px"
v-if="!value.flag"
>
选修
</div>
<div class="tag3" style="margin-right: 11px; margin-top: 16px">
{{ types.typeName[value.type] || "" }}
</div> </div>
<!-- <div--> <!-- <div-->
@@ -73,7 +81,7 @@
2: 'rgba(39, 122, 255, 1)', 2: 'rgba(39, 122, 255, 1)',
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(value.currentRatio / 20)] }[parseInt(value.currentRatio / 20)]
" "
/> />
@@ -86,15 +94,14 @@
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)',
2: 'rgba(39, 122, 255, 1)', 2: 'rgba(39, 122, 255, 1)',
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(value.currentRatio/20)] }[parseInt(value.currentRatio / 20)],
}" }"
> >
{{ value.currentRatio }}% {{ value.currentRatio }}%
@@ -102,11 +109,14 @@
</div> </div>
</div> </div>
</div> </div>
<div class="goclass" :style="{background:`${types.path[value.type]?'#2478ff':'#999'}`}" <div
@click="toFinish(value)"> class="goclass"
{{ :style="{
types.path[value.type] ? types.toName[value.type] : '未开放' background: `${types.path[value.type] ? '#2478ff' : '#999'}`,
}} }"
@click="toFinish(value)"
>
{{ types.path[value.type] ? types.toName[value.type] : "未开放" }}
</div> </div>
<!-- <div :style="{ display: value.status === 1 ? 'block' : 'none' }">--> <!-- <div :style="{ display: value.status === 1 ? 'block' : 'none' }">-->
<!-- <div--> <!-- <div-->
@@ -186,7 +196,9 @@
<img class="peopleimg" :src="userAvatar" /> <img class="peopleimg" :src="userAvatar" />
<div style="margin-left: 17px"> <div style="margin-left: 17px">
<div class="teacherName"> <div class="teacherName">
<div style="margin-right: 5px">{{ data.userInfoBo?.userName }}</div> <div style="margin-right: 5px">
{{ data.userInfoBo?.userName }}
</div>
<div v-for="(item, key) in data.userInfoBo?.medal" :key="key"> <div v-for="(item, key) in data.userInfoBo?.medal" :key="key">
<img class="teacherMedal" :src="item" /> <img class="teacherMedal" :src="item" />
</div> </div>
@@ -214,7 +226,11 @@
<div class="progress"> <div class="progress">
<div style="width: 291px"> <div style="width: 291px">
<el-progress <el-progress
:percentage="parseInt(data.currentChapterCnt/data.totalChapterCnt * 100)" :percentage="
parseInt(
(data.currentChapterCnt / data.totalChapterCnt) * 100
)
"
:show-text="false" :show-text="false"
:stroke-width="8" :stroke-width="8"
:color=" :color="
@@ -224,17 +240,17 @@
2: 'rgba(39, 122, 255, 1)', 2: 'rgba(39, 122, 255, 1)',
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.currentChapterCnt/data.totalChapterCnt)] }[
parseInt(
data.currentChapterCnt / data.totalChapterCnt
)
]
" "
/> />
</div> </div>
<div <div
style=" style="font-size: 14px; font-weight: 500; margin-left: 10px"
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)',
@@ -242,11 +258,17 @@
2: 'rgba(39, 122, 255, 1)', 2: 'rgba(39, 122, 255, 1)',
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.currentChapterCnt/data.totalChapterCnt)] }[
parseInt(data.currentChapterCnt / data.totalChapterCnt)
],
}" }"
> >
{{ parseInt(data.currentChapterCnt / data.totalChapterCnt * 100) }}% {{
parseInt(
(data.currentChapterCnt / data.totalChapterCnt) * 100
)
}}%
</div> </div>
</div> </div>
</div> </div>
@@ -257,7 +279,9 @@
<div class="progress"> <div class="progress">
<div style="width: 291px"> <div style="width: 291px">
<el-progress <el-progress
:percentage="parseInt(data.currentReqCnt/data.totalReqCnt * 100)" :percentage="
parseInt((data.currentReqCnt / data.totalReqCnt) * 100)
"
:show-text="false" :show-text="false"
:stroke-width="8" :stroke-width="8"
:color=" :color="
@@ -267,7 +291,7 @@
2: 'rgba(39, 122, 255, 1)', 2: 'rgba(39, 122, 255, 1)',
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.currentReqCnt / data.totalReqCnt)]
" "
/> />
@@ -280,18 +304,19 @@
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)',
2: 'rgba(39, 122, 255, 1)', 2: 'rgba(39, 122, 255, 1)',
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.currentReqCnt / data.totalReqCnt)],
}" }"
> >
{{ parseInt(data.currentReqCnt / data.totalReqCnt * 100) }}% {{
parseInt((data.currentReqCnt / data.totalReqCnt) * 100)
}}%
</div> </div>
</div> </div>
</div> </div>
@@ -307,25 +332,29 @@
<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";
import zip from '@/assets/image/file/zip.png' import zip from "@/assets/image/file/zip.png";
import md from '@/assets/image/file/md.png' import md from "@/assets/image/file/md.png";
import medal1 from '@/assets/image/medal/medal1.png' 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 } from "@/api/request"; import { boeRequest, useRequest } from "@/api/request";
import { ROUTER_PROCESS } from "@/api/api"; import { ROUTER_PROCESS } 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";
const {query: {routerId}} = useRoute() const {
const router = useRouter() query: { routerId },
const {data} = useRequest(ROUTER_PROCESS, {routerId}) } = useRoute();
const {avatar: userAvatar} = useUserInfo(computed(() => data.value?.userInfoBo?.userId)) const router = useRouter();
const { data } = useRequest(ROUTER_PROCESS, { routerId });
const { avatar: userAvatar } = useUserInfo(
computed(() => data.value?.userInfoBo?.userId)
);
const state = reactive({ const state = reactive({
course: [ course: [
@@ -502,85 +531,86 @@ const state = reactive({
name: "王星天(显示事业)", name: "王星天(显示事业)",
introduce: "教师是学生的镜子,学生是老师的影子。", introduce: "教师是学生的镜子,学生是老师的影子。",
peopleimg: img, peopleimg: img,
medal: [ medal: [medal1, medal2, medal3],
medal1,
medal2,
medal3,
],
}, },
], ],
}); });
const activeName = ref('first') const activeName = ref("first");
const totalprogress = ref(30) const totalprogress = ref(30);
const compulsoryprogress = ref(10) const compulsoryprogress = ref(10);
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: {
1: '在线', 1: "在线",
2: '面授', 2: "面授",
3: '案例', 3: "案例",
4: '作业', 4: "作业",
5: '考试', 5: "考试",
6: '直播', 6: "直播",
7: '外链', 7: "外链",
8: '讨论', 8: "讨论",
9: '活动', 9: "活动",
10: '测评', 10: "测评",
11: '评估', 11: "评估",
12: '投票', 12: "投票",
13: '项目', 13: "项目",
}, },
toName: { toName: {
1: '去上课', 1: "去上课",
2: '去上课', 2: "去上课",
3: '案例', 3: "案例",
4: '去完成', 4: "去完成",
5: '去完成', 5: "去完成",
6: '去签到', 6: "去签到",
7: '外链', 7: "外链",
8: '去讨论', 8: "去讨论",
9: '去签到', 9: "去签到",
10: '去完成', 10: "去完成",
11: '去完成', 11: "去完成",
12: '去投票', 12: "去投票",
13: '去完成', 13: "去完成",
}, },
path: { path: {
1: import.meta.env.VITE_BOE_ONLINE_CLASS_URL, 1: import.meta.env.VITE_BOE_ONLINE_CLASS_URL,
2: '/faceteach', 2: "/faceteach",
3: import.meta.env.VITE_BOE_CASS_DETAIL_URL, 3: import.meta.env.VITE_BOE_CASS_DETAIL_URL,
4: '/homeworkpage', 4: "/homeworkpage",
5: import.meta.env.VITE_BOE_TEST_DETAIL_URL, 5: import.meta.env.VITE_BOE_TEST_DETAIL_URL,
6: '/livebroadcast', 6: "/livebroadcast",
7: '', 7: "",
8: '/discusspage', 8: "/discusspage",
9: '/moreactive', 9: "/moreactive",
10: '/surveydetail', 10: "/surveydetail",
11: '/surveydetail', 11: "/surveydetail",
12: '/ballotpage', 12: "/ballotpage",
13: '去完成' 13: "去完成",
} },
}) });
function toFinish(d) { function toFinish(d) {
if (!types.value.path[d.type]) { if (!types.value.path[d.type]) {
ElMessage.error('暂时未开放') ElMessage.error("暂时未开放");
return
}
if (types.value.path[d.type] && types.value.path[d.type].startsWith('http')) {
//配置文件
const url = types.value.path[d.type] + (d.type === 1 ? d.targetId : d.courseId)
import.meta.env.DEV ? (window.location.href = url) : (window.parent.location.href = url)
return; return;
} }
router.push({path: types.value.path[d.type], query: {id: d.routerTaskId, type: 1, courseId: d.courseId}}) if (types.value.path[d.type] && types.value.path[d.type].startsWith("http")) {
//配置文件
const url =
types.value.path[d.type] + (d.type === 1 ? d.targetId : d.courseId);
import.meta.env.DEV
? (window.location.href = url)
: (window.parent.location.href = url);
return;
}
router.push({
path: types.value.path[d.type],
query: { id: d.routerTaskId, type: 1, courseId: d.courseId },
});
} }
</script> </script>
<!-- Add "scoped" attribute to limit CSS to this component only --> <!-- Add "scoped" attribute to limit CSS to this component only -->