mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-17 06:46:46 +08:00
换组下拉框
This commit is contained in:
@@ -59,6 +59,7 @@ const props = defineProps({
|
|||||||
});
|
});
|
||||||
|
|
||||||
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,
|
||||||
|
|||||||
@@ -758,10 +758,9 @@ const submitAuth = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function handleStageOk() {
|
function handleStageOk() {
|
||||||
debugger
|
|
||||||
// 判断添加人数是否已超过限制人数 限制 = 本次添加的人 + 原有的人
|
// 判断添加人数是否已超过限制人数 限制 = 本次添加的人 + 原有的人
|
||||||
if (props.type === 1) {
|
if (props.type === 1) {
|
||||||
if (props.groupMemberCount < selectsData.value.studentList.length + props.groupMemberNumber) {
|
if (props.groupMemberCount < selectsData.value.projectMemberList.length + Number(props.groupMemberNumber)) {
|
||||||
return message.warning("添加小组学员超过最大值");
|
return message.warning("添加小组学员超过最大值");
|
||||||
}
|
}
|
||||||
// 判断是否是组长,组长不能添加
|
// 判断是否是组长,组长不能添加
|
||||||
|
|||||||
@@ -3212,6 +3212,7 @@ export default {
|
|||||||
state.total = res.data.data.total;
|
state.total = res.data.data.total;
|
||||||
let arr = res.data.data.rows;
|
let arr = res.data.data.rows;
|
||||||
getTableDataList(arr);
|
getTableDataList(arr);
|
||||||
|
//
|
||||||
state.loading = false;
|
state.loading = false;
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
@@ -3285,7 +3286,10 @@ export default {
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
projectId: state.projectId,
|
projectId: state.projectId,
|
||||||
};
|
};
|
||||||
getGroupList(objf).then((res) => { state.groupPageList = res.data.data.rows })
|
getGroupList(objf).then((res) => {
|
||||||
|
state.groupPageList = res.data.data.rows;
|
||||||
|
setGroupList(res.data.data.rows)
|
||||||
|
})
|
||||||
};
|
};
|
||||||
//删除小组
|
//删除小组
|
||||||
const deleteGroupBtn = (projectGroupId) => {
|
const deleteGroupBtn = (projectGroupId) => {
|
||||||
@@ -3298,13 +3302,17 @@ export default {
|
|||||||
const createGroup = async () => {
|
const createGroup = async () => {
|
||||||
console.log("state.groupPageList" + state.groupPageList)
|
console.log("state.groupPageList" + state.groupPageList)
|
||||||
const d = state.groupPageList.filter(item => item.leaderId === state.groupInfo.leaderId);
|
const d = state.groupPageList.filter(item => item.leaderId === state.groupInfo.leaderId);
|
||||||
if (d.length > 0) {
|
const id = state.groupInfo.id;
|
||||||
|
// 过滤掉编辑时候,只修改了组员最大值时候
|
||||||
|
if(id !== d[0].id) {
|
||||||
|
if (d.length > 0 ) {
|
||||||
return message.warn(d[0].leaderName + "已是小组长,请重新选择");
|
return message.warn(d[0].leaderName + "已是小组长,请重新选择");
|
||||||
}
|
}
|
||||||
const id = state.groupInfo.id
|
}
|
||||||
await editGroup({ ...state.groupInfo, projectId: state.projectId })
|
await editGroup({ ...state.groupInfo, projectId: state.projectId })
|
||||||
message.success(id ? '小组编辑成功' : "小组创建成功");
|
message.success(id ? '小组编辑成功' : "小组创建成功");
|
||||||
getGroup();
|
getGroup();
|
||||||
|
console.log("state.groupPageList:")
|
||||||
getStu();
|
getStu();
|
||||||
};
|
};
|
||||||
//搜索小组重置
|
//搜索小组重置
|
||||||
|
|||||||
Reference in New Issue
Block a user