mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-18 23:36:46 +08:00
编辑小组最大人数
This commit is contained in:
@@ -641,7 +641,7 @@
|
|||||||
<div class="more">
|
<div class="more">
|
||||||
<span style="color: rgba(0, 0, 0, 0.45); cursor: pointer">. . .</span>
|
<span style="color: rgba(0, 0, 0, 0.45); cursor: pointer">. . .</span>
|
||||||
<div class="moreItems" v-if="checkPer(permissions)">
|
<div class="moreItems" v-if="checkPer(permissions)">
|
||||||
<div class="sammo" @click="showModal2(item)">
|
<div class="sammo" @click="showModal2(item,true)">
|
||||||
编辑
|
编辑
|
||||||
</div>
|
</div>
|
||||||
<div class="sammo" @click="deleteGroupBtn(item.id)">
|
<div class="sammo" @click="deleteGroupBtn(item.id)">
|
||||||
@@ -1828,6 +1828,7 @@ export default {
|
|||||||
allDelete: false, //批量删除弹窗
|
allDelete: false, //批量删除弹窗
|
||||||
pubproject: false,
|
pubproject: false,
|
||||||
stugroup: false,
|
stugroup: false,
|
||||||
|
isEdit: false,
|
||||||
canclestu: false,
|
canclestu: false,
|
||||||
canclestu1: false,
|
canclestu1: false,
|
||||||
deleteOneStu: false, //删除单个学员弹窗
|
deleteOneStu: false, //删除单个学员弹窗
|
||||||
@@ -2479,7 +2480,8 @@ export default {
|
|||||||
console.log("点击换组", record.studentId);
|
console.log("点击换组", record.studentId);
|
||||||
state.checkgroupStuId = record.studentId;
|
state.checkgroupStuId = record.studentId;
|
||||||
};
|
};
|
||||||
const showModal2 = (item) => {
|
const showModal2 = (item,isEdit) => {
|
||||||
|
state.isEdit = isEdit;
|
||||||
state.stugroup = true;
|
state.stugroup = true;
|
||||||
state.groupInfo = item || {};
|
state.groupInfo = item || {};
|
||||||
};
|
};
|
||||||
@@ -3320,12 +3322,18 @@ export default {
|
|||||||
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);
|
||||||
const id = state.groupInfo.id;
|
const id = state.groupInfo.id;
|
||||||
// 过滤掉编辑时候,只修改了组员最大值时候
|
if (state.isEdit) {
|
||||||
if(id !== d[0].id) {
|
if (d.length > 0 && d[0].id !== id ) {
|
||||||
|
return message.warn(d[0].leaderName + "已是小组长,请重新选择");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
if (d.length > 0 ) {
|
if (d.length > 0 ) {
|
||||||
return message.warn(d[0].leaderName + "已是小组长,请重新选择");
|
return message.warn(d[0].leaderName + "已是小组长,请重新选择");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 过滤掉编辑时候,只修改了组员最大值时候
|
||||||
|
|
||||||
|
state.isEdit = false;
|
||||||
await editGroup({ ...state.groupInfo, projectId: state.projectId })
|
await editGroup({ ...state.groupInfo, projectId: state.projectId })
|
||||||
message.success(id ? '小组编辑成功' : "小组创建成功");
|
message.success(id ? '小组编辑成功' : "小组创建成功");
|
||||||
getGroup();
|
getGroup();
|
||||||
|
|||||||
Reference in New Issue
Block a user