From 7dc8ddd19338618825a3c0f062e946c60edd104b Mon Sep 17 00:00:00 2001 From: yml Date: Thu, 12 Nov 2026 15:32:02 +0800 Subject: [PATCH] =?UTF-8?q?feat(listing):=20=E8=B0=83=E6=95=B4=E5=95=86?= =?UTF-8?q?=E5=93=81=E7=AE=A1=E7=90=86=E8=B5=84=E4=BA=A7=E4=B8=8E=E4=BB=B7?= =?UTF-8?q?=E6=A0=BC=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/views/AdminListingsView.vue | 89 +++++++++---------- 1 file changed, 42 insertions(+), 47 deletions(-) diff --git a/frontend/src/features/admin/views/AdminListingsView.vue b/frontend/src/features/admin/views/AdminListingsView.vue index cec16b2d..e2311c1d 100644 --- a/frontend/src/features/admin/views/AdminListingsView.vue +++ b/frontend/src/features/admin/views/AdminListingsView.vue @@ -60,18 +60,19 @@ const listingTableWidth = ref(1296) const activeFilterPopover = ref('') const publishOptions = ref(emptyListingPublishOptions) const listingColumnUnits = { - code: 70, - zone: 75, - region: 105, - core: 85, - level: 60, - equipment: 80, - skin: 145, - face: 60, - remark: 85, - price: 100, - period: 55, - ratio: 35, + code: 68, + zone: 70, + region: 100, + core: 80, + level: 58, + equipment: 78, + skin: 135, + face: 58, + remark: 80, + purePrice: 72, + period: 50, + rentDeposit: 76, + ratio: 30, detail: 45, } as const type ListingColumnKey = keyof typeof listingColumnUnits @@ -153,39 +154,36 @@ const skinFilterLabel = computed(() => { }) const screenshotColumns = [ - { label: '商品编码', width: 98, read: (row: Listing) => formatListingCode(row) }, + { label: '商品编码', width: 95, read: (row: Listing) => formatListingCode(row) }, { label: '专区/赔付', - width: 105, + width: 98, read: (row: Listing) => zoneCompensationText(row), }, { label: '地区/上号/纯币', - width: 147, + width: 140, read: (row: Listing) => regionLoginCoinText(row), }, { - label: '体力/负重/保险', - width: 119, + label: '保险/体力/负重', + width: 112, read: (row: Listing) => coreAssetText(row), }, - { label: '等级/KD', width: 84, read: (row: Listing) => levelKdText(row) }, + { label: '等级/KD', width: 81, read: (row: Listing) => levelKdText(row) }, { label: 'AWM/六头/六甲', - width: 112, + width: 109, read: (row: Listing) => equipmentText(row), }, - { label: '皮肤资产', width: 203, read: (row: Listing) => skinAssetText(row) }, - { label: '人脸/全英雄', width: 84, read: (row: Listing) => faceHeroText(row) }, - { label: '号主备注', width: 119, read: (row: Listing) => ownerRemarkText(row) }, - { - label: '纯币/租金/押金', - width: 140, - read: (row: Listing) => priceRentDepositText(row), - }, - { label: '租期', width: 77, read: (row: Listing) => rentalPeriodText(row) }, - { label: '比例', width: 49, read: (row: Listing) => formatRatio(row) }, - { label: '详情', width: 63, read: () => '详情' }, + { label: '皮肤资产', width: 189, read: (row: Listing) => skinAssetText(row) }, + { label: '人脸/全英雄', width: 81, read: (row: Listing) => faceHeroText(row) }, + { label: '号主备注', width: 112, read: (row: Listing) => ownerRemarkText(row) }, + { label: '租客纯币价格', width: 101, read: (row: Listing) => renterPureCoinPriceText(row) }, + { label: '租期', width: 70, read: (row: Listing) => rentalPeriodText(row) }, + { label: '租金/押金', width: 106, read: (row: Listing) => rentAndDepositText(row) }, + { label: '比例', width: 42, read: (row: Listing) => formatRatio(row) }, + { label: '详情', width: 64, read: () => '详情' }, ] as const async function queryListings() { @@ -661,9 +659,9 @@ function insuranceSlotText(row: Listing) { function coreAssetText(row: Listing) { return [ + insuranceSlotText(row), levelText(row, 'stamina_level'), levelText(row, 'load_level'), - insuranceSlotText(row), ].join('/') } @@ -672,7 +670,7 @@ function coreAssetTitle(row: Listing) { const slots = insurance === '-' ? '-' : insuranceSlotLabel(insurance) const insuranceText = insurance === '-' || slots === insurance ? insurance : `${insurance}=${slots}格` - return `体力 ${levelText(row, 'stamina_level')} / 负重 ${levelText(row, 'load_level')} / 保险 ${insuranceText}` + return `保险 ${insuranceText} / 体力 ${levelText(row, 'stamina_level')} / 负重 ${levelText(row, 'load_level')}` } function levelKdText(row: Listing) { @@ -717,14 +715,6 @@ function faceHeroText(row: Listing) { return [faceOwnerText(row), allHeroText(row)].join('/') } -function priceRentDepositText(row: Listing) { - return [ - renterPureCoinPriceText(row), - listingPrice(row), - formatCentWithSymbol(row.deposit_amount_cent), - ].join('\n') -} - function ownerRemarkText(row: Listing) { const remark = row.description?.trim() return remark || '-' @@ -747,6 +737,10 @@ function renterPureCoinPriceText(row: Listing) { return formatCentWithSymbol(Math.round(price * 100)) } +function rentAndDepositText(row: Listing) { + return `${listingPrice(row)}/${formatCentWithSymbol(row.deposit_amount_cent)}` +} + function estimateTitle(row: Listing) { const dailyLoss = getDailyLoss(row) return dailyLoss ? `按哈夫币 ${listingCoinM(row)}、日耗 ${dailyLoss} 估算` : '未配置日耗' @@ -1086,7 +1080,7 @@ function formatQuantity(value: number) { @@ -1136,13 +1130,11 @@ function formatQuantity(value: number) { - + @@ -1151,6 +1143,9 @@ function formatQuantity(value: number) { 日耗 {{ getDailyLoss(row) }} + + +