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:
@@ -8,7 +8,7 @@
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div class="headerTitle">组员名单1</div>
|
||||
<div class="headerTitle">组员名单</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
|
||||
@@ -233,7 +233,8 @@
|
||||
>
|
||||
<a-button
|
||||
v-if="checkPer(permissions)"
|
||||
@click="del(record.id)"
|
||||
:disabled="record.isLeader === '1' "
|
||||
@click="del(record.id,record)"
|
||||
type="link"
|
||||
danger
|
||||
>删除</a-button
|
||||
@@ -618,15 +619,25 @@ function reset() {
|
||||
}
|
||||
|
||||
function bathDel() {
|
||||
debugger
|
||||
if (stuSelectKeys.value && stuSelectKeys.value.length === 0) {
|
||||
message.destroy();
|
||||
return message.warning("请先选中学员");
|
||||
}
|
||||
// 判断选择的人员中是否有小组长
|
||||
let arr = [...tableData.value.list].filter(x => [...stuSelectKeys.value].some(id => id === x.id)).filter(item => item.isLeader === '1');
|
||||
if (arr.length > 0) {
|
||||
return message.warning("选择人员中:"+arr[0].studentName + "是小组长,请勿删除!");
|
||||
}
|
||||
tableData.value.loading = true;
|
||||
delStudentList({ ids: stuSelectKeys.value }).then(() => getStuList());
|
||||
// delStudentList({ ids: stuSelectKeys.value }).then(() => getStuList());
|
||||
}
|
||||
|
||||
function del(id) {
|
||||
function del(id,row) {
|
||||
if (row.isLeader === '1') {
|
||||
return message.warning(""+row.name + "是小组长,请勿删除!");
|
||||
}
|
||||
|
||||
Modal.confirm({
|
||||
title: () => "确定删除?",
|
||||
icon: () => createVNode(ExclamationCircleOutlined),
|
||||
|
||||
Reference in New Issue
Block a user