mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 04:16:47 +08:00
Merge branch 'develop' of http://gitlab.dongwu-inc.com:10080/BOE/fe-manage into develop
# Conflicts: # vue.config.js
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
// export const USER_LIST = '/userbasic/user/list post'
|
//学员列表带分页
|
||||||
|
export const USER_LIST_PAGE = '/userbasic/user/list post'
|
||||||
|
//学员列表 没有分页数据 只能通过名称检索 速度较快
|
||||||
export const USER_LIST = '/userbasic/user/searchList post'
|
export const USER_LIST = '/userbasic/user/searchList post'
|
||||||
export const ORG_LIST = '/userbasic/org/list post'
|
export const ORG_LIST = '/userbasic/org/list post'
|
||||||
export const ORG_CHILD_LIST = '/userbasic/org/info post'
|
export const ORG_CHILD_LIST = '/userbasic/org/info post'
|
||||||
|
|||||||
184
src/components/common/CommonAlert.vue
Normal file
184
src/components/common/CommonAlert.vue
Normal file
@@ -0,0 +1,184 @@
|
|||||||
|
<template>
|
||||||
|
<a-modal
|
||||||
|
:visible="true"
|
||||||
|
:footer="null"
|
||||||
|
:title="null"
|
||||||
|
:centere="true"
|
||||||
|
:closable="false"
|
||||||
|
style="margin-top: 400px"
|
||||||
|
:zIndex="9999"
|
||||||
|
@cancel="close"
|
||||||
|
>
|
||||||
|
<div class="delete">
|
||||||
|
<div class="del_header"></div>
|
||||||
|
<div class="del_main">
|
||||||
|
<div class="header">
|
||||||
|
<div class="del-icons">
|
||||||
|
<img :src="types[type]" alt=""/>
|
||||||
|
</div>
|
||||||
|
<span>提示</span>
|
||||||
|
</div>
|
||||||
|
<div class="body">
|
||||||
|
<div><span>{{ content }}</span></div>
|
||||||
|
</div>
|
||||||
|
<div class="del_btnbox">
|
||||||
|
<div class="del_btn btn1" @click="close">
|
||||||
|
<div class="btnText">取消</div>
|
||||||
|
</div>
|
||||||
|
<div class="del_btn btn2" @click="handleConfirm">
|
||||||
|
<div class="btnText">确定</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a-modal>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import notide from '@/assets/images/coursewareManage/notice.png'
|
||||||
|
import infoPng from '@/assets/images/coursewareManage/QR.png'
|
||||||
|
import {defineProps, ref} from "vue";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
close: {
|
||||||
|
type: Function,
|
||||||
|
default: () => ({})
|
||||||
|
},
|
||||||
|
ok: {
|
||||||
|
type: Function,
|
||||||
|
default: () => ({})
|
||||||
|
},
|
||||||
|
content: String,
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: '提示'
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
type: Number,
|
||||||
|
default: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const types = {
|
||||||
|
1: infoPng,
|
||||||
|
2: notide
|
||||||
|
}
|
||||||
|
const type = ref(1)
|
||||||
|
|
||||||
|
function handleConfirm() {
|
||||||
|
props.ok()
|
||||||
|
props.close()
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.delete {
|
||||||
|
min-width: 424px;
|
||||||
|
background: #ffffff;
|
||||||
|
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.21);
|
||||||
|
border-radius: 4px;
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
top: 10%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
|
||||||
|
.del_header {
|
||||||
|
position: absolute;
|
||||||
|
width: calc(100%);
|
||||||
|
height: 40px;
|
||||||
|
background: linear-gradient(
|
||||||
|
rgba(78, 166, 255, 0.2) 0%,
|
||||||
|
rgba(78, 166, 255, 0) 100%
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
.del_main {
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding-top: 20px;
|
||||||
|
padding-left: 26px;
|
||||||
|
font-size: 16px;
|
||||||
|
|
||||||
|
.del-icons {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
position: relative;
|
||||||
|
margin-right: 10px;
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
top: 0px;
|
||||||
|
left: 0px;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.close_exit {
|
||||||
|
position: absolute;
|
||||||
|
right: 42px;
|
||||||
|
cursor: pointer;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
background-image: url(@/assets/images/coursewareManage/close.png);
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.body {
|
||||||
|
width: 100%;
|
||||||
|
padding: 0 30px;
|
||||||
|
margin: 34px auto 56px auto;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.del_btnbox {
|
||||||
|
display: flex;
|
||||||
|
margin: 30px auto;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.del_btn {
|
||||||
|
width: 100px;
|
||||||
|
height: 40px;
|
||||||
|
background: rgba(64, 158, 255, 0);
|
||||||
|
border-radius: 8px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-right: 14px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
.btnText {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn1 {
|
||||||
|
border: 1px solid rgba(64, 158, 255, 1);
|
||||||
|
color: #4ea6ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn2 {
|
||||||
|
background-color: #4ea6ff;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style lang="scss">
|
||||||
|
.ant-modal-body {
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
@after-visible-change="afterVisibleChange">
|
@after-visible-change="afterVisibleChange">
|
||||||
<div class="drawerMain">
|
<div class="drawerMain">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="headerTitle">【{{ datasource.type == 6 ? "直播" : "活动" }}】考勤1</div>
|
<div class="headerTitle">【{{ datasource.type == 6 ? "直播" : "活动" }}】考勤</div>
|
||||||
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
|
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
|
||||||
@click="closeDrawer" />
|
@click="closeDrawer" />
|
||||||
</div>
|
</div>
|
||||||
@@ -393,10 +393,11 @@ export default {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getTableData = () => {
|
const getTableData = () => {
|
||||||
|
debugger
|
||||||
// debugger
|
// debugger
|
||||||
console.log('当前是项目还是路径图 1 路径图 2 项目', props)
|
console.log('当前是项目还是路径图 1 项目 2 路径图', props)
|
||||||
console.log('当前是项目还是路径图 1 路径图 2 项目', props.types)
|
console.log('当前是项目还是路径图 1 项目 2 路径图', props.types)
|
||||||
if (props.datasource.type == 6 && props.types == 1 || props.datasource.type == 9 && props.types == 1) {
|
if (props.datasource.type == 6 && props.types == 2 || props.datasource.type == 9 && props.types == 2) {
|
||||||
// 此处为获取评估学员的接口 - 如后续还有用到此接口的公共任务可直接在if里面加||判断即可
|
// 此处为获取评估学员的接口 - 如后续还有用到此接口的公共任务可直接在if里面加||判断即可
|
||||||
console.log("我是传递的查询参数", {
|
console.log("我是传递的查询参数", {
|
||||||
pageNo: state.currentPage,
|
pageNo: state.currentPage,
|
||||||
@@ -441,14 +442,14 @@ export default {
|
|||||||
state.tableDataTotalLoading = false;
|
state.tableDataTotalLoading = false;
|
||||||
state.tableData = [];
|
state.tableData = [];
|
||||||
});
|
});
|
||||||
} else if (props.datasource.type == 6 && props.types == 2 || props.datasource.type == 9 && props.types == 2) {
|
} else if (props.datasource.type == 6 && props.types == 1 || props.datasource.type == 9 && props.types == 1) {
|
||||||
// 此处为获取评估学员的接口 - 如后续还有用到此接口的公共任务可直接在if里面加||判断即可
|
// 此处为获取评估学员的接口 - 如后续还有用到此接口的公共任务可直接在if里面加||判断即可
|
||||||
console.log("我是传递的查询参数", {
|
console.log("我是传递的查询参数", {
|
||||||
pageNo: state.currentPage,
|
pageNo: state.currentPage,
|
||||||
pageSize: state.pageSize,
|
pageSize: state.pageSize,
|
||||||
currentStageId: props.datasource.stageId,
|
currentStageId: props.datasource.stageId,
|
||||||
type: 1,
|
type: 1,
|
||||||
pid: props.datasource.projectId,
|
pid: props.datasource.id,
|
||||||
taskId: props.datasource.id,
|
taskId: props.datasource.id,
|
||||||
taskType: props.datasource.type,
|
taskType: props.datasource.type,
|
||||||
status: state.projectName,
|
status: state.projectName,
|
||||||
@@ -689,15 +690,17 @@ export default {
|
|||||||
<div class="opa" style='display:flex;justify-content:center;align-items:center;'>
|
<div class="opa" style='display:flex;justify-content:center;align-items:center;'>
|
||||||
<div
|
<div
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
debugger
|
||||||
{/* debugger */ }
|
{/* debugger */ }
|
||||||
console.log("点击签到", value);
|
console.log("点击签到", value);
|
||||||
// 获取当前时间
|
// 获取当前时间
|
||||||
{/* showsingleqdModal(); */ }
|
{/* showsingleqdModal(); */ }
|
||||||
{/* AttendanceSign */ }
|
{/* AttendanceSign */ }
|
||||||
|
|
||||||
let obj = {
|
|
||||||
|
let obj1 = {
|
||||||
courseId: Number(props.datasource.courseId),
|
courseId: Number(props.datasource.courseId),
|
||||||
routerId: Number(props.datasource.routerId),
|
routerId: Number(props.datasource.projectId),
|
||||||
ids: [value.record.studentId],
|
ids: [value.record.studentId],
|
||||||
taskId: Number(props.datasource.id),
|
taskId: Number(props.datasource.id),
|
||||||
taskType: Number(props.datasource.type),
|
taskType: Number(props.datasource.type),
|
||||||
@@ -706,15 +709,16 @@ export default {
|
|||||||
|
|
||||||
let obj2 = {
|
let obj2 = {
|
||||||
courseId: Number(props.datasource.courseId),
|
courseId: Number(props.datasource.courseId),
|
||||||
routerId: Number(props.datasource.projectId),
|
routerId: Number(props.datasource.routerId),
|
||||||
ids: [value.record.studentId],
|
ids: [value.record.studentId],
|
||||||
taskId: Number(props.datasource.id),
|
taskId: Number(props.datasource.id),
|
||||||
taskType: Number(props.datasource.type),
|
taskType: Number(props.datasource.type),
|
||||||
type: 2,
|
type: 2,
|
||||||
};
|
};
|
||||||
console.log(obj, obj2)
|
// 1是项目 2路径图 3开课
|
||||||
|
console.log(obj1, obj2)
|
||||||
state.tableDataTotalLoading = true;
|
state.tableDataTotalLoading = true;
|
||||||
api.AttendanceSign(props.types == 1 ? obj : obj2).then(res => {
|
api.AttendanceSign(props.types === '1' ? obj1 : obj2).then(res => {
|
||||||
console.log('res----签到是否成功', res)
|
console.log('res----签到是否成功', res)
|
||||||
message.destroy()
|
message.destroy()
|
||||||
message.info('签到成功')
|
message.info('签到成功')
|
||||||
|
|||||||
@@ -10,13 +10,23 @@
|
|||||||
@click="closeDrawer" />
|
@click="closeDrawer" />
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex; flex-direction: row; padding-top: 0px; margin-top: 20px; margin-left: 32px;">
|
<div style="display: flex; flex-direction: row; padding-top: 0px; margin-top: 20px; margin-left: 32px;">
|
||||||
<div>
|
<div v-if="taskIndex >= 0">
|
||||||
<button style="width: 100px; cursor: pointer;" @click="changeOuter(1)"
|
<button v-show="formData.examType === 1" style="width: 100px; cursor: pointer;"
|
||||||
:class="formData.examType === 1 ? 'outer' : 'notOuter'">
|
:class="formData.examType === 1 ? 'outer' : 'notOuter'">
|
||||||
系统考试
|
系统考试
|
||||||
</button>
|
</button>
|
||||||
<button :disabled="taskIndex >= 0" style="width: 100px; cursor: pointer;" @click="changeOuter(2)"
|
<button v-show="formData.examType === 2" style="width: 100px; cursor: pointer;"
|
||||||
:class="formData.examType === 2 ? 'outer' : 'notOuter'">
|
:class="formData.examType === 2 ? 'outer' : 'notOuter'">
|
||||||
|
外部考试
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<button style="width: 100px; cursor: pointer;" @click="changeOuter(1)"
|
||||||
|
:class="formData.examType === 1 ? 'outer' : 'notOuter'">
|
||||||
|
系统考试
|
||||||
|
</button>
|
||||||
|
<button style="width: 100px; cursor: pointer;" @click="changeOuter(2)"
|
||||||
|
:class="formData.examType === 2 ? 'outer' : 'notOuter'">
|
||||||
外部考试
|
外部考试
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -44,18 +54,18 @@
|
|||||||
</div>
|
</div>
|
||||||
<span style="margin-right: 3px">选择试卷:</span>
|
<span style="margin-right: 3px">选择试卷:</span>
|
||||||
</div>
|
</div>
|
||||||
<s-test v-model:id="formData.examinationPaperId" v-model:name="formData.examinationTestName">
|
|
||||||
<div class="btnbox">
|
|
||||||
<button class="xkbtn" style="margin:0" :disabled="taskIndex >= 0">
|
|
||||||
{{ formData.examinationPaperId ? "重选" : "选择" }}试卷
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</s-test>
|
|
||||||
<div v-if="formData.examinationPaperId">
|
<div v-if="formData.examinationPaperId">
|
||||||
<a-tag closable color="processing" @close="delTag" :closeIcon="true">
|
<a-tag closable color="processing" @close="delTag" :closeIcon="true">
|
||||||
<span style="font-size: 14px; line-height: 33px">{{ formData.examinationTestName }}</span>
|
<span style="font-size: 14px; line-height: 33px">{{ formData.examinationTestName }}</span>
|
||||||
</a-tag>
|
</a-tag>
|
||||||
</div>
|
</div>
|
||||||
|
<s-test v-else v-model:id="formData.examinationPaperId" v-model:name="formData.examinationTestName">
|
||||||
|
<div class="btnbox">
|
||||||
|
<button class="xkbtn" style="margin:0" >
|
||||||
|
{{ formData.examinationPaperId ? "重选" : "选择" }}试卷
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</s-test>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="main_item">
|
<div class="main_item">
|
||||||
@@ -189,7 +199,7 @@
|
|||||||
<span style="margin-right: 3px">考试名称:</span>
|
<span style="margin-right: 3px">考试名称:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-input v-model:value="formData.examinationName" style="width: 400px; height: 40px; border-radius: 8px"
|
<a-input v-model:value="formData.examinationName" style="width: 400px; height: 40px; border-radius: 8px" :disabled="taskIndex >= 0"
|
||||||
placeholder="请输入考试名称" :maxlength="20" />
|
placeholder="请输入考试名称" :maxlength="20" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -201,7 +211,7 @@
|
|||||||
<span style="margin-right: 3px">数据来源:</span>
|
<span style="margin-right: 3px">数据来源:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-input v-model:value="formData.source" style="width: 400px; height: 40px; border-radius: 8px"
|
<a-input v-model:value="formData.source" style="width: 400px; height: 40px; border-radius: 8px" :disabled="taskIndex >= 0"
|
||||||
placeholder="请输入数据来源" :maxlength="20" />
|
placeholder="请输入数据来源" :maxlength="20" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -210,7 +220,7 @@
|
|||||||
<span style="margin-right: 3px">考试说明:</span>
|
<span style="margin-right: 3px">考试说明:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="textarea">
|
<div class="textarea">
|
||||||
<a-textarea v-model:value="formData.externalExplain" placeholder="请输入考试说明" allow-clear show-count
|
<a-textarea v-model:value="formData.externalExplain" placeholder="请输入考试说明" allow-clear show-count :disabled="taskIndex >= 0"
|
||||||
:maxlength="200" :rows="6" />
|
:maxlength="200" :rows="6" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -355,7 +365,7 @@ async function confirm() {
|
|||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
})
|
})
|
||||||
|
|
||||||
emit('update:taskList', [...props.taskList])
|
emit('update:taskList', [...props.taskList])
|
||||||
closeDrawer()
|
closeDrawer()
|
||||||
}
|
}
|
||||||
@@ -374,9 +384,6 @@ const delTag = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function changeOuter(v) {
|
function changeOuter(v) {
|
||||||
if (taskIndex.value >= 0) {
|
|
||||||
return message.warn("编辑状态不允许切换。")
|
|
||||||
}
|
|
||||||
formData.value.examType = v;
|
formData.value.examType = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -282,7 +282,7 @@ export default {
|
|||||||
template: process.env.VUE_APP_UP_LOAD_STUDENT_SCORE_TEMPLATE,
|
template: process.env.VUE_APP_UP_LOAD_STUDENT_SCORE_TEMPLATE,
|
||||||
});
|
});
|
||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
|
|
||||||
ctx.emit("closeDraw", true);
|
ctx.emit("closeDraw", true);
|
||||||
ctx.emit("update:TaskFaceImpStuvisible", false);
|
ctx.emit("update:TaskFaceImpStuvisible", false);
|
||||||
state.fileList = [];
|
state.fileList = [];
|
||||||
@@ -719,4 +719,4 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -72,10 +72,10 @@
|
|||||||
<div class="wz">批量删除</div>
|
<div class="wz">批量删除</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 2022-11-30注释 后面放开 -->
|
<!-- 2022-11-30注释 后面放开 -->
|
||||||
<!-- <div class="btn btn2">
|
<div class="btn btn2" @click="exportGroupMember">
|
||||||
<div class="img2"></div>
|
<div class="img2"></div>
|
||||||
<div class="wz">导出信息</div>
|
<div class="wz">导出组员</div>
|
||||||
</div> -->
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="line">
|
<div class="line">
|
||||||
<div class="inline">
|
<div class="inline">
|
||||||
@@ -541,6 +541,15 @@ export default {
|
|||||||
// });
|
// });
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// 导出数据
|
||||||
|
function exportGroupMember() {
|
||||||
|
console.log("props.datasource", props);
|
||||||
|
window.open(
|
||||||
|
`${process.env.VUE_APP_BASE_API}/admin/studentGroup/exportGroupMember/${props.projectId}/${props.chooseGroupId}`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
function submitCall(flag) {
|
function submitCall(flag) {
|
||||||
flag && getStu();
|
flag && getStu();
|
||||||
}
|
}
|
||||||
@@ -563,6 +572,7 @@ export default {
|
|||||||
closedeleone,
|
closedeleone,
|
||||||
yesdele,
|
yesdele,
|
||||||
submitCall,
|
submitCall,
|
||||||
|
exportGroupMember
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -417,7 +417,7 @@ export default {
|
|||||||
message.error(`请输入审核意见!`);
|
message.error(`请输入审核意见!`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
ctx.emit("update:ProjAuditvisible", false);
|
||||||
auditView({
|
auditView({
|
||||||
createId: props.chooseCreateId,
|
createId: props.chooseCreateId,
|
||||||
createName: props.chooseCreater,
|
createName: props.chooseCreater,
|
||||||
@@ -437,7 +437,8 @@ export default {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
const getDictList = async (param) =>
|
const getDictList = async (param) =>
|
||||||
api1.getDict({
|
api1
|
||||||
|
.getDict({
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
setCode: param,
|
setCode: param,
|
||||||
@@ -648,7 +649,6 @@ export default {
|
|||||||
background-color: #fafafa;
|
background-color: #fafafa;
|
||||||
}
|
}
|
||||||
.reworkCon {
|
.reworkCon {
|
||||||
height: 56px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-bottom: 1px solid #f0f6fc;
|
border-bottom: 1px solid #f0f6fc;
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ export default {
|
|||||||
template: process.env.VUE_APP_UP_LOAD_STUDENT_SCORE_TEMPLATE,
|
template: process.env.VUE_APP_UP_LOAD_STUDENT_SCORE_TEMPLATE,
|
||||||
});
|
});
|
||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
|
|
||||||
ctx.emit("closeDraw", true);
|
ctx.emit("closeDraw", true);
|
||||||
ctx.emit("update:TaskFaceImpStuvisible", false);
|
ctx.emit("update:TaskFaceImpStuvisible", false);
|
||||||
state.fileList = [];
|
state.fileList = [];
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ export default {
|
|||||||
console.log('我是传递过来的参数', props.datasource)
|
console.log('我是传递过来的参数', props.datasource)
|
||||||
console.log('我是传递过来的参数2', props.basicdata)
|
console.log('我是传递过来的参数2', props.basicdata)
|
||||||
api.QueryAssessmentDetail({
|
api.QueryAssessmentDetail({
|
||||||
"assessmentSubmitId": props.datasource.assessmentSubmitId,
|
"assessmentSubmitId": props.datasource.assessmentSubmitId?props.datasource.assessmentSubmitId:props.datasource.assessmentResultIds,
|
||||||
"courseId": props.basicdata.id,
|
"courseId": props.basicdata.id,
|
||||||
"studentId": props.datasource.studentId
|
"studentId": props.datasource.studentId
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
|
|||||||
@@ -462,20 +462,6 @@ export default {
|
|||||||
function CreateCertificate() {
|
function CreateCertificate() {
|
||||||
state.CCertificate = true;
|
state.CCertificate = true;
|
||||||
}
|
}
|
||||||
//上传封面
|
|
||||||
const handleChange = (info) => {
|
|
||||||
if (info.file.status === "uploading") {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (info.file.status === "done") {
|
|
||||||
console.log("上传图片返回的信息 %o", info.file.name);
|
|
||||||
state.imageUrl = process.env.VUE_APP_FILE_PATH + info.file.name;
|
|
||||||
state.imageName = process.env.VUE_APP_FILE_PATH + info.file.name;
|
|
||||||
}
|
|
||||||
if (info.file.status === "error") {
|
|
||||||
message.error("upload error");
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const beforeUpload = (file) => {
|
const beforeUpload = (file) => {
|
||||||
const isJpgOrPng =
|
const isJpgOrPng =
|
||||||
@@ -501,19 +487,14 @@ export default {
|
|||||||
fileUp(formDatas).then((res) => {
|
fileUp(formDatas).then((res) => {
|
||||||
if (res.data.code === 200) {
|
if (res.data.code === 200) {
|
||||||
console.log(file)
|
console.log(file)
|
||||||
state.imageUrl = res.data.data;
|
state.imageUrl = process.env.VUE_APP_FILE_PATH + res.data.data;
|
||||||
state.imageName = file.name;
|
state.imageName = process.env.VUE_APP_FILE_PATH + res.data.data;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
// function beforeUpload(file) {
|
|
||||||
// if (!state.fileType.includes(file.name.split(".").slice(-1).join(""))) {
|
|
||||||
// message.error("不支持该格式");
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
//查看证书
|
//查看证书
|
||||||
const getcertificate = () => {
|
const getcertificate = () => {
|
||||||
@@ -528,7 +509,7 @@ export default {
|
|||||||
if (res.data.code === 200) {
|
if (res.data.code === 200) {
|
||||||
let info = res.data.data;
|
let info = res.data.data;
|
||||||
state.certificateName = info.name; //证书名称
|
state.certificateName = info.name; //证书名称
|
||||||
state.imageUrl = process.env.VUE_APP_FILE_PATH + info.url; //证书封面
|
state.imageUrl = info.url; //证书封面
|
||||||
state.certificateRemark = info.remark; //证书说明
|
state.certificateRemark = info.remark; //证书说明
|
||||||
state.condition = info.finishType; //选择条件
|
state.condition = info.finishType; //选择条件
|
||||||
state.large = info.finishType == 1 ? info.finishValue : null; //选择项目里的全部任务或必修任务
|
state.large = info.finishType == 1 ? info.finishValue : null; //选择项目里的全部任务或必修任务
|
||||||
@@ -634,7 +615,6 @@ export default {
|
|||||||
closeDrawer,
|
closeDrawer,
|
||||||
selectCondition,
|
selectCondition,
|
||||||
selectlarge,
|
selectlarge,
|
||||||
handleChange,
|
|
||||||
beforeUpload,
|
beforeUpload,
|
||||||
CreateCertificate,
|
CreateCertificate,
|
||||||
saveupdatecertificate,
|
saveupdatecertificate,
|
||||||
|
|||||||
@@ -19,12 +19,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<div class="minatitl">
|
<div class="minatitl">
|
||||||
<div class="up1">请下载</div>
|
<div class="up1" style="font-weight: bolder">导入小组长</div>
|
||||||
<div class="up2" @click="downTemplate" style="cursor: pointer">
|
<!--<div class="up2" @click="downTemplate" style="cursor: pointer">-->
|
||||||
模板
|
<!--模板-->
|
||||||
</div>
|
<!--</div>-->
|
||||||
<div class="up1">,按要求填写数据并导入</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="up1">请先导出小组填写小组长,按要求填写数据并导入</div>
|
||||||
<div class="upload">
|
<div class="upload">
|
||||||
<div class="text">上传:</div>
|
<div class="text">上传:</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
<div class="curloading">
|
<div class="curloading">
|
||||||
<div style="color: #387df7; margin-left: 20px; cursor: pointer"
|
<div style="color: #387df7; margin-left: 20px; cursor: pointer"
|
||||||
v-if="file.uploadState?.status === 'FAILED'" @click="downloadErrorData(file.uploadState?.url)">
|
v-if="file.uploadState?.status === 'FAILED'" @click="downloadErrorData(file.uploadState?.url)">
|
||||||
下载失败数据
|
下载失败数据1
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -130,13 +130,13 @@ const closeDrawer = () => {
|
|||||||
function openDrawer() {
|
function openDrawer() {
|
||||||
visible.value = true
|
visible.value = true
|
||||||
}
|
}
|
||||||
|
//
|
||||||
function downTemplate() {
|
// function downTemplate() {
|
||||||
window.open(process.env.VUE_APP_BASE_API + props.templateUrl);
|
// window.open(process.env.VUE_APP_BASE_API + props.templateUrl);
|
||||||
}
|
// }
|
||||||
|
|
||||||
function downloadErrorData(url) {
|
function downloadErrorData(url) {
|
||||||
window.open(process.env.VUE_APP_BASE_API + url)
|
window.open(process.env.VUE_APP_FILE_PATH + url)
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleChange({file}) {
|
function handleChange({file}) {
|
||||||
@@ -481,4 +481,4 @@ function handleChange({file}) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: lixg lixg@dongwu-inc.com
|
* @Author: lixg lixg@dongwu-inc.com
|
||||||
* @Date: 2023-02-23 14:57:21
|
* @Date: 2023-02-23 14:57:21
|
||||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||||
* @LastEditTime: 2023-02-24 09:58:42
|
* @LastEditTime: 2023-02-24 22:54:03
|
||||||
* @FilePath: /fe-manage/src/components/project/OrgClassCheck.vue
|
* @FilePath: /fe-manage/src/components/project/OrgClassCheck.vue
|
||||||
* @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
|
||||||
-->
|
-->
|
||||||
|
|||||||
@@ -48,6 +48,10 @@ const props = defineProps({
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
checkBatch: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
groupList: {
|
groupList: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => [],
|
default: () => [],
|
||||||
@@ -56,10 +60,10 @@ const props = defineProps({
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const option = computed(() => {
|
const option = computed(() => {
|
||||||
debugger
|
|
||||||
console.log("props.groupList", props.groupList);
|
console.log("props.groupList", props.groupList);
|
||||||
return props.groupList.map((e) => ({
|
return props.groupList.map((e) => ({
|
||||||
label: e.groupName,
|
label: e.groupName,
|
||||||
@@ -81,13 +85,13 @@ const selectGroup = (e, v) => {
|
|||||||
};
|
};
|
||||||
//确认换组
|
//确认换组
|
||||||
const changeGroup = (item) => {
|
const changeGroup = (item) => {
|
||||||
// debugger
|
debugger
|
||||||
console.log("换组", selectGroupId.value, item);
|
console.log("换组", selectGroupId.value, item);
|
||||||
props.checkgroupStuId.forEach(stu => {
|
props.checkgroupStuId.forEach(stu => {
|
||||||
let obj = {
|
let obj = {
|
||||||
groupId: selectGroupId.value,
|
groupId: selectGroupId.value,
|
||||||
groupName: selectGroupName.value,
|
groupName: selectGroupName.value,
|
||||||
studentId: stu,
|
id: stu,
|
||||||
};
|
};
|
||||||
console.log("换组obj", obj);
|
console.log("换组obj", obj);
|
||||||
api
|
api
|
||||||
|
|||||||
@@ -85,7 +85,7 @@
|
|||||||
<div class="tab2">
|
<div class="tab2">
|
||||||
<a-form-item label="组织:">
|
<a-form-item label="组织:">
|
||||||
<a-input v-model:value="searchOrgName.keyword"
|
<a-input v-model:value="searchOrgName.keyword"
|
||||||
style="width: 230px; height: 40px; border-radius: 8px" placeholder="请输入组织" />
|
style="width: 230px; height: 40px; border-radius: 8px" placeholder="请输入组织" @click="orgValue"/>
|
||||||
<a-button type="primary" @click="searchOrg" style="margin-left: 20px; border-radius: 4px">
|
<a-button type="primary" @click="searchOrg" style="margin-left: 20px; border-radius: 4px">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<SearchOutlined />
|
<SearchOutlined />
|
||||||
@@ -97,13 +97,13 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div class="boeTree">
|
<div class="boeTree">
|
||||||
<a-tree :tree-data="searchOrgName.keyword ? orgData : treeOrgData" @select="onOrgSelectChange"
|
<a-tree v-model:selectedKeys="selectedOrgKeys" :tree-data="searchOrgName.keyword ? orgData : treeOrgData" @select="onOrgSelectChange"
|
||||||
:loading="orgOrgLoading" :load-data="onLoadOrgData" :fieldNames="{
|
:loading="orgOrgLoading" :load-data="onLoadOrgData" :fieldNames="{
|
||||||
children: 'treeChildList',
|
children: 'treeChildList',
|
||||||
key: 'id',
|
key: 'id',
|
||||||
title: 'name',
|
title: 'name',
|
||||||
value: 'name',
|
value: 'name',
|
||||||
}" row-key="id" :row-selection="orgRowSelection" multiple>
|
}" row-key="id" :row-selection="orgRowSelection" multiple>
|
||||||
</a-tree>
|
</a-tree>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -196,7 +196,7 @@
|
|||||||
<div v-if="i < 11">
|
<div v-if="i < 11">
|
||||||
<div class="chose1">
|
<div class="chose1">
|
||||||
<div class="span">{{ item.name }}</div>
|
<div class="span">{{ item.name }}</div>
|
||||||
<div class="ch1" @click="orgDel(i)"></div>
|
<div class="ch1" @click="orgDel(i)" style="cursor: pointer;"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
@@ -295,7 +295,8 @@ import {
|
|||||||
AUDIENCE_LIST,
|
AUDIENCE_LIST,
|
||||||
ORG_CHILD_LIST,
|
ORG_CHILD_LIST,
|
||||||
ORG_LIST,
|
ORG_LIST,
|
||||||
USER_LIST,
|
// USER_LIST,
|
||||||
|
USER_LIST_PAGE,
|
||||||
} from "@/api/ThirdApi";
|
} from "@/api/ThirdApi";
|
||||||
import {
|
import {
|
||||||
saveStu,
|
saveStu,
|
||||||
@@ -463,7 +464,7 @@ const {
|
|||||||
loading: stuLoading,
|
loading: stuLoading,
|
||||||
total: stuTotal,
|
total: stuTotal,
|
||||||
reset: stuReset,
|
reset: stuReset,
|
||||||
} = useBoeApiPage(USER_LIST, nameSearch.value, {
|
} = useBoeApiPage(USER_LIST_PAGE, nameSearch.value, {
|
||||||
init: false,
|
init: false,
|
||||||
result: (res) => res.result.userInfoList,
|
result: (res) => res.result.userInfoList,
|
||||||
totalPage: (res) => res.result.totalPage,
|
totalPage: (res) => res.result.totalPage,
|
||||||
@@ -613,6 +614,7 @@ const closeDrawer = () => {
|
|||||||
visiable.value = false;
|
visiable.value = false;
|
||||||
stuData.value = [];
|
stuData.value = [];
|
||||||
nameSearch.value.keyword = "";
|
nameSearch.value.keyword = "";
|
||||||
|
selectedOrgKeys.value = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
function onLoadData(treeNode) {
|
function onLoadData(treeNode) {
|
||||||
@@ -661,8 +663,16 @@ function stuDel(i) {
|
|||||||
selectsData.value.studentList.splice(i, 1);
|
selectsData.value.studentList.splice(i, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const selectedOrgKeys = ref([]);
|
||||||
|
|
||||||
|
watch(selectedOrgKeys, () => {
|
||||||
|
console.log('selectedKeys', selectedOrgKeys);
|
||||||
|
});
|
||||||
|
|
||||||
function orgDel(i) {
|
function orgDel(i) {
|
||||||
|
console.log(selectedOrgKeys.value)
|
||||||
orgSelectKeys.value = orgSelectKeys.value.filter(e => e !== selectsData.value.deptList[i].id)
|
orgSelectKeys.value = orgSelectKeys.value.filter(e => e !== selectsData.value.deptList[i].id)
|
||||||
|
selectedOrgKeys.value.splice(i, 1)
|
||||||
selectsData.value.deptList.splice(i, 1)
|
selectsData.value.deptList.splice(i, 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -685,8 +695,12 @@ function onStuSelectChange(e, l) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onOrgSelectChange(e, l) {
|
function onOrgSelectChange(e, l) {
|
||||||
|
|
||||||
orgRowSelection.value = e;
|
orgRowSelection.value = e;
|
||||||
selectsData.value.deptList = l.selectedNodes;
|
selectsData.value.deptList = l.selectedNodes;
|
||||||
|
|
||||||
|
// 获取被点击的树节点
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onAuditSelectChange(e, l) {
|
function onAuditSelectChange(e, l) {
|
||||||
@@ -727,6 +741,7 @@ const resetStu = () => {
|
|||||||
//清空选择部门信息
|
//清空选择部门信息
|
||||||
const deleteDepSelect = () => {
|
const deleteDepSelect = () => {
|
||||||
stuSelectKeys.value = [];
|
stuSelectKeys.value = [];
|
||||||
|
selectedOrgKeys.value = [];
|
||||||
};
|
};
|
||||||
//重置组织
|
//重置组织
|
||||||
const resetOrg = () => {
|
const resetOrg = () => {
|
||||||
@@ -821,6 +836,12 @@ function handleStageOk() {
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 搜索受众值发生变化
|
||||||
|
function orgValue(value) {
|
||||||
|
console.log("", value.target.value);
|
||||||
|
searchOrgName.value.keyword = value.target.value;
|
||||||
|
}
|
||||||
|
|
||||||
watch(visiable, () => {
|
watch(visiable, () => {
|
||||||
stuSelectKeys.value = [];
|
stuSelectKeys.value = [];
|
||||||
orgSelectKeys.value = [];
|
orgSelectKeys.value = [];
|
||||||
|
|||||||
@@ -164,7 +164,7 @@
|
|||||||
<ChangeLevelModal v-model:visiblene="visiblene" :stage="stage" :ids="stuSelectKeys" @finash="submitCall" />
|
<ChangeLevelModal v-model:visiblene="visiblene" :stage="stage" :ids="stuSelectKeys" @finash="submitCall" />
|
||||||
|
|
||||||
<!-- 换组弹窗 -->
|
<!-- 换组弹窗 -->
|
||||||
<ChangeGroupModal v-model:changegroupV="checkgroupParam.changegroupV" :groupList="groupList"
|
<ChangeGroupModal v-model:changegroupV="checkgroupParam.changegroupV" :groupList="groupList" :checkBatch="checkgroupParam.checkBatch"
|
||||||
:checkgroupStuId="stuSelectKeys" />
|
:checkgroupStuId="stuSelectKeys" />
|
||||||
<!-- 批量调整关卡弹窗 -->
|
<!-- 批量调整关卡弹窗 -->
|
||||||
<!-- 取消学员弹窗 -->
|
<!-- 取消学员弹窗 -->
|
||||||
@@ -407,6 +407,7 @@ const checkgroupParam = ref({
|
|||||||
changegroupV: false, //学员名称
|
changegroupV: false, //学员名称
|
||||||
checkgroupList: "", //学员小组
|
checkgroupList: "", //学员小组
|
||||||
checkgroupStuId: null,
|
checkgroupStuId: null,
|
||||||
|
checkBatch: true
|
||||||
});
|
});
|
||||||
|
|
||||||
const stuSelectKeys = ref([]);
|
const stuSelectKeys = ref([]);
|
||||||
@@ -426,10 +427,13 @@ const stuRowSelection = computed(() => ({
|
|||||||
|
|
||||||
//显示学员换组弹窗
|
//显示学员换组弹窗
|
||||||
function showChangeGroupModal() {
|
function showChangeGroupModal() {
|
||||||
|
debugger
|
||||||
|
console.log("批量")
|
||||||
const d = props.groupList
|
const d = props.groupList
|
||||||
console.log("d" + d)
|
console.log("d" + d)
|
||||||
// debugger
|
// debugger
|
||||||
checkgroupParam.value.changegroupV = true;
|
checkgroupParam.value.changegroupV = true;
|
||||||
|
checkgroupParam.value.checkBatch = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出数据
|
// 导出数据
|
||||||
|
|||||||
14
src/utils/dialog.js
Normal file
14
src/utils/dialog.js
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import { createApp } from 'vue'
|
||||||
|
import CommonAlert from "@/components/common/CommonAlert";
|
||||||
|
import Antd from "ant-design-vue";
|
||||||
|
|
||||||
|
function mountContent (option = {}) {
|
||||||
|
const dom = document.createElement('div')
|
||||||
|
document.body.appendChild(dom)
|
||||||
|
const app = createApp(CommonAlert, {
|
||||||
|
close: () => { app.unmount(dom); document.body.removeChild(dom) },
|
||||||
|
...option
|
||||||
|
})
|
||||||
|
app.use(Antd).mount(dom)
|
||||||
|
}
|
||||||
|
export default mountContent
|
||||||
@@ -149,7 +149,7 @@ export default {
|
|||||||
api.DownLoadTotalSize().then(res=>{
|
api.DownLoadTotalSize().then(res=>{
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if(res.data.code==200){
|
if(res.data.code==200){
|
||||||
state.capacity = res.data.data;
|
state.capacity = res.data.data && res.data.data !== {} ? res.data.data : 0;
|
||||||
}else{
|
}else{
|
||||||
state.capacity = 0;
|
state.capacity = 0;
|
||||||
}
|
}
|
||||||
@@ -165,7 +165,8 @@ export default {
|
|||||||
function formatCapacity(data) {
|
function formatCapacity(data) {
|
||||||
let num = Number(data);
|
let num = Number(data);
|
||||||
let CMB = (num / 1048576).toFixed(2);
|
let CMB = (num / 1048576).toFixed(2);
|
||||||
let countCMB = (num / 1048576*1024).toFixed(2);
|
let total = Number(1048576*1024);
|
||||||
|
let countCMB = (num / total).toFixed(2);
|
||||||
state.countCMB = countCMB;
|
state.countCMB = countCMB;
|
||||||
if(CMB%1024>1){
|
if(CMB%1024>1){
|
||||||
CMB = (CMB/1024).toFixed(2) + 'GB';
|
CMB = (CMB/1024).toFixed(2) + 'GB';
|
||||||
@@ -178,7 +179,8 @@ export default {
|
|||||||
|
|
||||||
function formatCapacityGB(data) {
|
function formatCapacityGB(data) {
|
||||||
let num = Number(data);
|
let num = Number(data);
|
||||||
let CMB = (num / (1048576*1024)).toFixed(2);
|
let total = Number(1048576*1024);
|
||||||
|
let CMB = (num / total).toFixed(2);
|
||||||
return CMB
|
return CMB
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -65,19 +65,84 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="mbl_items">
|
<div class="mbl_items">
|
||||||
<div class="item_nam">
|
<div class="item_nam" style="margin-bottom: 102px">
|
||||||
<div class="asterisk_icon">
|
<div class="asterisk_icon">
|
||||||
<img
|
<img
|
||||||
style="width: 10px; height: 10px"
|
style="width: 10px; height: 10px"
|
||||||
src="@/assets/images/coursewareManage/asterisk.png"
|
src="@/assets/images/coursewareManage/asterisk.png"
|
||||||
alt="img"
|
alt=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span style="margin-right: 14px">目标人群:</span>
|
<span style="margin-right: 14px">目标人群</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="item_inp">
|
<div class="item_inp">
|
||||||
<div class="i1_input">
|
<div class="i1_input">
|
||||||
{{ filterTxt(detail.targetUser) }}
|
<!-- <a-input v-model:value="qdms_inputV2" maxlength="50"
|
||||||
|
style="width: 440px; height: 40px; border-radius: 8px" placeholder="请输入目标人群" />
|
||||||
|
<div class="inp_num">
|
||||||
|
<span style="color: #c7cbd2">
|
||||||
|
{{ qdms_inputV2.length }}/50
|
||||||
|
</span>
|
||||||
|
</div> -->
|
||||||
|
<div>
|
||||||
|
<OrgClassCheck
|
||||||
|
v-model:value="orgSelect"
|
||||||
|
v-model:name="orgSelectName"
|
||||||
|
:disabled="true"
|
||||||
|
></OrgClassCheck>
|
||||||
|
</div>
|
||||||
|
<div style="margin-top: 10px">
|
||||||
|
<a-select
|
||||||
|
v-model:value="selectJobId"
|
||||||
|
mode="multiple"
|
||||||
|
style="width: 440px; min-height: 40px"
|
||||||
|
placeholder="请选择岗位"
|
||||||
|
:options="jobType"
|
||||||
|
@change="handleChangeJob"
|
||||||
|
:fieldNames="{
|
||||||
|
key: 'id',
|
||||||
|
label: 'name',
|
||||||
|
value: 'id',
|
||||||
|
}"
|
||||||
|
disabled
|
||||||
|
></a-select>
|
||||||
|
</div>
|
||||||
|
<div style="margin-top: 10px">
|
||||||
|
<a-select
|
||||||
|
v-model:value="selectBandId"
|
||||||
|
mode="multiple"
|
||||||
|
style="width: 440px; min-height: 40px"
|
||||||
|
placeholder="请选择Band"
|
||||||
|
:options="bandList"
|
||||||
|
@change="handleChangeBand"
|
||||||
|
:fieldNames="{
|
||||||
|
key: 'id',
|
||||||
|
label: 'name',
|
||||||
|
value: 'id',
|
||||||
|
}"
|
||||||
|
disabled
|
||||||
|
></a-select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mbl_items">
|
||||||
|
<div class="item_nam">
|
||||||
|
<div class="asterisk_icon">
|
||||||
|
<img
|
||||||
|
src="@/assets/images/coursewareManage/asterisk.png"
|
||||||
|
alt="asterisk"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<span style="margin-right: 14px">资源归属</span>
|
||||||
|
</div>
|
||||||
|
<div class="item_inp">
|
||||||
|
<div class="select i6_input" style="width: 440px">
|
||||||
|
<OrgClass
|
||||||
|
v-model:value="sourceBelongId"
|
||||||
|
v-model:name="sourceBelongName"
|
||||||
|
:disabled="true"
|
||||||
|
></OrgClass>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -249,11 +314,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a
|
<a @click="openDown(item)" style="margin-left: 5px">下载</a>
|
||||||
@click="openDown(item)"
|
|
||||||
style="margin-left: 5px"
|
|
||||||
>下载</a
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -281,7 +342,9 @@
|
|||||||
<script>
|
<script>
|
||||||
import { reactive, toRefs, defineComponent, watch, computed } from "vue";
|
import { reactive, toRefs, defineComponent, watch, computed } from "vue";
|
||||||
import { useStore } from "vuex";
|
import { useStore } from "vuex";
|
||||||
|
import OrgClassCheck from "@/components/project/OrgClassCheck";
|
||||||
|
import OrgClass from "@/components/project/OrgClass";
|
||||||
|
import { detail } from "@/api/indexCourse";
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
props: {
|
props: {
|
||||||
visible: {
|
visible: {
|
||||||
@@ -293,6 +356,10 @@ export default defineComponent({
|
|||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
components: {
|
||||||
|
OrgClassCheck,
|
||||||
|
OrgClass,
|
||||||
|
},
|
||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
console.log("props", props);
|
console.log("props", props);
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
@@ -304,20 +371,89 @@ export default defineComponent({
|
|||||||
location.href.indexOf("http://") !== -1
|
location.href.indexOf("http://") !== -1
|
||||||
? "http://43.143.139.204:12016/"
|
? "http://43.143.139.204:12016/"
|
||||||
: location.href.slice(0, location.href.indexOf("/m")) + "/upload/",
|
: location.href.slice(0, location.href.indexOf("/m")) + "/upload/",
|
||||||
|
|
||||||
|
//目标任务
|
||||||
|
orgSelect: [],
|
||||||
|
orgSelectName: [],
|
||||||
|
orgSelectFullName: [],
|
||||||
|
selectJobName: [],
|
||||||
|
selectJobId: [],
|
||||||
|
selectBandName: [],
|
||||||
|
selectBandId: [],
|
||||||
|
//资源归属
|
||||||
|
sourceBelongId: [],
|
||||||
|
sourceBelongName: [],
|
||||||
|
sourceBelongFullName: [],
|
||||||
});
|
});
|
||||||
|
|
||||||
const sysTypeOptions = computed(() => store.state.content_type);
|
const sysTypeOptions = computed(() => store.state.content_type);
|
||||||
|
//获取岗位
|
||||||
|
const jobType = computed(() => store.state.job_type);
|
||||||
|
//获取band
|
||||||
|
const bandList = computed(() => store.state.band);
|
||||||
watch(
|
watch(
|
||||||
() => props.detail.sysTypeId,
|
() => props.detail.sysTypeId,
|
||||||
() => {
|
() => {
|
||||||
state.categoryName = findClassFullName(sysTypeOptions.value);
|
state.categoryName = findClassFullName(sysTypeOptions.value);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
watch(
|
||||||
|
() => props.detail.id,
|
||||||
|
() => {
|
||||||
|
detail({
|
||||||
|
offcourseId: Number(props.detail.id),
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.data.code === 200) {
|
||||||
|
let item = res.data.data;
|
||||||
|
if (item.jobTypeIds) {
|
||||||
|
state.selectJobId = item.jobTypeIds.split(",");
|
||||||
|
}
|
||||||
|
if (item.bandIds) {
|
||||||
|
state.selectBandId = item.bandIds.split(",");
|
||||||
|
}
|
||||||
|
console.log("state.selectBandId", state.selectBandId);
|
||||||
|
state.sourceBelongId = item.sourceBelongId;
|
||||||
|
state.sourceBelongName = item.sourceBelongFullName;
|
||||||
|
if (item.organizationIds && item.organizationNames) {
|
||||||
|
let orgSelectIds = item.organizationIds;
|
||||||
|
let orgSelectNames = item.organizationNames;
|
||||||
|
orgSelectIds = orgSelectIds.split(",");
|
||||||
|
orgSelectNames = orgSelectNames.split(",");
|
||||||
|
console.log(
|
||||||
|
"orgSelectIds&orgSelectNames",
|
||||||
|
orgSelectIds,
|
||||||
|
orgSelectNames
|
||||||
|
);
|
||||||
|
let arrObj = [];
|
||||||
|
arrObj = orgSelectIds.map((item, index) => {
|
||||||
|
return { value: item, lebel: orgSelectNames[index] };
|
||||||
|
});
|
||||||
|
console.log("arrObj-------------", arrObj);
|
||||||
|
state.orgSelect = arrObj;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
function findClassFullName(list, name = "") {
|
function findClassFullName(list, name = "") {
|
||||||
return (
|
return (
|
||||||
(list && list.length && list.map((e) => props.detail.sysTypeId == e.code ? name ? name + "-" + e.name : e.name : findClassFullName(e.children, name ? name + "-" + e.name : e.name)).filter((name) => name).join("")) || ""
|
(list &&
|
||||||
|
list.length &&
|
||||||
|
list
|
||||||
|
.map((e) =>
|
||||||
|
props.detail.sysTypeId == e.code
|
||||||
|
? name
|
||||||
|
? name + "-" + e.name
|
||||||
|
: e.name
|
||||||
|
: findClassFullName(
|
||||||
|
e.children,
|
||||||
|
name ? name + "-" + e.name : e.name
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.filter((name) => name)
|
||||||
|
.join("")) ||
|
||||||
|
""
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -329,12 +465,13 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
const handleCancel = () => {
|
const handleCancel = () => {
|
||||||
|
console.log("关闭");
|
||||||
emit("cancel");
|
emit("cancel");
|
||||||
};
|
};
|
||||||
|
|
||||||
function openDown(link){
|
function openDown(link) {
|
||||||
window.open(process.env.VUE_APP_FILE_PATH + link)
|
window.open(process.env.VUE_APP_FILE_PATH + link);
|
||||||
//:href="item.indexOf('http') !== -1 ? item : locationHref + item"
|
//:href="item.indexOf('http') !== -1 ? item : locationHref + item"
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -342,6 +479,8 @@ export default defineComponent({
|
|||||||
filterTxt,
|
filterTxt,
|
||||||
openDown,
|
openDown,
|
||||||
handleCancel,
|
handleCancel,
|
||||||
|
jobType,
|
||||||
|
bandList,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -214,7 +214,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 10px">
|
<div style="margin-top: 10px">
|
||||||
<a-select
|
<a-select
|
||||||
v-model:value="selectBandName"
|
v-model:value="selectBandId"
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
style="width: 440px; min-height: 40px"
|
style="width: 440px; min-height: 40px"
|
||||||
placeholder="请选择Band"
|
placeholder="请选择Band"
|
||||||
@@ -824,15 +824,19 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
files = files.slice(0, files.length - 1);
|
files = files.slice(0, files.length - 1);
|
||||||
|
|
||||||
let orgSelect = [];
|
let orgSelectIds = [];
|
||||||
|
let orgSelectNames = [];
|
||||||
if (state.orgSelect && state.orgSelect.length) {
|
if (state.orgSelect && state.orgSelect.length) {
|
||||||
state.orgSelect.forEach((item) => {
|
state.orgSelect.forEach((item) => {
|
||||||
orgSelect.push({
|
orgSelectIds += item.value + ",";
|
||||||
label: item.label,
|
});
|
||||||
value: item.value,
|
state.orgSelect.forEach((item) => {
|
||||||
});
|
orgSelectNames += item.label + ",";
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
orgSelectIds = orgSelectIds.slice(0, orgSelectIds.length - 1);
|
||||||
|
orgSelectNames = orgSelectNames.slice(0, orgSelectNames.length - 1);
|
||||||
|
console.log("orgSelectIds&orgSelectNames2", orgSelectIds, orgSelectNames);
|
||||||
|
|
||||||
let selectJobId = "";
|
let selectJobId = "";
|
||||||
if (state.selectJobId.length) {
|
if (state.selectJobId.length) {
|
||||||
@@ -880,10 +884,12 @@ export default defineComponent({
|
|||||||
attach: state.attach,
|
attach: state.attach,
|
||||||
outline: valueHtml.value,
|
outline: valueHtml.value,
|
||||||
// organizationIds: orgSelect, //todo 传的不对
|
// organizationIds: orgSelect, //todo 传的不对
|
||||||
|
organizationIds: orgSelectIds,
|
||||||
|
organizationNames: orgSelectNames,
|
||||||
jobTypeIds: selectJobId,
|
jobTypeIds: selectJobId,
|
||||||
bandIds: selectBandId,
|
bandIds: selectBandId,
|
||||||
sourceBelongId: state.sourceBelongId,
|
sourceBelongId: state.sourceBelongId,
|
||||||
sourceBelongFullName: state.sourceBelongName
|
sourceBelongFullName: state.sourceBelongName,
|
||||||
};
|
};
|
||||||
console.log("postData", postData);
|
console.log("postData", postData);
|
||||||
const checkList = [
|
const checkList = [
|
||||||
@@ -991,6 +997,40 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
console.log(str);
|
console.log(str);
|
||||||
state.attach = str;
|
state.attach = str;
|
||||||
|
|
||||||
|
if (item.jobTypeIds) {
|
||||||
|
state.selectJobId = item.jobTypeIds.split(",");
|
||||||
|
}
|
||||||
|
if (item.bandIds) {
|
||||||
|
state.selectBandId = item.bandIds.split(",");
|
||||||
|
}
|
||||||
|
console.log("state.selectBandId", state.selectBandId);
|
||||||
|
state.sourceBelongId = item.sourceBelongId;
|
||||||
|
state.sourceBelongName = item.sourceBelongFullName;
|
||||||
|
if (item.organizationIds && item.organizationNames) {
|
||||||
|
let orgSelectIds = item.organizationIds;
|
||||||
|
let orgSelectNames = item.organizationNames;
|
||||||
|
orgSelectIds = orgSelectIds.split(",");
|
||||||
|
orgSelectNames = orgSelectNames.split(",");
|
||||||
|
console.log(
|
||||||
|
"orgSelectIds&orgSelectNames",
|
||||||
|
orgSelectIds,
|
||||||
|
orgSelectNames
|
||||||
|
);
|
||||||
|
let arrObj = [];
|
||||||
|
arrObj = orgSelectIds.map((item, index) => {
|
||||||
|
return { value: item, lebel: orgSelectNames[index] };
|
||||||
|
});
|
||||||
|
console.log("arrObj-------------", arrObj);
|
||||||
|
state.orgSelect = arrObj;
|
||||||
|
}
|
||||||
|
const imgDict = optionsUrl.value.find(
|
||||||
|
(img) => img.value.split(",")[0] === item.picUrl
|
||||||
|
);
|
||||||
|
console.log("imgDict", imgDict);
|
||||||
|
if (imgDict) {
|
||||||
|
state.pathBgId = imgDict.id;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleTagChange = () => {
|
const handleTagChange = () => {
|
||||||
|
|||||||
@@ -1077,7 +1077,7 @@
|
|||||||
v-model:AAvisible="AAvisible"
|
v-model:AAvisible="AAvisible"
|
||||||
:datasource="liveData"
|
:datasource="liveData"
|
||||||
:title="showKaoqinText"
|
:title="showKaoqinText"
|
||||||
types="1"
|
types="2"
|
||||||
classify="2"
|
classify="2"
|
||||||
/>
|
/>
|
||||||
<!-- 时间管理抽屉 -->
|
<!-- 时间管理抽屉 -->
|
||||||
|
|||||||
@@ -33,11 +33,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-popover>
|
</a-popover>
|
||||||
|
|
||||||
<div class="imgIcon" @click="showModal(element)"></div>
|
<div class="imgIcon" @click="showModal(element)"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="boxs_right">
|
<div class="boxs_right">
|
||||||
<div class="imgIcon" @click="showDeleteChapter"></div>
|
<div class="imgIcon" @click="deleteChapter"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="items2">
|
<div class="items2">
|
||||||
@@ -124,12 +123,6 @@
|
|||||||
routerInfo.routerInfo.unlockMode == 1 ? '自由学习模式' : routerInfo.routerInfo.unlockMode == 2 || routerInfo.routerInfo.unlockMode == 3 ? '闯关模式' : ''
|
routerInfo.routerInfo.unlockMode == 1 ? '自由学习模式' : routerInfo.routerInfo.unlockMode == 2 || routerInfo.routerInfo.unlockMode == 3 ? '闯关模式' : ''
|
||||||
}}
|
}}
|
||||||
</span>
|
</span>
|
||||||
<!-- <a-select v-model:value="routerInfo.routerInfo.unlockMode" ref="select" size="small"
|
|
||||||
style="width: 150px" disabled>
|
|
||||||
<a-select-option :value="1">自由学习模式</a-select-option>
|
|
||||||
<a-select-option :value="2">闯关模式</a-select-option>
|
|
||||||
<a-select-option :value="3">闯关模式</a-select-option>
|
|
||||||
</a-select> -->
|
|
||||||
<unlock-mode :routerInfo="routerInfo.routerInfo" :types="types">
|
<unlock-mode :routerInfo="routerInfo.routerInfo" :types="types">
|
||||||
<a-button type="primary" size="large" style="border-radius: 8px;margin-left: 24px;">切换模式
|
<a-button type="primary" size="large" style="border-radius: 8px;margin-left: 24px;">切换模式
|
||||||
</a-button>
|
</a-button>
|
||||||
@@ -161,8 +154,7 @@
|
|||||||
<div class="lin"></div>
|
<div class="lin"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="boom"
|
<div class="boom">
|
||||||
:style="{ minHeight: routerInfo?.chapterList[activeIndex]?.draftTaskList?.length > 6 ? ((routerInfo?.chapterList[activeIndex]?.draftTaskList?.length - 6) * 106 + 512) + 'px' : 512 + 'px' }">
|
|
||||||
<div class="boomcen">
|
<div class="boomcen">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<div class="tit_left">
|
<div class="tit_left">
|
||||||
@@ -172,7 +164,7 @@
|
|||||||
<div class="btn btn1" @click="showChangeModal">
|
<div class="btn btn1" @click="showChangeModal">
|
||||||
<div class="btnText">移动任务到关卡</div>
|
<div class="btnText">移动任务到关卡</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn btn2" @click="showDeleteALLModal">
|
<div class="btn btn2" @click="subdeleteAll">
|
||||||
<div class="imgIcon"></div>
|
<div class="imgIcon"></div>
|
||||||
<div class="btnText">批量删除</div>
|
<div class="btnText">批量删除</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -281,10 +273,6 @@
|
|||||||
<div style="width: 87px; text-align: center">
|
<div style="width: 87px; text-align: center">
|
||||||
{{ element.duration ? element.duration + "分钟" : "-" }}
|
{{ element.duration ? element.duration + "分钟" : "-" }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div style="width: 87px; text-align: center">-->
|
|
||||||
<!-- {{ element.status === 0 ? '草稿' : element.status === 1 ? '已发布' : '' }}-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<div style="
|
<div style="
|
||||||
width: 120px;
|
width: 120px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -298,7 +286,7 @@
|
|||||||
@click="editTaskForType(element,index)">
|
@click="editTaskForType(element,index)">
|
||||||
编辑
|
编辑
|
||||||
</span>
|
</span>
|
||||||
<span style="color: #4ea6ff; cursor: pointer" @click="showDeleteModal(element,index)">
|
<span style="color: #4ea6ff; cursor: pointer" @click="deleteTask(element,index)">
|
||||||
删除
|
删除
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -330,63 +318,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="footbtn">
|
<div class="footbtn footBox">
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-button class="btn btn2" @click="temporaryStorage" :loading="templateLoading">暂存</a-button>
|
<a-button class="btn btn2" @click="temporaryStorage" :loading="confirmLoading">暂存</a-button>
|
||||||
<a-button class="btn btn2" @click="submitStorage" :loading="confirmLoading">确定</a-button>
|
<a-button class="btn btn2" @click="submitStorage" :loading="confirmLoading">确定</a-button>
|
||||||
<a-button class="btn btn1" @click="cancelStorage" :loading="cancleLoading">取消</a-button>
|
<a-button class="btn btn1" @click="cancelStorage" :loading="cancleLoading">取消</a-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 批量删除学员弹窗 -->
|
<div><div style="height:80px;width:100%;" /></div>
|
||||||
<a-modal v-model:visible="deleteAll" :footer="null" :closable="closedeleteAll" wrapClassName="CopyModal"
|
|
||||||
:centered="true">
|
|
||||||
<div class="delete">
|
|
||||||
<div class="del_header"></div>
|
|
||||||
<div class="del_main">
|
|
||||||
<div class="header">
|
|
||||||
<div class="icon"></div>
|
|
||||||
<span>提示</span>
|
|
||||||
<div class="close_exit" @click="closedeleteAll"></div>
|
|
||||||
</div>
|
|
||||||
<div class="body">
|
|
||||||
<span>请确认是否批量删除任务</span>
|
|
||||||
</div>
|
|
||||||
<div class="del_btnbox">
|
|
||||||
<div class="del_btn btn1" @click="closedeleteAll">
|
|
||||||
<div class="btnText">取消</div>
|
|
||||||
</div>
|
|
||||||
<div class="del_btn btn2" @click="subdeleteAll">
|
|
||||||
<div class="btnText">确定</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a-modal>
|
|
||||||
<!-- 是否确认删除任务弹窗 -->
|
|
||||||
<!-- 确认删除阶段弹窗 -->
|
|
||||||
<a-modal v-model:visible="deleteModal" :footer="null" wrapClassName="ConfirmModal" :centered="true">
|
|
||||||
<div class="delete">
|
|
||||||
<div class="del_header"></div>
|
|
||||||
<div class="del_main">
|
|
||||||
<div class="header">
|
|
||||||
<div class="icon"></div>
|
|
||||||
<span>提示</span>
|
|
||||||
<div class="close_exit" @click="closeConfirm"></div>
|
|
||||||
</div>
|
|
||||||
<div class="body">
|
|
||||||
<span>您确定要删除此任务吗</span>
|
|
||||||
</div>
|
|
||||||
<div class="del_btnbox">
|
|
||||||
<div class="del_btn btn1" @click="closeConfirm">
|
|
||||||
<div class="btnText">取消</div>
|
|
||||||
</div>
|
|
||||||
<div class="del_btn btn2" @click="deleteLevelTask">
|
|
||||||
<div class="btnText">确定</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a-modal>
|
|
||||||
<!-- 移动任务到阶段 -->
|
<!-- 移动任务到阶段 -->
|
||||||
<a-modal style="padding: 0" v-model:visible="visiblene" :footer="null" :centered="true"
|
<a-modal style="padding: 0" v-model:visible="visiblene" :footer="null" :centered="true"
|
||||||
wrapClassName="moveModal">
|
wrapClassName="moveModal">
|
||||||
@@ -419,36 +358,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
|
|
||||||
<!-- 是否删除关卡弹窗 -->
|
|
||||||
<a-modal v-model:visible="deleteChapterModal" :footer="null" :closable="cC" wrapClassName="ConfirmModal"
|
|
||||||
centered="true">
|
|
||||||
<div class="delete">
|
|
||||||
<div class="del_header"></div>
|
|
||||||
<div class="del_main">
|
|
||||||
<div class="header">
|
|
||||||
<div class="icon"></div>
|
|
||||||
<span>提示</span>
|
|
||||||
<div class="close_exit" @click="closeDeleteChapter"></div>
|
|
||||||
</div>
|
|
||||||
<div class="body">
|
|
||||||
<span>您确定要删除此关卡</span>
|
|
||||||
</div>
|
|
||||||
<div class="del_btnbox">
|
|
||||||
<div class="del_btn btn1" @click="closeDeleteChapter">
|
|
||||||
<div class="btnText">取消</div>
|
|
||||||
</div>
|
|
||||||
<div class="del_btn btn2" @click="deleteChapter">
|
|
||||||
<div class="btnText">确定</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a-modal>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import {computed, onMounted, onUnmounted, ref, watch} from "vue";
|
import {computed, onMounted, ref, watch} from "vue";
|
||||||
import {GetRouterDraftDetail, releaseRouter} from "@/api/indexTask";
|
import {GetRouterDraftDetail, releaseRouter} from "@/api/indexTask";
|
||||||
import {message} from "ant-design-vue";
|
import {message} from "ant-design-vue";
|
||||||
import {useRoute} from "vue-router";
|
import {useRoute} from "vue-router";
|
||||||
@@ -457,19 +370,15 @@ import {TASK_TYPE} from "@/utils/const";
|
|||||||
import Draggable from "vuedraggable";
|
import Draggable from "vuedraggable";
|
||||||
import {ROUTER_DETAIL_MODIFY} from "@/api/apis";
|
import {ROUTER_DETAIL_MODIFY} from "@/api/apis";
|
||||||
import {request} from "@/api/request";
|
import {request} from "@/api/request";
|
||||||
|
import dialog from "@/utils/dialog";
|
||||||
|
|
||||||
const {query: {routerId}} = useRoute();
|
const {query: {routerId}} = useRoute();
|
||||||
const modal = ref(false)
|
const modal = ref(false)
|
||||||
const visiblene = ref(false)
|
const visiblene = ref(false)
|
||||||
const deleteAll = ref(false)
|
|
||||||
const deleteModal = ref(false)
|
|
||||||
const deleteChapterModal = ref(false)
|
|
||||||
const cancleLoading = ref(false)
|
const cancleLoading = ref(false)
|
||||||
const templateLoading = ref(false)
|
|
||||||
const confirmLoading = ref(false)
|
const confirmLoading = ref(false)
|
||||||
const moveChapterIndex = ref('')
|
const moveChapterIndex = ref('')
|
||||||
const activeIndex = ref(0)
|
const activeIndex = ref(0)
|
||||||
const deleteIndex = ref(0)
|
|
||||||
const types = 1 // 1 路径图 2 项目
|
const types = 1 // 1 路径图 2 项目
|
||||||
|
|
||||||
const courseRef = ref({})
|
const courseRef = ref({})
|
||||||
@@ -509,27 +418,24 @@ const editChapter = () => {
|
|||||||
if (!formValue.value.name) {
|
if (!formValue.value.name) {
|
||||||
return message.warning("请输入关卡名称");
|
return message.warning("请输入关卡名称");
|
||||||
}
|
}
|
||||||
routerInfo.value.chapterList.push({...formValue.value,draftTaskList: []})
|
routerInfo.value.chapterList.push({...formValue.value, draftTaskList: []})
|
||||||
formValue.value = {draftTaskList: []}
|
formValue.value = {draftTaskList: []}
|
||||||
closeModal()
|
closeModal()
|
||||||
};
|
};
|
||||||
//打开删除关卡弹窗
|
|
||||||
const showDeleteChapter = () => {
|
|
||||||
deleteChapterModal.value = true;
|
|
||||||
};
|
|
||||||
//关闭删除关卡弹窗
|
|
||||||
const closeDeleteChapter = () => {
|
|
||||||
deleteChapterModal.value = false;
|
|
||||||
};
|
|
||||||
//删除关卡
|
//删除关卡
|
||||||
const deleteChapter = () => {
|
const deleteChapter = () => {
|
||||||
if (routerInfo.value.chapterList.length === 1) {
|
dialog({
|
||||||
message.warning("至少保留一个关卡");
|
content: '确定要删除关卡吗?',
|
||||||
return
|
ok: () => {
|
||||||
}
|
if (routerInfo.value.chapterList.length === 1) {
|
||||||
routerInfo.value.chapterList.splice(activeIndex.value, 1);
|
message.warning("至少保留一个关卡");
|
||||||
activeIndex.value && (activeIndex.value = activeIndex.value-1);
|
return
|
||||||
deleteChapterModal.value = false;
|
}
|
||||||
|
routerInfo.value.chapterList[activeIndex.value].id ? (routerInfo.value.chapterList[activeIndex.value].deleted = true) : routerInfo.value.chapterList.splice(activeIndex.value, 1);
|
||||||
|
activeIndex.value && (activeIndex.value = activeIndex.value - 1);
|
||||||
|
message.info("删除关卡成功");
|
||||||
|
},
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const getDetail = async () => {
|
const getDetail = async () => {
|
||||||
@@ -539,46 +445,36 @@ const getDetail = async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
document.getElementsByTagName("main")[0].style.background = "rgb(245, 247, 250,1)";
|
|
||||||
document.getElementsByTagName("main")[0].style.boxShadow = "none";
|
|
||||||
getDetail();
|
getDetail();
|
||||||
});
|
});
|
||||||
onUnmounted(() => {
|
|
||||||
document.getElementsByTagName("main")[0].style.background = "#ffffff";
|
|
||||||
document.getElementsByTagName("main")[0].style.boxShadow = "0px 1px 35px 0px rgba(118, 136, 166, 0.07)";
|
|
||||||
});
|
|
||||||
const changebgc = (index) => {
|
const changebgc = (index) => {
|
||||||
activeIndex.value = index
|
activeIndex.value = index
|
||||||
};
|
};
|
||||||
const showDeleteALLModal = () => {
|
|
||||||
|
const subdeleteAll = () => {
|
||||||
if (!routerInfo.value?.chapterList[activeIndex.value]?.draftTaskList?.filter(t => t.checked)?.length) {
|
if (!routerInfo.value?.chapterList[activeIndex.value]?.draftTaskList?.filter(t => t.checked)?.length) {
|
||||||
message.warning("请选择要删除的任务!");
|
message.warning("请选择要删除的任务!");
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
deleteAll.value = true
|
dialog({
|
||||||
|
content: '确定要删除所选任务吗?',
|
||||||
|
ok: () => {
|
||||||
|
for (let i = 0; i < routerInfo.value.chapterList[activeIndex.value].draftTaskList.length; i++) {
|
||||||
|
const t = routerInfo.value.chapterList[activeIndex.value].draftTaskList[i]
|
||||||
|
if (t.checked) {
|
||||||
|
if (t.id) {
|
||||||
|
t.checked = false;
|
||||||
|
t.deleted = true;
|
||||||
|
} else {
|
||||||
|
routerInfo.value.chapterList[activeIndex.value].draftTaskList.splice(i, 1);
|
||||||
|
i--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
};
|
};
|
||||||
const closedeleteAll = () => {
|
|
||||||
deleteAll.value = false
|
|
||||||
};
|
|
||||||
const subdeleteAll = () => {
|
|
||||||
routerInfo.value.chapterList[activeIndex.value].draftTaskList.filter(t => t.checked).forEach(t => {
|
|
||||||
t.checked = false;
|
|
||||||
t.deleted = true;
|
|
||||||
})
|
|
||||||
closedeleteAll()
|
|
||||||
};
|
|
||||||
const showDeleteModal = (_, index) => {
|
|
||||||
deleteModal.value = true;
|
|
||||||
deleteIndex.value = index;
|
|
||||||
};
|
|
||||||
const closeConfirm = () => {
|
|
||||||
deleteModal.value = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
function deleteLevelTask() {
|
|
||||||
routerInfo.value.chapterList[activeIndex.value].draftTaskList[deleteIndex.value].deleted = true
|
|
||||||
closeConfirm()
|
|
||||||
}
|
|
||||||
|
|
||||||
//全选任务或全不选任务
|
//全选任务或全不选任务
|
||||||
const selectRowAll = () => {
|
const selectRowAll = () => {
|
||||||
@@ -602,6 +498,16 @@ const editTaskForType = (ele, index) => {
|
|||||||
courseRef.value['el' + ele.type].openDrawer(index, ele)
|
courseRef.value['el' + ele.type].openDrawer(index, ele)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function deleteTask(element, index) {
|
||||||
|
dialog({
|
||||||
|
content: '确定要删除此任务吗?',
|
||||||
|
ok: () => {
|
||||||
|
message.success("删除成功");
|
||||||
|
routerInfo.value.chapterList[activeIndex.value].draftTaskList[index].id ? (element.deleted = true) : routerInfo.value.chapterList[activeIndex.value].draftTaskList.splice(index, 1)
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const showChangeModal = () => {
|
const showChangeModal = () => {
|
||||||
if (routerInfo.value?.chapterList?.length <= 1) {
|
if (routerInfo.value?.chapterList?.length <= 1) {
|
||||||
message.warning("请添加关卡!");
|
message.warning("请添加关卡!");
|
||||||
@@ -619,12 +525,11 @@ const closeChangeModal = () => {
|
|||||||
|
|
||||||
//暂存
|
//暂存
|
||||||
const temporaryStorage = async () => {
|
const temporaryStorage = async () => {
|
||||||
// debugger
|
confirmLoading.value = true
|
||||||
templateLoading.value = true
|
|
||||||
await request(ROUTER_DETAIL_MODIFY, routerInfo.value)
|
await request(ROUTER_DETAIL_MODIFY, routerInfo.value)
|
||||||
await getDetail()
|
await getDetail()
|
||||||
message.success("暂存成功");
|
message.success("暂存成功");
|
||||||
templateLoading.value = false
|
confirmLoading.value = false
|
||||||
};
|
};
|
||||||
|
|
||||||
const submitStorage = async () => {
|
const submitStorage = async () => {
|
||||||
@@ -1122,7 +1027,10 @@ const cancelStorage = async () => {
|
|||||||
.leftmain {
|
.leftmain {
|
||||||
// width: 86%;
|
// width: 86%;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
position: sticky;
|
||||||
|
top:0;
|
||||||
|
height: 80vh;
|
||||||
|
overflow-y: auto;
|
||||||
.tit {
|
.tit {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color: #363636;
|
color: #363636;
|
||||||
@@ -1386,7 +1294,9 @@ const cancelStorage = async () => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
position: sticky;
|
||||||
|
top:0;
|
||||||
|
z-index: 999;
|
||||||
.item {
|
.item {
|
||||||
height: 115px;
|
height: 115px;
|
||||||
// width: 7.7%;
|
// width: 7.7%;
|
||||||
@@ -2058,7 +1968,7 @@ const cancelStorage = async () => {
|
|||||||
|
|
||||||
.btnbox {
|
.btnbox {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-right: 36px;
|
margin-right: 275px;
|
||||||
height: 80px;
|
height: 80px;
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
@@ -2226,4 +2136,8 @@ const cancelStorage = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.footBox {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
<div class="leftmain">
|
<div class="leftmain">
|
||||||
<div class="tit">
|
<div class="tit">
|
||||||
阶段
|
阶段
|
||||||
<img src="../../assets/images/projectadd/right.png" style="margin-left: 10px; cursor: pointer"
|
<img src="../../assets/images/projectadd/right.png" style="margin-left: 10px; cursor: pointer"
|
||||||
@click="showCancel" v-show="projectInfo.stageList[0].id != '0'" />
|
@click="removeAllLevel" v-show="projectInfo.stageList[0].id != '0'"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn btn3" @click="showModal" style="margin-left: 19px">
|
<div class="btn btn3" @click="showModal" style="margin-left: 19px">
|
||||||
<div class="search"></div>
|
<div class="search"></div>
|
||||||
@@ -14,8 +14,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="maincon" style="background-color: #fff">
|
<div class="maincon" style="background-color: #fff">
|
||||||
<Draggable v-model="projectInfo.stageList" chosenClass="chosen" ghostClass="ghost" forceFallback="true"
|
<Draggable v-model="projectInfo.stageList" chosenClass="chosen" ghostClass="ghost" forceFallback="true"
|
||||||
group="stage" animation="500" v-if="JSON.stringify(projectInfo.stageList[0].taskDraftDtoList[0]) != '{}'">
|
group="stage" animation="500"
|
||||||
<template #item="{ element,index }" >
|
v-if="JSON.stringify(projectInfo.stageList[0].taskDraftDtoList[0]) != '{}'">
|
||||||
|
<template #item="{ element,index }">
|
||||||
<div class="items" v-if="element.id !=='0' && !element.deleted"
|
<div class="items" v-if="element.id !=='0' && !element.deleted"
|
||||||
:class="activeIndex === index ? 'active' : ''"
|
:class="activeIndex === index ? 'active' : ''"
|
||||||
@click="changeStageIndex(index)">
|
@click="changeStageIndex(index)">
|
||||||
@@ -37,7 +38,7 @@
|
|||||||
<div class="imgIcon" @click="showModal(index)"></div>
|
<div class="imgIcon" @click="showModal(index)"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="boxs_right">
|
<div class="boxs_right">
|
||||||
<div class="imgIcon" @click="showDeleteStage(index)"></div>
|
<div class="imgIcon" @click="deleteStage(index)"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="items2">
|
<div class="items2">
|
||||||
@@ -101,13 +102,13 @@
|
|||||||
<div v-if="key!=13">
|
<div v-if="key!=13">
|
||||||
<component :is="value.component" :ref="el=>courseRef['el'+key]=el" :type="key"
|
<component :is="value.component" :ref="el=>courseRef['el'+key]=el" :type="key"
|
||||||
v-model:task-list="projectInfo.stageList[activeIndex].taskDraftDtoList">
|
v-model:task-list="projectInfo.stageList[activeIndex].taskDraftDtoList">
|
||||||
<div class="itcon">
|
<div class="itcon">
|
||||||
<div class="img">
|
<div class="img">
|
||||||
<img :src="value.img"/>
|
<img :src="value.img"/>
|
||||||
|
</div>
|
||||||
|
<div class="text">{{ value.name }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text">{{ value.name }}</div>
|
</component>
|
||||||
</div>
|
|
||||||
</component>
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
</div>
|
</div>
|
||||||
@@ -121,7 +122,7 @@
|
|||||||
<button class="btn" @click="showChangeModal">
|
<button class="btn" @click="showChangeModal">
|
||||||
移动任务到阶段
|
移动任务到阶段
|
||||||
</button>
|
</button>
|
||||||
<div class="edit" @click="showdeAll">
|
<div class="edit" @click="deleteTaskAll">
|
||||||
<img class="editimg" src="../../assets/images/projectadd/delete.png"/>
|
<img class="editimg" src="../../assets/images/projectadd/delete.png"/>
|
||||||
<span class="editext">批量删除</span>
|
<span class="editext">批量删除</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -250,20 +251,14 @@
|
|||||||
">
|
">
|
||||||
<div class="opa">
|
<div class="opa">
|
||||||
<div class="opacation">
|
<div class="opacation">
|
||||||
<span style="
|
<span style="
|
||||||
color: #4ea6ff;
|
color: #4ea6ff;
|
||||||
margin-right: 25px;
|
margin-right: 25px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
" @click="editTaskForType(element,index)">
|
" @click="editTaskForType(element,index)">
|
||||||
编辑
|
编辑
|
||||||
</span>
|
</span>
|
||||||
<!--<span v-else style="-->
|
<span style="color: #4ea6ff; cursor: pointer" @click="confirmDelTask(index)">
|
||||||
<!--color: #4ea6ff;-->
|
|
||||||
<!--margin-right: 55px;-->
|
|
||||||
<!--cursor: pointer;-->
|
|
||||||
<!--">-->
|
|
||||||
<!--</span>-->
|
|
||||||
<span style="color: #4ea6ff; cursor: pointer" @click="showDelete(index)">
|
|
||||||
删除
|
删除
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -279,60 +274,61 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="footbtn">
|
<div class="footbtn footBox">
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-button class="btn btn2" @click="temporaryStorage" :loading="templateLoading">暂存</a-button>
|
<a-button class="btn btn2" @click="temporaryStorage" :loading="confirmLoading">暂存</a-button>
|
||||||
<a-button class="btn btn2" @click="submitStorage" :loading="confirmLoading">确定</a-button>
|
<a-button class="btn btn2" @click="submitStorage" :loading="confirmLoading">确定</a-button>
|
||||||
<a-button class="btn btn1" @click="cancelStorage" :loading="cancleLoading">取消</a-button>
|
<a-button class="btn btn1" @click="cancelStorage" :loading="cancleLoading">取消</a-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 添加阶段弹窗 -->
|
|
||||||
<div>
|
<div>
|
||||||
<a-modal v-model:visible="stage" :title="null" @ok="closeModal" :footer="null" :closable="false"
|
<div style="height:80px;width:100%;"/>
|
||||||
wrapClassName="addstage" width="624px" height="388px" :centered="true" @cancel="closeModal">
|
</div>
|
||||||
<div class="modalHeader" style="
|
<!-- 添加阶段弹窗 -->
|
||||||
|
<a-modal v-model:visible="stage" :title="null" @ok="closeModal" :footer="null" :closable="false"
|
||||||
|
wrapClassName="addstage" width="624px" height="388px" :centered="true" @cancel="closeModal">
|
||||||
|
<div class="modalHeader" style="
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 68px;
|
height: 68px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
">
|
">
|
||||||
<div class="headerLeft" style="margin-left: 32px">
|
<div class="headerLeft" style="margin-left: 32px">
|
||||||
<span class="headerLeftText" style="font-size: 16px">编辑/添加阶段</span>
|
<span class="headerLeftText" style="font-size: 16px">编辑/添加阶段</span>
|
||||||
|
</div>
|
||||||
|
<div style="cursor: pointer; margin-right: 32px" @click="closeModal">
|
||||||
|
<img style="width: 22px; height: 22px" src="../../assets/images/basicinfo/close22.png"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modalMain" style="width: 100%">
|
||||||
|
<div class="name">
|
||||||
|
<div class="namebox">
|
||||||
|
<div>
|
||||||
|
<img src="@/assets/images/coursewareManage/asterisk.png" alt=""/>
|
||||||
|
</div>
|
||||||
|
<div class="inname">阶段名称:</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="cursor: pointer; margin-right: 32px" @click="closeModal">
|
<div class="in">
|
||||||
<img style="width: 22px; height: 22px" src="../../assets/images/basicinfo/close22.png"/>
|
<a-input v-model:value="formValue.name" show-count :maxlength="20" placeholder="请输入阶段名称"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modalMain" style="width: 100%">
|
<div class="name" style="display: flex; align-items: flex-start">
|
||||||
<div class="name">
|
<div class="namebox">
|
||||||
<div class="namebox">
|
<div class="inname">阶段说明:</div>
|
||||||
<div>
|
|
||||||
<img src="@/assets/images/coursewareManage/asterisk.png" alt=""/>
|
|
||||||
</div>
|
|
||||||
<div class="inname">阶段名称:</div>
|
|
||||||
</div>
|
|
||||||
<div class="in">
|
|
||||||
<a-input v-model:value="formValue.name" show-count :maxlength="20" placeholder="请输入阶段名称"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="name" style="display: flex; align-items: flex-start">
|
<div class="intext" style="margin-left: 14px">
|
||||||
<div class="namebox">
|
<a-textarea v-model:value="formValue.remark" style="height: 88px" show-count :maxlength="100"
|
||||||
<div class="inname">阶段说明:</div>
|
placeholder="请输入阶段说明"/>
|
||||||
</div>
|
|
||||||
<div class="intext" style="margin-left: 14px">
|
|
||||||
<a-textarea v-model:value="formValue.remark" style="height: 88px" show-count :maxlength="100"
|
|
||||||
placeholder="请输入阶段说明"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div style="
|
</div>
|
||||||
|
<div style="
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-top: 40px;
|
margin-top: 40px;
|
||||||
">
|
">
|
||||||
<button @click="closeModal" style="
|
<button @click="closeModal" style="
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
width: 100px;
|
width: 100px;
|
||||||
@@ -341,9 +337,9 @@
|
|||||||
color: #4ea6ff;
|
color: #4ea6ff;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
">
|
">
|
||||||
取消
|
取消
|
||||||
</button>
|
</button>
|
||||||
<button @click="editStage" style="
|
<button @click="editStage" style="
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin-left: 16px;
|
margin-left: 16px;
|
||||||
margin-bottom: 40px;
|
margin-bottom: 40px;
|
||||||
@@ -354,107 +350,8 @@
|
|||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
background-color: #4ea6ff;
|
background-color: #4ea6ff;
|
||||||
">
|
">
|
||||||
确定
|
确定
|
||||||
</button>
|
</button>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a-modal>
|
|
||||||
</div>
|
|
||||||
<!-- 确认添加阶段弹窗 -->
|
|
||||||
<a-modal v-model:visible="confirmModal" :footer="null" wrapClassName="ConfirmModal"
|
|
||||||
centered="true">
|
|
||||||
<div class="delete">
|
|
||||||
<div class="del_header"></div>
|
|
||||||
<div class="del_main">
|
|
||||||
<div class="header">
|
|
||||||
<div class="icon"></div>
|
|
||||||
<span>提示</span>
|
|
||||||
<div class="close_exit" @click="closeConfirm"></div>
|
|
||||||
</div>
|
|
||||||
<div class="body">
|
|
||||||
<span>您确定要添加阶段吗</span>
|
|
||||||
</div>
|
|
||||||
<div class="del_btnbox">
|
|
||||||
<div class="del_btn btn1" @click="closeConfirm">
|
|
||||||
<div class="btnText">取消</div>
|
|
||||||
</div>
|
|
||||||
<div class="del_btn btn2" @click="showModal">
|
|
||||||
<div class="btnText">确定</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a-modal>
|
|
||||||
<!-- 确认取消阶段弹窗 -->
|
|
||||||
<a-modal v-model:visible="cancelModal" :footer="null" wrapClassName="ConfirmModal"
|
|
||||||
centered="true">
|
|
||||||
<div class="delete">
|
|
||||||
<div class="del_header"></div>
|
|
||||||
<div class="del_main">
|
|
||||||
<div class="header">
|
|
||||||
<div class="icon"></div>
|
|
||||||
<span>提示</span>
|
|
||||||
<!-- <div class="close_exit" @click="closeCancel"></div> -->
|
|
||||||
</div>
|
|
||||||
<div class="body">
|
|
||||||
<span>您确定要删除所有阶段吗?</span>
|
|
||||||
</div>
|
|
||||||
<div class="del_btnbox">
|
|
||||||
<div class="del_btn btn1" @click="closeCancel">
|
|
||||||
<div class="btnText">取消</div>
|
|
||||||
</div>
|
|
||||||
<div class="del_btn btn2" @click="removeAllLevel">
|
|
||||||
<div class="btnText">确定</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a-modal>
|
|
||||||
<!-- 确认删除任务弹窗 -->
|
|
||||||
<a-modal v-model:visible="deleteModal" :footer="null" wrapClassName="ConfirmModal"
|
|
||||||
centered="true">
|
|
||||||
<div class="delete">
|
|
||||||
<div class="del_header"></div>
|
|
||||||
<div class="del_main">
|
|
||||||
<div class="header">
|
|
||||||
<div class="icon"></div>
|
|
||||||
<span>提示</span>
|
|
||||||
<div class="close_exit" @click="closeDelete"></div>
|
|
||||||
</div>
|
|
||||||
<div class="body">
|
|
||||||
<span>您确定要删除此任务吗</span>
|
|
||||||
</div>
|
|
||||||
<div class="del_btnbox">
|
|
||||||
<div class="del_btn btn1" @click="closeDelete">
|
|
||||||
<div class="btnText">取消</div>
|
|
||||||
</div>
|
|
||||||
<div class="del_btn btn2" @click="confirmDelTask">
|
|
||||||
<div class="btnText">确定</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a-modal>
|
|
||||||
<a-modal v-model:visible="deAll" :footer="null" :closable="cC" wrapClassName="ConfirmModal" :centered="true">
|
|
||||||
<div class="delete">
|
|
||||||
<div class="del_header"></div>
|
|
||||||
<div class="del_main">
|
|
||||||
<div class="header">
|
|
||||||
<div class="icon"></div>
|
|
||||||
<span>提示</span>
|
|
||||||
<div class="close_exit" @click="closeDeAll"></div>
|
|
||||||
</div>
|
|
||||||
<div class="body">
|
|
||||||
<span>您确定要批量删除任务吗</span>
|
|
||||||
</div>
|
|
||||||
<div class="del_btnbox">
|
|
||||||
<div class="del_btn btn1" @click="closeDeAll">
|
|
||||||
<div class="btnText">取消</div>
|
|
||||||
</div>
|
|
||||||
<div class="del_btn btn2" @click="deleteTaskAll">
|
|
||||||
<div class="btnText">确定</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
@@ -490,39 +387,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
|
|
||||||
<!-- 是否删除阶段弹窗 -->
|
|
||||||
<a-modal v-model:visible="deleteStageModal" :footer="null" :closable="cC" wrapClassName="ConfirmModal"
|
|
||||||
centered="true">
|
|
||||||
<div class="delete">
|
|
||||||
<div class="del_header"></div>
|
|
||||||
<div class="del_main">
|
|
||||||
<div class="header">
|
|
||||||
<div class="icon"></div>
|
|
||||||
<span>提示</span>
|
|
||||||
<!-- <div class="close_exit" @click="closeDeleteStage"></div> -->
|
|
||||||
</div>
|
|
||||||
<div class="body">
|
|
||||||
<span style="width:320px;display:flex;justify-content:center;align-items:center;">{{
|
|
||||||
projectInfo.stageList?.length === 1 ? "当前为最后一个阶段,删除后任务将被移出,为无阶段模式,确认删除阶段吗?" : "您确定要删除此阶段"
|
|
||||||
}}</span>
|
|
||||||
</div>
|
|
||||||
<div class="del_btnbox">
|
|
||||||
<div class="del_btn btn1" @click="closeDeleteStage">
|
|
||||||
<div class="btnText">取消</div>
|
|
||||||
</div>
|
|
||||||
<div class="del_btn btn2" @click="deleteStage">
|
|
||||||
<div class="btnText">确定</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a-modal>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {computed, onMounted, onUnmounted, ref, watch,} from "vue";
|
import {computed, onMounted, ref, watch,} from "vue";
|
||||||
import {message} from "ant-design-vue";
|
import {message} from "ant-design-vue";
|
||||||
import * as api from "../../api/indexTaskadd";
|
import * as api from "../../api/indexTaskadd";
|
||||||
import UnlockMode from "../../components/drawers/UnlockMode.vue";
|
import UnlockMode from "../../components/drawers/UnlockMode.vue";
|
||||||
@@ -531,23 +400,17 @@ import {useRoute} from "vue-router";
|
|||||||
import {TASK_TYPE} from "@/utils/const";
|
import {TASK_TYPE} from "@/utils/const";
|
||||||
import {request} from "@/api/request";
|
import {request} from "@/api/request";
|
||||||
import {PROJECT_DETAIL_MODIFY, PROJECT_RELEASE} from "@/api/apis";
|
import {PROJECT_DETAIL_MODIFY, PROJECT_RELEASE} from "@/api/apis";
|
||||||
|
import dialog from "@/utils/dialog";
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const courseRef = ref({})
|
const courseRef = ref({})
|
||||||
const visiblene = ref(false);
|
const visiblene = ref(false);
|
||||||
const deAll = ref(false);
|
|
||||||
const deleteModal = ref(false);
|
|
||||||
const confirmModal = ref(false);
|
|
||||||
const stage = ref(false);
|
const stage = ref(false);
|
||||||
const cancelModal = ref(false);
|
|
||||||
const deleteStageModal = ref(false);
|
|
||||||
const templateLoading = ref(false);
|
|
||||||
const confirmLoading = ref(false);
|
const confirmLoading = ref(false);
|
||||||
const cancleLoading = ref(false);
|
const cancleLoading = ref(false);
|
||||||
const projectInfo = ref({stageList: [{taskDraftDtoList: [{}]}], projectInfo: {}});
|
const projectInfo = ref({stageList: [{taskDraftDtoList: [{}]}], projectInfo: {}});
|
||||||
const activeIndex = ref(0);
|
const activeIndex = ref(0);
|
||||||
const moveChapterIndex = ref(0);
|
const moveChapterIndex = ref(0);
|
||||||
const deleteIndex = ref(0);
|
|
||||||
const formValue = ref({taskDraftDtoList: []});
|
const formValue = ref({taskDraftDtoList: []});
|
||||||
|
|
||||||
|
|
||||||
@@ -611,16 +474,37 @@ const moveTask = () => {
|
|||||||
};
|
};
|
||||||
//批量删除
|
//批量删除
|
||||||
const deleteTaskAll = () => {
|
const deleteTaskAll = () => {
|
||||||
projectInfo.value.stageList[activeIndex.value].taskDraftDtoList.filter(t => t.checked).forEach(t => {
|
if (!projectInfo.value?.stageList[activeIndex.value]?.taskDraftDtoList?.filter(t => t.checked)?.length) {
|
||||||
t.checked = false;
|
message.warning("请选择要删除的任务!");
|
||||||
t.deleted = true;
|
return
|
||||||
})
|
}
|
||||||
deAll.value = false;
|
dialog({
|
||||||
|
content: '确定要删除所选任务吗?',
|
||||||
|
ok: () => {
|
||||||
|
for (let i = 0; i < projectInfo.value.stageList[activeIndex.value].taskDraftDtoList.length; i++) {
|
||||||
|
const t = projectInfo.value.stageList[activeIndex.value].taskDraftDtoList[i]
|
||||||
|
if (t.checked) {
|
||||||
|
if (t.id) {
|
||||||
|
t.checked = false;
|
||||||
|
t.deleted = true;
|
||||||
|
} else {
|
||||||
|
projectInfo.value.stageList[activeIndex.value].taskDraftDtoList.splice(i, 1);
|
||||||
|
i--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const confirmDelTask = () => {
|
const confirmDelTask = (index) => {
|
||||||
projectInfo.value.stageList[activeIndex.value].taskDraftDtoList[deleteIndex.value].deleted = true
|
dialog({
|
||||||
deleteModal.value = false
|
content: '确定要删除此任务吗?',
|
||||||
|
ok: () => {
|
||||||
|
message.success("删除成功");
|
||||||
|
projectInfo.value.stageList[activeIndex.value].taskDraftDtoList[index].id ? (projectInfo.value.stageList[activeIndex.value].taskDraftDtoList[index].deleted = true) : projectInfo.value.stageList[activeIndex.value].taskDraftDtoList.splice(index, 1)
|
||||||
|
},
|
||||||
|
});
|
||||||
};
|
};
|
||||||
//关闭添加阶段弹窗
|
//关闭添加阶段弹窗
|
||||||
const closeModal = () => {
|
const closeModal = () => {
|
||||||
@@ -650,63 +534,36 @@ function editStage() {
|
|||||||
stage.value = false
|
stage.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
//打开删除阶段弹窗
|
|
||||||
const showDeleteStage = (index) => {
|
|
||||||
deleteStageModal.value = true;
|
|
||||||
deleteIndex.value = index;
|
|
||||||
};
|
|
||||||
//关闭删除阶段弹窗
|
|
||||||
const closeDeleteStage = () => {
|
|
||||||
deleteStageModal.value = false;
|
|
||||||
};
|
|
||||||
//删除阶段
|
//删除阶段
|
||||||
const deleteStage = () => {
|
const deleteStage = () => {
|
||||||
console.log(12345);
|
dialog({
|
||||||
if (projectInfo.value.stageList.length === 1) {
|
content: projectInfo.value.stageList.length === 1 ? "当前为最后一个阶段,删除后任务将被移出,为无阶段模式,确认删除阶段吗?" : '确认删除此阶段吗?',
|
||||||
projectInfo.value.stageList = [{id: '0', stageId: '0', name: '', remark: '', taskDraftDtoList: []}];
|
ok: () => {
|
||||||
deleteStageModal.value = false;
|
message.success("删除成功");
|
||||||
return
|
projectInfo.value.stageList[activeIndex.value].id ? (projectInfo.value.stageList[activeIndex.value].deleted = true) : projectInfo.value.stageList.splice(activeIndex.value, 1)
|
||||||
}
|
activeIndex.value && (activeIndex.value = activeIndex.value - 1);
|
||||||
projectInfo.value.stageList.splice(activeIndex.value, 1);
|
},
|
||||||
activeIndex.value && (activeIndex.value = activeIndex.value-1);
|
});
|
||||||
deleteStageModal.value = false;
|
|
||||||
};
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
document.getElementsByTagName("main")[0].style.background = "rgb(245, 247, 250,1)";
|
|
||||||
document.getElementsByTagName("main")[0].style.boxShadow = "none";
|
|
||||||
getTask();
|
getTask();
|
||||||
});
|
});
|
||||||
|
|
||||||
onUnmounted(() => {
|
|
||||||
document.getElementsByTagName("main")[0].style.background = "#ffffff";
|
|
||||||
document.getElementsByTagName("main")[0].style.boxShadow = "0px 1px 35px 0px rgba(118, 136, 166, 0.07)";
|
|
||||||
});
|
|
||||||
const closeConfirm = () => {
|
|
||||||
confirmModal.value = false;
|
|
||||||
};
|
|
||||||
const showCancel = () => {
|
|
||||||
cancelModal.value = true;
|
|
||||||
};
|
|
||||||
const closeCancel = () => {
|
|
||||||
cancelModal.value = false;
|
|
||||||
};
|
|
||||||
const showDelete = (index) => {
|
|
||||||
deleteModal.value = true;
|
|
||||||
deleteIndex.value = index
|
|
||||||
};
|
|
||||||
const closeDelete = () => {
|
|
||||||
deleteModal.value = false;
|
|
||||||
};
|
|
||||||
// 删除所有阶段
|
// 删除所有阶段
|
||||||
const removeAllLevel = () => {
|
const removeAllLevel = () => {
|
||||||
console.log(projectInfo.value.stageList)
|
dialog({
|
||||||
projectInfo.value.stageList.forEach(t => {
|
content: '确定要删除所有阶段吗?',
|
||||||
if(t.id!=='0'){
|
ok: () => {
|
||||||
t.checked = false;
|
message.success("删除成功");
|
||||||
t.deleted = true;
|
projectInfo.value.stageList.forEach((t, i) => {
|
||||||
}
|
if (t.id) {
|
||||||
})
|
t.checked = false;
|
||||||
cancelModal.value = false;
|
t.deleted = true;
|
||||||
|
} else {
|
||||||
|
projectInfo.value.stageList.splice(i, 1)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
});
|
||||||
};
|
};
|
||||||
//全选任务或全不选任务
|
//全选任务或全不选任务
|
||||||
const selectRowAll = () => {
|
const selectRowAll = () => {
|
||||||
@@ -716,29 +573,17 @@ const selectRowAll = () => {
|
|||||||
}
|
}
|
||||||
projectInfo.value.stageList[activeIndex.value].taskDraftDtoList.forEach(t => t.checked = true)
|
projectInfo.value.stageList[activeIndex.value].taskDraftDtoList.forEach(t => t.checked = true)
|
||||||
};
|
};
|
||||||
const showdeAll = () => {
|
|
||||||
if (!projectInfo.value?.stageList[activeIndex.value]?.taskDraftDtoList?.filter(t => t.checked)?.length) {
|
|
||||||
message.warning("请选择要删除的任务!");
|
|
||||||
return
|
|
||||||
}
|
|
||||||
deAll.value = true
|
|
||||||
};
|
|
||||||
const closeDeAll = () => {
|
|
||||||
deAll.value = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
//暂存
|
//暂存
|
||||||
const temporaryStorage = async () => {
|
const temporaryStorage = async () => {
|
||||||
templateLoading.value = true
|
confirmLoading.value = true
|
||||||
console.log(projectInfo.value)
|
|
||||||
await request(PROJECT_DETAIL_MODIFY, projectInfo.value)
|
await request(PROJECT_DETAIL_MODIFY, projectInfo.value)
|
||||||
await getTask()
|
await getTask()
|
||||||
message.success("暂存成功");
|
message.success("暂存成功");
|
||||||
templateLoading.value = false
|
confirmLoading.value = false
|
||||||
};
|
};
|
||||||
//确定
|
//确定
|
||||||
const submitStorage = async () => {
|
const submitStorage = async () => {
|
||||||
// debugger
|
|
||||||
confirmLoading.value = true
|
confirmLoading.value = true
|
||||||
projectInfo.value.projectInfo.status === 3 ? await request(PROJECT_RELEASE, {projectId: route.query.projectId}) : await request(PROJECT_DETAIL_MODIFY, projectInfo.value)
|
projectInfo.value.projectInfo.status === 3 ? await request(PROJECT_RELEASE, {projectId: route.query.projectId}) : await request(PROJECT_DETAIL_MODIFY, projectInfo.value)
|
||||||
message.success("阶段和任务数据已保存")
|
message.success("阶段和任务数据已保存")
|
||||||
@@ -1103,8 +948,10 @@ const cancelStorage = async () => {
|
|||||||
|
|
||||||
.leftmain {
|
.leftmain {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
min-height: 800px;
|
position: sticky;
|
||||||
|
top:0;
|
||||||
|
height: 80vh;
|
||||||
|
overflow-y: auto;
|
||||||
.tit {
|
.tit {
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
@@ -1436,6 +1283,9 @@ const cancelStorage = async () => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 99999;
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
height: 115px;
|
height: 115px;
|
||||||
@@ -1717,7 +1567,7 @@ const cancelStorage = async () => {
|
|||||||
|
|
||||||
.bi {
|
.bi {
|
||||||
width: 63px;
|
width: 63px;
|
||||||
height: 23;
|
height: 23px;
|
||||||
background-color: #5dc988;
|
background-color: #5dc988;
|
||||||
line-height: 23px;
|
line-height: 23px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -1767,7 +1617,7 @@ const cancelStorage = async () => {
|
|||||||
|
|
||||||
.btnbox {
|
.btnbox {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-right: 36px;
|
margin-right: 275px;
|
||||||
height: 80px;
|
height: 80px;
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
@@ -1811,4 +1661,9 @@ const cancelStorage = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.footBox {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user