优化发布群租客清退与历史消息
This commit is contained in:
@@ -102,6 +102,9 @@ const autoWelcomeConfig = computed(
|
||||
const listingGroupWelcomeConfig = computed(
|
||||
() => configs.value.find(item => item.key === 'chat.listing_group_welcome') || null
|
||||
)
|
||||
const renterRetentionConfig = computed(
|
||||
() => configs.value.find(item => item.key === 'chat.renter_retention_days_after_order_end') || null
|
||||
)
|
||||
|
||||
const regularConfigs = computed(() =>
|
||||
configs.value.filter(
|
||||
@@ -114,7 +117,8 @@ const regularConfigs = computed(() =>
|
||||
item.key !== 'order.agreements' &&
|
||||
item.key !== 'profile.post_rental_notice' &&
|
||||
item.key !== 'chat.auto_welcome_message' &&
|
||||
item.key !== 'chat.listing_group_welcome'
|
||||
item.key !== 'chat.listing_group_welcome' &&
|
||||
item.key !== 'chat.renter_retention_days_after_order_end'
|
||||
)
|
||||
)
|
||||
|
||||
@@ -200,6 +204,8 @@ function openEdit(row: SystemConfig) {
|
||||
agreementsVisible.value = true
|
||||
} else if (row.key === 'profile.post_rental_notice') {
|
||||
postRentalNoticeVisible.value = true
|
||||
} else if (row.key === 'chat.renter_retention_days_after_order_end') {
|
||||
generalVisible.value = true
|
||||
} else {
|
||||
generalVisible.value = true
|
||||
}
|
||||
@@ -560,6 +566,39 @@ function formatConfigValue(row: SystemConfig) {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section v-if="renterRetentionConfig" class="publish-config-panel">
|
||||
<div class="publish-config-main">
|
||||
<div>
|
||||
<p class="eyebrow">Chat Retention</p>
|
||||
<h2>发布群租客保留天数</h2>
|
||||
<span>订单结束后,租客在发布群中保留的天数,超时后由后台任务自动移出。</span>
|
||||
</div>
|
||||
<el-button type="primary" @click="openEdit(renterRetentionConfig)">编辑天数</el-button>
|
||||
</div>
|
||||
<div class="publish-stat-grid home-stat-grid">
|
||||
<div class="publish-stat">
|
||||
<strong>{{ renterRetentionConfig.value }}</strong>
|
||||
<span>当前天数</span>
|
||||
</div>
|
||||
<div class="publish-stat">
|
||||
<strong>范围</strong>
|
||||
<span>3-7 天</span>
|
||||
</div>
|
||||
<div class="publish-stat">
|
||||
<strong>任务</strong>
|
||||
<span>订单结束后自动清退</span>
|
||||
</div>
|
||||
<div class="publish-stat">
|
||||
<strong>键</strong>
|
||||
<span>{{ renterRetentionConfig.key }}</span>
|
||||
</div>
|
||||
<div class="publish-stat">
|
||||
<strong>更新</strong>
|
||||
<span>{{ formatHomeConfigStatus(renterRetentionConfig, '未初始化') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<el-table v-loading="loading" class="table-panel" :data="regularConfigs">
|
||||
<el-table-column prop="key" label="配置项" min-width="260" />
|
||||
<el-table-column label="当前值" min-width="180" show-overflow-tooltip>
|
||||
|
||||
@@ -53,6 +53,11 @@ export const systemConfigSelectOptions: Record<string, SystemConfigOption[]> = {
|
||||
{ label: '管理员 ID 2', value: '2' },
|
||||
{ label: '管理员 ID 3', value: '3' },
|
||||
],
|
||||
'chat.renter_retention_days_after_order_end': [
|
||||
{ label: '3 天', value: '3' },
|
||||
{ label: '5 天', value: '5' },
|
||||
{ label: '7 天', value: '7' },
|
||||
],
|
||||
}
|
||||
|
||||
export function getSystemConfigSelectOptions(key: string) {
|
||||
|
||||
Reference in New Issue
Block a user