Merge remote-tracking branch 'origin/manage-release' into release

This commit is contained in:
yujicun
2022-12-27 09:41:49 +08:00
10 changed files with 71 additions and 43 deletions

2
.env
View File

@@ -9,7 +9,7 @@ VITE_BOE_CASS_DETAIL_URL=https://u-pre.boe.com/pc/case/detail?id=
VITE_BOE_TEST_DETAIL_URL=https://u-pre.boe.com/web/quizsummary?detailId=
VITE_BOE_TEST_OUT_DETAIL_URL=https://u-pre.boe.com/api/b1/tale/do-quiz?quizKid=
VITE_BOE_EXAM_DETAIL_URL=https://u-pre.boe.com/pc/exam/test?id=
VITE_BOE_PATH_DETAIL_URL=http://u-pre.boe.com/pc/forward?to=/fe-student
VITE_BOE_PATH_DETAIL_URL=https://u-pre.boe.com/pc/forward?to=/fe-student
VITE_BOE_API_URL=https://u-pre.boe.com

View File

@@ -7,6 +7,6 @@ VITE_BOE_CASS_DETAIL_URL=https://u.boe.com/pc-release/case/detail?id=
VITE_BOE_TEST_DETAIL_URL=https://u.boe.com/web/quizsummary?detailId=
VITE_BOE_TEST_OUT_DETAIL_URL=https://u.boe.com/api/b1/tale/do-quiz?quizKid=
VITE_BOE_EXAM_DETAIL_URL=https://u.boe.com/pc-release/exam/test?id=
VITE_BOE_PATH_DETAIL_URL=http://u.boe.com/pc-release/forward?to=/fe-student-release
VITE_BOE_PATH_DETAIL_URL=https://u.boe.com/pc-release/forward?to=/fe-student-release
VITE_BOE_API_URL=https://u.boe.com

View File

@@ -94,7 +94,7 @@ export async function request(_url, params) {
}).then(resp => resp.data).then(response => {
if (response.code !== 200 && response.code !== 0) {
if (response.code === 1000) {
import.meta.env.MODE === 'development' ? router.push({ path: '/login' }) : window.open(import.meta.env.VITE_BASE_LOGIN_URL,'_self')
import.meta.env.MODE === 'development' ? router.push({ path: '/login' }) : window.open(import.meta.env.VITE_BASE_LOGIN_URL,'_top')
}
// if (import.meta.env.DEV && response.code === 1000) {
// router.push({path: '/login'})

View File

@@ -64,7 +64,7 @@ function toDetail(i) {
`${import.meta.env.VITE_BOE_PATH_DETAIL_URL}/pathdetails&params=${encodeURIComponent(
`routerId=${props.detail.routerId}&routerName=${props.detail.routerName}`
)}`
,'_self');
,'_top');
}
function close() {

View File

@@ -78,11 +78,7 @@
<div v-for="(el, index) in formateArr(data.planDto?.attach)" :key="index" class="enclosure"
:style="{ borderBottom: '1px solid rgba(56, 125, 247, 0.2)' }">
<div class="enclosureL">
<FileTypeImg :v-model="el.slice(el.indexOf('-') + 1)" :style="{
width: '22px',
height: '26px',
marginLeft: '10px',
}"></FileTypeImg>
<FileTypeImg :v-model="el.slice(el.indexOf('-') + 1)" :style="{width: '22px',height: '26px',marginLeft: '10px',}"></FileTypeImg>
<div style="margin-left: 20px">{{ el.slice(el.indexOf('-') + 1) }}</div>
</div>
<div v-if="new Date(data.planDto.beginTime).getTime() > new Date().getTime()" class="download">
@@ -123,7 +119,7 @@
此课程无作业
</div>
</el-tab-pane>
<el-tab-pane label="课程考试" name="third" :disabed=dayjs().isBefore(dayjs(data.planDto.beginTime))>
<el-tab-pane label="课程考试" name="third" :disabed=dayjs().isBefore(dayjs(data.planDto?.beginTime))>
<div class="work" v-if="data.examinationDto?.examinationTestName">
<div>
@@ -229,29 +225,29 @@ let timer = null;
//判断能否签到
function isSignClick() {
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 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) {
//有开始前有开始后
beginTime = beginTime - data.value.planDto.beforeStart * 60 * 1000;
endTime = endTime + data.value.planDto.afterStart * 60 * 1000;
beginTime = beginTime - data.value.planDto?.beforeStart * 60 * 1000;
endTime = endTime + data.value.planDto?.afterStart * 60 * 1000;
console.log("1111");
} else if (
data.value.planDto.beforeStart &&
!data.value.planDto.afterStart
data.value.planDto?.beforeStart &&
!data.value.planDto?.afterStart
) {
//只有开始前无开始后
beginTime = beginTime - data.value.planDto.beforeStart * 60 * 1000;
beginTime = beginTime - data.value.planDto?.beforeStart * 60 * 1000;
console.log("11112222");
} else if (
!data.value.planDto.beforeStart &&
data.value.planDto.afterStart
!data.value.planDto?.beforeStart &&
data.value.planDto?.afterStart
) {
//无开始前有开始后
endTime = endTime + data.value.planDto.afterStart * 60 * 1000;
endTime = endTime + data.value.planDto?.afterStart * 60 * 1000;
console.log("1111333");
}
if (nowTime < endTime && nowTime > beginTime) {
@@ -367,7 +363,7 @@ function toExamItem(obj) {
}
}
console.log("obj", obj.examinationTestId);
window.open(import.meta.env.VITE_BOE_EXAM_DETAIL_URL + obj.examinationTestId,'_self'); //测评
window.open(import.meta.env.VITE_BOE_EXAM_DETAIL_URL + obj.examinationTestId,'_top'); //测评
// router.push({ path: import.meta.env.VITE_BOE_EXAM_DETAIL_URL+ obj.examinationTestId });
}

View File

@@ -284,7 +284,7 @@ function showClick() {
return;
}
}
window.open(data.value.liveLink,'_self');
window.open(data.value.liveLink,'_top');
}
onUnmounted(() => {
if (timer) {

View File

@@ -13,7 +13,8 @@
<!-- 详细信息 -->
<div class="detailinfo">
<div class="detailL">
<div v-for="(i, k) in data.stageProcessList" :key="k">
<div v-if="data.stageProcessList" v-for="(i, k) in data.stageProcessList" :key="k">
{{ loading.close() }}
<div v-if="i.stageId == '0' && i.taskProcessList.length == 0"></div>
<div v-else class="title">
<div class="titleL">{{ i.stageName }}</div>
@@ -82,7 +83,7 @@
</div>
<div class="goclass" @click="toFinish(value, i.stageName, i.stageId)">
{{
value.status === 100
value.status === 1
? "已完成"
: types.path[value.type]
? types.toName[value.type]
@@ -102,6 +103,9 @@
<!-- </div>-->
</div>
</div>
<!-- <div ref="contentLoadingDom" id="loadings" v-else style="width:100%;height:400px;background:red;">
</div> -->
<!-- <div class="tag1">必修</div>
<div class="tag2">选修</div>
<div class="tag3">测评</div>
@@ -249,6 +253,7 @@
</template>
<script setup>
import { computed, reactive, ref } from "vue";
import { ElLoading } from 'element-plus'
import word from "@/assets/image/file/word.png";
import ppt from "@/assets/image/file/ppt.png";
import pdf from "@/assets/image/file/pdf.png";
@@ -280,6 +285,13 @@ const { data } = useRequest(PROJECT_PROCESS, {
console.log("datadata", data);
const loading = ref(false);
loading.value = ElLoading.service({
lock: true,
text: 'Loading',
background: 'rgba(0, 0, 0, 0.7)'
})
// const { onlinedata } = useRequest(ONLINE_PROCESS, {
// addView: false,
// cid:"1042123882713739264"
@@ -343,7 +355,7 @@ const types = ref({
6: "/livebroadcast",
7: ({ courseId }) =>
request(LINK_DETAILS(courseId), {}).then(({ data: { linkAddress } }) =>
window.open(linkAddress,'_self')
window.open(linkAddress,'_top')
), //外联
8: "/discusspage",
9: "/moreactive",
@@ -352,7 +364,7 @@ const types = ref({
(evaType == 0
? import.meta.env.VITE_BOE_TEST_DETAIL_URL
: import.meta.env.VITE_BOE_TEST_OUT_DETAIL_URL) + targetId
,'_self'), //测评
,'_top'), //测评
11: "/surveydetail",
12: "/ballotpage",
13: "/projectdetails",
@@ -365,6 +377,16 @@ const dialogVisibleTip = ref('该任务无法学习,请联系管理员进行
function toFinish(d, sName, chapterOrStageId) {
console.log("dddddd", d, sName, chapterOrStageId);
if (d.type == 2) {
let date1 = new Date(d.endTime).getTime();
let date2 = new Date().getTime();
if (date1 < date2) {
dialogVisibleTip.value = '当前面授课已结束';
dialogVisible.value = true;
//return
}
}
// 作业过期判断
if (d.type == 4) {
let date1 = new Date(d.endTime).getTime();
@@ -373,7 +395,7 @@ function toFinish(d, sName, chapterOrStageId) {
dialogVisibleTip.value = '当前作业已结束';
dialogVisible.value = true;
return
//return
}
}
// 直播结束时间
@@ -383,7 +405,7 @@ function toFinish(d, sName, chapterOrStageId) {
if (date1 < date2) {
dialogVisibleTip.value = '当前直播已结束';
dialogVisible.value = true;
return
//return
}
}
// 考试 停用
@@ -411,7 +433,7 @@ function toFinish(d, sName, chapterOrStageId) {
if (date1 < date2) {
dialogVisibleTip.value = '当前活动已结束';
dialogVisible.value = true;
return
//return
}
}
// 在线课 停用 -- 暂时没有在线课停用标记
@@ -449,7 +471,7 @@ function toFinish(d, sName, chapterOrStageId) {
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,'_self');
window.open(types.value.path[d.type] + d.targetId,'_top');
types.value.path[d.type] &&
types.value.path[d.type].startsWith("/") &&
router.push({

View File

@@ -31,7 +31,7 @@
<el-input v-model="projectname" placeholder="请输入项目名称" />
</div>
<div style="width: 420px">
<el-date-picker v-model="searchTime" type="daterange" range-separator="To" start-placeholder="开始时间" end-placeholder="结束时间" :size="size" @change="selectTime"/>
<el-date-picker v-model="searchTime" type="daterange" range-separator="" start-placeholder="开始时间" end-placeholder="结束时间" :size="size" @change="selectTime"/>
</div>
@@ -187,7 +187,7 @@ const goProjectDetails = (value) => {
: window.open(
`${import.meta.env.VITE_BOE_PATH_DETAIL_URL}/projectdetails&params=${encodeURIComponent(
`projectId=${value.projectId}`
,'_self')}`
,'_top')}`
);
};
</script>

View File

@@ -80,7 +80,7 @@
: scope.row.taskStatus === 2
? completed
: scope.row.taskStatus === 0
? nostarted
? ongoing
: null
" style="width: 99px; height: 99px"/>
</el-table-column>

View File

@@ -91,7 +91,7 @@
<div class="goclass" :style="{
background: `${types.path[value.type] ? '#2478ff' : '#999'}`,
}" @click="toFinish(value)">
{{ value.currentRatio === 100 ? "已完成" : types.path[value.type] ? types.toName[value.type] : "未开放" }}
{{ value.status === 1 ? "已完成" : types.path[value.type] ? types.toName[value.type] : "未开放" }}
</div>
<!-- <div :style="{ display: value.status === 1 ? 'block' : 'none' }">-->
<!-- <div-->
@@ -343,7 +343,7 @@ const types = ref({
6: "/livebroadcast",
7: ({ courseId }) =>
request(LINK_DETAILS(courseId), {}).then(({ data: { linkAddress } }) =>
window.open(linkAddress, '_self')
window.open(linkAddress, '_top')
), //外联
8: "/discusspage",
9: "/moreactive",
@@ -352,7 +352,7 @@ const types = ref({
(evaType == 0
? import.meta.env.VITE_BOE_TEST_DETAIL_URL
: import.meta.env.VITE_BOE_TEST_OUT_DETAIL_URL) + targetId
,'_self'), //测评
,'_top'), //测评
11: "/surveydetail",
12: "/ballotpage",
13: "/projectdetails",
@@ -366,6 +366,16 @@ function toFinish(d) {
ElMessage.error("暂时未开放");
return;
}
if (d.type == 2) {
let date1 = new Date(d.endTime).getTime();
let date2 = new Date().getTime();
if (date1 < date2) {
dialogVisibleTip.value = '当前面授课已结束';
dialogVisible.value = true;
//return
}
}
if (d.type == 4) {
let date1 = new Date(d.endTime).getTime();
let date2 = new Date().getTime();
@@ -373,7 +383,7 @@ function toFinish(d) {
dialogVisibleTip.value = '当前作业已结束';
dialogVisible.value = true;
return
//return
}
}
// 直播结束时间
@@ -383,7 +393,7 @@ function toFinish(d) {
if (date1 < date2) {
dialogVisibleTip.value = '当前直播已结束';
dialogVisible.value = true;
return
//return
}
}
// 考试 停用
@@ -411,7 +421,7 @@ function toFinish(d) {
if (date1 < date2) {
dialogVisibleTip.value = '当前活动已结束';
dialogVisible.value = true;
return
//return
}
}
// 在线课 停用 -- 暂时没有在线课停用标记
@@ -444,7 +454,7 @@ function toFinish(d) {
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,'_self');
window.open(types.value.path[d.type] + d.targetId,'_top');
types.value.path[d.type] &&
types.value.path[d.type].startsWith("/") &&
router.push({