mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-15 13:56:45 +08:00
fix:学员查看,模板和学员搜索·重置,添加考试样式,
This commit is contained in:
@@ -560,14 +560,14 @@
|
||||
style="width: 270px; height: 40px; border-radius: 8px"
|
||||
placeholder="关卡名称"
|
||||
/>
|
||||
<div class="btns">
|
||||
<div class="btns" @click="searchLevel" >
|
||||
<div class="btn btn1">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">搜索</div>
|
||||
<a-button class="btnText" style="border:none;background:none;transform: translateY(-20%);" >搜索</a-button>
|
||||
</div>
|
||||
<div class="btn btn2">
|
||||
<div class="btn btn2" @click="resetLevel">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">重置</div>
|
||||
<a-button style="border:none;background:none; transform: translateY(-20%);width:100%;" class="btnText" >重置</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -821,6 +821,13 @@
|
||||
</div>
|
||||
</div></a-modal
|
||||
>
|
||||
|
||||
<!-- 查看学员 传入查看学员的id-->
|
||||
<see-stu
|
||||
v-model:Seevisible="Seevisible"
|
||||
v-model:checkStuId="checkStuId"
|
||||
v-model:projectId="projectId"
|
||||
/>
|
||||
|
||||
<!-- 批量删除学员弹窗 -->
|
||||
<a-modal
|
||||
@@ -1146,14 +1153,15 @@ import TimeManage from "../../components/drawers/TimeManage";
|
||||
import TestManage from "../../components/drawers/TestManage";
|
||||
import FaceManage from "../../components/drawers/FaceManage";
|
||||
import WorkManage from "../../components/drawers/WorkManage";
|
||||
import SeeStu from "../../components/drawers/SeeStu";
|
||||
// import { useRoute } from "vue-router";
|
||||
// import { useStore } from "vuex";
|
||||
import { storage } from "../../api/storage";
|
||||
import { getRouterOverview } from "@/api/indexLearningPath";
|
||||
import { handleLearnPath } from "../../api/index1";
|
||||
import { GetRouterDetail } from "@/api/indexTask";
|
||||
import * as api from "../../api/index1";
|
||||
import { toDate } from "../../api/method";
|
||||
import { handleLearnPath } from "../../api/index1";
|
||||
|
||||
export default {
|
||||
name: "LevelAdd",
|
||||
@@ -1167,6 +1175,7 @@ export default {
|
||||
TestManage,
|
||||
FaceManage,
|
||||
WorkManage,
|
||||
SeeStu
|
||||
},
|
||||
methods: {},
|
||||
setup() {
|
||||
@@ -1178,6 +1187,16 @@ export default {
|
||||
: null, //学习路径页面传的学习路径id
|
||||
gatename: null, //关卡名称
|
||||
gatenamee: null, //学员管理关卡名称
|
||||
action: null,
|
||||
act: null,
|
||||
pub: false, //发布弹窗
|
||||
backModal: false, //撤回弹窗
|
||||
dcopyModal: false, //复制弹窗
|
||||
closeBack: false,
|
||||
routeStudentsNum: null,
|
||||
dcloseCopy: false,
|
||||
dicloseCopy: false,
|
||||
stopModal: false, //结束弹窗
|
||||
deleteAll: false, //批量删除学员弹窗
|
||||
Stuvisible: false, //添加学员抽屉
|
||||
AddImpStuvisible: false, //导入学员抽屉
|
||||
@@ -1187,14 +1206,14 @@ export default {
|
||||
twobtn: true,
|
||||
number: true,
|
||||
twobtnn: false,
|
||||
Seevisible:false,
|
||||
checkStuId:null,
|
||||
inputbox: false,
|
||||
Wvisible: false, //作业管理
|
||||
studentId: null,
|
||||
styTitle: null,
|
||||
cretime: null,
|
||||
picUrl: null,
|
||||
action: null,
|
||||
act: null,
|
||||
// 共享文档列表
|
||||
docList: [
|
||||
{
|
||||
@@ -1260,14 +1279,6 @@ export default {
|
||||
visible: false, //时间管理
|
||||
TMvisible: false, //考试管理
|
||||
FaceVisivle: false, //面授管理
|
||||
pub: false, //发布弹窗
|
||||
backModal: false, //撤回弹窗
|
||||
dcopyModal: false, //复制弹窗
|
||||
closeBack: false,
|
||||
routeStudentsNum: null,
|
||||
dcloseCopy: false,
|
||||
dicloseCopy: false,
|
||||
stopModal: false, //结束弹窗
|
||||
//关卡的数据
|
||||
level: [
|
||||
// {
|
||||
@@ -1412,6 +1423,7 @@ export default {
|
||||
<span
|
||||
onClick={() => {
|
||||
showCheckStu(text.record.studentId);
|
||||
state.Seevisible = true;
|
||||
}}
|
||||
style="color:#4EA6FF;margin-right:25px;cursor:pointer"
|
||||
>
|
||||
@@ -1610,89 +1622,6 @@ export default {
|
||||
getOverview();
|
||||
reget();
|
||||
});
|
||||
|
||||
// 获取项目概览
|
||||
const getOverview = () => {
|
||||
getRouterOverview(state.routerId)
|
||||
.then((res) => {
|
||||
Object.keys(res.data.data.routerInfoOverview).forEach((item) => {
|
||||
levelList.routerInfoOverview[item] =
|
||||
res.data.data.routerInfoOverview[item] || 0;
|
||||
});
|
||||
Object.keys(res.data.data.chapterOverviewList).forEach((item) => {
|
||||
levelList.chapterOverviewList[item] =
|
||||
res.data.data.chapterOverviewList[item] || 0;
|
||||
});
|
||||
// res.data.data.routerInfoOverview.forEach((r) => {
|
||||
// console.log(r)
|
||||
// })
|
||||
state.addLoading = false;
|
||||
console.log("项目概览--" + res);
|
||||
})
|
||||
.catch((err) => {
|
||||
state.addLoading = false;
|
||||
message.error("概览获取失败");
|
||||
console.log("获取失败" + err);
|
||||
});
|
||||
};
|
||||
// 获取路径列表
|
||||
const myGetRouterDetail = () => {
|
||||
GetRouterDetail(state.routerId)
|
||||
.then((res) => {
|
||||
let data = res.data.data.chapterList;
|
||||
|
||||
state.taskSyllabus = data;
|
||||
// for(let i in data) {
|
||||
// state.taskSyllabus[i].name = data[i].name
|
||||
// if(data[i].taskList.length > 0) {
|
||||
// for(let j in data[i].taskList) {
|
||||
// Object.keys(data[i].taskList[j]).forEach(item => {
|
||||
// state.taskSyllabus[i].taskList[j][item] = data[i].taskList[j][item] || 0
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
|
||||
// }
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
message.error("获取路径列表失败" + err);
|
||||
});
|
||||
};
|
||||
|
||||
const handleChange = (info) => {
|
||||
if (info.file.status !== "uploading") {
|
||||
console.log(info.file, info.fileList);
|
||||
}
|
||||
|
||||
if (info.file.status === "done") {
|
||||
message.success(`${info.file.name} 文件上传成功`);
|
||||
} else if (info.file.status === "error") {
|
||||
message.error(`${info.file.name} 文件上传失败.`);
|
||||
}
|
||||
};
|
||||
|
||||
const delConfirm = (id) => {
|
||||
Modal.confirm({
|
||||
title: "是否确认删除",
|
||||
icon: createVNode(ExclamationCircleOutlined),
|
||||
content: "",
|
||||
okText: "确认",
|
||||
cancelText: "取消",
|
||||
onOk() {
|
||||
api
|
||||
.delStudent({ routerId: 100, studentIds: [id] })
|
||||
.then((res) => {
|
||||
message.success("删除成功");
|
||||
console.log(res);
|
||||
})
|
||||
.catch((err) => {
|
||||
message.error("删除失败" + err);
|
||||
console.log(err);
|
||||
});
|
||||
},
|
||||
});
|
||||
};
|
||||
const closePub = () => {
|
||||
state.pub = false;
|
||||
};
|
||||
@@ -1850,7 +1779,96 @@ export default {
|
||||
: "-";
|
||||
});
|
||||
};
|
||||
// 获取项目概览
|
||||
const getOverview = () => {
|
||||
getRouterOverview(state.routerId)
|
||||
.then((res) => {
|
||||
Object.keys(res.data.data.routerInfoOverview).forEach((item) => {
|
||||
levelList.routerInfoOverview[item] =
|
||||
res.data.data.routerInfoOverview[item] || 0;
|
||||
});
|
||||
Object.keys(res.data.data.chapterOverviewList).forEach((item) => {
|
||||
levelList.chapterOverviewList[item] =
|
||||
res.data.data.chapterOverviewList[item] || 0;
|
||||
});
|
||||
// res.data.data.routerInfoOverview.forEach((r) => {
|
||||
// console.log(r)
|
||||
// })
|
||||
state.addLoading = false;
|
||||
console.log("项目概览--" + res);
|
||||
})
|
||||
.catch((err) => {
|
||||
state.addLoading = false;
|
||||
message.error("概览获取失败");
|
||||
console.log("获取失败" + err);
|
||||
});
|
||||
};
|
||||
// 获取路径列表
|
||||
const myGetRouterDetail = () => {
|
||||
GetRouterDetail(state.routerId)
|
||||
.then((res) => {
|
||||
let data = res.data.data.chapterList;
|
||||
|
||||
state.taskSyllabus = data;
|
||||
// for(let i in data) {
|
||||
// state.taskSyllabus[i].name = data[i].name
|
||||
// if(data[i].taskList.length > 0) {
|
||||
// for(let j in data[i].taskList) {
|
||||
// Object.keys(data[i].taskList[j]).forEach(item => {
|
||||
// state.taskSyllabus[i].taskList[j][item] = data[i].taskList[j][item] || 0
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
|
||||
// }
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
message.error("获取路径列表失败" + err);
|
||||
});
|
||||
};
|
||||
|
||||
const handleChange = (info) => {
|
||||
if (info.file.status !== "uploading") {
|
||||
console.log(info.file, info.fileList);
|
||||
}
|
||||
|
||||
if (info.file.status === "done") {
|
||||
message.success(`${info.file.name} 文件上传成功`);
|
||||
} else if (info.file.status === "error") {
|
||||
message.error(`${info.file.name} 文件上传失败.`);
|
||||
}
|
||||
};
|
||||
|
||||
const delConfirm = (id) => {
|
||||
Modal.confirm({
|
||||
title: "是否确认删除",
|
||||
icon: createVNode(ExclamationCircleOutlined),
|
||||
content: "",
|
||||
okText: "确认",
|
||||
cancelText: "取消",
|
||||
onOk() {
|
||||
api
|
||||
.delStudent({ routerId: 100, studentIds: [id] })
|
||||
.then((res) => {
|
||||
message.success("删除成功");
|
||||
console.log(res);
|
||||
})
|
||||
.catch((err) => {
|
||||
message.error("删除失败" + err);
|
||||
console.log(err);
|
||||
});
|
||||
},
|
||||
});
|
||||
};
|
||||
const searchLevel = () => {
|
||||
const result = state.tableData.filter(item => item.cur == state.gatenamee)
|
||||
state.tableData = result;
|
||||
};
|
||||
const resetLevel = () => {
|
||||
state.gatenamee = '';
|
||||
getStudent();
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
...toRefs(levelList),
|
||||
@@ -1881,6 +1899,8 @@ export default {
|
||||
checkType,
|
||||
handleChange,
|
||||
delConfirm,
|
||||
searchLevel,
|
||||
resetLevel,
|
||||
closePub,
|
||||
releaseLearnPath,
|
||||
showPub,
|
||||
@@ -1899,12 +1919,6 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
content: " ";
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
.pub {
|
||||
.ant-modal {
|
||||
.ant-modal-body {
|
||||
@@ -2041,6 +2055,12 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
content: " ";
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
.CopyModal {
|
||||
.ant-modal {
|
||||
width: 424px !important;
|
||||
|
||||
Reference in New Issue
Block a user