Merge remote-tracking branch 'origin/develop' into develop

# Conflicts:
#	src/views/roadmap/PathDetails.vue
This commit is contained in:
yuping
2022-12-23 17:01:56 +08:00
5 changed files with 1981 additions and 2123 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@
<div class="pathdetails" style="padding: 30px">
<!-- 面包屑导航 -->
<div class="crumb">
<div>{{data.name}}</div>
<div>{{ data.name }}</div>
<div style="margin-left: 6px; margin-right: 6px">/</div>
<div style="font-weight: 700">项目详情</div>
@@ -15,12 +15,12 @@
</div>
<!-- 面包屑导航 -->
<div class="pdname">
{{ userInfo.bandDesc }}
<span @click="introductionPro" style="font-size:14px;color:#fff;margin-left: 33px;cursor: pointer;">简介
{{ userInfo.bandDesc }}
<span @click="introductionPro" style="font-size:14px;color:#fff;margin-left: 33px;cursor: pointer;">简介
<span style="position: relative;top:1px;left:-3px;cursor: pointer;">></span>
</span>
</div>
<!-- 详细信息 -->
<div class="detailinfo">
<div class="detailL">
@@ -116,7 +116,7 @@
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="课程公告" name="first">
<div class="notice">
{{ data.remark || "暂无公告" }}
{{ data.notice || "暂无公告" }}
</div>
</el-tab-pane>
<!--
@@ -238,17 +238,13 @@
</div>
<!-- 详细信息 -->
<!-- 弹框提示信息 -->
<el-dialog
title=""
top="347px"
v-model="dialogVisible"
:show-close="false"
<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">
<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>
<el-button type="primary" @click="dialogVisible = false" style="width:140px;height:40px;">确定</el-button>
</span>
</el-dialog>
</div>
@@ -375,7 +371,7 @@ const dialogVisibleTip = ref('该任务无法学习,请联系管理员进行
// }
function introductionPro() {
dialogVisibleTip.value =data.value.remark;
dialogVisibleTip.value = data.value.remark;
dialogVisible.value = true;
}
@@ -386,7 +382,7 @@ function toFinish(d, sName, chapterId) {
let date1 = new Date(d.endTime).getTime();
let date2 = new Date().getTime();
if (date1 < date2) {
dialogVisibleTip.value ='当前作业已结束';
dialogVisibleTip.value = '当前作业已结束';
dialogVisible.value = true;
// ElMessage.error("当前作业已结束")
return
@@ -397,7 +393,7 @@ function toFinish(d, sName, chapterId) {
let date1 = new Date(d.endTime).getTime();
let date2 = new Date().getTime();
if (date1 < date2) {
dialogVisibleTip.value ='当前直播已结束';
dialogVisibleTip.value = '当前直播已结束';
dialogVisible.value = true;
return
}
@@ -406,7 +402,7 @@ function toFinish(d, sName, chapterId) {
if (d.type == 5) {
if (d.taskStatus == 1 || d.taskStatus == 2) {
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
dialogVisibleTip.value ='该任务无法学习,请联系管理员进行替换!';
dialogVisibleTip.value = '该任务无法学习,请联系管理员进行替换!';
dialogVisible.value = true;
return
}
@@ -415,7 +411,7 @@ function toFinish(d, sName, chapterId) {
if (d.type == 11) {
if (d.taskStatus == 1 || d.taskStatus == 2) {
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
dialogVisibleTip.value ='该任务无法学习,请联系管理员进行替换!';
dialogVisibleTip.value = '该任务无法学习,请联系管理员进行替换!';
dialogVisible.value = true;
return
}
@@ -425,7 +421,7 @@ function toFinish(d, sName, chapterId) {
let date1 = new Date(d.endTime).getTime();
let date2 = new Date().getTime();
if (date1 < date2) {
dialogVisibleTip.value ='当前活动已结束';
dialogVisibleTip.value = '当前活动已结束';
dialogVisible.value = true;
return
}
@@ -434,7 +430,7 @@ function toFinish(d, sName, chapterId) {
if (d.type == 1) {
if (d.taskStatus == 1 || d.taskStatus == 2) {
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
dialogVisibleTip.value ='该任务无法学习,请联系管理员进行替换!';
dialogVisibleTip.value = '该任务无法学习,请联系管理员进行替换!';
dialogVisible.value = true;
return
}
@@ -443,7 +439,7 @@ function toFinish(d, sName, chapterId) {
if (d.type == 2) {
if (d.taskStatus == 1 || d.taskStatus == 2) {
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
dialogVisibleTip.value ='该任务无法学习,请联系管理员进行替换!';
dialogVisibleTip.value = '该任务无法学习,请联系管理员进行替换!';
dialogVisible.value = true;
return
}
@@ -492,21 +488,23 @@ function whiteTypes(type) {
.el-dialog__header {
display: none;
}
.crumb {
color: #fff;
display: flex;
font-size: 14px;
line-height: 24px;
.return {
position: absolute;
right: 10%;
.text {
text-align: center;
display: flex;
flex-direction: row;
align-items: center;
}
text-align: center;
display: flex;
flex-direction: row;
align-items: center;
}
}
}

View File

@@ -7,11 +7,11 @@
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="projectManage">
<div class="content">
<div class="title">我的项目</div>
<div class="search">
<!-- <el-select v-model="value" class="m-2" placeholder="Select">
<div class="projectManage">
<div class="content">
<div class="title">我的项目</div>
<div class="search">
<!-- <el-select v-model="value" class="m-2" placeholder="Select">
<el-option
v-for="item in projectClassify"
:key="item.value"
@@ -27,86 +27,59 @@
:value="item.value"
/>
</el-select> -->
<div style="width: 200px; margin-right: 20px">
<el-input v-model="projectname" placeholder="请输入项目名称" />
</div>
<div style="width: 420px">
<el-date-picker
v-model="searchTime"
type="datetimerange"
start-placeholder="开始时间"
end-placeholder="结束时间"
@change="selectTime"
/>
</div>
<div style="width: 200px; margin-right: 20px">
<el-input v-model="projectname" placeholder="请输入项目名称" />
</div>
<div style="width: 420px">
<el-date-picker v-model="searchTime" type="datetimerange" start-placeholder="开始时间" end-placeholder="结束时间"
@change="selectTime" />
</div>
<button
class="searchBtn"
@click="searchClick"
style="margin-left: 20px"
>
搜索
</button>
<button class="searchBtn" @click="resetClick">重置</button>
</div>
<div class="projectList" v-if="!projectList.length" style="display:flex;color:#909399;">
<img
class="img2"
style="margin-left: 675px;margin-top: 165px;width:148px;height:220px;"
src="../../assets/image/notask.png"
/>
</div>
<div v-else class="projectList" v-for="(i, k) in projectList" :key="k">
<div style="display: flex">
<img
style="width: 253px; height: 144px; border-radius: 4px"
:src="i.picUrl"
/>
<div style="margin-left: 29px">
<div class="projectName" :title="i.name">
{{ i.name }}
</div>
<div class="progress">
<div class="progressNow">当前进度</div>
<div style="width: 115px">
<el-progress
:percentage="parseInt(i.finishTaskNum / i.totalTaskNum * 100) "
:show-text="false"
:stroke-width="8"
color="rgba(255, 160, 80, 1)"
/>
</div>
<div class="progressNum">
{{
(i.finishTaskNum && i.totalTaskNum) ? parseInt(i.finishTaskNum / i.totalTaskNum * 100) : 0
}}%
</div>
</div>
<div class="studyNew" v-if="i.lastStudyTime">最新一次学习时间{{ i.lastStudyTime }}</div>
</div>
</div>
<div
class="tobestarted"
v-if="i.status == 2"
@click="goProjectDetails(i)"
>
待开始
</div>
<div class="gostudy" v-if="i.status == 0" @click="goProjectDetails(i)">
去学习
</div>
<div class="finish" v-if="i.status == 1" @click="goProjectDetails(i)">
已完成
</div>
<div
class="tobestarted"
v-if="i.status == 3"
@click="goProjectDetails(i)"
>
已结束
</div>
</div>
<!-- <div
<button class="searchBtn" @click="searchClick" style="margin-left: 20px">
搜索
</button>
<button class="searchBtn" @click="resetClick">重置</button>
</div>
<div class="projectList" v-if="!projectList.length" style="display:flex;color:#909399;">
<img class="img2" style="margin-left: 675px;margin-top: 165px;width:148px;height:220px;"
src="../../assets/image/notask.png" />
</div>
<div v-else class="projectList" v-for="(i, k) in projectList" :key="k">
<div style="display: flex">
<img style="width: 253px; height: 144px; border-radius: 4px" :src="i.picUrl" />
<div style="margin-left: 29px">
<div class="projectName" :title="i.name">
{{ i.name }}
</div>
<div class="progress">
<div class="progressNow">当前进度</div>
<div style="width: 115px">
<el-progress :percentage="parseInt(i.finishTaskNum / i.totalTaskNum * 100)" :show-text="false"
:stroke-width="8" color="rgba(255, 160, 80, 1)" />
</div>
<div class="progressNum">
{{
(i.finishTaskNum && i.totalTaskNum) ? parseInt(i.finishTaskNum / i.totalTaskNum * 100) : 0
}}%
</div>
</div>
<div class="studyNew" v-if="i.lastStudyTime">最新一次学习时间{{ i.lastStudyTime }}</div>
</div>
</div>
<div class="tobestarted" v-if="i.status == 2" @click="goProjectDetails(i)">
待开始
</div>
<div class="gostudy" v-if="i.status == 0" @click="goProjectDetails(i)">
去学习
</div>
<div class="finish" v-if="i.status == 1" @click="goProjectDetails(i)">
已完成
</div>
<div class="tobestarted" v-if="i.status == 3" @click="goProjectDetails(i)">
已结束
</div>
</div>
<!-- <div
style="display: flex; justify-content: center; margin-top: 30px"
v-if="projectTotal > 10"
>
@@ -121,17 +94,17 @@
/>
</div>
</div> -->
</div>
</div>
</div>
</div>
</template>
<script setup>
import { reactive, toRefs, ref, onMounted, computed } from "vue";
import { boeRequest, request, usePage, useRequest } from "@/api/request";
import {
ROUTER_CHAPTER_LIST,
PROJECT_LIST,
ROUTER_UNCOMPLETE_LIST,
ROUTER_CHAPTER_LIST,
PROJECT_LIST,
ROUTER_UNCOMPLETE_LIST,
} from "@/api/api";
import { useRouter } from "vue-router";
@@ -152,24 +125,24 @@ const userInfo = computed(() => store.state.userInfo);
//获取项目列表--------start------------------------------------
const getProject = () => {
request(PROJECT_LIST, {
beginTime: beginTime.value,
endTime: endTime.value,
key: projectname.value,
pageNo: currentPage.value,
pageSize: pageSize.value,
})
.then((res) => {
console.log("获取成功", res);
if (res.code === 200) {
projectList.value = res.data.rows;
projectTotal.value = Number(res.data.total);
console.log("projectTotal.value", projectTotal.value);
}
})
.catch((err) => {
console.log("获取失败", err);
});
request(PROJECT_LIST, {
beginTime: beginTime.value,
endTime: endTime.value,
key: projectname.value,
pageNo: currentPage.value,
pageSize: pageSize.value,
})
.then((res) => {
console.log("获取成功", res);
if (res.code === 200) {
projectList.value = res.data.rows;
projectTotal.value = Number(res.data.total);
console.log("projectTotal.value", projectTotal.value);
}
})
.catch((err) => {
console.log("获取失败", err);
});
};
getProject();
@@ -178,175 +151,189 @@ getProject();
//搜索
const searchClick = () => {
console.log("点击搜索", projectname.value, searchTime.value);
console.log("点击搜索", projectname.value, searchTime.value);
if (searchTime.value) {
beginTime.value = toDate(
new Date(searchTime.value[0]).getTime() / 1000,
"Y-M-D h:m:s"
);
endTime.value = toDate(
new Date(searchTime.value[1]).getTime() / 1000,
"Y-M-D h:m:s"
);
}
console.log("beginTime", beginTime.value, endTime.value);
getProject();
if (searchTime.value) {
beginTime.value = toDate(
new Date(searchTime.value[0]).getTime() / 1000,
"Y-M-D h:m:s"
);
endTime.value = toDate(
new Date(searchTime.value[1]).getTime() / 1000,
"Y-M-D h:m:s"
);
}
console.log("beginTime", beginTime.value, endTime.value);
getProject();
};
//重置
const resetClick = () => {
searchTime.value = "";
projectname.value = "";
currentPage.value = 1;
beginTime.value = "";
endTime.value = "";
getProject();
console.log("点击重置");
searchTime.value = "";
projectname.value = "";
currentPage.value = 1;
beginTime.value = "";
endTime.value = "";
getProject();
console.log("点击重置");
};
//搜索--------------end-----------------------------------------
const router = useRouter();
const goProjectDetails = (value) => {
import.meta.env.MODE === "development"
? router.push({
path: "/projectdetails",
query: { projectId: value.projectId },
})
: window.open(
`${import.meta.env.VITE_BOE_PATH_DETAIL_URL}/projectdetails&params=${encodeURIComponent(
`projectId=${value.projectId}`
)}`
);
import.meta.env.MODE === "development"
? router.push({
path: "/projectdetails",
query: { projectId: value.projectId },
})
: window.open(
`${import.meta.env.VITE_BOE_PATH_DETAIL_URL}/projectdetails&params=${encodeURIComponent(
`projectId=${value.projectId}`
)}`
);
};
</script>
<style lang="scss">
.projectManage {
width: 100%;
min-height: 800px;
//border-radius: 8px;
background-color: rgba(255, 255, 255, 1);
display: flex;
// background-color: #ccc;
.content {
width: 100%;
// flex: 1;
margin-top: 50px;
margin-left: 81px;
.title {
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 25px;
}
.search {
margin-top: 31px;
display: flex;
align-items: center;
.searchBtn {
width: 100px;
height: 35px;
border-radius: 8px;
display: flex;
justify-content: center;
align-items: center;
background: #387df7;
border: 1px solid #387df7;
color: #ffffff;
cursor: pointer;
margin-left: 10px;
}
}
.projectList {
margin-top: 40px;
display: flex;
justify-content: space-between;
align-items: center;
overflow-x: auto;
.projectName {
width: 270px;
margin-top: 12px;
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 25px;
margin-bottom: 40px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.progress {
display: flex;
align-items: center;
.el-progress-bar__outer {
background-color: rgba(255, 160, 80, 0.19);
}
.progressNow {
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
margin-right: 20px;
}
.progressNum {
font-size: 12px;
font-weight: 400;
color: #999999;
line-height: 17px;
margin-left: 26px;
}
}
.studyNew {
margin-top: 16px;
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 20px;
}
.tobestarted {
width: 140px;
height: 40px;
border-radius: 4px;
border: 1px solid #387df7;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
font-weight: 400;
color: #387df7;
line-height: 22px;
cursor: pointer;
margin-right: 120px;
}
.gostudy {
width: 140px;
height: 40px;
background: #387df7;
box-shadow: 1px 2px 15px 1px rgba(56, 125, 247, 0.34);
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
font-weight: 400;
color: #ffffff;
line-height: 22px;
margin-right: 120px;
cursor: pointer;
}
.finish {
width: 140px;
height: 40px;
background: rgba(56, 125, 247, 0.6);
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
font-weight: 400;
color: #ffffff;
line-height: 22px;
cursor: pointer;
}
}
}
width: 100%;
min-height: 800px;
//border-radius: 8px;
background-color: rgba(255, 255, 255, 1);
display: flex;
// background-color: #ccc;
.content {
width: 100%;
// flex: 1;
margin-top: 50px;
margin-left: 81px;
.title {
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 25px;
}
.search {
margin-top: 31px;
display: flex;
align-items: center;
.searchBtn {
width: 100px;
height: 35px;
border-radius: 8px;
display: flex;
justify-content: center;
align-items: center;
background: #387df7;
border: 1px solid #387df7;
color: #ffffff;
cursor: pointer;
margin-left: 10px;
}
}
.projectList {
margin-top: 40px;
display: flex;
justify-content: space-between;
align-items: center;
overflow-x: auto;
.projectName {
width: 270px;
margin-top: 12px;
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 25px;
margin-bottom: 40px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.progress {
display: flex;
align-items: center;
.el-progress-bar__outer {
background-color: rgba(255, 160, 80, 0.19);
}
.progressNow {
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
margin-right: 20px;
}
.progressNum {
font-size: 12px;
font-weight: 400;
color: #999999;
line-height: 17px;
margin-left: 26px;
}
}
.studyNew {
margin-top: 16px;
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 20px;
}
.tobestarted {
width: 140px;
height: 40px;
border-radius: 4px;
border: 1px solid #387df7;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
font-weight: 400;
color: #387df7;
line-height: 22px;
cursor: pointer;
margin-right: 120px;
}
.gostudy {
width: 140px;
height: 40px;
background: #387df7;
box-shadow: 1px 2px 15px 1px rgba(56, 125, 247, 0.34);
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
font-weight: 400;
color: #ffffff;
line-height: 22px;
margin-right: 120px;
cursor: pointer;
}
.finish {
width: 140px;
height: 40px;
background: rgba(56, 125, 247, 0.6);
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
font-weight: 400;
color: #ffffff;
line-height: 22px;
cursor: pointer;
}
}
}
}
</style>

File diff suppressed because it is too large Load Diff