style: 优化布局和交互(Loading/空状态/骨架屏)
Build and Deploy Vue3 / build (push) Successful in 1m51s
Build and Deploy Vue3 / deploy (push) Successful in 1m15s

This commit is contained in:
2026-04-07 16:51:12 +08:00
parent f0e89695f4
commit 2f06aa9f5f
15 changed files with 2216 additions and 1681 deletions
@@ -279,8 +279,8 @@ const submitEdit = () => {
fd.append('id', sgId.value)
fd.append('name', editForm.name)
fd.append('direction', editForm.direction)
fd.append('lock', editForm.lock)
fd.append('drop_all', editForm.drop_all)
fd.append('lock', editForm.lock ? 'true' : 'false')
fd.append('drop_all', editForm.drop_all ? 'true' : 'false')
const res = await updateSecurityGroup(fd)
if (res?.data?.code === 200) { ElMessage.success('修改成功'); editDialogVisible.value = false; loadDetail() }
else ElMessage.error(extractApiError(res?.data, '修改失败'))
@@ -362,7 +362,7 @@ const handleSetShared = (shared) => {
const fd = new FormData()
fd.append('service_id', serviceId.value)
fd.append('id', sgId.value)
fd.append('shared', shared)
fd.append('shared', shared ? 'true' : 'false')
const res = await setSecurityGroupShared(fd)
if (res?.data?.code === 200) { ElMessage.success(`${label}成功`); loadDetail() }
else ElMessage.error(extractApiError(res?.data, `${label}失败`))
+2 -2
View File
@@ -2306,8 +2306,8 @@ const submitSgCreate = () => {
fd.append('name', sgCreateForm.name)
fd.append('host_id', sgCreateForm.host_id)
fd.append('direction', sgCreateForm.direction)
if (sgCreateForm.lock) fd.append('lock', true)
if (sgCreateForm.drop_all) fd.append('drop_all', true)
fd.append('lock', sgCreateForm.lock ? 'true' : 'false')
fd.append('drop_all', sgCreateForm.drop_all ? 'true' : 'false')
const res = await createSecurityGroup(fd)
if (res?.data?.code === 200) {
ElMessage.success('创建成功')