mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 11:56:46 +08:00
-- 批量跳转关卡
This commit is contained in:
@@ -132,6 +132,7 @@ export const addStudentCourse = (obj) => http.post("/admin/offcourse/addStudent"
|
|||||||
// 获取组织结构树
|
// 获取组织结构树
|
||||||
export const orgtree = () => http.get("/org/tree");
|
export const orgtree = () => http.get("/org/tree");
|
||||||
export const saveStu = obj => http.post("/admin/student/addStudent", obj);
|
export const saveStu = obj => http.post("/admin/student/addStudent", obj);
|
||||||
|
export const moveStudent = obj => http.post("/admin/student/moveStudent", obj);
|
||||||
export const getStuPage = obj => http.get("/admin/student/getStudent", {params: obj});
|
export const getStuPage = obj => http.get("/admin/student/getStudent", {params: obj});
|
||||||
export const delStudentList = obj => http.post("/admin/student/delStudent", obj);
|
export const delStudentList = obj => http.post("/admin/student/delStudent", obj);
|
||||||
export const validateName = obj => http.post("/admin/validate/validateName", obj);
|
export const validateName = obj => http.post("/admin/validate/validateName", obj);
|
||||||
|
|||||||
@@ -8,12 +8,12 @@
|
|||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<a-modal
|
<a-modal
|
||||||
style="padding: 0"
|
style="padding: 0"
|
||||||
:closable="sh"
|
:closable="true"
|
||||||
:visible="visiblene"
|
:visible="visiblene"
|
||||||
:footer="null"
|
:footer="null"
|
||||||
centered="true"
|
centered="true"
|
||||||
wrapClassName="changeModal"
|
wrapClassName="changeModal"
|
||||||
>
|
>
|
||||||
<div class="con">
|
<div class="con">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
@@ -28,27 +28,25 @@
|
|||||||
<!-- <div class="cur">当前关卡:关卡2</div> -->
|
<!-- <div class="cur">当前关卡:关卡2</div> -->
|
||||||
<div class="select">
|
<div class="select">
|
||||||
<a-select
|
<a-select
|
||||||
v-model:value="curLevel"
|
v-model:value="selectStage"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请选择关卡"
|
placeholder="请选择关卡"
|
||||||
:options="projectNameList4"
|
:options="option"
|
||||||
@change="selectProjectName4"
|
allowClear
|
||||||
allowClear
|
|
||||||
showSearch
|
|
||||||
></a-select>
|
></a-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
<button
|
<button
|
||||||
class="sameb btn1"
|
class="sameb btn1"
|
||||||
@click="closeChangeModal"
|
@click="closeChangeModal"
|
||||||
style="cursor: pointer"
|
style="cursor: pointer"
|
||||||
>
|
>
|
||||||
取消
|
取消
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="sameb btn2"
|
class="sameb btn2"
|
||||||
@click="changelevel"
|
@click="changelevel"
|
||||||
style="cursor: pointer"
|
style="cursor: pointer"
|
||||||
>
|
>
|
||||||
确定
|
确定
|
||||||
</button>
|
</button>
|
||||||
@@ -58,28 +56,47 @@
|
|||||||
</div>
|
</div>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script setup>
|
||||||
export default {
|
import {computed, defineEmits, defineProps, ref} from "vue";
|
||||||
name: "ChangeLevelModal",
|
import {moveStudent} from "@/api/index1";
|
||||||
props: {
|
import {message} from "ant-design-vue";
|
||||||
visiblene: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
setup(props, ctx) {
|
|
||||||
const closeChangeModal = () => {
|
|
||||||
ctx.emit("update:visiblene", false);
|
|
||||||
};
|
|
||||||
const changelevel = () => {
|
|
||||||
console.log("点击调整关卡");
|
|
||||||
};
|
|
||||||
//获取关卡列表
|
|
||||||
|
|
||||||
return {
|
const props = defineProps({
|
||||||
closeChangeModal,
|
visiblene: {
|
||||||
changelevel,
|
type: Boolean,
|
||||||
};
|
default: false,
|
||||||
},
|
},
|
||||||
|
stage: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
|
ids: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const option = computed(() => {
|
||||||
|
return props.stage.map(e => ({label: e.name, value: e.id}))
|
||||||
|
})
|
||||||
|
|
||||||
|
const selectStage = ref()
|
||||||
|
|
||||||
|
const emit = defineEmits({})
|
||||||
|
|
||||||
|
const closeChangeModal = () => {
|
||||||
|
emit("update:visiblene", false);
|
||||||
};
|
};
|
||||||
|
const changelevel = () => {
|
||||||
|
if(!selectStage.value){
|
||||||
|
message.error("请选择关卡")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
emit("update:visiblene", false);
|
||||||
|
emit('finash', false)
|
||||||
|
moveStudent({targetId: selectStage.value, ids: props.ids}).then(()=>{
|
||||||
|
emit('finash', true)
|
||||||
|
})
|
||||||
|
};
|
||||||
|
//获取关卡列表
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
批量删除
|
批量删除
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="1.5" v-if="type == 2">
|
<a-col :span="1.5" v-if="type === 2">
|
||||||
<a-button class="cus-btn white" @click="showChangeModal">
|
<a-button class="cus-btn white" @click="showChangeModal">
|
||||||
<template #icon></template>
|
<template #icon></template>
|
||||||
批量调整关卡
|
批量调整关卡
|
||||||
@@ -109,7 +109,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 批量调整关卡弹窗 -->
|
<!-- 批量调整关卡弹窗 -->
|
||||||
<ChangeLevelModal v-model:visiblene="visiblene" />
|
<ChangeLevelModal v-model:visiblene="visiblene" :stage="stage" :ids="stuSelectKeys" @finash="submitCall"/>
|
||||||
<!-- 批量调整关卡弹窗 -->
|
<!-- 批量调整关卡弹窗 -->
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
@@ -117,6 +117,7 @@ import { computed, defineProps, onMounted, ref, watch } from "vue";
|
|||||||
import { delStudentList, getStuPage } from "@/api/index1";
|
import { delStudentList, getStuPage } from "@/api/index1";
|
||||||
import CommonStudent from "@/components/student/CommonStudent";
|
import CommonStudent from "@/components/student/CommonStudent";
|
||||||
import ChangeLevelModal from "./ChangeLevelModal.vue";
|
import ChangeLevelModal from "./ChangeLevelModal.vue";
|
||||||
|
import {message} from "ant-design-vue";
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
type: Number,
|
type: Number,
|
||||||
id: String,
|
id: String,
|
||||||
@@ -261,6 +262,10 @@ function submitCall(flag) {
|
|||||||
//调整关卡
|
//调整关卡
|
||||||
const visiblene = ref(false);
|
const visiblene = ref(false);
|
||||||
const showChangeModal = () => {
|
const showChangeModal = () => {
|
||||||
|
if(!stuSelectKeys.value.length){
|
||||||
|
message.error("请选择学员")
|
||||||
|
return
|
||||||
|
}
|
||||||
visiblene.value = true;
|
visiblene.value = true;
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@@ -274,4 +279,27 @@ const showChangeModal = () => {
|
|||||||
border-right: 1px solid #e9e9e9;
|
border-right: 1px solid #e9e9e9;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
.cus-btn {
|
||||||
|
width: 100%;
|
||||||
|
height: 40px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-right: 16px;
|
||||||
|
border: 1px solid #4ea6ff;
|
||||||
|
border-radius: 8px;
|
||||||
|
background: #4ea6ff;
|
||||||
|
cursor: pointer;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.white {
|
||||||
|
background: #fff;
|
||||||
|
color: #4ea6ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cus-input {
|
||||||
|
height: 40px;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user