mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-15 05:46:45 +08:00
feat:增加学习路径图-学员管理-列表操作-查看、调整、导出
This commit is contained in:
@@ -525,12 +525,13 @@
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="3" tab="学员管理" force-render>
|
||||
<TableStudent
|
||||
v-if="isreload"
|
||||
:type="2"
|
||||
:id="routerId"
|
||||
:stage="stage"
|
||||
:columns="tableDataFunc()"
|
||||
>
|
||||
<!-- <template #extension="{ data: { record } }">
|
||||
<template #extension="{ data: { record } }">
|
||||
<div style="display: flex">
|
||||
<div
|
||||
@click="showStudent(record)"
|
||||
@@ -557,7 +558,43 @@
|
||||
调整
|
||||
</div>
|
||||
</div>
|
||||
</template> -->
|
||||
</template>
|
||||
</TableStudent>
|
||||
<TableStudent
|
||||
v-else
|
||||
:type="2"
|
||||
:id="routerId"
|
||||
:stage="stage"
|
||||
:columns="tableDataFunc()"
|
||||
>
|
||||
<template #extension="{ data: { record } }">
|
||||
<div style="display: flex">
|
||||
<div
|
||||
@click="showStudent(record)"
|
||||
style="
|
||||
color: #4ea6ff;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
margin-left: 20px;
|
||||
cursor: pointer;
|
||||
"
|
||||
>
|
||||
查看
|
||||
</div>
|
||||
<div
|
||||
@click="setLevels(record)"
|
||||
style="
|
||||
color: #4ea6ff;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
margin-left: 20px;
|
||||
cursor: pointer;
|
||||
"
|
||||
>
|
||||
调整
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</TableStudent>
|
||||
</a-tab-pane>
|
||||
<!-- 1211注释 待开放 -->
|
||||
@@ -861,21 +898,21 @@
|
||||
</div>
|
||||
<div class="mid">
|
||||
<div class="inher">
|
||||
<div class="cur">当前关卡:关卡2</div>
|
||||
<div class="cur">当前关卡:{{ curLevelName }}</div>
|
||||
<div class="select">
|
||||
<a-select
|
||||
v-model:value="curLevel"
|
||||
style="width: 100%"
|
||||
placeholder="请选择关卡"
|
||||
:options="projectNameList4"
|
||||
:options="statess"
|
||||
@change="selectProjectName4"
|
||||
allowClear
|
||||
showSearch
|
||||
></a-select>
|
||||
</div>
|
||||
<div class="btn">
|
||||
<button class="sameb btn1">取消</button>
|
||||
<button class="sameb btn2">确定</button>
|
||||
<button class="sameb btn1" style="cursor:pointer;" @click="closeChangeModal">取消</button>
|
||||
<button class="sameb btn2" style="cursor:pointer;" @click="changeLevel">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1019,6 +1056,7 @@
|
||||
<!-- 学员管理查看抽屉 -->
|
||||
<check-stu
|
||||
v-model:CheckStuvisible="CheckStuvisible"
|
||||
v-model:routerId="routerId"
|
||||
v-model:studentId="studentId"
|
||||
/>
|
||||
<!-- 面授学员抽屉 -->
|
||||
@@ -1269,7 +1307,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { ref, reactive, toRefs, onMounted, createVNode, watch } from "vue";
|
||||
import { ref, reactive, toRefs, onMounted, createVNode, watch, defineEmits } from "vue";
|
||||
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
|
||||
import { message, Modal } from "ant-design-vue";
|
||||
// import PathAddStu from "../../components/drawers/pathStuAdd";
|
||||
@@ -1295,13 +1333,14 @@ import { codeUrl } from "../../api/method";
|
||||
import TwoDimensionalCode from "../../components/TwoDimensionalCode.vue";
|
||||
import TableStudent from "@/components/student/TableStudent";
|
||||
// import * as student from "@/api/student";
|
||||
import { getStuPage } from "@/api/index1";
|
||||
import { getStuPage, moveStudent } from "@/api/index1";
|
||||
|
||||
import RouterFaceTeachManage from "../../components/drawers/router/RouterFaceTeachManage";
|
||||
import RouterExaminationManage from "../../components/drawers/router/RouterExaminationManage";
|
||||
import RouterEvaluationManage from "../../components/drawers/router/RouterEvaluationManage";
|
||||
import RouterHomeworkManage from "../../components/drawers/router/RouterHomeworkManage";
|
||||
import RouterCommonManage from "../../components/drawers/router/RouterCommonManage";
|
||||
import { func } from "vue-types";
|
||||
|
||||
export default {
|
||||
name: "LevelAdd",
|
||||
@@ -1331,6 +1370,7 @@ export default {
|
||||
// const store = useStore();
|
||||
const state = reactive({
|
||||
stage: [],
|
||||
statess: [],
|
||||
routerId: storage.get("routerId")
|
||||
? JSON.parse(storage.get("routerId"))
|
||||
: null, //学习路径页面传的学习路径id
|
||||
@@ -1434,7 +1474,9 @@ export default {
|
||||
sh: false,
|
||||
nodata: true,
|
||||
closeDeleteAll: false,
|
||||
curLevel: "",
|
||||
curLevel: undefined,
|
||||
curLevelName: "",
|
||||
curStuID:"",
|
||||
taskSyllabusActive: 0,
|
||||
//在线管理等页面传递参数
|
||||
showTimeText: "",
|
||||
@@ -1516,6 +1558,7 @@ export default {
|
||||
location.href.indexOf("http://") !== -1
|
||||
? "http://111.231.196.214:12016/"
|
||||
: location.href.slice(0, location.href.indexOf("/m")) + "/upload/",
|
||||
isreload: true
|
||||
});
|
||||
|
||||
const levelList = reactive({
|
||||
@@ -1691,6 +1734,9 @@ export default {
|
||||
state.visible = true;
|
||||
};
|
||||
const closeChangeModal = () => {
|
||||
state.curLevel = undefined;
|
||||
state.curStuID = "";
|
||||
state.curLevelName = "";
|
||||
state.visiblene = false;
|
||||
};
|
||||
const showAddStu = () => {
|
||||
@@ -2146,6 +2192,10 @@ export default {
|
||||
id: e.chapterId,
|
||||
name: e.name,
|
||||
}));
|
||||
state.statess = res.data.data.chapterList.map((e) => ({
|
||||
value: e.chapterId,
|
||||
label: e.name,
|
||||
}));
|
||||
state.taskSyllabus = data;
|
||||
// for(let i in data) {
|
||||
// state.taskSyllabus[i].name = data[i].name
|
||||
@@ -2483,16 +2533,52 @@ export default {
|
||||
// 点击学员管理-查看学员操作
|
||||
function showStudent(record) {
|
||||
console.log(record)
|
||||
state.Seevisible = true;
|
||||
state.checkStuId = record.studentId;
|
||||
state.CheckStuvisible = true;
|
||||
state.studentId = record.studentId;
|
||||
}
|
||||
|
||||
// 调整关卡
|
||||
function setLevels(record) {
|
||||
console.log(record)
|
||||
state.curLevelName = record.currentStageName;
|
||||
state.curStuID = record.id;
|
||||
state.visiblene = true;
|
||||
}
|
||||
|
||||
// 选择要调整的关卡
|
||||
function selectProjectName4(e){
|
||||
console.log(e)
|
||||
state.curLevel = e;
|
||||
}
|
||||
|
||||
// 点击确定 调整关卡
|
||||
function changeLevel() {
|
||||
state.isreload = false;
|
||||
if(!state.curLevel){
|
||||
message.error("请选择关卡")
|
||||
return
|
||||
}
|
||||
moveStudent({targetId: state.curLevel, ids: [state.curStuID]}).then(res => {
|
||||
console.log(res)
|
||||
state.visiblene = false;
|
||||
message.destroy();
|
||||
state.isreload = true;
|
||||
message.success("调整关卡成功")
|
||||
state.curLevel = undefined;
|
||||
state.curStuID = "";
|
||||
state.curLevelName = "";
|
||||
getStudent();
|
||||
}).catch(err=>{
|
||||
console.log(err)
|
||||
state.visiblene = false;
|
||||
message.error("调整关卡失败");
|
||||
state.isreload = true;
|
||||
state.curLevel = undefined;
|
||||
state.curStuID = "";
|
||||
state.curLevelName = "";
|
||||
})
|
||||
}
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
...toRefs(levelList),
|
||||
@@ -2561,6 +2647,8 @@ export default {
|
||||
downloadFile,
|
||||
showStudent,
|
||||
setLevels,
|
||||
selectProjectName4,
|
||||
changeLevel
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user