add event record entrance
This commit is contained in:
@@ -53,6 +53,11 @@
|
||||
@edit="openTagSelector"
|
||||
/>
|
||||
<t-cell-group theme="card" v-entrance-transition="280">
|
||||
<t-cell v-if="canReadEventRecord" title="最近登记事件" arrow @click="toEventRecordList">
|
||||
<template #left-icon>
|
||||
<t-icon name="history" />
|
||||
</template>
|
||||
</t-cell>
|
||||
<t-cell v-if="canReadStat" title="客户数据图表" arrow @click="toCustomerDataCharts">
|
||||
<template #left-icon>
|
||||
<t-icon name="chart" />
|
||||
@@ -153,6 +158,7 @@ const removeDialogVisible = ref(false);
|
||||
const removeTarget = ref<Customer>();
|
||||
|
||||
const canReadStat = computed(() => userStore.hasPermissions(permissionCodes.stat.read));
|
||||
const canReadEventRecord = computed(() => userStore.hasPermissions(permissionCodes.eventRecord.read));
|
||||
const canReadPointAccount = computed(() => userStore.hasPermissions(permissionCodes.point.accountRead));
|
||||
const canReadTag = computed(() => userStore.hasPermissions(corePermissionCodes.tag.read));
|
||||
const canApplyTag = computed(() => userStore.hasPermissions(corePermissionCodes.tag.apply));
|
||||
@@ -369,6 +375,21 @@ async function toInviteeList(): Promise<void> {
|
||||
await router.push(`/management/customers/${customer.value.id}/invitees`);
|
||||
}
|
||||
|
||||
async function toEventRecordList(): Promise<void> {
|
||||
if (!canReadEventRecord.value || !customer.value?.id) {
|
||||
return;
|
||||
}
|
||||
|
||||
await router.push({
|
||||
name: "EventRecordList",
|
||||
query: {
|
||||
customerId: customer.value.id,
|
||||
customerName: customer.value.name || "",
|
||||
transitionDepth: String(Number(route.meta.depth ?? 0) + 1)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async function toEdit(): Promise<void> {
|
||||
if (!customer.value?.id) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user