fix event allow record role

This commit is contained in:
Timi
2026-08-13 23:35:15 +08:00
parent 4f8b992350
commit 3c3d4f5a40
+3 -3
View File
@@ -192,12 +192,11 @@
</template>
<script setup lang="ts">
import { Time } from "timi-web";
import { RoleAPI, Time, type ModuleCode } from "timi-web";
import { DialogPlugin, Toast } from "tdesign-mobile-vue";
import type { ColorObject } from "tdesign-mobile-vue";
import { useUserStore, type Role } from "timi-web";
import EventAPI from "@/api/EventAPI";
import ManagedUserAPI from "@/api/ManagedUserAPI";
import { useCurrentStoreStore } from "@/store/currentStoreStore";
import type { EventItem, EventStatus, EventLimitType } from "@/types/EventItem";
import { gaoRoleCodes, permissionCodes } from "@/utils/permission";
@@ -218,6 +217,7 @@ const router = useRouter();
const userStore = useUserStore();
const currentStoreStore = useCurrentStoreStore();
const routeId = computed(() => String(route.params.id || ""));
const moduleCode: ModuleCode = "GAO";
const isCreateMode = computed(() => !routeId.value);
const isGlobalManager = computed(() => userStore.hasRoles(gaoRoleCodes.globalManager));
@@ -618,7 +618,7 @@ async function prepareStoreScope(): Promise<void> {
async function fillForm(): Promise<void> {
await prepareStoreScope();
roleOptions.value = await ManagedUserAPI.roleList();
roleOptions.value = await RoleAPI.manageableList(moduleCode);
if (isCreateMode.value) {
return;
}