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

View File

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

View File

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