feat:修改版本

This commit is contained in:
lixg
2023-02-28 17:10:08 +08:00
parent 01b905af96
commit 59de81a021
10 changed files with 441 additions and 120 deletions

5
.env
View File

@@ -14,9 +14,10 @@ VITE_BOE_PATH_DETAIL_URL=//u-pre.boe.com/pc/forward?to=/student-h5
VITE_BOE_API_URL=https://u-pre.boe.com
VITE_TASK_WHITE_TYPE=-8-,-12-,-13-
VITE_TASK_WHITE_TYPE=-22-
# boe域名
VITE_BOE_BASE_URL=//u-pre.boe.com
#评论上传图片
VITE_IMG=/manageApi
VITE_BASE_FILE_PATH=/fe-student-h5/upload
VITE_BASE_FILE_PATH=/fe-student-h5/upload
VITE_FILE_PATH=/upload/

View File

@@ -12,7 +12,7 @@ VITE_BOE_PATH_DETAIL_URL=//u.boe.com/pc/forward?to=/student-h5
VITE_BOE_API_URL=https://u.boe.com
VITE_TASK_WHITE_TYPE=-8-,-12-,-13-
VITE_TASK_WHITE_TYPE=-22-
VITE_BOE_BASE_URL=//u.boe.com
VITE_IMG=/manageApi

View File

@@ -27,7 +27,7 @@ import { GET_USER_INFO } from "@/api/ThirdApi";
import { getCookie } from "@/api/utils";
import { USER_INFO } from "@/api/api";
console.log("版本1.2.10------------");
console.log("版本1.2.11------------");
const store = useStore();
const router = useRouter();

View File

@@ -2,10 +2,57 @@
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2023-01-16 13:59:11
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2023-01-16 13:59:17
* @LastEditTime: 2023-02-28 16:38:39
* @FilePath: /stu_h5/src/api/CONST.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
export const PROJECT = 1;
export const ROUTER = 2;
export const COURSE = 3;
export const COURSE = 3;
export const TASK_TYPES = {
typeName: {
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: "去完成",
},
path: {
1: ({ courseId }) => window.open(window.location.protocol + import.meta.env.VITE_BOE_ONLINE_CLASS_URL + courseId), //在线
2: ({ courseId }) => window.open(`${location.protocol}//${location.host}${import.meta.env.VITE_BASE_API}/stu/project/redirectDetail?courseId=${courseId}`, '_top'),
3: ({ courseId }) => window.open(window.location.protocol + import.meta.env.VITE_BOE_CASS_DETAIL_URL + courseId), //案例
4: "/homeworkpage",
5: ({ examType }) => examType === 2 ? '/externalexam' : (window.location.protocol + import.meta.env.VITE_BOE_EXAM_DETAIL_URL), //考试
6: "/liveboradcast",
7: '/outerchain', //外联
8: "/discusspage",
9: "/activitiespage",
10: "/evaluation", //测评
11: "/investigatpage",
12: "/ballotpage",
13: "/projectdetails",
},
}

View File

@@ -1,18 +1,98 @@
/*
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2023-01-17 19:47:07
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2023-02-28 15:31:03
* @FilePath: /stu_h5/src/store/index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { createStore } from 'vuex'
import { PROJECT_PROCESS, ROUTER_PROCESS } from "@/api/api";
import { request } from "@/api/request";
import { TASK_TYPES } from "@/api/CONST";
export default createStore({
state: {
userInfo: {}
userInfo: {},
projectInfo: {},
routerInfo: {}
},
getters: {
},
mutations: {
SET_USER(state, userInfo) {
state.userInfo = userInfo
},
SET_PROJECT_INFO(state, info) {
state.projectInfo = info
},
INIT_PROJECT_INFO(state) {
if (state.projectInfo.status === -1) {
state.projectInfo.stageProcessList.forEach((t) => {
t.statusName = '已结束';
t.taskProcessList?.forEach((s) => s.statusName = '已结束')
})
return
}
if (state.projectInfo.unlockMode === 1) {
state.projectInfo.stageProcessList.forEach((t) => {
t.statusName = '进行中'
t.taskProcessList?.forEach((s) => s.statusName = (s.status === 1) ? '已完成' : TASK_TYPES.toName[s.type])
t.taskProcessList?.every((s) => s.status === 1) && (t.statusName = '已完成')
})
return
}
state.projectInfo.stageProcessList?.some((t) => {
t.statusName = '已完成'
const stageState = t.taskProcessList?.some((s) => {
s.unlock = true
s.statusName = '已完成'
s.status !== 1 && (s.statusName = TASK_TYPES.toName[s.type])
return state.projectInfo.unlockMode === 2 ? s.status !== 1 : (s.status !== 1 && s.flag)
})
stageState && (t.statusName = '进行中');
return stageState
})
},
SET_ROUTER_INFO(state, info) {
state.routerInfo = info
},
INIT_ROUTER_INFO(state) {
// state.routerInfo.unlockMode 1自由模式 2闯关模式 3 闯关模式 必修 flag true
if (state.routerInfo.status === -1) {
state.routerInfo.statusName = '已结束'
state.routerInfo.taskBoList.forEach((t) => t.statusName = '已结束')
return
}
state.routerInfo.statusName = '进行中'
if (state.routerInfo.unlockMode === 1) {
state.routerInfo.taskBoList?.forEach((s) => s.statusName = (s.status === 1) ? '已完成' : TASK_TYPES.toName[s.type])
state.routerInfo.taskBoList?.every((s) => s.status === 1) && (state.routerInfo.statusName = '已完成')
return
}
state.routerInfo.statusName = '已完成'
state.routerInfo.taskBoList?.some((s) => {
s.unlock = true
s.statusName = '已完成'
s.status !== 1 && (s.statusName = TASK_TYPES.toName[s.type])
return state.routerInfo.unlockMode === 2 ? s.status !== 1 : (s.status !== 1 && s.flag)
}) && (state.routerInfo.statusName = '进行中')
},
},
actions: {
getProjectInfo(content, { projectId }) {
request(PROJECT_PROCESS, { projectId }).then(res => {
content.commit('SET_PROJECT_INFO', res.data)
content.commit('INIT_PROJECT_INFO')
})
},
getRouterInfo(content, { routerId }) {
request(ROUTER_PROCESS, { routerId }).then(res => {
content.commit('SET_ROUTER_INFO', res.data)
content.commit('INIT_ROUTER_INFO')
})
},
},
modules: {
}
modules: {}
})

View File

@@ -128,7 +128,11 @@ editorConfig.MENU_CONF["uploadImage"] = {
closeLoading();
if (res.data.code === 200) {
// 最后插入图片 url alt href
insertFn(res.data.data, file.name, res.data.data);
insertFn(
import.meta.env.VITE_FILE_PATH + res.data.data,
file.name,
import.meta.env.VITE_FILE_PATH + res.data.data
);
}
});
},

View File

@@ -91,7 +91,7 @@
</div>
<img
v-if="values.singleOptionPictureAddress"
:src="values.singleOptionPictureAddress"
:src="fielPath + values.singleOptionPictureAddress"
style="
width: 70px;
height: 70px;
@@ -108,7 +108,6 @@
<div
v-for="(values, indexs) in value.multipleChoiceVoList"
:key="indexs"
style="display: flex; align-items: center"
:style="{ 'margin-top': '22px' }"
@click="
() => {
@@ -119,20 +118,36 @@
}
"
>
<img
style="width: 14px; height: 14px"
:src="values.select ? checkbox : checkbox2"
/>
<div
class="people"
style="
font-size: 13px;
margin-left: 7px;
margin-top: -2.5px;
"
>
{{ values.multipleOptionName }}
<div style="display: flex; align-items: center">
<img
style="width: 14px; height: 14px"
:src="values.select ? checkbox : checkbox2"
/>
<div
class="people"
style="
font-size: 13px;
margin-left: 7px;
margin-top: -2.5px;
"
>
{{ values.multipleOptionName }}
</div>
</div>
<img
v-if="values.multipleOptionPictureAddress"
:src="
values.multipleOptionPictureAddress
? fielPath + values.multipleOptionPictureAddress
: ''
"
style="
width: 70px;
height: 70px;
margin-left: 20px;
margin-top: 10px;
"
/>
</div>
</div>
</div>
@@ -211,6 +226,7 @@ import { ASSESSMENT_QUERY, ASSESSMENT_SUBMIT } from "@/api/api";
import { ElMessage } from "element-plus";
import ReturnHead from "@/components/ReturnHead.vue";
import dayjs from "dayjs";
const fielPath = ref(import.meta.env.VITE_FILE_PATH);
const {
query: {
courseId,

View File

@@ -31,21 +31,24 @@
<div
class="circular"
:style="
(stageStatusName === '未开始' ||
stageStatusName === '已结束') &&
'border: 1px solid #999;'
data.statusName === '已完成' || data.statusName === '进行中'
? 'border: 1px solid #0060ff'
: 'border: 1px solid #999'
"
></div>
<!-- <div class="text9">进行中</div> -->
<div
class="text9"
:style="
(stageStatusName === '未开始' ||
stageStatusName === '已结束') &&
'color:#999'
data.statusName === '已完成' || data.statusName === '进行中'
? 'color:#0060ff'
: 'color:#999'
"
>
{{ stageStatusName }}
{{
data.statusName ||
(data.unlockMode === 1 ? "未开始" : "未解锁")
}}
</div>
<!-- <div class="btn1"></div> -->
</div>
@@ -53,14 +56,16 @@
<div class="secondcontent">
<div
class="question"
v-for="(el, index) in data?.taskBoList"
v-for="(el, index) in data?.taskBoList?.filter(
(e) => !whiteTypes(e.type)
)"
:key="index"
:style="{
height: el.type === 1 ? '90px' : '72px',
}"
>
<div style="width: calc(100% - 80px)">
<div class="issue">
<div class="issue" :title="el.name">
{{ el.name }}
</div>
<div v-if="el.type === 1" class="progressBox">
@@ -128,23 +133,26 @@
选修
</div>
<div class="tag3" style="margin-right: 11px; margin-top: 3px">
{{ types.typeName[el.type] || "" }}
{{ TASK_TYPES.typeName[el.type] || "" }}
</div>
</div>
</div>
<div
class="goclass"
:style="{
background: `${types.path[el.type] ? '#2478ff' : '#999'}`,
background:
el.statusName !== '已结束' &&
(el.statusName || data.unlockMode === 1)
? '#2478ff'
: '#999',
}"
@click="toFinish(el)"
>
{{
el.status === 1
? "已完成"
: types.path[el.type]
? types.toName[el.type]
: "未开放"
el.statusName ||
(data.unlockMode === 1
? TASK_TYPES.toName[el.type]
: "未解锁")
}}
</div>
</div>
@@ -156,7 +164,7 @@
</template>
<script setup>
import { computed, reactive, ref, watch } from "vue";
import { computed, reactive, ref, watch, onMounted } from "vue";
// import circle from "../../assets/image/pathdetails/circle.png";
// import circle2 from "../../assets/image/pathdetails/circle2.png";
import { boeRequest, useRequest, request } from "@/api/request";
@@ -170,8 +178,9 @@ import {
import { useRoute, useRouter } from "vue-router";
import { ElMessage } from "element-plus";
import store from "@/store";
import { ROUTER } from "@/api/CONST";
import { ROUTER, TASK_TYPES } from "@/api/CONST";
import ReturnHead from "@/components/ReturnHead.vue";
import { useStore } from "vuex";
const {
query: { routerId, routerName },
} = useRoute();
@@ -179,22 +188,12 @@ const router = useRouter();
const returnclick = () => {
router.back();
};
const { data } = useRequest(ROUTER_PROCESS, { routerId: routerId });
const stageStatusName = computed(() => {
if (data.value.status !== 1) {
return "已结束";
}
if (!data.value.taskBoList?.filter((t) => t.status === 1)?.length) {
return "未开始";
}
if (
data.value.taskBoList.filter((t) => t.status === 1).length ===
data.value.taskBoList.length
) {
return "已完成";
}
return "进行中";
const { commit, dispatch, state } = useStore();
const data = computed(() => state.routerInfo);
onMounted(() => {
dispatch("getRouterInfo", { routerId });
});
const userInfo = computed(() => store.state.userInfo);
console.log("lalalallala", data, userInfo);
const activeName = ref("first");
@@ -272,10 +271,63 @@ const types = ref({
},
});
// 判断当前任务已结束及时间意义上的结束 提示用户
function judgeTaskIsEnd(type, endTimes, status) {
// type 任务类型 endTime 结束时间 status 任务状态 (状态 0 未完成 1 已完成 2 未开始 -1 已结束)
console.log(type, endTimes, status);
let isEnd = false;
let nowTime = new Date().getTime();
let endTime = new Date().getTime(endTimes);
switch (type) {
case 1:
status == -1
? (isEnd = true)
: nowTime > endTime
? (isEnd = true)
: (isEnd = false);
break;
// case 3:
// status == 3 ? isEnd = true : nowTime > endTime ? isEnd = true : isEnd = false;
// break;
case 5:
status == -1
? (isEnd = true)
: nowTime > endTime
? (isEnd = true)
: (isEnd = false);
break;
case 7:
status == -1
? (isEnd = true)
: nowTime > endTime
? (isEnd = true)
: (isEnd = false);
break;
case 10:
status == -1
? (isEnd = true)
: nowTime > endTime
? (isEnd = true)
: (isEnd = false);
break;
}
return isEnd;
}
function toFinish(d) {
console.log(d);
console.log(data.value.currentStageId, routerId);
if (!types.value.path[d.type]) {
if (data.value.unlockMode !== 1 && !d.statusName) {
ElMessage.warning("当前未解锁");
return;
}
if (
data.value.endTime &&
judgeTaskIsEnd(d.type, data.value.endTime, data.value.status)
) {
ElMessage.error("当前任务已结束");
return;
}
if (!TASK_TYPES.path[d.type]) {
ElMessage.error("暂时未开放");
return;
}
@@ -376,20 +428,15 @@ function toFinish(d) {
pid: routerId,
name: d.name,
});
if (typeof types.value.path[d.type] === "string") {
// console.log(
// "types.value.path[d.type]",
// types.value.path[d.type],
// import.meta.env.VITE_BOE_EXAM_DETAIL_URL,
// import.meta.env.VITE_BOE_ONLINE_CLASS_URL
// );
types.value.path[d.type] &&
types.value.path[d.type].startsWith("http") &&
window.open(types.value.path[d.type] + d.targetId, "_top");
types.value.path[d.type] &&
types.value.path[d.type].startsWith("/") &&
router.push({
path: types.value.path[d.type],
const path =
typeof TASK_TYPES.path[d.type] === "string"
? TASK_TYPES.path[d.type]
: TASK_TYPES.path[d.type](d);
path && path.startsWith("http")
? window.open(path + d.targetId, "_top")
: path.startsWith("/")
? router.push({
path,
query: {
id: d.id,
type: ROUTER,
@@ -404,12 +451,45 @@ function toFinish(d) {
evaType: d.evaType,
btype: 2,
},
});
} else if (typeof types.value.path[d.type] === "function") {
console.log("ddddddd", d);
types.value.path[d.type](d);
// console.log("types.value.path[d.type](d)", d);
}
})
: "";
// if (typeof types.value.path[d.type] === "string") {
// // console.log(
// // "types.value.path[d.type]",
// // types.value.path[d.type],
// // import.meta.env.VITE_BOE_EXAM_DETAIL_URL,
// // import.meta.env.VITE_BOE_ONLINE_CLASS_URL
// // );
// types.value.path[d.type] &&
// types.value.path[d.type].startsWith("http") &&
// window.open(types.value.path[d.type] + d.targetId, "_top");
// types.value.path[d.type] &&
// types.value.path[d.type].startsWith("/") &&
// router.push({
// path: types.value.path[d.type],
// query: {
// id: d.id,
// type: ROUTER,
// infoId: routerId,
// courseId: d.courseId,
// pName: data.value.name,
// sName: data.value.currentStageName,
// chapterOrStageId: data.value.currentStageId,
// studentId: userInfo.value.id,
// status: d.status,
// targetId: d.targetId,
// evaType: d.evaType,
// btype: 2,
// },
// });
// } else if (typeof types.value.path[d.type] === "function") {
// console.log("ddddddd", d);
// types.value.path[d.type](d);
// // console.log("types.value.path[d.type](d)", d);
// }
}
function whiteTypes(type) {
return import.meta.env.VITE_TASK_WHITE_TYPE.includes("-" + type + "-");
}
</script>

View File

@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2023-01-19 11:28:11
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2023-02-28 14:47:12
* @LastEditTime: 2023-02-28 16:40:49
* @FilePath: /stu_h5/src/views/projectdetails/ProjectPath.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
@@ -179,15 +179,15 @@ const handleClick = (tab, event) => {
console.log("selectTab", selectTab.value);
};
const goDetails = () => {
// router.push({
// path: "/pathdetails",
// query: { routerId: 459 },
// });
router.push({
path: "/projectdetails",
query: { projectId: 684 },
path: "/pathdetails",
query: { routerId: 462 },
});
// router.push({
// path: "/projectdetails",
// query: { projectId: 684 },
// });
// router.push({
// path: "/faceteach",
// query: { type: 3, courseId: 290 },
// });

View File

@@ -51,33 +51,90 @@
border: 2px solid #999;
"
:style="
(item.stageStatusName === '未开始' ||
item.stageStatusName === '已结束') &&
'border: 1px solid #999;'
item.statusName === '已完成' || item.statusName === '进行中'
? 'border: 2px solid #0060ff'
: 'border: 1px solid #999;'
"
></div>
<div
class="text9"
:style="
(item.stageStatusName === '未开始' ||
item.stageStatusName === '已结束') &&
'color:#999'
item.statusName === '已完成' || item.statusName === '进行中'
? 'color:#0060ff'
: 'color:#999'
"
>
{{ item.stageStatusName }}
{{
item.statusName ||
(data.unlockMode === 1 ? "未开始" : "未解锁")
}}
</div>
</div>
</div>
<div class="secondcontent">
<div
class="question"
v-for="(el, index) in item.taskProcessList"
v-for="(el, index) in item.taskProcessList
.sort((a, b) => {
return a.id - b.id;
})
.filter((e) => !whiteTypes(e.type))"
:key="index"
:style="{ height: el.type === 1 ? '90px' : '72px' }"
>
<div style="width: calc(100% - 80px)">
<div class="issue">
<div class="issue" :title="el.name">
{{ el.name }}
</div>
<div v-if="el.type === 1" class="progressBox">
<!-- <div>当前进度</div> -->
<div
class="progress"
style="
display: flex;
align-items: center;
margin-bottom: 3px;
"
>
<div style="width: 200px">
<el-progress
:percentage="parseInt(el.currentRatio)"
:show-text="false"
:stroke-width="8"
: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(parseInt(el.currentRatio) / 20)]
"
/>
</div>
<div
style="
font-size: 12px;
font-weight: 500;
color: #277aff;
margin-left: 10px;
"
:style="{
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(parseInt(el.currentRatio) / 20)],
}"
>
{{ parseInt(el.currentRatio) }}%
</div>
</div>
</div>
<div class="coursetag">
<div
class="tag1"
@@ -97,23 +154,26 @@
class="tag3"
style="margin-right: 11px; margin-top: 3px"
>
{{ types.typeName[el.type] || "" }}
{{ TASK_TYPES.typeName[el.type] || "" }}
</div>
</div>
</div>
<div
class="goclass"
:style="{
background: `${types.path[el.type] ? '#2478ff' : '#999'}`,
}"
@click="toFinish(el)"
:style="{
background:
el.statusName !== '已结束' &&
(el.statusName || data.unlockMode === 1)
? '#2478ff'
: '#999',
}"
>
{{
el.status === 1
? "已完成"
: types.path[el.type]
? types.toName[el.type]
: "未开放"
el.statusName ||
(data.unlockMode === 1
? TASK_TYPES.toName[el.type]
: "未解锁")
}}
</div>
</div>
@@ -143,7 +203,7 @@
</template>
<script setup>
import { computed, reactive, ref, watch } from "vue";
import { computed, reactive, ref, watch, onMounted } from "vue";
import { ElLoading } from "element-plus";
import { useRequest, request } from "@/api/request";
import {
@@ -157,15 +217,18 @@ import { useRoute, useRouter } from "vue-router";
import store from "@/store";
import { ElMessage } from "element-plus";
import ReturnHead from "@/components/ReturnHead.vue";
import { PROJECT } from "@/api/CONST";
import { PROJECT, TASK_TYPES } from "@/api/CONST";
import dayjs from "dayjs";
import { useStore } from "vuex";
const {
query: { courseId, projectId },
} = useRoute();
const router = useRouter();
const { commit, dispatch, state } = useStore();
const data = computed(() => state.projectInfo);
const { data } = useRequest(PROJECT_PROCESS, {
projectId: projectId || courseId,
onMounted(() => {
dispatch("getProjectInfo", { projectId });
});
watch(
() => data.value.stageProcessList,
@@ -334,6 +397,10 @@ function judgeTaskIsEnd(type, endTimes, status) {
}
function toFinish(d, sName, chapterOrStageId) {
if (data.value.unlockMode !== 1 && !d.statusName) {
ElMessage.warning("当前未解锁");
return;
}
console.log("dddddd", data, d, sName, chapterOrStageId);
if (judgeTaskIsEnd(d.type, data.value.endTime, data.value.status)) {
@@ -430,7 +497,7 @@ function toFinish(d, sName, chapterOrStageId) {
}
}
if (!types.value.path[d.type]) {
if (!TASK_TYPES.path[d.type]) {
ElMessage.error("暂时未开放");
return;
}
@@ -438,18 +505,18 @@ function toFinish(d, sName, chapterOrStageId) {
//更新学员当前任务
request(UPDATE_CURRENT_TASK, {
id: d.id,
type: ROUTER,
pid: routerId,
type: PROJECT,
pid: projectId,
name: d.name,
});
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, "_top");
types.value.path[d.type] &&
types.value.path[d.type].startsWith("/") &&
if (typeof TASK_TYPES.path[d.type] === "string") {
TASK_TYPES.path[d.type] &&
TASK_TYPES.path[d.type].startsWith("http") &&
window.open(TASK_TYPES.path[d.type] + d.targetId, "_top");
TASK_TYPES.path[d.type] &&
TASK_TYPES.path[d.type].startsWith("/") &&
router.push({
path: types.value.path[d.type],
path: TASK_TYPES.path[d.type],
query: {
id: d.id,
type: PROJECT,
@@ -465,9 +532,35 @@ function toFinish(d, sName, chapterOrStageId) {
btype: 1,
},
});
} else if (typeof types.value.path[d.type] === "function") {
types.value.path[d.type](d);
} else if (typeof TASK_TYPES.path[d.type] === "function") {
TASK_TYPES.path[d.type](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, "_top");
// types.value.path[d.type] &&
// types.value.path[d.type].startsWith("/") &&
// router.push({
// path: types.value.path[d.type],
// query: {
// id: d.id,
// type: PROJECT,
// infoId: data.value.projectId,
// courseId: d.courseId,
// pName: data.value.name,
// sName,
// chapterOrStageId: data.value.currentStageId,
// studentId: userInfo.value.id,
// status: d.status,
// targetId: d.targetId,
// evaType: d.evaType,
// btype: 1,
// },
// });
// } else if (typeof types.value.path[d.type] === "function") {
// types.value.path[d.type](d);
// }
}
function whiteTypes(type) {
return import.meta.env.VITE_TASK_WHITE_TYPE.includes("-" + type + "-");