Merge branch 'zcwy-0415' into dev0223

This commit is contained in:
zhangsir
2024-05-08 17:27:47 +08:00
6 changed files with 103 additions and 4 deletions

View File

@@ -594,6 +594,16 @@
}
];
}
if (n.indexOf("/trainingnewmanager") !== -1 || n.indexOf("/TrainingNewManager") !== -1) {
state.list = [
{
name: "报表中心",
},
{
name:'新任管理者培训数据'
},
];
}
if (n.indexOf("/learningpathmap") !== -1 || n.indexOf("/LearningPathMap") !== -1) {
state.list = [
{

View File

@@ -573,6 +573,15 @@
<router-link to="/employeelearning">员工学习数据</router-link>
</a-menu-item>
</a-sub-menu>
<a-menu-item key="sub17-4" v-if="checkMenu('evaluationupload')">
<span
:class="{
circleActive: selectedKeys[0] === 'sub17-4' ? true : false,
circle: selectedKeys[0] === 'sub17-4' ? false : true,
}"
></span>
<router-link to="/trainingnewmanager">新任管理者培训数据</router-link>
</a-menu-item>
</a-sub-menu>
<a-menu-item key="sub16" v-if="checkMenu('OldSystemManage')">
<div class="imgBox">
@@ -1022,6 +1031,12 @@ export default {
selectedKeys: "sub17-3-2",
pagename: "员工学习数据",
},
{
href: "/trainingnewmanager",
openKeys: "sub17",
selectedKeys: "sub17-4",
pagename: "新任管理者培训数据",
},
{
href: "/oldsystemmanage",
openKeys: "sub18",

View File

@@ -243,7 +243,7 @@ const columns = ref([
width: 80,
align: "center",
ellipsis: true,
customRender: ({ record: { finishStatus } }) => finishStatus ? "已完成" : "未开始",
customRender: ({ record: { finishStatus } }) => finishStatus==9 ? "已完成" : finishStatus==2 ? "进行中": '未开始',
},
{
title: "操作",

View File

@@ -163,6 +163,10 @@
<span>任务列表</span>
</div>
<div class="tit_right">
<div style="margin-right: 14px">
<span style="margin-right: 8px" :style="{color: switchList ? '#4ea6ff' : '#ffb64e'}">{{switchList?'自由学习模式':'顺序学习模式'}}</span>
<a-switch v-model:checked="switchList" />
</div>
<div class="btn btn1" @click="showChangeModal">
<div class="btnText">移动任务到关卡</div>
</div>
@@ -547,7 +551,7 @@ function deleteTask(element, index) {
},
});
}
const switchList = ref(false)
const showChangeModal = () => {
if (routerInfo.value?.chapterList?.length <= 1) {
message.warning("请添加关卡!");

View File

@@ -119,6 +119,10 @@
<div class="boomcen">
<div class="onerow">
<div class="taskmain">任务列表</div>
<div class="taskmain_switch">
<span class="taskmain_switch_text" :style="{color: projectInfo?.projectInfo?.unlockMode == 1 ? '#4ea6ff' : '#ffb64e'}">{{projectInfo?.projectInfo?.unlockMode == 1 ?'自由学习模式':'顺序学习模式'}}</span>
<a-switch v-model:checked="switchList" />
</div>
<button class="btn" @click="showChangeModal">
移动任务到阶段
</button>
@@ -418,7 +422,7 @@ import {TASK_TYPE} from "@/utils/const";
import {request} from "@/api/request";
import {PROJECT_DETAIL_MODIFY, PROJECT_RELEASE} from "@/api/apis";
import dialog from "@/utils/dialog";
import { editProjectModel } from "@/api/indexLearningPath";
const route = useRoute();
const courseRef = ref({})
const visiblene = ref(false);
@@ -460,6 +464,7 @@ function changeStageIndex(index) {
const getTask = async () => {
await api.getDraftTask({projectId: route.query.projectId}).then((res) => {
projectInfo.value = res.data.data
projectInfo.value.projectInfo.unlockMode == 1 ? switchList.value = true : switchList.value = false
console.log("获取任务列表:" + JSON.stringify(projectInfo.value) )
});
};
@@ -467,7 +472,11 @@ const getTask = async () => {
const editTaskForType = (ele, index) => {
courseRef.value['el' + ele.type].openDrawer(index, ele)
};
const switchList = ref(false)
watch(()=>switchList.value,(newVal)=>{
newVal ? projectInfo.value.projectInfo.unlockMode = 1 : projectInfo.value.projectInfo.unlockMode = 2
editProjectModel(projectInfo.value.projectInfo)
})
const showChangeModal = () => {
if (projectInfo.value?.stageList?.length <= 1) {
message.warning("请添加阶段!");
@@ -1420,6 +1429,21 @@ const openCourse = (ele) => {
color: #000000;
margin-top: 10px;
}
.taskmain_switch{
position: absolute;
top: 0;
right: 268px;
width: 150px;
height: 40px;
border-radius: 8px;
cursor: pointer;
text-align: center;
line-height: 40px;
.taskmain_switch_text{
margin-right: 10px;
}
}
.btn {
position: absolute;

View File

@@ -0,0 +1,46 @@
<template>
<div class="train_newman">
<div class="title">新任管理者线下学习项目定制报表</div>
<div class="btn" @click="downReport">
<div class="img"></div>
<div class="text">报表下载</div>
</div>
</div>
</template>
<script setup>
const downReport = () => {
console.log('下载报表')
window.open(`${process.env.VUE_APP_BASE_API}/admin/project/report/data`)
}
</script>
<style lang="scss" scoped>
.train_newman{
margin: 40px 0 0 50px;
.title{
color: #000000;
margin-bottom: 16px;
}
.btn {
cursor: pointer;
width: 130px;
height: 40px;
border-radius: 8px;
display: flex;
justify-content: center;
align-items: center;
background: #4ea6ff;
.img {
width: 17px;
height: 16px;
background-image: url(../../assets/images/coursewareManage/export1.png);
background-size: 100% 100%;
margin-right: 7px;
}
.text{
color: #ffffff;
}
}
}
</style>