mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-07 01:46:46 +08:00
feat:修改投票
This commit is contained in:
@@ -34,9 +34,9 @@ export const TASK_TYPES = {
|
||||
13: "去完成",
|
||||
},
|
||||
path: {
|
||||
1: window.location.protocol + import.meta.env.VITE_BOE_ONLINE_CLASS_URL, //在线
|
||||
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: window.location.protocol + import.meta.env.VITE_BOE_CASS_DETAIL_URL, //案例
|
||||
3: ({courseId}) => window.open(window.location.protocol + import.meta.env.VITE_BOE_CASS_DETAIL_URL + courseId), //案例
|
||||
4: "/homeworkpage",
|
||||
5: ({examType}) => examType === 2 ? '/externalexamination' : (window.location.protocol + import.meta.env.VITE_BOE_EXAM_DETAIL_URL), //考试
|
||||
6: "/livebroadcast",
|
||||
|
||||
@@ -120,6 +120,9 @@ export const GetMoreComments = `/statement/getMoreComments`
|
||||
// 查询讨论下的帖子
|
||||
export const PostList = `/statement/list`
|
||||
|
||||
// 查询单个测评的状态
|
||||
export const QueryEvaluationTaskStatusOne = `/evaluation/queryEvaluationTaskStatusOne`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -30,11 +30,8 @@ export default createStore({
|
||||
if (state.projectInfo.unlockMode === 1) {
|
||||
state.projectInfo.stageProcessList.forEach((t) => {
|
||||
t.statusName = '进行中'
|
||||
const stageState = t.taskProcessList?.every((s) => {
|
||||
s.statusName = s.status === 1 ? '已完成' : TASK_TYPES.toName[s.type]
|
||||
return s.status === 1
|
||||
})
|
||||
stageState && (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
|
||||
}
|
||||
@@ -77,13 +74,13 @@ export default createStore({
|
||||
},
|
||||
actions: {
|
||||
getProjectInfo(content, {projectId}) {
|
||||
content.state.projectInfo.projectId || request(PROJECT_PROCESS, {projectId}).then(res => {
|
||||
request(PROJECT_PROCESS, {projectId}).then(res => {
|
||||
content.commit('SET_PROJECT_INFO', res.data)
|
||||
content.commit('INIT_PROJECT_INFO')
|
||||
})
|
||||
},
|
||||
getRouterInfo(content, {routerId}) {
|
||||
content.state.routerInfo.routerId || request(ROUTER_PROCESS, {routerId}).then(res => {
|
||||
request(ROUTER_PROCESS, {routerId}).then(res => {
|
||||
content.commit('SET_ROUTER_INFO', res.data)
|
||||
content.commit('INIT_ROUTER_INFO')
|
||||
})
|
||||
|
||||
@@ -79,7 +79,6 @@
|
||||
<div class="item2">浏览数</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="title">
|
||||
<img
|
||||
style="width: 20px; height: 20px"
|
||||
@@ -88,10 +87,9 @@
|
||||
<div class="text">参与投票</div>
|
||||
<div class="box"></div>
|
||||
</div>
|
||||
|
||||
<div class="join">
|
||||
<div
|
||||
v-for="(item, index) in state.dataInfo?.voteStemDtoList"
|
||||
v-for="(item, index) in state.dataInfo.voteStemDtoList"
|
||||
:key="index"
|
||||
style="margin-bottom: 41px"
|
||||
>
|
||||
@@ -219,7 +217,6 @@
|
||||
style="width: 20px; height: 20px"
|
||||
src="../../assets/image/yuan.png"
|
||||
/>
|
||||
|
||||
<div class="text">投票说明</div>
|
||||
<div class="box"></div>
|
||||
</div>
|
||||
@@ -240,7 +237,6 @@
|
||||
<!-- 详细信息 -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRequest, request } from "@/api/request";
|
||||
import { VOTE_DETAIL2, VOTE_DETAIL3, VOTE_DETAIL_SUBMIT } from "@/api/api";
|
||||
@@ -267,11 +263,9 @@ const returnclick = () => {
|
||||
const state = reactive({
|
||||
dataInfo: {},
|
||||
});
|
||||
|
||||
//获取基本信息
|
||||
// const {data: dataInfo} = useRequest(VOTE_DETAIL2(courseId));
|
||||
const userInfo = computed(() => store.state.userInfo);
|
||||
|
||||
let timer = setInterval(() => {
|
||||
if (userInfo.value.id) {
|
||||
clearInterval(timer);
|
||||
@@ -282,7 +276,6 @@ let timer = setInterval(() => {
|
||||
targetId: infoId,
|
||||
type: btype,
|
||||
});
|
||||
|
||||
request(VOTE_DETAIL3(courseId), {})
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
@@ -293,12 +286,9 @@ let timer = setInterval(() => {
|
||||
});
|
||||
}
|
||||
}, 500);
|
||||
|
||||
console.log("我是获取的投票基本信息", state.dataInfo);
|
||||
|
||||
// 答题时间
|
||||
const answerTime = dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss");
|
||||
|
||||
// 选择题目
|
||||
const choiceQuestion = (order, id, dates, torder) => {
|
||||
// 当已经提交过时候 不让选择题目
|
||||
@@ -306,56 +296,51 @@ const choiceQuestion = (order, id, dates, torder) => {
|
||||
return;
|
||||
}
|
||||
console.log("当前选择题目的id及序号", order, id, dates, torder);
|
||||
console.log("state.dataInfo", state.dataInfo);
|
||||
for (
|
||||
let i = 0;
|
||||
i < dates.voteStemDtoList[torder].optionDetailList.length;
|
||||
i < state.dataInfo.voteStemDtoList[torder].optionDetailList.length;
|
||||
i++
|
||||
) {
|
||||
dates.voteStemDtoList[torder].optionDetailList[i].isAnswer = false;
|
||||
state.dataInfo.voteStemDtoList[torder].optionDetailList[i].isAnswer = false;
|
||||
}
|
||||
dates.voteStemDtoList[torder].optionDetailList[order].isAnswer = true;
|
||||
console.log(state.dataInfo);
|
||||
state.dataInfo.voteStemDtoList[torder].optionDetailList[
|
||||
order
|
||||
].isAnswer = true;
|
||||
};
|
||||
|
||||
// 提交投票
|
||||
const submitVote = () => {
|
||||
console.log(state.dataInfo);
|
||||
let nowTime = new Date().getTime();
|
||||
let maxTime = new Date(state.dataInfo.voteEndTime).getTime();
|
||||
let minTime = new Date(state.dataInfo.voteStartTime).getTime();
|
||||
|
||||
console.log(nowTime, maxTime, minTime);
|
||||
// 当未到开始时间
|
||||
if (nowTime < minTime || nowTime > maxTime) {
|
||||
ElMessage.error("未到投票开始时间");
|
||||
return;
|
||||
}
|
||||
|
||||
// 当已经提交过时候 不让提交即可
|
||||
if (state.dataInfo.isSubmit) {
|
||||
return;
|
||||
}
|
||||
let isSubmit = true;
|
||||
let isSubArr = [];
|
||||
console.log("state.dataInfo", state.dataInfo);
|
||||
if (state.dataInfo) {
|
||||
for (let i = 0; i < state.dataInfo.voteStemDtoList.length; i++) {
|
||||
for (
|
||||
let j = 0;
|
||||
j < state.dataInfo.voteStemDtoList[i].optionDetailList.length;
|
||||
j++
|
||||
) {
|
||||
if (state.dataInfo.voteStemDtoList[i].optionDetailList[j].isAnswer) {
|
||||
isSubArr[i] =
|
||||
state.dataInfo.voteStemDtoList[i].optionDetailList[j].isAnswer;
|
||||
break;
|
||||
} else {
|
||||
isSubArr[i] = false;
|
||||
}
|
||||
for (let i = 0; i < state.dataInfo.voteStemDtoList.length; i++) {
|
||||
for (
|
||||
let j = 0;
|
||||
j < state.dataInfo.voteStemDtoList[i].optionDetailList.length;
|
||||
j++
|
||||
) {
|
||||
if (state.dataInfo.voteStemDtoList[i].optionDetailList[j].isAnswer) {
|
||||
isSubArr[i] =
|
||||
state.dataInfo.voteStemDtoList[i].optionDetailList[j].isAnswer;
|
||||
break;
|
||||
} else {
|
||||
isSubArr[i] = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (let i = 0; i < isSubArr.length; i++) {
|
||||
if (isSubArr[i] == false) {
|
||||
isSubmit = false;
|
||||
@@ -366,7 +351,6 @@ const submitVote = () => {
|
||||
ElMessage.error("请选择投票问题后进行提交");
|
||||
return;
|
||||
}
|
||||
|
||||
let obj = {
|
||||
beginTime: answerTime,
|
||||
chapterOrStageId: chapterOrStageId ? chapterOrStageId : 0,
|
||||
@@ -374,11 +358,11 @@ const submitVote = () => {
|
||||
targetId: infoId, // 项目 路径图 id
|
||||
taskId: id,
|
||||
type: btype, // 1 项目 2 路径图
|
||||
voteId: state.dataInfo.voteId,
|
||||
voteId: state.dataInfo.id,
|
||||
voteName: state.dataInfo.voteName,
|
||||
};
|
||||
|
||||
console.log("我是投票提交的信息", obj);
|
||||
|
||||
useRequest(VOTE_DETAIL_SUBMIT, obj, (e) => {
|
||||
console.log(e);
|
||||
request(VOTE_DETAIL3(courseId), {})
|
||||
@@ -407,7 +391,6 @@ const submitVote = () => {
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style scoped lang="scss">
|
||||
.clearfix:before,
|
||||
@@ -416,7 +399,6 @@ const submitVote = () => {
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.moreactive {
|
||||
.crumb {
|
||||
color: #fff;
|
||||
@@ -438,7 +420,6 @@ const submitVote = () => {
|
||||
.preNext {
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
|
||||
.content {
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
@@ -449,7 +430,6 @@ const submitVote = () => {
|
||||
top: -6px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: 23px;
|
||||
height: 23px;
|
||||
@@ -457,16 +437,13 @@ const submitVote = () => {
|
||||
border: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn01 {
|
||||
background-image: url("../../assets/image/prev.png");
|
||||
}
|
||||
|
||||
.btn02 {
|
||||
background-image: url("../../assets/image/next.png");
|
||||
}
|
||||
}
|
||||
|
||||
.debateTitle {
|
||||
margin-top: 15px;
|
||||
font-size: 20px;
|
||||
@@ -476,12 +453,10 @@ const submitVote = () => {
|
||||
color: #fff;
|
||||
margin-left: -10px;
|
||||
}
|
||||
|
||||
.detailinfo {
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
display: flex;
|
||||
|
||||
.detail {
|
||||
flex: 1;
|
||||
// margin-right: 20px;
|
||||
@@ -492,28 +467,23 @@ const submitVote = () => {
|
||||
color: rgba(51, 51, 51, 1);
|
||||
display: flex;
|
||||
padding-bottom: 20px;
|
||||
|
||||
.left {
|
||||
margin-left: 48px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.right {
|
||||
width: 417px;
|
||||
margin-right: 48px;
|
||||
|
||||
.righttitle {
|
||||
display: flex;
|
||||
padding-top: 39px;
|
||||
position: relative;
|
||||
|
||||
.text {
|
||||
margin-left: 8px;
|
||||
font-size: 16px;
|
||||
color: rgba(51, 51, 51, 1);
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.box {
|
||||
width: 75px;
|
||||
height: 10px;
|
||||
@@ -523,7 +493,6 @@ const submitVote = () => {
|
||||
top: 53px;
|
||||
}
|
||||
}
|
||||
|
||||
.timebox {
|
||||
width: 417px;
|
||||
height: 149px;
|
||||
@@ -531,7 +500,6 @@ const submitVote = () => {
|
||||
border-radius: 4px;
|
||||
margin-top: 42px;
|
||||
}
|
||||
|
||||
.innertime {
|
||||
margin-top: 17px;
|
||||
margin-left: 55px;
|
||||
@@ -540,7 +508,6 @@ const submitVote = () => {
|
||||
color: #ffffff;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.endtime {
|
||||
margin-left: 10px;
|
||||
margin-top: 16px;
|
||||
@@ -548,11 +515,9 @@ const submitVote = () => {
|
||||
height: 81px;
|
||||
background: #f2f5f7;
|
||||
border-radius: 0px 8px 0px 8px;
|
||||
|
||||
.endtimetext {
|
||||
margin-top: 25px;
|
||||
margin-left: 46px;
|
||||
|
||||
.te {
|
||||
font-size: 28px;
|
||||
font-weight: 800;
|
||||
@@ -561,7 +526,6 @@ const submitVote = () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.explain {
|
||||
margin-top: 30px;
|
||||
width: 416px;
|
||||
@@ -569,7 +533,6 @@ const submitVote = () => {
|
||||
background: #f2f5f7;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.explaincontent {
|
||||
width: 368px;
|
||||
font-size: 16px;
|
||||
@@ -580,21 +543,18 @@ const submitVote = () => {
|
||||
margin-top: 47px;
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-top: 39px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.title .text {
|
||||
margin-left: 8px;
|
||||
font-size: 16px;
|
||||
color: rgba(51, 51, 51, 1);
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.title .box {
|
||||
width: 75px;
|
||||
height: 10px;
|
||||
@@ -603,14 +563,12 @@ const submitVote = () => {
|
||||
left: 23px;
|
||||
top: 53px;
|
||||
}
|
||||
|
||||
.all {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
// width: 1280px;
|
||||
margin-right: 48px;
|
||||
margin-top: 43px;
|
||||
|
||||
.allbox1 {
|
||||
margin-right: 22px;
|
||||
background: linear-gradient(
|
||||
@@ -619,7 +577,6 @@ const submitVote = () => {
|
||||
rgba(161, 195, 231, 0.2) 100%
|
||||
);
|
||||
}
|
||||
|
||||
.allbox2 {
|
||||
margin-right: 22px;
|
||||
background: linear-gradient(
|
||||
@@ -628,7 +585,6 @@ const submitVote = () => {
|
||||
rgba(172, 216, 227, 0.2) 100%
|
||||
);
|
||||
}
|
||||
|
||||
.allbox3 {
|
||||
background: linear-gradient(
|
||||
0deg,
|
||||
@@ -636,21 +592,18 @@ const submitVote = () => {
|
||||
rgba(191, 206, 231, 0.2) 100%
|
||||
);
|
||||
}
|
||||
|
||||
.item {
|
||||
// width: 410px;
|
||||
width: calc(100% - 44px);
|
||||
height: 149px;
|
||||
text-align: center;
|
||||
border-radius: 4px;
|
||||
|
||||
.item1 {
|
||||
color: #089dff;
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
margin-top: 36px;
|
||||
}
|
||||
|
||||
.item2 {
|
||||
color: #333330;
|
||||
font-size: 14px;
|
||||
@@ -658,7 +611,6 @@ const submitVote = () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.join {
|
||||
// width: 1280px;
|
||||
margin-right: 48px;
|
||||
@@ -668,7 +620,6 @@ const submitVote = () => {
|
||||
margin-top: 32px;
|
||||
margin-left: 21px;
|
||||
flex: 1;
|
||||
|
||||
.stem {
|
||||
display: flex;
|
||||
font-size: 16px;
|
||||
@@ -676,26 +627,22 @@ const submitVote = () => {
|
||||
color: #333330;
|
||||
line-height: 38px;
|
||||
}
|
||||
|
||||
.options {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.radio {
|
||||
margin-top: 14px;
|
||||
margin-left: -16px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.radio label {
|
||||
line-height: 20px;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-weight: normal;
|
||||
|
||||
.opt-text {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
@@ -704,7 +651,6 @@ const submitVote = () => {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.radio .option {
|
||||
width: 19px;
|
||||
height: 18px;
|
||||
@@ -716,21 +662,17 @@ const submitVote = () => {
|
||||
background: url(../../assets/image/noselect.png) no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.radio input[type="radio"] {
|
||||
display: inline-block;
|
||||
margin-right: -3px;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.radio input[type="radio"]:checked + div {
|
||||
background: url(../../assets/image/select.png) no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.imgcontent {
|
||||
display: flex;
|
||||
|
||||
.imgone {
|
||||
width: 140px;
|
||||
height: 140px;
|
||||
@@ -740,7 +682,6 @@ const submitVote = () => {
|
||||
background-position: center;
|
||||
}
|
||||
}
|
||||
|
||||
.ontitle {
|
||||
margin-top: 27px;
|
||||
font-size: 14px;
|
||||
@@ -748,24 +689,20 @@ const submitVote = () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.detailB {
|
||||
min-height: 363px;
|
||||
background: #ffffff;
|
||||
border-radius: 8px;
|
||||
margin-top: 20px;
|
||||
|
||||
.el-tabs__item {
|
||||
height: 69px;
|
||||
padding: 25px 7px 0px 52px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.el-tabs__nav-wrap::after {
|
||||
background-color: rgba(56, 125, 247, 0.2);
|
||||
}
|
||||
|
||||
.enclosure {
|
||||
height: 89px;
|
||||
margin-left: 51px;
|
||||
@@ -774,7 +711,6 @@ const submitVote = () => {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.enclosureL {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -783,7 +719,6 @@ const submitVote = () => {
|
||||
color: #677d86;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.download {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -794,7 +729,6 @@ const submitVote = () => {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.work {
|
||||
margin-left: 51px;
|
||||
margin-right: 40px;
|
||||
@@ -803,14 +737,12 @@ const submitVote = () => {
|
||||
align-items: center;
|
||||
margin-top: 37px;
|
||||
}
|
||||
|
||||
.work .question {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #333330;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.work .active {
|
||||
width: 82px;
|
||||
height: 28px;
|
||||
@@ -826,7 +758,6 @@ const submitVote = () => {
|
||||
cursor: pointer;
|
||||
margin-right: 11px;
|
||||
}
|
||||
|
||||
.work .unactive {
|
||||
width: 80px;
|
||||
height: 26px;
|
||||
@@ -842,19 +773,15 @@ const submitVote = () => {
|
||||
margin-right: 11px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.work .btncolor {
|
||||
background: linear-gradient(90deg, #84aad2 0%, #a4c5e9 100%);
|
||||
}
|
||||
|
||||
.work .bordercolor {
|
||||
border: 1px solid #85aad2;
|
||||
}
|
||||
|
||||
.work .fontcolor {
|
||||
color: rgba(133, 170, 210, 1);
|
||||
}
|
||||
|
||||
.work .submit {
|
||||
width: 126px;
|
||||
height: 46px;
|
||||
@@ -874,4 +801,4 @@ const submitVote = () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -50,12 +50,15 @@
|
||||
</div> -->
|
||||
</div>
|
||||
<div v-if="projectStatus && projectEndTime">
|
||||
<div v-if="projectStatus !=='3' && new Date(projectEndTime).getTime() > new Date().getTime()" class="threeBtn">
|
||||
<div v-if="projectStatus !=='-1' && new Date(projectEndTime).getTime() > new Date().getTime()" class="threeBtn">
|
||||
<botton class="btn" :style="{
|
||||
background: `${new Date(data.liveStartTime).getTime() > new Date().getTime() ? '#999' : 'rgb(59, 191, 252)'}`,
|
||||
}" @click="showClick">
|
||||
{{ new Date(data.liveEndTime).getTime() }}
|
||||
{{ new Date().getTime() }}
|
||||
{{ data.liveLink }}
|
||||
{{
|
||||
new Date(data.liveEndTime).getTime() < new Date().getTime() && data.livePlayback == '1' ? '回放' : '观看'
|
||||
new Date(data.liveEndTime).getTime() < new Date().getTime() && data.livePlayback == 'true' ? '回放' : '观看'
|
||||
}}
|
||||
</botton>
|
||||
|
||||
@@ -91,7 +94,7 @@
|
||||
:style="{background: `${new Date(data.liveStartTime).getTime() > new Date().getTime() ? '#999' : 'rgb(59, 191, 252)'}`,
|
||||
}" @click="showClick">
|
||||
{{
|
||||
new Date(data.liveEndTime).getTime() < new Date().getTime() && data.livePlayback == '1' ? '回放' : '观看'
|
||||
new Date(data.liveEndTime).getTime() < new Date().getTime() && data.livePlayback == 'true' ? '回放' : '观看'
|
||||
}}
|
||||
</botton>
|
||||
|
||||
@@ -188,7 +191,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {computed, reactive, toRefs, onUnmounted} from "vue";
|
||||
import {computed, reactive, toRefs, onUnmounted, watch} from "vue";
|
||||
import img from "@/assets/image/uploadimg.png";
|
||||
import {request, useRequest} from "@/api/request";
|
||||
import {TASK_BROADCAST_DETAIL, TASK_BROADCAST_SIGN} from "@/api/api";
|
||||
@@ -250,9 +253,11 @@ const signClick = () => {
|
||||
};
|
||||
let timer = null;
|
||||
|
||||
|
||||
|
||||
//判断能否签到
|
||||
function isSignClick() {
|
||||
timer = setInterval(() => {
|
||||
// timer = setInterval(() => {
|
||||
let beginTime = new Date(data.value?.liveStartTime).getTime();
|
||||
let endTime = !data.value.afterSignIn || data.value?.afterSignIn == '0'
|
||||
? new Date(data.value.liveEndTime).getTime()
|
||||
@@ -294,10 +299,13 @@ function isSignClick() {
|
||||
// nowTime < endTime,
|
||||
// nowTime > beginTime
|
||||
// );
|
||||
}, 1000);
|
||||
// }, 1000);
|
||||
}
|
||||
|
||||
isSignClick();
|
||||
watch(data, () => {
|
||||
isSignClick();
|
||||
})
|
||||
|
||||
const commitClick = () => {
|
||||
if (data.value.liveStartTime) {
|
||||
let date1 = new Date(data.value.liveStartTime).getTime()
|
||||
@@ -346,7 +354,7 @@ function showClick() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (new Date(data.value.liveEndTime).getTime() < new Date().getTime() && data.value.livePlayback == '1') {
|
||||
if (new Date(data.value.liveEndTime).getTime() < new Date().getTime() && data.value.livePlayback == 'true') {
|
||||
window.open(data.value.livePlaybackLink, '_top');
|
||||
} else {
|
||||
window.open(data.value.liveLink, '_top');
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="pdname">
|
||||
{{ data.name }}
|
||||
<el-popover v-if="data.remark" ref="popover" popper-class="jianjie" placement="right" trigger="hover" :width="300"
|
||||
:content="data.remark">
|
||||
:content="data.remark">
|
||||
<template #reference><span style="font-size: 16px;font-weight: 600;">简介></span></template>
|
||||
</el-popover>
|
||||
</div>
|
||||
@@ -14,29 +14,21 @@
|
||||
<div class="detailinfo">
|
||||
<div class="detailL">
|
||||
<div v-if="data.stageProcessList" v-for="(i, k) in data.stageProcessList" :key="k">
|
||||
<div v-if="i.stageId == '0' && i.taskProcessList.length == 0"></div>
|
||||
<div v-if="i.id == '0' && i.taskProcessList?.length == 0"></div>
|
||||
<div v-else class="title">
|
||||
<div class="titleL">{{ i.stageName }}</div>
|
||||
<div class="titleR" :style="{ display: 'flex' }">
|
||||
<img src="../../assets/image/pathdetails/circle.png"/>
|
||||
<img src="../../assets/image/pathdetails/circle.png" />
|
||||
<div class="titleRT"
|
||||
:style="(i.statusName === '已完成' || i.statusName === '进行中') ? 'color:#0060ff' : 'color:#999'">
|
||||
:style="(i.statusName === '已完成' || i.statusName === '进行中') ? 'color:#0060ff' : 'color:#999'">
|
||||
{{ i.statusName || (data.unlockMode === 1 ? '未开始' : '未解锁') }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="titleR" :style="{ display: i.status === 2 ? 'flex' : 'none' }">
|
||||
<img src="../../assets/image/pathdetails/circle2.png" />
|
||||
<div class="titleRT" style="color: rgba(102, 102, 102, 1)">
|
||||
未开始
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div v-if="i.stageId == '0' && i.taskProcessList.length == 0"></div>
|
||||
<div v-else class="course"
|
||||
v-for="(value, index) in (i.taskProcessList.sort((a,b)=>{ return a.id - b.id; })).filter(
|
||||
(e) => !whiteTypes(e.type)
|
||||
)"
|
||||
:key="index">
|
||||
<div v-if="i.id == '0' && i.taskProcessList?.length == 0"></div>
|
||||
<div v-else class="course" v-for="(value, index) in (i.taskProcessList.sort((a, b) => { return a.id - b.id; })).filter(
|
||||
(e) => !whiteTypes(e.type)
|
||||
)" :key="index">
|
||||
<div style="width: 70%">
|
||||
<div v-if="value.name.length > 50" class="coursename" :title="value.name">
|
||||
<el-popover ref="popover" placement="right" trigger="hover" :width="300" :content="value.name">
|
||||
@@ -53,7 +45,7 @@
|
||||
选修
|
||||
</div>
|
||||
<div class="tag3" style="margin-right: 11px; margin-top: 16px">
|
||||
{{ types.typeName[value.type] || "" }}
|
||||
{{ TASK_TYPES.typeName[value.type] || "" }}
|
||||
</div>
|
||||
<!-- <div-->
|
||||
<!-- v-for="(item, key) in value.flag"-->
|
||||
@@ -68,20 +60,16 @@
|
||||
<div>当前进度</div>
|
||||
<div class="progress">
|
||||
<div style="width: 291px">
|
||||
<el-progress
|
||||
:percentage="parseInt(value.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(value.currentRatio) / 20)]
|
||||
"/>
|
||||
<el-progress :percentage="parseInt(value.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(value.currentRatio) / 20)]
|
||||
" />
|
||||
</div>
|
||||
<div style="font-size: 14px;font-weight: 500;color: #277aff;margin-left: 10px;color:#677d86;">
|
||||
{{ parseInt(value.currentRatio) }}%
|
||||
@@ -90,8 +78,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="goclass" @click="toFinish(value, i.stageName, i.id)"
|
||||
:style="{background:(value.statusName !=='已结束' && (value.statusName || data.unlockMode === 1)) ?'#2478ff':'#999'}">
|
||||
{{ value.statusName || (data.unlockMode === 1 ? types.toName[value.type] : '未解锁') }}
|
||||
:style="{ background: (value.statusName !== '已结束' && (value.statusName || data.unlockMode === 1)) ? '#2478ff' : '#999' }">
|
||||
{{ value.statusName || (data.unlockMode === 1 ? TASK_TYPES.toName[value.type] : '未解锁') }}
|
||||
</div>
|
||||
<!-- <div :style="{ display: value.status === 1 ? 'block' : 'none' }">-->
|
||||
<!-- <div-->
|
||||
@@ -125,23 +113,17 @@
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="共享文档" name="second">
|
||||
<div style="padding: 19px 30px 17px 28px">
|
||||
<div
|
||||
v-for="(value, index) in JSON.parse(data.attach?data.attach:'[]')"
|
||||
:key="index"
|
||||
style="
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 15px;">
|
||||
<div v-for="(value, index) in JSON.parse(data.attach ? data.attach : '[]')" :key="index" style="
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 15px;">
|
||||
<!-- <img :src="value.img" style="width: 22px; height: 26px"/> -->
|
||||
<FileTypeImg
|
||||
:v-model="value.name? value.name : value.slice(value.lastIndexOf('/')+1,value.indexOf('-')) + value.slice(value.lastIndexOf('.'))"
|
||||
:style="{width: '22px',height: '26px'}"></FileTypeImg>
|
||||
:v-model="value.name ? value.name : value.slice(value.lastIndexOf('/') + 1, value.indexOf('-')) + value.slice(value.lastIndexOf('.'))"
|
||||
:style="{ width: '22px', height: '26px' }"></FileTypeImg>
|
||||
<div class="sharedocname">{{ value.name }}</div>
|
||||
<div class="download">
|
||||
<img
|
||||
src="../../assets/image/download.png"
|
||||
style="width: 16px; height: 15px"
|
||||
/>
|
||||
<img src="../../assets/image/download.png" style="width: 16px; height: 15px" />
|
||||
<div style="margin-left: 7px" @click="downloadFile(value.response.data)">下载</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -154,13 +136,13 @@
|
||||
<div class="detailRB">
|
||||
<div class="info">
|
||||
<div class="title">
|
||||
<img style="width: 21px; height: 20px" src="../../assets/image/pathdetails/info.png"/>
|
||||
<img style="width: 21px; height: 20px" src="../../assets/image/pathdetails/info.png" />
|
||||
<div class="text" style="margin-left: 7px">个人信息</div>
|
||||
<div class="box"></div>
|
||||
</div>
|
||||
<!-- todo #路径详情 个人信息缺少img和介绍-->
|
||||
<div class="teacheritem" :style="{ 'border-bottom': '1px solid rgba(56, 125, 247, 0.2)' }">
|
||||
<img class="peopleimg" :src="userInfo?.avatar"/>
|
||||
<img class="peopleimg" :src="userInfo?.avatar" />
|
||||
<div style="margin-left: 17px">
|
||||
<div class="teacherName">
|
||||
<div style="margin-right: 5px">
|
||||
@@ -173,7 +155,7 @@
|
||||
</div>
|
||||
<div class="info" style="padding-top: 20px">
|
||||
<div class="title">
|
||||
<img style="width: 18px; height: 17px" src="../../assets/image/pathdetails/study.png"/>
|
||||
<img style="width: 18px; height: 17px" src="../../assets/image/pathdetails/study.png" />
|
||||
<div class="text" style="margin-left: 9px">学习进度</div>
|
||||
<div class="box"></div>
|
||||
</div>
|
||||
@@ -188,20 +170,20 @@
|
||||
<div>总进度</div>
|
||||
<div class="progress">
|
||||
<div style="width: 291px">
|
||||
<el-progress :percentage="parseInt(data.totalProgress * 100)" :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((data.totalProgress * 100) / 20)]
|
||||
"/>
|
||||
<el-progress :percentage="parseInt((data.totalProgress || 0) * 100)"
|
||||
: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(((data.totalProgress || 0) * 100) / 20)]
|
||||
" />
|
||||
</div>
|
||||
<div style="font-size: 14px; font-weight: 500; margin-left: 10px;color:#677d86;">
|
||||
{{ parseInt(data.totalProgress * 100) }}%
|
||||
{{ parseInt((data.totalProgress || 0) * 100) }}%
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -211,24 +193,24 @@
|
||||
<div>必修进度</div>
|
||||
<div class="progress">
|
||||
<div style="width: 291px">
|
||||
<el-progress :percentage="parseInt(data.compulsoryProgress * 100)" :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((data.compulsoryProgress * 100) / 20)]
|
||||
"/>
|
||||
<el-progress :percentage="parseInt((data.compulsoryProgress || 0) * 100)"
|
||||
: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(((data.compulsoryProgress || 0) * 100) / 20)]
|
||||
" />
|
||||
</div>
|
||||
<div style="
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #277aff;
|
||||
margin-left: 10px;color:#677d86;">
|
||||
{{ parseInt(data.compulsoryProgress * 100) }}%
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #277aff;
|
||||
margin-left: 10px;color:#677d86;">
|
||||
{{parseInt(((data.compulsoryProgress || 0) * 100)) }}%
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -240,35 +222,22 @@
|
||||
<div class="detailRB">
|
||||
<div class="info">
|
||||
<div
|
||||
style="display:flex;justify-content: space-between;align-items: center;height: 56px;padding-left: 27px;padding-right: 27px;">
|
||||
<div
|
||||
@click="tabChange(1)"
|
||||
style="font-size: 14px;color: rgba(51, 51, 51, 1);font-weight: 600;cursor: pointer;"
|
||||
:style="{}"
|
||||
>积分排行榜
|
||||
style="display:flex;justify-content: space-between;align-items: center;height: 56px;padding-left: 27px;padding-right: 27px;">
|
||||
<div @click="tabChange(1)"
|
||||
style="font-size: 14px;color: rgba(51, 51, 51, 1);font-weight: 600;cursor: pointer;" :style="{}">积分排行榜
|
||||
</div>
|
||||
<!-- <div style="font-size: 14px;color: rgba(51, 51, 51, 1);font-weight: 600;">完成度排行榜</div> -->
|
||||
<el-select
|
||||
@change="choiceStatus"
|
||||
v-model="stateValue"
|
||||
class="m-2"
|
||||
mode="tags"
|
||||
placeholder="完成度排行榜"
|
||||
style="width: 130px;border: 0px solid red !important; box-shadow:none !important; ">
|
||||
<el-option
|
||||
v-for="item in studyProgress"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
<el-select @change="choiceStatus" v-model="stateValue" class="m-2" mode="tags" placeholder="完成度排行榜"
|
||||
style="width: 130px;border: 0px solid red !important; box-shadow:none !important; ">
|
||||
<el-option v-for="item in studyProgress" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</div>
|
||||
<!-- line -->
|
||||
<div style="display: flex;height: 1px;background-color: #ecf5ff;justify-content: space-between;">
|
||||
<div v-if="tabValue==1" style="width:90px;height: 2px;background-color: #409EFF;margin-left: 18px;"></div>
|
||||
<div v-if="tabValue == 1" style="width:90px;height: 2px;background-color: #409EFF;margin-left: 18px;"></div>
|
||||
<div v-else style="width:90px;height: 2px;background-color: rgba(0,0,0,0);margin-left: 18px;"></div>
|
||||
<div v-if="tabValue!==1"
|
||||
style="width:146px;height: 2px;background-color: #409EFF;margin-right: 18px;"></div>
|
||||
<div v-if="tabValue !== 1" style="width:146px;height: 2px;background-color: #409EFF;margin-right: 18px;">
|
||||
</div>
|
||||
<div v-else style="width:146px;height: 2px;background-color: rgba(0,0,0,0);margin-right: 18px;"></div>
|
||||
</div>
|
||||
<!-- line -->
|
||||
@@ -284,11 +253,11 @@
|
||||
</div>
|
||||
<!-- 排行榜列表 -->
|
||||
<div
|
||||
style="display: flex;padding-top: 30px;padding-bottom: 100px;background: linear-gradient(0deg, rgba(36,120,255,0) 0%, rgba(36,120,255,0.15) 100%);">
|
||||
style="display: flex;padding-top: 30px;padding-bottom: 100px;background: linear-gradient(0deg, rgba(36,120,255,0) 0%, rgba(36,120,255,0.15) 100%);">
|
||||
<div style="display: flex;justify-content: center;align-items: center;width: 100%;">
|
||||
<div style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;">排名</div>
|
||||
<div
|
||||
style="margin-left: 110px;margin-right: 110px;font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;">
|
||||
style="margin-left: 110px;margin-right: 110px;font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;">
|
||||
名称
|
||||
</div>
|
||||
<div style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;">
|
||||
@@ -298,86 +267,60 @@
|
||||
</div>
|
||||
<!-- 学员列表 -->
|
||||
<div>
|
||||
<div
|
||||
v-for="(item,i) in tableRankData" :key="i"
|
||||
style="display: flex;justify-content: center;align-items: center;width: 100%;position: relative;top:-60px;margin-bottom: 38px;">
|
||||
<div v-for="(item, i) in tableRankData" :key="i"
|
||||
style="display: flex;justify-content: center;align-items: center;width: 100%;position: relative;top:-60px;margin-bottom: 38px;">
|
||||
<div
|
||||
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;position: relative;">
|
||||
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;position: relative;">
|
||||
{{ i + 1 == 1 || i + 1 == 2 || i + 1 == 3 ? '' : i + 1 }}
|
||||
<img
|
||||
v-if="i + 1 == 1"
|
||||
style="width: 24px; height: 24px;"
|
||||
src="../../assets/image/rank1.png"
|
||||
/>
|
||||
<img
|
||||
v-if="i + 1 == 2"
|
||||
style="width: 24px; height: 24px;"
|
||||
src="../../assets/image/rank2.png"
|
||||
/>
|
||||
<img
|
||||
v-if="i + 1 == 3"
|
||||
style="width: 24px; height: 24px;"
|
||||
src="../../assets/image/rank3.png"
|
||||
/>
|
||||
<img
|
||||
v-if="i + 1 == myIndex"
|
||||
style="width: 24px; height: 24px;position: absolute;left:110px;"
|
||||
src="../../assets/image/rankme.png"
|
||||
/>
|
||||
<img v-if="i + 1 == 1" style="width: 24px; height: 24px;" src="../../assets/image/rank1.png" />
|
||||
<img v-if="i + 1 == 2" style="width: 24px; height: 24px;" src="../../assets/image/rank2.png" />
|
||||
<img v-if="i + 1 == 3" style="width: 24px; height: 24px;" src="../../assets/image/rank3.png" />
|
||||
<img v-if="i + 1 == myIndex" style="width: 24px; height: 24px;position: absolute;left:110px;"
|
||||
src="../../assets/image/rankme.png" />
|
||||
</div>
|
||||
<div
|
||||
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:34%;display: flex;justify-content: center;align-items: center;">
|
||||
<img
|
||||
style="width: 28px; height: 28px;border-radius: 28px;"
|
||||
:src="item?.avatar"
|
||||
/>
|
||||
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:34%;display: flex;justify-content: center;align-items: center;">
|
||||
<img style="width: 28px; height: 28px;border-radius: 28px;" :src="item?.avatar" />
|
||||
{{ item.name }}
|
||||
</div>
|
||||
<div
|
||||
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;">
|
||||
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;">
|
||||
{{ tabValue == 1 ? item?.pointsCount : item?.rateStr }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 我的排名 -->
|
||||
<div
|
||||
v-if="myIndex > tableRankData.length"
|
||||
style="display: flex;justify-content: center;align-items: center;width: 100%;position: relative;top:-60px;margin-bottom: 38px;">
|
||||
<div v-if="myIndex > tableRankData.length"
|
||||
style="display: flex;justify-content: center;align-items: center;width: 100%;position: relative;top:-60px;margin-bottom: 38px;">
|
||||
<div
|
||||
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;">
|
||||
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;">
|
||||
{{ '...' }}
|
||||
</div>
|
||||
<div
|
||||
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:34%;display: flex;justify-content: center;align-items: center;">
|
||||
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:34%;display: flex;justify-content: center;align-items: center;">
|
||||
{{ '' }}
|
||||
</div>
|
||||
<div
|
||||
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;">
|
||||
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;">
|
||||
{{ '' }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="myIndex > tableRankData.length"
|
||||
style="display: flex;justify-content: center;align-items: center;width: 100%;position: relative;top:-60px;margin-bottom: 38px;">
|
||||
<div v-if="myIndex > tableRankData.length"
|
||||
style="display: flex;justify-content: center;align-items: center;width: 100%;position: relative;top:-60px;margin-bottom: 38px;">
|
||||
<div
|
||||
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;">
|
||||
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;">
|
||||
{{ myIndex }}
|
||||
<img
|
||||
style="width: 24px; height: 24px;position: absolute;left:110px;"
|
||||
src="../../assets/image/rankme.png"
|
||||
/>
|
||||
<img style="width: 24px; height: 24px;position: absolute;left:110px;"
|
||||
src="../../assets/image/rankme.png" />
|
||||
</div>
|
||||
<div
|
||||
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:34%;display: flex;justify-content: center;align-items: center;">
|
||||
<img
|
||||
style="width: 28px; height: 28px;border-radius: 28px;"
|
||||
:src="tableRankData[myIndex-1]?.avatar"
|
||||
/>
|
||||
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:34%;display: flex;justify-content: center;align-items: center;">
|
||||
<img style="width: 28px; height: 28px;border-radius: 28px;" :src="tableRankData[myIndex - 1]?.avatar" />
|
||||
{{ tableRankData[myIndex - 1]?.name }}
|
||||
</div>
|
||||
<div
|
||||
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;">
|
||||
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;">
|
||||
{{ tabValue == 1 ? tableRankData[myIndex - 1]?.pointsCount : tableRankData[myIndex - 1]?.rateStr }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -392,37 +335,38 @@
|
||||
<!-- 详细信息 -->
|
||||
<!-- 弹框提示信息 -->
|
||||
<el-dialog title="" top="347px" v-model="dialogVisible" :show-close="false"
|
||||
style="display:flex;justify-content:center;align-items:center;height: 283px;padding:0;border-radius: 4px;"
|
||||
width="502px">
|
||||
style="display:flex;justify-content:center;align-items:center;height: 283px;padding:0;border-radius: 4px;"
|
||||
width="502px">
|
||||
<div style="width:288px;color:#333333;font-size: 22px;font-weight: 600;">{{ dialogVisibleTip }}</div>
|
||||
<span slot="footer" style="display:inline-block;margin-top:60px;">
|
||||
<el-button @click="dialogVisible = false" style="width:140px;height:40px;margin-right: 22px;">取消</el-button>
|
||||
<el-button type="primary" @click="dialogVisible = false" style="width:140px;height:40px;">确定</el-button>
|
||||
</span>
|
||||
<el-button @click="dialogVisible = false" style="width:140px;height:40px;margin-right: 22px;">取消</el-button>
|
||||
<el-button type="primary" @click="dialogVisible = false" style="width:140px;height:40px;">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import {computed, onMounted, ref, watch} from "vue";
|
||||
import {ElLoading, ElMessage} from 'element-plus'
|
||||
import {request} from "@/api/request";
|
||||
import {CompletionList, EvaluationToLearn, PointList, STUDY_RECORD, SubmitExternalExam} from "@/api/api";
|
||||
import {useRoute, useRouter} from "vue-router";
|
||||
import {PROJECT, TASK_TYPES} from "@/api/CONST";
|
||||
import { computed, onMounted, ref, watch } from "vue";
|
||||
import { ElLoading, ElMessage } from 'element-plus'
|
||||
import { request } from "@/api/request";
|
||||
import { CompletionList, EvaluationToLearn, PointList, STUDY_RECORD, SubmitExternalExam, QueryEvaluationTaskStatusOne } from "@/api/api";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { PROJECT, TASK_TYPES } from "@/api/CONST";
|
||||
import FileTypeImg from "@/components/FileTypeImg.vue";
|
||||
import {UPDATE_CURRENT_TASK} from "@/api/api";
|
||||
import {useStore} from "vuex";
|
||||
import { UPDATE_CURRENT_TASK } from "@/api/api";
|
||||
import { useStore } from "vuex";
|
||||
|
||||
const {
|
||||
query: {courseId, projectId},
|
||||
query: { courseId, projectId },
|
||||
} = useRoute();
|
||||
const router = useRouter();
|
||||
const {commit, dispatch, state} = useStore()
|
||||
const { commit, dispatch, state } = useStore()
|
||||
const store = useStore()
|
||||
const userInfo = computed(()=>state.userInfo)
|
||||
const data = computed(()=>state.projectInfo)
|
||||
const userInfo = computed(() => state.userInfo)
|
||||
const data = computed(() => state.projectInfo)
|
||||
|
||||
onMounted(() => {
|
||||
dispatch('getProjectInfo', {projectId})
|
||||
dispatch('getProjectInfo', { projectId })
|
||||
})
|
||||
const tableRankData = ref([])
|
||||
|
||||
@@ -444,8 +388,8 @@ const choiceStatus = (e) => {
|
||||
tabValue.value = e
|
||||
stateValue.value = e
|
||||
// 获取个人完成度
|
||||
request(CompletionList, {projectId: projectId, type: e === 2 ? 0 : 1}).then(res => {
|
||||
tableRankData.value =res.data.datas
|
||||
request(CompletionList, { projectId: projectId, type: e === 2 ? 0 : 1 }).then(res => {
|
||||
tableRankData.value = res.data.datas
|
||||
myIndex.value = res.data.myIndex
|
||||
myRate.value = res.data.myRate
|
||||
myRateStr.value = res.data.myRateStr
|
||||
@@ -458,17 +402,17 @@ const tabChange = (tabs) => {
|
||||
stateValue.value = undefined;
|
||||
tabValue.value = tabs;
|
||||
// 获取项目积分
|
||||
request(PointList, {projectId: projectId}).then(res => {
|
||||
tableRankData.value =res.data.datas
|
||||
request(PointList, { projectId: projectId }).then(res => {
|
||||
tableRankData.value = res.data.datas
|
||||
myIndex.value = res.data.myIndex
|
||||
myPoint.value = res.data.myPointsCount
|
||||
})
|
||||
tableRankData.value =12
|
||||
tableRankData.value = 12
|
||||
}
|
||||
const myIndex = ref('')
|
||||
const myPoint = ref('')
|
||||
// 获取项目积分
|
||||
request(PointList, {projectId: projectId}).then(res => {
|
||||
request(PointList, { projectId: projectId }).then(res => {
|
||||
tableRankData.value = res.data.datas
|
||||
myIndex.value = res.data.myIndex
|
||||
myPoint.value = res.data.myPointsCount
|
||||
@@ -478,59 +422,7 @@ const activeName = ref("first");
|
||||
const handleClick = (tab, event) => {
|
||||
console.log(tab, event);
|
||||
};
|
||||
const path = {1: "path"};
|
||||
const types = ref({
|
||||
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: window.location.protocol + import.meta.env.VITE_BOE_ONLINE_CLASS_URL, //在线
|
||||
2: ({courseId}) => window.open(`${location.protocol}//${location.host}${import.meta.env.VITE_BASE_API}/stu/project/redirectDetail?courseId=${courseId}`, '_top'),
|
||||
3: window.location.protocol + import.meta.env.VITE_BOE_CASS_DETAIL_URL, //案例
|
||||
4: "/homeworkpage",
|
||||
5: window.location.protocol + import.meta.env.VITE_BOE_EXAM_DETAIL_URL, //考试
|
||||
6: "/livebroadcast",
|
||||
7: ({targetId}) => window.open(targetId, '_top'),
|
||||
8: "/discusspage",
|
||||
9: "/moreactive",
|
||||
10: ({evaType, targetId}) =>
|
||||
window.open(
|
||||
evaType == 0
|
||||
? window.location.protocol + import.meta.env.VITE_BOE_TEST_DETAIL_URL + targetId
|
||||
: window.location.protocol + import.meta.env.VITE_BOE_TEST_OUT_DETAIL_URL + targetId + `&quizTaskKid=${projectId}&channelCode=project`
|
||||
, '_top'), //测评
|
||||
11: "/surveydetail",
|
||||
12: "/ballotpage",
|
||||
13: "/projectdetails",
|
||||
},
|
||||
});
|
||||
const path = { 1: "path" };
|
||||
|
||||
const dialogVisible = ref(false);
|
||||
const dialogVisibleTip = ref('该任务无法学习,请联系管理员进行替换!');
|
||||
@@ -545,10 +437,10 @@ function judgeTaskIsEnd(type, endTimes, status) {
|
||||
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 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;
|
||||
@@ -681,52 +573,89 @@ async function toFinish(d, sName, chapterOrStageId) {
|
||||
}
|
||||
// 测评模块 请求接口跳转新的页面 - 新增 暂时未调试 目前无测评数据 2023-02-04
|
||||
if (d.type == 10) {
|
||||
// 此处判断测评跳转详情界面
|
||||
router.push({
|
||||
path: '/evaluation',
|
||||
query: {
|
||||
id: d.id,
|
||||
type: PROJECT,
|
||||
infoId: data.value.projectId,
|
||||
courseId: d.courseId,
|
||||
pName: data.value.name,
|
||||
sName,
|
||||
chapterOrStageId,
|
||||
exname: d.name, // 测评名称
|
||||
btype: 1 // 1项目 2 路径图
|
||||
},
|
||||
});
|
||||
return
|
||||
|
||||
// 调用接口 跳转页面
|
||||
console.log('我是查询测评跳转链接所传递得参数', {
|
||||
"businessType": "project",
|
||||
"chapterId": chapterOrStageId,
|
||||
"courseId": d.courseId,
|
||||
"quizKid": d.targetId,
|
||||
"routerOrProjectId": projectId,
|
||||
"studentId": userInfo.value.projectId,
|
||||
"studentName": userInfo.value.realName
|
||||
})
|
||||
request(EvaluationToLearn, {
|
||||
"businessType": "project",
|
||||
"chapterId": chapterOrStageId,
|
||||
"courseId": d.courseId,
|
||||
"quizKid": d.targetId,
|
||||
"routerOrProjectId": projectId,
|
||||
"studentId": userInfo.value.projectId,
|
||||
"studentName": userInfo.value.realName
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 200) {
|
||||
let jumpUrl = res.data.quizUrl
|
||||
// 此处写跳转url
|
||||
window.open(jumpUrl, '_top')
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
return
|
||||
if (d.quizTaskId == null) {
|
||||
// 肯定没有完成测评
|
||||
// 调用接口 跳转页面
|
||||
console.log('我是查询测评跳转链接所传递得参数', {
|
||||
"businessType": "project",
|
||||
"chapterId": chapterOrStageId,
|
||||
"courseId": d.courseId,
|
||||
"quizKid": d.targetId,
|
||||
"routerOrProjectId": projectId,
|
||||
"studentId": userInfo.value.id,
|
||||
"studentName": userInfo.value.realName
|
||||
})
|
||||
request(EvaluationToLearn, {
|
||||
"businessType": "project",
|
||||
"chapterId": chapterOrStageId,
|
||||
"courseId": d.courseId,
|
||||
"quizKid": d.targetId,
|
||||
"routerOrProjectId": projectId,
|
||||
"studentId": userInfo.value.id,
|
||||
"studentName": userInfo.value.realName
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 200) {
|
||||
let jumpUrl = res.data.quizUrl
|
||||
// 此处写跳转url
|
||||
window.open(jumpUrl, '_top')
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
return
|
||||
} else {
|
||||
// 进行中 或者 已完成
|
||||
// 调用接口 判断当前测评状态 跳转页面
|
||||
console.log('我是查询测评跳转链接所传递得参数', {
|
||||
"quizTaskId": d.quizTaskId
|
||||
})
|
||||
request(QueryEvaluationTaskStatusOne, {
|
||||
"quizTaskId": d.quizTaskId
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 200) {
|
||||
if (res.data.complete_status == 2) {
|
||||
ElMessage.error("您已完成测评")
|
||||
return
|
||||
} else {
|
||||
// 重新查询跳转
|
||||
// 调用接口 跳转页面
|
||||
console.log('我是查询测评跳转链接所传递得参数', {
|
||||
"businessType": "project",
|
||||
"chapterId": chapterOrStageId,
|
||||
"courseId": d.courseId,
|
||||
"quizKid": d.targetId,
|
||||
"routerOrProjectId": projectId,
|
||||
"studentId": userInfo.value.id,
|
||||
"studentName": userInfo.value.realName
|
||||
})
|
||||
request(EvaluationToLearn, {
|
||||
"businessType": "project",
|
||||
"chapterId": chapterOrStageId,
|
||||
"courseId": d.courseId,
|
||||
"quizKid": d.targetId,
|
||||
"routerOrProjectId": projectId,
|
||||
"studentId": userInfo.value.id,
|
||||
"studentName": userInfo.value.realName
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 200) {
|
||||
let jumpUrl = res.data.quizUrl
|
||||
// 此处写跳转url
|
||||
window.open(jumpUrl, '_top')
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (!TASK_TYPES.path[d.type]) {
|
||||
@@ -734,33 +663,17 @@ async function toFinish(d, sName, chapterOrStageId) {
|
||||
return;
|
||||
}
|
||||
//更新学员当前任务
|
||||
await request(UPDATE_CURRENT_TASK, {id: d.id, type: PROJECT, pid: projectId, name: d.name})
|
||||
if (d.type == 3 || d.type == 7) {
|
||||
await request(UPDATE_CURRENT_TASK, { id: d.id, type: PROJECT, pid: projectId, name: d.name })
|
||||
if (d.type == 3 || d.type == 7 || (d.type === 5 && d.examType === 2)) {
|
||||
d.status !== 1 && await request(STUDY_RECORD, {
|
||||
studentId: userInfo.value.projectId,
|
||||
studentId: userInfo.value.id,
|
||||
targetId: data.value.routerId,
|
||||
logo: PROJECT,
|
||||
type: PROJECT,
|
||||
stageOrChapterId: chapterOrStageId,
|
||||
taskId: d.id,
|
||||
taskType: d.type,
|
||||
});
|
||||
// 此处判断外链跳转详情界面
|
||||
if (d.type == 7) {
|
||||
router.push({
|
||||
path: '/outerchain',
|
||||
query: {
|
||||
id: d.id,
|
||||
type: PROJECT,
|
||||
infoId: data.value.projectId,
|
||||
courseId: d.courseId,
|
||||
pName: data.value.name,
|
||||
sName,
|
||||
chapterOrStageId,
|
||||
exname: d.name, // 外链名称
|
||||
},
|
||||
});
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof TASK_TYPES.path[d.type] === "string") {
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
label="状态"
|
||||
>
|
||||
<img
|
||||
:src="{1:ongoing,2:completed,0:ongoing}[scope.row.taskStatus] || nostarted"
|
||||
:src="{1:ongoing,2:completed,0:nostarted}[formatStatus(scope.row.process)]"
|
||||
style="width: 99px; height: 99px"
|
||||
/>
|
||||
</el-table-column>
|
||||
@@ -185,6 +185,16 @@ const returnfun = () => {
|
||||
showmapdetail.value = false;
|
||||
};
|
||||
|
||||
function formatStatus(process) {
|
||||
if (!process) {
|
||||
return 0;
|
||||
}
|
||||
if (parseInt(process) === 1) {
|
||||
return 2;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
async function gofun(e) {
|
||||
detail.value = e;
|
||||
showmapdetail.value = true;
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
<div class="pdname">
|
||||
{{ data.name }}
|
||||
<el-popover v-if="data.chapterRemark" ref="popover" popper-class="jianjie" placement="right" trigger="hover"
|
||||
:width="300"
|
||||
:content="data.chapterRemark">
|
||||
:width="300" :content="data.chapterRemark">
|
||||
<template #reference><span style="font-size: 16px;font-weight: 600;">关卡说明></span></template>
|
||||
</el-popover>
|
||||
</div>
|
||||
@@ -20,15 +19,14 @@
|
||||
<div class="title">
|
||||
<div class="titleL">{{ data.currentStageName }}</div>
|
||||
<div class="titleR" :style="{ display: 'flex' }">
|
||||
<img :src="data.currentChapterCnt ? circle : circle2"/>
|
||||
<img :src="data.currentChapterCnt ? circle : circle2" />
|
||||
<div class="titleRT"
|
||||
:style="(data.statusName === '已完成' || data.statusName === '进行中') ? 'color:#0060ff' : 'color:#999'">
|
||||
:style="(data.statusName === '已完成' || data.statusName === '进行中') ? 'color:#0060ff' : 'color:#999'">
|
||||
{{ data.statusName || (data.unlockMode === 1 ? '未开始' : '未解锁') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="course" v-for="(value, index) in data.taskBoList?.filter((e) => !whiteTypes(e.type))"
|
||||
:key="index">
|
||||
<div class="course" v-for="(value, index) in data.taskBoList?.filter((e) => !whiteTypes(e.type))" :key="index">
|
||||
<div style="width: 70%">
|
||||
<div v-if="value.name.length > 50" class="coursename" :title="value.name">
|
||||
<el-popover ref="popover" placement="right" trigger="hover" :width="300" :content="value.name">
|
||||
@@ -63,36 +61,35 @@
|
||||
<div>当前进度</div>
|
||||
<div class="progress">
|
||||
<div style="width: 291px">
|
||||
<el-progress :percentage="parseInt(value.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(value.currentRatio) / 20)]
|
||||
"/>
|
||||
<el-progress :percentage="parseInt(value.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(value.currentRatio) / 20)]
|
||||
" />
|
||||
</div>
|
||||
<div style="font-size: 14px;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(value.currentRatio) / 20)],
|
||||
}">
|
||||
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(value.currentRatio) / 20)],
|
||||
}">
|
||||
{{ parseInt(value.currentRatio) }}%
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="goclass"
|
||||
:style="{background:(value.statusName !=='已结束' && (value.statusName || data.unlockMode === 1)) ?'#2478ff':'#999'}"
|
||||
@click="toFinish(value)">
|
||||
:style="{ background: (value.statusName !== '已结束' && (value.statusName || data.unlockMode === 1)) ? '#2478ff' : '#999' }"
|
||||
@click="toFinish(value)">
|
||||
{{ value.statusName || (data.unlockMode === 1 ? TASK_TYPES.toName[value.type] : '未解锁') }}
|
||||
</div>
|
||||
<!-- <div :style="{ display: value.status === 1 ? 'block' : 'none' }">-->
|
||||
@@ -123,25 +120,19 @@
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="共享文档" name="second" v-if="data.attachSwitch =='1'">
|
||||
<el-tab-pane label="共享文档" name="second" v-if="data.attachSwitch == '1'">
|
||||
<div style="padding: 19px 30px 17px 28px">
|
||||
<div
|
||||
v-for="(value, index) in JSON.parse(data.attach?data.attach:'[]')"
|
||||
:key="index"
|
||||
style="
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 15px;">
|
||||
<div v-for="(value, index) in JSON.parse(data.attach ? data.attach : '[]')" :key="index" style="
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 15px;">
|
||||
<!-- <img :src="value.img" style="width: 22px; height: 26px"/> -->
|
||||
<FileTypeImg
|
||||
:v-model="value.name? value.name : value.slice(value.lastIndexOf('/')+1,value.indexOf('-')) + value.slice(value.lastIndexOf('.'))"
|
||||
:style="{width: '22px',height: '26px'}"></FileTypeImg>
|
||||
:v-model="value.name ? value.name : value.slice(value.lastIndexOf('/') + 1, value.indexOf('-')) + value.slice(value.lastIndexOf('.'))"
|
||||
:style="{ width: '22px', height: '26px' }"></FileTypeImg>
|
||||
<div class="sharedocname">{{ value.name }}</div>
|
||||
<div class="download">
|
||||
<img
|
||||
src="../../assets/image/download.png"
|
||||
style="width: 16px; height: 15px"
|
||||
/>
|
||||
<img src="../../assets/image/download.png" style="width: 16px; height: 15px" />
|
||||
<div style="margin-left: 7px" @click="downloadFile(value.response.data)">下载</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -154,13 +145,13 @@
|
||||
<div class="detailRB">
|
||||
<div class="info">
|
||||
<div class="title">
|
||||
<img style="width: 21px; height: 20px" src="../../assets/image/pathdetails/info.png"/>
|
||||
<img style="width: 21px; height: 20px" src="../../assets/image/pathdetails/info.png" />
|
||||
<div class="text" style="margin-left: 7px">个人信息</div>
|
||||
<div class="box"></div>
|
||||
</div>
|
||||
<!-- todo #路径详情 个人信息缺少img和介绍-->
|
||||
<div class="teacheritem" :style="{ 'border-bottom': '1px solid rgba(56, 125, 247, 0.2)' }">
|
||||
<img class="peopleimg" :src="userInfo?.avatar"/>
|
||||
<img class="peopleimg" :src="userInfo?.avatar" />
|
||||
<div style="margin-left: 17px">
|
||||
<div class="teacherName">
|
||||
<div style="margin-right: 5px">
|
||||
@@ -176,7 +167,7 @@
|
||||
</div>
|
||||
<div class="info" style="padding-top: 20px">
|
||||
<div class="title">
|
||||
<img style="width: 18px; height: 17px" src="../../assets/image/pathdetails/study.png"/>
|
||||
<img style="width: 18px; height: 17px" src="../../assets/image/pathdetails/study.png" />
|
||||
<div class="text" style="margin-left: 9px">学习进度</div>
|
||||
<div class="box"></div>
|
||||
</div>
|
||||
@@ -192,29 +183,33 @@
|
||||
<div>总进度</div>
|
||||
<div class="progress">
|
||||
<div style="width: 291px">
|
||||
<el-progress :percentage="parseInt(data.currentChapterCnt / data.totalChapterCnt * 100)"
|
||||
: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(data.currentChapterCnt / data.totalChapterCnt) * 100) / 20]
|
||||
"/>
|
||||
<el-progress
|
||||
:percentage="parseInt((data.currentChapterCnt ? data.currentChapterCnt : 0 / data.totalChapterCnt ? data.totalChapterCn : 0) * 100)"
|
||||
: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(data.currentChapterCnt ? data.currentChapterCnt : 0 / data.totalChapterCnt ? data.totalChapterCnt : 0) * 100) / 20]
|
||||
" />
|
||||
</div>
|
||||
<div style="font-size: 14px; font-weight: 500; 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((data.currentChapterCnt / data.totalChapterCnt * 100) / 20)],
|
||||
}">
|
||||
{{ parseInt(data.currentChapterCnt / data.totalChapterCnt * 100) }}%
|
||||
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.currentChapterCnt ? data.currentChapterCnt : 0 / data.totalChapterCnt ? data.totalChapterCnt : 0) * 100) / 20)],
|
||||
}">
|
||||
{{ parseInt((data.currentChapterCnt ? data.currentChapterCnt : 0 /
|
||||
data.totalChapterCnt ? data.totalChapterCnt : 0) > 1 ? 1 : (data.currentChapterCnt ?
|
||||
data.currentChapterCnt : 0 /
|
||||
data.totalChapterCnt ? data.totalChapterCnt : 0) * 100) }}%
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -224,34 +219,37 @@
|
||||
<div>必修进度</div>
|
||||
<div class="progress">
|
||||
<div style="width: 291px">
|
||||
<el-progress :percentage="parseInt(data.currentReqCnt / data.totalReqCnt * 100)" :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((data.currentReqCnt / data.totalReqCnt * 100) / 20)]
|
||||
"/>
|
||||
<el-progress
|
||||
:percentage="parseInt((data.currentReqCnt ? data.currentReqCnt : 0 / data.totalReqCnt ? data.totalReqCnt : 0) * 100)"
|
||||
: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(((data.currentReqCnt ? data.currentReqCnt : 0 / data.totalReqCnt ? data.totalReqCnt : 0) * 100) / 20)]
|
||||
" />
|
||||
</div>
|
||||
<div style="
|
||||
font-size: 14px;
|
||||
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((data.currentReqCnt / data.totalReqCnt * 100) / 20)],
|
||||
}">
|
||||
{{ parseInt(data.currentReqCnt / data.totalReqCnt * 100) }}%
|
||||
font-size: 14px;
|
||||
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(((data.currentReqCnt ? data.currentReqCnt : 0 / data.totalReqCnt ? data.totalReqCnt : 0) * 100) / 20)],
|
||||
}">
|
||||
{{ parseInt((data.currentReqCnt ? data.currentReqCnt : 0 / data.totalReqCnt ? data.totalReqCnt :
|
||||
0) > 1 ? 1 : (data.currentReqCnt ? data.currentReqCnt : 0 / data.totalReqCnt ? data.totalReqCnt : 0) *
|
||||
100) }}%
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -264,51 +262,51 @@
|
||||
<!-- 详细信息 -->
|
||||
<!-- 弹框提示信息 -->
|
||||
<el-dialog title="" top="347px" v-model="dialogVisible" :show-close="false"
|
||||
style="display:flex;justify-content:center;align-items:center;height: 283px;padding:0;border-radius: 4px;"
|
||||
width="502px">
|
||||
style="display:flex;justify-content:center;align-items:center;height: 283px;padding:0;border-radius: 4px;"
|
||||
width="502px">
|
||||
<div style="width:288px;color:#333333;font-size: 22px;font-weight: 600;">{{ dialogVisibleTip }}</div>
|
||||
<span slot="footer" style="display:inline-block;margin-top:60px;">
|
||||
<el-button @click="dialogVisible = false" style="width:140px;height:40px;margin-right: 22px;">取消</el-button>
|
||||
<el-button type="primary" @click="dialogVisible = false" style="width:140px;height:40px;">确定</el-button>
|
||||
</span>
|
||||
<el-button @click="dialogVisible = false" style="width:140px;height:40px;margin-right: 22px;">取消</el-button>
|
||||
<el-button type="primary" @click="dialogVisible = false" style="width:140px;height:40px;">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {computed, onMounted, ref} from "vue";
|
||||
import { computed, onMounted, ref } from "vue";
|
||||
import circle from '@/assets/image/pathdetails/circle.png';
|
||||
import circle2 from '@/assets/image/pathdetails/circle2.png';
|
||||
import {request} from "@/api/request";
|
||||
import {STUDY_RECORD, UPDATE_CURRENT_TASK} from "@/api/api";
|
||||
import {useRoute, useRouter} from "vue-router";
|
||||
import {ElMessage} from "element-plus";
|
||||
import {ROUTER, TASK_TYPES} from "@/api/CONST";
|
||||
import { request } from "@/api/request";
|
||||
import { STUDY_RECORD, UPDATE_CURRENT_TASK, QueryEvaluationTaskStatusOne, EvaluationToLearn } from "@/api/api";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { ROUTER, TASK_TYPES } from "@/api/CONST";
|
||||
import FileTypeImg from "@/components/FileTypeImg.vue";
|
||||
import {useStore} from "vuex";
|
||||
import { useStore } from "vuex";
|
||||
|
||||
const {
|
||||
query: {routerId, routerName},
|
||||
query: { routerId, routerName },
|
||||
} = useRoute();
|
||||
const router = useRouter();
|
||||
const returnclick = () => {
|
||||
router.back();
|
||||
};
|
||||
|
||||
const {commit, dispatch, state} = useStore()
|
||||
const { commit, dispatch, state } = useStore()
|
||||
const userInfo = computed(() => state.userInfo)
|
||||
const data = computed(() => state.routerInfo)
|
||||
console.log(data)
|
||||
const activeName = ref("first");
|
||||
|
||||
onMounted(() => {
|
||||
dispatch('getRouterInfo', {routerId})
|
||||
dispatch('getRouterInfo', { routerId })
|
||||
})
|
||||
|
||||
const handleClick = (tab, event) => {
|
||||
console.log(tab, event);
|
||||
};
|
||||
const path = {1: "path"};
|
||||
const path = { 1: "path" };
|
||||
|
||||
const dialogVisible = ref(false);
|
||||
const dialogVisibleTip = ref('');
|
||||
@@ -324,9 +322,9 @@ function judgeTaskIsEnd(type, endTimes, status) {
|
||||
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 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;
|
||||
@@ -431,7 +429,7 @@ async function toFinish(d) {
|
||||
}
|
||||
}
|
||||
//更新学员当前任务
|
||||
await request(UPDATE_CURRENT_TASK, {id: d.id, type: ROUTER, pid: routerId, name: d.name})
|
||||
await request(UPDATE_CURRENT_TASK, { id: d.id, type: ROUTER, pid: routerId, name: d.name })
|
||||
if (d.type === 3 || d.type === 7 || (d.type === 5 && d.examType === 2)) {
|
||||
d.status !== 1 && await request(STUDY_RECORD, {
|
||||
studentId: userInfo.value.id,
|
||||
@@ -445,22 +443,89 @@ async function toFinish(d) {
|
||||
|
||||
// 测评模块 请求接口跳转新的页面 - 新增 暂时未调试 目前无测评数据 2023-02-04
|
||||
if (d.type == 10) {
|
||||
// 此处判断测评跳转详情界面
|
||||
router.push({
|
||||
path: '/evaluation',
|
||||
query: {
|
||||
id: d.id,
|
||||
type: ROUTER,
|
||||
infoId: routerId,
|
||||
courseId: d.courseId,
|
||||
pName: data.value.name,
|
||||
sName: data.value.currentStageName,
|
||||
chapterOrStageId: data.value.currentStageId,
|
||||
exname: d.name, // 测评名称
|
||||
btype: 2 // 1项目 2 路径图
|
||||
},
|
||||
});
|
||||
return
|
||||
if (d.quizTaskId == null) {
|
||||
// 肯定没有完成测评
|
||||
// 调用接口 跳转页面
|
||||
console.log('我是查询测评跳转链接所传递得参数', {
|
||||
"businessType": "learningpath",
|
||||
"chapterId": data.value.currentStageId,
|
||||
"courseId": d.courseId,
|
||||
"quizKid": d.targetId,
|
||||
"routerOrProjectId": routerId,
|
||||
"studentId": userInfo.value.id,
|
||||
"studentName": userInfo.value.realName
|
||||
})
|
||||
request(EvaluationToLearn, {
|
||||
"businessType": "learningpath",
|
||||
"chapterId": data.value.currentStageId,
|
||||
"courseId": d.courseId,
|
||||
"quizKid": d.targetId,
|
||||
"routerOrProjectId": routerId,
|
||||
"studentId": userInfo.value.id,
|
||||
"studentName": userInfo.value.realName
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 200) {
|
||||
let jumpUrl = res.data.quizUrl
|
||||
// 此处写跳转url
|
||||
window.open(jumpUrl, '_top')
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
return
|
||||
} else {
|
||||
// 进行中 或者 已完成
|
||||
// 调用接口 判断当前测评状态 跳转页面
|
||||
console.log('我是查询测评跳转链接所传递得参数', {
|
||||
"quizTaskId": d.quizTaskId
|
||||
})
|
||||
request(QueryEvaluationTaskStatusOne, {
|
||||
"quizTaskId": d.quizTaskId
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 200) {
|
||||
if (res.data.complete_status == 2) {
|
||||
ElMessage.error("您已完成测评")
|
||||
return
|
||||
} else {
|
||||
// 重新查询跳转
|
||||
// 调用接口 跳转页面
|
||||
console.log('我是查询测评跳转链接所传递得参数', {
|
||||
"businessType": "learningpath",
|
||||
"chapterId": data.value.currentStageId,
|
||||
"courseId": d.courseId,
|
||||
"quizKid": d.targetId,
|
||||
"routerOrProjectId": routerId,
|
||||
"studentId": userInfo.value.id,
|
||||
"studentName": userInfo.value.realName
|
||||
})
|
||||
request(EvaluationToLearn, {
|
||||
"businessType": "learningpath",
|
||||
"chapterId": data.value.currentStageId,
|
||||
"courseId": d.courseId,
|
||||
"quizKid": d.targetId,
|
||||
"routerOrProjectId": routerId,
|
||||
"studentId": userInfo.value.id,
|
||||
"studentName": userInfo.value.realName
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 200) {
|
||||
let jumpUrl = res.data.quizUrl
|
||||
// 此处写跳转url
|
||||
window.open(jumpUrl, '_top')
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// 项目任务 直接跳转项目详情
|
||||
@@ -476,19 +541,19 @@ async function toFinish(d) {
|
||||
}
|
||||
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,
|
||||
infoId: routerId,
|
||||
courseId: d.courseId,
|
||||
pName: data.value.name,
|
||||
sName: data.value.currentStageName,
|
||||
chapterOrStageId: data.value.currentStageId,
|
||||
btype: 2
|
||||
},
|
||||
}) : ''
|
||||
router.push({
|
||||
path,
|
||||
query: {
|
||||
id: d.id,
|
||||
type: ROUTER,
|
||||
infoId: routerId,
|
||||
courseId: d.courseId,
|
||||
pName: data.value.name,
|
||||
sName: data.value.currentStageName,
|
||||
chapterOrStageId: data.value.currentStageId,
|
||||
btype: 2
|
||||
},
|
||||
}) : ''
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -161,6 +161,9 @@ export default defineConfig(({ command, mode }) =>
|
||||
},'/vote/queryVoteById': {
|
||||
target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
|
||||
changeOrigin: true,
|
||||
},'/evaluation/queryEvaluationTaskStatusOne': {
|
||||
target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
|
||||
changeOrigin: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user