mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-07 18:06:48 +08:00
fix:修改面授课签到时间范围
This commit is contained in:
3
.env
3
.env
@@ -12,4 +12,5 @@ VITE_BOE_EXAM_DETAIL_URL=https://u-pre.boe.com/pc/exam/test?id=
|
|||||||
|
|
||||||
VITE_BOE_API_URL=https://u-pre.boe.com
|
VITE_BOE_API_URL=https://u-pre.boe.com
|
||||||
|
|
||||||
VITE_TASK_WHITE_TYPE=-8-,-12-,-13-
|
VITE_TASK_WHITE_TYPE=-8-,-12-,-13-
|
||||||
|
# VITE_TASK_WHITE_TYPE=-8-,-12-
|
||||||
@@ -2,13 +2,13 @@
|
|||||||
* @Author: lixg lixg@dongwu-inc.com
|
* @Author: lixg lixg@dongwu-inc.com
|
||||||
* @Date: 2022-12-11 16:57:58
|
* @Date: 2022-12-11 16:57:58
|
||||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||||
* @LastEditTime: 2022-12-17 14:59:41
|
* @LastEditTime: 2022-12-17 19:19:17
|
||||||
* @FilePath: /fe-stu/src/api/api.js
|
* @FilePath: /fe-stu/src/api/api.js
|
||||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
*/
|
*/
|
||||||
export const LOGIN = '/admin/CheckUser/userLogin post'
|
export const LOGIN = '/admin/CheckUser/userLogin post'
|
||||||
// export const FILE_UPLOAD = 'http://111.231.196.214:30001/file/upload'
|
// export const FILE_UPLOAD = 'http://111.231.196.214:30001/file/upload'
|
||||||
export const FILE_UPLOAD = import.meta.env.VITE_BASE_API + '/file/upload'
|
export const FILE_UPLOAD = '/file/upload'
|
||||||
export const COMMON_TOKEN = 'https://upload-z2.qiniup.com'
|
export const COMMON_TOKEN = 'https://upload-z2.qiniup.com'
|
||||||
export const ROUTER_CHAPTER_LIST = '/stu/router/chapterList'
|
export const ROUTER_CHAPTER_LIST = '/stu/router/chapterList'
|
||||||
export const ROUTER_LIST = '/stu/router/list post'
|
export const ROUTER_LIST = '/stu/router/list post'
|
||||||
|
|||||||
@@ -42,8 +42,7 @@
|
|||||||
class="btn"
|
class="btn"
|
||||||
style="margin-right: 20px"
|
style="margin-right: 20px"
|
||||||
:style="{
|
:style="{
|
||||||
background:
|
background: data.signFlag ? '#999' : 'rgb(57, 146, 249)',
|
||||||
data.signFlag || !isAllowSign ? '#999' : 'rgb(57, 146, 249)',
|
|
||||||
}"
|
}"
|
||||||
@click="signClick"
|
@click="signClick"
|
||||||
>{{ data.signFlag ? "已签到" : "签到" }}
|
>{{ data.signFlag ? "已签到" : "签到" }}
|
||||||
@@ -226,10 +225,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, reactive, toRefs, watch } from "vue";
|
import { computed, reactive, toRefs, watch, onUnmounted } from "vue";
|
||||||
import FileTypeImg from "@/components/FileTypeImg.vue";
|
import FileTypeImg from "@/components/FileTypeImg.vue";
|
||||||
import { request, useRequest } from "@/api/request";
|
import { request, useRequest } from "@/api/request";
|
||||||
import { STU_OFFCOURSE_DETAIL } from "@/api/api";
|
import { STU_OFFCOURSE_DETAIL, TASK_BROADCAST_SIGN } from "@/api/api";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import { useUserInfo } from "@/api/utils";
|
import { useUserInfo } from "@/api/utils";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
@@ -263,56 +262,45 @@ let timer = null;
|
|||||||
//判断能否签到
|
//判断能否签到
|
||||||
function isSignClick() {
|
function isSignClick() {
|
||||||
timer = setInterval(() => {
|
timer = setInterval(() => {
|
||||||
|
let beginTime = new Date(data.value.planDto.beginTime).getTime();
|
||||||
|
let endTime = !data.value.planDto.afterStart
|
||||||
|
? new Date(data.value.planDto.endTime).getTime()
|
||||||
|
: new Date(data.value.planDto.beginTime).getTime();
|
||||||
|
let nowTime = new Date().getTime();
|
||||||
if (data.value.planDto.beforeStart && data.value.planDto.afterStart) {
|
if (data.value.planDto.beforeStart && data.value.planDto.afterStart) {
|
||||||
//有开始前有开始后
|
//有开始前有开始后
|
||||||
let beginTime =
|
beginTime = beginTime - data.value.planDto.beforeStart * 60 * 1000;
|
||||||
new Date(data.value.planDto.beginTime).getTime() -
|
endTime = endTime + data.value.planDto.afterStart * 60 * 1000;
|
||||||
data.value.planDto.beforeStart * 60 * 1000;
|
console.log("1111");
|
||||||
let endTime =
|
|
||||||
new Date(data.value.planDto.beginTime).getTime() +
|
|
||||||
data.value.planDto.afterStart * 60 * 1000;
|
|
||||||
let nowTime = new Date().getTime();
|
|
||||||
if (nowTime < endTime && nowTime > beginTime) {
|
|
||||||
state.isAllowSign = true;
|
|
||||||
} else {
|
|
||||||
state.isAllowSign = false;
|
|
||||||
}
|
|
||||||
} else if (
|
|
||||||
!data.value.planDto.beforeStart &&
|
|
||||||
!data.value.planDto.afterStart
|
|
||||||
) {
|
|
||||||
//开始前开始后都没有
|
|
||||||
state.isAllowSign = true;
|
|
||||||
} else if (
|
} else if (
|
||||||
data.value.planDto.beforeStart &&
|
data.value.planDto.beforeStart &&
|
||||||
!data.value.planDto.afterStart
|
!data.value.planDto.afterStart
|
||||||
) {
|
) {
|
||||||
//只有开始前无开始后
|
//只有开始前无开始后
|
||||||
let beginTime =
|
beginTime = beginTime - data.value.planDto.beforeStart * 60 * 1000;
|
||||||
new Date(data.value.planDto.beginTime).getTime() -
|
console.log("11112222");
|
||||||
data.value.planDto.beforeStart * 60 * 1000;
|
|
||||||
let nowTime = new Date().getTime();
|
|
||||||
if (nowTime > beginTime) {
|
|
||||||
state.isAllowSign = true;
|
|
||||||
} else {
|
|
||||||
state.isAllowSign = false;
|
|
||||||
}
|
|
||||||
} else if (
|
} else if (
|
||||||
!data.value.planDto.beforeStart &&
|
!data.value.planDto.beforeStart &&
|
||||||
data.value.planDto.afterStart
|
data.value.planDto.afterStart
|
||||||
) {
|
) {
|
||||||
//无开始前有开始后
|
//无开始前有开始后
|
||||||
let endTime =
|
endTime = endTime + data.value.planDto.afterStart * 60 * 1000;
|
||||||
new Date(data.value.planDto.beginTime).getTime() +
|
console.log("1111333");
|
||||||
data.value.planDto.afterStart * 60 * 1000;
|
|
||||||
let nowTime = new Date().getTime();
|
|
||||||
if (nowTime < endTime) {
|
|
||||||
state.isAllowSign = true;
|
|
||||||
} else {
|
|
||||||
state.isAllowSign = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
console.log("isAllowSign", state.isAllowSign);
|
if (nowTime < endTime && nowTime > beginTime) {
|
||||||
|
state.isAllowSign = true;
|
||||||
|
} else {
|
||||||
|
state.isAllowSign = false;
|
||||||
|
}
|
||||||
|
// console.log(
|
||||||
|
// "isAllowSign",
|
||||||
|
// state.isAllowSign,
|
||||||
|
// nowTime,
|
||||||
|
// endTime,
|
||||||
|
// beginTime,
|
||||||
|
// nowTime < endTime,
|
||||||
|
// nowTime > beginTime
|
||||||
|
// );
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
isSignClick();
|
isSignClick();
|
||||||
@@ -322,13 +310,20 @@ const signClick = () => {
|
|||||||
if (data.value.signFlag) {
|
if (data.value.signFlag) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log("data.signFlag", data.value.signFlag);
|
// console.log(
|
||||||
if (!isAllowSign) {
|
// "data.signFlag",
|
||||||
|
// data.value.signFlag,
|
||||||
|
// state.isAllowSign,
|
||||||
|
// !state.isAllowSign
|
||||||
|
// );
|
||||||
|
if (!state.isAllowSign) {
|
||||||
|
// console.log("data.signFlag", data.value.signFlag, isAllowSign);
|
||||||
ElMessage.info("未在签到范围内");
|
ElMessage.info("未在签到范围内");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
data.value.signFlag = 1;
|
data.value.signFlag = 1;
|
||||||
ElMessage.info("签到成功");
|
ElMessage.info("签到成功");
|
||||||
|
console.log("courseId", courseId, taskId, type);
|
||||||
request(TASK_BROADCAST_SIGN, { courseId: courseId, taskId, type });
|
request(TASK_BROADCAST_SIGN, { courseId: courseId, taskId, type });
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -368,6 +363,12 @@ function toExamItem(obj) {
|
|||||||
window.open(import.meta.env.VITE_BOE_EXAM_DETAIL_URL + obj.examinationTestId); //测评
|
window.open(import.meta.env.VITE_BOE_EXAM_DETAIL_URL + obj.examinationTestId); //测评
|
||||||
// router.push({ path: import.meta.env.VITE_BOE_EXAM_DETAIL_URL+ obj.examinationTestId });
|
// router.push({ path: import.meta.env.VITE_BOE_EXAM_DETAIL_URL+ obj.examinationTestId });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
if (timer) {
|
||||||
|
clearInterval(timer);
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||||
|
|||||||
@@ -15,23 +15,25 @@
|
|||||||
<div class="title">
|
<div class="title">
|
||||||
<div class="titleL">{{ i.stageName }}</div>
|
<div class="titleL">{{ i.stageName }}</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>
|
||||||
@@ -53,17 +55,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)',
|
||||||
@@ -76,13 +78,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)',
|
||||||
@@ -98,13 +100,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="goclass" @click="toFinish(value,i.name)">
|
<div class="goclass" @click="toFinish(value, i.name)">
|
||||||
{{
|
{{
|
||||||
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' }">-->
|
||||||
@@ -132,32 +134,32 @@
|
|||||||
<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">
|
||||||
<div style="padding: 19px 30px 17px 28px">-->
|
<div style="padding: 19px 30px 17px 28px">-->
|
||||||
<!-- <div-->
|
<!-- <div-->
|
||||||
<!-- v-for="(value, index) in sharedoc"-->
|
<!-- v-for="(value, index) in sharedoc"-->
|
||||||
<!-- :key="index"-->
|
<!-- :key="index"-->
|
||||||
<!-- style="-->
|
<!-- style="-->
|
||||||
<!-- display: flex;-->
|
<!-- display: flex;-->
|
||||||
<!-- align-items: center;-->
|
<!-- align-items: center;-->
|
||||||
<!-- margin-bottom: 15px;-->
|
<!-- margin-bottom: 15px;-->
|
||||||
<!-- "-->
|
<!-- "-->
|
||||||
<!-- >-->
|
<!-- >-->
|
||||||
<!-- <img :src="value.img" style="width: 22px; height: 26px" />-->
|
<!-- <img :src="value.img" style="width: 22px; height: 26px" />-->
|
||||||
<!-- <div class="sharedocname">{{ value.name }}</div>-->
|
<!-- <div class="sharedocname">{{ value.name }}</div>-->
|
||||||
<!-- <div class="download">-->
|
<!-- <div class="download">-->
|
||||||
<!-- <img-->
|
<!-- <img-->
|
||||||
<!-- src="../../assets/image/download.png"-->
|
<!-- src="../../assets/image/download.png"-->
|
||||||
<!-- style="width: 16px; height: 15px"-->
|
<!-- style="width: 16px; height: 15px"-->
|
||||||
<!-- />-->
|
<!-- />-->
|
||||||
<!-- <div style="margin-left: 7px">下载</div>-->
|
<!-- <div style="margin-left: 7px">下载</div>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<!-- </div>
|
<!-- </div>
|
||||||
</el-tab-pane>-->
|
</el-tab-pane>-->
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
@@ -167,26 +169,26 @@
|
|||||||
<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">
|
||||||
{{ userInfo?.realName }}
|
{{ userInfo?.realName }}
|
||||||
</div>
|
</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>-->
|
||||||
</div>
|
</div>
|
||||||
<div class="introduce">{{ userInfo?.bandDesc }}</div>
|
<div class="introduce">{{ userInfo?.bandDesc }}</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -195,8 +197,8 @@
|
|||||||
<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>
|
||||||
@@ -207,17 +209,16 @@
|
|||||||
<div class="ratebtn">继续学习</div>
|
<div class="ratebtn">继续学习</div>
|
||||||
</div>-->
|
</div>-->
|
||||||
|
|
||||||
|
|
||||||
<div style="margin-top: 16px">
|
<div style="margin-top: 16px">
|
||||||
<div class="progressBox">
|
<div class="progressBox">
|
||||||
<div>总进度</div>
|
<div>总进度</div>
|
||||||
<div class="progress">
|
<div class="progress">
|
||||||
<div style="width: 291px">
|
<div style="width: 291px">
|
||||||
<el-progress
|
<el-progress
|
||||||
:percentage="data.totalChapterCnt"
|
:percentage="data.totalChapterCnt"
|
||||||
: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)',
|
||||||
@@ -230,8 +231,8 @@
|
|||||||
/>
|
/>
|
||||||
</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)',
|
||||||
@@ -253,10 +254,10 @@
|
|||||||
<div class="progress">
|
<div class="progress">
|
||||||
<div style="width: 291px">
|
<div style="width: 291px">
|
||||||
<el-progress
|
<el-progress
|
||||||
:percentage="data.currentChapterCnt"
|
:percentage="data.currentChapterCnt"
|
||||||
: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)',
|
||||||
@@ -269,13 +270,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)',
|
||||||
@@ -301,7 +302,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {computed, reactive, ref} from "vue";
|
import { computed, reactive, ref } 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";
|
||||||
@@ -311,20 +312,22 @@ 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 {useRequest, request} from "@/api/request";
|
import { useRequest, request } from "@/api/request";
|
||||||
import {PROJECT_PROCESS, ROUTER_PROCESS, LINK_DETAILS} from "@/api/api";
|
import { PROJECT_PROCESS, ROUTER_PROCESS, LINK_DETAILS } from "@/api/api";
|
||||||
import {useRoute, useRouter} from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
import {ElMessage} from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
|
|
||||||
const {
|
const {
|
||||||
query: {courseId, projectId},
|
query: { courseId, projectId },
|
||||||
} = useRoute();
|
} = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const returnclick = () => {
|
const returnclick = () => {
|
||||||
router.back();
|
router.back();
|
||||||
};
|
};
|
||||||
const {data} = useRequest(PROJECT_PROCESS, {projectId: projectId || courseId});
|
const { data } = useRequest(PROJECT_PROCESS, {
|
||||||
|
projectId: projectId || courseId,
|
||||||
|
});
|
||||||
const userInfo = computed(() => store.state.userInfo);
|
const userInfo = computed(() => store.state.userInfo);
|
||||||
|
|
||||||
const activeName = ref("first");
|
const activeName = ref("first");
|
||||||
@@ -332,7 +335,7 @@ 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: {
|
||||||
@@ -372,34 +375,52 @@ 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: ({evaTyp, targetId}) => window.open((evaTyp === 1 ? import.meta.env.VITE_BOE_TEST_DETAIL_URL : import.meta.env.VITE_BOE_TEST_OUT_DETAIL_URL) + targetId), //测评
|
10: ({ evaType, targetId }) =>
|
||||||
|
window.open(
|
||||||
|
(evaType == 0
|
||||||
|
? 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",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
function toFinish(d,sName) {
|
function toFinish(d, sName) {
|
||||||
if (!types.value.path[d.type]) {
|
if (!types.value.path[d.type]) {
|
||||||
ElMessage.error("暂时未开放");
|
ElMessage.error("暂时未开放");
|
||||||
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: 2, 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: 2,
|
||||||
|
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>
|
||||||
|
|
||||||
|
|||||||
@@ -343,9 +343,9 @@ const returnclick = () => {
|
|||||||
router.back();
|
router.back();
|
||||||
};
|
};
|
||||||
const { data } = useRequest(ROUTER_PROCESS, { routerId });
|
const { data } = useRequest(ROUTER_PROCESS, { routerId });
|
||||||
|
console.log("data", 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) => {
|
||||||
@@ -416,6 +416,7 @@ function toFinish(d, sName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (typeof types.value.path[d.type] === "string") {
|
if (typeof types.value.path[d.type] === "string") {
|
||||||
|
// console.log("dddddd", d);
|
||||||
types.value.path[d.type] &&
|
types.value.path[d.type] &&
|
||||||
types.value.path[d.type].startsWith("http") &&
|
types.value.path[d.type].startsWith("http") &&
|
||||||
window.open(types.value.path[d.type] + d.targetId);
|
window.open(types.value.path[d.type] + d.targetId);
|
||||||
|
|||||||
Reference in New Issue
Block a user