This commit is contained in:
parent
d573389871
commit
618d358256
|
@ -3,5 +3,10 @@ import VnCardBeta from 'components/common/VnCardBeta.vue';
|
|||
import RoleDescriptor from './RoleDescriptor.vue';
|
||||
</script>
|
||||
<template>
|
||||
<VnCardBeta data-key="Role" :id-in-where="true" :descriptor="RoleDescriptor" />
|
||||
<VnCardBeta
|
||||
url="VnRoles"
|
||||
data-key="Role"
|
||||
:id-in-where="true"
|
||||
:descriptor="RoleDescriptor"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
<script setup>
|
||||
import { ref, computed } from 'vue';
|
||||
import { computed } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import CardSummary from 'components/ui/CardSummary.vue';
|
||||
import VnLv from 'src/components/ui/VnLv.vue';
|
||||
import { useArrayData } from 'src/composables/useArrayData';
|
||||
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
|
@ -16,8 +15,6 @@ const $props = defineProps({
|
|||
},
|
||||
});
|
||||
|
||||
const { store } = useArrayData('Role');
|
||||
const role = ref(store.data);
|
||||
const entityId = computed(() => $props.id || route.params.id);
|
||||
</script>
|
||||
|
||||
|
@ -26,11 +23,10 @@ const entityId = computed(() => $props.id || route.params.id);
|
|||
ref="summary"
|
||||
url="VnRoles"
|
||||
:filter="{ where: { id: entityId } }"
|
||||
@on-fetch="(data) => (role = data)"
|
||||
data-key="Role"
|
||||
>
|
||||
<template #header> {{ role.id }} - {{ role.name }} </template>
|
||||
<template #body>
|
||||
<template #header="{ entity }"> {{ entity.id }} - {{ entity.name }} </template>
|
||||
<template #body="{ entity }">
|
||||
<QCard class="vn-one">
|
||||
<QCardSection class="q-pa-none">
|
||||
<a
|
||||
|
@ -41,9 +37,9 @@ const entityId = computed(() => $props.id || route.params.id);
|
|||
<QIcon name="open_in_new" />
|
||||
</a>
|
||||
</QCardSection>
|
||||
<VnLv :label="t('role.id')" :value="role.id" />
|
||||
<VnLv :label="t('globals.name')" :value="role.name" />
|
||||
<VnLv :label="t('role.description')" :value="role.description" />
|
||||
<VnLv :label="t('role.id')" :value="entity.id" />
|
||||
<VnLv :label="t('globals.name')" :value="entity.name" />
|
||||
<VnLv :label="t('role.description')" :value="entity.description" />
|
||||
</QCard>
|
||||
</template>
|
||||
</CardSummary>
|
||||
|
|
|
@ -4,6 +4,7 @@ export default {
|
|||
component: () => import('src/pages/Account/Role/Card/RoleCard.vue'),
|
||||
redirect: { name: 'RoleSummary' },
|
||||
meta: {
|
||||
moduleName: 'Role',
|
||||
menu: ['RoleBasicData', 'SubRoles', 'InheritedRoles', 'RoleLog'],
|
||||
},
|
||||
children: [
|
||||
|
|
Loading…
Reference in New Issue