# Conflicts:
#	vue.config.js
This commit is contained in:
dongruihua
2023-02-25 09:26:29 +08:00
24 changed files with 2904 additions and 1926 deletions

View File

@@ -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'

View 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>

View File

@@ -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('签到成功')

View File

@@ -10,12 +10,22 @@
@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 v-show="formData.examType === 1" style="width: 100px; cursor: pointer;"
:class="formData.examType === 1 ? 'outer' : 'notOuter'">
系统考试
</button>
<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)" <button style="width: 100px; cursor: pointer;" @click="changeOuter(1)"
: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 style="width: 100px; cursor: pointer;" @click="changeOuter(2)"
:class="formData.examType === 2 ? 'outer' : 'notOuter'"> :class="formData.examType === 2 ? 'outer' : 'notOuter'">
外部考试 外部考试
</button> </button>
@@ -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>
@@ -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;
} }

View File

@@ -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
}; };
}, },
}; };

View File

@@ -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;

View File

@@ -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=>{

View File

@@ -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,

View File

@@ -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}) {

View File

@@ -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
--> -->

View File

@@ -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

View File

@@ -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,7 +97,7 @@
</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',
@@ -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 = [];

View File

@@ -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
View 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

View File

@@ -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
} }

View File

@@ -315,36 +315,109 @@
:pagination="false" :pagination="false"
:scroll="{ x: 'max-content' }" :scroll="{ x: 'max-content' }"
> >
<template #operation="{ record }"> <template #operation="{ text, record, index }">
<a-space> <a-space>
<a-button v-if="record.auditStatus===2 && checkPer(record.permissions)" <a-button
@click="() => handlePush(record, String(record.courseform))" type="link">发布 v-if="record.auditStatus === 2 && checkPer(record.permissions)"
@click="() => handlePush(text, index)"
type="link"
>发布
</a-button> </a-button>
<a-button v-if="record.auditStatus===0 && checkPer(record.permissions)" <a-button
@click="() => handleSubmit(record, String(record.courseform))" type="link">提交审核 v-if="record.auditStatus === 0 && checkPer(record.permissions)"
@click="() => handleSubmit(text, index)"
type="link"
>提交审核
</a-button> </a-button>
<a-button v-if="(record.auditStatus===0 || record.auditStatus===-1) && checkPer(record.permissions)" <a-button
@click="() => handleEdit(record, String(record.courseform))" type="link">编辑 v-if="
(record.auditStatus === 0 || record.auditStatus === -1) &&
checkPer(record.permissions)
"
@click="() => handleEdit(record, String(record.courseform))"
type="link"
>编辑
</a-button> </a-button>
<a-button v-if="(record.auditStatus===2 || record.auditStatus===3) && checkPer(record.permissions)" <!-- <a-button
@click="() => handleStart(record, String(record.courseform))" type="link">开课 @click="() => handleEdit(record, String(record.courseform))"
type="link"
>编辑
</a-button> -->
<a-button
v-if="
(record.auditStatus === 2 || record.auditStatus === 3) &&
checkPer(record.permissions)
"
@click="() => handleStart(record, String(record.courseform))"
type="link"
>开课
</a-button> </a-button>
<a-button @click="() => handleLook(record, String(record.courseform))" type="link">查看 <a-button
@click="() => handleLook(record, String(record.courseform))"
type="link"
>查看
</a-button> </a-button>
<a-button v-if="(record.auditStatus===2 || record.auditStatus===3) && checkPer(record.permissions)" <a-button
@click="() => handleGuan22(record, String(record.courseform))" type="link">管理 v-if="
(record.auditStatus === 2 || record.auditStatus === 3) &&
checkPer(record.permissions)
"
@click="() => handleGuan22(record, String(record.courseform))"
type="link"
>管理
</a-button> </a-button>
<DropDown v-if="checkPer(record.permissions)" value="授权"> <DropDown v-if="checkPer(record.permissions)" value="授权">
<OwnerTableModelStudent :types="[10,11,12]" :id="record.offcourseId">权限名单</OwnerTableModelStudent> <OwnerTableModelStudent
<CommonStudent :type="10" :id="record.offcourseId" title="查看权">查看权</CommonStudent> :types="[10, 11, 12]"
<CommonStudent :type="11" :id="record.offcourseId" title="管理权">管理权</CommonStudent> :id="record.offcourseId"
>权限名单</OwnerTableModelStudent
>
<CommonStudent :type="10" :id="record.offcourseId" title="查看权"
>查看权</CommonStudent
>
<CommonStudent :type="11" :id="record.offcourseId" title="管理权"
>管理权</CommonStudent
>
</DropDown> </DropDown>
<DropDown v-if="checkPer(record.permissions)" value="更多"> <DropDown v-if="checkPer(record.permissions)" value="更多">
<a-button @click="() => handleCopy(record, String(record.courseform))" type="link">复制</a-button> <a-button @click="() => handleCopy(text)" type="link"
<a-button @click="() => handleRejectExit(record, String(record.courseform))" type="link">撤回</a-button> >复制</a-button
<a-button v-if="record.status" @click="() => handleStop(record, String(record.courseform))" type="link">停用</a-button> >
<a-button v-else @click="() => handleOpen(record, String(record.courseform))" type="link">启用</a-button> <a-button
<a-button @click="() => handleDelete(record, String(record.courseform))" type="link" danger>删除 v-if="
(record.auditStatus === 3 || record.auditStatus === 2) &&
record.status &&
checkPer(record.permissions)
"
@click="() => handleRejectExit(text, index, record)"
type="link"
>撤回</a-button
>
<a-button
v-if="
record.auditStatus === 3 &&
record.status &&
checkPer(record.permissions)
"
@click="() => handleStop(text, index)"
type="link"
>停用</a-button
>
<a-button
v-if="
record.auditStatus === 3 &&
!record.status &&
checkPer(record.permissions)
"
@click="() => handleOpen(text, index)"
type="link"
>启用</a-button
>
<a-button
@click="() => handleDelete(text, index)"
type="link"
danger
>删除
</a-button> </a-button>
</DropDown> </DropDown>
</a-space> </a-space>
@@ -840,7 +913,11 @@
<div class="b_input"> <div class="b_input">
<NameInput <NameInput
maxlength="30" maxlength="30"
v-model:value="xjkkinputV1" v-model:validate="validate" show-count :id="offcourseId" :type="2" v-model:value="xjkkinputV1"
v-model:validate="validate"
show-count
:id="offcourseId"
:type="2"
style="width: 440px; height: 40px; border-radius: 8px" style="width: 440px; height: 40px; border-radius: 8px"
placeholder="请输入开课名称" placeholder="请输入开课名称"
></NameInput> ></NameInput>
@@ -908,7 +985,48 @@
></ProjectManager> ></ProjectManager>
</div> </div>
</div> </div>
<div class="cstm_items">
<div class="signbox">
<span style="margin-right: 3px">考勤设置:</span>
</div>
<div style="display: flex; align-items: center">
<div style="margin-right: 10px">签到</div>
<div
style="display: flex; align-items: center; margin-right: 20px"
>
<span>开始前:</span>
<a-input-number
:min="0"
:max="300"
:precision="0"
style="
width: 100px;
height: 32px;
border-radius: 8px;
overflow: hidden;
"
v-model:value="beforeValue"
></a-input-number>
<span style="color: #999999; margin-left: 8px">分钟</span>
</div>
<div style="display: flex; align-items: center">
<span>开始后:</span>
<a-input-number
:min="0"
:max="300"
:precision="0"
style="
width: 100px;
height: 32px;
border-radius: 8px;
overflow: hidden;
"
v-model:value="afterStartValue"
></a-input-number>
<span style="color: #999999; margin-left: 8px">分钟</span>
</div>
</div>
</div>
<div class="cstm_items"> <div class="cstm_items">
<div class="signbox"> <div class="signbox">
<span style="margin-right: 3px">报名设置</span> <span style="margin-right: 3px">报名设置</span>
@@ -952,8 +1070,17 @@
<div v-if="checked4" class="cstm_items main_item"> <div v-if="checked4" class="cstm_items main_item">
<div class="signbox"></div> <div class="signbox"></div>
<div class="btnbox"> <div class="btnbox">
<AssessmentList v-model:assessmentName="assessmentName" v-model:assessmentId="assessmentId"> <AssessmentList
<button class="xkbtn" @click="showAssessment" style="margin-bottom: 0;margin-top: 0">选择评估</button> v-model:assessmentName="assessmentName"
v-model:assessmentId="assessmentId"
>
<button
class="xkbtn"
@click="showAssessment"
style="margin-bottom: 0; margin-top: 0"
>
选择评估
</button>
</AssessmentList> </AssessmentList>
<div v-if="assessmentId > 0"> <div v-if="assessmentId > 0">
<a-tag closable @close="removePG" color="processing"> <a-tag closable @close="removePG" color="processing">
@@ -986,7 +1113,9 @@
<div class="signbox"></div> <div class="signbox"></div>
<div class="btnbox"> <div class="btnbox">
<add-test v-model:info="examInfo"> <add-test v-model:info="examInfo">
<button class="xkbtn" style="margin-bottom: 0;margin-top: 0">配置考试</button> <button class="xkbtn" style="margin-bottom: 0; margin-top: 0">
配置考试
</button>
</add-test> </add-test>
<div v-if="examInfo.examinationName"> <div v-if="examInfo.examinationName">
<a-tag closable @close="logT" color="processing"> <a-tag closable @close="logT" color="processing">
@@ -995,7 +1124,6 @@
</span> </span>
</a-tag> </a-tag>
</div> </div>
</div> </div>
</div> </div>
<!-- <!--
@@ -1106,14 +1234,41 @@
:isgetStudent="isgetStudent" :isgetStudent="isgetStudent"
> >
<template #extension="{ data: { record } }"> <template #extension="{ data: { record } }">
<a-button v-if="record.source === 4 && record.status === 1" <a-button
@click="() => {record.status = 0;auditStudent(record);}" type="link">审核通过 v-if="record.source === 4 && record.status === 1"
@click="
() => {
record.status = 0;
auditStudent(record);
}
"
type="link"
>审核通过
</a-button> </a-button>
<a-button v-if="record.source === 4 && record.status === 1" <a-button
@click="() => {record.status = 2;auditStudent(record);}" type="link">拒绝 v-if="record.source === 4 && record.status === 1"
@click="
() => {
record.status = 2;
auditStudent(record);
}
"
type="link"
>拒绝
</a-button> </a-button>
<a-button v-if="record.source === 4 && (record.status === 0 || record.status === 2)" <a-button
@click="() => {record.status = 1;auditStudent(record);}" type="link">撤回 v-if="
record.source === 4 &&
(record.status === 0 || record.status === 2)
"
@click="
() => {
record.status = 1;
auditStudent(record);
}
"
type="link"
>撤回
</a-button> </a-button>
</template> </template>
</TableStudent> </TableStudent>
@@ -1357,7 +1512,16 @@
<div <div
class="delete" class="delete"
:style="{ :style="{
display: del_hs || copy_hs || nouse_hs || back_hs || submit_hs || useCourse || push_hs ? 'block' : 'none', display:
del_hs ||
copy_hs ||
nouse_hs ||
back_hs ||
submit_hs ||
useCourse ||
push_hs
? 'block'
: 'none',
}" }"
> >
<div class="del_header"></div> <div class="del_header"></div>
@@ -1514,6 +1678,7 @@ import NameInput from "../../components/project/NameInput";
import ProjPowerList from "../../components/drawers/ProjPowerList"; import ProjPowerList from "../../components/drawers/ProjPowerList";
import ProjCheckShip from "../../components/drawers/ProjCheckPower"; import ProjCheckShip from "../../components/drawers/ProjCheckPower";
import AssessmentList from "../../components/drawers/AssessmentList.vue"; import AssessmentList from "../../components/drawers/AssessmentList.vue";
import dialog from "@/utils/dialog";
import { import {
list, list,
detail, detail,
@@ -1526,7 +1691,8 @@ import {
studentExport, studentExport,
handleStudent, handleStudent,
getMemberInfoApi, getMemberInfoApi,
copyCoursePlan, copyCourse, copyCoursePlan,
copyCourse,
} from "@/api/indexCourse"; } from "@/api/indexCourse";
import { import {
traverseArr, traverseArr,
@@ -1721,8 +1887,8 @@ const columns6 = [
align: "center", align: "center",
ellipsis: true, ellipsis: true,
customRender: ({ text }) => { customRender: ({ text }) => {
return text ? text : "-" return text ? text : "-";
} },
}, },
{ {
@@ -1996,7 +2162,8 @@ export default defineComponent({
ellipsis: true, ellipsis: true,
key: "contentTxt", key: "contentTxt",
align: "center", align: "center",
customRender: ({record}) => (findClassFullName(sysTypeOptions.value, record.sysTypeId) || "-") customRender: ({ record }) =>
findClassFullName(sysTypeOptions.value, record.sysTypeId) || "-",
}, },
{ {
title: "课程形式", title: "课程形式",
@@ -2097,7 +2264,7 @@ export default defineComponent({
case "-1": case "-1":
return "审核未通过"; return "审核未通过";
} }
} },
}, },
{ {
title: "是否发布", title: "是否发布",
@@ -2105,7 +2272,8 @@ export default defineComponent({
dataIndex: "auditStatus", dataIndex: "auditStatus",
key: "7", key: "7",
align: "center", align: "center",
customRender: ({record}) => record.auditStatus === 3 ? '已发布' : '未发布', customRender: ({ record }) =>
record.auditStatus === 3 ? "已发布" : "未发布",
}, },
{ {
title: "创建人", title: "创建人",
@@ -2137,7 +2305,7 @@ export default defineComponent({
key: "10", key: "10",
align: "center", align: "center",
customRender: ({ text, auditStatus }) => { customRender: ({ text, auditStatus }) => {
return auditStatus == 3 ? (text || '-') : "-"; return auditStatus == 3 ? text || "-" : "-";
}, },
}, },
{ {
@@ -2146,14 +2314,8 @@ export default defineComponent({
key: "status", key: "status",
dataIndex: "status", dataIndex: "status",
align: "center", align: "center",
customRender: ({record}) => { customRender: ({ record }) =>
switch (String(record.status)) { record.auditStatus === 3 ? (record.status ? "启用" : "停用") : "-",
case "0":
return "停用";
case "1":
return "启用";
}
},
}, },
{ {
title: "操作", title: "操作",
@@ -2162,7 +2324,7 @@ export default defineComponent({
key: "id", key: "id",
fixed: "right", fixed: "right",
align: "right", align: "right",
slots: { customRender: 'operation' } slots: { customRender: "operation" },
}, },
], ],
//新加 //新加
@@ -2538,6 +2700,8 @@ export default defineComponent({
xjkkinputV2: "", xjkkinputV2: "",
xjkkinputV3: "", xjkkinputV3: "",
xjkkinputV4: null, xjkkinputV4: null,
beforeValue: null, //考勤 开始前
afterStartValue: null, //考勤 开始后
//开课学员管理 //开课学员管理
xygl_inputV1: "", xygl_inputV1: "",
//录入成绩 //录入成绩
@@ -2748,7 +2912,8 @@ export default defineComponent({
return ( return (
(list && (list &&
list.length > 0 && list.length > 0 &&
list.map((e) => list
.map((e) =>
classify == e.code classify == e.code
? name ? name
? name + "-" + e.name ? name + "-" + e.name
@@ -2772,48 +2937,13 @@ export default defineComponent({
state.viewpowervisible = true; state.viewpowervisible = true;
}; };
// console.log('12344', sysTypeOptions)
// 处理数据字典
// function formateDictT(data) {
// for(let i=0;i<data.length;i++){
// data[i].title = data[i].dictName;
// data[i].value = data[i].dictCode;
// if(data[i].children.length!==0){
// for(let j=0;j<data[i].children.length;j++){
// data[i].children[j].title = data[i].children[j].dictName;
// data[i].children[j].value = data[i].children[j].dictCode;
// if(data[i].children[j].children.length!==0){
// for(let k=0; k<data[i].children[j].children.length; k++) {
// data[i].children[j].children[k].title = data[i].children[j].children[k].dictName;
// data[i].children[j].children[k].value = data[i].children[j].children[k].dictCode;
// }
// }
// }
// }
// }
// return data;
// }
// 富文本 sssssssssssssss // 富文本 sssssssssssssss
// 编辑器实例,必须用 shallowRef // 编辑器实例,必须用 shallowRef
const editorRef = shallowRef(); const editorRef = shallowRef();
// 内容 HTML // 内容 HTML
const valueHtml = ref(""); const valueHtml = ref("");
// // 模拟 ajax 异步获取内容 // // 模拟 ajax 异步获取内容
onMounted(() => { onMounted(() => {});
setTimeout(() => {
// valueHtml.value = "<p>模拟 Ajax 异步设置内容</p>";
console.log("toolbar222222222222222");
console.log(editorRef.value);
// const toolbar = DomEditor.getToolbar(editorRef.value);
// const menu = editorRef.value.getAllMenuKeys();
// const bar = toolbar.getConfig().toolbarKeys;
// console.log(menu);
// console.log(bar);
}, 3500);
});
const toolbarConfig = { const toolbarConfig = {
excludeKeys: ["insertVideo", "insertImage"], excludeKeys: ["insertVideo", "insertImage"],
@@ -3161,10 +3291,10 @@ export default defineComponent({
state.addtestvisible = true; state.addtestvisible = true;
}; };
const logW = () => { const logW = () => {
state.workInfo = {} state.workInfo = {};
}; };
const logT = () => { const logT = () => {
state.examInfo = {} state.examInfo = {};
}; };
const removePG = () => { const removePG = () => {
console.log("11111"); console.log("11111");
@@ -3342,12 +3472,12 @@ export default defineComponent({
if (state.selectTime) { if (state.selectTime) {
// beginTime = parseInt(new Date(state.selectTime[0].$d).getTime() / 1000); // beginTime = parseInt(new Date(state.selectTime[0].$d).getTime() / 1000);
// endTime = parseInt(new Date(state.selectTime[1].$d).getTime() / 1000); // endTime = parseInt(new Date(state.selectTime[1].$d).getTime() / 1000);
beginTime = dayjs(state.selectTime[0]).format('YYYY-MM-DD HH:mm:ss') beginTime = dayjs(state.selectTime[0]).format("YYYY-MM-DD HH:mm:ss");
// toDate( // toDate(
// new Date(state.selectTime[0].$d).getTime() / 1000, // new Date(state.selectTime[0].$d).getTime() / 1000,
// "Y-M-D h:m:s" // "Y-M-D h:m:s"
// ); // );
endTime = dayjs(state.selectTime[1]).format('YYYY-MM-DD HH:mm:ss') endTime = dayjs(state.selectTime[1]).format("YYYY-MM-DD HH:mm:ss");
// toDate( // toDate(
// new Date(state.selectTime[1].$d).getTime() / 1000, // new Date(state.selectTime[1].$d).getTime() / 1000,
// "Y-M-D h:m:s" // "Y-M-D h:m:s"
@@ -3625,6 +3755,8 @@ export default defineComponent({
state.assessmentId = null; state.assessmentId = null;
state.assessmentName = ""; state.assessmentName = "";
state.EditWorkId = null; state.EditWorkId = null;
state.beforeValue = null; //考勤 开始前
state.afterStartValue = null; //考勤 开始后
removePG(); removePG();
}; };
@@ -3634,14 +3766,18 @@ export default defineComponent({
let startTime, let startTime,
endTime = 0; endTime = 0;
if (state.xjkkinputV3) { if (state.xjkkinputV3) {
startTime = dayjs(state.xjkkinputV3[0]).format('YYYY-MM-DD HH:mm') //parseInt(state.xjkkinputV3[0].$d.getTime() / 1000); startTime = dayjs(state.xjkkinputV3[0]).format("YYYY-MM-DD HH:mm"); //parseInt(state.xjkkinputV3[0].$d.getTime() / 1000);
endTime = dayjs(state.xjkkinputV3[1]).format('YYYY-MM-DD HH:mm') //parseInt(state.xjkkinputV3[1].$d.getTime() / 1000); endTime = dayjs(state.xjkkinputV3[1]).format("YYYY-MM-DD HH:mm"); //parseInt(state.xjkkinputV3[1].$d.getTime() / 1000);
} }
const offName = await validateName({name: state.xjkkinputV1, type: 5, id: state.offcoursePlanId}).then(res => { const offName = await validateName({
name: state.xjkkinputV1,
type: 5,
id: state.offcoursePlanId,
}).then((res) => {
console.log(res, res.data.data); console.log(res, res.data.data);
return res.data.data === 1; return res.data.data === 1;
}); });
console.log('校验重复', offName) console.log("校验重复", offName);
if (offName) { if (offName) {
message.destroy(); message.destroy();
return message.warning("开课名称重复,请重新填写"); return message.warning("开课名称重复,请重新填写");
@@ -3668,7 +3804,9 @@ export default defineComponent({
teacherId: state.member.value, teacherId: state.member.value,
teacher: state.member.name, teacher: state.member.name,
workInfo: state.workInfo, //提交的作业信息 workInfo: state.workInfo, //提交的作业信息
examInfo: state.examInfo//提交的考试信息 examInfo: state.examInfo, //提交的考试信息
beforeStart: state.beforeValue, //考勤 开始前
afterStart: state.afterStartValue, //考勤 开始后
}; };
console.log(postData); console.log(postData);
const checkList = [ const checkList = [
@@ -3685,15 +3823,17 @@ export default defineComponent({
console.log("state.addLoading ", state.addLoading); console.log("state.addLoading ", state.addLoading);
} }
state.addLoading = true; state.addLoading = true;
editPlan(postData).then(() => { editPlan(postData)
.then(() => {
getTableDate3(); getTableDate3();
handleCancelStu(); handleCancelStu();
rest(); rest();
state.addLoading = false; state.addLoading = false;
}).catch(err => {
state.loading = false
console.log(err)
}) })
.catch((err) => {
state.loading = false;
console.log(err);
});
state.cstm_hs = false; state.cstm_hs = false;
}; };
@@ -3703,10 +3843,14 @@ export default defineComponent({
state.offcoursePlanId = item.id; state.offcoursePlanId = item.id;
if (item.homeWorkId) { if (item.homeWorkId) {
queryWorkDetailById({workId: item.homeWorkId}).then((res) => state.workInfo = res.data.data); queryWorkDetailById({ workId: item.homeWorkId }).then(
(res) => (state.workInfo = res.data.data)
);
} }
if (item.testId) { if (item.testId) {
queryExaminationDetailById({examinationId: item.testId}).then((res) => state.examInfo = res.data.data); queryExaminationDetailById({ examinationId: item.testId }).then(
(res) => (state.examInfo = res.data.data)
);
} }
console.log("获取面授课开课详情", item); console.log("获取面授课开课详情", item);
@@ -3737,21 +3881,13 @@ export default defineComponent({
state.EditTestId = Number(item.testId); state.EditTestId = Number(item.testId);
state.EditWorkId = String(item.homeWorkId); state.EditWorkId = String(item.homeWorkId);
state.xjkkinputV1 = item.name; state.xjkkinputV1 = item.name;
state.beforeValue = item.beforeStart; //考勤 开始前
state.afterStartValue = item.afterStart; //考勤 开始后
if (item.signFlag === 1) { if (item.signFlag === 1) {
//是否允许未报名的签到:1是0否 //是否允许未报名的签到:1是0否
state.xjkkradioV1 = 0; state.xjkkradioV1 = 0;
} }
/*
if (item.signWordFlag === 1) {
//签到是否需要口令:1是0否
state.xjkkradioV1 = 1;
}
if (item.signFlag === 0 && item.signWordFlag === 0) {
state.xjkkradioV1 = "";
}
*/
state.member = { value: item.teacherId, name: item.teacher }; state.member = { value: item.teacherId, name: item.teacher };
state.cstm_hs = true; state.cstm_hs = true;
state.kk_eidt = true; state.kk_eidt = true;
}; };
@@ -3836,13 +3972,17 @@ export default defineComponent({
state.graduate_hs = false; state.graduate_hs = false;
state.addLoading = false; state.addLoading = false;
}; };
const handleRejectExit = (itm, type) => { const handleRejectExit = (id, index, record) => {
if (type === "1") { dialog({
return; content: "确定撤回吗?",
} ok: () => {
state.offcourseId = itm.id; message.success("撤回成功");
state.delete_hs = true; record.auditStatus === 3
state.back_hs = true; ? (state.tableData1[index].auditStatus = 2)
: (state.tableData1[index].auditStatus = 0);
handle({ offcourseId: id, type: 0 });
},
});
}; };
const handleJoin = async () => { const handleJoin = async () => {
@@ -3952,7 +4092,9 @@ export default defineComponent({
} }
}); });
} else if (state.offcourseId) { } else if (state.offcourseId) {
handle({offcourseId: state.offcourseId, type: -1, handle({
offcourseId: state.offcourseId,
type: -1,
}).then((res) => { }).then((res) => {
if (res.data.code === 200) { if (res.data.code === 200) {
message.destroy(); message.destroy();
@@ -3966,39 +4108,47 @@ export default defineComponent({
if (state.copy_hs) { if (state.copy_hs) {
state.tableLoading = true; state.tableLoading = true;
if (state.offcourseId && state.offcoursePlanId) { if (state.offcourseId && state.offcoursePlanId) {
await copyCoursePlan({offcoursePlanId: state.offcoursePlanId}) await copyCoursePlan({ offcoursePlanId: state.offcoursePlanId });
getTableDate3(); getTableDate3();
} else if (state.offcourseId) { } else if (state.offcourseId) {
await copyCourse({courseId: state.offcourseId}) await copyCourse({ courseId: state.offcourseId });
getTableDate(); getTableDate();
} }
message.success("复制成功"); message.success("复制成功");
rest(); rest();
} }
if (state.nouse_hs) { if (state.nouse_hs) {
state.temp.auditStatus = 0 state.temp.auditStatus = 0;
message.success("停用成功"); message.success("停用成功");
handle({offcourseId: state.offcourseId, type: -2,}) handle({ offcourseId: state.offcourseId, type: -2 });
} }
if (state.submit_hs) { if (state.submit_hs) {
state.tableLoading = true; state.tableLoading = true;
message.success("提交审核成功"); message.success("提交审核成功");
handle({offcourseId: state.offcourseId, type: 1}).then(() => getTableDate()); handle({ offcourseId: state.offcourseId, type: 1 }).then(() =>
getTableDate()
);
} }
if (state.back_hs) { if (state.back_hs) {
state.tableLoading = true; state.tableLoading = true;
message.success("撤回成功"); message.success("撤回成功");
handle({offcourseId: state.offcourseId, type: 0}).then(() => getTableDate()); handle({ offcourseId: state.offcourseId, type: 0 }).then(() =>
getTableDate()
);
} }
if (state.useCourse) { if (state.useCourse) {
state.tableLoading = true; state.tableLoading = true;
message.success("启用成功"); message.success("启用成功");
handle({offcourseId: state.offcourseId, type: 2}).then(() => getTableDate()); handle({ offcourseId: state.offcourseId, type: 2 }).then(() =>
getTableDate()
);
} }
if (state.push_hs) { if (state.push_hs) {
state.tableLoading = true; state.tableLoading = true;
message.success("发布成功"); message.success("发布成功");
handle({offcourseId: state.offcourseId, type: 3}).then(() => getTableDate()); handle({ offcourseId: state.offcourseId, type: 3 }).then(() =>
getTableDate()
);
} }
delete_exit1(); delete_exit1();
}; };
@@ -4018,7 +4168,7 @@ export default defineComponent({
}; };
const openMessage = () => { const openMessage = () => {
console.log(122222) console.log(122222);
let startTime = ""; let startTime = "";
let endTime = ""; let endTime = "";
if (state.projectTime) { if (state.projectTime) {
@@ -4027,7 +4177,7 @@ export default defineComponent({
); );
endTime = parseInt(new Date(state.projectTime[1].$d).getTime() / 1000); endTime = parseInt(new Date(state.projectTime[1].$d).getTime() / 1000);
} }
console.log(startTime, endTime) console.log(startTime, endTime);
// list({ // list({
// pageNo: 1, // pageNo: 1,
@@ -4245,41 +4395,49 @@ export default defineComponent({
// // console.log(item); // // console.log(item);
// // }); // // });
// }; // };
const handleDelete = (item, type) => { const handleDelete = (id) => {
console.log(item); dialog({
if (type === "1") { content: "确定删除该课程吗?",
return; ok: async () => {
} message.success("删除成功");
state.offcourseId = item.id; state.tableLoading = true;
await handle({ offcourseId: id, type: -1 });
getTableDate();
},
});
};
const handleCopy = async (id) => {
dialog({
content: "确定复制该课程吗?",
ok: async () => {
message.success("复制成功");
state.tableLoading = true;
await copyCourse({ offcourseId: id });
getTableDate();
},
});
};
const handleSubmit = (id, index) => {
dialog({
content: "确定提交审核吗?",
ok: () => {
message.success("提交成功");
state.tableData1[index].auditStatus = 1;
handle({ offcourseId: id, type: 1 });
},
});
};
const handlePush = (id, index) => {
dialog({
content: "确定发布该课程吗?",
ok: () => {
message.success("发布成功");
state.tableData1[index].auditStatus = 3;
handle({ offcourseId: id, type: 3 });
},
});
};
state.delete_hs = true;
state.del_hs = true;
};
const handleCopy = async (itm, type) => {
if (type === "1") {
return;
}
state.offcourseId = itm.id;
state.delete_hs = true;
state.copy_hs = true;
};
const handleSubmit = async (itm, type) => {
if (type === "1") {
return;
}
state.offcourseId = itm.id;
state.submit_hs = true;
state.delete_hs = true;
};
const handlePush = async (itm, type) => {
if (type === "1") {
return;
}
state.offcourseId = itm.id;
state.push_hs = true;
state.delete_hs = true;
};
const handleCopyP = async (itm) => { const handleCopyP = async (itm) => {
console.log(itm); console.log(itm);
state.offcourseId = itm.offcourseId; state.offcourseId = itm.offcourseId;
@@ -4288,23 +4446,25 @@ export default defineComponent({
state.delete_hs = true; state.delete_hs = true;
state.copy_hs = true; state.copy_hs = true;
}; };
const handleStop = (itm, type) => { const handleStop = (id, index) => {
console.log(itm); dialog({
if (type === "1") { content: "确定停用该课程吗?",
return; ok: () => {
} message.success("停用成功");
state.temp = itm; state.tableData1[index].status = 0;
state.offcourseId = itm.id; handle({ offcourseId: id, type: -2 });
state.delete_hs = true; },
state.nouse_hs = true; });
}; };
const handleOpen = async (itm, type) => { const handleOpen = async (id, index) => {
if (type === "1") { dialog({
return; content: "确定起用该课程吗?",
} ok: () => {
state.offcourseId = itm.id; message.success("起用成功");
state.useCourse = true; state.tableData1[index].status = 1;
state.delete_hs = true; handle({ offcourseId: id, type: 2 });
},
});
}; };
const handleStart = (item, type) => { const handleStart = (item, type) => {
console.log(item); console.log(item);
@@ -4647,7 +4807,9 @@ export default defineComponent({
name: record.name ? record.name : "", name: record.name ? record.name : "",
url: url:
type == 1 type == 1
? window.location.protocol + process.env.VUE_APP_COURSE_STUDY + record.offcourseId ? window.location.protocol +
process.env.VUE_APP_COURSE_STUDY +
record.offcourseId
: process.env.VUE_APP_BASE_API + : process.env.VUE_APP_BASE_API +
`/admin/student/studentSign?taskId=${ `/admin/student/studentSign?taskId=${
record.id record.id
@@ -4781,18 +4943,15 @@ export default defineComponent({
handelChangePageTea2, handelChangePageTea2,
submitReview, submitReview,
reviewClick, reviewClick,
showPrower, showPrower,
showOwnPrower, showOwnPrower,
showViewPrower, showViewPrower,
showManagePrower, showManagePrower,
closeOnlineCoursevisible, closeOnlineCoursevisible,
handlelookMs, handlelookMs,
handleLook, handleLook,
logW, logW,
logT, logT,
qrcodeVisible, qrcodeVisible,
}; };
}, },
@@ -6537,7 +6696,9 @@ export default defineComponent({
} }
.ant-table-tbody .ant-table-tbody
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > tr:hover:not(.ant-table-expanded-row):not(
.ant-table-row-selected
)
> td { > td {
background: #f6f9fd; background: #f6f9fd;
} }
@@ -6838,7 +6999,9 @@ export default defineComponent({
} }
.ant-table-tbody .ant-table-tbody
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > tr:hover:not(.ant-table-expanded-row):not(
.ant-table-row-selected
)
> td { > td {
background: #f6f9fd; background: #f6f9fd;
} }
@@ -6963,7 +7126,9 @@ export default defineComponent({
} }
.ant-table-tbody .ant-table-tbody
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > tr:hover:not(.ant-table-expanded-row):not(
.ant-table-row-selected
)
> td { > td {
background: #f6f9fd; background: #f6f9fd;
} }

View File

@@ -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,11 +465,12 @@ 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"
} }
@@ -342,6 +479,8 @@ export default defineComponent({
filterTxt, filterTxt,
openDown, openDown,
handleCancel, handleCancel,
jobType,
bandList,
}; };
}, },
}); });

View File

@@ -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 = () => {

View File

@@ -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"
/> />
<!-- 时间管理抽屉 --> <!-- 时间管理抽屉 -->

View File

@@ -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({})
@@ -513,23 +422,20 @@ const editChapter = () => {
formValue.value = {draftTaskList: []} formValue.value = {draftTaskList: []}
closeModal() closeModal()
}; };
//打开删除关卡弹窗
const showDeleteChapter = () => {
deleteChapterModal.value = true;
};
//关闭删除关卡弹窗
const closeDeleteChapter = () => {
deleteChapterModal.value = false;
};
//删除关卡 //删除关卡
const deleteChapter = () => { const deleteChapter = () => {
dialog({
content: '确定要删除关卡吗?',
ok: () => {
if (routerInfo.value.chapterList.length === 1) { if (routerInfo.value.chapterList.length === 1) {
message.warning("至少保留一个关卡"); message.warning("至少保留一个关卡");
return return
} }
routerInfo.value.chapterList.splice(activeIndex.value, 1); 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); activeIndex.value && (activeIndex.value = activeIndex.value - 1);
deleteChapterModal.value = false; 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: '确定要删除所选任务吗?',
const closedeleteAll = () => { ok: () => {
deleteAll.value = false for (let i = 0; i < routerInfo.value.chapterList[activeIndex.value].draftTaskList.length; i++) {
}; const t = routerInfo.value.chapterList[activeIndex.value].draftTaskList[i]
const subdeleteAll = () => { if (t.checked) {
routerInfo.value.chapterList[activeIndex.value].draftTaskList.filter(t => t.checked).forEach(t => { if (t.id) {
t.checked = false; t.checked = false;
t.deleted = true; t.deleted = true;
}) } else {
closedeleteAll() routerInfo.value.chapterList[activeIndex.value].draftTaskList.splice(i, 1);
}; i--;
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>

View File

@@ -6,7 +6,7 @@
<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,7 +14,8 @@
</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"
v-if="JSON.stringify(projectInfo.stageList[0].taskDraftDtoList[0]) != '{}'">
<template #item="{ element,index }"> <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' : ''"
@@ -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">
@@ -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>
@@ -257,13 +258,7 @@
" @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,16 +274,17 @@
</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>
<div style="height:80px;width:100%;"/>
</div>
<!-- 添加阶段弹窗 -->
<a-modal v-model:visible="stage" :title="null" @ok="closeModal" :footer="null" :closable="false" <a-modal v-model:visible="stage" :title="null" @ok="closeModal" :footer="null" :closable="false"
wrapClassName="addstage" width="624px" height="388px" :centered="true" @cancel="closeModal"> wrapClassName="addstage" width="624px" height="388px" :centered="true" @cancel="closeModal">
<div class="modalHeader" style=" <div class="modalHeader" style="
@@ -359,105 +355,6 @@
</div> </div>
</div> </div>
</a-modal> </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>
</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">
@@ -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) {
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.checked = false;
t.deleted = true; t.deleted = true;
}) } else {
deAll.value = false; 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)
}
projectInfo.value.stageList.splice(activeIndex.value, 1);
activeIndex.value && (activeIndex.value = 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: () => {
message.success("删除成功");
projectInfo.value.stageList.forEach((t, i) => {
if (t.id) {
t.checked = false; t.checked = false;
t.deleted = true; t.deleted = true;
} else {
projectInfo.value.stageList.splice(i, 1)
} }
}) })
cancelModal.value = false; },
});
}; };
//全选任务或全不选任务 //全选任务或全不选任务
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