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 class="title">
<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" />
<div class="titleRT">进行中</div>
</div>
@@ -39,11 +36,22 @@
<div>
<div class="coursename">{{ value.name }}</div>
<div class="coursetag">
<div class="tag1" style="margin-right: 11px; margin-top: 16px" 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
class="tag1"
style="margin-right: 11px; margin-top: 16px"
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-->
@@ -73,7 +81,7 @@
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5:'rgba(57, 219, 183, 1)'
5: 'rgba(57, 219, 183, 1)',
}[parseInt(value.currentRatio / 20)]
"
/>
@@ -86,15 +94,14 @@
margin-left: 10px;
"
:style="{
color:
{
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)]
5: 'rgba(57, 219, 183, 1)',
}[parseInt(value.currentRatio / 20)],
}"
>
{{ value.currentRatio }}%
@@ -102,11 +109,14 @@
</div>
</div>
</div>
<div class="goclass" :style="{background:`${types.path[value.type]?'#2478ff':'#999'}`}"
@click="toFinish(value)">
{{
types.path[value.type] ? types.toName[value.type] : '未开放'
}}
<div
class="goclass"
:style="{
background: `${types.path[value.type] ? '#2478ff' : '#999'}`,
}"
@click="toFinish(value)"
>
{{ types.path[value.type] ? types.toName[value.type] : "未开放" }}
</div>
<!-- <div :style="{ display: value.status === 1 ? 'block' : 'none' }">-->
<!-- <div-->
@@ -186,7 +196,9 @@
<img class="peopleimg" :src="userAvatar" />
<div style="margin-left: 17px">
<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">
<img class="teacherMedal" :src="item" />
</div>
@@ -214,7 +226,11 @@
<div class="progress">
<div style="width: 291px">
<el-progress
:percentage="parseInt(data.currentChapterCnt/data.totalChapterCnt * 100)"
:percentage="
parseInt(
(data.currentChapterCnt / data.totalChapterCnt) * 100
)
"
:show-text="false"
:stroke-width="8"
:color="
@@ -224,17 +240,17 @@
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.currentChapterCnt/data.totalChapterCnt)]
5: 'rgba(57, 219, 183, 1)',
}[
parseInt(
data.currentChapterCnt / data.totalChapterCnt
)
]
"
/>
</div>
<div
style="
font-size: 14px;
font-weight: 500;
margin-left: 10px;
"
style="font-size: 14px; font-weight: 500; margin-left: 10px"
:style="{
color: {
0: 'rgba(238, 112, 108, 1)',
@@ -242,11 +258,17 @@
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.currentChapterCnt/data.totalChapterCnt)]
5: 'rgba(57, 219, 183, 1)',
}[
parseInt(data.currentChapterCnt / data.totalChapterCnt)
],
}"
>
{{ parseInt(data.currentChapterCnt / data.totalChapterCnt * 100) }}%
{{
parseInt(
(data.currentChapterCnt / data.totalChapterCnt) * 100
)
}}%
</div>
</div>
</div>
@@ -257,7 +279,9 @@
<div class="progress">
<div style="width: 291px">
<el-progress
:percentage="parseInt(data.currentReqCnt/data.totalReqCnt * 100)"
:percentage="
parseInt((data.currentReqCnt / data.totalReqCnt) * 100)
"
:show-text="false"
:stroke-width="8"
:color="
@@ -267,7 +291,7 @@
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5:'rgba(57, 219, 183, 1)'
5: 'rgba(57, 219, 183, 1)',
}[parseInt(data.currentReqCnt / data.totalReqCnt)]
"
/>
@@ -280,18 +304,19 @@
margin-left: 10px;
"
:style="{
color:
{
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.currentReqCnt/data.totalReqCnt)]
5: 'rgba(57, 219, 183, 1)',
}[parseInt(data.currentReqCnt / data.totalReqCnt)],
}"
>
{{ parseInt(data.currentReqCnt / data.totalReqCnt * 100) }}%
{{
parseInt((data.currentReqCnt / data.totalReqCnt) * 100)
}}%
</div>
</div>
</div>
@@ -307,25 +332,29 @@
<script setup>
import { computed, reactive, ref, watch } from "vue";
import word from '@/assets/image/file/word.png'
import ppt from '@/assets/image/file/ppt.png'
import pdf from '@/assets/image/file/pdf.png'
import zip from '@/assets/image/file/zip.png'
import md from '@/assets/image/file/md.png'
import medal1 from '@/assets/image/medal/medal1.png'
import medal2 from '@/assets/image/medal/medal2.png'
import medal3 from '@/assets/image/medal/medal3.png'
import img from '@/assets/image/uploadimg.png'
import word from "@/assets/image/file/word.png";
import ppt from "@/assets/image/file/ppt.png";
import pdf from "@/assets/image/file/pdf.png";
import zip from "@/assets/image/file/zip.png";
import md from "@/assets/image/file/md.png";
import medal1 from "@/assets/image/medal/medal1.png";
import medal2 from "@/assets/image/medal/medal2.png";
import medal3 from "@/assets/image/medal/medal3.png";
import img from "@/assets/image/uploadimg.png";
import { boeRequest, useRequest } from "@/api/request";
import { ROUTER_PROCESS } from "@/api/api";
import { useRoute, useRouter } from "vue-router";
import {ElMessage} from 'element-plus'
import { ElMessage } from "element-plus";
import { useUserInfo } from "@/api/utils";
const {query: {routerId}} = useRoute()
const router = useRouter()
const {data} = useRequest(ROUTER_PROCESS, {routerId})
const {avatar: userAvatar} = useUserInfo(computed(() => data.value?.userInfoBo?.userId))
const {
query: { routerId },
} = useRoute();
const router = useRouter();
const { data } = useRequest(ROUTER_PROCESS, { routerId });
const { avatar: userAvatar } = useUserInfo(
computed(() => data.value?.userInfoBo?.userId)
);
const state = reactive({
course: [
@@ -502,85 +531,86 @@ const state = reactive({
name: "王星天(显示事业)",
introduce: "教师是学生的镜子,学生是老师的影子。",
peopleimg: img,
medal: [
medal1,
medal2,
medal3,
],
medal: [medal1, medal2, medal3],
},
],
});
const activeName = ref('first')
const totalprogress = ref(30)
const compulsoryprogress = ref(10)
const activeName = ref("first");
const totalprogress = ref(30);
const compulsoryprogress = ref(10);
const handleClick = (tab, event) => {
console.log(tab, event);
};
const path = {1: 'path'}
const path = { 1: "path" };
const types = ref({
typeName: {
1: '在线',
2: '面授',
3: '案例',
4: '作业',
5: '考试',
6: '直播',
7: '外链',
8: '讨论',
9: '活动',
10: '测评',
11: '评估',
12: '投票',
13: '项目',
1: "在线",
2: "面授",
3: "案例",
4: "作业",
5: "考试",
6: "直播",
7: "外链",
8: "讨论",
9: "活动",
10: "测评",
11: "评估",
12: "投票",
13: "项目",
},
toName: {
1: '去上课',
2: '去上课',
3: '案例',
4: '去完成',
5: '去完成',
6: '去签到',
7: '外链',
8: '去讨论',
9: '去签到',
10: '去完成',
11: '去完成',
12: '去投票',
13: '去完成',
1: "去上课",
2: "去上课",
3: "案例",
4: "去完成",
5: "去完成",
6: "去签到",
7: "外链",
8: "去讨论",
9: "去签到",
10: "去完成",
11: "去完成",
12: "去投票",
13: "去完成",
},
path: {
1: import.meta.env.VITE_BOE_ONLINE_CLASS_URL,
2: '/faceteach',
2: "/faceteach",
3: import.meta.env.VITE_BOE_CASS_DETAIL_URL,
4: '/homeworkpage',
4: "/homeworkpage",
5: import.meta.env.VITE_BOE_TEST_DETAIL_URL,
6: '/livebroadcast',
7: '',
8: '/discusspage',
9: '/moreactive',
10: '/surveydetail',
11: '/surveydetail',
12: '/ballotpage',
13: '去完成'
}
})
6: "/livebroadcast",
7: "",
8: "/discusspage",
9: "/moreactive",
10: "/surveydetail",
11: "/surveydetail",
12: "/ballotpage",
13: "去完成",
},
});
function toFinish(d) {
if (!types.value.path[d.type]) {
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)
ElMessage.error("暂时未开放");
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>
<!-- Add "scoped" attribute to limit CSS to this component only -->