fix event allow record role
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user