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