修复若干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

View File

@ -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;

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