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

# Conflicts:
#	src/views/roadmap/LearnPath.vue
This commit is contained in:
yuping
2022-12-22 12:54:33 +08:00
7 changed files with 1782 additions and 1842 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -7,7 +7,7 @@
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div
<!-- <div
style="
background: #0078fc;
height: 150px;
@@ -16,7 +16,7 @@
top: 0;
z-index: 1;
"
></div>
></div> -->
<div id="container">
<!-- <div id="nav">
<router-link

View File

@@ -1,32 +1,24 @@
<template>
<el-upload
:file-list="files"
:action="FILE_UPLOAD"
method="POST"
:show-file-list="false"
:on-change="handleChange"
:limit="max"
ref="imageRef"
:on-exceed="exceed"
>
<template #trigger>
<div>
<slot></slot>
</div>
</template>
</el-upload>
<el-upload :file-list="files" :action="FILE_UPLOAD" method="POST" :show-file-list="false" :on-change="handleChange"
:limit="max" ref="imageRef" :on-exceed="exceed">
<template #trigger>
<div>
<slot></slot>
</div>
</template>
</el-upload>
</template>
<script setup>
import {FILE_UPLOAD} from "@/api/api";
import {defineProps, ref, watch} from "vue";
import {ElMessage} from "element-plus";
import { FILE_UPLOAD } from "@/api/api";
import { defineProps, ref, watch } from "vue";
import { ElMessage } from "element-plus";
const props = defineProps({
value: [],
max: {
type: Number,
default: 1
}
value: [],
max: {
type: Number,
default: 1
}
})
const emit = defineEmits()
@@ -35,46 +27,51 @@ const files = ref([])
const imageRef = ref()
watch(props.value, () => {
props.value.length || (files.value = props.value)
props.value.length || (files.value = props.value)
})
function exceed() {
ElMessage.error(`只能上传${props.max}个附件`);
ElMessage.error(`只能上传${props.max}个附件`);
}
function handleChange(e) {
if (e.response && e.response.code === 200) {
e.url = e.response.data
}
if (e.response && e.response.code === 200) {
e.url = e.response.data
}
const index = files.value.findIndex(f => f.uid === e.uid)
if (index === -1) {
files.value.unshift(e)
} else {
files.value[index] = e
}
emit('update:value', files.value)
const index = files.value.findIndex(f => f.uid === e.uid)
if (index === -1) {
files.value.unshift(e)
} else {
files.value[index] = e
}
emit('update:value', files.value)
}
function remove(i) {
files.value.splice(i, 1)
files.value.splice(i, 1)
console.log(imageRef)
}
function clearFiles() {
imageRef.value.clearFiles();
}
function reUpload(i) {
if (files.value[i].status === 'ready' || files.value[i].status === 'uploading') {
imageRef.value.abort(files.value[i].raw)
files.value[i].status = 'abort';
} else if (files.value[i].status === 'fail' || files.value[i].status === 'abort') {
imageRef.value.handleStart(files.value[i].raw)
imageRef.value.submit()
}
if (files.value[i].status === 'ready' || files.value[i].status === 'uploading') {
imageRef.value.abort(files.value[i].raw)
files.value[i].status = 'abort';
} else if (files.value[i].status === 'fail' || files.value[i].status === 'abort') {
imageRef.value.handleStart(files.value[i].raw)
imageRef.value.submit()
}
}
function abort(i) {
imageRef.value.abort(files.value[i].raw)
imageRef.value.abort(files.value[i].raw)
}
defineExpose({reUpload, remove})
defineExpose({ reUpload, remove, clearFiles })
</script>

View File

@@ -166,7 +166,11 @@
<div class="tag3" style="margin-left: 11px">作业</div>
</div>
</div>
<div class="submit" @click="toWork" v-if="data.workDto?.workId">
<div v-if="isEndSubMitWork()" class="submit" style="background: #999">
已结束
</div>
<div v-else class="submit" @click="toWork" v-if="data.workDto?.workId">
交作业
</div>
</div>
@@ -246,7 +250,7 @@ import {
} from "@/api/api";
import { useRoute, useRouter } from "vue-router";
import { useUserInfo } from "@/api/utils";
import { ElMessage } from "element-plus";
import { ElMessage, messageConfig } from "element-plus";
const router = useRouter();
const returnclick = () => {
router.back();
@@ -365,6 +369,19 @@ function toSurvery() {
});
}
function isEndSubMitWork() {
if(data.value.workDto.submitEndTime){
let date1 = new Date(data.value.workDto.submitEndTime).getTime();
let date2 = new Date().getTime();
console.log(date1, date2, date1>date2, data.value.workDto.submitEndTime)
if(date1<date2){
return true;
}
}else{
return false;
}
}
function toWork() {
router.push({
path: "/homeworkpage",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,79 +1,79 @@
<template>
<div class="learnpath">
<div class="content">
<div class="title">
<div class="titleL">
<div @click="returnfun" class="text">学习路径图</div>
<div class="info" style="margin-right: 14px" v-if="userInfo.jobName">
<img style="width: 20px; height: 18px; margin-right: 10px" src="../../assets/image/pm.png"/>
<div style="margin-top: 1px">{{ userInfo.jobName }}</div>
</div>
<div class="info" v-if="userInfo.bandDesc">
<img style="width: 18px; height: 17px; margin-right: 11px" src="../../assets/image/band.png"/>
<div style="margin-top: 2px">{{ userInfo.bandDesc }}</div>
</div>
</div>
<div :style="{ display: !showmapdetail ? 'flex' : 'none' }">
<!-- <el-popover width="475px" trigger="hover" popper-class="lppopover">-->
<!-- <div>-->
<!-- <div class="finish">-->
<!-- <img-->
<!-- src="../../assets/image/circle.png"-->
<!-- style="width: 20px; height: 20px"-->
<!-- />-->
<!-- <div class="text">未完成</div>-->
<!-- <div class="box"></div>-->
<!-- </div>-->
<!-- <div-->
<!-- v-for="(value, index) in unCompleteTaskList"-->
<!-- :key="index"-->
<!-- class="tasks"-->
<!-- :style="{-->
<!-- 'border-bottom':-->
<!-- index === unCompleteTaskList.length - 1-->
<!-- ? null-->
<!-- : '1px solid rgba(229, 228, 228, 1)',-->
<!-- }"-->
<!-- >-->
<!-- <div style="font-size: 14px; font-weight: 500; color: #677d86">-->
<!-- {{ value.name }}-->
<!-- </div>-->
<!-- <img-->
<!-- style="width: 20px; height: 20px"-->
<!-- src="../../assets/image/go.png"-->
<!-- @click="toUnTask(chapterId)"-->
<!-- />-->
<!-- </div>-->
<!-- </div>-->
<!-- <template #reference>-->
<!-- todo #学习路径 只会有一个未完成任务么?是否是直接跳到任务详情-->
<!-- <div class="titleR">进入未完成任务</div>-->
<!-- </template>-->
<!-- </el-popover>-->
</div>
<div :style="{ display: showmapdetail ? 'flex' : 'none' }" class="titleR" @click="returnfun">
返回列表
</div>
</div>
<!-- 路径列表-->
<div :style="{ display: !showmapdetail ? 'flex' : 'none' }" class="head">
<div style="min-width: 770px; width: 100%">
<el-table :data="data" style="width: 100%" @row-click="gofun">
<el-table-column prop="img" label="缩略图" #default="scope" align="center" width="255">
<img :src="scope.row.picUrl" style="width: 230px; height: 155px"/>
</el-table-column>
<el-table-column align="center" prop="name" label="路径名称"/>
<el-table-column align="center" prop="introduce" label="路径介绍" #default="scope">
<el-popover placement="top-start" title="路径介绍" trigger="hover" :content="scope.row.remark">
<template #reference>
<div>{{ scope.row.remark }}</div>
</template>
</el-popover>
</el-table-column>
<div class="learnpath">
<div class="content">
<div class="title">
<div class="titleL">
<div @click="returnfun" class="text">学习路径图</div>
<div class="info" style="margin-right: 14px" v-if="userInfo.jobName">
<img style="width: 20px; height: 18px; margin-right: 10px" src="../../assets/image/pm.png" />
<div style="margin-top: 1px">{{ userInfo.jobName }}</div>
</div>
<div class="info" v-if="userInfo.bandDesc">
<img style="width: 18px; height: 17px; margin-right: 11px" src="../../assets/image/band.png" />
<div style="margin-top: 2px">{{ userInfo.bandDesc }}</div>
</div>
</div>
<div :style="{ display: !showmapdetail ? 'flex' : 'none' }">
<!-- <el-popover width="475px" trigger="hover" popper-class="lppopover">-->
<!-- <div>-->
<!-- <div class="finish">-->
<!-- <img-->
<!-- src="../../assets/image/circle.png"-->
<!-- style="width: 20px; height: 20px"-->
<!-- />-->
<!-- <div class="text">未完成</div>-->
<!-- <div class="box"></div>-->
<!-- </div>-->
<!-- <div-->
<!-- v-for="(value, index) in unCompleteTaskList"-->
<!-- :key="index"-->
<!-- class="tasks"-->
<!-- :style="{-->
<!-- 'border-bottom':-->
<!-- index === unCompleteTaskList.length - 1-->
<!-- ? null-->
<!-- : '1px solid rgba(229, 228, 228, 1)',-->
<!-- }"-->
<!-- >-->
<!-- <div style="font-size: 14px; font-weight: 500; color: #677d86">-->
<!-- {{ value.name }}-->
<!-- </div>-->
<!-- <img-->
<!-- style="width: 20px; height: 20px"-->
<!-- src="../../assets/image/go.png"-->
<!-- @click="toUnTask(chapterId)"-->
<!-- />-->
<!-- </div>-->
<!-- </div>-->
<!-- <template #reference>-->
<!-- todo #学习路径 只会有一个未完成任务么?是否是直接跳到任务详情-->
<!-- <div class="titleR">进入未完成任务</div>-->
<!-- </template>-->
<!-- </el-popover>-->
</div>
<div :style="{ display: showmapdetail ? 'flex' : 'none' }" class="titleR" @click="returnfun">
返回列表
</div>
</div>
<!-- 路径列表-->
<div :style="{ display: !showmapdetail ? 'flex' : 'none' }" class="head">
<div style="min-width: 770px; width: 100%">
<el-table :data="data" style="width: 100%" @row-click="gofun">
<el-table-column prop="img" label="缩略图" #default="scope" align="center" width="255">
<img :src="scope.row.picUrl" style="width: 230px; height: 155px" />
</el-table-column>
<el-table-column align="center" prop="name" label="路径名称" />
<el-table-column align="center" prop="introduce" label="路径介绍" #default="scope">
<el-popover placement="bottom-start" :width="400" title="路径介绍" trigger="hover" :content="scope.row.remark">
<template #reference>
<div>{{ scope.row.remark }}</div>
</template>
</el-popover>
</el-table-column>
<el-table-column align="center" prop="organizationName" label="归属组织"/>
<el-table-column #default="scope" align="center" :width="150" prop="state" label="状态">
<img :src="
<el-table-column align="center" prop="organizationName" label="归属组织" />
<el-table-column #default="scope" align="center" :width="150" prop="state" label="状态">
<img :src="
scope.row.status === 0
? ongoing
: scope.row.status === 1
@@ -81,255 +81,243 @@
: scope.row.status === -1
? nostarted
: null
" style="width: 99px; height: 99px"/>
</el-table-column>
</el-table>
</div>
</div>
" style="width: 99px; height: 99px" />
</el-table-column>
</el-table>
</div>
</div>
<!-- :src="{ 0: nostarted, 1: completed, 2: ongoing }[scope.row.status]"-->
<!-- 路径列表-->
<!-- 路径详情图 -->
<div :style="{ display: showmapdetail ? 'flex' : 'none' }" class="mapdetail">
<div v-for="(item, i) in detail?.rows" :key="i">
<img :src="useImage(`222_0${i + 2}.png`)"/>
</div>
<!-- <div class="modal"-->
<!-- style="width: calc(100% - 168px); height: 525px;background-image: url('../../src/assets/image/mapdetail.png');background-size: 100%;background-repeat: no-repeat;">-->
<!-- </div>-->
</div>
<!-- 路径详情图 -->
</div>
<!-- <svg width="100%" height="600" xmlns="http://www.w3.org/2000/svg" style="padding:40px">-->
<!-- <defs>-->
<!-- <marker id="arrow" markerHeight="13" markerWidth="13">-->
<!-- <path d="M2,2 L2,10 L10,6 L2,2" stroke="none" fill="#409eff"></path>-->
<!-- </marker>-->
<!-- </defs>-->
<!-- <path d="M105 570 C1000 600 -60 505 890 270" stroke-width="3" stroke="#409eff" fill="none" stroke-linecap="round" stroke-dasharray=".1 5" marker-mid="url(#arrow)" marker-start="url(#arrow)" marker-end="url(#arrow)"></path>-->
<!-- <text x="50" y="550">初级产品经理</text>-->
<!-- <circle cx="90" cy="570" r="10" fill="#fff" stroke-width="5" stroke="#22a000"></circle>-->
<!-- <text x="450" y="400">中级产品经理</text>-->
<!-- <circle cx="490" cy="420" r="10" fill="#fff" stroke-width="5" stroke="#22a000"></circle>-->
<!-- <text x="850" y="250">高级产品经理</text>-->
<!-- <circle cx="890" cy="270" r="10" fill="#fff" stroke-width="5" stroke="#22a000"></circle>-->
<!-- </svg>-->
</div>
<!-- :src="{ 0: nostarted, 1: completed, 2: ongoing }[scope.row.status]"-->
<!-- 路径列表-->
<!-- 路径详情图 -->
<div :style="{ display: showmapdetail ? 'flex' : 'none' }" class="mapdetail">
<div v-for="(item, i) in detail?.rows" :key="i">
<img :src="useImage(`222_0${i + 2}.png`)" />
</div>
<!-- <div class="modal"-->
<!-- style="width: calc(100% - 168px); height: 525px;background-image: url('../../src/assets/image/mapdetail.png');background-size: 100%;background-repeat: no-repeat;">-->
<!-- </div>-->
</div>
<!-- 路径详情图 -->
</div>
</div>
</template>
<script setup>
import {reactive, toRefs, ref, onMounted, computed} from "vue";
import { reactive, toRefs, ref, onMounted, computed } from "vue";
import nostarted from "../../assets/image/nostarted.png";
import completed from "../../assets/image/completed.png";
import ongoing from "../../assets/image/ongoing.png";
import {boeRequest, request, usePage, useRequest} from "@/api/request";
import { boeRequest, request, usePage, useRequest } from "@/api/request";
import {
ROUTER_CHAPTER_LIST,
ROUTER_LIST,
ROUTER_UNCOMPLETE_LIST,
ROUTER_CHAPTER_LIST,
ROUTER_LIST,
ROUTER_UNCOMPLETE_LIST,
} from "@/api/api";
import {useImage} from "@/api/utils";
import {useRouter} from "vue-router";
import { useImage } from "@/api/utils";
import { useRouter } from "vue-router";
import store from "@/store";
const detail = ref();
const userInfo = computed(() => store.state.userInfo);
const {data} = usePage(ROUTER_LIST, {pageSize: 60});
const { data } = usePage(ROUTER_LIST, { pageSize: 60 });
console.log("datadata", data);
const router = useRouter();
const returnclick = () => {
router.back();
router.back();
};
// const {unCompleteTaskList} = useRequest(ROUTER_UNCOMPLETE_LIST, {});
const state = reactive({
showmapdetail: false,
showmapdetail: false,
});
const {showmapdetail} = toRefs(state);
const { showmapdetail } = toRefs(state);
const returnfun = () => {
state.showmapdetail = false;
state.showmapdetail = false;
};
async function gofun({routerId, name: routerName}) {
// console.log(routerId)
// const data = await request(ROUTER_CHAPTER_LIST, {stuChapterListVo: {routerId}})
// detail.value = data.data
// state.showmapdetail = true;
// router.push({path: "/pathdetails", query: {routerId}});
// import.meta.env.MODE === "development"
// ? router.push({
// path: "/pathdetails",
// query: {routerId, routerName},
// })
// : window.open(
// `http://u-pre.boe.com/pc/forward?to=/fe-student/pathdetails&params=${encodeURIComponent(
// `routerId=${routerId}&routerName=${routerName}`
// )}`
// );
}
function toUnTask() {
async function gofun({ routerId, name: routerName }) {
// console.log(routerId)
// const data = await request(ROUTER_CHAPTER_LIST, {stuChapterListVo: {routerId}})
// detail.value = data.data
// state.showmapdetail = true;
// router.push({path: "/pathdetails", query: {routerId}});
import.meta.env.MODE === "development"
? router.push({
path: "/pathdetails",
query: { routerId, routerName },
})
: window.open(
`http://u-pre.boe.com/pc/forward?to=/fe-student/pathdetails&params=${encodeURIComponent(
`routerId=${routerId}&routerName=${routerName}`
)}`
);
}
function toUnTask() { }
</script>
<style lang="scss">
//#app div:nth-child(1) {
// background: rgba(0, 0, 0, 0) !important;
//}
.modal {
#app div:nth-child(1) {
// background: rgba(0, 0, 0, 0) !important;
}
.modal {}
.modal:after {
content: "";
content: "";
}
.learnpath {
width: 100%;
min-height: 800px;
//border-radius: 8px;
background-color: rgba(255, 255, 255, 1);
display: flex;
width: 100%;
min-height: 800px;
//border-radius: 8px;
background-color: rgba(255, 255, 255, 1);
display: flex;
.content {
width: 100%;
// flex: 1;
margin-top: 43px;
.content {
width: 100%;
// flex: 1;
margin-top: 43px;
// background-color: pink;
.title {
display: flex;
justify-content: space-between;
align-items: center;
margin-left: 53px;
margin-right: 54px;
}
// background-color: pink;
.title {
display: flex;
justify-content: space-between;
align-items: center;
margin-left: 53px;
margin-right: 54px;
}
.title .titleL {
display: flex;
align-items: center;
}
.title .titleL {
display: flex;
align-items: center;
}
.title .titleL .text {
font-size: 18px;
font-weight: bold;
color: #333333;
line-height: 24px;
margin-right: 26px;
}
.title .titleL .text {
font-size: 18px;
font-weight: bold;
color: #333333;
line-height: 24px;
margin-right: 26px;
}
.title .titleL .info {
display: flex;
// align-items: center;
font-size: 14px;
font-weight: 400;
color: #387df7;
}
.title .titleL .info {
display: flex;
// align-items: center;
font-size: 14px;
font-weight: 400;
color: #387df7;
}
.title .titleR {
width: 157px;
height: 48px;
border: 2px solid #0060ff;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
font-size: 16px;
font-weight: bold;
color: #0060ff;
}
.title .titleR {
width: 157px;
height: 48px;
border: 2px solid #0060ff;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
font-size: 16px;
font-weight: bold;
color: #0060ff;
}
.head {
// height: 50px;
background: #f9f9f9;
margin-top: 50px;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 14px;
font-weight: 500;
color: #333333;
margin-left: 53px;
margin-right: 54px;
width: calc(100% - 107px);
// min-width: 770px;
overflow-x: auto;
.head {
// height: 50px;
background: #f9f9f9;
margin-top: 50px;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 14px;
font-weight: 500;
color: #333333;
margin-left: 53px;
margin-right: 54px;
width: calc(100% - 107px);
// min-width: 770px;
overflow-x: auto;
.el-table th.el-table__cell {
background: rgba(249, 249, 249, 1);
color: rgba(51, 51, 51, 1);
font-size: 14px;
font-weight: 500;
}
.el-table th.el-table__cell {
background: rgba(249, 249, 249, 1);
color: rgba(51, 51, 51, 1);
font-size: 14px;
font-weight: 500;
}
.el-table .cell {
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
word-break: break-all;
}
.el-table .cell {
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
word-break: break-all;
}
.el-table__row {
height: 231px;
font-size: 14px;
color: rgba(102, 102, 102, 1);
font-weight: 500;
}
}
.el-table__row {
height: 231px;
font-size: 14px;
color: rgba(102, 102, 102, 1);
font-weight: 500;
}
}
.mapdetail {
width: calc(100% - 107px);
height: 577px;
background: rgba(242, 245, 247, 0.6);
margin-top: 26px;
border-radius: 8px;
margin-left: 53px;
margin-right: 54px;
display: flex;
align-items: center;
justify-content: center;
}
}
.mapdetail {
width: calc(100% - 107px);
height: 577px;
background: rgba(242, 245, 247, 0.6);
margin-top: 26px;
border-radius: 8px;
margin-left: 53px;
margin-right: 54px;
display: flex;
align-items: center;
justify-content: center;
}
}
}
.lppopover {
.finish {
padding-left: 27px;
padding-right: 18px;
margin-top: 15px;
margin-bottom: 17px;
position: relative;
display: flex;
align-items: center;
}
.finish {
padding-left: 27px;
padding-right: 18px;
margin-top: 15px;
margin-bottom: 17px;
position: relative;
display: flex;
align-items: center;
}
.text {
font-size: 16px;
font-weight: 800;
color: #333333;
margin-left: 8px;
}
.text {
font-size: 16px;
font-weight: 800;
color: #333333;
margin-left: 8px;
}
.box {
width: 59px;
height: 10px;
background-color: rgba(36, 120, 255, 0.15);
position: absolute;
left: 50px;
top: 15px;
}
.box {
width: 59px;
height: 10px;
background-color: rgba(36, 120, 255, 0.15);
position: absolute;
left: 50px;
top: 15px;
}
.tasks {
width: 405px;
height: 52px;
display: flex;
align-items: center;
justify-content: space-between;
margin-left: 28px;
cursor: pointer;
}
.tasks {
width: 405px;
height: 52px;
display: flex;
align-items: center;
justify-content: space-between;
margin-left: 28px;
cursor: pointer;
}
.box-item {
width: 200px;
margin-top: 10px;
}
}
</style>