必修任务下载实现

This commit is contained in:
zhangsir
2024-05-07 11:12:42 +08:00
parent e281e872c1
commit 352ca40460
3 changed files with 9 additions and 3 deletions

View File

@@ -573,7 +573,7 @@
<router-link to="/employeelearning">员工学习数据</router-link>
</a-menu-item>
</a-sub-menu>
<a-menu-item key="sub17-4">
<a-menu-item key="sub17-4" v-if="checkMenu('evaluationupload')">
<span
:class="{
circleActive: selectedKeys[0] === 'sub17-4' ? true : false,

View File

@@ -120,7 +120,7 @@
<div class="onerow">
<div class="taskmain">任务列表</div>
<div class="taskmain_switch">
<span class="taskmain_switch_text" :style="{color: switchList ? '#4ea6ff' : '#ffb64e'}">{{switchList?'自由学习模式':'顺序学习模式'}}</span>
<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">
@@ -422,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);
@@ -464,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) )
});
};
@@ -472,6 +473,10 @@ 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("请添加阶段!");

View File

@@ -11,6 +11,7 @@
<script setup>
const downReport = () => {
console.log('下载报表')
window.open(`${process.env.VUE_APP_BASE_API}/admin/project/report/data`)
}
</script>