refactor event
This commit is contained in:
@@ -38,8 +38,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: "RoleEdit"
|
||||
@@ -57,7 +57,7 @@ const pageAccess = computed(() => ({
|
||||
}));
|
||||
const formModel = reactive({
|
||||
id: "",
|
||||
moduleCode: gaoModuleCode,
|
||||
moduleCode: moduleCode,
|
||||
code: "",
|
||||
name: "",
|
||||
description: "",
|
||||
@@ -84,7 +84,7 @@ async function fillForm(): Promise<void> {
|
||||
const current = await permissionStore.loadRoleDetail(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,
|
||||
@@ -95,7 +95,7 @@ async function fillForm(): Promise<void> {
|
||||
async function saveRole(): Promise<void> {
|
||||
const role = await permissionStore.upsertRole({
|
||||
id: formModel.id,
|
||||
moduleCode: gaoModuleCode,
|
||||
moduleCode: moduleCode,
|
||||
code: formModel.code,
|
||||
name: formModel.name,
|
||||
description: formModel.description,
|
||||
@@ -192,3 +192,4 @@ onMounted(async () => {
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user