refactor event
This commit is contained in:
@@ -20,8 +20,8 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Toast } from "tdesign-mobile-vue";
|
||||
import { gaoModuleCode, usePermissionSettingsStore } from "@/store/permissionSettingsStore";
|
||||
import { corePermissionCodes, permissionManagementRoleAccess } from "@/utils/gaoPermission";
|
||||
import { moduleCode, usePermissionSettingsStore } from "@/store/permissionSettingsStore";
|
||||
import { corePermissionCodes, permissionManagementRoleAccess } from "@/utils/permission";
|
||||
|
||||
defineOptions({
|
||||
name: "PermissionEdit"
|
||||
@@ -39,7 +39,7 @@ const pageAccess = computed(() => ({
|
||||
}));
|
||||
const formModel = reactive({
|
||||
id: "",
|
||||
moduleCode: gaoModuleCode,
|
||||
moduleCode: moduleCode,
|
||||
code: "",
|
||||
name: "",
|
||||
description: ""
|
||||
@@ -50,7 +50,7 @@ async function fillForm(): Promise<void> {
|
||||
const current = await permissionStore.loadPermissionDetail(routeId.value);
|
||||
Object.assign(formModel, {
|
||||
id: current.id,
|
||||
moduleCode: current.moduleCode || gaoModuleCode,
|
||||
moduleCode: current.moduleCode || moduleCode,
|
||||
code: current.code,
|
||||
name: current.name,
|
||||
description: current.description
|
||||
@@ -60,7 +60,7 @@ async function fillForm(): Promise<void> {
|
||||
async function savePermission(): Promise<void> {
|
||||
const permission = await permissionStore.upsertPermission({
|
||||
id: formModel.id,
|
||||
moduleCode: gaoModuleCode,
|
||||
moduleCode: moduleCode,
|
||||
code: formModel.code,
|
||||
name: formModel.name,
|
||||
description: formModel.description
|
||||
@@ -98,3 +98,4 @@ onMounted(async () => {
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user