新增账号删除账号禁用功能
This commit is contained in:
parent
e9f40021bc
commit
515e467d5e
@ -93,9 +93,25 @@
|
||||
<a-space>
|
||||
<a @click="handleAdd('编辑账号',record)">编辑</a>
|
||||
<a-divider type="vertical" />
|
||||
<a>禁用</a>
|
||||
<a-popconfirm
|
||||
title="请确认您是否要禁用该账号"
|
||||
ok-text="确定"
|
||||
cancel-text="取消"
|
||||
placement="top"
|
||||
@confirm="handleDisable(record)"
|
||||
>
|
||||
<a href="#">禁用</a>
|
||||
</a-popconfirm>
|
||||
<a-divider type="vertical" />
|
||||
<a>删除</a>
|
||||
<a-popconfirm
|
||||
title="请确认您是否要删除该账号"
|
||||
ok-text="确定"
|
||||
cancel-text="取消"
|
||||
placement="top"
|
||||
@confirm="handleDel(record)"
|
||||
>
|
||||
<a href="#">删除</a>
|
||||
</a-popconfirm>
|
||||
</a-space>
|
||||
</template>
|
||||
</template>
|
||||
@ -271,6 +287,30 @@ const handleOkModal = () => {
|
||||
});
|
||||
}
|
||||
|
||||
const handleDisable = (record) => {
|
||||
callUser("/staff/staffInfoDisable/" + record['staffId'], {}, "get").then((res) => {
|
||||
if (res.code != 200) {
|
||||
message.error(res.message)
|
||||
dataSource.value = []
|
||||
return
|
||||
}
|
||||
message.success(res.message)
|
||||
getData();
|
||||
});
|
||||
}
|
||||
|
||||
const handleDel = (record) => {
|
||||
callUser("/staff/staffInfoDel/" + record['staffId'], {}, "get").then((res) => {
|
||||
if (res.code != 200) {
|
||||
message.error(res.message)
|
||||
dataSource.value = []
|
||||
return
|
||||
}
|
||||
message.success(res.message)
|
||||
getData();
|
||||
});
|
||||
}
|
||||
|
||||
const handleCancelModal = () => {
|
||||
formModel.value.resetAll(bres => {
|
||||
if (bres) open.value = false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user