fetch(modify):修复API的URL
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 5m1s

This commit is contained in:
sexygoat
2026-02-03 10:04:59 +08:00
parent 06cde977ad
commit 2c6fe4375b
17 changed files with 225 additions and 205 deletions

View File

@@ -133,6 +133,12 @@
>
{{ data.perm_type === 1 ? '菜单' : '按钮' }}
</ElTag>
<ElTag
:type="data.status === 1 ? 'success' : 'info'"
size="small"
>
{{ data.status === 1 ? '启用' : '禁用' }}
</ElTag>
</span>
</template>
</ElTree>
@@ -183,6 +189,12 @@
>
{{ data.perm_type === 1 ? '菜单' : '按钮' }}
</ElTag>
<ElTag
:type="data.status === 1 ? 'success' : 'info'"
size="small"
>
{{ data.status === 1 ? '启用' : '禁用' }}
</ElTag>
</span>
<ElButton
type="danger"
@@ -352,6 +364,7 @@
activeText: getStatusText(CommonStatus.ENABLED),
inactiveText: getStatusText(CommonStatus.DISABLED),
inlinePrompt: true,
disabled: !hasAuth('role:update_status'),
'onUpdate:modelValue': (val: string | number | boolean) =>
handleStatusChange(row, val as number)
})
@@ -431,6 +444,7 @@
id: node.id,
label: node.perm_name,
perm_type: node.perm_type,
status: node.status ?? 1,
children: node.children && node.children.length > 0 ? buildTreeData(node.children) : undefined
}))
}
@@ -471,11 +485,13 @@
}
// 根据权限ID列表设置树节点的禁用状态
// 同时禁用状态为禁用(status=0)的权限
const setTreeNodesDisabled = (treeNodes: any[], idsToDisable: number[]): any[] => {
return treeNodes.map((node) => {
const newNode = {
...node,
disabled: idsToDisable.includes(node.id)
// 如果已分配或状态为禁用,则禁用该节点
disabled: idsToDisable.includes(node.id) || node.status === 0
}
if (node.children && node.children.length > 0) {