fix : 修复数据loading加载

This commit is contained in:
2024-03-05 22:59:09 +08:00
parent 4ec7558a31
commit 3b42035892
9 changed files with 57 additions and 22 deletions

View File

@@ -214,16 +214,24 @@ const handleAddUser = () => {
}
const handleEditUser = (row) => {
reset()
const loading = ElLoading.service({
lock: true,
text: '正在加载系统资源...',
background: 'rgba(0, 0, 0, 0.7)',
customClass:'allLoading'
})
getUserDetail(row.userId).then(res => {
if (res.code === 1000) {
getTunnel()
form.value = res.data.user
form.value.roleId = res.data.roleIds[0]
form.value.tunnelList = res.data.user.tunnelList
title.value = '修改用户'
isVisited.value = true
}
loading.close()
})
title.value = '修改用户'
isVisited.value = true
}
const handleDelete = () => {
@@ -266,8 +274,9 @@ getRoleOptionInfo()
const getInfo = () => {
const loading = ElLoading.service({
lock: true,
text: '正在加载系统资源',
text: '正在加载系统资源...',
background: 'rgba(0, 0, 0, 0.7)',
customClass:'allLoading'
})
getUser({
siteId: siteId,
@@ -275,11 +284,11 @@ const getInfo = () => {
...pageInfo
}).then(res => {
if (res.code === 1000) {
loading.close()
userData.value = res.data.rows
total.value = res.data.total
showFirst.value = total.value / pageInfo.pageSize >= 1;
}
loading.close()
})
}
getInfo()