点击新增或者编辑弹窗时 存下父级和当前级id
pid.value = scope.row.id // 当前级
parentPid.value = scope.row.parentId // 父级
// 点击新增编辑 或 删除
const handleAddOrUpdateMenu = (type: any, scope?: any) => {
pid.value = scope.row.id // 当前级
parentPid.value = scope.row.parentId // 父级
console.log('当前级id:' + pid.value)
console.log('父级id:' + parentPid.value)
if (type === 'add') {
AddOrUpdateMenuPopupBoolean.value = true
AddOrUpdateMenuPopupFormDatas.value = { status: 1, alias: '', parentId: scope.row.id, sort: 1, name: '' }
} else if (type === 'edit') {
AddOrUpdateMenuPopupBoolean.value = true
AddOrUpdateMenuPopupFormDatas.value = JSON.parse(JSON.stringify(scope.row))
} else {
ElMessageBox.confirm('此操作将永久删除该条数据, 是否继续?',