fix layout
This commit is contained in:
@@ -1,57 +1,61 @@
|
||||
<template>
|
||||
<t-navbar
|
||||
fixed
|
||||
:z-index="20"
|
||||
title="通知详情"
|
||||
left-arrow
|
||||
@left-click="$router.back()"
|
||||
>
|
||||
<template #right>
|
||||
<t-button
|
||||
v-if="detail?.id && canDeleteNotify"
|
||||
@click="confirmDelete"
|
||||
theme="danger"
|
||||
variant="text"
|
||||
size="small"
|
||||
content="删除"
|
||||
/>
|
||||
</template>
|
||||
</t-navbar>
|
||||
<div v-can="corePermissionCodes.notify.read" class="notify-detail">
|
||||
<t-empty
|
||||
v-if="!detail"
|
||||
:description="isLoading ? '正在加载通知' : '通知不存在'"
|
||||
/>
|
||||
<template v-else>
|
||||
<t-cell-group title="通知状态" theme="card" v-entrance-transition>
|
||||
<t-cell title="发送用户" :note="`${detail.detailList?.length || 0} 人`" arrow @click="openRecipientList"/>
|
||||
<t-cell title="已读用户" :note="`${readCount} 人`" arrow @click="openReadRecipientList"/>
|
||||
<t-cell title="未读用户" :note="`${unreadCount} 人`" arrow @click="openUnreadRecipientList"/>
|
||||
<t-cell title="当前状态">
|
||||
<template #note>
|
||||
<t-tag size="small" :theme="getSummaryTheme" :content="getSummaryStatus" />
|
||||
</template>
|
||||
</t-cell>
|
||||
</t-cell-group>
|
||||
<t-button
|
||||
v-if="canCancelNotify && canCancel"
|
||||
class="bg-white red cell-button"
|
||||
variant="text"
|
||||
block
|
||||
:loading="isCanceling"
|
||||
v-entrance-transition
|
||||
@click="confirmCancel"
|
||||
content="取消发送"
|
||||
/>
|
||||
<notify-content
|
||||
class="preview"
|
||||
:detail="mainDetail"
|
||||
:subject="getSubject(detail)"
|
||||
:time="getSendTime(mainDetail)"
|
||||
:resolve-attachment-url="resolveAttachmentUrl"
|
||||
v-entrance-transition
|
||||
/>
|
||||
</template>
|
||||
<div class="page-layout navbar">
|
||||
<t-navbar
|
||||
fixed
|
||||
:z-index="20"
|
||||
title="通知详情"
|
||||
left-arrow
|
||||
@left-click="$router.back()"
|
||||
>
|
||||
<template #right>
|
||||
<t-button
|
||||
v-if="detail?.id && canDeleteNotify"
|
||||
@click="confirmDelete"
|
||||
theme="danger"
|
||||
variant="text"
|
||||
size="small"
|
||||
content="删除"
|
||||
/>
|
||||
</template>
|
||||
</t-navbar>
|
||||
<main class="page-content scroll column">
|
||||
<div v-can="corePermissionCodes.notify.read" class="notify-detail">
|
||||
<t-empty
|
||||
v-if="!detail"
|
||||
:description="isLoading ? '正在加载通知' : '通知不存在'"
|
||||
/>
|
||||
<template v-else>
|
||||
<t-cell-group title="通知状态" theme="card" v-entrance-transition>
|
||||
<t-cell title="发送用户" :note="`${detail.detailList?.length || 0} 人`" arrow @click="openRecipientList"/>
|
||||
<t-cell title="已读用户" :note="`${readCount} 人`" arrow @click="openReadRecipientList"/>
|
||||
<t-cell title="未读用户" :note="`${unreadCount} 人`" arrow @click="openUnreadRecipientList"/>
|
||||
<t-cell title="当前状态">
|
||||
<template #note>
|
||||
<t-tag size="small" :theme="getSummaryTheme" :content="getSummaryStatus" />
|
||||
</template>
|
||||
</t-cell>
|
||||
</t-cell-group>
|
||||
<t-button
|
||||
v-if="canCancelNotify && canCancel"
|
||||
class="bg-white red cell-button"
|
||||
variant="text"
|
||||
block
|
||||
:loading="isCanceling"
|
||||
v-entrance-transition
|
||||
@click="confirmCancel"
|
||||
content="取消发送"
|
||||
/>
|
||||
<notify-content
|
||||
class="preview"
|
||||
:detail="mainDetail"
|
||||
:subject="getSubject(detail)"
|
||||
:time="getSendTime(mainDetail)"
|
||||
:resolve-attachment-url="resolveAttachmentUrl"
|
||||
v-entrance-transition
|
||||
/>
|
||||
</template>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -275,7 +279,7 @@ watch(() => route.params.id, async () => {
|
||||
.notify-detail {
|
||||
gap: 1rem;
|
||||
min-height: 100%;
|
||||
padding: var(--app-nav-height) 0 1rem;
|
||||
padding: 0 0 1rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
/>
|
||||
</template>
|
||||
</t-navbar>
|
||||
<main v-can="corePermissionCodes.notify.read" class="page-content scroll list">
|
||||
<main v-can="corePermissionCodes.notify.read" class="page-content scroll column list">
|
||||
<t-pull-down-refresh
|
||||
class="pull-refresh"
|
||||
v-model="isRefreshing"
|
||||
|
||||
@@ -1,59 +1,65 @@
|
||||
<template>
|
||||
<t-navbar
|
||||
fixed
|
||||
:z-index="20"
|
||||
title="发送用户"
|
||||
left-arrow
|
||||
@left-click="$router.back()"
|
||||
/>
|
||||
<div v-can="corePermissionCodes.notify.read" class="notify-recipient-list">
|
||||
<template v-if="detail">
|
||||
<t-segmented
|
||||
v-model="recipientFilter"
|
||||
class="filter"
|
||||
block
|
||||
:options="recipientFilterOptions"
|
||||
v-entrance-transition
|
||||
/>
|
||||
<t-cell-group v-if="filteredDetailList.length" theme="card" class="recipients">
|
||||
<t-cell
|
||||
v-for="item in filteredDetailList"
|
||||
:key="item.id"
|
||||
v-entrance-transition="{ step: 30 }"
|
||||
>
|
||||
<template #title>
|
||||
<div class="recipient-title">
|
||||
<span v-text="getRecipientName(item)" />
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="recipientFilter === 'all'" #description>
|
||||
<div class="recipient-description">
|
||||
<time-label :timestamp="item.sendAt" underline />
|
||||
<span v-if="item.resultDesc" v-text="item.resultDesc" />
|
||||
</div>
|
||||
</template>
|
||||
<template #note>
|
||||
<t-tag
|
||||
v-if="recipientFilter === 'all'"
|
||||
size="small"
|
||||
:theme="getStatusTheme(item)"
|
||||
:content="getStatusText(item)"
|
||||
/>
|
||||
<time-label
|
||||
v-else-if="recipientFilter === 'read'"
|
||||
:timestamp="item.readAt"
|
||||
underline
|
||||
/>
|
||||
<telephone-link v-else :value="item.toUser?.phoneNo" />
|
||||
</template>
|
||||
</t-cell>
|
||||
</t-cell-group>
|
||||
<t-empty v-else description="暂无匹配的接收用户" v-entrance-transition />
|
||||
</template>
|
||||
<t-empty
|
||||
v-else
|
||||
:description="isLoading ? '正在加载发送用户' : '通知不存在'"
|
||||
<div class="page-layout navbar">
|
||||
<t-navbar
|
||||
fixed
|
||||
:z-index="20"
|
||||
title="发送用户"
|
||||
left-arrow
|
||||
@left-click="$router.back()"
|
||||
/>
|
||||
<main class="page-content scroll column list">
|
||||
<div class="pull-refresh">
|
||||
<div v-can="corePermissionCodes.notify.read" class="notify-recipient-list">
|
||||
<template v-if="detail">
|
||||
<t-segmented
|
||||
v-model="recipientFilter"
|
||||
class="filter"
|
||||
block
|
||||
:options="recipientFilterOptions"
|
||||
v-entrance-transition
|
||||
/>
|
||||
<t-cell-group v-if="filteredDetailList.length" theme="card" class="recipients">
|
||||
<t-cell
|
||||
v-for="item in filteredDetailList"
|
||||
:key="item.id"
|
||||
v-entrance-transition="{ step: 30 }"
|
||||
>
|
||||
<template #title>
|
||||
<div class="recipient-title">
|
||||
<span v-text="getRecipientName(item)" />
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="recipientFilter === 'all'" #description>
|
||||
<div class="recipient-description">
|
||||
<time-label :timestamp="item.sendAt" underline />
|
||||
<span v-if="item.resultDesc" v-text="item.resultDesc" />
|
||||
</div>
|
||||
</template>
|
||||
<template #note>
|
||||
<t-tag
|
||||
v-if="recipientFilter === 'all'"
|
||||
size="small"
|
||||
:theme="getStatusTheme(item)"
|
||||
:content="getStatusText(item)"
|
||||
/>
|
||||
<time-label
|
||||
v-else-if="recipientFilter === 'read'"
|
||||
:timestamp="item.readAt"
|
||||
underline
|
||||
/>
|
||||
<telephone-link v-else :value="item.toUser?.phoneNo" />
|
||||
</template>
|
||||
</t-cell>
|
||||
</t-cell-group>
|
||||
<t-empty v-else description="暂无匹配的接收用户" v-entrance-transition />
|
||||
</template>
|
||||
<t-empty
|
||||
v-else
|
||||
:description="isLoading ? '正在加载发送用户' : '通知不存在'"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -176,7 +182,7 @@ watch(() => route.query.filter, () => {
|
||||
.notify-recipient-list {
|
||||
gap: 1rem;
|
||||
min-height: 100%;
|
||||
padding: calc(var(--app-nav-height) + 1rem) 0 1rem;
|
||||
padding: 0 0 1rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
|
||||
@@ -1,34 +1,38 @@
|
||||
<template>
|
||||
<t-navbar
|
||||
fixed
|
||||
:z-index="20"
|
||||
title="通知详情"
|
||||
left-arrow
|
||||
@left-click="$router.back()"
|
||||
>
|
||||
<template #right>
|
||||
<t-button
|
||||
v-if="detail?.id"
|
||||
@click="confirmDelete"
|
||||
theme="danger"
|
||||
variant="text"
|
||||
size="small"
|
||||
content="删除"
|
||||
/>
|
||||
</template>
|
||||
</t-navbar>
|
||||
<div v-can="corePermissionCodes.notify.read" class="notify-detail">
|
||||
<notify-content
|
||||
v-if="detail"
|
||||
:detail="detail"
|
||||
:sender="getSenderName(detail)"
|
||||
:timestamp="detail.sendAt"
|
||||
:resolve-attachment-url="resolveAttachmentUrl"
|
||||
/>
|
||||
<t-empty
|
||||
v-else
|
||||
:description="isLoading ? '正在加载通知' : '通知不存在'"
|
||||
/>
|
||||
<div class="page-layout navbar">
|
||||
<t-navbar
|
||||
fixed
|
||||
:z-index="20"
|
||||
title="通知详情"
|
||||
left-arrow
|
||||
@left-click="$router.back()"
|
||||
>
|
||||
<template #right>
|
||||
<t-button
|
||||
v-if="detail?.id"
|
||||
@click="confirmDelete"
|
||||
theme="danger"
|
||||
variant="text"
|
||||
size="small"
|
||||
content="删除"
|
||||
/>
|
||||
</template>
|
||||
</t-navbar>
|
||||
<main class="page-content scroll column">
|
||||
<div v-can="corePermissionCodes.notify.read" class="notify-detail">
|
||||
<notify-content
|
||||
v-if="detail"
|
||||
:detail="detail"
|
||||
:sender="getSenderName(detail)"
|
||||
:timestamp="detail.sendAt"
|
||||
:resolve-attachment-url="resolveAttachmentUrl"
|
||||
/>
|
||||
<t-empty
|
||||
v-else
|
||||
:description="isLoading ? '正在加载通知' : '通知不存在'"
|
||||
/>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -166,7 +170,7 @@ watch(() => route.params.id, async () => {
|
||||
|
||||
<style scoped lang="less">
|
||||
.notify-detail {
|
||||
padding: var(--app-nav-height) 0 1rem 0;
|
||||
padding: 0 0 1rem 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
/>
|
||||
</template>
|
||||
</t-navbar>
|
||||
<main v-can="corePermissionCodes.notify.read" class="page-content scroll list">
|
||||
<main v-can="corePermissionCodes.notify.read" class="page-content scroll column list">
|
||||
<t-pull-down-refresh
|
||||
class="pull-refresh"
|
||||
v-model="isRefreshing"
|
||||
|
||||
Reference in New Issue
Block a user