修复若干bug

This commit is contained in:
2026-03-10 22:24:00 +08:00
parent 183ade379b
commit 66e747dd8c
2 changed files with 10 additions and 7 deletions
@@ -227,17 +227,20 @@ const handleSubmit = async () => {
try {
await formRef.value.validate();
// 组合选中节点(全选 + 半选
// 只获取完全选中节点(不包含半选父节点
const checkedKeys = treeRef.value.getCheckedKeys();
const halfCheckedKeys = treeRef.value.getHalfCheckedKeys();
const allCheckedKeys = [...checkedKeys, ...halfCheckedKeys];
const submitData = {
const submitData: any = {
name: form.value.name,
status: form.value.status,
rights: allCheckedKeys,
rights: checkedKeys,
};
// 编辑时添加 id 字段
if (isEdit.value && props.role) {
submitData.id = props.role.id;
}
submitting.value = true;
let res;
+2 -2
View File
@@ -56,7 +56,7 @@
详情
</el-button>
<el-button
v-if="userInfo?.id === 1"
v-if="userInfo?.id === 2"
size="small"
type="primary"
link
@@ -66,7 +66,7 @@
编辑
</el-button>
<el-button
v-if="userInfo?.id === 1"
v-if="userInfo?.id === 2"
size="small"
type="danger"
link